Download data/lean/OAI/Geometry/CubicTorus/Regularity/SmoothApproxLip.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 43.3 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/CubicTorus/Regularity/SmoothApproxLip.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/CubicTorus/Regularity/SmoothApproxLip.lean
-
curl -L -o SmoothApproxLip.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/CubicTorus/Regularity/SmoothApproxLip.lean
43.3 kB
| import Mathlib | |
| import OAI.Geometry.CubicTorus.Regularity.BVRegularity | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open MeasureTheory Set | |
| open scoped ENNReal | |
| namespace CubicTorus | |
| lemma characteristic_dichotomy (E : Set Torus) (x : Torus) : | |
| characteristic E x = 0 β¨ characteristic E x = 1 := by | |
| classical | |
| by_cases hx : x β E <;> simp [characteristic, hx] | |
| lemma characteristic_bound (E : Set Torus) (x : Torus) : |characteristic E x| β€ 1 := by | |
| rcases characteristic_dichotomy E x with h | h <;> simp [h] | |
| lemma setIntegral_lift_measurable {f : Torus β β} (hf : Measurable f) | |
| {E : Set Torus} (hE : MeasurableSet E) : | |
| (β« z in E, f z βtorusVolume) = | |
| β« x in fundamentalCube β© quotientMap β»ΒΉ' E, f (quotientMap x) := by | |
| change (β« z in E, f z βMeasure.map quotientMap (volume.restrict fundamentalCube)) = _ | |
| rw [setIntegral_map hE hf.aestronglyMeasurable measurable_quotientMap.aemeasurable, | |
| Measure.restrict_restrict (measurable_quotientMap hE), inter_comm] | |
| lemma torus_test_translation_bound {E : Set Torus} (hE : MeasurableSet E) | |
| (hP : perimeter E β β€) {g : Torus β β} (hg : Measurable g) | |
| (hb : β x, |g x| β€ 1) (a : Cover) : | |
| |β« x in E, (g (x + quotientMap a) - g x) βtorusVolume| | |
| β€ βaβ * (perimeter E).toReal := by | |
| rw [setIntegral_lift_measurable (f := fun x => g (x + quotientMap a) - g x) | |
| ((hg.comp (measurable_id.add_const _)).sub hg) hE] | |
| have hp : β n x, g (quotientMap (x + latticeVector n)) = g (quotientMap x) := by | |
| intro n x | |
| rw [quotientMap_add, quotientMap_latticeVector, add_zero] | |
| simpa only [Function.comp_def, quotientMap_add] using | |
| measurable_test_translation_bound hP (hg.comp measurable_quotientMap) hp | |
| (fun x => hb (quotientMap x)) a | |
| lemma integral_difference_test {E : Set Torus} (hE : MeasurableSet E) | |
| {g : Torus β β} (hg : Measurable g) (hb : β x, |g x| β€ 1) (a : Torus) : | |
| (β« x in E, (g (x + a) - g x) βtorusVolume) = | |
| β« x, (characteristic E (x - a) - characteristic E x) * g x βtorusVolume := by | |
| have hiβ : Integrable (fun x => characteristic E x * g (x + a)) torusVolume := by | |
| apply Integrable.of_bound ((measurable_characteristic hE).mul | |
| (hg.comp (measurable_id.add_const a))).aestronglyMeasurable 1 | |
| exact Filter.Eventually.of_forall fun x => by | |
| dsimp only [Pi.mul_apply, Function.comp_def, id_eq] | |
| rw [Real.norm_eq_abs, abs_mul] | |
| exact (mul_le_of_le_one_left (abs_nonneg _) (characteristic_bound E x)).trans (hb (x + a)) | |
| have hiβ : Integrable (fun x => characteristic E x * g x) torusVolume := by | |
| apply Integrable.of_bound ((measurable_characteristic hE).mul hg).aestronglyMeasurable 1 | |
| exact Filter.Eventually.of_forall fun x => by | |
| dsimp only [Pi.mul_apply, Function.comp_def, id_eq] | |
| rw [Real.norm_eq_abs, abs_mul] | |
| exact (mul_le_of_le_one_left (abs_nonneg _) (characteristic_bound E x)).trans (hb x) | |
| have hiβ : Integrable (fun x => characteristic E (x - a) * g x) torusVolume := by | |
| apply Integrable.of_bound (((measurable_characteristic hE).comp | |
| (measurable_id.sub_const a)).mul hg).aestronglyMeasurable 1 | |
| exact Filter.Eventually.of_forall fun x => by | |
| dsimp only [Pi.mul_apply, Function.comp_def, id_eq] | |
| rw [Real.norm_eq_abs, abs_mul] | |
| exact (mul_le_of_le_one_left (abs_nonneg _) (characteristic_bound E (x - a))).trans (hb x) | |
| have hs := (measurePreserving_add_right torusVolume a).integral_comp | |
| (Homeomorph.addRight a).measurableEmbedding (fun x => characteristic E (x - a) * g x) | |
| simp only [add_sub_cancel_right] at hs | |
| calc | |
| _ = β« x, characteristic E x * (g (x + a) - g x) βtorusVolume := by | |
| rw [β integral_indicator hE] | |
| apply integral_congr_ae | |
| exact Filter.Eventually.of_forall fun x => by | |
| classical | |
| by_cases hx : x β E <;> simp [characteristic, hx] | |
| _ = (β« x, characteristic E x * g (x + a) βtorusVolume) - | |
| β« x, characteristic E x * g x βtorusVolume := by | |
| simp_rw [mul_sub] | |
| exact integral_sub hiβ hiβ | |
| _ = (β« x, characteristic E (x - a) * g x βtorusVolume) - | |
| β« x, characteristic E x * g x βtorusVolume := by rw [hs] | |
| _ = _ := by simp_rw [sub_mul]; exact (integral_sub hiβ hiβ).symm | |
| theorem characteristic_translation_bound {E : Set Torus} (hE : MeasurableSet E) | |
| (hP : perimeter E β β€) (a : Cover) : | |
| (β« x, |characteristic E (x - quotientMap a) - characteristic E x| βtorusVolume) | |
| β€ βaβ * (perimeter E).toReal := by | |
| let g : Torus β β := fun x => characteristic E (x - quotientMap a) - characteristic E x | |
| have hg : Measurable g := ((measurable_characteristic hE).comp | |
| (measurable_id.sub_const _)).sub (measurable_characteristic hE) | |
| have hb (x) : |g x| β€ 1 := by | |
| rcases characteristic_dichotomy E (x - quotientMap a) with h | h <;> | |
| rcases characteristic_dichotomy E x with h' | h' <;> simp [g, h, h'] | |
| have heq (x) : g x * g x = |g x| := by | |
| rcases characteristic_dichotomy E (x - quotientMap a) with h | h <;> | |
| rcases characteristic_dichotomy E x with h' | h' <;> simp [g, h, h'] | |
| have h := torus_test_translation_bound hE hP hg hb a | |
| rw [integral_difference_test hE hg hb] at h | |
| change |β« x, g x * g x βtorusVolume| β€ _ at h | |
| simp_rw [heq] at h | |
| rw [abs_of_nonneg (integral_nonneg fun x => abs_nonneg (g x))] at h | |
| exact h | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology Convolution | |
| def smoothApproxLip (n : β) : NNReal := | |
| β¨β« y : Cover, βfderiv β ((mollifier n).normed volume) yβ, | |
| integral_nonneg fun _ => norm_nonneg _β© | |
| lemma smoothApprox_lipschitz {g : Cover β β} (hg : Measurable g) | |
| (hb : β x, |g x| β€ 1) (n : β) : LipschitzWith (smoothApproxLip n) (smoothApprox g n) := by | |
| have hΟ := (mollifier n).contDiff_normed (ΞΌ := volume) (n := (β€ : ββ)) | |
| have hΟc := (mollifier n).hasCompactSupport_normed (ΞΌ := volume) | |
| have hd (x) := hΟc.hasFDerivAt_convolution_left (ContinuousLinearMap.lsmul β β) | |
| (hΟ.of_le (by simp : (1 : WithTop ββ) β€ (β€ : ββ))) | |
| (locallyIntegrable_of_bounded hg hb) x | |
| have hdi : Integrable (fun y : Cover => βfderiv β ((mollifier n).normed volume) yβ) | |
| volume := | |
| (hΟ.continuous_fderiv (by simp)).norm.integrable_of_hasCompactSupport (hΟc.fderiv β).norm | |
| apply lipschitzWith_of_nnnorm_fderiv_le ((smoothApprox_contDiff hg hb n).differentiable (by simp)) | |
| intro x | |
| apply NNReal.coe_le_coe.mp | |
| change βfderiv β (smoothApprox g n) xβ β€ _ | |
| change βfderiv β (((mollifier n).normed volume) β g) xβ β€ _ | |
| rw [(hd x).fderiv, convolution_def] | |
| apply norm_integral_le_of_norm_le hdi | |
| exact Eventually.of_forall fun y => by | |
| have heq : ((ContinuousLinearMap.lsmul β β).precompL Cover | |
| (fderiv β ((mollifier n).normed volume) y)) (g (x - y)) = | |
| g (x - y) β’ fderiv β ((mollifier n).normed volume) y := by | |
| ext v | |
| simp [ContinuousLinearMap.precompL_apply, mul_comm] | |
| rw [heq, norm_smul, Real.norm_eq_abs] | |
| exact mul_le_of_le_one_left (norm_nonneg _) (hb (x - y)) | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology Convolution | |
| lemma quotientMap_sub (x y : Cover) : quotientMap (x - y) = quotientMap x - quotientMap y := by | |
| simp only [sub_eq_add_neg, quotientMap_add, quotientMap_neg] | |
| def torusApprox (E : Set Torus) (n : β) (x : Torus) : β := | |
| smoothApprox (characteristic E β quotientMap) n (representative x) | |
| lemma torusApprox_measurable {E : Set Torus} (hE : MeasurableSet E) (n : β) : | |
| Measurable (torusApprox E n) := | |
| (smoothApprox_contDiff ((measurable_characteristic hE).comp measurable_quotientMap) | |
| (fun x => characteristic_bound E (quotientMap x)) n).continuous.measurable.comp | |
| measurable_representative | |
| lemma torusApprox_bound (E : Set Torus) (n : β) (x : Torus) : |torusApprox E n x| β€ 1 := | |
| smoothApprox_bound (fun y => characteristic_bound E (quotientMap y)) n (representative x) | |
| lemma torusApprox_integrable {E : Set Torus} (hE : MeasurableSet E) (n : β) : | |
| Integrable (torusApprox E n) torusVolume := | |
| Integrable.of_bound (torusApprox_measurable hE n).aestronglyMeasurable 1 | |
| (Eventually.of_forall (torusApprox_bound E n)) | |
| lemma integrable_characteristic {E : Set Torus} (hE : MeasurableSet E) : | |
| Integrable (characteristic E) torusVolume := (integrable_const 1).indicator hE | |
| lemma torusApprox_sub_eq_integral {E : Set Torus} (hE : MeasurableSet E) (n : β) (x : Torus) : | |
| torusApprox E n x - characteristic E x = | |
| β« y : Cover, (mollifier n).normed volume y * | |
| (characteristic E (x - quotientMap y) - characteristic E x) := by | |
| have hm : Measurable (fun y => characteristic E (x - quotientMap y)) := | |
| (measurable_characteristic hE).comp (measurable_const.sub measurable_quotientMap) | |
| have hi := ((mollifier n).integrable_normed (ΞΌ := volume)).mul_bdd hm.aestronglyMeasurable | |
| (Eventually.of_forall fun y => characteristic_bound E (x - quotientMap y)) | |
| simp_rw [mul_sub] | |
| rw [integral_sub hi ((mollifier n).integrable_normed.mul_const _), | |
| integral_mul_const, (mollifier n).integral_normed, one_mul] | |
| congr 1 | |
| simp only [torusApprox, smoothApprox, convolution_def, ContinuousLinearMap.lsmul_apply, | |
| smul_eq_mul, Function.comp_def, quotientMap_sub, quotientMap_representative] | |
| theorem torusApprox_error {E : Set Torus} (hE : MeasurableSet E) (hP : perimeter E β β€) | |
| (n : β) : | |
| (β« x, |torusApprox E n x - characteristic E x| βtorusVolume) β€ | |
| (mollifier n).rOut * (perimeter E).toReal := by | |
| let Ο : Cover β β := (mollifier n).normed volume | |
| let d : Torus Γ Cover β β := fun z => | |
| |characteristic E (z.1 - quotientMap z.2) - characteristic E z.1| | |
| have hΟ : Integrable Ο volume := (mollifier n).integrable_normed | |
| have hΟm : Measurable Ο := ((mollifier n).contDiff_normed (n := (β€ : ββ))).continuous.measurable | |
| have hd : Measurable d := by | |
| exact (((measurable_characteristic hE).comp | |
| (measurable_fst.sub (measurable_quotientMap.comp measurable_snd))).sub | |
| ((measurable_characteristic hE).comp measurable_fst)).abs | |
| have hd_bound (z) : |d z| β€ 1 := by | |
| rcases characteristic_dichotomy E (z.1 - quotientMap z.2) with h | h <;> | |
| rcases characteristic_dichotomy E z.1 with h' | h' <;> simp [d, h, h'] | |
| have hbase : Integrable (fun z : Torus Γ Cover => Ο z.2) (torusVolume.prod volume) := by | |
| simpa only [one_mul] using (integrable_const (1 : β) (ΞΌ := torusVolume)).mul_prod hΟ | |
| have hprod : Integrable (fun z : Torus Γ Cover => Ο z.2 * d z) (torusVolume.prod volume) := | |
| hbase.mul_bdd hd.aestronglyMeasurable (Eventually.of_forall hd_bound) | |
| have hip (x : Torus) : Integrable | |
| (fun y : Cover => Ο y * (characteristic E (x - quotientMap y) - characteristic E x)) volume := by | |
| apply hΟ.mul_bdd (c := 1) | |
| (((measurable_characteristic hE).comp (measurable_const.sub measurable_quotientMap)).sub | |
| measurable_const).aestronglyMeasurable | |
| exact Eventually.of_forall fun y => by | |
| rcases characteristic_dichotomy E (x - quotientMap y) with h | h <;> | |
| rcases characteristic_dichotomy E x with h' | h' <;> simp [h, h'] | |
| have hinside (x : Torus) : |torusApprox E n x - characteristic E x| β€ | |
| β« y : Cover, Ο y * d (x, y) := by | |
| rw [torusApprox_sub_eq_integral hE] | |
| calc | |
| _ β€ β« y : Cover, βΟ y * (characteristic E (x - quotientMap y) - characteristic E x)β := | |
| norm_integral_le_integral_norm _ | |
| _ = _ := by | |
| apply integral_congr_ae | |
| exact Eventually.of_forall fun y => by | |
| simp [d, Real.norm_eq_abs, abs_of_nonneg ((mollifier n).nonneg_normed y), Ο] | |
| have hipx (y : Cover) : Integrable (fun x : Torus => d (x, y)) torusVolume := by | |
| apply Integrable.of_bound (hd.comp (measurable_id.prodMk measurable_const)).aestronglyMeasurable 1 | |
| exact Eventually.of_forall fun x => hd_bound (x, y) | |
| have htrans (y : Cover) : (β« x, d (x, y) βtorusVolume) β€ βyβ * (perimeter E).toReal := | |
| characteristic_translation_bound hE hP y | |
| have hkernel (y : Cover) : Ο y * (β« x, d (x, y) βtorusVolume) β€ | |
| Ο y * ((mollifier n).rOut * (perimeter E).toReal) := by | |
| by_cases hy : Ο y = 0 | |
| Β· simp [hy] | |
| have hy' : y β Metric.ball (0 : Cover) (mollifier n).rOut := by | |
| rw [β (mollifier n).support_normed_eq (ΞΌ := (volume : Measure Cover))] | |
| exact hy | |
| have hnorm : βyβ β€ (mollifier n).rOut := le_of_lt (by simpa using hy') | |
| exact mul_le_mul_of_nonneg_left | |
| ((htrans y).trans (mul_le_mul_of_nonneg_right hnorm ENNReal.toReal_nonneg)) | |
| ((mollifier n).nonneg_normed y) | |
| calc | |
| _ β€ β« x, β« y : Cover, Ο y * d (x, y) βvolume βtorusVolume := by | |
| exact integral_mono ((torusApprox_integrable hE n).sub (integrable_characteristic hE)).abs | |
| hprod.integral_prod_left hinside | |
| _ = β« y : Cover, β« x, Ο y * d (x, y) βtorusVolume := integral_integral_swap hprod | |
| _ = β« y : Cover, Ο y * (β« x, d (x, y) βtorusVolume) := by | |
| simp_rw [integral_const_mul] | |
| _ β€ β« y : Cover, Ο y * ((mollifier n).rOut * (perimeter E).toReal) := by | |
| apply integral_mono _ (hΟ.mul_const _) hkernel | |
| simpa only [integral_const_mul] using hprod.integral_prod_right | |
| _ = _ := by rw [integral_mul_const, (mollifier n).integral_normed, one_mul] | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology | |
| def closedFundamentalCube : Set Cover := | |
| (WithLp.toLp 2) '' (Icc (0 : Fin 3 β β) 1) | |
| lemma isCompact_closedFundamentalCube : IsCompact closedFundamentalCube := | |
| isCompact_Icc.image (EuclideanSpace.equiv (Fin 3) β).symm.continuous | |
| abbrev CompactCell := closedFundamentalCube | |
| instance : CompactSpace CompactCell := isCompact_iff_compactSpace.mp isCompact_closedFundamentalCube | |
| lemma representative_mem_closedCube (x : Torus) : representative x β closedFundamentalCube := by | |
| refine β¨fun i => ((AddCircle.equivIco (1 : β) 0) (x i) : β), ?_, rflβ© | |
| constructor | |
| Β· intro i | |
| exact ((AddCircle.equivIco (1 : β) 0) (x i)).property.1 | |
| Β· intro i | |
| exact le_of_lt (by simpa using ((AddCircle.equivIco (1 : β) 0) (x i)).property.2) | |
| def cubeRepresentative (x : Torus) : CompactCell := β¨representative x, representative_mem_closedCube xβ© | |
| lemma measurable_cubeRepresentative : Measurable cubeRepresentative := | |
| measurable_representative.subtype_mk | |
| lemma integrable_cubeEval (f : BoundedContinuousFunction CompactCell β) : | |
| Integrable (fun x => f (cubeRepresentative x)) torusVolume := | |
| Integrable.of_bound (f.continuous.measurable.comp measurable_cubeRepresentative).aestronglyMeasurable | |
| βfβ (Eventually.of_forall fun x => f.norm_coe_le_norm (cubeRepresentative x)) | |
| def cubeToL1 (f : BoundedContinuousFunction CompactCell β) : Lp β 1 torusVolume := | |
| (integrable_cubeEval f).toL1 (fun x => f (cubeRepresentative x)) | |
| lemma cubeToL1_lipschitz : LipschitzWith 1 cubeToL1 := by | |
| apply LipschitzWith.of_dist_le_mul | |
| intro f g | |
| rw [NNReal.coe_one, one_mul] | |
| have hi : Integrable (fun x => dist (f (cubeRepresentative x)) (g (cubeRepresentative x))) | |
| torusVolume := by | |
| simpa only [dist_eq_norm, Pi.sub_apply] using ((integrable_cubeEval f).sub (integrable_cubeEval g)).norm | |
| calc | |
| _ = β« x, dist (f (cubeRepresentative x)) (g (cubeRepresentative x)) βtorusVolume := by | |
| rw [L1.dist_eq_integral_dist] | |
| apply integral_congr_ae | |
| filter_upwards [(integrable_cubeEval f).coeFn_toL1, (integrable_cubeEval g).coeFn_toL1] with x hx hx' | |
| change dist ((integrable_cubeEval f).toL1 _ x) ((integrable_cubeEval g).toL1 _ x) = _ | |
| rw [hx, hx'] | |
| _ β€ β« _x : Torus, dist f g βtorusVolume := | |
| integral_mono hi (integrable_const _) (fun x => BoundedContinuousFunction.dist_coe_le_dist _) | |
| _ = _ := by simp | |
| def characteristicL1 (E : Set Torus) (hE : MeasurableSet E) : Lp β 1 torusVolume := | |
| (integrable_characteristic hE).toL1 (characteristic E) | |
| def torusApproxL1 (E : Set Torus) (hE : MeasurableSet E) (n : β) : Lp β 1 torusVolume := | |
| (torusApprox_integrable hE n).toL1 (torusApprox E n) | |
| lemma dist_torusApproxL1 {E : Set Torus} (hE : MeasurableSet E) (hP : perimeter E β β€) (n : β) : | |
| dist (characteristicL1 E hE) (torusApproxL1 E hE n) β€ | |
| (mollifier n).rOut * (perimeter E).toReal := by | |
| calc | |
| _ = β« x, |torusApprox E n x - characteristic E x| βtorusVolume := by | |
| rw [L1.dist_eq_integral_dist] | |
| apply integral_congr_ae | |
| filter_upwards [(integrable_characteristic hE).coeFn_toL1, | |
| (torusApprox_integrable hE n).coeFn_toL1] with x hx hx' | |
| change dist ((integrable_characteristic hE).toL1 _ x) ((torusApprox_integrable hE n).toL1 _ x) = _ | |
| rw [hx, hx', Real.dist_eq, abs_sub_comm] | |
| _ β€ _ := torusApprox_error hE hP n | |
| lemma totallyBounded_torusApproxL1 {ΞΉ : Type*} (Es : ΞΉ β Set Torus) | |
| (hEs : β i, MeasurableSet (Es i)) (n : β) : | |
| TotallyBounded (range (fun i => torusApproxL1 (Es i) (hEs i) n)) := by | |
| let F : ΞΉ β BoundedContinuousFunction CompactCell β := fun i => BoundedContinuousFunction.mkOfCompact | |
| β¨fun x => smoothApprox (characteristic (Es i) β quotientMap) n x, | |
| (smoothApprox_contDiff ((measurable_characteristic (hEs i)).comp measurable_quotientMap) | |
| (fun x => characteristic_bound (Es i) (quotientMap x)) n).continuous.comp continuous_subtype_valβ© | |
| have hLip (i) : LipschitzWith (smoothApproxLip n) (F i) := by | |
| change LipschitzWith (smoothApproxLip n) | |
| (smoothApprox (characteristic (Es i) β quotientMap) n β (Subtype.val : CompactCell β Cover)) | |
| simpa only [mul_one] using | |
| (smoothApprox_lipschitz ((measurable_characteristic (hEs i)).comp measurable_quotientMap) | |
| (fun x => characteristic_bound (Es i) (quotientMap x)) n).comp | |
| (LipschitzWith.subtype_val closedFundamentalCube) | |
| have hEq : Equicontinuous ((β) : range F β CompactCell β β) := by | |
| apply UniformEquicontinuous.equicontinuous | |
| apply LipschitzWith.uniformEquicontinuous _ (smoothApproxLip n) | |
| rintro β¨_, i, rflβ© | |
| exact hLip i | |
| have hbounded (f : BoundedContinuousFunction CompactCell β) (x : CompactCell) (hf : f β range F) : f x β Icc (-1) 1 := by | |
| obtain β¨i, rflβ© := hf | |
| exact abs_le.mp (smoothApprox_bound (fun y => characteristic_bound (Es i) (quotientMap y)) n x) | |
| have hcompact := BoundedContinuousFunction.arzela_ascoli (Icc (-1 : β) 1) isCompact_Icc | |
| (range F) hbounded hEq | |
| apply ((hcompact.image cubeToL1_lipschitz.continuous).totallyBounded).subset | |
| rintro _ β¨i, rflβ© | |
| exact β¨F i, subset_closure (mem_range_self i), rflβ© | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology | |
| lemma totallyBounded_characteristicL1 {ΞΉ : Type*} (Es : ΞΉ β Set Torus) | |
| (hEs : β i, MeasurableSet (Es i)) {C : β} (hC : 0 β€ C) | |
| (hP : β i, perimeter (Es i) β€ ENNReal.ofReal C) : | |
| TotallyBounded (range (fun i => characteristicL1 (Es i) (hEs i))) := by | |
| rw [Metric.totallyBounded_iff] | |
| intro Ξ΅ hΞ΅ | |
| have hconv : Tendsto (fun n => (mollifier n).rOut * C) atTop (π 0) := by | |
| simpa only [zero_mul] using mollifier_rOut_tendsto.mul_const C | |
| obtain β¨n, hnβ© := (hconv.eventually (gt_mem_nhds (half_pos hΞ΅))).exists | |
| obtain β¨t, ht, hcoverβ© := Metric.totallyBounded_iff.mp | |
| (totallyBounded_torusApproxL1 Es hEs n) (Ξ΅ / 2) (half_pos hΞ΅) | |
| refine β¨t, ht, ?_β© | |
| rintro _ β¨i, rflβ© | |
| obtain β¨y, hy, hiyβ© := mem_iUnionβ.mp (hcover (mem_range_self i)) | |
| apply mem_iUnionβ.mpr | |
| refine β¨y, hy, ?_β© | |
| change dist (characteristicL1 (Es i) (hEs i)) y < Ξ΅ | |
| have hfin : perimeter (Es i) β β€ := ne_top_of_le_ne_top ENNReal.ofReal_ne_top (hP i) | |
| have hreal : (perimeter (Es i)).toReal β€ C := by | |
| simpa only [ENNReal.toReal_ofReal hC] using ENNReal.toReal_mono ENNReal.ofReal_ne_top (hP i) | |
| have hdist : dist (characteristicL1 (Es i) (hEs i)) (torusApproxL1 (Es i) (hEs i) n) < Ξ΅ / 2 := | |
| ((dist_torusApproxL1 (hEs i) hfin n).trans | |
| (mul_le_mul_of_nonneg_left hreal (mollifier n).rOut_pos.le)).trans_lt hn | |
| have hiy' : dist (torusApproxL1 (Es i) (hEs i) n) y < Ξ΅ / 2 := hiy | |
| exact (dist_triangle _ _ _).trans_lt (by linarith) | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology | |
| theorem exists_ae_tendsto_characteristic {Es : β β Set Torus} | |
| (hEs : β n, MeasurableSet (Es n)) {C : β} (hC : 0 β€ C) | |
| (hP : β n, perimeter (Es n) β€ ENNReal.ofReal C) : | |
| β E : Set Torus, MeasurableSet E β§ β ns : β β β, StrictMono ns β§ | |
| βα΅ x βtorusVolume, Tendsto (fun n => characteristic (Es (ns n)) x) atTop | |
| (π (characteristic E x)) := by | |
| let fs : β β Lp β 1 torusVolume := fun n => characteristicL1 (Es n) (hEs n) | |
| have hcompact : IsCompact (closure (range fs)) := | |
| (totallyBounded_characteristicL1 Es hEs hC hP).closure.isCompact_of_isClosed isClosed_closure | |
| obtain β¨f, _, ns, hns, hconvβ© := hcompact.isSeqCompact.subseq_of_frequently_in | |
| (Frequently.of_forall (fun n => subset_closure (mem_range_self n))) | |
| obtain β¨ms, hms, haeβ© := (tendstoInMeasure_of_tendsto_Lp hconv).exists_seq_tendsto_ae | |
| have hcoe : βα΅ x βtorusVolume, β n, (fs (ns (ms n))) x = characteristic (Es (ns (ms n))) x := | |
| ae_all_iff.mpr (fun n => (integrable_characteristic (hEs (ns (ms n)))).coeFn_toL1) | |
| let E : Set Torus := {x | f x = 1} | |
| have hE : MeasurableSet E := (Lp.stronglyMeasurable f).measurable (measurableSet_singleton 1) | |
| refine β¨E, hE, ns β ms, hns.comp hms, ?_β© | |
| filter_upwards [hae, hcoe] with x hx hcx | |
| have ht : Tendsto (fun n => characteristic (Es (ns (ms n))) x) atTop (π (f x)) := by | |
| convert hx using 1 | |
| ext n | |
| exact (hcx n).symm | |
| have hfx : f x β ({0, 1} : Set β) := by | |
| apply ((finite_singleton (1 : β)).insert 0).isClosed.mem_of_tendsto ht | |
| exact Eventually.of_forall fun n => by | |
| rcases characteristic_dichotomy (Es (ns (ms n))) x with h | h <;> simp [h] | |
| have hchar : characteristic E x = f x := by | |
| rcases mem_insert_iff.mp hfx with hzero | hone | |
| Β· have hxE : x β E := by simp only [E, mem_ofPred_eq, hzero]; norm_num | |
| simp [characteristic, hxE, hzero] | |
| Β· have hxE : x β E := hone | |
| simpa [characteristic, hxE] using hone.symm | |
| simpa only [Function.comp_apply, hchar] using ht | |
| end CubicTorus | |
| namespace CubicTorus | |
| def stripe (V : β) : Set Torus := | |
| {x | ((AddCircle.equivIco (1 : β) 0) (x 0) : β) < V} | |
| def stripeUpper (V : β) : Fin 3 β β := Function.update 1 0 V | |
| lemma measurableSet_stripe (V : β) : MeasurableSet (stripe V) := by | |
| apply measurableSet_lt _ measurable_const | |
| exact measurable_subtype_coe.comp | |
| ((AddCircle.measurableEquivIco (1 : β) 0).measurable.comp (by fun_prop)) | |
| lemma stripe_lift_preimage {V : β} (hV : V β Icc 0 1) : | |
| (WithLp.toLp 2 : (Fin 3 β β) β Cover) β»ΒΉ' | |
| (fundamentalCube β© quotientMap β»ΒΉ' stripe V) = | |
| univ.pi (fun i : Fin 3 => Ico 0 (stripeUpper V i)) := by | |
| ext x | |
| change ((β i, 0 β€ x i β§ x i < 1) β§ | |
| ((AddCircle.equivIco (1 : β) 0) (x 0 : AddCircle (1 : β)) : β) < V) β _ | |
| constructor | |
| Β· rintro β¨hc, hsβ© i _ | |
| have he : ((AddCircle.equivIco (1 : β) 0) (x 0 : AddCircle (1 : β)) : β) = x 0 := | |
| AddCircle.equivIco_coe_of_mem (by simpa using hc 0) | |
| rw [he] at hs | |
| by_cases hi : i = 0 | |
| Β· subst i | |
| simpa [stripeUpper] using And.intro (hc 0).1 hs | |
| Β· simpa [stripeUpper, hi] using hc i | |
| Β· intro hx | |
| have hc : β i, 0 β€ x i β§ x i < 1 := by | |
| intro i | |
| have hh := hx i (mem_univ i) | |
| by_cases hi : i = 0 | |
| Β· subst i | |
| simp only [stripeUpper, Function.update_self, mem_Ico] at hh | |
| exact β¨hh.1, lt_of_lt_of_le hh.2 hV.2β© | |
| Β· simpa [stripeUpper, hi] using hh | |
| refine β¨hc, ?_β© | |
| rw [AddCircle.equivIco_coe_of_mem (by simpa using hc 0)] | |
| simpa [stripeUpper] using (hx 0 (mem_univ 0)).2 | |
| lemma volume_stripe {V : β} (hV : V β Icc 0 1) : | |
| torusVolume (stripe V) = ENNReal.ofReal V := by | |
| rw [torusVolume, Measure.map_apply measurable_quotientMap (measurableSet_stripe V), | |
| Measure.restrict_apply (measurable_quotientMap (measurableSet_stripe V)), inter_comm] | |
| have hm := (PiLp.volume_preserving_toLp (Fin 3)).measure_preimage | |
| ((measurableSet_fundamentalCube.inter (measurable_quotientMap (measurableSet_stripe V))).nullMeasurableSet) | |
| rw [stripe_lift_preimage hV] at hm | |
| rw [β hm, Real.volume_pi_Ico] | |
| norm_num [stripeUpper, Fin.prod_univ_succ] | |
| lemma integral_divergence_stripe {V : β} (hV : V β Icc 0 1) | |
| {F : Cover β Cover} (hF : AdmissibleField F) : | |
| (β« x in fundamentalCube β© quotientMap β»ΒΉ' stripe V, divergence F x) = | |
| (β« x in Icc (0 : Fin 2 β β) 1, | |
| F (WithLp.toLp 2 ((0 : Fin 3).insertNth V x)) 0) - | |
| (β« x in Icc (0 : Fin 2 β β) 1, | |
| F (WithLp.toLp 2 ((0 : Fin 3).insertNth 0 x)) 0) := by | |
| let e := EuclideanSpace.equiv (Fin 3) β | |
| let b := stripeUpper V | |
| let g : Fin 3 β (Fin 3 β β) β β := fun i x => F (e.symm x) i | |
| let dg : Fin 3 β (Fin 3 β β) β (Fin 3 β β) βL[β] β := | |
| fun i x => (EuclideanSpace.proj i).comp | |
| ((fderiv β F (e.symm x)).comp e.symm.toContinuousLinearMap) | |
| have hdg : β i x, HasFDerivAt (g i) (dg i x) x := by | |
| intro i x | |
| exact (EuclideanSpace.proj i).hasFDerivAt.comp x | |
| (((hF.1.differentiable (by simp)) (e.symm x)).hasFDerivAt.comp x e.symm.hasFDerivAt) | |
| have hd : (fun x => β i : Fin 3, dg i x (Pi.single i 1)) = | |
| fun x => divergence F (e.symm x) := by | |
| funext x | |
| simp [dg, divergence, e, PiLp.toLp_single] | |
| have hct : Continuous (fun x => divergence F (e.symm x)) := | |
| (continuous_divergence hF.1).comp e.symm.continuous | |
| have hb : β i, (0 : Fin 3 β β) i β€ b i := by | |
| intro i | |
| by_cases hi : i = 0 | |
| Β· subst i; simpa [b, stripeUpper] using hV.1 | |
| Β· simp [b, stripeUpper, hi] | |
| have hth := integral_divergence_of_hasFDerivAt_off_countable' | |
| (0 : Fin 3 β β) b hb g dg β countable_empty | |
| (fun i => ((EuclideanSpace.proj i).continuous.comp | |
| (hF.1.continuous.comp e.symm.continuous)).continuousOn) | |
| (fun x _ i => hdg i x) (by rw [hd]; exact hct.integrableOn_Icc) | |
| rw [hd] at hth | |
| have hzero : β i : Fin 3, i β 0 β | |
| (β« x in Icc ((0 : Fin 3 β β) β i.succAbove) (b β i.succAbove), | |
| g i (i.insertNth (b i) x)) - | |
| (β« x in Icc ((0 : Fin 3 β β) β i.succAbove) (b β i.succAbove), | |
| g i (i.insertNth 0 x)) = 0 := by | |
| intro i hi | |
| have heq : (fun x : Fin 2 β β => g i (i.insertNth (b i) x)) = | |
| (fun x : Fin 2 β β => g i (i.insertNth 0 x)) := by | |
| funext x | |
| have hbi : b i = 1 := by simp [b, stripeUpper, hi] | |
| rw [hbi] | |
| change F (WithLp.toLp 2 (i.insertNth 1 x)) i = F (WithLp.toLp 2 (i.insertNth 0 x)) i | |
| rw [adjacent_faces, hF.2.1] | |
| rw [heq, sub_self] | |
| simp only [Pi.zero_apply] at hth | |
| rw [Finset.sum_eq_single 0 (fun i _ hi => hzero i hi) (by simp)] at hth | |
| have hab : b β (0 : Fin 3).succAbove = (1 : Fin 2 β β) := by | |
| ext i | |
| simp [b, stripeUpper] | |
| have ha0 : (0 : Fin 3 β β) β (0 : Fin 3).succAbove = (0 : Fin 2 β β) := rfl | |
| rw [hab, ha0] at hth | |
| rw [β (PiLp.volume_preserving_toLp (Fin 3)).setIntegral_preimage_emb | |
| e.symm.toHomeomorph.measurableEmbedding, stripe_lift_preimage hV] | |
| rw [volume_pi, setIntegral_congr_set Measure.univ_pi_Ico_ae_eq_Icc] | |
| rw [β volume_pi] | |
| convert hth using 1 <;> simp [g, b, stripeUpper, e] | |
| rfl | |
| end CubicTorus | |
| namespace CubicTorus | |
| lemma volume_square_face : volume (Icc (0 : Fin 2 β β) 1) = 1 := by | |
| rw [Real.volume_Icc_pi] | |
| norm_num | |
| lemma stripe_flux_bound {F : Cover β Cover} (hF : AdmissibleField F) (a : β) : | |
| |β« x in Icc (0 : Fin 2 β β) 1, | |
| F (WithLp.toLp 2 ((0 : Fin 3).insertNth a x)) 0| β€ 1 := by | |
| have hh := norm_setIntegral_le_of_norm_le_const | |
| (show volume (Icc (0 : Fin 2 β β) 1) < β€ by rw [volume_square_face]; norm_num) | |
| (fun x (_ : x β Icc (0 : Fin 2 β β) 1) => | |
| (PiLp.norm_apply_le (F (WithLp.toLp 2 ((0 : Fin 3).insertNth a x))) 0).trans (hF.2.2 _)) | |
| simpa only [Real.norm_eq_abs, Measure.real, volume_square_face, ENNReal.toReal_one, mul_one] using hh | |
| theorem perimeter_stripe_le {V : β} (hV : V β Icc 0 1) : perimeter (stripe V) β€ 2 := by | |
| apply iSup_le | |
| intro F | |
| apply iSup_le | |
| intro hF | |
| rw [integral_divergence_stripe hV hF] | |
| have hupper := (abs_le.1 (stripe_flux_bound hF V)).2 | |
| have hlower := (abs_le.1 (stripe_flux_bound hF 0)).1 | |
| have hh : (β« x in Icc (0 : Fin 2 β β) 1, | |
| F (WithLp.toLp 2 ((0 : Fin 3).insertNth V x)) 0) - | |
| (β« x in Icc (0 : Fin 2 β β) 1, | |
| F (WithLp.toLp 2 ((0 : Fin 3).insertNth 0 x)) 0) β€ 2 := by linarith | |
| exact (ENNReal.ofReal_le_ofReal hh).trans_eq (by norm_num) | |
| theorem finitePerimeter_stripe {V : β} (hV : V β Icc 0 1) : FinitePerimeter (stripe V) := | |
| β¨(measurableSet_stripe V).nullMeasurableSet, (perimeter_stripe_le hV).trans_lt (by norm_num)β© | |
| theorem exists_bounded_competitor {V : β} (hV : V β Icc 0 1) : | |
| β E : Set Torus, FinitePerimeter E β§ torusVolume E = ENNReal.ofReal V β§ perimeter E β€ 2 := | |
| β¨stripe V, finitePerimeter_stripe hV, volume_stripe hV, perimeter_stripe_le hVβ© | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology | |
| theorem exists_isMinimizerAt {V : β} (hV : V β Ioo 0 1) : | |
| β E : Set Torus, IsMinimizerAt V E := by | |
| let S : Set ββ₯0β := {p | β E : Set Torus, MeasurableSet E β§ | |
| torusVolume E = ENNReal.ofReal V β§ perimeter E = p β§ p β€ 2} | |
| have hV' : V β Icc (0 : β) 1 := β¨hV.1.le, hV.2.leβ© | |
| have hne : S.Nonempty := β¨perimeter (stripe V), stripe V, measurableSet_stripe V, | |
| volume_stripe hV', rfl, perimeter_stripe_le hV'β© | |
| have hinf : sInf S β€ 2 := (sInf_le hne.choose_spec).trans hne.choose_spec.choose_spec.2.2.2 | |
| obtain β¨ps, _, hconv, hpsβ© := exists_seq_tendsto_sInf hne (OrderBot.bddBelow S) | |
| choose Es hEs hvol hpEq hpBound using hps | |
| have hbound : β n, perimeter (Es n) β€ ENNReal.ofReal 2 := by | |
| intro n | |
| rw [hpEq n] | |
| simpa using hpBound n | |
| obtain β¨E, hE, ns, hns, haeβ© := exists_ae_tendsto_characteristic hEs (by norm_num) hbound | |
| have hvo : torusVolume E = ENNReal.ofReal V := by | |
| have ht := tendsto_volume_of_ae_tendsto (fun n => (hEs (ns n)).nullMeasurableSet) | |
| hE.nullMeasurableSet hae | |
| have hc : Tendsto (fun n => torusVolume (Es (ns n))) atTop (π (ENNReal.ofReal V)) := by | |
| simpa only [hvol] using (tendsto_const_nhds : Tendsto (fun _ : β => ENNReal.ofReal V) atTop _) | |
| exact tendsto_nhds_unique ht hc | |
| have hpe : perimeter E β€ sInf S := | |
| perimeter_le_of_ae_tendsto_bound (fun n => (hEs (ns n)).nullMeasurableSet) | |
| hE.nullMeasurableSet hae (fun n => (hpEq (ns n)).le) (hconv.comp hns.tendsto_atTop) | |
| refine β¨E, β¨hE.nullMeasurableSet, (hpe.trans hinf).trans_lt (by norm_num)β©, hvo, ?_β© | |
| intro F hF hFv | |
| by_cases hFp : perimeter F β€ 2 | |
| Β· have hrep := hF.1.toMeasurable_ae_eq | |
| have hex : perimeter F β S := by | |
| refine β¨toMeasurable torusVolume F, measurableSet_toMeasurable _ _, ?_, ?_, hFpβ© | |
| Β· exact (measure_congr hrep).trans hFv | |
| Β· exact perimeter_congr_ae hrep | |
| exact hpe.trans (sInf_le hex) | |
| Β· exact (hpe.trans hinf).trans (le_of_lt (lt_of_not_ge hFp)) | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology | |
| lemma characteristic_translation_ae_of_perimeter_zero {E : Set Torus} | |
| (hE : MeasurableSet E) (hP : perimeter E = 0) (a : Torus) : | |
| (fun x β¦ characteristic E (x - a)) =α΅[torusVolume] characteristic E := by | |
| have h := characteristic_translation_bound hE (hP βΈ ENNReal.zero_ne_top) (representative a) | |
| rw [quotientMap_representative, hP, ENNReal.toReal_zero, mul_zero] at h | |
| have hg : Measurable (fun x β¦ |characteristic E (x - a) - characteristic E x|) := | |
| (((measurable_characteristic hE).comp (measurable_id.sub_const a)).sub | |
| (measurable_characteristic hE)).abs | |
| have hi : Integrable (fun x β¦ |characteristic E (x - a) - characteristic E x|) torusVolume := by | |
| apply Integrable.of_bound hg.aestronglyMeasurable 1 | |
| exact Eventually.of_forall fun x β¦ by | |
| rcases characteristic_dichotomy E (x - a) with h | h <;> | |
| rcases characteristic_dichotomy E x with h' | h' <;> simp [h, h'] | |
| have hae := (integral_eq_zero_iff_of_nonneg (fun x β¦ abs_nonneg _) hi).1 | |
| (le_antisymm h (integral_nonneg fun x β¦ abs_nonneg _)) | |
| filter_upwards [hae] with x hx | |
| exact sub_eq_zero.1 (abs_eq_zero.1 hx) | |
| theorem volume_eq_zero_or_one_of_perimeter_zero {E : Set Torus} | |
| (hE : NullMeasurableSet E torusVolume) (hP : perimeter E = 0) : | |
| torusVolume E = 0 β¨ torusVolume E = 1 := by | |
| wlog hEm : MeasurableSet E generalizing E | |
| Β· have hae := hE.toMeasurable_ae_eq | |
| have hP' : perimeter (toMeasurable torusVolume E) = 0 := (perimeter_congr_ae hae).trans hP | |
| have hh := this (measurableSet_toMeasurable torusVolume E).nullMeasurableSet hP' | |
| (measurableSet_toMeasurable torusVolume E) | |
| rwa [measure_congr hae] at hh | |
| have hall : βα΅ a βtorusVolume, βα΅ x βtorusVolume, | |
| characteristic E (x + a) = characteristic E x := by | |
| exact Eventually.of_forall fun a β¦ by | |
| have hh := characteristic_translation_ae_of_perimeter_zero hEm hP (-a) | |
| filter_upwards [hh] with x hx | |
| simpa only [sub_neg_eq_add] using hx | |
| have hswap := (Measure.ae_ae_comm (ΞΌ := torusVolume) (Ξ½ := torusVolume) | |
| (p := fun a x β¦ characteristic E (x + a) = characteristic E x) | |
| (measurableSet_eq_fun ((measurable_characteristic hEm).comp (measurable_snd.add measurable_fst)) | |
| ((measurable_characteristic hEm).comp measurable_snd))).1 hall | |
| obtain β¨x, hxβ© := hswap.exists | |
| have hav := integral_congr_ae hx | |
| rw [integral_add_left_eq_self, integral_characteristic hE, integral_const] at hav | |
| simp only [Measure.real_def, torusVolume_univ, ENNReal.toReal_one, one_smul] at hav | |
| rcases characteristic_dichotomy E x with h0 | h1 | |
| Β· left | |
| exact ((ENNReal.toReal_eq_zero_iff _).1 (hav.trans h0)).resolve_right (measure_ne_top _ _) | |
| Β· right | |
| have hh := congrArg ENNReal.ofReal (hav.trans h1) | |
| simpa only [ENNReal.ofReal_toReal (measure_ne_top _ _), ENNReal.ofReal_one] using hh | |
| theorem perimeter_pos_of_volume {V : β} (hV : V β Ioo 0 1) {E : Set Torus} | |
| (hE : NullMeasurableSet E torusVolume) (hvolume : torusVolume E = ENNReal.ofReal V) : | |
| 0 < perimeter E := by | |
| apply bot_lt_iff_ne_bot.2 | |
| intro hzero | |
| rcases volume_eq_zero_or_one_of_perimeter_zero hE hzero with h0 | h1 | |
| Β· rw [hvolume] at h0 | |
| exact (ENNReal.ofReal_pos.2 hV.1).ne' h0 | |
| Β· rw [hvolume] at h1 | |
| have hh := congrArg ENNReal.toReal h1 | |
| rw [ENNReal.toReal_ofReal hV.1.le, ENNReal.toReal_one] at hh | |
| exact hV.2.ne hh | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology | |
| def isoperimetricProfile (V : β) : β := | |
| (sInf {p : ββ₯0β | β E : Set Torus, | |
| FinitePerimeter E β§ torusVolume E = ENNReal.ofReal V β§ perimeter E = p}).toReal / 2 | |
| lemma isoperimetricProfile_eq_of_isMinimizerAt {V : β} {E : Set Torus} | |
| (hE : IsMinimizerAt V E) : isoperimetricProfile V = (perimeter E).toReal / 2 := by | |
| have heq : sInf {p : ββ₯0β | β F : Set Torus, | |
| FinitePerimeter F β§ torusVolume F = ENNReal.ofReal V β§ perimeter F = p} = perimeter E := by | |
| apply le_antisymm | |
| Β· exact sInf_le β¨E, hE.1, hE.2.1, rflβ© | |
| Β· apply le_sInf | |
| rintro p β¨F, hF, hFv, rflβ© | |
| exact hE.2.2 F hF hFv | |
| simp only [isoperimetricProfile, heq] | |
| lemma isMinimizerAt_empty : IsMinimizerAt 0 β := by | |
| refine β¨finitePerimeter_empty, by simp, ?_β© | |
| intro F _ _ | |
| rw [perimeter_empty] | |
| exact bot_le | |
| lemma isMinimizerAt_univ : IsMinimizerAt 1 univ := by | |
| have hh := (isMinimizerAt_compl (by norm_num : (0 : β) β Icc 0 1)).2 isMinimizerAt_empty | |
| simpa using hh | |
| theorem exists_isMinimizerAt_Icc {V : β} (hV : V β Icc 0 1) : | |
| β E : Set Torus, IsMinimizerAt V E := by | |
| rcases hV.1.eq_or_lt with h | h | |
| Β· subst V | |
| exact β¨β , isMinimizerAt_emptyβ© | |
| rcases hV.2.eq_or_lt with h' | h' | |
| Β· subst V | |
| exact β¨univ, isMinimizerAt_univβ© | |
| exact exists_isMinimizerAt β¨h, h'β© | |
| lemma isoperimetricProfile_nonneg (V : β) : 0 β€ isoperimetricProfile V := | |
| div_nonneg ENNReal.toReal_nonneg (by norm_num) | |
| lemma isoperimetricProfile_zero : isoperimetricProfile 0 = 0 := by | |
| rw [isoperimetricProfile_eq_of_isMinimizerAt isMinimizerAt_empty, perimeter_empty, | |
| ENNReal.toReal_zero, zero_div] | |
| lemma isoperimetricProfile_one : isoperimetricProfile 1 = 0 := by | |
| rw [isoperimetricProfile_eq_of_isMinimizerAt isMinimizerAt_univ] | |
| have hh : perimeter (univ : Set Torus) = 0 := by | |
| simpa only [compl_empty, perimeter_empty] using perimeter_compl ((MeasurableSet.empty : MeasurableSet (β : Set Torus)).nullMeasurableSet (ΞΌ := torusVolume)) | |
| rw [hh, ENNReal.toReal_zero, zero_div] | |
| lemma isoperimetricProfile_pos {V : β} (hV : V β Ioo 0 1) : | |
| 0 < isoperimetricProfile V := by | |
| obtain β¨E, hEβ© := exists_isMinimizerAt hV | |
| rw [isoperimetricProfile_eq_of_isMinimizerAt hE] | |
| exact div_pos (ENNReal.toReal_pos (perimeter_pos_of_volume hV hE.1.1 hE.2.1).ne' | |
| hE.1.2.ne) (by norm_num) | |
| lemma isoperimetricProfile_le_competitor {V : β} (hV : V β Icc 0 1) | |
| {E : Set Torus} (hE : FinitePerimeter E) (hvol : torusVolume E = ENNReal.ofReal V) : | |
| isoperimetricProfile V β€ (perimeter E).toReal / 2 := by | |
| obtain β¨F, hFβ© := exists_isMinimizerAt_Icc hV | |
| rw [isoperimetricProfile_eq_of_isMinimizerAt hF] | |
| exact div_le_div_of_nonneg_right (ENNReal.toReal_mono hE.2.ne (hF.2.2 E hE hvol)) (by norm_num) | |
| lemma isoperimetricProfile_le_one {V : β} (hV : V β Icc 0 1) : | |
| isoperimetricProfile V β€ 1 := by | |
| have hh := isoperimetricProfile_le_competitor hV (finitePerimeter_stripe hV) (volume_stripe hV) | |
| have hb := ENNReal.toReal_mono (by norm_num : (2 : ββ₯0β) β β€) (perimeter_stripe_le hV) | |
| norm_num at hb | |
| linarith | |
| lemma isoperimetricProfile_compl {V : β} (hV : V β Icc 0 1) : | |
| isoperimetricProfile (1 - V) = isoperimetricProfile V := by | |
| obtain β¨E, hEβ© := exists_isMinimizerAt_Icc hV | |
| rw [isoperimetricProfile_eq_of_isMinimizerAt hE, | |
| isoperimetricProfile_eq_of_isMinimizerAt ((isMinimizerAt_compl hV).2 hE), | |
| perimeter_compl hE.1.1] | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology | |
| lemma isClosed_profile_sublevel (a : β) : | |
| IsClosed {V | V β Icc (0 : β) 1 β§ isoperimetricProfile V β€ a} := by | |
| apply IsSeqClosed.isClosed | |
| intro Vs V hVs hV | |
| have hVI : V β Icc (0 : β) 1 := isClosed_Icc.mem_of_tendsto hV | |
| (Eventually.of_forall fun n β¦ (hVs n).1) | |
| have ha : 0 β€ a := (isoperimetricProfile_nonneg (Vs 0)).trans (hVs 0).2 | |
| have he : β n, β E : Set Torus, MeasurableSet E β§ IsMinimizerAt (Vs n) E := by | |
| intro n | |
| obtain β¨E, hEβ© := exists_isMinimizerAt_Icc (hVs n).1 | |
| refine β¨toMeasurable torusVolume E, measurableSet_toMeasurable _ _, ?_β© | |
| exact (isMinimizerAt_congr_ae hE.1.1.toMeasurable_ae_eq).2 hE | |
| choose Es hEs hmin using he | |
| have hbound : β n, perimeter (Es n) β€ ENNReal.ofReal (2 * a) := by | |
| intro n | |
| have hh := (hVs n).2 | |
| rw [isoperimetricProfile_eq_of_isMinimizerAt (hmin n)] at hh | |
| rw [β ENNReal.ofReal_toReal (hmin n).1.2.ne] | |
| exact ENNReal.ofReal_le_ofReal (by linarith) | |
| obtain β¨E, hE, ns, hns, haeβ© := exists_ae_tendsto_characteristic hEs | |
| (mul_nonneg (by norm_num) ha) hbound | |
| have hvol : torusVolume E = ENNReal.ofReal V := by | |
| have ht := tendsto_volume_of_ae_tendsto (fun n β¦ (hEs (ns n)).nullMeasurableSet) | |
| hE.nullMeasurableSet hae | |
| have ht' : Tendsto (fun n β¦ torusVolume (Es (ns n))) atTop (π (ENNReal.ofReal V)) := by | |
| simp_rw [(hmin _).2.1] | |
| exact ENNReal.continuous_ofReal.continuousAt.tendsto.comp (hV.comp hns.tendsto_atTop) | |
| exact tendsto_nhds_unique ht ht' | |
| have hP : perimeter E β€ ENNReal.ofReal (2 * a) := | |
| perimeter_le_of_ae_tendsto (fun n β¦ (hEs (ns n)).nullMeasurableSet) | |
| hE.nullMeasurableSet hae (fun n β¦ hbound (ns n)) | |
| have hEF : FinitePerimeter E := β¨hE.nullMeasurableSet, hP.trans_lt ENNReal.ofReal_lt_topβ© | |
| refine β¨hVI, ?_β© | |
| have hh := isoperimetricProfile_le_competitor hVI hEF hvol | |
| have hb := ENNReal.toReal_mono ENNReal.ofReal_ne_top hP | |
| rw [ENNReal.toReal_ofReal (mul_nonneg (by norm_num) ha)] at hb | |
| linarith | |
| theorem lowerSemicontinuousOn_isoperimetricProfile : | |
| LowerSemicontinuousOn isoperimetricProfile (Icc (0 : β) 1) := by | |
| rw [lowerSemicontinuousOn_iff_preimage_Iic] | |
| intro b | |
| refine β¨{V | V β Icc (0 : β) 1 β§ isoperimetricProfile V β€ b}, | |
| isClosed_profile_sublevel b, ?_β© | |
| ext V | |
| simp only [mem_inter_iff, mem_preimage, mem_Iic, mem_ofPred_eq, and_self_left] | |
| end CubicTorus | |
| namespace CubicTorus | |
| open Filter | |
| open scoped Topology RealInnerProductSpace | |
| lemma integrableOn_periodic_continuous {f : Cover β β} (hf : Continuous f) | |
| (hp : β n x, f (x + latticeVector n) = f x) : IntegrableOn f fundamentalCube := by | |
| let : IsFiniteMeasure (volume.restrict fundamentalCube) := | |
| β¨by rw [Measure.restrict_apply_univ, volume_fundamentalCube]; norm_numβ© | |
| obtain β¨M, _, hMβ© := periodic_bounded hf hp | |
| exact Integrable.of_bound hf.aestronglyMeasurable M (Eventually.of_forall hM) | |
| lemma divergence_smul_function {f : Cover β β} {F : Cover β Cover} {point : Cover} | |
| (hf : DifferentiableAt β f point) (hF : DifferentiableAt β F point) : | |
| divergence (fun y β¦ f y β’ F y) point = f point * divergence F point + | |
| βͺgradient f point, F pointβ« := by | |
| have ha : (β i : Fin 3, F point i β’ EuclideanSpace.single i 1) = F point := by | |
| ext j | |
| simp [Pi.single_apply] | |
| rw [inner_gradient_left] | |
| conv_rhs => rw [β ha, map_sum] | |
| change (β i : Fin 3, (fderiv β (f β’ F) point (EuclideanSpace.single i 1)) i) = _ | |
| rw [fderiv_smul hf hF] | |
| simp only [add_apply, smul_apply, ContinuousLinearMap.smulRight_apply, | |
| PiLp.add_apply, PiLp.smul_apply, smul_eq_mul, Finset.sum_add_distrib, | |
| divergence, Finset.mul_sum, map_smul] | |
| congr 1 | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| simp [mul_comm] | |
| lemma admissible_cutoff {f : Cover β β} (hf : ContDiff β (β€ : ββ) f) | |
| (hp : β n x, f (x + latticeVector n) = f x) (hb : β x, f x β Icc 0 1) | |
| {F : Cover β Cover} (hF : AdmissibleField F) : | |
| AdmissibleField (fun x β¦ f x β’ F x) := by | |
| refine β¨hf.smul hF.1, ?_, ?_β© | |
| Β· intro n x | |
| change f (x + latticeVector n) β’ F (x + latticeVector n) = _ | |
| rw [hp, hF.2.1] | |
| Β· intro x | |
| rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (hb x).1] | |
| exact (mul_le_of_le_one_left (norm_nonneg _) (hb x).2).trans (hF.2.2 x) | |
| lemma gradient_contDiff {f : Cover β β} (hf : ContDiff β (β€ : ββ) f) : | |
| ContDiff β (β€ : ββ) (gradient f) := by | |
| exact (InnerProductSpace.toDual β Cover).symm.toContinuousLinearEquiv.contDiff.comp | |
| (hf.fderiv_right (m := (β€ : ββ)) (by simp)) | |
| lemma gradient_periodic {f : Cover β β} | |
| (hp : β n x, f (x + latticeVector n) = f x) (n : Fin 3 β β€) (x : Cover) : | |
| gradient f (x + latticeVector n) = gradient f x := by | |
| unfold gradient | |
| rw [fderiv_periodic hp] | |
| end CubicTorus | |
| end | |
| end | |
| end | |
| end OAI | |