Alphabeta Math
Pipeline-generated
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Classical and Quantum Error-Correcting Codes — Examples

1 · Prerequisites

2 · Summary

This companion works through the three-bit repetition code, the binary [7,4,3] Hamming code, and a short [4,2,3]5 Reed–Solomon evaluation code. It also computes a quantum repetition-code projector and exhibits a weight-one undetectable operator at distance one. The finite syndrome and projector calculations are explicit; the page remains a logical leaf and supplies no prerequisites to the theory page.

3 · Logical flowchart

4 · Definitions, theorems and proofs

None yet.

5 · Examples, counterexamples and false statements

ExampleConstruction: AI-adaptedVerification: AI-generatedjudge pass (gpt-6-luna)Open item page →

Repetition-code syndrome, known erasures, and unlocated errors

Example

Use the binary repetition code C={000,111} and H=[110011]. A single middle-bit error in 111 gives r=101 and a syndrome identifying that error. Two known erasures at coordinates 0,1 still leave a unique completion when coordinate 2 is received. By contrast, two unlocated errors in 000 can produce r=110, which lies closer to the wrong codeword 111.

Facts & Assumptions

Given: The binary repetition code C={000,111}, the parity-check matrix H above, a received word r=101, known erasures S={0,1} in zero-based coordinates, and the alternative unlocated-error word r′=110.

[F2]

Rectangular matrix multiplication and the identity matrix In, including zero-sized shapes: Matrix multiplication uses finite coordinate sums over the field.

[L1]

Generator and parity-check matrices over a finite field: A parity-check matrix has independent rows and nullspace equal to C.

[L2]

Hamming weight and distance of a finite-field linear code: Weight counts nonzero coordinates, and d(C) is the minimum nonzero codeword weight.

[L3]

Syndrome of a received word over a finite field: The syndrome of a received word r is s(r)=Hr.

[L4]

Classical distance gives error detection, unique decoding, and erasure recovery: Distance 3 uniquely decodes one unknown error and gives unique erasure completion on every known support of size less than 3.

Verification

1.1F1F2L1L2givenalgebra

The codewords are 000 and 111, and [L2] gives d(C)=3. For x=(x0,x1,x2), multiplication gives Hx=(x0+x1,x1+x2), so Hx=0 exactly when x0=x1=x2 and ker⁡H=C. The first two columns of H form [1101], an invertible triangular matrix over F2, so the rows of H are independent. Therefore H is a parity-check matrix by [L1]; the field operations are valid by [F1].

1.2L1L3L4givenalgebra

Direct multiplication gives the weight-at-most-one syndromes s(000)=00, s(100)=10, s(010)=11, and s(001)=01, all distinct. For r=101, [L3] gives s(r)=Hr=(1+0,0+1)=11, so the unique matching error is e=010 and r−e=111. The distinct syndromes give the one-error correction in [L4].

1.3L4givenalgebra

If coordinates 0,1 are erased in r=101, the received value at coordinate 2 is 1, so 111 is compatible and 000 is not. More generally, two compatible codewords would differ only in S, so their distance would be at most 2<3, contradicting [L4]. Hence 111 is the unique completion.

2.1L4givenalgebra∎

If instead 000 is sent, the two-bit error e=110 produces r′=110. Then dH(r′,000)=2 but dH(r′,111)=1, so 111 is the unique radius-one decoding candidate. The unique-radius-one rule therefore miscorrects this word; [L4] gives no correction guarantee for the two-bit error.

Remarks

Coordinates are zero-based. The example distinguishes a single unknown error from two known erasures and from two unknown errors; the code is guaranteed to correct one unknown error, while known locations carry stronger information.

ExampleConstruction: AI-adaptedVerification: AI-generatedjudge pass (gpt-6-luna)Open item page →

The binary [7,4,3] Hamming code and its single-error syndromes

Example

Over F2=Z/2Z, take the column-vector matrices

G=[1101101101111000010000100001],H=[100110101010110010111].

The code C=im⁡G=ker⁡H has parameters [7,4,3]2. The syndrome of a single-bit error is the corresponding column of H; the seven syndromes are the seven nonzero vectors of F23.

Facts & Assumptions

Given: The matrices G,H above, column-vector multiplication, and F2=Z/2Z.

[F1]

For every prime p, the two operations on Z/p make it a field: For each prime p, the residue classes Z/pZ form a field.

[F3]

Rank-nullity: dim⁡FV=nullity⁡T+rank⁡T: A linear map from a finite-dimensional domain has dim⁡V=dim⁡ker⁡T+dim⁡im⁡T.

[F5]

Row space, column space, nullspace, row rank, column rank and matrix rank: The row rank is the dimension of the row space, the nullspace is {x:Hx=0}, and matrix rank is row rank.

[L1]

A full-column-rank matrix has image dimension equal to its number of columns: Independent columns of G span a subspace of dimension equal to their number.

[L2]

Syndrome of a received word over a finite field: The syndrome map is s(r)=Hr.

[L3]

Classical distance gives error detection, unique decoding, and erasure recovery: A code of distance 3 uniquely decodes one unknown symbol error.

