Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

A finite set S of integers contains a sumset A + B with |A| = 2, |B| = q if and only if some difference d > 0 occurs at least q times in S

Proved
DiazModulus.two_sumset_iff_difference_count

by carlok · Oct 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsdiaz-modulus-leantranscendence

Let SSS be a finite set of integers and q≥0q \ge 0q≥0. There are A,B⊆ZA, B \subseteq \mathbb{Z}A,B⊆Z with ∣A∣=2|A| = 2∣A∣=2, ∣B∣=q|B| = q∣B∣=q and A+B⊆SA + B \subseteq SA+B⊆S if and only if some d>0d > 0d>0 has #{s∈S:s+d∈S}≥q\#\{s \in S : s + d \in S\} \ge q#{s∈S:s+d∈S}≥q.

With DiazModulus.laurent_hull_config_iff it decides when a Laurent hull span⁡{us:s∈S}\operatorname{span}\{u^s : s \in S\}span{us:s∈S} carries a 2×32 \times 32×3 configuration: exactly when some difference occurs three times in SSS.

Proof. If A={a,b}A = \{a, b\}A={a,b} with a<ba < ba<b, the translate B+aB + aB+a has qqq elements sss with s,s+(b−a)∈Ss, s + (b - a) \in Ss,s+(b−a)∈S. Conversely, take BBB of size qqq inside {s∈S:s+d∈S}\{s \in S : s + d \in S\}{s∈S:s+d∈S} and A={0,d}A = \{0, d\}A={0,d}.

Novelty. Elementary.

Preamble
import Definitions.Def_DiazModulus
Formal statement
open Complex ComplexConjugate

namespace DiazModulus

open Pointwise in
theorem two_sumset_iff_difference_count (S : Finset ℤ) (q : ℕ) :
    (∃ A B : Finset ℤ, A.card = 2 ∧ B.card = q ∧ A + B ⊆ S) ↔
      ∃ d : ℤ, 0 < d ∧ q ≤ (S.filter (fun s => s + d ∈ S)).card := by
  sorry

end DiazModulus
Source
Elementary combinatorics; a step of R6 of the Diaz modulus mission (the polar-degree note). Formal proof: Diaz modulus mission, 8 October 2026 (C. Perassi).

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