Mathematics / Formalization Note / Combinatorics & Graph Theory

The Kwan-Sah-Sauermann-Sawhney Theorem on Induced Subgraphs of Ramsey Graphs (Erdos Problem 88 Variant), Proved in Lean 4

A complete Lean 4 proof that follows Kwan, Sah, Sauermann and Sawhney in three layers: counting pools reducing exact realization to constant-width windows, degree bucketing with an L^1 Fourier support criterion, and Gaussian (Lindeberg) invariance for quadratic forms plus quota-flip decoupling for high frequencies. The file contains no sorry, admit, native_decide or axiom declarations. The mathematics is due to Kwan, Sah, Sauermann and Sawhney.

Author
Ali Uyar
DOI
10.5281/zenodo.24765109
Scope
Direct proof
Status
Merged on Left to Solve
Original theorem
Matthew Kwan, Ashwin Sah, Lisa Sauermann, and Mehtaab Sawhney (Forum Math. Pi 11 (2023), e21, Theorem 1.1; arXiv:2208.02874): fix C > 0 and eta > 0. For n sufficiently large, every n-vertex graph G with no clique or independent set of size at least C log_2 n contains, for every integer 0 <= m <= (1 - eta) e(G), an induced subgraph with exactly m edges. Together with the Erdos-Szemeredi edge-count lower bound for Ramsey graphs, this implies the Erdos-McKay conjecture (Erdos Problem 88).
Statement source
Left to Solve (FormalConjectures / OMA statements)
Source
github.com/aliuyar1234/lean4-landmark-formalizations/tree/main/11-erdos-88-ksss-ramsey

Machine-checked in Lean 4 ✓ Accepted and merged on Left to Solve.

Summary

A machine-checked Lean 4 proof of Theorem 1.1 of Kwan, Sah, Sauermann, and Sawhney: for fixed C, eta > 0 and large n, every C-Ramsey graph realizes every edge count up to (1 - eta) e(G) as an induced subgraph. The 10,386-line file proves Erdos88.erdos_88.variants.kwan_sah_sauermann_sawhney from FormalConjectures through KSSS.solution_of_short_interval, KSSS.short_interval_of_bucketed, and KSSS.bucketed_window, and was accepted by the Left to Solve Lean checker as PR #56342. Deriving the main declaration Erdos88.erdos_88 (the Erdos-McKay statement) needs the Erdos-Szemeredi edge bound, which this file does not formalize.

Context

The KSSS theorem combines Ramsey theory, Gaussian invariance for quadratic forms, and Fourier anticoncentration. This proof puts every probabilistic and spectral transfer step of that argument under the Lean kernel, on top of Mathlib.

Root problems on Left to Solve

  • LTS Erdos88.erdos_88.variants.kwan_sah_sauermann_sawhney closed; Left to Solve credits the solution to aliuyar1234

Credits

Mathematics: Matthew Kwan, Ashwin Sah, Lisa Sauermann, and Mehtaab Sawhney (KSSS Theorem 1.1), building on Alon, Krivelevich, and Sudakov (2003); both are credited in the Lean file header. Target statement: FormalConjectures. The Lean proof was produced with AI coding agents operated by the author (PR body: agent t3-code, model gpt-6.2-astra). The file header and PR body record no adapted third-party Lean code and no third-party contributors. A separate Lean proof of the main erdos_88 declaration by another author is linked from FormalConjectures (plby/lean-proofs). Left to Solve also lists a reduction R1 of this root by picasso250 (PR #21750), which this proof does not use.

Pull request ledger (1)

  • #56342 Erdos88.erdos_88.variants.kwan_sah_sauermann_sawhney merged

Cite

@misc{uyar2026_erdos_88_ksss_ramsey_lean4,
  author    = {Uyar, Ali},
  title     = {The Kwan-Sah-Sauermann-Sawhney Theorem on Induced Subgraphs of Ramsey Graphs (Erdos Problem 88 Variant), Proved in Lean 4},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.24765109},
  url       = {https://doi.org/10.5281/zenodo.24765109},
  note      = {Lean 4 formalization technical note (Matthew Kwan, Ashwin Sah, Lisa Sauermann, and Mehtaab Sawhney (Forum Math. Pi 11 (2023), e21, Theorem 1.1; arXiv:2208.02874): fix C > 0 and eta > 0. For n sufficiently large, every n-vertex graph G with no clique or independent set of size at least C log_2 n contains, for every integer 0 <= m <= (1 - eta) e(G), an induced subgraph with exactly m edges. Together with the Erdos-Szemeredi edge-count lower bound for Ramsey graphs, this implies the Erdos-McKay conjecture (Erdos Problem 88).). Code: https://github.com/aliuyar1234/lean4-landmark-formalizations/tree/main/11-erdos-88-ksss-ramsey}
}