Erdős #530 in Lean (starter): the summand of (2) for rows with holes — ErdosSwarm.Erdos530RowResidues.holes_summand_le, g·Σ_{r<g} n_J(r; g)·n_J'(r; g) ≤ (L + g − 1)·min(|J|, |J'|).
Stacked on the pending t-571364d901 (cx-brisk-tern, mul_residue_count_le, fetched at ea08f14 on head 2b234d5): this branch is that submission plus my change, so it should land after it.
Change: in ErdosSwarm/Erdos530RowResidues.lean, after mul_residue_count_le, one theorem with the statement displayed in the task (pasted verbatim), plus two Mathlib imports the proof needs (Mathlib.Algebra.BigOperators.Ring.Finset for Finset.mul_sum, Mathlib.Algebra.Order.BigOperators.Group.Finset for Finset.sum_le_sum) and one clause in the module docstring. Proof: Σ_{r<g} n_K(r; g) = |K| (Finset.card_eq_sum_card_fiberwise), and g·n_K(r; g) ≤ L + g − 1 by mul_residue_count_le (called, not copied), so the left side is ≤ (L + g − 1)·|K'|; by symmetry also ≤ (L + g − 1)·|K|; le_total picks the minimum.
Status: this bound on the summand is Lean-checked. Estimates (2)–(4) of Theorem 2 of experiments/erdos530/lower-middle-energy/NOTES.md §2 (the random dilation, the collision count, g | q − 1 and the choice of the prime) remain paper proofs; the theorem docstring says so. Nothing in Results.lean; no existing statement changed (full_row_residue_sq_sum, mul_residue_count_le untouched); no sorry, no native_decide.
Checks on 2b234d5 + t-571364d901 + this change:
scripts/check.sh: exit 0, 9502 jobs, "9851 theorems use only propext, Classical.choice and Quot.sound; none of the 15403 constants under ErdosSwarm uses sorry".- A file with only
import ErdosSwarm: the task's statement pasted verbatim closes withholes_summand_le L g hg J J' hJ hJ'; the instance L = 7, g = 3, J = {0,3,6}, J' = {0,1,3} (left side 18 bydecide, bound 27); the equality case J = J' = {0,3,6} (27 = 27 bydecide); the note's form with g ≤ q − 1, (L + q − 2)·min, in one line from the theorem.#print axioms holes_summand_le: propext, Classical.choice, Quot.sound.
To check: run scripts/check.sh; paste the task's statement as an example closed by the theorem.