[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"Q38oXgmeEU":3},"# Settling the Optimal Exponent Relating Sumsets and Difference Sets\n\nA Lean 4 / [mathlib](https://github.com/leanprover-community/mathlib4) formalization of the\ncompanion paper [**\"Settling the Optimal Exponent Relating Sumsets and Difference Sets\"**](paper/settling-the-optimal-exponent.pdf).\n\n> The set construction formalized here was **developed with the assistance of Hyra**, an\n> AI research agent from Tencent Hunyuan — see [Provenance & attribution](#provenance--attribution).\n\nFor a finite set of integers `A` with `|A| ≥ 2`, define the **sum/difference growth\nexponent**\n\n```\nC(A) = log(|A + A| / |A|) / log(|A − A| / |A|)\n```\n\nwhere `A + A` and `A − A` are the pointwise sumset and difference set. This repository\nproves:\n\n1. **Universal strict upper bound.** `C(A) \u003C 2` for every finite `A ⊆ ℤ` with `|A| ≥ 2`.\n2. **The supremum is exactly `2`.** `Sup { C(A) : A ⊆ ℤ finite, |A| ≥ 2 } = 2`.\n3. **The supremum is not attained.** No admissible `A` has `C(A) = 2`.\n4. **A quantitative witness.** There is an explicit finite `A` with\n   `2 − 10⁻⁹⁹⁹ \u003C C(A) \u003C 2`.\n\nThe upper bound is the analytic half (via the additive Plünnecke–Ruzsa / Ruzsa\ntriangle inequality); the matching lower bound is an explicit base-39 \"column\"\nconstruction whose growth exponents converge to `2`.\n\n## Headline theorems\n\nAll live in namespace `SumDiffExponent` (the construction lemmas are in `Column39`).\n\n| Theorem | File | Statement |\n|---|---|---|\n| `growthExponent_lt_two` | `SumDiffExponent.lean` | `2 ≤ A.card → growthExponent A \u003C 2` |\n| `tendsto_growthExponent_approximatingSet` | `SumDiffExponentMain.lean` | the explicit sets' exponents `→ 2` |\n| `isLUB_admissibleExponents` | `SumDiffExponentMain.lean` | `IsLUB admissibleExponents 2` |\n| `sSup_admissibleExponents` | `SumDiffExponentMain.lean` | `sSup admissibleExponents = 2` |\n| `supremum_not_attained` | `SumDiffExponentMain.lean` | `2 ≤ B.card → growthExponent B ≠ 2` |\n| `quantitative_example` | `SumDiffExponentQuantitative.lean` | `2 − 10⁻⁹⁹⁹ \u003C C \u003C 2` for an explicit set |\n\nwhere `growthExponent A = Real.log (sigma A) / Real.log (delta A)`,\n`sigma A = |A + A| / |A|`, `delta A = |A − A| / |A|` (as real numbers).\n\n## Repository layout\n\n| Module | Role |\n|---|---|\n| `SumDiffExponent.lean` | Problem definitions; the universal strict upper bound; base-12 automata certificates (a faithful record of the manuscript, not used by the final construction). |\n| `SumDiffExponentColumn.lean` | Kernel-friendly base-39 block `V`; finite certificates `V + V = range 39` and `|V − V| = 37`. |\n| `SumDiffExponentConstruction.lean` | The explicit row/column sets `A l` and their sum/difference cardinality bounds. |\n| `SumDiffExponentLimit.lean` | The asymptotic lower bound `exponentLower l → 2`. |\n| `SumDiffExponentMain.lean` | Convergence to `2`, the least-upper-bound / supremum theorems, non-attainment. |\n| `SumDiffExponentQuantitative.lean` | The explicit `10⁻⁹⁹⁹` witness. |\n| `scripts/CheckAxioms.lean` | Prints the axiom footprint of the headline theorems (see below). |\n\n## Requirements\n\n* [`elan`](https://github.com/leanprover/elan) (the Lean toolchain manager). The exact\n  Lean version — **`leanprover/lean4:v4.32.1`** — is pinned in `lean-toolchain` and is\n  installed automatically by `elan` on first use.\n* Internet access to download the mathlib olean cache (a few GB) rather than\n  compiling mathlib from source.\n* ~8 GB of free disk for the build directory `.lake/`.\n\nDependencies are pinned to exact commits in `lake-manifest.json` (mathlib `v4.32.1`,\ncommit `520045a…`), so the build is reproducible.\n\n## Build and reproduce\n\nInstall `elan` if you don't have it:\n\n```bash\ncurl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y\nsource \"$HOME/.elan/env\"\n```\n\nThen, from the repository root:\n\n```bash\nlake exe cache get   # download the pinned mathlib oleans (fetches deps on first run)\nlake build           # compile all six modules — this is the verification\n```\n\nA successful run ends with `Build completed successfully`. Lean emits a warning for\nany `sorry`; a clean build with no warnings means none is present.\n\n### Checking the axiom footprint\n\n```bash\nlake env lean scripts/CheckAxioms.lean\n```\n\n## Verification status\n\n* `lake build` completes successfully (2212 jobs); **no `sorry`** and **no `warning`**.\n* Axiom footprint (`#print axioms`, reproduced by `scripts/CheckAxioms.lean`):\n  * `growthExponent_lt_two` and `supremum_not_attained` depend only on the three\n    standard mathlib axioms `propext`, `Classical.choice`, `Quot.sound` — the analytic\n    upper-bound half is fully kernel-checked.\n  * `sSup_admissibleExponents`, `isLUB_admissibleExponents`,\n    `tendsto_growthExponent_approximatingSet`, and `quantitative_example` additionally\n    depend on **three `native_decide` certificates**:\n    `V_card_certificate`, `V_sum_certificate`, `VDiff_card_certificate`\n    (the facts `|V| = 12`, `V + V = {0,…,38}`, `|V − V| = 37` for the 12-element\n    base-39 block `V`).\n\n### Trust base note\n\n`native_decide` discharges a goal by compiling it to native code and running it,\nwhich adds the Lean compiler and native execution to the trusted computing base (this\nis why those theorems carry an extra generated axiom rather than being closed purely by\nthe kernel). Here it is used only for the three elementary finite computations listed\nabove; each is a small, independently checkable fact about a 12-element set. The\nbase-12 automaton certificates in `SumDiffExponent.lean` also use `native_decide` but\ndo **not** feed the final theorems (they are not in the axiom footprint above).\n\n## Provenance & attribution\n\nThe underlying finite-set construction was developed with the assistance of\n[Hyra](https://hy.tencent.com/research/hyra), an AI research agent from Tencent Hunyuan\n(based on the Hy3 model).\n\nThis repository gives a machine-checked Lean 4 / mathlib proof of the **sharp** statement —\nthe growth exponent is `\u003C 2` for *every* admissible set, its supremum over all such sets is\nexactly `2`, and `2` is never attained — using a kernel-friendly base-39 variant of the\npaper's base-12 construction (the base-12 automata are retained in `SumDiffExponent.lean` as\na faithful record of the manuscript, but are not load-bearing for the final theorems).\n\n## Citation\n\n```bibtex\n@misc{lin2026settling,\n  title  = {Settling the Optimal Exponent Relating Sumsets and Difference Sets},\n  author = {Lin, Haowei and Li, Shanda},\n  year   = {2026},\n}\n```\n\n## License\n\nLicensed under the [Apache License, Version 2.0](LICENSE) — the license used by\nmathlib and most of the Lean ecosystem. Attribution is recorded in\n[`NOTICE`](NOTICE).",1787169598224]