math / data /lean /OAI /Geometry /LatticeCovering /Sections.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
27.4 kB
import OAI.Geometry.LatticeCovering.Covering
namespace OAI
section
section
noncomputable section
open Set Metric MeasureTheory MeasureTheory.Measure Module
open scoped ENNReal NNReal BigOperators
noncomputable section
open Set Metric MeasureTheory MeasureTheory.Measure Module
open scoped Pointwise ENNReal NNReal BigOperators
noncomputable section
namespace SingleLatticeCovering.Sections
open Set Module MeasureTheory
open scoped BigOperators Pointwise
variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F]
lemma affine_section_of_ball_projection {D : β„•} (hD : 0 < D)
(b : Basis (Fin D) ℝ F) (hunit : βˆ€ i, β€–b iβ€– ≀ 1)
(hcoord : βˆ€ y : F, βˆ€ i, |b.repr y i| ≀ β€–yβ€–)
{K : Set (E Γ— F)} (hconv : Convex ℝ K) {R : ℝ} (hR : 0 < R)
(hproj : βˆ€ v : F, β€–vβ€– ≀ 6*(D : ℝ)*R β†’ βˆƒ x : E, (x,v) ∈ K) :
βˆƒ T : F →ᡃ[ℝ] E, βˆ€ y : F, β€–yβ€– ≀ 2*R β†’ (T y,y) ∈ K := by
classical
have hDr : (0 : ℝ) < D := by exact_mod_cast hD
let c : ℝ := 4*R*D
have hc : 0 < c := by dsimp [c]; positivity
let vβ‚€ : F := βˆ‘ i : Fin D, (-2*R) β€’ b i
let v : Fin D β†’ F := fun i => vβ‚€+c β€’ b i
have hvβ‚€ : β€–vβ‚€β€– ≀ 2*R*D := by
calc
_ ≀ βˆ‘ i : Fin D, β€–(-2*R) β€’ b iβ€– := norm_sum_le _ _
_ ≀ βˆ‘ i : Fin D, 2*R := by
apply Finset.sum_le_sum; intro i hi
rw [norm_smul,Real.norm_eq_abs,abs_mul,abs_of_nonneg hR.le]
norm_num
nlinarith [hunit i]
_ = _ := by simp; ring
have hvi : βˆ€ i, β€–v iβ€– ≀ 6*(D : ℝ)*R := by
intro i
calc
_ ≀ β€–vβ‚€β€–+β€–c β€’ b iβ€– := norm_add_le _ _
_ ≀ 2*R*D+c := add_le_add hvβ‚€ (by rw [norm_smul,Real.norm_of_nonneg hc.le]; nlinarith [hunit i])
_ = _ := by dsimp [c]; ring
obtain ⟨xβ‚€,hxβ‚€βŸ© := hproj vβ‚€ (by nlinarith)
choose x hx using fun i => hproj (v i) (hvi i)
let lam : F β†’ Fin D β†’ ℝ := fun y i => (b.repr y i+2*R)/c
let L : F β†’β‚—[ℝ] E := βˆ‘ i : Fin D, (b.coord i).smulRight (c⁻¹ β€’ (x i-xβ‚€))
let tβ‚€ : E := xβ‚€+βˆ‘ i : Fin D, (2*R/c) β€’ (x i-xβ‚€)
let T : F →ᡃ[ℝ] E := L.toAffineMap+AffineMap.const ℝ F tβ‚€
have hT : βˆ€ y, T y=xβ‚€+βˆ‘ i : Fin D, lam y i β€’ (x i-xβ‚€) := by
intro y
dsimp [T,L,tβ‚€,lam]
simp only [ LinearMap.sum_apply,LinearMap.smulRight_apply,Basis.coord_apply,smul_smul]
rw [add_comm _ (xβ‚€+_),add_assoc]; congr 1
rw [←Finset.sum_add_distrib]
apply Finset.sum_congr rfl; intro i hi
rw [←add_smul]
congr 1; field_simp; ring
refine ⟨T,fun y hy => ?_⟩
have hlam0 : βˆ€ i, 0 ≀ lam y i := by
intro i
have hh := (abs_le.mp ((hcoord y i).trans hy)).1
exact div_nonneg (by linarith) hc.le
have hlamsum : βˆ‘ i : Fin D, lam y i ≀ 1 := by
calc
_ ≀ βˆ‘ i : Fin D, 4*R/c := by
apply Finset.sum_le_sum; intro i hi
apply div_le_div_of_nonneg_right _ hc.le
have hh := (abs_le.mp ((hcoord y i).trans hy)).2
linarith
_ = 1 := by simp [c]; field_simp
let w : Option (Fin D) β†’ ℝ := fun o => o.elim (1-βˆ‘ i,lam y i) (lam y)
let z : Option (Fin D) β†’ E Γ— F := fun o => o.elim (xβ‚€,vβ‚€) (fun i => (x i,v i))
have hw0 : βˆ€ o ∈ (Finset.univ : Finset (Option (Fin D))), 0 ≀ w o := by
intro o ho; cases o with
| none => exact sub_nonneg.mpr hlamsum
| some i => exact hlam0 i
have hw1 : βˆ‘ o : Option (Fin D), w o=1 := by simp [w,Fintype.sum_option]
have hz : βˆ€ o ∈ (Finset.univ : Finset (Option (Fin D))), z o ∈ K := by
intro o ho; cases o with
| none => exact hxβ‚€
| some i => exact hx i
have hmem := hconv.sum_mem hw0 hw1 hz
have he : βˆ‘ o : Option (Fin D), w o β€’ z o=(T y,y) := by
rw [Fintype.sum_option]
dsimp only [w,z,Option.elim]
apply Prod.ext
Β· simp only [Prod.fst_add,Prod.fst_sum,Prod.smul_fst]
change (1-βˆ‘ i,lam y i) β€’ xβ‚€+βˆ‘ i,lam y i β€’ x i=T y
rw [hT]
simp only [smul_sub,Finset.sum_sub_distrib,←Finset.sum_smul]
module
Β· simp only [Prod.snd_add,Prod.snd_sum,Prod.smul_snd]
change (1-βˆ‘ i,lam y i) β€’ vβ‚€+βˆ‘ i,lam y i β€’ v i=y
dsimp only [v]
simp only [smul_add,smul_smul,Finset.sum_add_distrib,←Finset.sum_smul]
have hh : βˆ€ i, lam y i*c=b.repr y i+2*R := by intro i; dsimp [lam]; field_simp
simp_rw [hh,add_smul]
rw [Finset.sum_add_distrib,b.sum_repr]
have hsum : vβ‚€+(βˆ‘ i : Fin D, (2*R) β€’ b i)=0 := by
dsimp only [vβ‚€]
rw [←Finset.sum_add_distrib]
simp only [←add_smul,neg_mul,neg_add_cancel,zero_smul,Finset.sum_const_zero]
calc
_ = y+(vβ‚€+βˆ‘ i : Fin D, (2*R) β€’ b i) := by module
_ = y := by rw [hsum,add_zero]
rwa [he] at hmem
end SingleLatticeCovering.Sections
noncomputable section
namespace SingleLatticeCovering.Sections
open Set Metric MeasureTheory MeasureTheory.Measure Module
open scoped Pointwise ENNReal NNReal BigOperators
variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F]
[FiniteDimensional ℝ E] [FiniteDimensional ℝ F]
[MeasurableSpace E] [BorelSpace E] [MeasurableSpace F] [BorelSpace F]
def gaussian (F : Type*) [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F]
(y : F) : ℝ := (Real.sqrt (2*Real.pi))^(-(finrank ℝ F : β„€))*Real.exp (-β€–yβ€–^2/2)
lemma gaussian_pos {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] [MeasurableSpace F] [BorelSpace F] (y : F) : 0 < gaussian F y := by
dsimp [gaussian]
exact mul_pos (zpow_pos (Real.sqrt_pos.mpr (by positivity)) _) (Real.exp_pos _)
lemma gaussian_near {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] [MeasurableSpace F] [BorelSpace F] {R : ℝ} (hR : 0 ≀ R) {m : β„•} (hm : 0 < m)
{a y : F} (ha : β€–aβ€– ≀ R) (hy : β€–yβ€– ≀ R)
(hya : dist y a ≀ R/(m : ℝ)^2) (hsmall : R^2/(m : ℝ)^2 ≀ 1) :
Real.exp (-1)*gaussian F y ≀ gaussian F a ∧
gaussian F a ≀ Real.exp 1*gaussian F y := by
have hm0 : (0 : ℝ) < m := by exact_mod_cast hm
have hdist : |β€–aβ€–-β€–yβ€–| ≀ R/(m : ℝ)^2 :=
(abs_norm_sub_norm_le a y).trans (by simpa only [dist_comm,dist_eq_norm] using hya)
have hsq : |β€–aβ€–^2-β€–yβ€–^2| ≀ 2 := by
have he : β€–aβ€–^2-β€–yβ€–^2=(β€–aβ€–-β€–yβ€–)*(β€–aβ€–+β€–yβ€–) := by ring
rw [he,abs_mul,abs_of_nonneg (add_nonneg (norm_nonneg _) (norm_nonneg _))]
calc
_ ≀ (R/(m : ℝ)^2)*(2*R) := mul_le_mul hdist (by linarith) (by positivity) (by positivity)
_ = 2*(R^2/(m : ℝ)^2) := by ring
_ ≀ 2 := by linarith
have hp := abs_le.mp hsq
have hlow : -1+-β€–yβ€–^2/2 ≀ -β€–aβ€–^2/2 := by linarith
have hupp : -β€–aβ€–^2/2 ≀ 1+-β€–yβ€–^2/2 := by linarith
have hb : 0 ≀ (Real.sqrt (2*Real.pi))^(-(finrank ℝ F : β„€)) := by positivity
constructor
Β· have hh := mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hlow) hb
simpa only [Real.exp_add,gaussian,mul_left_comm] using hh
Β· have hh := mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hupp) hb
simpa only [Real.exp_add,gaussian,mul_left_comm] using hh
theorem finite_section_labels
(ΞΌ : Measure E) [IsAddHaarMeasure ΞΌ] (Ξ½ : Measure F) [IsAddHaarMeasure Ξ½]
{K : Set (E Γ— F)} (hK : IsCompact K) (hconv : Convex ℝ K)
{R V : ℝ} (hR : 0 < R) (hV : 0 < V) (hm : 2 ≀ finrank ℝ E)
(hcenter : βˆ€ z : F, β€–zβ€– ≀ 2*R β†’ (0,z) ∈ K)
(hlower : βˆ€ y : F, β€–yβ€– ≀ R β†’ V*gaussian F y/2 ≀ (ΞΌ (fiber K y)).toReal)
(hsmall : R^2/(finrank ℝ E : ℝ)^2 ≀ 1) :
βˆƒ S : Finset F, (S.card : ℝ) ≀ (3*(finrank ℝ E : ℝ)^2)^(finrank ℝ F) ∧
βˆƒ J : F β†’ Set E, (βˆ€ a ∈ S, IsCompact (J a) ∧ Convex ℝ (J a) ∧ (0 : E) ∈ J a ∧
(μ (J a)).toReal=V*gaussian F a/8) ∧
βˆ€ y : F, β€–yβ€– ≀ R β†’ βˆƒ a ∈ S, J a βŠ† fiber K y ∧
(Real.exp (-1)/8)*V*gaussian F y ≀ (ΞΌ (J a)).toReal ∧
(ΞΌ (J a)).toReal ≀ (Real.exp 1/8)*V*gaussian F y := by
classical
obtain ⟨S,hSc,hSn,hnet⟩ := ball_finite_net Ξ½ hR (show 1 ≀ finrank ℝ E by omega)
let d : ℝ := 1-(finrank ℝ E : ℝ)^(-2 : β„€)
have hn2 : (2 : ℝ) ≀ finrank ℝ E := by exact_mod_cast hm
have hd : 0 ≀ d := by
dsimp [d]; norm_num only [zpow_neg, zpow_ofNat]
have hh : 1 ≀ (finrank ℝ E : ℝ)^2 := by nlinarith
exact sub_nonneg.mpr ((inv_le_oneβ‚€ (by positivity)).mpr hh)
have hdata : βˆ€ a ∈ S, βˆƒ Ja : Set E, IsCompact Ja ∧ Convex ℝ Ja ∧ (0 : E) ∈ Ja ∧
Ja βŠ† d β€’ fiber K a ∧ (ΞΌ Ja).toReal=V*gaussian F a/8 := by
intro a ha
have haR := hSn a ha
have hzero : (0 : E) ∈ fiber K a := hcenter a (by linarith)
have hzero' : (0 : E) ∈ d β€’ fiber K a := ⟨0,hzero,smul_zero _⟩
apply prescribed_volume ΞΌ (by omega) ((fiber_compact hK a).smul d) ((fiber_convex hconv a).smul d) hzero'
(by positivity [gaussian_pos a])
rw [ΞΌ.addHaar_smul_of_nonneg hd,ENNReal.toReal_mul,ENNReal.toReal_ofReal (pow_nonneg hd _)]
have hh := shrink_power_half hm
have hv := hlower a haR
have hgp := gaussian_pos a
have hhalf : (1/2 : ℝ)*(V*gaussian F a/2) ≀ d^finrank ℝ E*(ΞΌ (fiber K a)).toReal :=
mul_le_mul hh hv (by positivity) (pow_nonneg hd _)
nlinarith
have hex : βˆ€ a : F, βˆƒ Ja : Set E, a ∈ S β†’ IsCompact Ja ∧ Convex ℝ Ja ∧ (0 : E) ∈ Ja ∧
Ja βŠ† d β€’ fiber K a ∧ (ΞΌ Ja).toReal=V*gaussian F a/8 := by
intro a
by_cases ha : a ∈ S
· exact ⟨(hdata a ha).choose,fun _ => (hdata a ha).choose_spec⟩
Β· exact βŸ¨βˆ…,fun hh => (ha hh).elim⟩
choose J hJ using hex
refine ⟨S,hSc,J,?_,?_⟩
· intro a ha; exact ⟨(hJ a ha).1,(hJ a ha).2.1,(hJ a ha).2.2.1,(hJ a ha).2.2.2.2⟩
Β· intro y hy
obtain ⟨a,ha,hya⟩ := hnet y hy
have hsub := nearby_fiber_inclusion hconv hR.le (show 1 ≀ finrank ℝ E by omega) hcenter (hSn a ha) hya
have hg := gaussian_near hR.le (show 0 < finrank ℝ E by omega) (hSn a ha) hy hya hsmall
refine ⟨a,ha,(hJ a ha).2.2.2.1.trans hsub,?_,?_⟩ <;>
rw [(hJ a ha).2.2.2.2]
Β· nlinarith [mul_le_mul_of_nonneg_left hg.1 hV.le]
Β· nlinarith [mul_le_mul_of_nonneg_left hg.2 hV.le]
end SingleLatticeCovering.Sections
noncomputable section
namespace SingleLatticeCovering.Sections
open Set MeasureTheory MeasureTheory.Measure Module
open scoped Pointwise ENNReal BigOperators
variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F]
def sectionShear (T : F →ᡃ[ℝ] E) : (E Γ— F) ≃ᡃ[ℝ] (E Γ— F) :=
AffineEquiv.ofBijective (Ο† := ((AffineMap.fst : (E Γ— F) →ᡃ[ℝ] E)-T.comp AffineMap.snd).prod
AffineMap.snd) (by
constructor
· rintro ⟨x,y⟩ ⟨x',y'⟩ h
have hy : y=y' := congrArg Prod.snd h
subst y'
have hx : x-T y=x'-T y := congrArg Prod.fst h
exact Prod.ext (by simpa using congrArg (fun z => z+T y) hx) rfl
· rintro ⟨x,y⟩
refine ⟨(x+T y,y),?_⟩
change (x+T y-T y,y)=(x,y)
simp)
@[simp] lemma sectionShear_apply (T : F →ᡃ[ℝ] E) (x : E) (y : F) :
sectionShear T (x,y)=(x-T y,y) := rfl
lemma fiber_sectionShear (T : F →ᡃ[ℝ] E) (K : Set (E Γ— F)) (y : F) :
fiber (sectionShear T '' K) y=(fun x => x-T y) '' fiber K y := by
ext x; constructor
· rintro ⟨⟨u,v⟩,hK,he⟩
have hv : v=y := congrArg Prod.snd he
subst v
exact ⟨u,hK,congrArg Prod.fst he⟩
· rintro ⟨u,hu,rfl⟩
exact ⟨(u,y),hu,rfl⟩
variable [FiniteDimensional ℝ E] [FiniteDimensional ℝ F]
[MeasurableSpace E] [BorelSpace E] [MeasurableSpace F] [BorelSpace F]
lemma fiber_sectionShear_measure {E : Type*} {F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ E] [FiniteDimensional ℝ F] [MeasurableSpace E] [BorelSpace E] [MeasurableSpace F] [BorelSpace F] (ΞΌ : Measure E) [IsAddHaarMeasure ΞΌ]
(T : F →ᡃ[ℝ] E) (K : Set (E Γ— F)) (y : F) :
ΞΌ (fiber (sectionShear T '' K) y)=ΞΌ (fiber K y) := by
rw [fiber_sectionShear]
simp only [sub_eq_add_neg,Set.image_add_right,measure_preimage_add_right]
lemma sectionShear_measure (ΞΌ : Measure E) [IsAddHaarMeasure ΞΌ]
(Ξ½ : Measure F) [IsAddHaarMeasure Ξ½]
(T : F →ᡃ[ℝ] E) {K : Set (E Γ— F)} (hK : IsCompact K) :
(ΞΌ.prod Ξ½) (sectionShear T '' K)=(ΞΌ.prod Ξ½) K := by
have hc := (sectionShear T).toAffineMap.continuous_of_finiteDimensional
have hK' : IsCompact (sectionShear T '' K) := hK.image hc
rw [Measure.prod_apply_symm hK'.measurableSet,Measure.prod_apply_symm hK.measurableSet]
apply lintegral_congr
intro y
exact fiber_sectionShear_measure ΞΌ T K y
lemma convex_interior_of_measure_pos (ΞΌ : Measure E) [IsAddHaarMeasure ΞΌ]
{J : Set E} (hconv : Convex ℝ J) (hpos : 0 < (ΞΌ J).toReal) :
(interior J).Nonempty := by
apply hconv.interior_nonempty_iff_affineSpan_eq_top.mpr
by_contra h
have hn : ΞΌ J=0 := measure_mono_null (subset_affineSpan ℝ J) (ΞΌ.addHaar_affineSubspace _ h)
rw [hn,ENNReal.toReal_zero] at hpos
exact (lt_irrefl 0) hpos
theorem centered_affine_image {D : β„•} (hD : 0 < D)
(b : Basis (Fin D) ℝ F) (hunit : βˆ€ i, β€–b iβ€– ≀ 1)
(hcoord : βˆ€ y : F, βˆ€ i, |b.repr y i| ≀ β€–yβ€–)
(ΞΌ : Measure E) [IsAddHaarMeasure ΞΌ] (Ξ½ : Measure F) [IsAddHaarMeasure Ξ½]
{K : Set (E Γ— F)} (hK : IsCompact K) (hconv : Convex ℝ K)
{R : ℝ} (hR : 0 < R)
(hproj : βˆ€ v : F, β€–vβ€– ≀ 6*(D : ℝ)*R β†’ βˆƒ x : E, (x,v) ∈ K) :
βˆƒ e : (E Γ— F) ≃ᡃ[ℝ] (E Γ— F), IsCompact (e '' K) ∧ Convex ℝ (e '' K) ∧
(μ.prod ν) (e '' K)=(μ.prod ν) K ∧
(βˆ€ y, ΞΌ (fiber (e '' K) y)=ΞΌ (fiber K y)) ∧
(βˆ€ y : F, β€–yβ€– ≀ 2*R β†’ (0,y) ∈ e '' K) := by
obtain ⟨T,hT⟩ := affine_section_of_ball_projection hD b hunit hcoord hconv hR hproj
refine ⟨sectionShear T,hK.image (sectionShear T).toAffineMap.continuous_of_finiteDimensional,
hconv.affine_image (sectionShear T).toAffineMap,
sectionShear_measure μ ν T hK,fun y => fiber_sectionShear_measure μ T K y,?_⟩
intro y hy
refine ⟨(T y,y),hT y hy,?_⟩
simp
end SingleLatticeCovering.Sections
noncomputable section
namespace SingleLatticeCovering.Sections
open Set MeasureTheory MeasureTheory.Measure Filter Topology
open scoped ENNReal
variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F]
lemma eventually_fiber_subset {E : Type*} {F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {K : Set (E Γ— F)} (hK : IsCompact K)
{y : F} {U : Set E} (hU : IsOpen U) (hyU : fiber K y βŠ† U) :
βˆ€αΆ  z in 𝓝 y, fiber K z βŠ† U := by
let A : Set F := Prod.snd '' (K ∩ Prod.fst ⁻¹' Uᢜ)
have hA : IsClosed A := ((hK.inter_right (hU.isClosed_compl.preimage continuous_fst)).image continuous_snd).isClosed
have hy : y ∈ Aᢜ := by
rintro ⟨⟨x,z⟩,⟨hx,hxU⟩,he⟩
change z=y at he
subst z
exact hxU (hyU hx)
filter_upwards [hA.isOpen_compl.mem_nhds hy] with z hz
intro x hx
by_contra hxU
exact hz ⟨(x,z),⟨hx,hxU⟩,rfl⟩
lemma upperSemicontinuous_fiber_measure [MeasurableSpace E] [BorelSpace E]
(ΞΌ : Measure E) [OuterRegular ΞΌ] {K : Set (E Γ— F)} (hK : IsCompact K) :
UpperSemicontinuous (fun y : F => ΞΌ (fiber K y)) := by
intro y r hyr
obtain ⟨U,hfU,hU,hμU⟩ := (fiber K y).exists_isOpen_lt_of_lt r hyr
filter_upwards [eventually_fiber_subset hK hU hfU] with z hz
exact (measure_mono hz).trans_lt hΞΌU
lemma lower_bound_everywhere_of_ae {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] [MeasurableSpace F] [BorelSpace F]
(Ξ½ : Measure F) [IsOpenPosMeasure Ξ½]
{f g : F β†’ ℝβ‰₯0∞} (hf : UpperSemicontinuous f) (hg : Continuous g)
{U : Set F} (hU : IsOpen U) (hae : βˆ€α΅ y βˆ‚Ξ½, y ∈ U β†’ g y ≀ f y) :
βˆ€ y ∈ U, g y ≀ f y := by
intro y hy
by_contra h
have hfg : f y < g y := lt_of_not_ge h
obtain ⟨q,hfq,hqg⟩ := exists_between hfg
let V := U ∩ (f ⁻¹' Iio q) ∩ (g ⁻¹' Ioi q)
have hV : IsOpen V := (hU.inter (hf.isOpen_preimage q)).inter (isOpen_Ioi.preimage hg)
have hyV : y ∈ V := ⟨⟨hy,hfq⟩,hqg⟩
obtain ⟨z,hz,hzV⟩ := (ν.dense_of_ae hae).exists_mem_open hV ⟨y,hyV⟩
exact (not_lt_of_ge (hz hzV.1.1)) (hzV.1.2.trans hzV.2)
theorem canonical_marginal_lower [MeasurableSpace E] [BorelSpace E]
[MeasurableSpace F] [BorelSpace F]
(ΞΌ : Measure E) [OuterRegular ΞΌ] (Ξ½ : Measure F) [IsOpenPosMeasure Ξ½]
{K : Set (E Γ— F)} (hK : IsCompact K) {g : F β†’ ℝβ‰₯0∞} (hg : Continuous g)
{S : ℝ} (hae : βˆ€α΅ y βˆ‚Ξ½, β€–yβ€– < S β†’ g y ≀ ΞΌ (fiber K y)) :
βˆ€ y : F, β€–yβ€– < S β†’ g y ≀ ΞΌ (fiber K y) := by
exact lower_bound_everywhere_of_ae Ξ½ (upperSemicontinuous_fiber_measure ΞΌ hK) hg
(isOpen_lt continuous_norm continuous_const) hae
end SingleLatticeCovering.Sections
noncomputable section
namespace SingleLatticeCovering.Sections
open Set Metric MeasureTheory MeasureTheory.Measure Module
open scoped Pointwise ENNReal BigOperators
variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F]
[FiniteDimensional ℝ E] [FiniteDimensional ℝ F]
[MeasurableSpace E] [BorelSpace E] [MeasurableSpace F] [BorelSpace F]
theorem gaussian_marginal_to_sections {D : β„•} (hD : 0 < D)
(b : Basis (Fin D) ℝ F) (hunit : βˆ€ i, β€–b iβ€– ≀ 1)
(hcoord : βˆ€ y : F, βˆ€ i, |b.repr y i| ≀ β€–yβ€–)
(ΞΌ : Measure E) [IsAddHaarMeasure ΞΌ] (Ξ½ : Measure F) [IsAddHaarMeasure Ξ½]
{K : Set (E Γ— F)} (hK : IsCompact K) (hconv : Convex ℝ K)
{R : ℝ} (hR : 0 < R) (hV : 0 < ((ΞΌ.prod Ξ½) K).toReal)
(hm : 2 ≀ finrank ℝ E)
(hlower : βˆ€ y : F, β€–yβ€– ≀ 6*(D : ℝ)*R β†’
((ΞΌ.prod Ξ½) K).toReal*gaussian F y/2 ≀ (ΞΌ (fiber K y)).toReal)
(hsmall : R^2/(finrank ℝ E : ℝ)^2 ≀ 1) :
βˆƒ e : (E Γ— F) ≃ᡃ[ℝ] (E Γ— F), IsCompact (e '' K) ∧ Convex ℝ (e '' K) ∧
(μ.prod ν) (e '' K)=(μ.prod ν) K ∧
βˆƒ S : Finset F, (S.card : ℝ) ≀ (3*(finrank ℝ E : ℝ)^2)^D ∧
βˆƒ J : F β†’ Set E,
(βˆ€ a ∈ S, IsCompact (J a) ∧ Convex ℝ (J a) ∧ (interior (J a)).Nonempty) ∧
βˆ€ y : F, β€–yβ€– ≀ R β†’ βˆƒ a ∈ S, J a βŠ† fiber (e '' K) y ∧
(Real.exp (-1)/8)*((ΞΌ.prod Ξ½) (e '' K)).toReal*gaussian F y ≀ (ΞΌ (J a)).toReal ∧
(ΞΌ (J a)).toReal ≀ (Real.exp 1/8)*((ΞΌ.prod Ξ½) (e '' K)).toReal*gaussian F y := by
have hDr : (1 : ℝ) ≀ D := by exact_mod_cast (show 1 ≀ D by omega)
obtain ⟨e,heK,heconv,heμ,hef,hezero⟩ := centered_affine_image hD b hunit hcoord μ ν hK hconv hR (by
intro y hy
have hp : 0 < (ΞΌ (fiber K y)).toReal := (by positivity [gaussian_pos y] :
0 < ((ΞΌ.prod Ξ½) K).toReal*gaussian F y/2).trans_le (hlower y hy)
by_contra hn
push Not at hn
have hempty : fiber K y=βˆ… := Set.eq_empty_iff_forall_notMem.mpr hn
rw [hempty,measure_empty,ENNReal.toReal_zero] at hp
exact (lt_irrefl 0) hp)
obtain ⟨S,hSc,J,hJ,hlabels⟩ := finite_section_labels μ ν heK heconv hR hV hm hezero (by
intro y hy
rw [hef]
exact hlower y (hy.trans (by nlinarith))) hsmall
have hdim : finrank ℝ F=D := by simpa using Module.finrank_eq_card_basis b
refine ⟨e,heK,heconv,heμ,S,by simpa only [hdim] using hSc,J,?_,?_⟩
Β· intro a ha
refine ⟨(hJ a ha).1,(hJ a ha).2.1,convex_interior_of_measure_pos μ (hJ a ha).2.1 ?_⟩
rw [(hJ a ha).2.2.2]
positivity [gaussian_pos a]
Β· intro y hy
simpa only [heΞΌ] using hlabels y hy
end SingleLatticeCovering.Sections
end
end
end
end
end
end
end
end
section
noncomputable section
namespace SingleLatticeCovering.Sections
open MeasureTheory
open scoped BigOperators
lemma gaussian_toLp {D : β„•} (y : Fin D β†’ ℝ) :
gaussian (EuclideanSpace ℝ (Fin D)) (WithLp.toLp 2 y)=Folded.gamma y := by
classical
unfold gaussian Folded.gamma Folded.gamma1
rw [finrank_euclideanSpace_fin,EuclideanSpace.real_norm_sq_eq]
rw [Finset.prod_div_distrib,Finset.prod_const,Finset.card_univ,Fintype.card_fin]
rw [← Real.exp_sum,zpow_neg,zpow_natCast]
rw [div_eq_mul_inv,mul_comm]
congr 2
simp only [div_eq_mul_inv,Finset.sum_mul,Finset.sum_neg_distrib,neg_mul]
end SingleLatticeCovering.Sections
end
end
section
noncomputable section
namespace SingleLatticeCovering.Sections
open MeasureTheory LatticeGeometry
open scoped BigOperators
lemma appendEquiv_measurePreserving (m D : β„•) :
MeasurePreserving (appendEquiv m D)
((volume : Measure (Fin m β†’ ℝ)).prod (volume : Measure (Fin D β†’ ℝ))) volume := by
have h := (volume_preserving_arrowCongr' (finSumFinEquiv (m := m) (n := D))
(MeasurableEquiv.refl ℝ) (MeasurePreserving.id volume)).comp
(volume_measurePreserving_sumPiEquivProdPi_symm (fun _ : Fin m βŠ• Fin D => ℝ))
have he : (fun t : (Fin m β†’ ℝ) Γ— (Fin D β†’ ℝ) =>
(MeasurableEquiv.arrowCongr' finSumFinEquiv (MeasurableEquiv.refl ℝ))
((MeasurableEquiv.sumPiEquivProdPi (fun _ : Fin m βŠ• Fin D => ℝ)).symm t))=
appendEquiv m D := by
funext t i
refine Fin.addCases ?_ ?_ i <;> intro j <;>
simp [MeasurableEquiv.arrowCongr',MeasurableEquiv.sumPiEquivProdPi,
Equiv.arrowCongr',appendEquiv,Fin.appendEquiv]
exact he β–Έ h
def flatten (m D : β„•) : ((Fin m β†’ ℝ) Γ— EuclideanSpace ℝ (Fin D)) ≃ₗ[ℝ] (Fin (m+D) β†’ ℝ) :=
((LinearEquiv.refl ℝ (Fin m β†’ ℝ)).prodCongr (WithLp.linearEquiv 2 ℝ (Fin D β†’ ℝ))).trans
(appendEquiv m D)
@[simp] lemma flatten_apply (m D : β„•) (x : Fin m β†’ ℝ) (y : EuclideanSpace ℝ (Fin D)) :
flatten m D (x,y)=Fin.append x (WithLp.ofLp y) := rfl
lemma flatten_measurePreserving (m D : β„•) :
MeasurePreserving (flatten m D) volume volume :=
(appendEquiv_measurePreserving m D).comp
((MeasurePreserving.id (volume : Measure (Fin m β†’ ℝ))).prod
(PiLp.volume_preserving_ofLp (Fin D)))
lemma flatten_volume (m D : β„•) {K : Set ((Fin m β†’ ℝ) Γ— EuclideanSpace ℝ (Fin D))}
(hK : IsCompact K) : volume (flatten m D '' K)=volume K := by
have h := (flatten_measurePreserving m D).measure_preimage
((hK.image (flatten m D).toContinuousLinearEquiv.continuous).measurableSet.nullMeasurableSet)
change volume ((flatten m D) ⁻¹' ((flatten m D) '' K))=volume ((flatten m D) '' K) at h
rw [(flatten m D).injective.preimage_image] at h
exact h.symm
end SingleLatticeCovering.Sections
end
end
section
noncomputable section
namespace SingleLatticeCovering.Sections
open MeasureTheory Set
open scoped BigOperators
def coordinateFiber {m D : β„•} (K : Set (Fin (m+D) β†’ ℝ)) (y : Fin D β†’ ℝ) :
Set (Fin m β†’ ℝ) := {x | Fin.append x y ∈ K}
lemma flatten_fiber {m D : β„•} (K : Set (Fin (m+D) β†’ ℝ)) (y : EuclideanSpace ℝ (Fin D)) :
fiber ((flatten m D).symm '' K) y=coordinateFiber K (WithLp.ofLp y) := by
ext x
change (x,y) ∈ (flatten m D).symm '' K ↔ _
constructor
· rintro ⟨z,hz,hzxy⟩
change flatten m D (x,y) ∈ K
rw [←hzxy,(flatten m D).apply_symm_apply]
exact hz
Β· intro hx
exact ⟨flatten m D (x,y),hx,(flatten m D).symm_apply_apply _⟩
theorem coordinate_marginal_to_labels {m D : β„•} (hm : 2 ≀ m) (hD : 0 < D)
{K : Set (Fin (m+D) β†’ ℝ)} (hK : IsCompact K) (hconv : Convex ℝ K)
(hV : 0 < (volume K).toReal) {R : ℝ} (hR : 0 < R)
(hsmall : R^2/(m : ℝ)^2 ≀ 1)
(hlower : βˆ€ y : Fin D β†’ ℝ, β€–WithLp.toLp 2 yβ€– ≀ 6*(D : ℝ)*R β†’
(volume K).toReal*Folded.gamma y/2 ≀ (volume (coordinateFiber K y)).toReal) :
βˆƒ e : (Fin (m+D) β†’ ℝ) ≃ᡃ[ℝ] (Fin (m+D) β†’ ℝ),
IsCompact (e '' K) ∧ Convex ℝ (e '' K) ∧ volume (e '' K)=volume K ∧
βˆƒ S : Finset (EuclideanSpace ℝ (Fin D)), (S.card : ℝ) ≀ (3*(m : ℝ)^2)^D ∧
βˆƒ J : EuclideanSpace ℝ (Fin D) β†’ Set (Fin m β†’ ℝ),
(βˆ€ a ∈ S, IsCompact (J a) ∧ Convex ℝ (J a) ∧ (interior (J a)).Nonempty) ∧
βˆ€ y : Fin D β†’ ℝ, (βˆ‘ j, (y j)^2) ≀ R^2 β†’ βˆƒ a ∈ S,
(βˆ€ x ∈ J a, Fin.append x y ∈ e '' K) ∧
(Real.exp (-1)/8)*(volume (e '' K)).toReal*Folded.gamma y ≀ (volume (J a)).toReal ∧
(volume (J a)).toReal ≀ (Real.exp 1/8)*(volume (e '' K)).toReal*Folded.gamma y := by
let f := flatten m D
let Kp : Set ((Fin m β†’ ℝ) Γ— EuclideanSpace ℝ (Fin D)) := f.symm '' K
have hKp : IsCompact Kp := hK.image f.symm.toContinuousLinearEquiv.continuous
have hconvp : Convex ℝ Kp := hconv.linear_image f.symm.toLinearMap
have hflat : f '' Kp=K := by dsimp [Kp]; exact f.image_symm_image K
have hvolp : volume Kp=volume K := by rw [←flatten_volume m D hKp]; exact congrArg volume hflat
let b := EuclideanSpace.basisFun (Fin D) ℝ
have hunit : βˆ€ i, β€–b.toBasis iβ€– ≀ 1 := by intro i; exact (b.orthonormal.1 i).le
have hcoord : βˆ€ y : EuclideanSpace ℝ (Fin D), βˆ€ i, |b.toBasis.repr y i| ≀ β€–yβ€– := by
intro y i
rw [OrthonormalBasis.coe_toBasis_repr_apply]
simpa only [Real.norm_eq_abs,b,EuclideanSpace.basisFun_repr] using PiLp.norm_apply_le y i
obtain ⟨e,heK,heconv,hevol,S,hSc,J,hJ,hlabels⟩ := gaussian_marginal_to_sections hD b.toBasis hunit hcoord
(volume : Measure (Fin m β†’ ℝ)) (volume : Measure (EuclideanSpace ℝ (Fin D))) hKp hconvp hR
(by simpa only [←Measure.volume_eq_prod,hvolp] using hV)
(by simpa using hm) (by
intro y hy
have hh := hlower y.ofLp (by simpa using hy)
simpa only [←Measure.volume_eq_prod,hvolp,Kp,f,flatten_fiber,←gaussian_toLp,WithLp.toLp_ofLp] using hh)
(by simpa using hsmall)
let e' : (Fin (m+D) β†’ ℝ) ≃ᡃ[ℝ] (Fin (m+D) β†’ ℝ) :=
(f.symm.toAffineEquiv.trans e).trans f.toAffineEquiv
have he'image : e' '' K=f '' (e '' Kp) := by
change (fun x => f (e (f.symm x))) '' K = _
simp only [Kp,Set.image_image]
have hevol' : volume (e '' Kp)=volume Kp := by simpa only [←Measure.volume_eq_prod] using hevol
have he'vol : volume (e' '' K)=volume K := by
rw [he'image,flatten_volume m D heK]
exact hevol'.trans hvolp
refine ⟨e',?_,?_,he'vol,S,?_,J,hJ,?_⟩
Β· rw [he'image]; exact heK.image f.toContinuousLinearEquiv.continuous
Β· rw [he'image]; exact heconv.linear_image f.toLinearMap
Β· simpa using hSc
Β· intro y hy
have hynorm : β€–WithLp.toLp 2 yβ€– ≀ R := by
apply (sq_le_sqβ‚€ (norm_nonneg _) hR.le).mp
simpa only [EuclideanSpace.real_norm_sq_eq] using hy
obtain ⟨a,ha,hsub,hl,hu⟩ := hlabels (WithLp.toLp 2 y) hynorm
refine ⟨a,ha,?_,?_,?_⟩
Β· intro x hx
rw [he'image]
exact ⟨(x,WithLp.toLp 2 y),hsub hx,rfl⟩
Β· rw [←gaussian_toLp,he'vol,←hvolp]
simpa only [←Measure.volume_eq_prod,hevol'] using hl
Β· rw [←gaussian_toLp,he'vol,←hvolp]
simpa only [←Measure.volume_eq_prod,hevol'] using hu
end SingleLatticeCovering.Sections
end
end
section
noncomputable section
open Real Filter Topology Asymptotics
end
end
end
end OAI