Erdős #530, 77/78 plan, B3c: the signed count (11) of upper-deletion-constant/NOTES.md §4 for a seed with repeated differences, in the new ErdosSwarm/Erdos530Gap78/SignedCount.lean (imported from ErdosSwarm.lean), on the accepted B3b.
Statements:
signedMissing M lam S = ∑ d ∈ Icc 1 M, (1 + Row.beta) * Row.weight (d / (lam * M)) * (1 − #(differenceStarts S d)): the note's Q₀ = ∑_{d>0} W(d/(λM))(1 − r_S(d)), i.e.Erdos530Gap.Row.missingwith signed multiplicities.signed_collision_le_18000(hm, hU, hn, hedges, hquads exactly as in graph_size_96; 0 < lam; S ⊆ U; G.IsIndepSet S; B ⊆ U \ S):∑ x ∈ B, Row.score M lam S x ≤ #B (#B − 1) + signedMissing M lam S + 18000 * √M ^ (29/16).Rowis the accepted Erdos530Gap.Row, the uniform s = 48 row (Row.score = F_x, Row.peak = 491/25 = g_*, W(0) = 112.9968 ≤ 120). It holds for every B ⊆ U∖S; the left-half restriction of the note is only used in (12). The proof gives about 11,471 m^(29/16).weighted_signed_collision_le(weight-free, any S ⊆ U ⊆ host M, B ⊆ U∖S, no Sidon or independence hypothesis, any w ≥ 0 with envelope ≤ peak): score ≤ b(b−1) + missing weight + peak·∑{x∈B} tripleCount S x + 2∑{d∈[1,M]} r_U(d)(r_S(d) − 1).
Proof, following the note: represented displacements are charged to seed triples (peak·∑R_S(x), then (10) = sum_tripleReps_le_568); for the missing ones g(w)f ≤ f(f−1) + w; two incidences at a common signed shift project to an ordered pair x ≠ y of B and a seed pair with the same difference, at most r_S(|x−y|) of them (card_shift_pairs_le), so the excess over b(b−1) is ≤ 2∑ r_U(d)(r_S(d)−1), bounded by Cauchy–Schwarz with (9) (sum_sq_differenceStarts_le_246) and ∑(r_S−1)² ≤ 2(|S|+3e(S)) ≤ 100 m^(47/32); the missing weight is ≤ Q₀ + W(0)·∑(r_S(d)−1). Constants: 491/25·568 + 2·157 + 1 < 18000.
Other changes: GraphSize.lean: rpow_div_32, root_facts, le_of_sq_le_116 lose private (three words, no other change), so the new file can use them. The private steps of Erdos530Gap/SignedCount.lean that don't use the Sidon property are repeated in the new file; that accepted file is unchanged (editing it would rebuild Gap428/Gap103). PLAN.md: the B3c line says where it is proved. Plan.lean, Data.lean, Results.lean unchanged. No sorry, no native_decide.
Check, on this head (331a140 + this change): scripts/check.sh exit 0, last lines Build completed successfully (9307 jobs). 8083 theorems use only propext, Classical.choice and Quot.sound; none of the 12576 constants under ErdosSwarm uses sorry (first build: ✔ [9304/9307] Built ErdosSwarm.Erdos530Gap78.SignedCount (46s).)
Example through import ErdosSwarm, with Q₀ written out (lake env lean, exit 0; #print axioms signed_collision_le_18000 and Erdos530Gap78.weighted_signed_collision_le: [propext, Classical.choice, Quot.sound]):
import ErdosSwarm
open Finset ErdosSwarm ErdosSwarm.Erdos530Gap ErdosSwarm.Erdos530Gap78
example {M : ℕ} {U S B : Finset ℕ} {G : SimpleGraph ℕ} {lam : ℝ}
(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))
(hlam : 0 < lam) (hSU : S ⊆ U) (hind : G.IsIndepSet (S : Set ℕ)) (hB : B ⊆ U \ S) :
∑ x ∈ B, Row.score M lam S x ≤
(B.card : ℝ) * ((B.card : ℝ) - 1) +
∑ d ∈ Icc 1 M, (1 + Row.beta) * Row.weight (d / (lam * M)) *
(1 - ((differenceStarts S d).card : ℝ)) +
18000 * Real.sqrt M ^ (29 / 16 : ℝ) :=
signed_collision_le_18000 hm hU hn hedges hquads hlam hSU hind hB
Status: Lean-checked. For B3d/B3e: (11) is now available with Q₀ = signedMissing; (12) should be stated against the same signedMissing and Row.score.