Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Leng–Sah–Sawhney interface: quasi-polynomial inverse theorem and Schmidt property for a class of structured functions

Definition
LSSInterface

by LG · Sep 28, 2026 · Mathlib 0df444a (Lean v4.33.1)

additive-combinatoricsarithmetic-progressions

Vocabulary for the structural input of the Leng–Sah–Sawhney density increment argument. Throughout, Str(N,Q,φ)\mathrm{Str}(N,Q,\varphi)Str(N,Q,φ) is an arbitrary predicate on N∈NN\in\mathbb NN∈N, Q∈RQ\in\mathbb RQ∈R and φ:Z→R\varphi:\mathbb Z\to\mathbb Rφ:Z→R, read as "φ\varphiφ is a structured function of complexity at most QQQ on {1,…,N}\{1,\dots,N\}{1,…,N}".

  • gowersZ N d g is the unnormalised Gowers sum ∑x∈[1,N]∑h1,…,hd∈(−N,N)∏ω∈{0,1}dg(x+ω⋅h)\sum_{x\in[1,N]}\sum_{h_1,\dots,h_d\in(-N,N)}\prod_{\omega\in\{0,1\}^d} g(x+\omega\cdot h)∑x∈[1,N]​∑h1​,…,hd​∈(−N,N)​∏ω∈{0,1}d​g(x+ω⋅h), defined recursively via the multiplicative derivative dmul h g x = g x * g (x+h).
  • qp C x =exp⁡(C(1+log⁡x)C)=\exp\big(C(1+\log x)^C\big)=exp(C(1+logx)C) (quasi-polynomial growth).
  • apSet a d len ={a,a+d,…,a+(len−1)d}⊆Z=\{a,a+d,\dots,a+(len-1)d\}\subseteq\mathbb Z={a,a+d,…,a+(len−1)d}⊆Z, and APPart N is a partition of {1,…,N}\{1,\dots,N\}{1,…,N} into finitely many such progressions with positive common differences.
  • InvWith Str s C: for every NNN, every 0<δ≤1/20<\delta\le 1/20<δ≤1/2 and every f:Z→[−1,1]f:\mathbb Z\to[-1,1]f:Z→[−1,1] supported on {1,…,N}\{1,\dots,N\}{1,…,N} with gowersZ N (s+1) f ≥δ2s+1Ns+2\ge \delta^{2^{s+1}}N^{s+2}≥δ2s+1Ns+2, there is φ\varphiφ with Str(N,Q,φ)\mathrm{Str}(N,Q,\varphi)Str(N,Q,φ), ∣φ∣≤Q|\varphi|\le Q∣φ∣≤Q and ∣∑x=1Nf(x)φ(x)∣≥N/Q\big|\sum_{x=1}^N f(x)\varphi(x)\big|\ge N/Q​∑x=1N​f(x)φ(x)​≥N/Q, where Q=qp(C,1/δ)Q=\mathrm{qp}(C,1/\delta)Q=qp(C,1/δ). InvHyp Str s means ∃C>0\exists C>0∃C>0 with InvWith Str s C (a quasi-polynomial inverse theorem for the Us+1[N]U^{s+1}[N]Us+1[N] norm).
  • SchmidtWith Str C: for all N,TN,TN,T, Q≥1Q\ge 1Q≥1 and φ1,…,φT\varphi_1,\dots,\varphi_Tφ1​,…,φT​ with Str(N,Q,φi)\mathrm{Str}(N,Q,\varphi_i)Str(N,Q,φi​), writing V=qp(C,(T+2)(Q+2))V=\mathrm{qp}(C,(T+2)(Q+2))V=qp(C,(T+2)(Q+2)), there is a partition of {1,…,N}\{1,\dots,N\}{1,…,N} into LLL progressions with L N1/V≤2NL\,N^{1/V}\le 2NLN1/V≤2N such that ∣φi(x)−φi(y)∣≤VN−1/V|\varphi_i(x)-\varphi_i(y)|\le V N^{-1/V}∣φi​(x)−φi​(y)∣≤VN−1/V whenever x,yx,yx,y lie in the same piece. SchmidtHyp Str means ∃C>0\exists C>0∃C>0 with SchmidtWith Str C.

In the literature the class is that of Lipschitz nilsequences F(g(n)Γ)F(g(n)\Gamma)F(g(n)Γ) of degree sss with dimension at most 1+log⁡Q1+\log Q1+logQ and complexity and Lipschitz constant at most QQQ.

Definition code
import Mathlib



/-!
# The abstract interface for the Leng–Sah–Sawhney argument

The density-increment argument of Leng–Sah–Sawhney uses two external inputs about a class of
"structured functions" (in the paper: Lipschitz nilsequences of bounded complexity):

* `InvHyp Str s`: the inverse theorem for the `U^{s+1}[N]` norm with quasi-polynomial bounds;
* `SchmidtHyp Str`: any `T` structured functions are simultaneously almost constant on the
  pieces of a partition of `{1, …, N}` into long arithmetic progressions.

