| | @@ -0,0 +1,51 @@ |
| 1 | +import ErdosSwarm.Erdos530Gap75.Data |
| 2 | +import ErdosSwarm.Erdos530Gap78.Energy |
| 3 | + |
| 4 | +/-! |
| 5 | +# Missing energy for the 74/75 cover in Erdős #530 |
| 6 | + |
| 7 | +In §1 of `experiments/erdos530/upper-smaller-k3/NOTES.md`, the kernel is a weighted sum of |
| 8 | +eight normalized tents. At mesh spacing `32/M`, each tent has right-endpoint sum at most |
| 9 | +`M/64`, independently of its width. The same bound holds for the kernel because its |
| 10 | +coefficients sum to one. |
| 11 | +-/ |
| 12 | + |
| 13 | +namespace ErdosSwarm.Erdos530Gap75 |
| 14 | + |
| 15 | +open Finset |
| 16 | + |
| 17 | +/-- The right-endpoint sum of a unit-integral tent of any positive width on the mesh |
| 18 | +`32/M` is at most its positive half-integral divided by the mesh spacing. -/ |
| 19 | +theorem tent_sum_le {M : ℕ} (hM : 0 < M) {h : ℝ} (hh : 0 < h) : |
| 20 | + ∑ d ∈ Icc 1 M, tent h (32 * (d : ℝ) / M) ≤ (M : ℝ) / 64 := by |
| 21 | + have hM' : (0 : ℝ) < M := by exact_mod_cast hM |
| 22 | + have hstep : 0 < 32 / ((M : ℝ) * h) := by positivity |
| 23 | + have htent (d : ℕ) : tent h (32 * (d : ℝ) / M) = |
| 24 | + max 0 (1 - (d : ℝ) * (32 / (M * h))) / h := by |
| 25 | + rw [tent, abs_of_nonneg (by positivity : 0 ≤ 32 * (d : ℝ) / M), div_div, |
| 26 | + ← mul_div_assoc, mul_comm (d : ℝ) 32] |
| 27 | + simp_rw [htent] |
| 28 | + rw [← sum_div, div_le_iff₀ hh] |
| 29 | + calc |
| 30 | + _ ≤ 1 / (2 * (32 / ((M : ℝ) * h))) := Erdos530Gap78.tent_sum_le _ hstep M |
| 31 | + _ = M / 64 * h := by |
| 32 | + field_simp |
| 33 | + norm_num |
| 34 | + |
| 35 | +/-- The right-endpoint sum of the eight tents in the kernel (1) of the note. -/ |
| 36 | +theorem kernel_sum_le {M : ℕ} (hM : 0 < M) : |
| 37 | + ∑ d ∈ Icc 1 M, kernel (32 * (d : ℝ) / M) ≤ (M : ℝ) / 64 := by |
| 38 | + let B := (M : ℝ) / 64 |
| 39 | + calc |
| 40 | + _ ≤ B / 4 + (4 * B + 2 * B + 7 * B + 10 * B + 5 * B + 37 * B + 10 * B) / 100 := by |
| 41 | + simp only [kernel, sum_add_distrib, ← sum_div, ← mul_sum] |
| 42 | + gcongr <;> exact tent_sum_le hM (by norm_num) |
| 43 | + _ = B := by ring |
| 44 | + |
| 45 | +/-- The missing-energy inequality in §1 of the note, before (3). Sidon uniqueness |
| 46 | +accounts for the positive differences and the diagonal contributes `S.card * kernel 0`. -/ |
| 47 | +theorem missing_energy : MissingEnergy := by |
| 48 | + intro M S hM hS hsid |
| 49 | + exact Erdos530Gap78.missing_energy_of_kernel kernel kernel_neg hS hsid (kernel_sum_le hM) |
| 50 | + |
| 51 | +end ErdosSwarm.Erdos530Gap75 |