Download data/lean/OAI/Probability/LatticeSurface/Geometry/BlockEdgeGeometry.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.76 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Geometry/BlockEdgeGeometry.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/LatticeSurface/Geometry/BlockEdgeGeometry.lean
-
curl -L -o BlockEdgeGeometry.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Geometry/BlockEdgeGeometry.lean
8.76 kB
| import Mathlib | |
| import OAI.Probability.LatticeSurface.Convexity.RadialExposure | |
| import OAI.Probability.LatticeSurface.Geometry.BlockFacetGeometry | |
| import OAI.Probability.LatticeSurface.Geometry.BlockVolume | |
| import OAI.Probability.LatticeSurface.Geometry.EdgeCoordinates | |
| import OAI.Probability.LatticeSurface.Geometry.FacetExposure | |
| import OAI.Probability.LatticeSurface.Geometry.TriangularCover | |
| import OAI.Probability.LatticeSurface.Geometry.TriangularGeometry | |
| namespace OAI | |
| open MeasureTheory | |
| open scoped ENNReal | |
| noncomputable section | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| namespace FacetExposure | |
| end FacetExposure | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| open MeasureTheory Set | |
| open scoped ENNReal | |
| noncomputable section | |
| namespace EdgeCoordinates | |
| end EdgeCoordinates | |
| namespace EdgeCoordinates | |
| end EdgeCoordinates | |
| namespace EdgeCoordinates | |
| end EdgeCoordinates | |
| namespace TriangularLipschitz | |
| noncomputable def edgeOffset (L : β) (Ο : β) (s : Vertex β β) (x : Vertex) : β := | |
| if x β interior L then 0 else Ο*s x | |
| lemma exists_filling_edge_coordinates {L n : β} | |
| (e : {x : Vertex // x β interior L} β Fin (n+1)) | |
| {x y : Vertex} (hy : y β interior L) (hxy : x β y) {Ο : β} (hΟ : |Ο|=1) : | |
| β E : Filling L ββ[β] (Fin (n+1) β β), | |
| MeasurePreserving E β§ (β z, βE.symm zβ β€ 2*βzβ) β§ | |
| β s a, E a 0 = Ο*(filledHeight L s a y-filledHeight L s a x)+edgeOffset L Ο s x := by | |
| classical | |
| by_cases hx : x β interior L | |
| Β· obtain β¨E,hE,hEn,hE0β© := EdgeCoordinates.exists_edge_coordinates e β¨y,hyβ© | |
| (some β¨x,hxβ©) Ο hΟ (by intro i hi he; cases hi; exact hxy (congrArg Subtype.val he)) | |
| refine β¨E,hE,hEn,?_β© | |
| intro s a | |
| simpa [filledHeight,edgeOffset,hx,hy] using hE0 a | |
| Β· obtain β¨E,hE,hEn,hE0β© := EdgeCoordinates.exists_edge_coordinates e β¨y,hyβ© | |
| none Ο hΟ (by simp) | |
| refine β¨E,hE,hEn,?_β© | |
| intro s a | |
| simp only [hE0,Option.elim_none,sub_zero,filledHeight,dite_eq_left hy,dite_eq_right hx,edgeOffset,ite_eq_right hx] | |
| ring | |
| lemma filling_projection_width {L n : β} {x y : Vertex} {Ο : β} (s : Vertex β β) | |
| (hΟ : |Ο|=1) (hx : x β box L) (hy : y β box L) (hxy : Adj x y) | |
| (E : Filling L ββ[β] (Fin (n+1) β β)) | |
| (hE0 : β s a, E a 0 = Ο*(filledHeight L s a y-filledHeight L s a x)+edgeOffset L Ο s x) : | |
| β z β E '' fillingPolytope L s, | |
| z 0 β Set.Icc (1+edgeOffset L Ο s x-2) (1+edgeOffset L Ο s x) := by | |
| rintro z β¨a,ha,rflβ© | |
| rw [hE0] | |
| have h := ha x hx y hy hxy | |
| have h' : |Ο*(filledHeight L s a y-filledHeight L s a x)| β€ 1 := by | |
| rw [abs_mul,hΟ,one_mul,abs_sub_comm]; exact h | |
| obtain β¨hβ,hββ© := abs_le.mp h' | |
| exact β¨by linarith,by linarithβ© | |
| lemma filling_facet_ball {L n : β} {x y : Vertex} {s : Vertex β β} {Ο Ξ² : β} | |
| (hΟ : |Ο|=1) (hΞ² : 0 < Ξ²) | |
| (E : Filling L ββ[β] (Fin (n+1) β β)) | |
| (hEn : β z, βE.symm zβ β€ 2*βzβ) | |
| (hE0 : β s a, E a 0 = Ο*(filledHeight L s a y-filledHeight L s a x)+edgeOffset L Ο s x) | |
| (aβ : Filling L) | |
| (hfacet : Ο*(filledHeight L s aβ y-filledHeight L s aβ x)=1) | |
| (hother : β v β box L, β w β box L, Adj v w β s(v,w) β s(x,y) β | |
| |filledHeight L s aβ v-filledHeight L s aβ w| β€ 1-Ξ²/2) : | |
| β qβ : Fin n β β, β q β Metric.ball qβ (Ξ²/16), | |
| Fin.cons (1+edgeOffset L Ο s x) q β E '' fillingPolytope L s := by | |
| let qβ : Fin n β β := fun i => E aβ i.succ | |
| refine β¨qβ,?_β© | |
| intro q hq | |
| let z : Fin (n+1) β β := Fin.cons (1+edgeOffset L Ο s x) q | |
| let a := E.symm z | |
| have hb : E aβ 0=1+edgeOffset L Ο s x := by rw [hE0,hfacet] | |
| have hnorm : βz-E aββ β€ βq-qββ := by | |
| apply (pi_norm_le_iff_of_nonneg (norm_nonneg _)).mpr | |
| intro i | |
| refine Fin.cases ?_ (fun j => ?_) i | |
| Β· simp [z,hb,norm_nonneg] | |
| Β· exact norm_le_pi_norm (q-qβ) j | |
| have ha : βa-aββ β€ 2*βq-qββ := by | |
| have heq : a-aβ=E.symm (z-E aβ) := by simp [a] | |
| rw [heq] | |
| exact (hEn _).trans (mul_le_mul_of_nonneg_left hnorm (by norm_num)) | |
| have hq' : βq-qββ < Ξ²/16 := by simpa only [Metric.mem_ball,dist_eq_norm] using hq | |
| have hsign : Ο*(filledHeight L s a y-filledHeight L s a x)=1 := by | |
| have h := hE0 s a | |
| have hz : E a 0=1+edgeOffset L Ο s x := by simp [a,z] | |
| linarith | |
| have habs : |filledHeight L s a x-filledHeight L s a y| β€ 1 := by | |
| have h := congrArg abs hsign | |
| rw [abs_mul,hΟ,one_mul,abs_one,abs_sub_comm] at h | |
| exact h.le | |
| refine β¨a,filling_of_small_perturbation_on_facet habs hother (by linarith),?_β© | |
| exact E.apply_symm_apply z | |
| end TriangularLipschitz | |
| namespace TriangularLipschitz | |
| lemma linearCoordinates_measurableEmbedding {L n : β} | |
| (E : Filling L ββ[β] (Fin n β β)) : MeasurableEmbedding E := | |
| E.toContinuousLinearEquiv.toHomeomorph.isClosedEmbedding.measurableEmbedding | |
| lemma filling_volume_image {L n : β} (E : Filling L ββ[β] (Fin n β β)) | |
| (hE : MeasurePreserving E) (s : Vertex β β) : | |
| volume (E '' fillingPolytope L s) = fillingVolume L s := by | |
| have h := hE.measure_preimage_emb (linearCoordinates_measurableEmbedding E) (E '' fillingPolytope L s) | |
| simpa only [Set.preimage_image_eq _ E.injective, fillingVolume] using h.symm | |
| lemma isCompact_filling_image {L n : β} (E : Filling L ββ[β] (Fin n β β)) (s : Vertex β β) : | |
| IsCompact (E '' fillingPolytope L s) := | |
| (isCompact_fillingPolytope L s).image E.toContinuousLinearEquiv.continuous | |
| lemma convex_filling_image {L n : β} (E : Filling L ββ[β] (Fin n β β)) (s : Vertex β β) : | |
| Convex β (E '' fillingPolytope L s) := | |
| (convex_fillingPolytope L s).linear_image E.toLinearMap | |
| lemma filling_image_volume_bound {L n : β} (E : Filling L ββ[β] (Fin n β β)) | |
| (hE : MeasurePreserving E) (s : Vertex β β) : | |
| (volume (E '' fillingPolytope L s)).toReal β€ | |
| (volume (Metric.closedBall (0 : Filling L) (2*L))).toReal := by | |
| rw [filling_volume_image E hE] | |
| have h : (fillingVolume L s).toReal β€ | |
| (volume (Metric.closedBall (fun _ => s (0,0) : Filling L) (2*L))).toReal := | |
| ENNReal.toReal_mono measure_closedBall_lt_top.ne | |
| (measure_mono (fillingPolytope_subset_closedBall L s)) | |
| simpa only [Measure.addHaar_closedBall_center] using h | |
| def meanHeight (L : β) (s : Vertex β β) (x : Vertex) : β := | |
| (β« a in fillingPolytope L s, filledHeight L s a x)/(fillingVolume L s).toReal | |
| lemma integrableOn_filledHeight (L : β) (s : Vertex β β) (x : Vertex) : | |
| IntegrableOn (fun a => filledHeight L s a x) (fillingPolytope L s) := | |
| (continuous_filledHeight L s x).continuousOn.integrableOn_compact (isCompact_fillingPolytope L s) | |
| lemma meanHeight_fixed {L : β} {s : Vertex β β} {x : Vertex} | |
| (hvol : 0 < fillingVolume L s) (hx : x β interior L) : meanHeight L s x=s x := by | |
| have hv : (fillingVolume L s).toReal β 0 := | |
| (ENNReal.toReal_pos hvol.ne' (fillingVolume_lt_top L s).ne).ne' | |
| simp only [meanHeight,filledHeight_fixed _ _ _ hx, setIntegral_const,smul_eq_mul, | |
| Measure.real, fillingVolume] at hv β’ | |
| exact mul_div_cancel_leftβ _ hv | |
| lemma coordinate_meanHeight {L n : β} {x y : Vertex} {Ο : β} | |
| (E : Filling L ββ[β] (Fin (n+1) β β)) (hE : MeasurePreserving E) | |
| (hE0 : β s a, E a 0 = Ο*(filledHeight L s a y-filledHeight L s a x)+edgeOffset L Ο s x) | |
| (s : Vertex β β) (hvol : 0 < fillingVolume L s) : | |
| (β« z in E '' fillingPolytope L s, z 0)/(volume (E '' fillingPolytope L s)).toReal = | |
| Ο*(meanHeight L s y-meanHeight L s x)+edgeOffset L Ο s x := by | |
| have hv : (fillingVolume L s).toReal β 0 := | |
| (ENNReal.toReal_pos hvol.ne' (fillingVolume_lt_top L s).ne).ne' | |
| have hdiff : IntegrableOn (fun a => filledHeight L s a y-filledHeight L s a x) | |
| (fillingPolytope L s) := | |
| (integrableOn_filledHeight L s y).sub (integrableOn_filledHeight L s x) | |
| have hconst : IntegrableOn (fun _ : Filling L => edgeOffset L Ο s x) (fillingPolytope L s) := | |
| continuousOn_const.integrableOn_compact (isCompact_fillingPolytope L s) | |
| rw [filling_volume_image E hE, hE.setIntegral_image_emb (linearCoordinates_measurableEmbedding E)] | |
| simp_rw [hE0 s] | |
| rw [integral_add (hdiff.const_mul Ο) hconst, integral_const_mul, | |
| integral_sub (integrableOn_filledHeight L s y) (integrableOn_filledHeight L s x),setIntegral_const] | |
| simp only [meanHeight, smul_eq_mul, Measure.real] | |
| change (_+ (fillingVolume L s).toReal*_) / (fillingVolume L s).toReal = _ | |
| field_simp | |
| end TriangularLipschitz | |
| end | |
| end | |
| end OAI | |