math / data /lean /OAI /Geometry /CubicTorus /Model.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.75 kB
import Mathlib
namespace OAI
noncomputable section
open MeasureTheory Set
open scoped ENNReal
namespace CubicTorus
abbrev Cover := EuclideanSpace ℝ (Fin 3)
abbrev Torus := PiLp 2 (fun _ : Fin 3 => AddCircle (1 : ℝ))
/-- The quotient RΒ³ β†’ RΒ³/ZΒ³ in orthonormal coordinates. -/
def quotientMap (x : Cover) : Torus :=
WithLp.toLp 2 (fun i => (x i : AddCircle (1 : ℝ)))
/-- One unit-volume fundamental domain; its boundary is immaterial to integration. -/
def fundamentalCube : Set Cover := {x | βˆ€ i, 0 ≀ x i ∧ x i < 1}
/-- The Riemannian volume measure of the unit flat torus. -/
def torusVolume : Measure Torus :=
Measure.map quotientMap (volume.restrict fundamentalCube)
/-- An integer lattice vector in the Euclidean cover. -/
def latticeVector (n : Fin 3 β†’ β„€) : Cover := WithLp.toLp 2 (fun i => (n i : ℝ))
/-- The smooth vector fields on the flat torus with pointwise length at most one,
expressed as ZΒ³-periodic fields on its Euclidean cover. The explicit β„•βˆž index
is C^∞; top of WithTop β„•βˆž would instead mean analytic in this Mathlib. -/
def AdmissibleField (F : Cover β†’ Cover) : Prop :=
ContDiff ℝ (⊀ : β„•βˆž) F ∧
(βˆ€ (n : Fin 3 β†’ β„€) (x : Cover), F (x + latticeVector n) = F x) ∧
βˆ€ x, β€–F xβ€– ≀ 1
/-- Euclidean divergence in the orthonormal coordinate frame. -/
def divergence (F : Cover β†’ Cover) (x : Cover) : ℝ :=
βˆ‘ i : Fin 3, (fderiv ℝ F x (EuclideanSpace.single i 1)) i
/-- De Giorgi perimeter, allowed to be infinite; no regularity of E is imposed. -/
def perimeter (E : Set Torus) : ℝβ‰₯0∞ :=
⨆ (F : Cover β†’ Cover) (_ : AdmissibleField F),
ENNReal.ofReal (∫ x in fundamentalCube ∩ quotientMap ⁻¹' E, divergence F x)
/-- Finite-perimeter measurable regions, including all null-set modifications. -/
def FinitePerimeter (E : Set Torus) : Prop :=
NullMeasurableSet E torusVolume ∧ perimeter E < ⊀
/-- A global perimeter minimizer under the prescribed volume constraint. -/
def IsMinimizerAt (V : ℝ) (E : Set Torus) : Prop :=
FinitePerimeter E ∧ torusVolume E = ENNReal.ofReal V ∧
βˆ€ F : Set Torus, FinitePerimeter F β†’ torusVolume F = ENNReal.ofReal V β†’
perimeter E ≀ perimeter F
/-- The candidate unit-torus isoperimetric profile. -/
def candidateProfile (V : ℝ) : ℝ :=
let v := min V (1 - V)
min ((36 * Real.pi) ^ (1 / 3 : ℝ) * v ^ (2 / 3 : ℝ))
(min (2 * Real.sqrt (Real.pi * v)) 2)
/-- Canonical centered ball. Its radius on the listed branch is below 1/2. -/
def canonicalBall (V : ℝ) : Set Torus :=
Metric.ball 0 ((3 * V / (4 * Real.pi)) ^ (1 / 3 : ℝ))
/-- Canonical tube around the shortest closed geodesic in coordinate direction 0. -/
def canonicalTube (V : ℝ) : Set Torus :=
{x | β€–x 1β€– ^ 2 + β€–x 2β€– ^ 2 < (Real.sqrt (V / Real.pi)) ^ 2}
/-- Canonical slab of width V between two parallel coordinate tori. -/
def canonicalSlab (V : ℝ) : Set Torus := {x | β€–x 0β€– < V / 2}
/-- Equality of regions up to ambient flat isometry and a null set. -/
def CongruentAE (E F : Set Torus) : Prop :=
βˆƒ Ο† : Torus ≃ᡒ Torus, E =ᡐ[torusVolume] (Ο† '' F)
/-- Exactly the closed phase ranges, so adjacent types are BOTH included at ties. -/
def SmallStandardRegion (V : ℝ) (E : Set Torus) : Prop :=
(V ≀ 4 * Real.pi / 81 ∧ CongruentAE E (canonicalBall V)) ∨
(4 * Real.pi / 81 ≀ V ∧ V ≀ 1 / Real.pi ∧ CongruentAE E (canonicalTube V)) ∨
(1 / Real.pi ≀ V ∧ CongruentAE E (canonicalSlab V))
/-- The equality class at every interior volume, including complementation. -/
def StandardRegionAt (V : ℝ) (E : Set Torus) : Prop :=
if V ≀ 1 / 2 then SmallStandardRegion V E
else SmallStandardRegion (1 - V) Eᢜ
end CubicTorus
end
end OAI