Download data/lean/OAI/Geometry/DoublingHilbert/Integration.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 11.8 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/DoublingHilbert/Integration.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/DoublingHilbert/Integration.lean
-
curl -L -o Integration.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/DoublingHilbert/Integration.lean
11.8 kB
| import OAI.Geometry.DoublingHilbert.Derivatives | |
| namespace OAI | |
| /-! Line integration and global Lipschitz extensions of sheets. -/ | |
| open MeasureTheory Set Filter | |
| open scoped BigOperators Topology | |
| open MeasureTheory Set Filter | |
| open scoped Topology | |
| noncomputable section | |
| namespace DoublingHilbert | |
| section FTC | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E] | |
| /-- Vector-valued FTC for a Lipschitz curve with its a.e. derivative specified. | |
| This is the scalar absolutely-continuous FTC tested against the continuous dual. -/ | |
| theorem integral_eq_sub_of_lipschitz_ae_derivative | |
| {f g : β β E} {a b : β} {C : NNReal} | |
| (hf : LipschitzOnWith C f (uIcc a b)) | |
| (hg : IntervalIntegrable g volume a b) | |
| (hderiv : βα΅ x, x β uIcc a b β HasDerivAt f (g x) x) : | |
| (β« x in a..b, g x) = f b - f a := by | |
| refine (SeparatingDual.eq_iff_forall_dual_eq (R := β)).2 fun L => ?_ | |
| rw [β L.intervalIntegral_comp_comm hg, L.map_sub] | |
| have hAC := (L.lipschitzWith.comp_lipschitzOnWith hf).absolutelyContinuousOnInterval | |
| calc | |
| (β« x in a..b, L (g x)) = β« x in a..b, deriv (L β f) x := by | |
| apply intervalIntegral.integral_congr_ae | |
| filter_upwards [hderiv] with x hx hxab | |
| have h'x := L.hasFDerivAt.comp_hasDerivAt x (hx (uIoc_subset_uIcc hxab)) | |
| exact h'x.deriv.symm | |
| _ = L (f b) - L (f a) := hAC.integral_deriv_eq_sub | |
| /-- The endpoint estimate used for each full horizontal or vertical strip. -/ | |
| theorem norm_integral_derivative_sub_le | |
| {f g f' g' : β β E} {a b R : β} {Cβ Cβ : NNReal} | |
| (hf : LipschitzOnWith Cβ f (uIcc a b)) | |
| (hg : LipschitzOnWith Cβ g (uIcc a b)) | |
| (hf' : IntervalIntegrable f' volume a b) | |
| (hg' : IntervalIntegrable g' volume a b) | |
| (hdf : βα΅ x, x β uIcc a b β HasDerivAt f (f' x) x) | |
| (hdg : βα΅ x, x β uIcc a b β HasDerivAt g (g' x) x) | |
| (ha : βf a - g aβ β€ R) (hb : βf b - g bβ β€ R) : | |
| ββ« x in a..b, f' x - g' xβ β€ 2 * R := by | |
| rw [intervalIntegral.integral_sub hf' hg', | |
| integral_eq_sub_of_lipschitz_ae_derivative hf hf' hdf, | |
| integral_eq_sub_of_lipschitz_ae_derivative hg hg' hdg] | |
| have heq : f b - f a - (g b - g a) = (f b - g b) - (f a - g a) := by abel | |
| rw [heq] | |
| exact (norm_sub_le _ _).trans (by linarith) | |
| end FTC | |
| section MeanSquares | |
| variable {X E : Type*} [MeasurableSpace X] {ΞΌ : Measure X} | |
| [NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E] | |
| /-- Hilbert-space Cauchy--Schwarz in the form needed for line transport; | |
| in fact convexity makes this valid for every normed target. -/ | |
| theorem norm_average_sq_le_average_norm_sq [IsFiniteMeasure ΞΌ] [NeZero ΞΌ] | |
| {G : X β E} (hG : Integrable G ΞΌ) | |
| (hG2 : Integrable (fun x => βG xβ ^ 2) ΞΌ) : | |
| ββ¨ x, G x βΞΌβ ^ 2 β€ β¨ x, βG xβ ^ 2 βΞΌ := by | |
| exact ((convexOn_norm (convex_univ : Convex β (Set.univ : Set E))).pow | |
| (fun _ _ => norm_nonneg _) 2).map_average_le | |
| (continuous_norm.pow 2).continuousOn isClosed_univ | |
| (Eventually.of_forall fun _ => mem_univ _) hG hG2 | |
| /-- The integral version of the preceding averaged estimate, retaining the exact mass. -/ | |
| theorem norm_integral_sq_le_mass_mul [IsFiniteMeasure ΞΌ] | |
| {G : X β E} (hG : Integrable G ΞΌ) | |
| (hG2 : Integrable (fun x => βG xβ ^ 2) ΞΌ) : | |
| ββ« x, G x βΞΌβ ^ 2 β€ ΞΌ.real Set.univ * (β« x, βG xβ ^ 2 βΞΌ) := by | |
| by_cases hΞΌ : ΞΌ = 0 | |
| Β· subst ΞΌ; simp | |
| have : NeZero ΞΌ := β¨hΞΌβ© | |
| have hm := measureReal_univ_pos (ΞΌ := ΞΌ) | |
| have hj := norm_average_sq_le_average_norm_sq hG hG2 | |
| simp only [average_eq, norm_smul, Real.norm_eq_abs, abs_inv, | |
| abs_of_nonneg hm.le, smul_eq_mul, β div_eq_inv_mul] at hj | |
| have hj' := mul_le_mul_of_nonneg_left hj (sq_nonneg (ΞΌ.real univ)) | |
| field_simp at hj' | |
| nlinarith | |
| /-- Squared oscillation of a Lipschitz curve is bounded by its derivative energy. -/ | |
| theorem curve_oscillation_sq_le_integral | |
| {f g : β β E} {a b : β} {C : NNReal} (hab : a β€ b) | |
| (hf : LipschitzOnWith C f (uIcc a b)) | |
| (hg : IntervalIntegrable g volume a b) | |
| (hg2 : IntervalIntegrable (fun x => βg xβ ^ 2) volume a b) | |
| (hderiv : βα΅ x, x β uIcc a b β HasDerivAt f (g x) x) : | |
| βf b - f aβ ^ 2 β€ (b - a) * (β« x in a..b, βg xβ ^ 2) := by | |
| rw [β integral_eq_sub_of_lipschitz_ae_derivative hf hg hderiv] | |
| rw [intervalIntegral.integral_of_le hab, intervalIntegral.integral_of_le hab] | |
| have h := norm_integral_sq_le_mass_mul hg.1 hg2.1 | |
| simpa only [measureReal_restrict_apply_univ, Real.volume_real_Ioc, | |
| max_eq_left (sub_nonneg.mpr hab)] using h | |
| end MeanSquares | |
| end DoublingHilbert | |
| namespace DoublingHilbert | |
| open MeasureTheory Set Filter | |
| open scoped Topology | |
| section PartialIntegration | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [CompleteSpace E] [FiniteDimensional β E] | |
| /-- Actual derivative columns of global extensions. -/ | |
| def column (f : β Γ β β E) (v : β Γ β) (p : β Γ β) : E := fderiv β f p v | |
| omit [CompleteSpace E] [FiniteDimensional β E] in | |
| theorem norm_column_le {f : β Γ β β E} {C : NNReal} (hf : LipschitzWith C f) | |
| (v : β Γ β) (p : β Γ β) : βcolumn f v pβ β€ C * βvβ := | |
| ((fderiv β f p).le_opNorm v).trans | |
| (mul_le_mul_of_nonneg_right (norm_fderiv_le_of_lipschitz β hf) (norm_nonneg v)) | |
| omit [CompleteSpace E] in | |
| theorem stronglyMeasurable_column (f : β Γ β β E) (v : β Γ β) : | |
| StronglyMeasurable (column f v) := by | |
| let : MeasurableSpace E := borel E | |
| have : BorelSpace E := β¨rflβ© | |
| exact ((ContinuousLinearMap.apply β E v).continuous.measurable.comp | |
| (measurable_fderiv β f)).stronglyMeasurable | |
| omit [NormedSpace β E] [CompleteSpace E] [FiniteDimensional β E] in | |
| theorem intervalIntegrable_of_bound {g : β β E} (hg : AEStronglyMeasurable g volume) | |
| {M : β} (hM : β x, βg xβ β€ M) (a b : β) : IntervalIntegrable g volume a b := by | |
| rw [intervalIntegrable_iff'] | |
| exact IntegrableOn.of_bound isCompact_uIcc.measure_lt_top hg.restrict M | |
| (Eventually.of_forall hM) | |
| omit [CompleteSpace E] in | |
| theorem intervalIntegrable_column_x {f : β Γ β β E} {C : NNReal} (hf : LipschitzWith C f) | |
| (v : β Γ β) (y a b : β) : | |
| IntervalIntegrable (fun x => column f v (x, y)) volume a b := by | |
| apply intervalIntegrable_of_bound | |
| ((stronglyMeasurable_column f v).comp_measurable (measurable_id.prodMk measurable_const)).aestronglyMeasurable | |
| intro x | |
| exact norm_column_le hf v (x, y) | |
| omit [CompleteSpace E] in | |
| theorem intervalIntegrable_column_y {f : β Γ β β E} {C : NNReal} (hf : LipschitzWith C f) | |
| (v : β Γ β) (x a b : β) : | |
| IntervalIntegrable (fun y => column f v (x, y)) volume a b := by | |
| apply intervalIntegrable_of_bound | |
| ((stronglyMeasurable_column f v).comp_measurable (measurable_const.prodMk measurable_id)).aestronglyMeasurable | |
| intro y | |
| exact norm_column_le hf v (x, y) | |
| omit [NormedSpace β E] [CompleteSpace E] [FiniteDimensional β E] in | |
| theorem lipschitz_line_x {f : β Γ β β E} {C : NNReal} (hf : LipschitzWith C f) (y : β) : | |
| LipschitzWith C (fun x => f (x, y)) := by | |
| apply LipschitzWith.of_dist_le_mul | |
| intro x x' | |
| simpa only [dist_prod_same_right] using hf.dist_le_mul (x, y) (x', y) | |
| omit [NormedSpace β E] [CompleteSpace E] [FiniteDimensional β E] in | |
| theorem lipschitz_line_y {f : β Γ β β E} {C : NNReal} (hf : LipschitzWith C f) (x : β) : | |
| LipschitzWith C (fun y => f (x, y)) := by | |
| apply LipschitzWith.of_dist_le_mul | |
| intro y y' | |
| simpa only [dist_prod_same_left] using hf.dist_le_mul (x, y) (x, y') | |
| omit [CompleteSpace E] in | |
| theorem ae_line_derivative_x {f : β Γ β β E} {C : NNReal} (hf : LipschitzWith C f) : | |
| βα΅ y, βα΅ x, HasDerivAt (fun t => f (t, y)) (column f (1, 0) (x, y)) x := by | |
| have hd := hf.ae_differentiableAt (ΞΌ := (volume : Measure (β Γ β))) | |
| rw [Measure.volume_eq_prod] at hd | |
| have hs := Measure.measurePreserving_swap.quasiMeasurePreserving.ae hd | |
| filter_upwards [Measure.ae_ae_of_ae_prod hs] with y hy | |
| filter_upwards [hy] with x hx | |
| exact hx.hasFDerivAt.comp_hasDerivAt x ((hasDerivAt_id x).prodMk (hasDerivAt_const x y)) | |
| omit [CompleteSpace E] in | |
| theorem ae_line_derivative_y {f : β Γ β β E} {C : NNReal} (hf : LipschitzWith C f) : | |
| βα΅ x, βα΅ y, HasDerivAt (fun t => f (x, t)) (column f (0, 1) (x, y)) y := by | |
| have hd := hf.ae_differentiableAt (ΞΌ := (volume : Measure (β Γ β))) | |
| rw [Measure.volume_eq_prod] at hd | |
| filter_upwards [Measure.ae_ae_of_ae_prod hd] with x hx | |
| filter_upwards [hx] with y hy | |
| exact hy.hasFDerivAt.comp_hasDerivAt y ((hasDerivAt_const y x).prodMk (hasDerivAt_id y)) | |
| /-- Fubini plus the vector FTC controls every subinterval on almost every horizontal line. -/ | |
| theorem ae_integral_column_x {f : β Γ β β E} {C : NNReal} (hf : LipschitzWith C f) : | |
| βα΅ y, β a b : β, (β« x in a..b, column f (1, 0) (x, y)) = f (b, y) - f (a, y) := by | |
| filter_upwards [ae_line_derivative_x hf] with y hy | |
| intro a b | |
| exact integral_eq_sub_of_lipschitz_ae_derivative (lipschitz_line_x hf y).lipschitzOnWith | |
| (intervalIntegrable_column_x hf (1, 0) y a b) (hy.mono fun _ h _ => h) | |
| /-- The corresponding vertical-line identity. -/ | |
| theorem ae_integral_column_y {f : β Γ β β E} {C : NNReal} (hf : LipschitzWith C f) : | |
| βα΅ x, β a b : β, (β« y in a..b, column f (0, 1) (x, y)) = f (x, b) - f (x, a) := by | |
| filter_upwards [ae_line_derivative_y hf] with x hx | |
| intro a b | |
| exact integral_eq_sub_of_lipschitz_ae_derivative (lipschitz_line_y hf x).lipschitzOnWith | |
| (intervalIntegrable_column_y hf (0, 1) x a b) (hx.mono fun _ h _ => h) | |
| end PartialIntegration | |
| end DoublingHilbert | |
| namespace DoublingHilbert | |
| open MeasureTheory Set Filter | |
| open scoped Topology | |
| noncomputable section | |
| section Extensions | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| [CompleteSpace E] [FiniteDimensional β E] | |
| def globalSheet {f : constructedSet β E} {D : NNReal} (hf : LipschitzWith D f) | |
| (w : Tuple) : Base β E := | |
| (exists_lipschitz_extension_finiteDimensional (embeddingSheet_lipschitz hf w)).choose | |
| omit [CompleteSpace E] in | |
| theorem globalSheet_lipschitz {f : constructedSet β E} {D : NNReal} | |
| (hf : LipschitzWith D f) (w : Tuple) : | |
| β L : NNReal, LipschitzWith L (globalSheet hf w) := by | |
| obtain β¨L, hL, _β© := | |
| (exists_lipschitz_extension_finiteDimensional (embeddingSheet_lipschitz hf w)).choose_spec | |
| exact β¨L, hLβ© | |
| omit [CompleteSpace E] in | |
| theorem globalSheet_eqOn {f : constructedSet β E} {D : NNReal} | |
| (hf : LipschitzWith D f) (w : Tuple) : | |
| EqOn (globalSheet hf w) (embeddingSheet f w) (sheetDomain w) := by | |
| obtain β¨_, _, heqβ© := | |
| (exists_lipschitz_extension_finiteDimensional (embeddingSheet_lipschitz hf w)).choose_spec | |
| exact heq.symm | |
| omit [CompleteSpace E] in | |
| theorem column_globalSheet {f : constructedSet β E} {D : NNReal} | |
| (hf : LipschitzWith D f) (w : Tuple) {p : Base} (hp : p β sheetDomain w) (v : Base) : | |
| column (globalSheet hf w) v p = sheetColumn (embeddingSheet f w) (sheetDomain w) v p := by | |
| have heq : globalSheet hf w =αΆ [π p] embeddingSheet f w := | |
| (isOpen_sheetDomain w).eventually_mem hp |>.mono fun q hq => globalSheet_eqOn hf w hq | |
| rw [column, heq.fderiv_eq] | |
| simp only [sheetColumn, Set.indicator_of_mem hp] | |
| theorem ae_globalSheet_pair {f : constructedSet β E} {D : NNReal} | |
| (hf : LipschitzWith D f) (w : Tuple) : | |
| βα΅ p, p β sheetDomain w β | |
| (βcolumn (globalSheet hf w) (1, 0) pβ ^ 2, | |
| βcolumn (globalSheet hf w) (0, 1) pβ ^ 2) β derivativeCompact f := by | |
| filter_upwards [ae_good_embeddingSheet hf w] with p hp hmem | |
| rw [column_globalSheet hf w hmem, column_globalSheet hf w hmem] | |
| exact subset_closure β¨w, p, hp hmem, rflβ© | |
| end Extensions | |
| end | |
| end DoublingHilbert | |
| end | |
| end OAI | |