import OAI.Probability.GaussianPropeller.Configuration namespace OAI open MeasureTheory ProbabilityTheory open scoped ENNReal open scoped RealInnerProductSpace open scoped RealInnerProductSpace open MeasureTheory ProbabilityTheory Set open scoped ENNReal RealInnerProductSpace open Filter open scoped Topology open MeasureTheory ProbabilityTheory Set Filter open scoped Topology open scoped RealInnerProductSpace open Set Filter open scoped Topology RealInnerProductSpace open scoped NNReal open Set Filter open scoped Topology RealInnerProductSpace NNReal open MeasureTheory ProbabilityTheory Set Filter open scoped Topology RealInnerProductSpace open MeasureTheory Set Filter open scoped Topology BigOperators open MeasureTheory ProbabilityTheory Set Filter open scoped RealInnerProductSpace Topology open MeasureTheory ProbabilityTheory Set Filter open scoped RealInnerProductSpace Topology ENNReal open MeasureTheory ProbabilityTheory Set Filter open scoped RealInnerProductSpace Topology ENNReal open Metric open MeasureTheory ProbabilityTheory Set open scoped RealInnerProductSpace ENNReal open MeasureTheory ProbabilityTheory Set Filter open scoped ENNReal RealInnerProductSpace namespace GaussianPropeller.Reduction.Configuration variable {d k:ℕ} lemma impossible_five_or_more (D:Configuration d k) (hk:5≤k) : False := by classical let r:ℕ→ℝ := fun i=>if hi:iif hi:iA (i.succAbove j)) := by constructor · intro j; exact hA.1 _ have hn:∀ᵐ x∂gaussian d,x∉A i := by exact (ae_iff.mpr (by simpa using hi)) filter_upwards [hA.2,hn] with x hx hxi obtain ⟨j,hj,huniq⟩:=hx have hji:j≠i := by intro hh; subst j; contradiction obtain ⟨a,ha⟩:=Fin.exists_succAbove_eq hji refine ⟨a,?_,?_⟩ · simpa only [ha] using hj · intro b hb apply Fin.succAbove_right_injective exact (huniq _ hb).trans ha.symm lemma remove_null_value {A:Fin (k+1)→Set (Space d)} (i:Fin (k+1)) (hi:gaussian d (A i)=0) : value (fun j:Fin k=>A (i.succAbove j))=value A := by unfold value rw [Fin.sum_univ_succAbove (fun j=>‖centroid (A j)‖^2) i,centroid_eq_zero_of_null hi] simp lemma partition_bound_small {A:Fin k→Set (Space d)} (hk:k≤3) (hA:IsPartition A) : value A≤9/(8*Real.pi) := by have he:∃ B:Fin 3→Set (Space d), IsPartition B ∧ value B=value A := by have hc:∀ m, k ≤ m → ∃ B:Fin m→Set (Space d), IsPartition B ∧ value B=value A := by intro m hm induction m,hm using Nat.le_induction with | base => exact ⟨A,hA,rfl⟩ | succ m hm ih => obtain ⟨B,hB,hv⟩:=ih let B' : Fin (m+1) → Set (Space d) := Fin.lastCases ∅ B have hp : IsPartition B' := append_empty_partition (A := B) hB have he : value B' = value B := append_empty_value B exact ⟨B',hp,he.trans hv⟩ exact hc 3 hk obtain ⟨B,hB,hv⟩:=he rw [←hv] exact three_partition_bound hB end GaussianPropeller.Reduction end OAI