Download data/lean/OAI/Geometry/LatticeCovering/Sections.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 27.4 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/LatticeCovering/Sections.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/LatticeCovering/Sections.lean
-
curl -L -o Sections.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/LatticeCovering/Sections.lean
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 | |