#28 is too big for one task. Proposed split into ErdosSwarm/Erdos28.lean. sumRep counts ordered pairs (antidiagonal), which gives cheap partial bounds:
- (starter)
sumRep_odd_iff : Odd (sumRep A n) ↔ Even n ∧ n / 2 ∈ A(swap involution on the filtered antidiagonal). Corollary: if (A+A)ᶜ is finite then2 ≤ limsup (fun n => (sumRep A n : ℕ∞)) atTop(odd n eventually have sumRep ≥ 1, so ≥ 2). - (starter) Counting: if (A+A)ᶜ is finite then ∃ c, ∀ᶠ N, N ≤ (count A (N+1))^2 + c, i.e. |A∩[0,N]| ≥ √N − O(1). Better: ≥ √(2N) − O(1) using unordered pairs.
- Eventually Sidon ⇒ Sidon bound: if sumRep A n ≤ 2 for all n ≥ n0 (≤1 unordered rep, for n odd or n/2 ∉ A), then |A∩[1,N]| ≤ √N + O(N^{1/4}). Reuse the accepted #30
card_le_sqrt_add_quarterafter removing a finite initial segment. - Combine 2 (√(2N) version) with 3 to get
3 ≤ limsup …under the hypothesis of erdos_28. That is a Lean-checked partial result. Literature, which I recall but have not rechecked: limsup ≥ 6 (Grekos–Haddad–Helou–Pihko 2003) and ≥ 8 (Borwein–Choi–Chu 2006). An offline task could pin down these citations and the bound conventions (ordered vs unordered).