| | @@ -0,0 +1,92 @@ |
| 1 | +import ErdosSwarm.Erdos530Gap103.Rounding |
| 2 | +import ErdosSwarm.Erdos530Gap103.GridCertificate |
| 3 | + |
| 4 | +/-! |
| 5 | +# The seed lower bound of §4 for the 102/103 upper bound in Erdős #530 |
| 6 | + |
| 7 | +Lemma 7 of the plan in `ErdosSwarm/Erdos530Gap103/Plan.lean` (§4 of |
| 8 | +`experiments/erdos530/upper-new-cover/NOTES.md`, row `R = 32`): `seed_lower`, assembled from |
| 9 | + |
| 10 | +* `rounding` (`Rounding.lean`): one common shift rounds the seed and the centre to the grid |
| 11 | + of step `1/24` without increasing the functional, and |
| 12 | +* `grid_lower` (`GridCertificate.lean`): the grid functional exceeds |
| 13 | + `32 + 2 c s² + 14/1000` for every nonnegative mass vector of total mass at least |
| 14 | + `31 − 10⁻⁵`, every centre, orientation and translate of the envelope. |
| 15 | + |
| 16 | +The only work here is regrouping the sums over the seed by rounded index (`sum_by_index`). |
| 17 | +-/ |
| 18 | + |
| 19 | +namespace ErdosSwarm.Erdos530Gap103 |
| 20 | + |
| 21 | +open Finset |
| 22 | + |
| 23 | +noncomputable section |
| 24 | + |
| 25 | +/-- Regrouping a sum over the seed by rounded index. -/ |
| 26 | +theorem sum_by_index {ι : Type*} (S : Finset ι) (J : ι → ℤ) {T : Finset ℤ} |
| 27 | + (hJ : ∀ a ∈ S, J a ∈ T) (f : ℤ → ℝ) : |
| 28 | + ∑ a ∈ S, f (J a) = ∑ j ∈ T, ((S.filter fun a => J a = j).card : ℝ) * f j := by |
| 29 | + rw [← Finset.sum_fiberwise_of_maps_to hJ] |
| 30 | + refine Finset.sum_congr rfl fun j _ => ?_ |
| 31 | + rw [Finset.sum_congr rfl (g := fun _ => f j) (fun a ha => by rw [(Finset.mem_filter.mp ha).2]), |
| 32 | + Finset.sum_const, nsmul_eq_mul] |
| 33 | + |
| 34 | +/-- Lemma 7 of the plan (§4 of the note for `R = 32`): inequality (1) fails strictly at every |
| 35 | +seed, centre and isometry. The seed is any finite family of points of `(0, 32)` with common |
| 36 | +mass `w` and total mass at least `A = 31 − 10⁻⁵`. `rounding` moves the seed and the centre to |
| 37 | +the nodes `j/24`, `0 ≤ j ≤ 768`, without increasing the functional; with |
| 38 | +`u j = w · #{a ∈ S : J a = j}` the grid functional is the one bounded by `grid_lower`. -/ |
| 39 | +theorem seed_lower {ι : Type*} (S : Finset ι) (y : ι → ℝ) {w : ℝ} (hw : 0 ≤ w) |
| 40 | + (hy : ∀ a ∈ S, y a ∈ Set.Ioo (0 : ℝ) 32) (hmass : 31 - 1 / 10 ^ 5 ≤ S.card * w) |
| 41 | + {t : ℝ} (ht : t ∈ Set.Ioo (0 : ℝ) 32) (neg : Bool) (r : ℝ) : |
| 42 | + 32 + 2 * cCharge * sCoef ^ 2 + 14 / 1000 < |
| 43 | + w ^ 2 * ∑ a ∈ S, ∑ a' ∈ S, kernel (y a - y a') + |
| 44 | + 2 * sCoef * w * ∑ a ∈ S, |
| 45 | + (zScore (y a - t) - vCharge (y a - t) * psi (isoR neg r (y a))) + |
| 46 | + 2 * cCharge * sCoef ^ 2 * psi t := by |
| 47 | + obtain ⟨J, i, right, k, hJ, hi, hle⟩ := rounding S y hw hy ht neg r |
| 48 | + refine lt_of_lt_of_le ?_ hle |
| 49 | + set u : ℤ → ℝ := fun j => w * ((S.filter fun a => J a = j).card : ℝ) with hu |
| 50 | + have hu0 : ∀ j ∈ Icc (0 : ℤ) 768, 0 ≤ u j := fun j _ => mul_nonneg hw (Nat.cast_nonneg _) |
| 51 | + have hm : ∑ j ∈ Icc (0 : ℤ) 768, u j = S.card * w := by |
| 52 | + have h := sum_by_index S J hJ (fun _ => (1 : ℝ)) |
| 53 | + simp only [mul_one, Finset.sum_const, nsmul_eq_mul] at h |
| 54 | + rw [h, Finset.sum_mul, hu] |
| 55 | + exact Finset.sum_congr rfl fun j _ => mul_comm _ _ |
| 56 | + have key := grid_lower hu0 (hm ▸ hmass) hi right k |
| 57 | + have e1 : w ^ 2 * ∑ a ∈ S, ∑ a' ∈ S, kernel (((J a - J a' : ℤ) : ℝ) / 24) = |
| 58 | + ∑ j ∈ Icc (0 : ℤ) 768, ∑ j' ∈ Icc (0 : ℤ) 768, |
| 59 | + u j * u j' * kernel (((j - j' : ℤ) : ℝ) / 24) := by |
| 60 | + have h1 : ∀ a ∈ S, ∑ a' ∈ S, kernel (((J a - J a' : ℤ) : ℝ) / 24) = |
| 61 | + ∑ j' ∈ Icc (0 : ℤ) 768, ((S.filter fun a' => J a' = j').card : ℝ) * |
| 62 | + kernel (((J a - j' : ℤ) : ℝ) / 24) := fun a _ => |
| 63 | + sum_by_index S J hJ (fun j' => kernel (((J a - j' : ℤ) : ℝ) / 24)) |
| 64 | + rw [Finset.sum_congr rfl h1, |
| 65 | + sum_by_index S J hJ (fun j => ∑ j' ∈ Icc (0 : ℤ) 768, |
| 66 | + ((S.filter fun a' => J a' = j').card : ℝ) * kernel (((j - j' : ℤ) : ℝ) / 24)), |
| 67 | + Finset.mul_sum] |
| 68 | + refine Finset.sum_congr rfl fun j _ => ?_ |
| 69 | + rw [Finset.mul_sum, Finset.mul_sum] |
| 70 | + refine Finset.sum_congr rfl fun j' _ => ?_ |
| 71 | + simp only [hu]; ring |
| 72 | + have e2 : w * ∑ a ∈ S, (zScore (((J a - i : ℤ) : ℝ) / 24) - |
| 73 | + vGrid (J a - i) * envelope (if right then J a - k else k - J a)) = |
| 74 | + ∑ j ∈ Icc (0 : ℤ) 768, |
| 75 | + u j * (zScore (((j - i : ℤ) : ℝ) / 24) - |
| 76 | + vGrid (j - i) * envelope (if right then j - k else k - j)) := by |
| 77 | + rw [sum_by_index S J hJ (fun j => zScore (((j - i : ℤ) : ℝ) / 24) - |
| 78 | + vGrid (j - i) * envelope (if right then j - k else k - j)), Finset.mul_sum] |
| 79 | + refine Finset.sum_congr rfl fun j _ => ?_ |
| 80 | + simp only [hu]; ring |
| 81 | + have e3 : 2 * sCoef * w * ∑ a ∈ S, (zScore (((J a - i : ℤ) : ℝ) / 24) - |
| 82 | + vGrid (J a - i) * envelope (if right then J a - k else k - J a)) = |
| 83 | + 2 * sCoef * ∑ j ∈ Icc (0 : ℤ) 768, |
| 84 | + u j * (zScore (((j - i : ℤ) : ℝ) / 24) - |
| 85 | + vGrid (j - i) * envelope (if right then j - k else k - j)) := by |
| 86 | + rw [← e2]; ring |
| 87 | + rw [e1, e3] |
| 88 | + exact key |
| 89 | + |
| 90 | +end |
| 91 | + |
| 92 | +end ErdosSwarm.Erdos530Gap103 |