Singleton, Hamming, Gilbert–Varshamov Bounds & Reed–Solomon MDS Optimality

proved in Lean

Fundamental limits on error-correcting codes: the Singleton and Hamming bounds cap how many codewords a code with given minimum distance can have, Gilbert–Varshamov guarantees good codes exist, and Reed–Solomon codes meet the Singleton bound exactly.

Richard W. Hamming; Edgar N. Gilbert; Rom R. Varshamov; Richard C. Singleton; Irving S. Reed and Gustave Solomon (1950) · Zero-Error & Classical Coding Bounds · MacWilliams & Sloane, Ch. 1 & 11; Cover & Thomas, Ch. 7

Statement

For any $q$-ary block code $C \subseteq \mathbb{F}_q^n$ of minimum Hamming distance $d$:

How the proof works

Singleton follows by deleting d − 1 coordinates (codewords stay distinct), Hamming by packing disjoint radius-t balls, Gilbert–Varshamov by greedily choosing words outside the radius-(d − 1) balls, and Reed–Solomon codes meet Singleton because a nonzero low-degree polynomial has few roots. All five classical coding-theory theorems are proved directly against InfoTheory.Core.Coding in Known/Coding.lean (reusing Mathlib's Hamming metric via Bridge/Mathlib.lean and Polynomial.roots for Reed–Solomon MDS distance).

Lean declarations (5)

The key theorems in the Lean library. Each is compiled with Lean 4, uses only the standard axioms propext, Classical.choice and Quot.sound, and is re-checked by leanchecker. Click a name to see the full proof on GitHub.

Related open problems (9)

Open problems that build on, generalize, or are analogous to this theorem.