Understanding and Using Linear Programming VIII: The Delsarte Linear Programming Bound for Binary CodesTextbook
Motivation
A binary error-correcting code is a set of -bit words chosen so that the words stay distinguishable after a few bits have been corrupted in transmission. A code can correct any errors exactly when every two of its words differ in at least positions. The more words the code has, the more information each transmitted block carries. So the central quantitative question of coding theory is how large a code of given length and minimum distance can be. Codes are used in every technology that transmits or stores data, from disks and phones to deep-space probes.
In 1973 Philippe Delsarte showed that an upper bound on this maximum size is the optimum value of an explicit linear program (Delsarte, An algebraic approach to the association schemes of coding theory, Philips Res. Repts. Suppl. 10, 1973). The bound was far stronger than the classical volume argument and remains a standard tool. This mission formalizes the self-contained proof of the bound in §8.4 of Matoušek and Gärtner's textbook (Springer 2007). That proof follows Best, Brouwer, MacWilliams, Odlyzko and Sloane (IEEE Trans. Inform. Theory 24, 1978). The mission also covers the step of Delsarte's original argument that the book isolates as a lemma.
Timeline.
- 1950: Hamming introduces single-error-correcting codes and the sphere-packing bound.
- 1973: Delsarte proves the linear programming bound using association schemes.
- 1978: Best et al. give the elementary parity proof and small improvements, among them .
- 2005: Schrijver replaces the linear program by a semidefinite program and improves many entries of the code tables (IEEE Trans. Inform. Theory 51).
Setting
A word is , and a code is any set . The Hamming distance is the number of positions with . The weight is the number of ones in . The word is the entrywise sum modulo 2. For , the restricted distance counts only the differing positions that lie in .
A code has distance if for all distinct (Definition 8.4.1). The quantity is the maximum of over all codes with distance .
For the Krawtchouk numbers are
The distance distribution of a code is
The Delsarte linear program has variables . It maximizes subject to:
- ;
- for ;
- for ;
- .
For Delsarte's original argument, is the matrix whose entry is when and otherwise. The weights are .
Formalization targets
Goal: Theorem 8.4.3 (the Delsarte bound)
The goal is stated against every upper bound of the objective on the feasible set. No particular optimum value is fixed, so the statement covers every and at once.
Milestones, in attack order
- Lemma 8.4.5. For every and , the pairs in with even are at least as many as the pairs with odd .
- Corollary 8.4.6. for every .
- Proposition 8.4.4. for every and every .
- §8.4, p. 160. The values sum to . For a nonempty code with distance , the vector is feasible for the program.
- Lemma 8.4.2 (sphere-packing bound). .
- Lemma 8.4.7. is positive semidefinite.
Significance
The Delsarte bound turns an extremal problem over the subsets of the cube into a linear program with variables. For it gives , while the sphere-packing bound gives . Many entries of the standard code tables rest on this bound or its refinements. The positive semidefiniteness in Lemma 8.4.7 is the starting point of the semidefinite programming bounds of Schrijver and of later work. The same framework also underlies the linear programming bounds for spherical codes and sphere packings.
The theorem is classical and fully proved in the literature. Neither Mathlib nor this platform has a formal statement or proof of it. Mathlib has Hamming distance and binomial coefficients, but it has no , no Krawtchouk numbers and no LP bound for codes. This mission would produce the first formal statement and proof. It would also produce reusable identities on Krawtchouk sums and character sums over .
Difficulty
Two of the program's constraints are immediate once is defined: , and for . The difficulty lies in the Krawtchouk constraints. They do not follow from counting pairs at a single distance. They require a sign-weighted count over all words of weight , and the sum must then be regrouped by the distance of each pair. That regrouping identifies a count of words, split by how many ones they share with a fixed word, with the Krawtchouk number. Formally this is an exchange of finite sums together with a binomial counting identity, and the index bookkeeping, including the range , has to be exact.
The obvious attempt proves the inequality one distance class at a time. It fails because the individual terms have no sign. Only the whole sum is nonnegative.
Formalization scope
- Words and codes. Words are
Fin n → Bool, with bit astrue. The book's positions become0, …, n-1. Codes areFinsets of words, and is Mathlib'shammingDist. - The maximum . is a
Finset.supover the finite family of codes with distance . This family contains the empty code, so the maximum is attained. - Krawtchouk numbers. is an integer, and its natural-number subtractions are honest for and .
- LP variables and the constraints. The LP variables are indexed by
Fin (n+1)with no index shift. The constraints are imposed for , so they are vacuous for . - The empty code. Lean's convention gives . Proposition 8.4.4 then holds trivially, and the feasibility milestone carries the hypothesis that the book's division presupposes.
- The sphere-packing floor. The floor in the sphere-packing bound is natural-number division by a denominator that is at least .
- Positive semidefiniteness. This is Mathlib's
Matrix.PosSemidefover .
No trivialization. The goal is not stated as "" with a real supremum, which Lean would evaluate to on an empty or unbounded set. Its hypothesis ranges over upper bounds of a feasible program: is always feasible, so the hypothesis is never vacuous.
Contributions welcome. Useful lemmas include:
- Krawtchouk identities, for example and ;
- counting words of weight that meet a fixed support in exactly positions;
- general facts on character sums .
These are reusable for other LP and SDP bounds in coding theory.
Selected references
- J. Matoušek, B. Gärtner, Understanding and Using Linear Programming, Springer Universitext, 2007, §8.4. https://doi.org/10.1007/978-3-540-30717-4
- P. Delsarte, An algebraic approach to the association schemes of coding theory, Philips Research Reports Supplements 10, 1973.
- M. R. Best, A. E. Brouwer, F. J. MacWilliams, A. M. Odlyzko, N. J. A. Sloane, Bounds for binary codes of length less than 25, IEEE Trans. Inform. Theory 24 (1978), 81–93. https://doi.org/10.1109/TIT.1978.1055827
- A. Schrijver, New code upper bounds from the Terwilliger algebra and semidefinite programming, IEEE Trans. Inform. Theory 51 (2005), 2859–2866. https://doi.org/10.1109/TIT.2005.851748