Invariants of an Additive Code
The Ambient Space and Alphabet
A length \(n\) additive code has an alphabet \(F\) and coefficient field \(K \subseteq F\). The code consists of codewords which are a \(K\)-linear subspace of \(F^{(n)}\).
- Alphabet(C): Code -> Rng
- Field(C): Code -> Rng
The underlying field (or alphabet) of the codewords of the additive code \(C\). A length \(n\) additive code with alphabet \(F\) consists of codewords from \(F^{(n)}\).
- CoefficientField(C): Code -> Rng
The field over which the codewords of the additive code \(C\) are considered linear. This will be a subfield of the alphabet of \(C\).
- AmbientSpace(C): Code -> ModTupRng
The ambient space of the additive code \(C\), i.e. the generic \(R\)-space \(V\) in which \(C\) is contained.
- Generic(C): Code -> Code
Given a length \(n\) additive code \(C\), return the generic \([n, n, 1]\) code in which \(C\) is contained.
- Example: Alphabet and Coefficient Field (ex-b0a75c)
Run in calculator (opens in a new tab)
A code can often be represented using several different coefficient fields.
> F<w> := GF(5,4); > K := GF(5,2); > C := RandomAdditiveCode(F, K, 12, 5); > C:Minimal; [12, 2 1/2 : 5] GF(5^2)-Additive Code over GF(5^4) > #C; 9765625 > Alphabet(C); Finite field of size 5^4 > CoefficientField(C); Finite field of size 5^2 > > C1 := AdditiveCode(GF(5), C); > C1:Minimal; [12, 2 1/2 : 10] GF(5)-Additive Code over GF(5^4) > #C1; 9765625 > Alphabet(C1); Finite field of size 5^4 > CoefficientField(C1); Finite field of size 5
Basic Numerical Invariants
- Dimension(C): Code -> FldRatElt
The (rational) dimension \(k\) of \(C\). If the alphabet of \(C\) is \(F\), then the dimension is defined by the equation \(\#C = (\#F)^k\).
Note that since any basis of the additive code \(C\) is relative to the coefficient field \(K\), this dimension is not necessarily equal to the number of generators of \(C\) and is not even necessarily integral.
- NumberOfGenerators(C): Code -> RngIntElt
- Ngens(C): Code -> RngIntElt
The number of generators of the additive code \(C\). Note that if the coefficient ring of \(C\) is not the same as its alphabet then this will be different from the dimension of \(C\).
The Code Space
- GeneratorMatrix(C): Code -> ModMatFldElt
- BasisMatrix(C): Code -> ModMatRngElt
The generator matrix for an \([n, k(k_g)]\) \(K\)-additive code \(C\) over \(F\) is a \(k_g \times n\) matrix over \(F\), whose \(k_g\) rows form a basis for \(C\) when considered as vectors over \(K\).