A cyclic code of length over is a linear code invariant under . Associate the word with . The shift is multiplication by modulo , so shift-invariant linear subspaces are exactly the ideals of . The inverse image of such an ideal in is principal and contains ; hence it is generated by a unique monic divisor of . The code has basis , and dimension .
The defining zeros of a cyclic code are the roots of its generator in a splitting field. Since , each is a root of unity over a finite field. Every codeword vanishes at each such root. If the characteristic divides , root multiplicities must additionally be retained; in the Hamming construction below the modulus has no repeated roots.
The unrestricted ternary cyclic-equivalence assertion is false. At it would give a cyclic code. But
over , with the quadratic irreducible. A dimension-two cyclic code needs a degree-two generator, so its only possibilities are and . Each is a weight-two codeword. Therefore neither has minimum distance three, and no code equivalent to the ternary Hamming code can be cyclic. A valid general version of the asserted construction assumes odd . The usual distance-three Hamming parameters also require ; when the code is the length-one zero code.
Here is the construction with its precise qualification. A ternary Hamming code has a parity-check matrix whose columns represent each one-dimensional subspace of once. There are such subspaces. Its rank is , because the coordinate lines are included. Its minimum distance is at least three, because no column is zero and no two are proportional. For , two independent vectors and their sum determine three distinct columns, and, after adjusting their nonzero representative scalars, give a weight-three linear relation. Thus its parameters are . Permuting columns and changing their nonzero representatives produces a monomial equivalence of linear codes.
Take odd and choose of order . Since is odd, is not in the cyclic subgroup generated by . Hence lie in distinct one-dimensional -subspaces: a proportional pair would have ratio or , neither possible for two distinct powers in this list. By their number they represent all projective points. Consequently
is monomially equivalent to the ternary Hamming code. Since , evaluation at descends to and its kernel is an ideal, so is cyclic.
The degree of over is . If it were , its generated field would have elements and its element order would give
a contradiction. Its minimal polynomial of an algebraic element therefore has degree . Applying Frobenius to a polynomial relation shows that are its roots; they are distinct by the same field-degree argument. Their product polynomial is the monic minimal polynomial of an algebraic element, and it divides . Thus
This identifies all the defining zeros. For , , the defining exponents are modulo .
There is also a uniform construction for all , explaining the missing qualification. Let generate , which has order . The powers represent all projective points, since proportional powers differ by exponent or modulo . But , so the kernel of is an ideal modulo , a negacyclic code. Multiplication by gives , preserving its kernel. This code is always equivalent to the ternary Hamming code. If is odd, is odd too, and the substitution , or coordinate scaling , changes this negacyclic construction into the cyclic one. In fact then has order . These explicit constructions prove the qualified assertion rather than relying on a theorem name.
For decoding, use the printed matrix with received words as row vectors; the conventional parity-check matrix is . The received word's syndrome is
A single-symbol error of value at position has syndrome , where is row of the printed matrix. Here
Therefore subtract at the sixth coordinate, changing its received value to modulo three. The decoded codeword is
Its syndrome is zero. The thirteen projective rows and the two nonzero scalars give all nonzero syndromes exactly once, so this is the unique codeword at distance one. It is the transmitted word under the usual assumption of at most one symbol error. If positions are designated check positions, their independent unit rows make the other ten symbols systematic data, namely .
For odd , put and choose of order in . Because is odd, the powers , , represent every projective point once. The cyclic code defined by is therefore monomially equivalent to a ternary Hamming code, with the displayed generator polynomial of a cyclic code. This statement requires a qualification: at , every ternary cyclic length-four, dimension-two code has a weight-two generator, so none has Hamming distance three.