Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_QED_E145.lean
qedmarket’s copy of theproofnetwork/open-problems@860a535, 1 Dec 2026original source ↗
/-From Prove2Me, definition `QED_E145` (https://prove2.me/definitions/dbdc1d88-2dac-4bc8-9c4b-c68dccf0d4d2). Apache-2.0 per Prove2Me's terms.-/import Mathlib /-! QED-E145: No perfect single-error-correcting code over a 6-letter alphabetA code of words of length n over a 6-letter alphabet is 1-perfect if every possible word is either a codeword or differs from exactly one codeword in exactly one position. Over alphabets whose size is a prime power, such codes (Hamming codes) exist in infinitely many lengths. Over 6 letters none is known for n≥2. Counting arguments and Lloyd's theorem leave only lengths 7, 19, 43, 97, 115, 259, ..., and only 7 and 19 have been ruled out. Prove that none exists.Informal statement: Let $H(n,6)=\{0,\dots,5\}^n$ with the Hamming distance $d$. Prove that for no $n\ge2$ is there $C\subseteq H(n,6)$ such that every $x\in H(n,6)$ has exactly one $c\in C$ with $d(x,c)\le1$.Formalization notes: Words are `Fin n → Fin 6`; distance is Mathlib's `hammingDist`(number of coordinates where two words differ). A 1-perfect code is a finite set `C` ofwords with every word within distance 1 of exactly one codeword (balls of radius 1 tilethe space). The cases n = 0, 1 are excluded since they are trivially perfect (a singlecodeword). Claim = no 1-perfect code over a 6-letter alphabet for any length n ≥ 2;¬Claim = such a code exists for some n ≥ 2 (necessarily n ∈ {43, 97, 115, 259, ...}).-/namespace OpenProblems.QEDE145noncomputable section def Claim : Prop := ∀ n : ℕ, 2 ≤ n → ¬ ∃ C : Finset (Fin n → Fin 6), ∀ x : Fin n → Fin 6, ∃! c : Fin n → Fin 6, c ∈ C ∧ hammingDist x c ≤ 1 endend OpenProblems.QEDE145