Shortened binary Hamming codes and distance-3 cube partitions #
If a binary parity-check matrix H : Matrix κ ι Bool has nonzero, pairwise distinct columns, every
nonzero word in parityCheckCode H has Hamming weight at least 3, so parityCheckCode H and all
of its syndrome cosets syndrome H ⁻¹' {s} have minimum distance at least 3
(three_le_minDist_parityCheckCode_of_injective, minDist_parityCheckCode_le_syndrome_preimage).
Taking column i : Fin n to be the ⌈log₂ (n + 1)⌉-bit binary numeral of i + 1 gives the
shortened binary Hamming parity-check matrix hammingCheckMatrix n (at n = 2 ^ m - 1, the
classic [2 ^ m - 1, 2 ^ m - 1 - m, 3] Hamming code [MacWilliamsSloane1977, Chapter 1, §7]). Its
2 ^ ⌈log₂ (n + 1)⌉ ≤ max 1 (2 * n) syndrome fibers partition the Boolean cube Fin n → Bool into
pairwise-disjoint codes of minimum distance at least 3, formalizing Lemma 1 of
[Sergeev2026UniqueDisjointness, §2, p. 3] (exists_partition_minDist_three). Transporting the
syndrome coloring along Finset.equivFin colors the subsets of any finite set S : Finset α with
at most max 1 (2 * S.card) colors so that distinct subsets of S in the same color class have
symmetric difference of size at least 3 (three_le_card_symmDiff_of_finsetHammingSyndrome_eq).
Main definitions #
Cslib.Code.hammingCheckMatrix: the⌈log₂ (n + 1)⌉ × nbinary Hamming parity-check matrix.Cslib.Code.finsetHammingSyndrome: the induced Hamming syndrome coloring on subsets of a finite setS : Finset α.
Main results #
Cslib.Code.minDist_parityCheckCode_le_syndrome_preimage: every syndrome coset of a linear parity-check code over a commutative ring has minimum distance at least that of the kernel.Cslib.Code.three_le_minDist_parityCheckCode_of_injective: nonzero, pairwise distinct binary parity-check columns force minimum distance at least3.Cslib.Code.three_le_minDist_hammingParityCheckCode,Cslib.Code.three_le_minDist_hammingSyndrome_preimage: the shortened binary Hamming code and its syndrome fibers have minimum distance at least3.Cslib.Code.two_pow_clog_succ_le_two_mul,Cslib.Code.two_pow_clog_succ_le_max: the syndrome count2 ^ ⌈log₂ (n + 1)⌉is at most2 * nfor1 ≤ n(andmax 1 (2 * n)for alln).Cslib.Code.exists_partition_minDist_three: Lemma 1 of [Ser26]: for1 ≤ n,Fin n → Boolpartitions into2 * npairwise-disjoint3-codes.Cslib.Code.three_le_card_symmDiff_of_finsetHammingSyndrome_eq: distinct subsets ofSwith the samefinsetHammingSyndromediffer on at least3elements.
References #
Every syndrome coset syndrome H ⁻¹' {s} of a parity-check matrix over a commutative ring has
minimum distance at least that of parityCheckCode H.
If a binary parity-check matrix H : Matrix κ ι Bool has nonzero, pairwise distinct columns,
then parityCheckCode H has minimum distance at least 3.
The parity-check matrix of the shortened binary Hamming code of length n: column i is the
⌈log₂ (n + 1)⌉-bit binary numeral of i + 1 (nonzero and injective). At n = 2 ^ m - 1 (m ≥ 1)
this is the standard [2 ^ m - 1, 2 ^ m - 1 - m, 3] binary Hamming parity-check matrix
[MacWilliamsSloane1977, Chapter 1, §7]; for general n, its syndrome fibers realize the coset
restriction (c, 0⃗) ∈ C_s of [Sergeev2026UniqueDisjointness, §2, Lemma 1, p. 3].
The shortened binary Hamming code parityCheckCode (hammingCheckMatrix n) has minimum distance
at least 3.
Every syndrome fiber of hammingCheckMatrix n has minimum distance at least 3.
Cube partition into 3-codes ([Sergeev2026UniqueDisjointness, §2, Lemma 1, p. 3]): for
1 ≤ n, the Boolean cube Fin n → Bool can be partitioned into 2 * n pairwise-disjoint subsets
each having minimum Hamming distance at least 3.
Hamming syndrome of a subset a inside a finite ground set S : Finset α, obtained by
transporting the indicator of a on S along S.equivFin.
Two distinct subsets a, b ⊆ S with the same finsetHammingSyndrome S differ on at least 3
elements: 3 ≤ (symmDiff a b).card.