| | @@ -7,6 +7,8 @@ import Mathlib.Order.Interval.Set.Nat |
| 7 | 7 | |
| 8 | 8 | An eventual upper bound of two ordered representations gives a Sidon tail, |
| 9 | 9 | so the Erdős–Turán estimate bounds the size of each initial segment. |
| 10 | +For a cofinite additive basis, counting unordered pairs in a sufficiently long initial |
| 11 | +segment rules out this eventual upper bound. |
| 10 | 12 | -/ |
| 11 | 13 | |
| 12 | 14 | namespace ErdosSwarm.Erdos28 |
| | @@ -65,4 +67,49 @@ theorem initialSegment_le_of_sumRep_le_two {A : Set ℕ} {M : ℕ} |
| 65 | 67 | exact_mod_cast hcount |
| 66 | 68 | linarith [Erdos30.card_le_sqrt_add_quarter_of_pos hN hinterval hsidon] |
| 67 | 69 | |
| 70 | +open Filter |
| 71 | +open scoped Pointwise |
| 72 | + |
| 73 | +/-- A cofinite additive basis has arbitrarily large sums with at least three |
| 74 | +ordered representations. -/ |
| 75 | +theorem three_le_limsup_sumRep (A : Set ℕ) (h : (A + A)ᶜ.Finite) : |
| 76 | + 3 ≤ limsup (fun n : ℕ ↦ (sumRep A n : ℕ∞)) atTop := by |
| 77 | + apply le_limsup_of_frequently_le' |
| 78 | + rw [frequently_atTop] |
| 79 | + intro M |
| 80 | + by_contra! hsmall |
| 81 | + have htwo (n : ℕ) (hn : M ≤ n) : sumRep A n ≤ 2 := by |
| 82 | + have hlt : sumRep A n < 3 := by exact_mod_cast hsmall n hn |
| 83 | + omega |
| 84 | + let e := (A + A)ᶜ.ncard |
| 85 | + let q := M + e + 8 |
| 86 | + let m := (A ∩ Set.Iic (q ^ 4)).ncard |
| 87 | + let b := q ^ 2 + q + M + 2 |
| 88 | + -- At the fourth power the two root terms in the Sidon estimate are integers. |
| 89 | + have hq : 0 < q := by |
| 90 | + dsimp only [q] |
| 91 | + omega |
| 92 | + have hupper := initialSegment_le_of_sumRep_le_two htwo (q ^ 4) (pow_pos hq 4) |
| 93 | + have hsqrt : Real.sqrt ((q ^ 4 : ℕ) : ℝ) = (q : ℝ) ^ 2 := by |
| 94 | + rw [Nat.cast_pow, show (q : ℝ) ^ 4 = ((q : ℝ) ^ 2) ^ 2 by ring, |
| 95 | + Real.sqrt_sq (by positivity)] |
| 96 | + have hquarter : ((q ^ 4 : ℕ) : ℝ) ^ (4⁻¹ : ℝ) = q := by |
| 97 | + rw [Nat.cast_pow, ← Real.rpow_natCast, ← Real.rpow_mul (Nat.cast_nonneg _)] |
| 98 | + norm_num |
| 99 | + rw [hsqrt, hquarter] at hupper |
| 100 | + have hm : m ≤ b := by exact_mod_cast hupper |
| 101 | + -- Covering the initial segment requires more unordered pairs than this bound permits. |
| 102 | + have hcount : q ^ 4 + 1 ≤ (m + 1) * m / 2 + e := by |
| 103 | + simpa only [Nat.choose_two_right, Nat.add_sub_cancel] using |
| 104 | + initialSegment_choose_bound A h (q ^ 4) |
| 105 | + have hpairs : (m + 1) * m ≤ (b + 1) * b := Nat.mul_le_mul (Nat.succ_le_succ hm) hm |
| 106 | + have hgap : (b + 1) * b + 2 * e < 2 * (q ^ 4 + 1) := by |
| 107 | + -- The expanded difference has nonnegative coefficients and a positive constant. |
| 108 | + dsimp only [b, q] |
| 109 | + zify |
| 110 | + rw [← sub_pos] |
| 111 | + ring_nf |
| 112 | + positivity |
| 113 | + omega |
| 114 | + |
| 68 | 115 | end ErdosSwarm.Erdos28 |