Here the class is an arbitrary predicate `Str N Q φ` ("`φ : ℤ → ℝ` is structured of complexity
at most `Q` on `{1, …, N}`").
-/

open Finset

namespace LSS

noncomputable section

/-- Multiplicative derivative on `ℤ`. -/
def dmul (h : ℤ) (g : ℤ → ℝ) : ℤ → ℝ := fun x => g x * g (x + h)

/-- The (unnormalised) Gowers sum of order `d` of a function supported on `{1, …, N}`:
`gowersZ N d g = ∑_{x, h_1, …, h_d} ∏_{ω ∈ {0,1}^d} g (x + ω · h)`. -/
def gowersZ (N : ℕ) : ℕ → (ℤ → ℝ) → ℝ
  | 0, g => ∑ x ∈ Icc (1 : ℤ) N, g x
  | d + 1, g => ∑ h ∈ Ioo (-(N : ℤ)) N, gowersZ N d (dmul h g)

/-- `g` vanishes outside `{1, …, N}`. -/
def SupportedOn (N : ℕ) (g : ℤ → ℝ) : Prop := ∀ x, g x ≠ 0 → 1 ≤ x ∧ x ≤ N

/-- Quasi-polynomial growth: `qp C x = exp (C (1 + log x)^C)`. -/
def qp (C x : ℝ) : ℝ := Real.exp (C * (1 + Real.log x) ^ C)

/-- The arithmetic progression `{a, a + d, …, a + (len - 1) d}`. -/
def apSet (a : ℤ) (d len : ℕ) : Finset ℤ := (range len).image (fun i : ℕ => a + d * i)

/-- A partition of `{1, …, N}` into arithmetic progressions with positive common difference. -/
structure APPart (N : ℕ) where
  L : ℕ
  a : Fin L → ℤ
  d : Fin L → ℕ
  len : Fin L → ℕ
  hd : ∀ j, 0 < d j
  disj : ∀ i j, i ≠ j → Disjoint (apSet (a i) (d i) (len i)) (apSet (a j) (d j) (len j))
  cover : ∀ x, x ∈ Icc (1 : ℤ) N ↔ ∃ j, x ∈ apSet (a j) (d j) (len j)

/-- The piece number `j` of a partition. -/
def APPart.piece {N : ℕ} (P : APPart N) (j : Fin P.L) : Finset ℤ :=
  apSet (P.a j) (P.d j) (P.len j)

/-- The inverse theorem with constant `C`: a `1`-bounded function on `{1, …, N}` with Gowers sum
at least `δ^{2^{s+1}} N^{s+2}` correlates with a structured function of complexity at most
`qp C (1/δ) = exp (C (1 + log (1/δ))^C)`. -/
def InvWith (Str : ℕ → ℝ → (ℤ → ℝ) → Prop) (s : ℕ) (C : ℝ) : Prop :=
  ∀ (N : ℕ) (δ : ℝ) (f : ℤ → ℝ), 0 < δ → δ ≤ 1 / 2 → (∀ x, |f x| ≤ 1) →
    SupportedOn N f → δ ^ (2 ^ (s + 1)) * (N : ℝ) ^ (s + 2) ≤ gowersZ N (s + 1) f →
    ∃ φ : ℤ → ℝ, Str N (qp C (1 / δ)) φ ∧ (∀ x, |φ x| ≤ qp C (1 / δ)) ∧
      (N : ℝ) / qp C (1 / δ) ≤ |∑ x ∈ Icc (1 : ℤ) N, f x * φ x|

/-- **Inverse theorem hypothesis** (quasi-polynomial `U^{s+1}[N]` inverse theorem). -/
def InvHyp (Str : ℕ → ℝ → (ℤ → ℝ) → Prop) (s : ℕ) : Prop := ∃ C : ℝ, 0 < C ∧ InvWith Str s C

/-- The Schmidt-type property with constant `C`: `T` structured functions of complexity at most
`Q` are simultaneously almost constant on the pieces of a partition of `{1, …, N}` into few
(hence long on average) arithmetic progressions, with quasi-polynomial dependence on
`(T + 2)(Q + 2)`. -/
def SchmidtWith (Str : ℕ → ℝ → (ℤ → ℝ) → Prop) (C : ℝ) : Prop :=
  ∀ (N T : ℕ) (Q : ℝ) (φ : Fin T → ℤ → ℝ), 1 ≤ Q → (∀ i, Str N Q (φ i)) →
    ∃ P : APPart N,
      (P.L : ℝ) * (N : ℝ) ^ (1 / qp C ((T + 2) * (Q + 2))) ≤ 2 * N ∧
      ∀ i j, ∀ x ∈ P.piece j, ∀ y ∈ P.piece j,
        |φ i x - φ i y| ≤ qp C ((T + 2) * (Q + 2)) * (N : ℝ) ^ (-(1 / qp C ((T + 2) * (Q + 2))))

/-- **Schmidt-type hypothesis.** -/
def SchmidtHyp (Str : ℕ → ℝ → (ℤ → ℝ) → Prop) : Prop := ∃ C : ℝ, 0 < C ∧ SchmidtWith Str C

end

end LSS
Source
J. Leng, A. Sah, M. Sawhney, Improved bounds for Szemerédi's theorem, arXiv:2402.17995, Theorem 3.1 (inverse theorem, from arXiv:2402.17994 Theorem 1.2) and Lemma 2.1 (Schmidt for nilsequences)

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