math / data /lean /ComparatorChallenges /CoveringDensity.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
4.37 kB
import Mathlib
namespace OAI
namespace CoveringOrder
open Set MeasureTheory
open scoped ENNReal
abbrev Space (n : β„•) := EuclideanSpace ℝ (Fin n)
/-- Actual discrete full-rank lattice coverings; no assumed density theorem. -/
structure LatticeCover {n : β„•} (K : Set (Space n)) where
lattice : Submodule β„€ (Space n)
discrete : DiscreteTopology lattice
fullrank : IsZLattice ℝ lattice
covers : βˆ€ y, βˆƒ l : lattice, y - l.val ∈ K
noncomputable def euclideanVolume (n : β„•) :
@Measure (EuclideanSpace ℝ (Fin n))
(@WithLp.measurableSpace 2 (Fin n β†’ ℝ)
(@MeasurableSpace.pi (Fin n) (fun _ => ℝ) (fun _ => Real.measurableSpace))) :=
@Measure.map (Fin n β†’ ℝ) (EuclideanSpace ℝ (Fin n))
(@MeasurableSpace.pi (Fin n) (fun _ => ℝ) (fun _ => Real.measurableSpace))
(@WithLp.measurableSpace 2 (Fin n β†’ ℝ)
(@MeasurableSpace.pi (Fin n) (fun _ => ℝ) (fun _ => Real.measurableSpace)))
(@WithLp.toLp 2 (Fin n β†’ ℝ))
(Measure.pi (fun _ : Fin n => @volume ℝ Real.measureSpace))
noncomputable def euclideanCovolume {n : β„•}
(lattice : Submodule β„€ (EuclideanSpace ℝ (Fin n))) : ℝβ‰₯0∞ :=
addCovolume lattice (EuclideanSpace ℝ (Fin n)) (euclideanVolume n)
noncomputable def latticeDensity {n : β„•} {K : Set (Space n)}
(cover : LatticeCover K) : ℝβ‰₯0∞ :=
euclideanVolume n K / euclideanCovolume cover.lattice
noncomputable def thetaL {n : β„•} (K : Set (EuclideanSpace ℝ (Fin n))) : ℝβ‰₯0∞ :=
β¨… cover : LatticeCover K, latticeDensity cover
end CoveringOrder
namespace TranslativeCovering
open Set Filter MeasureTheory
open scoped ENNReal
abbrev Space (n : β„•) := EuclideanSpace ℝ (Fin n)
def cube (n : β„•) (R : ℝ) : Set (Space n) :=
{x | βˆ€ i, -R ≀ x i ∧ x i ≀ R}
def LocallyFiniteCenters {n : β„•} (X : Set (Space n)) : Prop :=
βˆ€ B : Set (Space n), Bornology.IsBounded B β†’ (X ∩ B).Finite
def Covers {n : β„•} (K X : Set (Space n)) : Prop :=
βˆ€ y, βˆƒ x ∈ X, y - x ∈ K
def ConvexBody {n : β„•} (K : Set (Space n)) : Prop :=
IsCompact K ∧ Convex ℝ K ∧ (interior K).Nonempty
def CentrallySymmetric {n : β„•} (K : Set (Space n)) : Prop :=
βˆƒ z, βˆ€ x, x ∈ K ↔ (2 : ℝ) β€’ z - x ∈ K
noncomputable def upperCenterIntensity {n : β„•} (X : Set (Space n)) : ℝβ‰₯0∞ :=
Filter.limsup (fun R : ℝ =>
(↑(X ∩ cube n R).ncard : ℝβ‰₯0∞) / ENNReal.ofReal ((2 * R) ^ n)) atTop
noncomputable def thetaT {n : β„•} (K : Set (Space n)) : ℝβ‰₯0∞ :=
β¨… X : {X : Set (Space n) // LocallyFiniteCenters X ∧ Covers K X},
volume K * upperCenterIntensity X.val
end TranslativeCovering
namespace CoveringOrder
open Set MeasureTheory
open scoped ENNReal
abbrev Body (n : β„•) := {K : Set (Space n) // TranslativeCovering.ConvexBody K}
abbrev SymmetricBody (n : β„•) :=
{K : Body n // TranslativeCovering.CentrallySymmetric K.val}
noncomputable def translativeSup (n : β„•) : ℝβ‰₯0∞ :=
⨆ K : Body n, TranslativeCovering.thetaT K.val
noncomputable def symmetricTranslativeSup (n : β„•) : ℝβ‰₯0∞ :=
⨆ K : SymmetricBody n, TranslativeCovering.thetaT K.val.val
noncomputable def latticeSup (n : β„•) : ℝβ‰₯0∞ :=
⨆ K : Body n, thetaL K.val
noncomputable def symmetricLatticeSup (n : β„•) : ℝβ‰₯0∞ :=
⨆ K : SymmetricBody n, thetaL K.val.val
/-- The finite real comparison scale, viewed in extended nonnegative reals. -/
def orderBounds (c C : ℝ) (n : β„•) (a : ℝβ‰₯0∞) : Prop :=
ENNReal.ofReal (c * (n : ℝ) * Real.log (n : ℝ)) ≀ a ∧
a ≀ ENNReal.ofReal (C * (n : ℝ) * Real.log (n : ℝ))
/-- All four extremal quantities have common
absolute positive comparison constants. ENNReal bounds imply finiteness rather
than mapping a potentially infinite density to zero through `toReal`. -/
def OptimalOrder : Prop :=
βˆƒ c C : ℝ, 0 < c ∧ 0 < C ∧ βˆƒ nβ‚€ : β„•, βˆ€ n : β„•, nβ‚€ ≀ n β†’
orderBounds c C n (translativeSup n) ∧
orderBounds c C n (symmetricTranslativeSup n) ∧
orderBounds c C n (latticeSup n) ∧
orderBounds c C n (symmetricLatticeSup n)
end CoveringOrder
/-- Translative and lattice covering densities over all convex bodies and over
centrally symmetric convex bodies have the same asymptotic order. -/
theorem CoveringOrder.optimal_order : CoveringOrder.OptimalOrder := by
sorry
end OAI