New lower bound for ternary codes
ProvedTernaryCode.A_3_16_11_ge_20A ternary code of length is a set of words whose coordinates are taken from an alphabet of three 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 ternary 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 three symbols such that any two of them differ in at least eleven 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 . It also improves the bound posted earlier on this platform (TernaryCode.A_3_16_11_ge_19). 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 16 → Fin 3, the three symbols being the elements of Fin 3. 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 TernaryCode.A_3_16_11_ge_20 : ∃ C : Finset (Fin 16 → Fin 3), C.card = 20 ∧ (∀ x ∈ C, ∀ y ∈ C, x ≠ y → 11 ≤ hammingDist x y) := by sorry