New lower bound for quaternary codes
ProvedQuaternaryCode.A_4_12_7_ge_320A quaternary code of length is a set of words whose coordinates are taken from an alphabet of four symbols, . The Hamming distance of two words is , the number of coordinates in which they differ. The number is the largest possible size of a quaternary code of length in which any two distinct words have Hamming distance at least . This theorem asserts the lower bound
That is, there are words of length over an alphabet of four symbols such that any two of them differ in at least seven coordinates. Equivalently, any two of the words agree in at most five coordinates.
A. E. Brouwer maintains the standard table of bounds for . As of 2026-11-20 that table lists , so this statement improves the best known lower bound by . The code was found by a computer search, and an explicit list of its codewords is part of the proof.
Formalization Note A word is a function Fin 12 → Fin 4, the four symbols being the elements of Fin 4. The distance between two words is Mathlib's hammingDist, the number of coordinates in which they differ. The code is a Finset of exactly such words.
import Mathlib
theorem QuaternaryCode.A_4_12_7_ge_320 : ∃ C : Finset (Fin 12 → Fin 4), C.card = 320 ∧ (∀ x ∈ C, ∀ y ∈ C, x ≠ y → 7 ≤ hammingDist x y) := by sorry