Verification

1.1F1F2F5L1givenalgebra

The last four rows of G form I4, so its columns are independent and [L1] gives dim⁡C=4. The first three columns of H form I3, so for every y∈F23 the input (y0,y1,y2,0,0,0,0) maps to y. Also, a linear combination of the rows of H has its first three entries equal to its three coefficients, so the rows are independent and [F5] gives rank 3. For x=(a,b,c,d), Gx=(a+b+d,a+c+d,b+c+d,a,b,c,d); applying the three rows of H gives (0,0,0). Thus HG=0 and C⊆ker⁡H.

2.1F3F4step 1.1

The map H:F27→F23 is onto by its first three columns, so [F3] gives dim⁡ker⁡H=7−3=4. The subspace C also has dimension 4 by step 1.1; [F4] now gives C=ker⁡H.

3.1F1F2L2step 2.1givenalgebra

The columns of H are 100,010,001,110,101,011,111. They are all nonzero and pairwise distinct. A weight-one vector has syndrome one of these columns; a weight-two vector has syndrome the sum of two distinct columns, which is nonzero in characteristic two. Thus C has no nonzero word of weight below 3. The word e0+e1+e3 has syndrome 100+010+110=000 and weight 3, so it lies in C and d(C)=3.

4.1L2L3step 3.1given∎

Multiplying H by the zero word and each unit vector gives s(0000000)=000, s(1000000)=100, s(0100000)=010, s(0010000)=001, s(0001000)=110, s(0000100)=101, s(0000010)=011, and s(0000001)=111; each nonzero value is the corresponding column of H. These eight syndromes are distinct, so [L3] guarantees unique correction of any one bit flip.

Remarks

The minimum weight and every syndrome are verified from the displayed matrices; no source convention is used as a proof step.

ExampleConstruction: AI-adaptedVerification: AI-generatedjudge pass (gpt-6-luna)Open item page →

A short Reed–Solomon code over F5 and its symbol-error syndromes

Example

In F5=Z/5Z, evaluate the degree-less-than-two polynomials f(x)=a+bx at 0,1,2,3. This gives the Reed–Solomon evaluation code

C={(a,a+b,a+2b,a+3b):a,b∈F5}⊆F54,

with encoding (a,b)↦(a,a+b,a+2b,a+3b) and generator/parity-check matrices

G=[10111213],H=[43210343].

It has parameters [4,2,3]5. Its four parity-check columns give distinct projective directions, so every one-symbol error value at every position has a distinct syndrome.

Facts & Assumptions

Given: The field F5=Z/5Z, evaluation points 0,1,2,3, and matrices G,H displayed above.

[F1]
[F2]

Rectangular matrix multiplication and the identity matrix In, including zero-sized shapes: Matrix products are the finite coordinate sums over the field.

[F3]

Rank-nullity: dim⁡FV=nullity⁡T+rank⁡T: The dimension of a finite-dimensional domain is the sum of kernel and image dimensions.

[F5]

Row rank equals column rank, and both equal the number of pivots: The row rank and column rank of a finite matrix over a field are equal.

[L1]

A full-column-rank matrix has image dimension equal to its number of columns: The image of a full-column-rank 4×2 matrix has dimension 2.

[L2]

Syndrome of a received word over a finite field: A received vector's syndrome is Hr.

[L3]

Classical distance gives error detection, unique decoding, and erasure recovery: Distance 3 uniquely decodes one unknown symbol error and distinct allowed errors have distinct syndromes.

Verification

1.1F1L1givenalgebra

The map (a,b)↦(a,a+b,a+2b,a+3b) is injective because its first two coordinates recover a and b. Hence the displayed G has independent columns and [L1] gives dim⁡C=2.

1.2F2F5givenalgebra

Multiplication gives HG=0: the four row-column dot products are 10,10,10,20, all zero in F5. The first two columns of H, (4,0) and (3,3), are independent, so its column rank is 2; [F5] makes its row rank 2 as well.

1.3givenalgebra

If b=0 and (a,b)≠(0,0), then f(x)=a has no roots. If b≠0, the equation a+bx=0 has the unique solution x=−ab−1, so at most one of the four distinct evaluation points is a root. Every nonzero codeword therefore has weight at least 3, and f(x)=x gives (0,1,2,3) of weight 3. Thus d(C)=3.

1.4F2givenalgebra

The columns of H are h0=(4,0), h1=(3,3), h2=(2,4), and h3=(1,3). Their six pairwise determinants in F5 are 2,1,2,1,1,2, all nonzero, so no two are scalar multiples. A nonzero error aej has syndrome ahj; within one position distinct nonzero a give distinct syndromes, and across positions equality would force proportional columns. Hence all 4⋅4=16 nonzero one-symbol errors have distinct syndromes.

2.1F3F4step 1.1step 1.2

Therefore C=im⁡G⊆ker⁡H. By [F3], dim⁡ker⁡H=4−2=2=dim⁡C; [F4] gives C=ker⁡H.

3.1L2L3step 1.3step 1.4given∎

