Download data/lean/OAI/Geometry/CubicTorus/Regularity/BVColumnHeight.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 44.4 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/CubicTorus/Regularity/BVColumnHeight.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/CubicTorus/Regularity/BVColumnHeight.lean
-
curl -L -o BVColumnHeight.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/CubicTorus/Regularity/BVColumnHeight.lean
44.4 kB
| import Mathlib | |
| import OAI.Geometry.CubicTorus.Estimates.BVGraphEnergy | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open MeasureTheory Set Filter Metric | |
| open scoped ENNReal NNReal Topology RealInnerProductSpace | |
| namespace CubicTorus | |
| def normalColumnHeight (U : Set Torus) (a : Torus) (n : Cover) (r : β) (y : Plane) : β := | |
| (β« t in Icc (-r / 4) (r / 4), | |
| characteristic U (a + quotientMap (normalPlaneEmbedding n y + t β’ n))) - r / 4 | |
| lemma measurable_normalColumnHeight {U : Set Torus} (hU : MeasurableSet U) | |
| (a : Torus) (n : Cover) (r : β) : Measurable (normalColumnHeight U a n r) := by | |
| have hc : Continuous (fun p : Plane Γ β β¦ | |
| a + quotientMap (normalPlaneEmbedding n p.1 + p.2 β’ n)) := | |
| continuous_const.add (continuous_quotientMap.comp | |
| (((normalPlaneLinearIsometry n).continuous.comp continuous_fst).add | |
| (continuous_snd.smul continuous_const))) | |
| exact (((measurable_characteristic hU).comp hc.measurable).stronglyMeasurable.integral_prod_right').measurable.sub_const _ | |
| lemma normalColumn_integrable {U : Set Torus} (hU : MeasurableSet U) | |
| (a : Torus) (n : Cover) (r : β) (y : Plane) : | |
| IntegrableOn (fun t β¦ characteristic U | |
| (a + quotientMap (normalPlaneEmbedding n y + t β’ n))) (Icc (-r / 4) (r / 4)) := by | |
| apply (integrable_const (1 : β)).mono' | |
| Β· exact ((measurable_characteristic hU).comp | |
| (continuous_const.add (continuous_quotientMap.comp | |
| (continuous_const.add (continuous_id.smul continuous_const)))).measurable).aestronglyMeasurable | |
| Β· exact ae_of_all _ fun t β¦ by simpa only [Real.norm_eq_abs] using characteristic_bound U _ | |
| lemma normalColumnHeight_bound {U : Set Torus} (hU : MeasurableSet U) | |
| (a : Torus) (n : Cover) {r : β} (hr : 0 β€ r) (y : Plane) : | |
| |normalColumnHeight U a n r y| β€ r / 4 := by | |
| have hi := normalColumn_integrable hU a n r y | |
| have hlo : 0 β€ β« t in Icc (-r / 4) (r / 4), | |
| characteristic U (a + quotientMap (normalPlaneEmbedding n y + t β’ n)) := | |
| integral_nonneg (fun t β¦ characteristic_nonneg U _) | |
| have hhi := integral_mono hi (integrable_const (1 : β)) (fun t β¦ | |
| (le_abs_self _).trans (characteristic_bound U _)) | |
| rw [integral_const, smul_eq_mul, mul_one, measureReal_def, Measure.restrict_apply_univ, | |
| Real.volume_Icc, ENNReal.toReal_ofReal (by linarith : 0 β€ r / 4 - -r / 4)] at hhi | |
| dsimp [normalColumnHeight] | |
| exact abs_le.mpr β¨by linarith, by linarithβ© | |
| lemma trapped_frontier_torus_height {U : Set Torus} (hU : IsOpen U) | |
| {a c : Torus} {n : Cover} {r Ξ΅ : β} | |
| (htrap : normalCap a n r (Ξ΅ * r) β (closure U)αΆ β§ | |
| normalCap a (-n) r (Ξ΅ * r) β U) | |
| (hc : c β frontier U β© Metric.ball a r) : | |
| |βͺn, shortestLift (c - a)β«| β€ Ξ΅ * r := by | |
| apply abs_le.mpr | |
| constructor | |
| Β· by_contra! hh | |
| have hmem := htrap.2 (show c β normalCap a (-n) r (Ξ΅ * r) from | |
| β¨hc.2, by rw [inner_neg_left]; linarithβ©) | |
| have hb := hc.1 | |
| rw [frontier, hU.interior_eq] at hb | |
| exact hb.2 hmem | |
| Β· by_contra! hh | |
| exact htrap.1 β¨hc.2, hhβ© (frontier_subset_closure hc.1) | |
| theorem normalColumnHeight_eq_good_height {U : Set Torus} (hU : IsOpen U) | |
| {a c : Torus} {n : Cover} (hn : βnβ = 1) {r Ξ΅ Ξ· : β} | |
| (hr : 0 < r) (hrsmall : r < 1 / 2) (hΞ΅ : Ξ΅ < 1 / 4) (hΞ· : Ξ· β€ 1 / 2) | |
| (htrap : normalCap a n r (Ξ΅ * r) β (closure U)αΆ β§ | |
| normalCap a (-n) r (Ξ΅ * r) β U) | |
| (hc : c β frontier U β© Metric.ball a (r / 2)) | |
| (hcone : β x β frontier U, dist x c β€ r β | |
| |βͺn, shortestLift (x - c)β«| β€ Ξ· * dist x c) | |
| (hy : normalPlaneCoordinates n (shortestLift (c - a)) β Metric.ball (0 : Plane) (r / 4)) : | |
| normalColumnHeight U a n r (normalPlaneCoordinates n (shortestLift (c - a))) = | |
| βͺn, shortestLift (c - a)β« := by | |
| let y := normalPlaneCoordinates n (shortestLift (c - a)) | |
| let q := βͺn, shortestLift (c - a)β« | |
| let f : β β Torus := fun t β¦ a + quotientMap (normalPlaneEmbedding n y + t β’ n) | |
| have hphase := trapped_good_column_phases hU hn hr hrsmall hΞ΅ hΞ· htrap hc hcone hy | |
| have hq : |q| β€ Ξ΅ * r := trapped_frontier_torus_height hU htrap | |
| β¨hc.1, (Metric.ball_subset_ball (by linarith : r / 2 β€ r)) hc.2β© | |
| have hqlo : -r / 4 β€ q := by | |
| have hh := (abs_le.mp hq).1 | |
| nlinarith [mul_lt_mul_of_pos_right hΞ΅ hr] | |
| have hqhi : q β€ r / 4 := by | |
| have hh := (abs_le.mp hq).2 | |
| nlinarith [mul_lt_mul_of_pos_right hΞ΅ hr] | |
| have hfc : f q = c := by | |
| dsimp [f, q, y] | |
| rw [normalPlaneCoordinates_reconstruct hn, quotientMap_shortestLift, add_sub_cancel] | |
| have heq : β t β Icc (-r / 4) (r / 4), | |
| characteristic U (f t) = (Iio q).indicator (fun _ : β β¦ (1 : β)) t := by | |
| intro t ht | |
| by_cases htq : t < q | |
| Β· have htU : f t β U := hphase.1 t ht htq | |
| simp [characteristic, htU, htq] | |
| Β· have htU : f t β U := by | |
| rcases lt_or_eq_of_le (le_of_not_gt htq) with hlt | he | |
| Β· exact fun hh β¦ hphase.2 t ht hlt (subset_closure hh) | |
| Β· rw [β he, hfc] | |
| have hb := hc.1 | |
| rw [frontier, hU.interior_eq] at hb | |
| exact hb.2 | |
| simp [characteristic, htU, htq] | |
| have hset : Icc (-r / 4) (r / 4) β© Iio q = Ico (-r / 4) q := by | |
| ext t | |
| simp only [mem_inter_iff, mem_Icc, mem_Iio, mem_Ico] | |
| constructor | |
| Β· exact fun h β¦ β¨h.1.1, h.2β© | |
| Β· exact fun h β¦ β¨β¨h.1, h.2.le.trans hqhiβ©, h.2β© | |
| change (β« t in Icc (-r / 4) (r / 4), characteristic U (f t)) - r / 4 = q | |
| rw [setIntegral_congr_fun measurableSet_Icc heq, setIntegral_indicator measurableSet_Iio, | |
| hset, integral_const, smul_eq_mul, mul_one, measureReal_def, Measure.restrict_apply_univ, | |
| Real.volume_Ico, ENNReal.toReal_ofReal (sub_nonneg.mpr hqlo)] | |
| ring | |
| theorem normalColumnHeight_disagreement_volume_le {U : Set Torus} (hU : IsOpen U) | |
| (Ο : FiniteMeasure Torus) {R cβ : β} (hR : 0 < R) (hcβ : 0 < cβ) | |
| (hl : β x β frontier U, β Ο : β, 0 < Ο β Ο β€ R β | |
| cβ * Ο ^ 2 β€ (Ο : Measure Torus).real (Metric.ball x Ο)) | |
| (a : Torus) {n : Cover} (hn : βnβ = 1) {r Ξ΅ Ξ· : β} | |
| (hr : 0 < r) (hrsmall : r < 1 / 2) (hΞ΅ : Ξ΅ < 1 / 4) (hΞ· : Ξ· β€ 1 / 2) | |
| (htrap : normalCap a n r (Ξ΅ * r) β (closure U)αΆ β§ | |
| normalCap a (-n) r (Ξ΅ * r) β U) | |
| (S : Set Torus) (g : Plane β β) | |
| (hS : β x β S, g (normalPlaneCoordinates n (shortestLift (x - a))) = | |
| βͺn, shortestLift (x - a)β«) | |
| (hcone : β c β S, β x β frontier U, dist x c β€ r β | |
| |βͺn, shortestLift (x - c)β«| β€ Ξ· * dist x c) : | |
| (volume : Measure Plane) {y β Metric.ball (0 : Plane) (r / 4) | | |
| normalColumnHeight U a n r y β g y} β€ | |
| ((planeAreaFactor : ββ₯0β) * ENNReal.ofReal (64 / cβ)) * | |
| (Ο : Measure Torus) ((frontier U β© Metric.ball a (r / 2)) \ S) := by | |
| let Q : Torus β Plane := fun x β¦ normalPlaneCoordinates n (shortestLift (x - a)) | |
| have hcover : {y β Metric.ball (0 : Plane) (r / 4) | | |
| normalColumnHeight U a n r y β g y} β | |
| Q '' ((frontier U β© Metric.ball a (r / 2)) \ S) := by | |
| intro y hy | |
| obtain β¨x, hx, hxyβ© := trapped_boundary_projects_disk hU a hn hr hrsmall hΞ΅ htrap hy.1 | |
| have hxS : x β S := by | |
| intro hm | |
| apply hy.2 | |
| rw [β hxy, hS x hm] | |
| exact normalColumnHeight_eq_good_height hU hn hr hrsmall hΞ΅ hΞ· htrap hx | |
| (hcone x hm) (by simpa only [hxy] using hy.1) | |
| exact β¨x, β¨hx, hxSβ©, hxyβ© | |
| apply (measure_mono hcover).trans | |
| apply plane_projection_volume_le_perimeter Ο (frontier U) hR hcβ hl n a _ | |
| (fun x hx β¦ hx.1.1) | |
| intro x hx | |
| exact (Metric.ball_subset_ball (by linarith : r / 2 β€ 1 / 4)) hx.1.2 | |
| theorem normalColumnHeight_graph_L1_le {U : Set Torus} (hU : IsOpen U) | |
| (Ο : FiniteMeasure Torus) {R cβ : β} (hR : 0 < R) (hcβ : 0 < cβ) | |
| (hl : β x β frontier U, β Ο : β, 0 < Ο β Ο β€ R β | |
| cβ * Ο ^ 2 β€ (Ο : Measure Torus).real (Metric.ball x Ο)) | |
| (a : Torus) {n : Cover} (hn : βnβ = 1) {r Ξ΅ Ξ· : β} | |
| (hr : 0 < r) (hrsmall : r < 1 / 2) (hΞ΅ : Ξ΅ < 1 / 4) (hΞ· : Ξ· β€ 1 / 2) | |
| (htrap : normalCap a n r (Ξ΅ * r) β (closure U)αΆ β§ | |
| normalCap a (-n) r (Ξ΅ * r) β U) | |
| (S : Set Torus) (g : Plane β β) (hg : Measurable g) | |
| (hheight : β y β Metric.ball (0 : Plane) (r / 4), |g y| β€ r / 4) | |
| (hS : β x β S, g (normalPlaneCoordinates n (shortestLift (x - a))) = | |
| βͺn, shortestLift (x - a)β«) | |
| (hcone : β c β S, β x β frontier U, dist x c β€ r β | |
| |βͺn, shortestLift (x - c)β«| β€ Ξ· * dist x c) : | |
| (β«β» y in Metric.ball (0 : Plane) (r / 4), | |
| ENNReal.ofReal |normalColumnHeight U a n r y - g y| β(volume : Measure Plane)) β€ | |
| ENNReal.ofReal (r / 2) * | |
| (((planeAreaFactor : ββ₯0β) * ENNReal.ofReal (64 / cβ)) * | |
| (Ο : Measure Torus) ((frontier U β© Metric.ball a (r / 2)) \ S)) := by | |
| let D : Set Plane := {y β Metric.ball (0 : Plane) (r / 4) | | |
| normalColumnHeight U a n r y β g y} | |
| have hD : MeasurableSet D := measurableSet_ball.inter | |
| (measurableSet_eq_fun (measurable_normalColumnHeight hU.measurableSet a n r) hg).compl | |
| have hbound : β y β Metric.ball (0 : Plane) (r / 4), | |
| ENNReal.ofReal |normalColumnHeight U a n r y - g y| β€ | |
| D.indicator (fun _ β¦ ENNReal.ofReal (r / 2)) y := by | |
| intro y hy | |
| by_cases he : normalColumnHeight U a n r y = g y | |
| Β· simp [he] | |
| Β· rw [Set.indicator_of_mem (show y β D from β¨hy, heβ©)] | |
| apply ENNReal.ofReal_le_ofReal | |
| have hh := abs_sub_le (normalColumnHeight U a n r y) 0 (g y) | |
| simp only [sub_zero, zero_sub, abs_neg] at hh | |
| linarith [normalColumnHeight_bound hU.measurableSet a n hr.le y, hheight y hy] | |
| calc | |
| _ β€ β«β» y in Metric.ball (0 : Plane) (r / 4), | |
| D.indicator (fun _ β¦ ENNReal.ofReal (r / 2)) y := | |
| setLIntegral_mono' measurableSet_ball hbound | |
| _ = ENNReal.ofReal (r / 2) * (volume : Measure Plane) D := by | |
| rw [lintegral_indicator hD, lintegral_const, Measure.restrict_restrict hD] | |
| simp only [Measure.restrict_apply_univ, Set.inter_eq_left.mpr (show D β | |
| Metric.ball (0 : Plane) (r / 4) from fun _ h β¦ h.1)] | |
| _ β€ _ := mul_le_mul_right (normalColumnHeight_disagreement_volume_le hU Ο hR hcβ hl | |
| a hn hr hrsmall hΞ΅ hΞ· htrap S g hS hcone) _ | |
| end CubicTorus | |
| end | |
| end | |
| section | |
| noncomputable section | |
| open MeasureTheory Set Filter | |
| open scoped ENNReal Topology RealInnerProductSpace | |
| open Laplacian | |
| namespace CubicTorus | |
| def normalScalarTest (a n : Cover) (Ο : β β β) (Ο : Plane β β) (x : Cover) : β := | |
| Ο βͺn, x - aβ« * Ο (normalPlaneCoordinates n (x - a)) | |
| lemma normalScalarTest_contDiff (a n : Cover) {Ο : β β β} {Ο : Plane β β} | |
| (hΟ : ContDiff β (β€ : ββ) Ο) (hΟ : ContDiff β (β€ : ββ) Ο) : | |
| ContDiff β (β€ : ββ) (normalScalarTest a n Ο Ο) := by | |
| exact (hΟ.comp (contDiff_const.inner β (contDiff_id.sub contDiff_const))).mul | |
| (hΟ.comp ((normalPlaneCoordinates n).contDiff.comp (contDiff_id.sub contDiff_const))) | |
| lemma normalRotation_single_succ (n : Cover) (i : Fin 2) : | |
| normalRotation n (EuclideanSpace.single i.succ 1) = | |
| normalPlaneEmbedding n (EuclideanSpace.single i 1) := by | |
| rw [normalPlaneEmbedding, normalProductChart_apply] | |
| congr 1 | |
| ext j | |
| refine Fin.cases ?_ (fun k β¦ ?_) j | |
| Β· simp | |
| Β· simp [Pi.single_apply] | |
| lemma normalScalarTest_normal_line (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| (Ο : β β β) (Ο : Plane β β) (x : Cover) (t : β) : | |
| normalScalarTest a n Ο Ο (x + t β’ n) = | |
| Ο (βͺn, x - aβ« + t) * Ο (normalPlaneCoordinates n (x - a)) := by | |
| have he : x + t β’ n - a = (x - a) + t β’ n := by abel | |
| rw [normalScalarTest, he, inner_add_right, inner_smul_right, real_inner_self_eq_norm_sq, | |
| hn, one_pow, mul_one, map_add, map_smul, normalPlaneCoordinates_normal hn, | |
| smul_zero, add_zero] | |
| lemma normalScalarTest_plane_line (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| (Ο : β β β) (Ο : Plane β β) (x : Cover) (u : Plane) (t : β) : | |
| normalScalarTest a n Ο Ο (x + t β’ normalPlaneEmbedding n u) = | |
| Ο βͺn, x - aβ« * Ο (normalPlaneCoordinates n (x - a) + t β’ u) := by | |
| have he : x + t β’ normalPlaneEmbedding n u - a = | |
| (x - a) + t β’ normalPlaneEmbedding n u := by abel | |
| rw [normalScalarTest, he, inner_add_right, inner_smul_right, | |
| normalPlaneEmbedding_inner hn, mul_zero, add_zero, map_add, map_smul, | |
| normalPlaneCoordinates_embedding] | |
| theorem laplacian_normalScalarTest (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {Ο : β β β} {Ο : Plane β β} | |
| (hΟ : ContDiff β (β€ : ββ) Ο) (hΟ : ContDiff β (β€ : ββ) Ο) (x : Cover) : | |
| Ξ (normalScalarTest a n Ο Ο) x = | |
| iteratedDeriv 2 Ο βͺn, x - aβ« * Ο (normalPlaneCoordinates n (x - a)) + | |
| Ο βͺn, x - aβ« * Ξ Ο (normalPlaneCoordinates n (x - a)) := by | |
| have htest := normalScalarTest_contDiff a n hΟ hΟ | |
| rw [InnerProductSpace.laplacian_eq_iteratedFDeriv_orthonormalBasis _ | |
| ((EuclideanSpace.basisFun (Fin 3) β).map (normalRotation n))] | |
| simp only [OrthonormalBasis.map_apply, EuclideanSpace.basisFun_apply] | |
| rw [Fin.sum_univ_succ, normalRotation_axis hn] | |
| have hv : iteratedFDeriv β 2 (normalScalarTest a n Ο Ο) x ![n, n] = | |
| iteratedDeriv 2 Ο βͺn, x - aβ« * Ο (normalPlaneCoordinates n (x - a)) := by | |
| rw [iteratedFDeriv_two_line htest] | |
| simp_rw [normalScalarTest_normal_line a hn] | |
| rw [iteratedDeriv_mul_const_field, iteratedDeriv_comp_const_add] | |
| simp | |
| rw [hv] | |
| congr 1 | |
| rw [InnerProductSpace.laplacian_eq_iteratedFDeriv_orthonormalBasis Ο | |
| (EuclideanSpace.basisFun (Fin 2) β), Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| rw [normalRotation_single_succ, iteratedFDeriv_two_line htest] | |
| simp_rw [normalScalarTest_plane_line a hn] | |
| rw [iteratedDeriv_const_mul_field, EuclideanSpace.basisFun_apply, | |
| iteratedFDeriv_two_line hΟ] | |
| lemma fderiv_normalScalarTest_normal (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {Ο : β β β} {Ο : Plane β β} | |
| (hΟ : ContDiff β (β€ : ββ) Ο) (hΟ : ContDiff β (β€ : ββ) Ο) (x : Cover) : | |
| fderiv β (normalScalarTest a n Ο Ο) x n = | |
| deriv Ο βͺn, x - aβ« * Ο (normalPlaneCoordinates n (x - a)) := by | |
| have htest := normalScalarTest_contDiff a n hΟ hΟ | |
| have hl : HasDerivAt (fun t : β β¦ x + t β’ n) n 0 := by | |
| simpa using ((hasDerivAt_id (0 : β)).smul_const n).const_add x | |
| have hh := (((htest.differentiable (by simp)) (x + (0 : β) β’ n)).hasFDerivAt.comp_hasDerivAt 0 | |
| (show HasDerivAt (fun t : β β¦ x + t β’ n) n 0 from hl)) | |
| have hh' : deriv (fun t : β β¦ normalScalarTest a n Ο Ο (x + t β’ n)) 0 = | |
| fderiv β (normalScalarTest a n Ο Ο) x n := by | |
| simpa [Function.comp_def] using hh.deriv | |
| rw [β hh'] | |
| have he := funext (normalScalarTest_normal_line a hn Ο Ο x) | |
| rw [he, deriv_mul_const, deriv_comp_const_add] | |
| Β· simp | |
| Β· exact (hΟ.comp (contDiff_const.add contDiff_id)).differentiable (by simp) |>.differentiableAt | |
| lemma normalScalarTest_tsupport (a n : Cover) (Ο : β β β) (Ο : Plane β β) : | |
| tsupport (normalScalarTest a n Ο Ο) β | |
| {x | βͺn, x - aβ« β tsupport Ο} β© | |
| {x | normalPlaneCoordinates n (x - a) β tsupport Ο} := by | |
| apply closure_minimal _ | |
| ((isClosed_closure.preimage (continuous_const.inner (continuous_id.sub continuous_const))).inter | |
| (isClosed_closure.preimage ((normalPlaneCoordinates n).continuous.comp | |
| (continuous_id.sub continuous_const)))) | |
| intro x hx | |
| have hnz : Ο βͺn, x - aβ« * Ο (normalPlaneCoordinates n (x - a)) β 0 := hx | |
| exact β¨subset_tsupport _ (left_ne_zero_of_mul hnz), | |
| subset_tsupport _ (right_ne_zero_of_mul hnz)β© | |
| lemma normalScalarTest_tsupport_ball (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {Ο : β β β} {Ο : Plane β β} {r : β} (hr : 0 < r) | |
| (hΟ : tsupport Ο β Icc (-r / 3) (r / 3)) | |
| (hΟ : tsupport Ο β Metric.closedBall (0 : Plane) (r / 3)) : | |
| tsupport (normalScalarTest a n Ο Ο) β Metric.ball a r := by | |
| intro x hx | |
| have hh := normalScalarTest_tsupport a n Ο Ο hx | |
| have hv : |βͺn, x - aβ«| β€ r / 3 := by | |
| have ht := hΟ hh.1 | |
| exact abs_le.mpr β¨by linarith [ht.1], ht.2β© | |
| have hp : βnormalPlaneCoordinates n (x - a)β β€ r / 3 := by | |
| simpa using hΟ hh.2 | |
| have htri := norm_add_le (normalPlaneEmbedding n (normalPlaneCoordinates n (x - a))) | |
| (βͺn, x - aβ« β’ n) | |
| rw [normalPlaneCoordinates_reconstruct hn, normalPlaneEmbedding_norm, norm_smul, | |
| Real.norm_eq_abs, hn, mul_one] at htri | |
| change dist x a < r | |
| rw [dist_eq_norm] | |
| linarith | |
| end CubicTorus | |
| end | |
| end | |
| section | |
| noncomputable section | |
| open MeasureTheory Set Filter | |
| open scoped ENNReal Topology RealInnerProductSpace | |
| namespace CubicTorus | |
| def normalColumnChart (a n : Cover) : (β Γ Plane) βα΅ Cover := | |
| (((MeasurableEquiv.refl β).prodCongr (MeasurableEquiv.toLp 2 (Fin 2 β β)).symm).trans | |
| (normalProductChart n)).trans (MeasurableEquiv.addLeft a) | |
| lemma normalColumnChart_apply (a : Cover) {n : Cover} (hn : βnβ = 1) (t : β) (y : Plane) : | |
| normalColumnChart a n (t, y) = a + (normalPlaneEmbedding n y + t β’ n) := by | |
| change a + normalProductChart n (t, WithLp.ofLp y) = _ | |
| rw [normalProductChart_decompose hn] | |
| congr 1 | |
| exact add_comm _ _ | |
| lemma normalColumnChart_measurePreserving (a n : Cover) : | |
| MeasurePreserving (normalColumnChart a n) := by | |
| apply MeasurePreserving.trans _ (measurePreserving_add_left volume a) | |
| apply MeasurePreserving.trans _ (normalProductChart_measurePreserving n) | |
| change MeasurePreserving | |
| (Prod.map id (MeasurableEquiv.toLp 2 (Fin 2 β β)).symm) volume volume | |
| simpa only [Measure.volume_eq_prod] using | |
| (MeasurePreserving.id (volume : Measure β)).prod | |
| (EuclideanSpace.volume_preserving_symm_measurableEquiv_toLp (Fin 2)) | |
| lemma integral_normalColumnChart (a n : Cover) {f : Cover β β} (hf : Integrable f) : | |
| (β« x : Cover, f x) = β« y : Plane, β« t : β, f (normalColumnChart a n (t, y)) := by | |
| rw [β (normalColumnChart_measurePreserving a n).integral_comp' f] | |
| have hi := (normalColumnChart_measurePreserving a n).integrable_comp | |
| hf.aestronglyMeasurable |>.mpr hf | |
| exact integral_prod_symm (f := fun z : β Γ Plane β¦ f (normalColumnChart a n z)) | |
| (by simpa only [Measure.volume_eq_prod, Function.comp_def] using hi) | |
| lemma normalColumnChart_height (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| (t : β) (y : Plane) : βͺn, normalColumnChart a n (t, y) - aβ« = t := by | |
| rw [normalColumnChart_apply a hn, add_sub_cancel_left, inner_add_right, | |
| normalPlaneEmbedding_inner hn, inner_smul_right, real_inner_self_eq_norm_sq, | |
| hn, one_pow, mul_one, zero_add] | |
| lemma normalColumnChart_projection (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| (t : β) (y : Plane) : | |
| normalPlaneCoordinates n (normalColumnChart a n (t, y) - a) = y := by | |
| rw [normalColumnChart_apply a hn, add_sub_cancel_left, map_add, map_smul, | |
| normalPlaneCoordinates_embedding, normalPlaneCoordinates_normal hn, smul_zero, add_zero] | |
| lemma normalColumnChart_characteristic (U : Set Torus) (a : Cover) {n : Cover} | |
| (hn : βnβ = 1) (t : β) (y : Plane) : | |
| characteristic U (quotientMap (normalColumnChart a n (t, y))) = | |
| characteristic U (quotientMap a + quotientMap (normalPlaneEmbedding n y + t β’ n)) := by | |
| rw [normalColumnChart_apply a hn, quotientMap_add] | |
| lemma normalColumnChart_ball (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {r t : β} (hr : 0 < r) {y : Plane} (ht : |t| β€ r / 2) | |
| (hy : βyβ β€ r / 3) : normalColumnChart a n (t, y) β Metric.ball a r := by | |
| rw [Metric.mem_ball, dist_eq_norm, normalColumnChart_apply a hn, add_sub_cancel_left] | |
| have hh := norm_add_le (normalPlaneEmbedding n y) (t β’ n) | |
| rw [normalPlaneEmbedding_norm, norm_smul, Real.norm_eq_abs, hn, mul_one] at hh | |
| linarith | |
| end CubicTorus | |
| end | |
| end | |
| section | |
| noncomputable section | |
| open MeasureTheory Set Filter | |
| open scoped ENNReal Topology RealInnerProductSpace | |
| namespace CubicTorus | |
| lemma normalColumnChart_line_isometry (a : Cover) {n : Cover} (hn : βnβ = 1) (y : Plane) : | |
| Isometry (fun t : β β¦ normalColumnChart a n (t, y)) := by | |
| apply Isometry.of_dist_eq | |
| intro s t | |
| rw [dist_eq_norm, normalColumnChart_apply a hn, normalColumnChart_apply a hn] | |
| have he : a + (normalPlaneEmbedding n y + s β’ n) - | |
| (a + (normalPlaneEmbedding n y + t β’ n)) = (s - t) β’ n := by rw [sub_smul]; abel | |
| rw [he, norm_smul, Real.norm_eq_abs, hn, mul_one, Real.dist_eq] | |
| lemma normalColumnChart_plane_isometry (a : Cover) {n : Cover} (hn : βnβ = 1) (t : β) : | |
| Isometry (fun y : Plane β¦ normalColumnChart a n (t, y)) := by | |
| apply Isometry.of_dist_eq | |
| intro y z | |
| rw [dist_eq_norm, normalColumnChart_apply a hn, normalColumnChart_apply a hn] | |
| have he : a + (normalPlaneEmbedding n y + t β’ n) - | |
| (a + (normalPlaneEmbedding n z + t β’ n)) = normalPlaneEmbedding n (y - z) := by | |
| rw [show normalPlaneEmbedding n (y - z) = normalPlaneEmbedding n y - normalPlaneEmbedding n z from | |
| (normalPlaneLinearIsometry n).map_sub y z]; abel | |
| rw [he, normalPlaneEmbedding_norm, dist_eq_norm] | |
| lemma halfspace_directional_integrable {Ο : Cover β β} | |
| (hΟ : ContDiff β (β€ : ββ) Ο) (hs : HasCompactSupport Ο) (a n v : Cover) : | |
| Integrable (fun x β¦ halfspaceIndicator n (x - a) * fderiv β Ο x v) := by | |
| exact (((hΟ.continuous_fderiv (by simp)).clm_apply continuous_const).integrable_of_hasCompactSupport | |
| (hs.fderiv_apply β v)).bdd_mul | |
| ((measurable_halfspaceIndicator n).comp (measurable_id.sub_const a)).aestronglyMeasurable | |
| (Eventually.of_forall fun x β¦ by simpa only [Real.norm_eq_abs] using halfspaceIndicator_bound n (x-a)) | |
| lemma integral_halfspace_normal_derivative (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {Ο : Cover β β} (hΟ : ContDiff β (β€ : ββ) Ο) (hs : HasCompactSupport Ο) : | |
| (β« x : Cover, halfspaceIndicator n (x-a) * fderiv β Ο x n) = | |
| β« y : Plane, Ο (a + normalPlaneEmbedding n y) := by | |
| rw [integral_normalColumnChart a n (halfspace_directional_integrable hΟ hs a n n)] | |
| apply integral_congr_ae | |
| filter_upwards [] with y | |
| let f : β β β := fun t β¦ Ο (normalColumnChart a n (t,y)) | |
| have hc : ContDiff β (β€ : ββ) (fun t : β β¦ normalColumnChart a n (t,y)) := by | |
| simp_rw [normalColumnChart_apply a hn] | |
| fun_prop | |
| have hf : ContDiff β (β€ : ββ) f := hΟ.comp hc | |
| have hfs : HasCompactSupport f := hs.comp_isClosedEmbedding | |
| (normalColumnChart_line_isometry a hn y).isClosedEmbedding | |
| have hd (t : β) : deriv f t = fderiv β Ο (normalColumnChart a n (t,y)) n := by | |
| have hh : HasDerivAt (fun s : β β¦ normalColumnChart a n (s,y)) n t := by | |
| simp_rw [normalColumnChart_apply a hn] | |
| simpa only [one_smul, add_zero, zero_add, id_eq, add_assoc] using | |
| ((hasDerivAt_id t).smul_const n).const_add (a + normalPlaneEmbedding n y) | |
| exact (((hΟ.differentiable (by simp)) _).hasFDerivAt.comp_hasDerivAt t hh).deriv | |
| have he (t : β) : halfspaceIndicator n (normalColumnChart a n (t,y)-a) * | |
| fderiv β Ο (normalColumnChart a n (t,y)) n = (Iio (0 : β)).indicator (deriv f) t := by | |
| by_cases ht : t < 0 <;> simp [halfspaceIndicator, normalColumnChart_height a hn, ht, hd] | |
| simp_rw [he] | |
| rw [integral_indicator measurableSet_Iio, β integral_Iic_eq_integral_Iio, | |
| hfs.integral_Iic_deriv_eq (hf.of_le (by simp)) 0] | |
| simp [f, normalColumnChart_apply a hn] | |
| lemma integral_halfspace_tangent_derivative (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {Ο : Cover β β} (hΟ : ContDiff β (β€ : ββ) Ο) (hs : HasCompactSupport Ο) (v : Plane) : | |
| (β« x : Cover, halfspaceIndicator n (x-a) * fderiv β Ο x (normalPlaneEmbedding n v)) = 0 := by | |
| let f : Cover β β := fun x β¦ halfspaceIndicator n (x-a) * fderiv β Ο x (normalPlaneEmbedding n v) | |
| have hi := halfspace_directional_integrable hΟ hs a n (normalPlaneEmbedding n v) | |
| rw [β (normalColumnChart_measurePreserving a n).integral_comp' f, Measure.volume_eq_prod] | |
| have hic := (normalColumnChart_measurePreserving a n).integrable_comp hi.aestronglyMeasurable |>.mpr hi | |
| rw [integral_prod (f := fun z : β Γ Plane β¦ f (normalColumnChart a n z)) (by | |
| simpa only [Measure.volume_eq_prod, Function.comp_def] using hic)] | |
| have he (t : β) : (β« y : Plane, f (normalColumnChart a n (t,y))) = 0 := by | |
| let g : Plane β β := fun y β¦ Ο (normalColumnChart a n (t,y)) | |
| have hc : ContDiff β (β€ : ββ) (fun y : Plane β¦ normalColumnChart a n (t,y)) := by | |
| simp_rw [normalColumnChart_apply a hn] | |
| exact contDiff_const.add ((normalPlaneLinearIsometry n).contDiff.add contDiff_const) | |
| have hg : ContDiff β (β€ : ββ) g := hΟ.comp hc | |
| have hs' : HasCompactSupport g := hs.comp_isClosedEmbedding | |
| (normalColumnChart_plane_isometry a hn t).isClosedEmbedding | |
| have hd (y : Plane) : fderiv β g y v = | |
| fderiv β Ο (normalColumnChart a n (t,y)) (normalPlaneEmbedding n v) := by | |
| have hline := ((normalPlaneLinearIsometry n).toContinuousLinearMap.hasFDerivAt (x := y)).add_const (t β’ n) |>.const_add a | |
| have hh := ((hΟ.differentiable (by simp) _).hasFDerivAt.comp y hline).fderiv | |
| have he : g = Ο β (fun z : Plane β¦ a + ((normalPlaneLinearIsometry n).toContinuousLinearMap z + t β’ n)) := by | |
| funext z | |
| simp only [g, Function.comp_def, normalColumnChart_apply a hn] | |
| rfl | |
| rw [he, hh, normalColumnChart_apply a hn] | |
| rfl | |
| have hh : (fun y : Plane β¦ f (normalColumnChart a n (t,y))) = | |
| fun y β¦ (if t < 0 then (1 : β) else 0) * fderiv β g y v := by | |
| ext y | |
| by_cases ht : t < 0 <;> simp [f, halfspaceIndicator, normalColumnChart_height a hn, ht, hd] | |
| rw [hh, integral_const_mul, integral_compact_fderiv_zero hg hs', mul_zero] | |
| simp_rw [he] | |
| simp | |
| lemma integral_halfspace_directional_derivative (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {Ο : Cover β β} (hΟ : ContDiff β (β€ : ββ) Ο) (hs : HasCompactSupport Ο) (v : Cover) : | |
| (β« x : Cover, halfspaceIndicator n (x-a) * fderiv β Ο x v) = | |
| βͺn,vβ« * β« y : Plane, Ο (a + normalPlaneEmbedding n y) := by | |
| have he (x : Cover) : halfspaceIndicator n (x-a) * fderiv β Ο x v = | |
| halfspaceIndicator n (x-a) * fderiv β Ο x | |
| (normalPlaneEmbedding n (normalPlaneCoordinates n v)) + | |
| βͺn,vβ« * (halfspaceIndicator n (x-a) * fderiv β Ο x n) := by | |
| conv_lhs => arg 2; arg 2; rw [β normalPlaneCoordinates_reconstruct hn v] | |
| rw [map_add, map_smul] | |
| ring | |
| simp_rw [he] | |
| rw [integral_add (halfspace_directional_integrable hΟ hs a n _) | |
| ((halfspace_directional_integrable hΟ hs a n n).const_mul βͺn,vβ«), | |
| integral_const_mul, integral_halfspace_tangent_derivative a hn hΟ hs, | |
| integral_halfspace_normal_derivative a hn hΟ hs, zero_add] | |
| theorem integral_halfspace_divergence (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {F : Cover β Cover} (hF : ContDiff β (β€ : ββ) F) (hs : HasCompactSupport F) : | |
| (β« x : Cover, halfspaceIndicator n (x-a) * divergence F x) = | |
| β« y : Plane, βͺn, F (a + normalPlaneEmbedding n y)β« := by | |
| let Ο : Fin 3 β Cover β β := fun i x β¦ F x i | |
| have hp (i : Fin 3) : ContDiff β (β€ : ββ) (Ο i) := | |
| (EuclideanSpace.proj i : Cover βL[β] β).contDiff.comp hF | |
| have hps (i : Fin 3) : HasCompactSupport (Ο i) := hs.comp_left | |
| (show (EuclideanSpace.proj i) (0 : Cover) = 0 by simp) | |
| have hd (x : Cover) : divergence F x = β i : Fin 3, | |
| fderiv β (Ο i) x (EuclideanSpace.single i 1) := by | |
| unfold divergence | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| have hh := (((EuclideanSpace.proj i).hasFDerivAt).comp x | |
| ((hF.differentiable (by simp)) x).hasFDerivAt).fderiv | |
| change fderiv β (Ο i) x = _ at hh | |
| rw [hh] | |
| rfl | |
| simp_rw [hd, Finset.mul_sum] | |
| rw [integral_finsetSum _ (fun i _ β¦ halfspace_directional_integrable (hp i) (hps i) a n _)] | |
| simp_rw [integral_halfspace_directional_derivative a hn (hp _) (hps _)] | |
| have hg (i : Fin 3) : Integrable (fun y : Plane β¦ βͺn, EuclideanSpace.single i 1β« * | |
| Ο i (a + normalPlaneEmbedding n y)) := by | |
| have hc := (hp i).continuous.comp (normalColumnChart_plane_isometry a hn 0).continuous | |
| have hcc := (hps i).comp_isClosedEmbedding (normalColumnChart_plane_isometry a hn 0).isClosedEmbedding | |
| have hi := (hc.integrable_of_hasCompactSupport (ΞΌ := volume) hcc).const_mul βͺn, EuclideanSpace.single i 1β« | |
| simpa only [Function.comp_def, normalColumnChart_apply a hn, zero_smul, add_zero] using hi | |
| simp_rw [β integral_const_mul] | |
| rw [β integral_finsetSum _ (fun i _ β¦ hg i)] | |
| apply integral_congr_ae | |
| filter_upwards [] with y | |
| simp only [EuclideanSpace.inner_single_right, Ο] | |
| simp [PiLp.inner_apply, mul_comm] | |
| end CubicTorus | |
| end | |
| end | |
| section | |
| noncomputable section | |
| open MeasureTheory Set Filter | |
| open scoped ENNReal Topology RealInnerProductSpace | |
| namespace CubicTorus | |
| def normalMove (n : Cover) (f : Cover β β) (x : Cover) : Cover := x + f x β’ n | |
| def normalJacobian (n : Cover) (f : Cover β β) (x : Cover) : β := | |
| 1 + fderiv β f x n | |
| def normalPullback (n : Cover) (f : Cover β β) (F : Cover β Cover) (x : Cover) : Cover := | |
| normalJacobian n f x β’ F (normalMove n f x) - | |
| fderiv β f x (F (normalMove n f x)) β’ n | |
| lemma normalMove_hasFDerivAt (n : Cover) {f : Cover β β} {x : Cover} | |
| (hf : DifferentiableAt β f x) : | |
| HasFDerivAt (normalMove n f) | |
| (ContinuousLinearMap.id β Cover + (fderiv β f x).smulRight n) x := by | |
| exact (hasFDerivAt_id x).add (hf.hasFDerivAt.smul_const n) | |
| lemma normalMove_contDiff (n : Cover) {f : Cover β β} (hf : ContDiff β (β€ : ββ) f) : | |
| ContDiff β (β€ : ββ) (normalMove n f) := contDiff_id.add (hf.smul_const n) | |
| lemma normalPullback_contDiff (n : Cover) {f : Cover β β} (hf : ContDiff β (β€ : ββ) f) | |
| {F : Cover β Cover} (hF : ContDiff β (β€ : ββ) F) : | |
| ContDiff β (β€ : ββ) (normalPullback n f F) := by | |
| have hd := hf.fderiv_right (m := (β€ : ββ)) (by simp) | |
| have hG := hF.comp (normalMove_contDiff n hf) | |
| exact (contDiff_const.add (hd.clm_apply contDiff_const)).smul hG |>.sub | |
| ((hd.clm_apply hG).smul contDiff_const) | |
| lemma divergence_comp_normalMove (n : Cover) {f : Cover β β} {x : Cover} | |
| (hf : DifferentiableAt β f x) {F : Cover β Cover} | |
| (hF : DifferentiableAt β F (normalMove n f x)) : | |
| divergence (fun y β¦ F (normalMove n f y)) x = | |
| divergence F (normalMove n f x) + | |
| fderiv β f x (fderiv β F (normalMove n f x) n) := by | |
| have hd := (hF.hasFDerivAt.comp x (normalMove_hasFDerivAt n hf)).fderiv | |
| change fderiv β (fun y β¦ F (normalMove n f y)) x = _ at hd | |
| simp only [divergence, hd, ContinuousLinearMap.comp_apply, add_apply, | |
| ContinuousLinearMap.id_apply, ContinuousLinearMap.smulRight_apply, | |
| map_add, map_smul, PiLp.add_apply, PiLp.smul_apply, smul_eq_mul, | |
| Finset.sum_add_distrib] | |
| congr 1 | |
| rw [linearForm_apply_basis] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| ring | |
| theorem normalPullback_divergence (n : Cover) {f : Cover β β} | |
| (hf : ContDiff β (β€ : ββ) f) {F : Cover β Cover} | |
| (hF : ContDiff β (β€ : ββ) F) (x : Cover) : | |
| divergence (normalPullback n f F) x = | |
| normalJacobian n f x * divergence F (normalMove n f x) := by | |
| have hfd := (hf.differentiable (by simp)).differentiableAt (x := x) | |
| have hdf := ((hf.fderiv_right (m := (β€ : ββ)) (by simp)).differentiable | |
| (by simp)).differentiableAt (x := x) | |
| have hm := normalMove_hasFDerivAt n hfd | |
| have hg := (hF.differentiable (by simp)).differentiableAt (x := normalMove n f x) | |
| have hu := hg.hasFDerivAt.comp x hm | |
| have hj := (hdf.hasFDerivAt.clm_apply (hasFDerivAt_const n x)).const_add 1 | |
| have hb := hdf.hasFDerivAt.clm_apply hu | |
| have he := ((hf.contDiffAt (x := x)).isSymmSndFDerivAt (by | |
| simp only [minSmoothness_of_isRCLikeNormedField] | |
| change ((2 : ββ) : WithTop ββ) β€ ((β€ : ββ) : WithTop ββ) | |
| exact WithTop.coe_le_coe.mpr le_top)) n (F (normalMove n f x)) | |
| change divergence (fun y β¦ normalJacobian n f y β’ F (normalMove n f y) - | |
| fderiv β f y (F (normalMove n f y)) β’ n) x = _ | |
| have hjf := hj.fderiv | |
| change fderiv β (normalJacobian n f) x = _ at hjf | |
| dsimp only [Function.comp_def] at hb | |
| have hJ : DifferentiableAt β (normalJacobian n f) x := hj.differentiableAt | |
| have hU : DifferentiableAt β (fun y β¦ F (normalMove n f y)) x := hu.differentiableAt | |
| have hB : DifferentiableAt β (fun y β¦ fderiv β f y (F (normalMove n f y))) x := hb.differentiableAt | |
| have hA : DifferentiableAt β | |
| (fun y β¦ normalJacobian n f y β’ F (normalMove n f y)) x := hJ.smul hU | |
| have hC : DifferentiableAt β | |
| (fun y β¦ fderiv β f y (F (normalMove n f y)) β’ n) x := hB.smul_const n | |
| rw [divergence_sub_fields hA hC, | |
| divergence_smul_function hJ hU, divergence_smul_const hB, inner_gradient_left, | |
| hjf, hb.fderiv, divergence_comp_normalMove n hfd hg] | |
| simp only [add_apply, ContinuousLinearMap.comp_apply, zero_apply, | |
| ContinuousLinearMap.flip_apply, zero_add, | |
| ContinuousLinearMap.id_apply, ContinuousLinearMap.smulRight_apply, | |
| map_add, map_smul, map_zero, smul_eq_mul] | |
| dsimp only [normalJacobian, Function.comp_def] | |
| rw [β he] | |
| ring | |
| end CubicTorus | |
| end | |
| end | |
| section | |
| noncomputable section | |
| open MeasureTheory Set Filter | |
| open scoped ENNReal Topology RealInnerProductSpace | |
| namespace CubicTorus | |
| def graphHeightExtension (a n : Cover) (g : Plane β β) (x : Cover) : β := | |
| g (normalPlaneCoordinates n (x-a)) | |
| def graphShear (a n : Cover) (g : Plane β β) : Cover β Cover := | |
| normalMove n (graphHeightExtension a n g) | |
| lemma graphShear_projection (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| (g : Plane β β) (x : Cover) : | |
| normalPlaneCoordinates n (graphShear a n g x - a) = normalPlaneCoordinates n (x-a) := by | |
| rw [graphShear, normalMove, add_sub_right_comm, map_add, map_smul, | |
| normalPlaneCoordinates_normal hn, smul_zero, add_zero] | |
| lemma graphShear_inverse (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| (g : Plane β β) : Function.LeftInverse (graphShear a n (-g)) (graphShear a n g) := by | |
| intro x | |
| change graphShear a n g x + (-g) (normalPlaneCoordinates n (graphShear a n g x-a)) β’ n = x | |
| rw [graphShear_projection a hn] | |
| simp only [Pi.neg_apply, neg_smul, graphShear, normalMove, graphHeightExtension] | |
| abel | |
| lemma graphShear_continuous (a n : Cover) {g : Plane β β} (hg : Continuous g) : | |
| Continuous (graphShear a n g) := by | |
| unfold graphShear normalMove graphHeightExtension | |
| exact continuous_id.add ((hg.comp ((normalPlaneCoordinates n).continuous.comp | |
| (continuous_id.sub continuous_const))).smul continuous_const) | |
| def graphShearHomeomorph (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {g : Plane β β} (hg : Continuous g) : Cover ββ Cover where | |
| toFun := graphShear a n g | |
| invFun := graphShear a n (-g) | |
| left_inv := graphShear_inverse a hn g | |
| right_inv := by | |
| intro x | |
| simpa only [neg_neg] using graphShear_inverse a hn (-g) x | |
| continuous_toFun := graphShear_continuous a n hg | |
| continuous_invFun := graphShear_continuous a n hg.neg | |
| lemma graphShear_columnChart (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| (g : Plane β β) (t : β) (y : Plane) : | |
| graphShear a n g (normalColumnChart a n (t,y)) = normalColumnChart a n (t+g y,y) := by | |
| change normalColumnChart a n (t,y) + | |
| g (normalPlaneCoordinates n (normalColumnChart a n (t,y)-a)) β’ n = _ | |
| rw [normalColumnChart_projection a hn, normalColumnChart_apply a hn, | |
| normalColumnChart_apply a hn, add_smul] | |
| abel | |
| lemma columnShear_measurePreserving {g : Plane β β} (hg : Measurable g) : | |
| MeasurePreserving (fun p : β Γ Plane β¦ (p.1+g p.2, p.2)) := by | |
| have hs : MeasurePreserving (fun p : Plane Γ β β¦ (p.1, p.2+g p.1)) | |
| ((volume : Measure Plane).prod volume) ((volume : Measure Plane).prod volume) := | |
| (MeasurePreserving.id (volume : Measure Plane)).skew_product | |
| (measurable_snd.add (hg.comp measurable_fst)) | |
| (Eventually.of_forall fun y β¦ (measurePreserving_add_right volume (g y)).map_eq) | |
| have hh := (Measure.measurePreserving_swap (ΞΌ := (volume : Measure Plane)) | |
| (Ξ½ := (volume : Measure β))).comp (hs.comp (Measure.measurePreserving_swap | |
| (ΞΌ := (volume : Measure β)) (Ξ½ := (volume : Measure Plane)))) | |
| simpa only [Function.comp_def, Prod.swap, Measure.volume_eq_prod] using hh | |
| lemma graphShear_measurePreserving (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {g : Plane β β} (hg : Measurable g) : MeasurePreserving (graphShear a n g) := by | |
| have hi : MeasurePreserving (normalColumnChart a n).symm := | |
| MeasurePreserving.symm (normalColumnChart a n) (normalColumnChart_measurePreserving a n) | |
| have hh := (normalColumnChart_measurePreserving a n).comp | |
| ((columnShear_measurePreserving hg).comp hi) | |
| convert hh using 1 | |
| funext x | |
| obtain β¨β¨t,yβ©,rflβ© := (normalColumnChart a n).surjective x | |
| simp only [Function.comp_def, MeasurableEquiv.symm_apply_apply] | |
| exact graphShear_columnChart a hn g t y | |
| lemma graphHeightExtension_contDiff (a n : Cover) {g : Plane β β} | |
| (hg : ContDiff β (β€ : ββ) g) : ContDiff β (β€ : ββ) (graphHeightExtension a n g) := | |
| hg.comp ((normalPlaneCoordinates n).contDiff.comp (contDiff_id.sub contDiff_const)) | |
| lemma graphHeightExtension_fderiv (a n : Cover) {g : Plane β β} (hg : Differentiable β g) | |
| (x : Cover) : fderiv β (graphHeightExtension a n g) x = | |
| (fderiv β g (normalPlaneCoordinates n (x-a))).comp (normalPlaneCoordinates n) := by | |
| unfold graphHeightExtension | |
| have hp := (normalPlaneCoordinates n).hasFDerivAt.comp x ((hasFDerivAt_id x).sub_const a) | |
| simpa only [ContinuousLinearMap.comp_id, Function.comp_def, id_eq, graphHeightExtension] using | |
| ((hg _).hasFDerivAt.comp x hp).fderiv | |
| lemma graphHeightExtension_normal (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {g : Plane β β} (hg : Differentiable β g) (x : Cover) : | |
| fderiv β (graphHeightExtension a n g) x n = 0 := by | |
| rw [graphHeightExtension_fderiv a n hg, ContinuousLinearMap.comp_apply, | |
| normalPlaneCoordinates_normal hn, map_zero] | |
| lemma graphShear_jacobian (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {g : Plane β β} (hg : Differentiable β g) (x : Cover) : | |
| normalJacobian n (graphHeightExtension a n g) x = 1 := by | |
| rw [normalJacobian, graphHeightExtension_normal a hn hg, add_zero] | |
| end CubicTorus | |
| end | |
| end | |
| section | |
| noncomputable section | |
| open MeasureTheory Set Filter | |
| open scoped ENNReal Topology RealInnerProductSpace | |
| namespace CubicTorus | |
| def graphSublevelIndicator (a n : Cover) (g : Plane β β) (x : Cover) : β := | |
| {z : Cover | βͺn,z-aβ« < graphHeightExtension a n g z}.indicator (fun _ β¦ 1) x | |
| def graphAreaVector (n : Cover) (g : Plane β β) (y : Plane) : Cover := | |
| n - normalPlaneEmbedding n (gradient g y) | |
| lemma graphSublevelIndicator_shear (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| (g : Plane β β) (x : Cover) : | |
| graphSublevelIndicator a n g (graphShear a n g x) = halfspaceIndicator n (x-a) := by | |
| have hheight : βͺn, graphShear a n g x - aβ« = βͺn,x-aβ« + graphHeightExtension a n g x := by | |
| simp only [graphShear, normalMove, add_sub_right_comm, inner_add_right, | |
| inner_smul_right, real_inner_self_eq_norm_sq, hn, one_pow, mul_one] | |
| have hp : graphHeightExtension a n g (graphShear a n g x) = graphHeightExtension a n g x := | |
| congrArg g (graphShear_projection a hn g x) | |
| simp only [graphSublevelIndicator, Set.indicator, Set.mem_ofPred_eq, hheight, hp, | |
| add_lt_iff_neg_right, halfspaceIndicator] | |
| lemma normalPullback_graph_compactSupport (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {g : Plane β β} (hg : Continuous g) {F : Cover β Cover} (hs : HasCompactSupport F) : | |
| HasCompactSupport (normalPullback n (graphHeightExtension a n g) F) := by | |
| have hc := hs.comp_homeomorph (graphShearHomeomorph a hn hg) | |
| apply hc.mono | |
| intro x hx | |
| contrapose! hx | |
| simp only [Function.mem_support, not_not] at hx | |
| dsimp only [Function.comp_def, graphShearHomeomorph] at hx | |
| have hh : F (graphShear a n g x) = 0 := hx | |
| simp only [Function.mem_support, not_not] | |
| change normalPullback n (graphHeightExtension a n g) F x = 0 | |
| change F (normalMove n (graphHeightExtension a n g) x) = 0 at hh | |
| simp only [normalPullback, hh, smul_zero, map_zero, zero_smul, sub_self] | |
| lemma graphAreaVector_pullback (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {g : Plane β β} (hg : Differentiable β g) (F : Cover β Cover) (y : Plane) : | |
| βͺn, normalPullback n (graphHeightExtension a n g) F (a+normalPlaneEmbedding n y)β« = | |
| βͺgraphAreaVector n g y, F (a+normalGraph n g y)β« := by | |
| have hs : graphShear a n g (a+normalPlaneEmbedding n y) = a+normalGraph n g y := by | |
| simp only [graphShear, normalMove, graphHeightExtension, add_sub_cancel_left, | |
| normalPlaneCoordinates_embedding, normalGraph] | |
| abel | |
| rw [normalPullback, graphShear_jacobian a hn hg, one_smul, β graphShear, hs, | |
| inner_sub_right, inner_smul_right, real_inner_self_eq_norm_sq, hn, one_pow, | |
| mul_one, graphHeightExtension_fderiv a n hg, ContinuousLinearMap.comp_apply, | |
| add_sub_cancel_left, normalPlaneCoordinates_embedding] | |
| rw [graphAreaVector, inner_sub_left] | |
| congr 1 | |
| rw [show normalPlaneEmbedding n (gradient g y) = | |
| (normalPlaneLinearIsometry n).toContinuousLinearMap (gradient g y) from rfl, | |
| β ContinuousLinearMap.adjoint_inner_right, inner_gradient_left] | |
| rfl | |
| lemma graphSublevel_flux_integrable (a n : Cover) {g : Plane β β} (hg : Continuous g) | |
| {F : Cover β Cover} (hF : ContDiff β (β€ : ββ) F) (hs : HasCompactSupport F) : | |
| Integrable (fun x : Cover β¦ graphSublevelIndicator a n g x * divergence F x) := by | |
| have hm : MeasurableSet {z : Cover | βͺn,z-aβ« < graphHeightExtension a n g z} := | |
| isOpen_lt (by fun_prop) (hg.comp ((normalPlaneCoordinates n).continuous.comp | |
| (continuous_id.sub continuous_const))) |>.measurableSet | |
| have hc : HasCompactSupport (divergence F) := | |
| hs.of_isClosed_subset isClosed_closure (divergence_tsupport_subset F) | |
| have hi := (continuous_divergence hF).integrable_of_hasCompactSupport (ΞΌ := volume) hc | |
| apply (hi.indicator hm).congr | |
| filter_upwards [] with x | |
| by_cases hx : βͺn,x-aβ« < graphHeightExtension a n g x <;> simp [graphSublevelIndicator, hx] | |
| theorem integral_graphSublevel_divergence (a : Cover) {n : Cover} (hn : βnβ = 1) | |
| {g : Plane β β} (hg : ContDiff β (β€ : ββ) g) | |
| {F : Cover β Cover} (hF : ContDiff β (β€ : ββ) F) (hs : HasCompactSupport F) : | |
| (β« x : Cover, graphSublevelIndicator a n g x * divergence F x) = | |
| β« y : Plane, βͺgraphAreaVector n g y, F (a+normalGraph n g y)β« := by | |
| have hmp : MeasurePreserving (graphShearHomeomorph a hn hg.continuous).toMeasurableEquiv := | |
| graphShear_measurePreserving a hn hg.continuous.measurable | |
| rw [β hmp.integral_comp' (fun x : Cover β¦ graphSublevelIndicator a n g x * divergence F x)] | |
| have he (x : Cover) : graphSublevelIndicator a n g (graphShearHomeomorph a hn hg.continuous x) * | |
| divergence F (graphShearHomeomorph a hn hg.continuous x) = | |
| halfspaceIndicator n (x-a) * divergence (normalPullback n (graphHeightExtension a n g) F) x := by | |
| change graphSublevelIndicator a n g (graphShear a n g x) * divergence F (graphShear a n g x) = _ | |
| rw [graphSublevelIndicator_shear a hn, normalPullback_divergence n | |
| (graphHeightExtension_contDiff a n hg) hF, | |
| graphShear_jacobian a hn (hg.differentiable (by simp)), one_mul] | |
| rfl | |
| change (β« x : Cover, graphSublevelIndicator a n g (graphShearHomeomorph a hn hg.continuous x) * | |
| divergence F (graphShearHomeomorph a hn hg.continuous x)) = _ | |
| simp_rw [he] | |
| rw [integral_halfspace_divergence a hn | |
| (normalPullback_contDiff n (graphHeightExtension_contDiff a n hg) hF) | |
| (normalPullback_graph_compactSupport a hn hg.continuous hs)] | |
| apply integral_congr_ae | |
| exact Eventually.of_forall (graphAreaVector_pullback a hn (hg.differentiable (by simp)) F) | |
| end CubicTorus | |
| end | |
| end | |
| end | |
| end OAI | |