Erdős #530, 77/78 plan, B3b: (9)–(10) proved in ErdosSwarm/Erdos530Gap78/GraphSize.lean (already imported from ErdosSwarm.lean), on B3a.
Statements (all at m = √M ≥ 2^256, hypotheses hn : |U| ≤ 2m, hedges, hquads exactly as in Plan.lean's graph_size_96):
- (9)
card_additiveQuadruples_le_40: e(U) ≤ 40 m^(69/32) - (9)
sum_sq_differenceStarts_le_246: ∑_{d∈[1,D]} r_U(d)² ≤ 246 m^(69/32), any D - (9)
sum_sq_sumReps_le_496(U ⊆ Icc 1 M): ∑_{y<Y} r_U^+(y)² ≤ 496 m^(69/32), any Y - (10)
sum_tripleReps_le_568(U ⊆ host M, S ⊆ U, G.IsIndepSet S): ∑_{x∈U∖S} R_S(x) ≤ 568 m^(29/16), wheretripleReps S x = #{(a,b,c)∈S³ : a+b = x+c}. The proof gives about 69 m^(29/16). Proof of (10):sum_tripleReps_lesplits the triples into a=b (Cauchy–Schwarz with (9)), edge-free (≤ 8 Q₄ viacard_edgeFree_triples_le), and an edge from x to a, b or c (sum_differenceStarts_gap_le,sum_sumReps_edge_le+ Cauchy–Schwarz). e(S) ≤ Q₄ holds because S is independent (additiveQuadruples_subset_edgeFree). Other changes:level532moved verbatim from Plan.lean to Data.lean (Plan imports Data; no Plan statement changed). Addedimport Mathlib.Algebra.Order.Chebyshev. Nothing added to Results.lean. No sorry or native_decide.
Check: scripts/check.sh on the branch passes:
✔ [9301/9303] Built ErdosSwarm.Erdos530Gap78.GraphSize (15s)
Build completed successfully (9303 jobs).
8026 theorems use only propext, Classical.choice and Quot.sound; none of the 12513 constants under ErdosSwarm uses sorry
Examples through import ErdosSwarm (each statement closed by an example, plus #print axioms → [propext, Classical.choice, Quot.sound] for all four). File:
import ErdosSwarm
open Finset ErdosSwarm ErdosSwarm.Erdos530Gap ErdosSwarm.Erdos530Gap78
example {M : ℕ} {U S : Finset ℕ} {G : SimpleGraph ℕ} (hm : (2:ℝ)^256 ≤ Real.sqrt M) (hU : U ⊆ host M) (hn : (U.card:ℝ) ≤ 2 * Real.sqrt M) (hedges : ((Erdos530Gap103.adjacentPairs G U).card:ℝ) ≤ 2 * Real.sqrt M * level532 (Real.sqrt M)) (hquads : 4 * ((Erdos530Gap103.edgeFreeQuadruples G U).card:ℝ) ≤ 2 * Real.sqrt M * ((level532 (Real.sqrt M):ℝ)^3 + 8 * level532 (Real.sqrt M)^2)) (hSU : S ⊆ U) (hind : G.IsIndepSet (S : Set ℕ)) :
((∑ x ∈ U \ S, ((S ×ˢ (S ×ˢ S)).filter fun t => t.1 + t.2.1 = x + t.2.2).card : ℕ) : ℝ) ≤ 568 * Real.sqrt M ^ (29/16 : ℝ) :=
sum_tripleReps_le_568 hm hU hn hedges hquads hSU hind
(the three (9) examples call card_additiveQuadruples_le_40 hm hn hedges hquads, sum_sq_differenceStarts_le_246 hm hn hedges hquads D, sum_sq_sumReps_le_496 hm hU hn hedges hquads Y with the same hypotheses), checked with lake env lean (exit 0).