Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 8.4.3 (The Delsarte bound) — A(n,d)A(n,d)A(n,d) is at most the optimum of the Delsarte linear program

Proved
MatousekLP.Codes.delsarte_bound

by mikedeng1 · Oct 3, 2026 · Mathlib 0df444a (Lean v4.33.1)

coding-theorydelsarte-boundlinear-programmingp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1

For integers 0≤i,t≤n0 \le i, t \le n0≤i,t≤n let Kt(n,i)=∑j=0min⁡(i,t)(−1)j(ij)(n−it−j)K_t(n,i) = \sum_{j=0}^{\min(i,t)}(-1)^j\binom ij\binom{n-i}{t-j}Kt​(n,i)=∑j=0min(i,t)​(−1)j(ji​)(t−jn−i​). Then for every nnn and ddd, the maximum size A(n,d)A(n,d)A(n,d) of a code C⊆{0,1}nC \subseteq \{0,1\}^nC⊆{0,1}n with distance ddd is bounded above by the optimum value of the linear program in variables x0,…,xnx_0,\dots,x_nx0​,…,xn​

maximizex0+x1+⋯+xnsubject tox0=1,xi=0,i=1,…,d−1,∑i=0nKt(n,i) xi≥0,t=1,…,n,x0,…,xn≥0.\begin{aligned} \text{maximize}\quad & x_0 + x_1 + \dots + x_n\\ \text{subject to}\quad & x_0 = 1,\\ & x_i = 0, \quad i = 1,\dots,d-1,\\ & \textstyle\sum_{i=0}^n K_t(n,i)\, x_i \ge 0, \quad t = 1,\dots,n,\\ & x_0,\dots,x_n \ge 0. \end{aligned}maximizesubject to​x0​+x1​+⋯+xn​x0​=1,xi​=0,i=1,…,d−1,∑i=0n​Kt​(n,i)xi​≥0,t=1,…,n,x0​,…,xn​≥0.​

Equivalently: if a real number vvv satisfies x0+⋯+xn≤vx_0 + \dots + x_n \le vx0​+⋯+xn​≤v for every feasible solution xxx of this program, then A(n,d)≤vA(n,d) \le vA(n,d)≤v.

This is the linear programming bound of Delsarte (1973); for example it gives A(17,3)≤6553A(17,3) \le 6553A(17,3)≤6553, against 728172817281 from the sphere-packing bound.

Formalization Note The optimum value is not written as a real supremum (which Lean would set to 000 on an empty or unbounded set); the theorem is stated against every upper bound vvv of the objective on the feasible set, which is exactly "A(n,d)≤A(n,d) \leA(n,d)≤ optimum". The program is feasible (x=(1,0,…,0)x = (1,0,\dots,0)x=(1,0,…,0)), so any such vvv is at least 111 and the hypothesis is never vacuous.

Preamble
import Mathlib
import Definitions.Def_MatousekLP_Codes_Basic
import Definitions.Def_MatousekLP_Codes_DelsarteLP

open Finset
Formal statement
namespace MatousekLP.Codes

/-- Theorem 8.4.3 (The Delsarte bound), pp. 159–160: for every `n` and `d`, `A(n, d)` is
bounded above by the optimum value of the Delsarte linear program. Stated against every
upper bound `v` of the objective `x_0 + ⋯ + x_n` on the feasible set. -/
theorem delsarte_bound (n d : ℕ) (v : ℝ)
    (hv : ∀ x : Fin (n + 1) → ℝ, IsDelsarteFeasible n d x → delsarteObjective x ≤ v) :
    (A n d : ℝ) ≤ v := by sorry

end MatousekLP.Codes
Source
Matoušek & Gärtner, Understanding and Using Linear Programming, Springer 2007, pp. 159–160, Theorem 8.4.3 (The Delsarte bound)
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me