Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 8.4.6 — ∑(w,w′)∈C2(−1)(w⊕w′)Tv≥0\sum_{(w,w')\in C^2}(-1)^{(w\oplus w')^T v} \ge 0∑(w,w′)∈C2​(−1)(w⊕w′)Tv≥0

Proved
MatousekLP.Codes.character_sum_nonneg

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

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

For every set of words C⊆{0,1}nC \subseteq \{0,1\}^nC⊆{0,1}n and every word v∈{0,1}n\mathbf v \in \{0,1\}^nv∈{0,1}n,

∑(w,w′)∈C2(−1)(w⊕w′)Tv  ≥  0,\sum_{(\mathbf w,\mathbf w') \in C^2} (-1)^{(\mathbf w \oplus \mathbf w')^T \mathbf v} \;\ge\; 0,(w,w′)∈C2∑​(−1)(w⊕w′)Tv≥0,

where w⊕w′\mathbf w \oplus \mathbf w'w⊕w′ is the sum modulo 2 and uTv\mathbf u^T\mathbf vuTv is the scalar product of 0/1 vectors, i.e. the number of positions where both u\mathbf uu and v\mathbf vv have a one.

This is the sign form of Lemma 8.4.5 used in the proof of Proposition 8.4.4.

Formalization Note The sum is over the ordered pairs of C ×ˢ C, computed in Z\mathbb ZZ; (w⊕w′)Tv(\mathbf w\oplus\mathbf w')^T\mathbf v(w⊕w′)Tv is a natural number.

Preamble
import Mathlib
import Definitions.Def_MatousekLP_Codes_Basic

open Finset
Formal statement
namespace MatousekLP.Codes

/-- Corollary 8.4.6, p. 161: for every `C ⊆ {0,1}^n` and every `v ∈ {0,1}^n`,
`∑_{(w,w') ∈ C²} (-1)^{(w ⊕ w')ᵀ v} ≥ 0`. -/
theorem character_sum_nonneg {n : ℕ} (C : Finset (Word n)) (v : Word n) :
    0 ≤ ∑ p ∈ C ×ˢ C, (-1 : ℤ) ^ dot (xorWord p.1 p.2) v := by sorry

end MatousekLP.Codes
Source
Matoušek & Gärtner, Understanding and Using Linear Programming, Springer 2007, p. 161, Corollary 8.4.6
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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me