Lean, informalized

Nielsen & Chuang · Chapter 10, Quantum error-correction · p. 452

Exercise 10.28 - The words passing three parity checks are exactly the images of a seven by four matrix

A transposed check matrix generates the Hamming code.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The Exercise

A word of seven bits is a vector y=(y1,…,y7)y = (y_1, \dots, y_7) in ℤ27\mathbb{Z}_2^7, where ℤ2={0,1}\mathbb{Z}_2 = \{0, 1\} and all arithmetic is modulo 22. A generator matrix GG of a code CC of such words is a 7×k7 \times k matrix over ℤ2\mathbb{Z}_2 whose images GxGx, as the message xx runs over ℤ2k\mathbb{Z}_2^k, are exactly the words of CC. The Hamming code C1C_1 is given instead by three parity checks on the seven bits, the rows of a 3×73 \times 7 parity check matrix HH over ℤ2\mathbb{Z}_2: the words of C1C_1 are the yy with Hy=0Hy = 0.

The exercise gives a 4×74 \times 7 matrix H[C2]H[C_2], the parity check matrix of a second code C2C_2, and asks to verify that its transpose is a generator matrix of C1C_1, so that H[C2]=G[C1]TH[C_2] = G[C_1]^T.

Three Matrices

The parity check matrix HH of the Hamming code is the 3×73 \times 7 matrix over ℤ2\mathbb{Z}_2 H=(000111101100111010101),H = \begin{pmatrix} 0 & 0 & 0 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 0 & 0 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 & 0 & 1 \end{pmatrix},(1)✦ whose jjth column is jj written in binary, most significant bit on top.

The matrix H[C2]H[C_2] of the exercise is the 4×74 \times 7 matrix over ℤ2\mathbb{Z}_2 H[C2]=(1000011010010100101100001111).H[C_2] = \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 1 & 1 \\ 0 & 1 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 & 1 & 1 \end{pmatrix}.(2)✦ The matrix G=H[C2]TG = H[C_2]^T is the 7×47 \times 4 matrix over ℤ2\mathbb{Z}_2 obtained by transposing H[C2]H[C_2], G=H[C2]T=(1000010000100001011110111101).G = H[C_2]^T = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \end{pmatrix}.(3)✦ Applied to a message x∈ℤ24x \in \mathbb{Z}_2^4, it gives the word GxGx, whose first four bits are those of xx and whose last three are the parities x2+x3+x4x_2 + x_3 + x_4, x1+x3+x4x_1 + x_3 + x_4 and x1+x2+x4x_1 + x_2 + x_4.

The Claim

Theorem 1. Let HH be the parity check matrix (1) of the Hamming code and GG the transpose (3) of H[C2]H[C_2]. Then GG is a generator matrix of the Hamming code: {Gx:x∈ℤ24}={y∈ℤ27:Hy=0}.\{\, Gx : x \in \mathbb{Z}_2^4 \,\} = \{\, y \in \mathbb{Z}_2^7 : Hy = 0 \,\}.(4)✦

What Is Checked

The claim is stated over the matrices (1), (2) and (3).

What the library shows about them is the equality (4).