For example, the error e=2e1 has syndrome 2h1=(6,6)=(1,1) in F52. Since d(C)=3, [L3] gives unique one-symbol correction. The example uses the evaluation-code definition; its exact distance and syndrome claims above are proved here rather than inferred from a source formula.

Remarks

The MIT lecture notes define Reed–Solomon codes by evaluating degree-less-than-k polynomials at distinct field points. Their displayed root-count bound is one looser than the sharp degree bound needed to derive the stated exact distance formula; this example does not rely on it and proves its [4,2,3]5 parameters directly.

ExampleConstruction: AI-adaptedVerification: AI-generatedjudge pass (gpt-6-luna)Open item page →

Quantum repetition subspace projector and a distance-one boundary error

Example

Use the ordered three-qubit tensor basis ux0x1x2 supplied by the QC02 register interface. Set the logical space to Q2=C2 with the standard pairing ⟨z,w⟩=∑r<2zrwr‾, and let e0,e1 be its standard basis. Define Ve0=u000, Ve1=u111. The code projector is diagonal in this basis, with diagonal entry 1 at 000,111 and 0 elsewhere. Define EXux0x1x2=u(1−x0)x1x2 and EZux0x1x2=(−1)x0ux0x1x2. Then EX is detectable but EZ is not; the code has distance 1, and the boundary operator has weight exactly d.

Facts & Assumptions

Given: The ordered three-qubit tensor basis and its orthonormality as specified by the QC02 interface, together with the maps V,EX,EZ defined above.

[F1]

Finite registers and their ordered computational bases: A qubit is Q2=C2 with ordered standard basis (e0,e1); for n qubits, bit positions are ordered lexicographically with the first wire most significant.

[F2]

Ordered tensor registers, their inner product, and wire permutations: The tensor inner product is the product of the factor pairings, linear in the first argument, and product basis vectors are ordered lexicographically.

[F3]

The product basis is orthonormal and tensor dimensions multiply: The elementary product vectors form an orthonormal basis of the finite tensor register.

[F4]

Tensor products of finitely many linear maps: A tensor map is the unique linear extension of its factorwise action on elementary tensors.

[F5]

The adjoint T∗:W→V is characterised by ⟨Tv,w⟩W=⟨v,T∗w⟩V: The adjoint satisfies ⟨Vx,z⟩P=⟨x,V∗z⟩L.

[L1]

Quantum code as an isometric encoding and its code projector: The code projector is P=VV∗ and the code subspace is im⁡V.

[L2]

An isometric quantum encoding gives an orthogonal code projector: P is the orthogonal projection onto the code subspace.

[L3]

Support and weight of an operator on a finite register: Support on a set of wires defines operator weight, and scalar identity operators have weight zero.

[L4]

Detectable operators and distance of a finite-register quantum code: An operator is detectable iff PEP=λP; distance is the minimum weight of an undetectable operator when K≥2.

[L5]

Detectable operators form a subspace and quantum distance is well defined: For logical dimension at least two, the undetectable set is nonempty and its minimum weight exists; weight-zero operators are detectable.

[L6]

Every operator below the quantum code distance is detectable: Every operator of weight strictly below the quantum distance is detectable.

Verification

1.1F1F2F3F5L1L2given

From the standard pairing in [F1], ⟨ei,ej⟩L=∑r<2δriδrj‾=δij, so e0,e1 are orthonormal. Each physical factor is also Q2 with this pairing; [F2] gives ⟨ux,uy⟩P=∏k<3δxkyk, and [F3] gives the ordered product basis. Thus u000,u111 are orthonormal, and V is isometric. For each basis vector ux, [F5] gives ⟨ei,V∗ux⟩L=⟨Vei,ux⟩P, which is 1 for (i,x)=(0,000) or (1,111) and 0 otherwise. Since ⟨ei,y⟩L=yi‾, this computes V∗u000=e0, V∗u111=e1, and V∗ux=0 for the other six basis strings. Thus P=VV∗ has exactly the stated diagonal entries and is the code projector in [L1] and [L2].

1.2F1F3F4L2L3L4given

The map EX sends u000 to u100 and u111 to u011, both orthogonal to the code subspace by [F3]. Thus PEXP=0, so EX is detectable with scalar 0. By [F1] and [F4], its action on elementary tensors is X⊗I⊗I; hence it is supported on the first wire and has weight at most 1.

1.3F1F4L3L4L5givenalgebra

The map EZ fixes u000 and negates u111. Thus PEZP acts by eigenvalues +1 and −1 on the two-dimensional code subspace and is not a scalar multiple of P. By [F1] and [F4], it is Z⊗I⊗I, so it has weight at most 1. It is non-detectable; every weight-zero operator is detectable by [L5]. Therefore the minimum non-detectable weight is d=1, and wt⁡(EZ)=d.

2.1L6step 1.3∎

By [L6], every operator of weight <d=1 is detectable; step 1.3 exhibits a non-detectable operator of weight exactly d. Thus the detection boundary is sharp, and no correction-map claim follows.

Remarks

The calculation follows the current QC02 basis and tensor-map definitions; the relevant supplier bodies were inspected before this example was recorded.

Sources