import Mathlib set_option autoImplicit false noncomputable section open Filter MeasureTheory Metric open scoped ENNReal FourierTransform SchwartzMap Topology namespace CohnElkies abbrev Euclidean (d : β„•) := EuclideanSpace ℝ (Fin d) abbrev TestFunction (d : β„•) := 𝓒(Euclidean d, β„‚) def unitBallVolume (d : β„•) : ℝ := Real.pi ^ ((d : ℝ) / 2) / Real.Gamma ((d : ℝ) / 2 + 1) instance numeralTwoAtLeast : Nat.AtLeastTwo 2 := ⟨by decide⟩ instance euclideanFiniteDimensional (d : β„•) : FiniteDimensional ℝ (EuclideanSpace ℝ (Fin d)) := by infer_instance instance euclideanBorelSpace (d : β„•) : BorelSpace (EuclideanSpace ℝ (Fin d)) := by infer_instance end CohnElkies namespace PackingBounds structure FullAdmissible (d : β„•) where function : CohnElkies.TestFunction d real : βˆ€ x : CohnElkies.Euclidean d, (function x).im = 0 fourier_real : βˆ€ x : CohnElkies.Euclidean d, ((𝓕 function) x).im = 0 fourier_nonneg : βˆ€ x : CohnElkies.Euclidean d, 0 ≀ ((𝓕 function) x).re fourier_zero_pos : 0 < ((𝓕 function) (0 : CohnElkies.Euclidean d)).re outside_nonpos : βˆ€ x : CohnElkies.Euclidean d, 1 ≀ β€–xβ€– β†’ (function x).re ≀ 0 def fullQuotient {d : β„•} (f : FullAdmissible d) : ℝ := (f.function (0 : CohnElkies.Euclidean d)).re / ((𝓕 f.function) (0 : CohnElkies.Euclidean d)).re def fullQuotientSet (d : β„•) : Set ℝ := Set.range (fullQuotient (d := d)) def fullLinearProgram (d : β„•) : ℝ := CohnElkies.unitBallVolume d / (2 : ℝ) ^ d * sInf (fullQuotientSet d) end PackingBounds structure SpherePacking (d : β„•) where centers : Set (EuclideanSpace ℝ (Fin d)) separation : ℝ separation_pos : 0 < separation := by positivity centers_dist : Pairwise (separation ≀ dist Β· Β· : centers β†’ centers β†’ Prop) @[reducible] def SpherePacking.occupiedBallRegion {d : β„•} (S : SpherePacking d) : Set (EuclideanSpace ℝ (Fin d)) := ⋃ x : S.centers, ball (x : EuclideanSpace ℝ (Fin d)) (S.separation / 2) noncomputable def SpherePacking.densityInsideRadius {d : β„•} (S : SpherePacking d) (R : ℝ) : ℝβ‰₯0∞ := volume (S.occupiedBallRegion ∩ ball 0 R) / volume (ball (0 : EuclideanSpace ℝ (Fin d)) R) noncomputable def SpherePacking.upperPackingDensity {d : β„•} (S : SpherePacking d) : ℝβ‰₯0∞ := limsup S.densityInsideRadius atTop def SpherePackingConstant (d : β„•) : ℝβ‰₯0∞ := ⨆ S : SpherePacking d, S.upperPackingDensity namespace PackingBounds structure SharpFullCohnElkiesManuscriptConclusions : Prop where root_before_infimum : Tendsto (fun d : β„• => sInf {q : ℝ | βˆƒ f : FullAdmissible d, fullQuotient f ^ ((d : ℝ)⁻¹) = q} / Real.sqrt (d : ℝ)) atTop (𝓝 (1 / Real.pi)) root_before_infimum_vanishing_error : βˆƒ err : β„• β†’ ℝ, Tendsto err atTop (𝓝 0) ∧ βˆ€ d : β„•, 0 < d β†’ sInf {q : ℝ | βˆƒ f : FullAdmissible d, fullQuotient f ^ ((d : ℝ)⁻¹) = q} = (1 / Real.pi + err d) * Real.sqrt (d : ℝ) linear_program_root : Tendsto (fun d : β„• => (fullLinearProgram d) ^ ((d : ℝ)⁻¹)) atTop (𝓝 (Real.sqrt (Real.exp 1 / (2 * Real.pi)))) natural_logarithmic_rate : Tendsto (fun d : β„• => Real.log (fullLinearProgram d) / (d : ℝ)) atTop (𝓝 ((1 / 2 : ℝ) * Real.log (Real.exp 1 / (2 * Real.pi)))) natural_vanishing_exponential_error : βˆƒ err : β„• β†’ ℝ, Tendsto err atTop (𝓝 0) ∧ (βˆ€αΆ  d : β„• in atTop, fullLinearProgram d = (Real.sqrt (Real.exp 1 / (2 * Real.pi)) + err d) ^ d) universal_nonnegative_delta : βˆƒ Ξ΄ : β„• β†’ ℝ, Tendsto Ξ΄ atTop (𝓝 0) ∧ (βˆ€ d : β„•, 0 ≀ Ξ΄ d) ∧ (βˆ€αΆ  d : β„• in atTop, βˆ€ f : FullAdmissible d, (2 : ℝ) ^ d / CohnElkies.unitBallVolume d * (Real.sqrt (Real.exp 1 / (2 * Real.pi)) - Ξ΄ d) ^ d ≀ fullQuotient f) base_two_exponent_positive : 0 < (1 / 2 : ℝ) * Real.logb 2 (2 * Real.pi / Real.exp 1) base_two_decimal_certificate : (1 / 2 : ℝ) * Real.logb 2 (2 * Real.pi / Real.exp 1) ∈ Set.Ioo (0.604400544291677695341677307053 : ℝ) 0.604400544291677695341677307054 base_two_logarithmic_rate : Tendsto (fun d : β„• => Real.logb 2 (fullLinearProgram d) / (d : ℝ)) atTop (𝓝 (-((1 / 2 : ℝ) * Real.logb 2 (2 * Real.pi / Real.exp 1)))) base_two_vanishing_exponential_error : βˆƒ err : β„• β†’ ℝ, Tendsto err atTop (𝓝 0) ∧ (βˆ€αΆ  d : β„• in atTop, fullLinearProgram d = (2 : ℝ) ^ (-((1 / 2 : ℝ) * Real.logb 2 (2 * Real.pi / Real.exp 1) + err d) * (d : ℝ))) end PackingBounds namespace PackingBounds.FullMain theorem exact_limit : Tendsto (fun d : β„• => PackingBounds.fullLinearProgram d ^ ((d : ℝ)⁻¹)) atTop (nhds (Real.sqrt (Real.exp 1 / (2 * Real.pi)))) := by sorry theorem exact_binary_exponent : Tendsto (fun d : β„• => Real.logb 2 (PackingBounds.fullLinearProgram d) / (d : ℝ)) atTop (nhds (-(1 / 2 : ℝ) * Real.logb 2 (2 * Real.pi / Real.exp 1))) := by sorry end PackingBounds.FullMain namespace PackingBounds.PackingBridge theorem sphere_packing_sharp_asymptotic_upper : βˆƒ e : β„• β†’ ℝ, Asymptotics.IsLittleO atTop e (fun _ : β„• => (1 : ℝ)) ∧ βˆ€ d : β„•, 0 < d β†’ SpherePackingConstant d ≀ ENNReal.ofReal ((Real.sqrt (Real.exp 1 / (2 * Real.pi)) + e d) ^ d) := by sorry end PackingBounds.PackingBridge namespace PackingBounds theorem sharpFullCohnElkiesManuscriptConclusions : SharpFullCohnElkiesManuscriptConclusions := by sorry end PackingBounds end