Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Proposition 8.4.4 — ∑i=0nKt(n,i) x~i(C)≥0\sum_{i=0}^n K_t(n,i)\,\tilde x_i(C) \ge 0∑i=0n​Kt​(n,i)x~i​(C)≥0

Proved
MatousekLP.Codes.krawtchouk_inequality

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

coding-theorykrawtchoukp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1

Let C⊆{0,1}nC \subseteq \{0,1\}^nC⊆{0,1}n be an arbitrary set of words, let

x~i=x~i(C)=1∣C∣∣{(w,w′)∈C2:dH(w,w′)=i}∣,i=0,…,n,\tilde x_i = \tilde x_i(C) = \frac{1}{|C|}\bigl|\{(\mathbf w,\mathbf w') \in C^2 : d_H(\mathbf w,\mathbf w') = i\}\bigr|, \qquad i = 0,\dots,n,x~i​=x~i​(C)=∣C∣1​​{(w,w′)∈C2:dH​(w,w′)=i}​,i=0,…,n,

and let t∈{1,…,n}t \in \{1,\dots,n\}t∈{1,…,n}. Then, with the Krawtchouk numbers 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​),

∑i=0nKt(n,i) x~i  ≥  0.\sum_{i=0}^n K_t(n,i)\,\tilde x_i \;\ge\; 0 .i=0∑n​Kt​(n,i)x~i​≥0.

These are exactly the nontrivial constraints of the Delsarte linear program; together with the easy constraints they show that (x~0,…,x~n)(\tilde x_0,\dots,\tilde x_n)(x~0​,…,x~n​) is feasible whenever CCC is a code with distance ddd.

Formalization Note CCC may be empty, in which case Lean's 1/0=01/0 = 01/0=0 makes every x~i\tilde x_ix~i​ zero and the inequality reads 0≥00 \ge 00≥0.

Preamble
import Mathlib
import Definitions.Def_MatousekLP_Codes_Basic
import Definitions.Def_MatousekLP_Codes_DelsarteLP

open Finset
Formal statement
namespace MatousekLP.Codes

/-- Proposition 8.4.4, pp. 160–161: for an arbitrary `C ⊆ {0,1}^n` and every
`t ∈ {1, …, n}`, `∑_{i=0}^n K_t(n, i) · x̃_i(C) ≥ 0`. -/
theorem krawtchouk_inequality {n : ℕ} (C : Finset (Word n)) (t : ℕ) (ht1 : 1 ≤ t)
    (htn : t ≤ n) :
    0 ≤ ∑ i ∈ Finset.range (n + 1), (K n t i : ℝ) * xtilde C i := by sorry

end MatousekLP.Codes
Source
Matoušek & Gärtner, Understanding and Using Linear Programming, Springer 2007, pp. 160–161, Proposition 8.4.4
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