| | @@ -0,0 +1,76 @@ |
| 1 | +import ErdosSwarm.Erdos530Occupancy |
| 2 | +import Mathlib.Algebra.BigOperators.Group.Finset.Sigma |
| 3 | +import Mathlib.Algebra.Order.BigOperators.Ring.Finset |
| 4 | +import Mathlib.Data.Real.Basic |
| 5 | + |
| 6 | +/-! |
| 7 | +# Fourth-moment occupancy bounds for Erdős problem 530 |
| 8 | + |
| 9 | +Let `T` and `Q` count unordered triples and quadruples whose points lie in a common fibre. |
| 10 | +If `U` is the sum of the occupancy surpluses, then `3 * T^2 ≤ U * (3 * T + 4 * Q)`. |
| 11 | +The same bound holds for the uniform averages of the three counts. |
| 12 | +The per-cell surplus comes from `experiments/erdos530/lower-middle-energy2/full-rows/NOTES.md`. |
| 13 | +The October 2026 sidon-palomar report illustrates the effect of a rare large fibre in |
| 14 | +“Triple independence does not control heavy fibers”. The triple and quadruple collision |
| 15 | +estimates for a random linear map that turn this inequality into a Sidon bound in |
| 16 | +`experiments/erdos530/lower-middle-energy2/box-occupancy/NOTES.md` remain paper proofs. |
| 17 | +-/ |
| 18 | + |
| 19 | +namespace ErdosSwarm.Erdos530Occupancy |
| 20 | + |
| 21 | +open Finset |
| 22 | +open scoped BigOperators |
| 23 | + |
| 24 | +variable {ι Ω : Type*} |
| 25 | + |
| 26 | +/-- The surplus is the number of occupied cells minus the number of hits plus colliding pairs. -/ |
| 27 | +theorem sum_surplus_eq (s : Finset ι) (m : ι → ℕ) : |
| 28 | + ((∑ i ∈ s, surplus (m i) : ℕ) : ℤ) = |
| 29 | + (s.filter fun i => 0 < m i).card - ∑ i ∈ s, (m i : ℤ) + ∑ i ∈ s, ((m i).choose 2 : ℤ) := by |
| 30 | + simp only [Nat.cast_sum, card_filter, Nat.cast_ite, |
| 31 | + Nat.cast_one, Nat.cast_zero, ← sum_sub_distrib, ← sum_add_distrib] |
| 32 | + refine sum_congr rfl fun i _ => ?_ |
| 33 | + linarith only [occupancy_identity (m i)] |
| 34 | + |
| 35 | +/-- The fourth-moment bound is an equality in one cell, including an empty cell. -/ |
| 36 | +theorem three_mul_choose_three_sq (m : ℕ) : |
| 37 | + 3 * (m.choose 3) ^ 2 = surplus m * (3 * m.choose 3 + 4 * m.choose 4) := by |
| 38 | + -- A point marked alongside a triple either belongs to it or completes a quadruple. |
| 39 | + have hcount := Nat.add_one_mul_choose_eq m 3 |
| 40 | + rw [Nat.choose_succ_succ] at hcount |
| 41 | + have hmarked : 3 * m.choose 3 + 4 * m.choose 4 = m * m.choose 3 := by |
| 42 | + nlinarith only [hcount] |
| 43 | + rw [hmarked, ← mul_assoc, mul_comm (surplus m) m, ← three_mul_choose_three, sq] |
| 44 | + ac_rfl |
| 45 | + |
| 46 | +/-- Triple and quadruple collisions give a lower bound on the total occupancy surplus. -/ |
| 47 | +theorem fibre_inequality (s : Finset ι) (m : ι → ℕ) : |
| 48 | + 3 * (∑ i ∈ s, (m i).choose 3) ^ 2 ≤ |
| 49 | + (∑ i ∈ s, surplus (m i)) * (3 * ∑ i ∈ s, (m i).choose 3 + 4 * ∑ i ∈ s, (m i).choose 4) := by |
| 50 | + -- Apply Cauchy–Schwarz to three times each triple count to keep all factors integral. |
| 51 | + have hcs := sum_sq_le_sum_mul_sum_of_sq_le_mul s (r := fun i => 3 * (m i).choose 3) |
| 52 | + (f := fun i => 3 * surplus (m i)) (g := fun i => 3 * (m i).choose 3 + 4 * (m i).choose 4) |
| 53 | + (fun _ _ => Nat.zero_le _) (fun _ _ => Nat.zero_le _) (fun i _ => by |
| 54 | + nlinarith only [Nat.mul_le_mul_left 3 (three_mul_choose_three_sq (m i)).le]) |
| 55 | + simp only [sum_add_distrib, ← mul_sum] at hcs |
| 56 | + nlinarith only [hcs] |
| 57 | + |
| 58 | +/-- Pool a finite family of profiles by taking the product of samples and cells. -/ |
| 59 | +theorem fibre_inequality_sum (W : Finset Ω) (s : Finset ι) (m : Ω → ι → ℕ) : |
| 60 | + 3 * (∑ w ∈ W, ∑ i ∈ s, (m w i).choose 3) ^ 2 ≤ |
| 61 | + (∑ w ∈ W, ∑ i ∈ s, surplus (m w i)) * |
| 62 | + (3 * ∑ w ∈ W, ∑ i ∈ s, (m w i).choose 3 + 4 * ∑ w ∈ W, ∑ i ∈ s, (m w i).choose 4) := by |
| 63 | + simpa only [sum_product] using fibre_inequality (W ×ˢ s) (fun wi => m wi.1 wi.2) |
| 64 | + |
| 65 | +/-- Fourth-moment occupancy bound for the uniform average over a finite family of profiles. -/ |
| 66 | +theorem fibre_inequality_avg (W : Finset Ω) (hW : W.Nonempty) (s : Finset ι) (m : Ω → ι → ℕ) : |
| 67 | + 3 * ((∑ w ∈ W, ∑ i ∈ s, ((m w i).choose 3 : ℝ)) / W.card) ^ 2 ≤ |
| 68 | + ((∑ w ∈ W, ∑ i ∈ s, (surplus (m w i) : ℝ)) / W.card) * |
| 69 | + (3 * ((∑ w ∈ W, ∑ i ∈ s, ((m w i).choose 3 : ℝ)) / W.card) + |
| 70 | + 4 * ((∑ w ∈ W, ∑ i ∈ s, ((m w i).choose 4 : ℝ)) / W.card)) := by |
| 71 | + simp only [div_pow, ← mul_div_assoc, ← add_div] |
| 72 | + rw [div_mul_eq_mul_div, div_div, ← sq] |
| 73 | + apply (div_le_div_iff_of_pos_right (sq_pos_of_pos (Nat.cast_pos.mpr hW.card_pos))).mpr |
| 74 | + exact_mod_cast fibre_inequality_sum W s m |
| 75 | + |
| 76 | +end ErdosSwarm.Erdos530Occupancy |