Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Plünnecke–Ruzsa with the Ruzsa triangle inequality: small sumset implies small difference set

Proved
Finset.ruzsa_sumset_to_difference

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

additive-combinatoricsbalog-szemeredi-gowersruzsa-calculussumsets

Let GGG be an additive commutative group and let K>0K > 0K>0, c>0c > 0c>0. Let A,B⊆GA, B \subseteq GA,B⊆G be nonempty finite sets with

∣A+B∣≤K ∣A∣and∣B∣≥c ∣A∣.|A + B| \le K\,|A| \qquad\text{and}\qquad |B| \ge c\,|A|.∣A+B∣≤K∣A∣and∣B∣≥c∣A∣.

Then the difference set satisfies

∣A−B∣≤K3c ∣A∣.|A - B| \le \tfrac{K^3}{c}\,|A|.∣A−B∣≤cK3​∣A∣.

The proof is ordinary Ruzsa calculus, in two moves, and owes nothing to the Balog-Szemeredi-Gowers literature. First the Plunnecke-Ruzsa inequality (Mathlib's Finset.pluennecke_ruzsa_inequality_nsmul_add, in the form ∣2⋅B∣≤(∣A+B∣/∣A∣)2∣A∣|2 \cdot B| \le (|A+B|/|A|)^2|A|∣2⋅B∣≤(∣A+B∣/∣A∣)2∣A∣) upgrades the hypothesis ∣A+B∣≤K∣A∣|A+B| \le K|A|∣A+B∣≤K∣A∣ to

∣B+B∣≤K2 ∣A∣.|B + B| \le K^2\,|A|.∣B+B∣≤K2∣A∣.

Then the Ruzsa triangle inequality (Finset.ruzsa_triangle_inequality_sub_add_add) gives

∣A−B∣ ∣B∣≤∣A+B∣ ∣B+B∣≤K3 ∣A∣2,|A - B|\,|B| \le |A + B|\,|B + B| \le K^3\,|A|^2,∣A−B∣∣B∣≤∣A+B∣∣B+B∣≤K3∣A∣2,

and the relative-density hypothesis c∣A∣≤∣B∣c|A| \le |B|c∣A∣≤∣B∣ finishes by division.

In the Balog-Szemeredi-Gowers project this is the last step, converting the graph step's output — a bound on the honest sum ∣A′+B′∣|A' + B'|∣A′+B′∣ — into the stated bound on the difference set ∣A′−B′∣|A' - B'|∣A′−B′∣, at the cost of cubing KKK and dividing by the relative density ccc.

Preamble
import Mathlib

open scoped Pointwise
Formal statement
theorem Finset.ruzsa_sumset_to_difference {G : Type*} [AddCommGroup G] [DecidableEq G] :
    ∀ K c : ℝ, 0 < K → 0 < c → ∀ A B : Finset G, A.Nonempty → B.Nonempty →
      ((A + B).card : ℝ) ≤ K * A.card →
      c * (A.card : ℝ) ≤ (B.card : ℝ) →
      ((A - B).card : ℝ) ≤ K ^ 3 / c * A.card := by sorry
Source
Plunnecke-Ruzsa inequality composed with the Ruzsa triangle inequality; proved here via Mathlib's Finset.pluennecke_ruzsa_inequality_nsmul_add. NOT stated in any of the Balog-Szemeredi, Gowers, Fox-Sudakov or Tao-Vu BSG arguments. See Petridis, New proofs of Plunnecke-type estimates for product sets in groups, Combinatorica 32 (2012) 721-733, arXiv:1101.3507. Formalized in https://github.com/mysticflounder/lean-formalizations/blob/dd46c17a2a034d7bfa0df02e7f77834d35592864/lean/LeanFormalizations/Combinatorics/Additive/BalogSzemerediGowers.lean#L593-L672
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