Download data/lean/OAI/Analysis/C0Absorption/Duality.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 15.8 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/C0Absorption/Duality.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/C0Absorption/Duality.lean
-
curl -L -o Duality.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/C0Absorption/Duality.lean
15.8 kB
| import OAI.Analysis.C0Absorption.Tests | |
| namespace OAI | |
| open Set Filter Topology | |
| open scoped NNReal BigOperators ZeroAtInfty | |
| open NormedSpace | |
| namespace C0Absorption | |
| noncomputable section | |
| open Set Filter Topology | |
| open scoped NNReal BigOperators ZeroAtInfty | |
| section ClassDuality | |
| variable {S : Type*} [MetricSpace S] (L : β β Set (S β β)) (o : S) | |
| def BoundedTest (f : S β β) : Prop := | |
| β K : ββ₯0, β m : PreSpace L o, |pairing S f m| β€ K*βmβ | |
| theorem class_pairing_bound (j : β) (K : ββ₯0) | |
| (hK : β f β L j, LipschitzWith K f) : | |
| β A : ββ₯0, β f β L j, β m : PreSpace L o, |pairing S f m| β€ A*βmβ := by | |
| obtain β¨C,hCβ© := exists_nat_gt (K : β) | |
| obtain β¨n,hnβ© := triple_surjective (j,C,0) | |
| refine β¨(squareWeight n)β»ΒΉ,?_β© | |
| intro f hf m | |
| apply test_pairing_bound L o n f | |
| Β· simpa only [hn] using hf | |
| Β· apply (hK f hf).weaken | |
| change K β€ ((triple n).2.1 : ββ₯0)+1 | |
| rw [hn] | |
| exact_mod_cast (show (K : β) β€ (C : β)+1 by linarith) | |
| theorem BoundedTest.continuous {f : S β β} (hf : BoundedTest L o f) : | |
| Continuous (completedPairing L o f) := by | |
| obtain β¨K,hKβ© := hf | |
| exact (completedPairing_lipschitz L o f K hK).continuous | |
| theorem BoundedTest.weak_null {f : S β β} (hf : BoundedTest L o f) | |
| (m : β β TestSpace L o) (M : β) | |
| (hm : β n (Ξ΅ : Fin n β Bool), ββ i, realSign (Ξ΅ i) β’ m iβ β€ M) : | |
| Tendsto (fun i => completedPairing L o f (m i)) atTop (nhds 0) := by | |
| obtain β¨K,hKβ© := hf | |
| simpa only [completedTest_eq] using bounded_signs_weak_null m M hm (completedTest L o f K hK) | |
| theorem pairing_add {S : Type*} [MetricSpace S] | |
| (f g : S β β) (m : Molecule S) : | |
| pairing S (fun s => f s+g s) m = pairing S f m+pairing S g m := by | |
| simp only [pairing, LinearMap.comp_apply, Submodule.subtype_apply, | |
| Finsupp.linearCombination_apply, smul_eq_mul, mul_add, Finsupp.sum, Finset.sum_add_distrib] | |
| theorem pairing_smul {S : Type*} [MetricSpace S] | |
| (a : β) (f : S β β) (m : Molecule S) : | |
| pairing S (fun s => a*f s) m = a*pairing S f m := by | |
| simp only [pairing, LinearMap.comp_apply, Submodule.subtype_apply, | |
| Finsupp.linearCombination_apply, smul_eq_mul, Finsupp.sum, Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro i hi | |
| ring | |
| theorem BoundedTest.add {f g : S β β} (hf : BoundedTest L o f) (hg : BoundedTest L o g) : | |
| BoundedTest L o (fun s => f s+g s) := by | |
| obtain β¨K,hKβ© := hf | |
| obtain β¨A,hAβ© := hg | |
| refine β¨K+A,fun m => ?_β© | |
| erw [pairing_add] | |
| exact (abs_add_le _ _).trans ((add_le_add (hK m) (hA m)).trans_eq (by push_cast; ring)) | |
| theorem BoundedTest.smul {f : S β β} (hf : BoundedTest L o f) (a : β) : | |
| BoundedTest L o (fun s => a*f s) := by | |
| obtain β¨K,hKβ© := hf | |
| refine β¨βaββ*K,fun m => ?_β© | |
| erw [pairing_smul, abs_mul] | |
| exact (mul_le_mul_of_nonneg_left (hK m) (abs_nonneg a)).trans_eq (by | |
| simp only [NNReal.coe_mul, coe_nnnorm, Real.norm_eq_abs]; ring) | |
| theorem completedPairing_add (f g : S β β) (hf : BoundedTest L o f) (hg : BoundedTest L o g) | |
| (z : TestSpace L o) : completedPairing L o (fun s => f s+g s) z = | |
| completedPairing L o f z+completedPairing L o g z := by | |
| obtain β¨K,hKβ© := hf | |
| obtain β¨A,hAβ© := hg | |
| obtain β¨B,hBβ© := (BoundedTest.add L o β¨K,hKβ© β¨A,hAβ©) | |
| induction z using UniformSpace.Completion.induction_on with | |
| | hp => | |
| exact isClosed_eq (completedPairing_lipschitz L o _ B hB).continuous | |
| ((completedPairing_lipschitz L o _ K hK).continuous.add (completedPairing_lipschitz L o _ A hA).continuous) | |
| | ih m => | |
| change completedPairing L o _ (toTestSpace L o m) = _ | |
| erw [completedPairing_coe L o _ B hB, completedPairing_coe L o _ K hK, | |
| completedPairing_coe L o _ A hA] | |
| exact pairing_add f g m | |
| theorem completedPairing_smul (a : β) (f : S β β) (hf : BoundedTest L o f) | |
| (z : TestSpace L o) : completedPairing L o (fun s => a*f s) z = a*completedPairing L o f z := by | |
| obtain β¨K,hKβ© := hf | |
| obtain β¨B,hBβ© := BoundedTest.smul L o β¨K,hKβ© a | |
| induction z using UniformSpace.Completion.induction_on with | |
| | hp => | |
| exact isClosed_eq (completedPairing_lipschitz L o _ B hB).continuous | |
| (continuous_const.mul (completedPairing_lipschitz L o _ K hK).continuous) | |
| | ih m => | |
| change completedPairing L o _ (toTestSpace L o m) = _ | |
| erw [completedPairing_coe L o _ B hB, completedPairing_coe L o _ K hK] | |
| exact pairing_smul a f m | |
| end ClassDuality | |
| variable {Ξ : Type*} {B : CylinderBases Ξ} | |
| def c0Origin : C0Ball := β¨0,by simpβ© | |
| abbrev SourceSpace (B : CylinderBases Ξ) := TestSpace (sourceClasses B) c0Origin | |
| theorem TClass_mono {h k : β} (hk : h β€ k) : TClass B h β TClass B k := by | |
| rintro f β¨Ξ³,r,hr,rflβ© | |
| exact β¨Ξ³,r,hr.trans hk,rflβ© | |
| theorem VClass_mono {h k : β} (hk : h β€ k) : VClass B h β VClass B k := by | |
| rintro f β¨Ξ³,r,ts,hr,hj,ht,hs,rflβ© | |
| exact β¨Ξ³,r,ts,hr.trans hk,hj.trans hk,ht.trans hk,fun t hm => (hs t hm).trans hk,rflβ© | |
| theorem representation_mem_VClass {Ξ³ : Ξ} (r : GeneratedRepresentation B Ξ³) {h : β} | |
| (hr : r.operations.length β€ h) (hj : B.band Ξ³ β€ h) : r.value β VClass B h := by | |
| refine β¨Ξ³,r,[],hr,hj,by simp,by simp,?_β© | |
| funext s | |
| simp | |
| theorem sourceClasses_lipschitz (B : CylinderBases Ξ) (n : β) : | |
| β K : ββ₯0, β f β sourceClasses B n, LipschitzWith K f := by | |
| unfold sourceClasses | |
| split | |
| Β· exact β¨_, fun _ hf => TClass_lipschitz B _ hfβ© | |
| Β· exact β¨_, fun _ hf => VClass_lipschitz B _ hfβ© | |
| theorem TClass_pairing_bound (B : CylinderBases Ξ) (h : β) : | |
| β A : ββ₯0, β f β TClass B h, β m : PreSpace (sourceClasses B) c0Origin, | |
| |pairing C0Ball f m| β€ A*βmβ := by | |
| have hh := class_pairing_bound (sourceClasses B) c0Origin (2*h) (4^(h+1)*B.L0) (by | |
| simpa only [sourceClasses_even] using (fun f hf => TClass_lipschitz B (h+1) (f := f) hf)) | |
| obtain β¨A,hAβ© := hh | |
| exact β¨A,fun f hf => hA f (by simpa only [sourceClasses_even] using TClass_mono (Nat.le_succ h) hf)β© | |
| theorem VClass_pairing_bound (B : CylinderBases Ξ) (h : β) : | |
| β A : ββ₯0, β f β VClass B h, β m : PreSpace (sourceClasses B) c0Origin, | |
| |pairing C0Ball f m| β€ A*βmβ := by | |
| have hh := class_pairing_bound (sourceClasses B) c0Origin (2*h+1) | |
| (4^(h+1)*B.L0+(h+1)*4^(h+1)*B.A) (by | |
| simpa only [sourceClasses_odd, Nat.cast_add, Nat.cast_one] using (fun f hf => VClass_lipschitz B (h+1) (f := f) hf)) | |
| obtain β¨A,hAβ© := hh | |
| exact β¨A,fun f hf => hA f (by simpa only [sourceClasses_odd] using VClass_mono (Nat.le_succ h) hf)β© | |
| theorem TClass_bounded {h : β} {f : C0Ball β β} (hf : f β TClass B h) : | |
| BoundedTest (sourceClasses B) c0Origin f := by | |
| obtain β¨A,hAβ© := TClass_pairing_bound B h | |
| exact β¨A,hA f hfβ© | |
| theorem VClass_bounded {h : β} {f : C0Ball β β} (hf : f β VClass B h) : | |
| BoundedTest (sourceClasses B) c0Origin f := by | |
| obtain β¨A,hAβ© := VClass_pairing_bound B h | |
| exact β¨A,hA f hfβ© | |
| end | |
| end C0Absorption | |
| namespace C0Absorption | |
| noncomputable section | |
| open Set Filter Topology | |
| open scoped NNReal BigOperators ZeroAtInfty | |
| def flattenOperation (I : Finset β) (a : β) (v : Cube I) : CylinderOperation I := | |
| β¨a,nearestOperationGrid I a v,trueβ© | |
| @[simp] theorem flattenOperation_scale (I : Finset β) (a : β) (v : Cube I) : | |
| (flattenOperation I a v).scale = dyadic a := rfl | |
| @[simp] theorem flattenOperation_act (I : Finset β) (a : β) (v : Cube I) (u : Cube I β β) : | |
| (flattenOperation I a v).act u = localG (flattenOperation I a v).point (dyadic a) u := rfl | |
| theorem flattenOperation_center (I : Finset β) (a : β) (v : Cube I) : | |
| dist v (flattenOperation I a v).point β€ dyadic a/16 := nearestOperationGrid_dist I a v | |
| theorem flattenOperation_plateau (I : Finset β) (a : β) (v : Cube I) (u : Cube I β β) | |
| (x : Cube I) (hx : dist x v < 3*dyadic a/8) : | |
| (flattenOperation I a v).act u x = u (flattenOperation I a v).point := by | |
| apply localG_plateau _ (dyadic_pos a) u x | |
| have hh := dist_triangle x v (flattenOperation I a v).point | |
| have hc := flattenOperation_center I a v | |
| linarith [dyadic_pos a] | |
| theorem flattenOperation_difference (I : Finset β) (a : β) (v : Cube I) | |
| {u : Cube I β β} {K : ββ₯0} (hu : LipschitzWith K u) (x : Cube I) : | |
| |(flattenOperation I a v).act u x-u x| β€ dyadic a*K := by | |
| rw [flattenOperation_act, localG_eq, add_sub_cancel_left] | |
| exact localR_sup_lip _ (dyadic_pos a) u hu x | |
| namespace GeneratedRepresentation | |
| variable {Ξ : Type*} {B : CylinderBases Ξ} {Ξ³ : Ξ} | |
| theorem exists_flatten (r : GeneratedRepresentation B Ξ³) (ts : List TailOperation) | |
| (h : β) (hr : r.operations.length β€ h) (hj : B.band Ξ³ β€ h) | |
| (ht : ts.length β€ h) (hs : β t β ts, t.scaleIndex β€ h) | |
| (v : Cube (B.coordinates Ξ³)) (z : SourceSpace B) {Ξ΄ cap : β} | |
| (hΞ΄ : 0 < Ξ΄) (hcap : 0 < cap) : | |
| β (a : β) (r' : GeneratedRepresentation B Ξ³), | |
| dyadic a < cap β§ r'.operations = r.operations++[flattenOperation (B.coordinates Ξ³) a v] β§ | |
| |completedPairing (sourceClasses B) c0Origin (fun s => r'.value s*tailProduct ts s) z- | |
| completedPairing (sourceClasses B) c0Origin (fun s => r.value s*tailProduct ts s) z| < Ξ΄ β§ | |
| (β s, dist (cubeRestrict (B.coordinates Ξ³) s) v < 3*dyadic a/8 β | |
| r'.value s = r.cubeValue (flattenOperation (B.coordinates Ξ³) a v).point) β§ | |
| (β s, |r'.value s| β€ (2 : β)^r.operations.length*B.A) := by | |
| have he := r.eventually_append_allowed.and (dyadic_tendsto.eventually (eventually_lt_nhds hcap)) | |
| obtain β¨N,hNβ© := eventually_atTop.mp he | |
| let op (n : β) := flattenOperation (B.coordinates Ξ³) (N+n) v | |
| have ho (n : β) : β p β r.operations, (op n).scale β€ p.scale := (hN (N+n) (by omega)).1.1 | |
| have hb (n : β) : (r.operations.map CylinderOperation.scale).sum+(op n).scale < B.ell (B.band Ξ³)/2 := | |
| (hN (N+n) (by omega)).1.2 | |
| let rr (n : β) := r.append (op n) (ho n) (hb n) | |
| let f (n : β) (s : C0Ball) := (rr n).value s*tailProduct ts s | |
| let g (s : C0Ball) := r.value s*tailProduct ts s | |
| have hf (n : β) : f n β VClass B (h+1) := by | |
| refine β¨Ξ³,rr n,ts,?_,hj.trans (Nat.le_succ h),ht.trans (Nat.le_succ h), | |
| fun t hm => (hs t hm).trans (Nat.le_succ h),rflβ© | |
| simpa only [rr, append, List.length_append, List.length_singleton] using Nat.add_le_add_right hr 1 | |
| have hsc : Tendsto (fun n => dyadic (N+n)) atTop (nhds 0) := | |
| dyadic_tendsto.comp (tendsto_atTop_mono (fun n => by omega : β n : β, n β€ N+n) tendsto_id) | |
| have hp (s : C0Ball) : Tendsto (fun n => f n s) atTop (nhds (g s)) := by | |
| rw [tendsto_iff_dist_tendsto_zero] | |
| have hbound (n : β) : dist (f n s) (g s) β€ dyadic (N+n)*(4^r.operations.length*B.L0 : ββ₯0) := by | |
| simp only [f,g,Real.dist_eq,β sub_mul,abs_mul] | |
| have hd : |(rr n).value s-r.value s| β€ dyadic (N+n)*(4^r.operations.length*B.L0 : ββ₯0) := by | |
| change |(rr n).cubeValue (cubeRestrict (B.coordinates Ξ³) s)-r.cubeValue (cubeRestrict (B.coordinates Ξ³) s)| β€ _ | |
| rw [show (rr n).cubeValue = (op n).act r.cubeValue from r.append_cubeValue _ _ _] | |
| exact flattenOperation_difference _ (N+n) v r.cubeValue_lipschitz _ | |
| exact (mul_le_mul hd (tailProduct_abs_le ts s) (abs_nonneg _) (mul_nonneg (dyadic_pos _).le (NNReal.coe_nonneg _))).trans_eq (mul_one _) | |
| exact squeeze_zero (fun n => dist_nonneg) hbound (by simpa using hsc.mul_const ((4^r.operations.length*B.L0 : ββ₯0) : β)) | |
| obtain β¨A,hAβ© := VClass_pairing_bound B (h+1) | |
| have hconv := (completedPairing_tendsto (sourceClasses B) c0Origin f g A | |
| (fun n => hA (f n) (hf n)) hp).2 z | |
| have hev : βαΆ n in atTop, |completedPairing (sourceClasses B) c0Origin (f n) z- | |
| completedPairing (sourceClasses B) c0Origin g z| < Ξ΄ := by | |
| simpa only [Real.dist_eq] using (Metric.tendsto_nhds.mp hconv) Ξ΄ hΞ΄ | |
| obtain β¨n,hnβ© := hev.exists | |
| refine β¨N+n,rr n,(hN (N+n) (by omega)).2,rfl,hn,?_,?_β© | |
| Β· intro s hss | |
| change (rr n).cubeValue (cubeRestrict (B.coordinates Ξ³) s) = _ | |
| rw [show (rr n).cubeValue = (op n).act r.cubeValue from r.append_cubeValue _ _ _] | |
| exact flattenOperation_plateau _ _ _ r.cubeValue _ hss | |
| Β· intro s | |
| change |(rr n).cubeValue (cubeRestrict (B.coordinates Ξ³) s)| β€ _ | |
| rw [show (rr n).cubeValue = (op n).act r.cubeValue from r.append_cubeValue _ _ _] | |
| exact localG_sup _ _ _ _ r.cubeValue_sup _ | |
| theorem exists_flatten_T (r : GeneratedRepresentation B Ξ³) | |
| (h : β) (hr : r.operations.length β€ h) | |
| (v : Cube (B.coordinates Ξ³)) (z : SourceSpace B) {Ξ΄ cap : β} | |
| (hΞ΄ : 0 < Ξ΄) (hcap : 0 < cap) : | |
| β (a : β) (r' : GeneratedRepresentation B Ξ³), | |
| dyadic a < cap β§ r'.operations = r.operations++[flattenOperation (B.coordinates Ξ³) a v] β§ | |
| |completedPairing (sourceClasses B) c0Origin r'.value z- | |
| completedPairing (sourceClasses B) c0Origin r.value z| < Ξ΄ β§ | |
| (β s, dist (cubeRestrict (B.coordinates Ξ³) s) v < 3*dyadic a/8 β | |
| r'.value s = r.cubeValue (flattenOperation (B.coordinates Ξ³) a v).point) β§ | |
| (β s, |r'.value s| β€ (2 : β)^r.operations.length*B.A) := by | |
| have he := r.eventually_append_allowed.and (dyadic_tendsto.eventually (eventually_lt_nhds hcap)) | |
| obtain β¨N,hNβ© := eventually_atTop.mp he | |
| let op (n : β) := flattenOperation (B.coordinates Ξ³) (N+n) v | |
| have ho (n : β) : β p β r.operations, (op n).scale β€ p.scale := (hN (N+n) (by omega)).1.1 | |
| have hb (n : β) : (r.operations.map CylinderOperation.scale).sum+(op n).scale < B.ell (B.band Ξ³)/2 := | |
| (hN (N+n) (by omega)).1.2 | |
| let rr (n : β) := r.append (op n) (ho n) (hb n) | |
| let f (n : β) (s : C0Ball) := (rr n).value s | |
| let g (s : C0Ball) := r.value s | |
| have hf (n : β) : f n β TClass B (h+1) := by | |
| refine β¨Ξ³,rr n,?_,rflβ© | |
| simpa only [rr, append, List.length_append, List.length_singleton] using Nat.add_le_add_right hr 1 | |
| have hsc : Tendsto (fun n => dyadic (N+n)) atTop (nhds 0) := | |
| dyadic_tendsto.comp (tendsto_atTop_mono (fun n => by omega : β n : β, n β€ N+n) tendsto_id) | |
| have hp (s : C0Ball) : Tendsto (fun n => f n s) atTop (nhds (g s)) := by | |
| rw [tendsto_iff_dist_tendsto_zero] | |
| have hbound (n : β) : dist (f n s) (g s) β€ dyadic (N+n)*(4^r.operations.length*B.L0 : ββ₯0) := by | |
| change |(rr n).cubeValue (cubeRestrict (B.coordinates Ξ³) s)-r.cubeValue (cubeRestrict (B.coordinates Ξ³) s)| β€ _ | |
| rw [show (rr n).cubeValue = (op n).act r.cubeValue from r.append_cubeValue _ _ _] | |
| exact flattenOperation_difference _ (N+n) v r.cubeValue_lipschitz _ | |
| exact squeeze_zero (fun n => dist_nonneg) hbound (by simpa using hsc.mul_const ((4^r.operations.length*B.L0 : ββ₯0) : β)) | |
| obtain β¨A,hAβ© := TClass_pairing_bound B (h+1) | |
| have hconv := (completedPairing_tendsto (sourceClasses B) c0Origin f g A | |
| (fun n => hA (f n) (hf n)) hp).2 z | |
| have hev : βαΆ n in atTop, |completedPairing (sourceClasses B) c0Origin (f n) z- | |
| completedPairing (sourceClasses B) c0Origin g z| < Ξ΄ := by | |
| simpa only [Real.dist_eq] using (Metric.tendsto_nhds.mp hconv) Ξ΄ hΞ΄ | |
| obtain β¨n,hnβ© := hev.exists | |
| refine β¨N+n,rr n,(hN (N+n) (by omega)).2,rfl,hn,?_,?_β© | |
| Β· intro s hss | |
| change (rr n).cubeValue (cubeRestrict (B.coordinates Ξ³) s) = _ | |
| rw [show (rr n).cubeValue = (op n).act r.cubeValue from r.append_cubeValue _ _ _] | |
| exact flattenOperation_plateau _ _ _ r.cubeValue _ hss | |
| Β· intro s | |
| change |(rr n).cubeValue (cubeRestrict (B.coordinates Ξ³) s)| β€ _ | |
| rw [show (rr n).cubeValue = (op n).act r.cubeValue from r.append_cubeValue _ _ _] | |
| exact localG_sup _ _ _ _ r.cubeValue_sup _ | |
| end GeneratedRepresentation | |
| end | |
| end C0Absorption | |
| end OAI | |