Construction A takes every integer vector whose coordinates reduce to a codeword modulo a prime pp. This preimage of a linear code is a full-rank lattice.

Lift a code by reduction modulo p

Λ(C)={x∈Zn:x mod p∈C},C≤Fpn.\Lambda(C)=\{x\in\mathbb{Z}^n : x\bmod p\in C\},\qquad C\le\mathbb{F}_p^n.

The reduction homomorphism preserves addition. Its preimage of the subspace is closed under addition and subtraction, and contains pZnp\mathbb{Z}^n, so it has full rank. Its index in the integer lattice equals the number of code cosets. If dim⁡C=k\dim C=k, this gives [Zn:Λ(C)]=pn−k[\mathbb{Z}^n:\Lambda(C)]=p^{n-k}, also its covolume in the unscaled convention used here.

Work out the two-bit repetition code

Let C={(0,0),(1,1)}C=\{(0,0),(1,1)\} over F2\mathbb{F}_2. An integer pair belongs when its coordinates have the same parity. The columns (1,1)(1,1) and (0,2)(0,2) generate exactly that set. For a point (x,y)(x,y), the basis coefficients are xx and (y−x)/2(y-x)/2, both integers under the parity condition.

The basis determinant and the index formula agree, giving covolume 2. The two cosets are represented by (0,0)(0,0) and (1,0)(1,0). Replacing the second column by its difference with the first gives (−1,1)(-1,1). The two new columns are perpendicular and have length 2\sqrt2, so the lattice is a rotated and scaled square lattice.

Read the packing and modular kernel

The only nonzero integer vectors of length below 2\sqrt2 have exactly one nonzero coordinate equal to 1 or −1. They fail the parity condition. The shortest length is therefore 2\sqrt2, and the packing radius is 1/21/\sqrt2. The occupied fraction is π/4\pi/4, as for the ordinary square lattice.

More generally, if a parity-check matrix HH defines C=ker⁡HC=\ker H, then Λ(C)\Lambda(C) is the integer solution set to Hx=0(modp)Hx=0\pmod p. This is the modular-kernel construction in the q-ary lattice guide.

For constructions of packings from codes, see John Leech and Neil Sloane, Sphere Packings and Error-Correcting Codes.