Download data/lean/OAI/Analysis/DirectCrouzeix/CompactIntegrals.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 11.1 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/DirectCrouzeix/CompactIntegrals.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/DirectCrouzeix/CompactIntegrals.lean
-
curl -L -o CompactIntegrals.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/DirectCrouzeix/CompactIntegrals.lean
11.1 kB
| import OAI.Analysis.DirectCrouzeix.DomainCore | |
| namespace OAI | |
| universe u_87 u_88 u_89 u_90 u_91 u_92 u_93 | |
| noncomputable section | |
| open scoped Matrix Matrix.Norms.L2Operator Kronecker | |
| noncomputable section | |
| open MeasureTheory Set Filter Metric | |
| open scoped Topology Interval ENNReal NNReal ComplexConjugate | |
| namespace DirectCrouzeix.Faber | |
| theorem integrable_of_continuous_compact {Ξ± : Type u_87} {E : Type u_88} [TopologicalSpace Ξ±] | |
| [MeasurableSpace Ξ±] [OpensMeasurableSpace Ξ±] [CompactSpace Ξ±] | |
| [NormedAddCommGroup E] (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] | |
| {f : Ξ± β E} (hf : Continuous f) : Integrable f ΞΌ := | |
| hf.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace f) | |
| theorem continuousOn_integral_compact {Ξ± : Type u_89} {Ξ² : Type u_90} {E : Type u_91} | |
| [MetricSpace Ξ±] [ProperSpace Ξ±] | |
| [TopologicalSpace Ξ²] [MeasurableSpace Ξ²] [OpensMeasurableSpace Ξ²] | |
| [CompactSpace Ξ²] [SecondCountableTopology Ξ²] | |
| [NormedAddCommGroup E] [NormedSpace β E] | |
| (ΞΌ : Measure Ξ²) [IsFiniteMeasure ΞΌ] {s : Set Ξ±} (hs : IsOpen s) | |
| {f : Ξ± β Ξ² β E} (hf : ContinuousOn f.uncurry (s ΓΛ’ univ)) : | |
| ContinuousOn (fun x => β« t, f x t βΞΌ) s := by | |
| intro x hx | |
| obtain β¨Ξ΅,hΞ΅,hsubβ© := nhds_basis_closedBall.mem_iff.mp (hs.mem_nhds hx) | |
| have hc : Continuous (fun p : closedBall x Ξ΅ Γ Ξ² => f p.1 p.2) := by | |
| apply hf.comp_continuous | |
| ((continuous_subtype_val.comp continuous_fst).prodMk continuous_snd) | |
| intro p | |
| exact β¨hsub p.1.property,mem_univ _β© | |
| have hi : Continuous (fun y : closedBall x Ξ΅ => β« t, f y t βΞΌ) := by | |
| simpa using continuous_parametric_integral_of_continuous (ΞΌ := ΞΌ) hc isCompact_univ | |
| have hi' : ContinuousOn (fun y => β« t, f y t βΞΌ) (closedBall x Ξ΅) := | |
| continuousOn_iff_continuous_domRestrict.mpr hi | |
| exact (hi'.continuousAt (closedBall_mem_nhds x hΞ΅)).continuousWithinAt | |
| theorem hasDerivAt_integral_compact {Ξ± : Type u_92} {E : Type u_93} | |
| [TopologicalSpace Ξ±] [MeasurableSpace Ξ±] [OpensMeasurableSpace Ξ±] | |
| [CompactSpace Ξ±] [SecondCountableTopology Ξ±] | |
| [NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E] | |
| (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] {s : Set β} (hs : IsOpen s) | |
| {f f' : β β Ξ± β E} | |
| (hf : ContinuousOn f.uncurry (s ΓΛ’ univ)) | |
| (hf' : ContinuousOn f'.uncurry (s ΓΛ’ univ)) | |
| (hd : β z β s, β t, HasDerivAt (fun w => f w t) (f' z t) z) | |
| {z : β} (hz : z β s) : | |
| HasDerivAt (fun w => β« t, f w t βΞΌ) (β« t, f' z t βΞΌ) z := by | |
| obtain β¨Ξ΅,hΞ΅,hsubβ© := nhds_basis_closedBall.mem_iff.mp (hs.mem_nhds hz) | |
| have hcf (w : β) (hw : w β s) : Continuous (f w) := by | |
| exact hf.comp_continuous (continuous_const.prodMk continuous_id) (fun t => β¨hw,mem_univ _β©) | |
| have hcf' (w : β) (hw : w β s) : Continuous (f' w) := by | |
| exact hf'.comp_continuous (continuous_const.prodMk continuous_id) (fun t => β¨hw,mem_univ _β©) | |
| obtain β¨B,hBβ© := ((isCompact_closedBall z Ξ΅).prod isCompact_univ).exists_bound_of_continuousOn | |
| (hf'.mono (prod_mono hsub Subset.rfl)) | |
| apply (hasDerivAt_integral_of_dominated_loc_of_deriv_le | |
| (s := closedBall z Ξ΅) (bound := fun _ => B) (closedBall_mem_nhds z hΞ΅) | |
| ?_ (integrable_of_continuous_compact ΞΌ (hcf z hz)) | |
| (hcf' z hz).aestronglyMeasurable ?_ (integrable_const B) ?_).2 | |
| Β· filter_upwards [hs.mem_nhds hz] with w hw | |
| exact (hcf w hw).aestronglyMeasurable | |
| Β· exact ae_of_all ΞΌ (fun t w hw => hB (w,t) β¨hw,mem_univ _β©) | |
| Β· exact ae_of_all ΞΌ (fun t w hw => hd w (hsub hw) t) | |
| abbrev Parameter := Set.Icc (0 : β) 1 | |
| def chord (u v : β) (t : β) : β := (1-t) β’ u + t β’ v | |
| theorem chord_mem {s : Set β} (hs : Convex β s) {u v : β} (hu : u β s) (hv : v β s) | |
| {t : β} (ht : t β Icc (0 : β) 1) : chord u v t β s := | |
| hs hu hv (sub_nonneg.mpr ht.2) ht.1 (sub_add_cancel _ _) | |
| theorem continuous_chord : Continuous (fun p : (β Γ β) Γ β => chord p.1.1 p.1.2 p.2) := by | |
| unfold chord | |
| fun_prop | |
| def chordIntegral (f : β β β) (w : Parameter β β) (u v : β) : β := | |
| β« t : Parameter, w t * f (chord u v t) | |
| theorem continuousOn_chordIntegral {s : Set β} (hs : IsOpen s) (hconv : Convex β s) | |
| {f : β β β} (hf : ContinuousOn f s) {w : Parameter β β} (hw : Continuous w) : | |
| ContinuousOn (fun p : β Γ β => chordIntegral f w p.1 p.2) (s ΓΛ’ s) := by | |
| apply continuousOn_integral_compact volume (hs.prod hs) | |
| apply (hw.comp continuous_snd).continuousOn.mul | |
| apply hf.comp | |
| Β· exact (continuous_chord.comp | |
| (continuous_fst.prodMk (continuous_subtype_val.comp continuous_snd))).continuousOn | |
| Β· intro p hp | |
| exact chord_mem hconv hp.1.1 hp.1.2 p.2.property | |
| theorem hasDerivAt_chord_left (u v : β) (t : β) : | |
| HasDerivAt (fun z => chord z v t) ((1-t : β) : β) u := by | |
| simpa [chord] using ((hasDerivAt_id u).const_smul (1-t : β)).add_const (t β’ v) | |
| theorem hasDerivAt_chord_right (u v : β) (t : β) : | |
| HasDerivAt (fun z => chord u z t) (t : β) v := by | |
| simpa [chord] using ((hasDerivAt_id v).const_smul t).const_add ((1-t) β’ u) | |
| theorem hasDerivAt_chordIntegral_left {s : Set β} (hs : IsOpen s) (hconv : Convex β s) | |
| {f : β β β} (hf : AnalyticOnNhd β f s) {w : Parameter β β} (hw : Continuous w) | |
| {u v : β} (hu : u β s) (hv : v β s) : | |
| HasDerivAt (fun z => chordIntegral f w z v) | |
| (chordIntegral (deriv f) (fun t => w t * ((1-(t : β) : β) : β)) u v) u := by | |
| have hc : ContinuousOn (fun p : β Γ Parameter => chord p.1 v p.2) (s ΓΛ’ univ) := by | |
| unfold chord | |
| fun_prop | |
| have hm : MapsTo (fun p : β Γ Parameter => chord p.1 v p.2) (s ΓΛ’ univ) s := | |
| fun p hp => chord_mem hconv hp.1 hv p.2.property | |
| apply hasDerivAt_integral_compact volume hs | |
| ((hw.comp continuous_snd).continuousOn.mul (hf.continuousOn.comp hc hm)) | |
| (((hw.comp continuous_snd).continuousOn.mul | |
| (Complex.continuous_ofReal.comp (continuous_const.sub (continuous_subtype_val.comp continuous_snd))).continuousOn).mul | |
| (hf.deriv.continuousOn.comp hc hm)) ?_ hu | |
| intro z hz t | |
| have hd := ((hf _ (chord_mem hconv hz hv t.property)).differentiableAt.hasDerivAt.comp z | |
| (hasDerivAt_chord_left z v t)).const_mul (w t) | |
| simpa only [Function.comp_def, mul_assoc, mul_comm, mul_left_comm] using hd | |
| theorem hasDerivAt_chordIntegral_right {s : Set β} (hs : IsOpen s) (hconv : Convex β s) | |
| {f : β β β} (hf : AnalyticOnNhd β f s) {w : Parameter β β} (hw : Continuous w) | |
| {u v : β} (hu : u β s) (hv : v β s) : | |
| HasDerivAt (fun z => chordIntegral f w u z) | |
| (chordIntegral (deriv f) (fun t => w t * ((t : β) : β)) u v) v := by | |
| have hc : ContinuousOn (fun p : β Γ Parameter => chord u p.1 p.2) (s ΓΛ’ univ) := by | |
| unfold chord | |
| fun_prop | |
| have hm : MapsTo (fun p : β Γ Parameter => chord u p.1 p.2) (s ΓΛ’ univ) s := | |
| fun p hp => chord_mem hconv hu hp.1 p.2.property | |
| apply hasDerivAt_integral_compact volume hs | |
| ((hw.comp continuous_snd).continuousOn.mul (hf.continuousOn.comp hc hm)) | |
| (((hw.comp continuous_snd).continuousOn.mul | |
| (Complex.continuous_ofReal.comp (continuous_subtype_val.comp continuous_snd)).continuousOn).mul | |
| (hf.deriv.continuousOn.comp hc hm)) ?_ hv | |
| intro z hz t | |
| have hd := ((hf _ (chord_mem hconv hu hz t.property)).differentiableAt.hasDerivAt.comp z | |
| (hasDerivAt_chord_right u z t)).const_mul (w t) | |
| simpa only [Function.comp_def, mul_assoc, mul_comm, mul_left_comm] using hd | |
| theorem chordIntegral_one_eq_interval (f : β β β) (u v : β) : | |
| chordIntegral f (fun _ => 1) u v = β« t in (0:β)..1, f (chord u v t) := by | |
| simp only [chordIntegral, one_mul] | |
| rw [show (β« t : Parameter, f (chord u v t)) = β« t in Icc (0:β) 1, f (chord u v t) from | |
| integral_subtype measurableSet_Icc (fun t : β => f (chord u v t)), | |
| integral_Icc_eq_integral_Ioc, intervalIntegral.integral_of_le zero_le_one] | |
| theorem hasDerivAt_chord_time (u v : β) (t : β) : | |
| HasDerivAt (chord u v) (v-u) t := by | |
| have hi : HasDerivAt (fun t : β => (t : β)) 1 t := by | |
| simpa only [Complex.ofRealCLM_apply, Complex.ofReal_one] using! (Complex.ofRealCLM.hasDerivAt (x := t)) | |
| have hd := ((hi.const_sub 1).mul_const u).add (hi.mul_const v) | |
| change HasDerivAt (fun y => chord u v y) (v-u) t | |
| simpa [chord, Complex.real_smul, sub_eq_add_neg, add_comm] using! hd | |
| theorem chordIntegral_deriv_mul {s : Set β} (hconv : Convex β s) | |
| {f : β β β} (hf : AnalyticOnNhd β f s) {u v : β} (hu : u β s) (hv : v β s) : | |
| chordIntegral (deriv f) (fun _ => 1) u v * (v-u) = f v - f u := by | |
| rw [chordIntegral_one_eq_interval, β intervalIntegral.integral_mul_const] | |
| have hc : ContinuousOn (fun t : β => chord u v t) (Icc 0 1) := by unfold chord; fun_prop | |
| have hm : MapsTo (fun t : β => chord u v t) (Icc 0 1) s := fun t ht => chord_mem hconv hu hv ht | |
| have hi : IntervalIntegrable (fun t : β => deriv f (chord u v t) * (v-u)) volume 0 1 := by | |
| apply ContinuousOn.intervalIntegrable | |
| rw [uIcc_of_le zero_le_one] | |
| exact (hf.deriv.continuousOn.comp hc hm).mul_const _ | |
| have ht := intervalIntegral.integral_eq_sub_of_hasDerivAt (a := 0) (b := 1) (f := fun t => f (chord u v t)) | |
| (f' := fun t => deriv f (chord u v t) * (v-u)) (fun t ht => by | |
| have ht' : t β Icc (0:β) 1 := by simpa only [uIcc_of_le zero_le_one] using ht | |
| simpa only [smul_eq_mul, mul_comm, Function.comp_def] using | |
| ((hf _ (hm ht')).differentiableAt.hasDerivAt.scomp t (hasDerivAt_chord_time u v t))) hi | |
| simpa [chord] using ht | |
| theorem chordIntegral_deriv_eq_dslope {s : Set β} (hconv : Convex β s) | |
| {f : β β β} (hf : AnalyticOnNhd β f s) {u v : β} (hu : u β s) (hv : v β s) : | |
| chordIntegral (deriv f) (fun _ => 1) u v = dslope f v u := by | |
| by_cases huv : u = v | |
| Β· subst u | |
| have he (t : β) : chord v v t = v := by | |
| rw [chord, β add_smul, sub_add_cancel, one_smul] | |
| simp [chordIntegral, he, dslope_same] | |
| Β· rw [dslope_of_ne f huv, slope, smul_eq_mul] | |
| simp only [vsub_eq_sub] | |
| have hm := chordIntegral_deriv_mul hconv hf hu hv | |
| field_simp | |
| linear_combination -hm | |
| theorem analyticOnNhd_chordIntegral_left {s : Set β} (hs : IsOpen s) (hconv : Convex β s) | |
| {f : β β β} (hf : AnalyticOnNhd β f s) {w : Parameter β β} (hw : Continuous w) | |
| {v : β} (hv : v β s) : AnalyticOnNhd β (fun u => chordIntegral f w u v) s := by | |
| apply DifferentiableOn.analyticOnNhd _ hs | |
| intro u hu | |
| exact (hasDerivAt_chordIntegral_left hs hconv hf hw hu hv).differentiableAt.differentiableWithinAt | |
| theorem analyticOnNhd_chordIntegral_right {s : Set β} (hs : IsOpen s) (hconv : Convex β s) | |
| {f : β β β} (hf : AnalyticOnNhd β f s) {w : Parameter β β} (hw : Continuous w) | |
| {u : β} (hu : u β s) : AnalyticOnNhd β (chordIntegral f w u) s := by | |
| apply DifferentiableOn.analyticOnNhd _ hs | |
| intro v hv | |
| exact (hasDerivAt_chordIntegral_right hs hconv hf hw hu hv).differentiableAt.differentiableWithinAt | |
| end DirectCrouzeix.Faber | |
| end | |
| end | |
| end OAI | |