Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Large energy yields a dense popular-sum graph

Proved
Finset.energy_to_popular_graph

by mysticflounder · Sep 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

additive-combinatoricsadditive-energybalog-szemeredi-gowersgraphspopular-sums

Let GGG be an additive commutative group, let η>0\eta > 0η>0, and let X,Y⊆GX, Y \subseteq GX,Y⊆G be finite sets with XXX nonempty and ∣X∣=∣Y∣|X| = |Y|∣X∣=∣Y∣ (so YYY is nonempty too; only the nonemptiness of XXX is assumed). Assume the energy lower bound

E(X,Y)≥η ∣X∣3E(X, Y) \ge \eta\, |X|^3E(X,Y)≥η∣X∣3

and the non-degeneracy condition 2≤η2 ∣X∣2 \le \tfrac{\eta}{2}\,|X|2≤2η​∣X∣. Then there exist a threshold θ:N\theta : \mathbb{N}θ:N and a set of popular sums S⊆GS \subseteq GS⊆G such that the graph of popular pairs is dense while SSS is small:

#{(x,y)∈X×Y:x+y∈S}≥η2 ∣X∣ ∣Y∣,∣S∣≤4η ∣X∣,\#\{(x, y) \in X \times Y : x + y \in S\} \ge \tfrac{\eta}{2}\,|X|\,|Y|, \qquad |S| \le \tfrac{4}{\eta}\,|X|,#{(x,y)∈X×Y:x+y∈S}≥2η​∣X∣∣Y∣,∣S∣≤η4​∣X∣,

where

S={s∈X+Y:rX,Y(s)≥θ}S = \{s \in X + Y : r_{X,Y}(s) \ge \theta\}S={s∈X+Y:rX,Y​(s)≥θ}

and rX,Y(s)=X.addConvolution Y sr_{X,Y}(s) = X.\mathrm{addConvolution}\, Y\, srX,Y​(s)=X.addConvolutionYs counts the representations s=x+ys = x + ys=x+y.

This is the entry point of the Balog-Szemeredi-Gowers pipeline: additive energy is converted, by a single threshold θ=⌊η2∣X∣⌋\theta = \lfloor \tfrac{\eta}{2}|X| \rfloorθ=⌊2η​∣X∣⌋ on the representation function, into a dense bipartite graph E⊆X×YE \subseteq X \times YE⊆X×Y whose restricted sumset SSS is already controlled. The graph Balog-Szemeredi-Gowers theorem is then applied to EEE.

Preamble
import Mathlib

open scoped Pointwise
Formal statement
theorem Finset.energy_to_popular_graph {G : Type*} [AddCommGroup G] [DecidableEq G]
    {η : ℝ} (hη : 0 < η)
    {X Y : Finset G} (hX : X.Nonempty) (hXY : X.card = Y.card)
    (hLarge : 2 ≤ (η / 2) * (X.card : ℝ))
    (hE : η * (X.card : ℝ) ^ 3 ≤ (Finset.addEnergy X Y : ℝ)) :
    ∃ θ : ℕ, ∃ S : Finset G,
      (η / 2) * (X.card : ℝ) * Y.card ≤
        (((X ×ˢ Y).filter (fun p ↦ p.1 + p.2 ∈ S)).card : ℝ) ∧
      (S.card : ℝ) ≤ (4 / η) * (X.card : ℝ) ∧
      S = (X + Y).filter (fun s ↦ θ ≤ X.addConvolution Y s) := by sorry
Source
Tao-Vu, Additive Combinatorics, Cambridge Univ. Press (2006), Lemma 2.30 (p. 80), converse half. Formalized for |X| = |Y| with K = 1/eta; the constant is 4/eta rather than the source's 2K = 2/eta (loss from rounding the popular threshold to an integer), and a largeness hypothesis 2 <= (eta/2)|X| is added so that threshold is at least one. Formalized in https://github.com/mysticflounder/lean-formalizations/blob/dd46c17a2a034d7bfa0df02e7f77834d35592864/lean/LeanFormalizations/Combinatorics/Additive/BSGEnergyToGraph.lean#L41-L150
Human review
  • Endorsed by Shuze Chen · Sep 18, 2026

  • Endorsed by mysticflounder · Sep 18, 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, licensed under Apache 2.0.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTermsJoin SlackJoin Zulip© 2026 Prove2Me