math / data /lean /OAI /Analysis /C0Absorption /Selection.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
12.6 kB
import OAI.Analysis.C0Absorption.Duality
namespace OAI
open Set Filter Topology
open scoped NNReal BigOperators ZeroAtInfty
open NormedSpace
namespace C0Absorption
noncomputable section
open Set Filter Topology
theorem thin_sequence {r : β„• β†’ β„• β†’ Prop} (hr : βˆ€ i, βˆ€αΆ  j in atTop, r i j) :
βˆƒ Ο† : β„• β†’ β„•, StrictMono Ο† ∧ βˆ€ i j, i < j β†’ r (Ο† i) (Ο† j) := by
have he (t : Set β„•) (ht : t.Finite) : βˆ€αΆ  j in atTop, βˆ€ i ∈ t, i<j ∧ r i j :=
(eventually_all_finite ht).mpr (fun i _ => (eventually_gt_atTop i).and (hr i))
obtain βŸ¨Ο†,hΟ†βŸ© := seq_of_forall_finite_exists (fun t ht => (he t ht).exists)
simp only [forall_mem_image, forall_and, mem_Iio] at hφ
exact βŸ¨Ο†, forall_comm.mp hΟ†.1, forall_comm.mp hΟ†.2⟩
theorem finite_constant_subsequence {A : Type*} [Finite A] (f : β„• β†’ A) :
βˆƒ a, βˆƒ Ο† : β„• β†’ β„•, StrictMono Ο† ∧ βˆ€ i, f (Ο† i)=a := by
have hh : βˆƒ a, βˆƒαΆ  i in atTop, f i=a := by
by_contra hn
push Not at hn
have hf : βˆ€αΆ  i in atTop, βˆ€ a, f iβ‰ a := Filter.eventually_all.mpr hn
obtain ⟨i,hi⟩ := hf.exists
exact hi (f i) rfl
obtain ⟨a,ha⟩ := hh
obtain βŸ¨Ο†,hm,hp⟩ := extraction_of_frequently_atTop ha
exact ⟨a,Ο†,hm,hp⟩
theorem constant_or_injective_subsequence {A : Type*} (f : β„• β†’ A) :
(βˆƒ a, βˆƒ Ο† : β„• β†’ β„•, StrictMono Ο† ∧ βˆ€ i, f (Ο† i)=a) ∨
(βˆƒ Ο† : β„• β†’ β„•, StrictMono Ο† ∧ Function.Injective (f ∘ Ο†)) := by
by_cases h : βˆƒ a, βˆƒαΆ  i in atTop, f i=a
· obtain ⟨a,ha⟩ := h
obtain βŸ¨Ο†,hm,hp⟩ := extraction_of_frequently_atTop ha
exact Or.inl ⟨a,Ο†,hm,hp⟩
Β· push Not at h
obtain βŸ¨Ο†,hm,hp⟩ := thin_sequence (r := fun i j => f iβ‰ f j) (fun i => by
simpa only [ne_eq, eq_comm] using h (f i))
refine Or.inr βŸ¨Ο†,hm,?_⟩
intro i j hij
apply le_antisymm <;> by_contra hn
Β· exact hp j i (lt_of_not_ge hn) hij.symm
Β· exact hp i j (lt_of_not_ge hn) hij
theorem nat_constant_or_tendsto (f : β„• β†’ β„•) :
(βˆƒ a, βˆƒ Ο† : β„• β†’ β„•, StrictMono Ο† ∧ βˆ€ i, f (Ο† i)=a) ∨
Tendsto f atTop atTop := by
by_cases h : βˆƒ a, βˆƒαΆ  i in atTop, f i=a
· obtain ⟨a,ha⟩ := h
obtain βŸ¨Ο†,hm,hp⟩ := extraction_of_frequently_atTop ha
exact Or.inl ⟨a,Ο†,hm,hp⟩
Β· push Not at h
apply Or.inr
apply tendsto_atTop.mpr
intro N
have hh : βˆ€αΆ  i in atTop, βˆ€ a ∈ Finset.range N, f iβ‰ a :=
(eventually_all_finite (Finset.range N).finite_toSet).mpr (fun a _ => h a)
filter_upwards [hh] with i hi
by_contra hn
exact hi (f i) (Finset.mem_range.mpr (lt_of_not_ge hn)) rfl
theorem finite_subsequence_selection {A : Type*} [Finite A]
(P : A β†’ (β„• β†’ β„•) β†’ Prop)
(hstable : βˆ€ a (Ο† ψ : β„• β†’ β„•), StrictMono Ο† β†’ StrictMono ψ β†’ P a Ο† β†’ P a (Ο† ∘ ψ))
(hselect : βˆ€ a (Ο† : β„• β†’ β„•), StrictMono Ο† β†’ βˆƒ ψ, StrictMono ψ ∧ P a (Ο† ∘ ψ)) :
βˆƒ Ο†, StrictMono Ο† ∧ βˆ€ a, P a Ο† := by
classical
let := Fintype.ofFinite A
suffices h : βˆ€ s : Finset A, βˆƒ Ο†, StrictMono Ο† ∧ βˆ€ a ∈ s, P a Ο† from
by simpa using h Finset.univ
intro s
induction s using Finset.induction_on with
| empty => exact ⟨id,strictMono_id,by simp⟩
| @insert a s ha ih =>
obtain βŸ¨Ο†,hm,hp⟩ := ih
obtain ⟨ψ,hn,hq⟩ := hselect a Ο† hm
refine βŸ¨Ο† ∘ ψ,hm.comp hn,?_⟩
intro b hb
rcases Finset.mem_insert.mp hb with rfl | hb
Β· exact hq
Β· exact hstable b Ο† ψ hm hn (hp b hb)
theorem choose_mono_sequence {P : β„• β†’ β„• β†’ Prop} (hP : βˆ€ i, βˆ€αΆ  j in atTop, P i j) :
βˆƒ Ο† : β„• β†’ β„•, StrictMono Ο† ∧ βˆ€ i, P i (Ο† i) := by
have he (i j : β„•) : βˆƒ k, j<k ∧ P i k := ((eventually_gt_atTop j).and (hP i)).exists
choose next hn using he
let Ο† : β„• β†’ β„• := fun n => Nat.rec (next 0 0) (fun n prev => next (n+1) prev) n
have hφs (n : ℕ) : φ (n+1) = next (n+1) (φ n) := rfl
refine βŸ¨Ο†,strictMono_nat_of_lt_succ (fun n => ?_),?_⟩
· rw [hφs]; exact (hn (n+1) (φ n)).1
Β· intro i
cases i with
| zero => exact (hn 0 0).2
| succ i => exact (hn (i+1) (Ο† i)).2
end
end C0Absorption
namespace C0Absorption
noncomputable section
open Set Filter Topology
open scoped NNReal BigOperators ZeroAtInfty
theorem nested_selection_lipschitz {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
{S : Set E} (hS : Convex ℝ S) (u b : β„• β†’ S β†’ ℝ) (C : β„• β†’ Set S) (e : β„• β†’ ℝ)
(K Kb : ℝβ‰₯0) (hu : βˆ€ i, Continuous (u i)) (hb : βˆ€ i, LipschitzWith Kb (b i))
(hF : βˆ€ i, LipschitzWith K (fun x => u i x*b i x))
(hC : βˆ€ i, IsOpen (C i)) (hc : βˆ€ i, βˆ€ x ∈ C i, u i x=e i)
(hnest : βˆ€ i, βˆ€αΆ  j in atTop, tsupport (u j) βŠ† C i)
(hsmall : Tendsto (fun i => |e i| *(Kb : ℝ)) atTop (nhds 0)) :
βˆƒ Ο† : β„• β†’ β„•, StrictMono Ο† ∧
βˆ€ n (Ξ΅ : Fin n β†’ ℝ), (βˆ€ i, |Ξ΅ i|=1) β†’
LipschitzWith (K+1) (fun x => βˆ‘ i, Ξ΅ i * (u (Ο† i) x*b (Ο† i) x)) := by
have he (i : β„•) : βˆ€αΆ  j in atTop, |e j| *(Kb : ℝ) ≀ (1/2 : ℝ)^(i+1) :=
hsmall.eventually (eventually_le_nhds (by positivity))
obtain ⟨ψ,hψ,heψ⟩ := choose_mono_sequence he
obtain ⟨η,hΞ·,hrel⟩ := thin_sequence (r := fun i j => tsupport (u (ψ j)) βŠ† C (ψ i))
(fun i => hψ.tendsto_atTop.eventually (hnest (ψ i)))
let Ο† := ψ ∘ Ξ·
refine βŸ¨Ο†,hψ.comp hΞ·,?_⟩
have hprod (i : β„•) : |e (Ο† i)| *(Kb : ℝ) ≀ (1/2 : ℝ)^(i+1) := by
exact (heψ (η i)).trans (pow_le_pow_of_le_one (by norm_num) (by norm_num)
(Nat.add_le_add_right (hΞ·.id_le i) 1))
intro n Ξ΅ hΞ΅
have hh := nested_supports_signed_lipschitz hS n
(fun i : Fin n => u (Ο† i)) (fun i : Fin n => b (Ο† i))
(fun i : Fin n => e (Ο† i)) (fun i : Fin n => C (Ο† i)) K
(fun _ : Fin n => Kb) (fun i => hu _) (fun i => hb _) (fun i => hF _)
(fun i => hC _) (fun i => hc _) (fun i j hij => hrel i j hij) Ξ΅ hΞ΅
apply hh.weaken
refine add_le_add le_rfl ?_
have hsum : (βˆ‘ i : Fin n, |e (Ο† i)| *(Kb : ℝ)) ≀ 1 := by
calc
_ ≀ βˆ‘ i : Fin n, (1/2 : ℝ)^(i.val+1) := Finset.sum_le_sum (fun i _ => hprod i)
_ = βˆ‘ i ∈ Finset.range n, (1/2 : ℝ)^(i+1) := (Finset.sum_range (fun i : β„• => (1/2 : ℝ)^(i+1))).symm
_ ≀ βˆ‘' i : β„•, (1/2 : ℝ)^(i+1) := Summable.sum_le_tsum _ (fun _ _ => by positivity) geometric_summable
_ = 1 := geometric_tsum
apply NNReal.coe_le_coe.mp
simpa only [NNReal.coe_sum, NNReal.coe_mul, coe_nnnorm, Real.norm_eq_abs, NNReal.coe_one] using hsum
end
end C0Absorption
namespace C0Absorption
noncomputable section
open Set Filter Topology
open scoped NNReal BigOperators ZeroAtInfty
structure TagLocalization {Ξ“ : Type*} (B : CylinderBases Ξ“) where
tag : Ξ“ β†’ β„• β†’ Icc (-1 : ℝ) 1
contains_prefix : βˆ€ Ξ³, Finset.range (B.band Ξ³) βŠ† B.coordinates Ξ³
ell_tendsto : Tendsto B.ell atTop (nhds 0)
base_support : βˆ€ Ξ³ (k : B.coordinates Ξ³), k.val < B.band Ξ³ β†’
βˆ€ x ∈ tsupport (B.base Ξ³), dist (x k) (tag Ξ³ k.val) ≀ 2*dyadic (B.band Ξ³)
namespace TagLocalization
variable {Ξ“ : Type*} {B : CylinderBases Ξ“} (loc : TagLocalization B)
theorem representation_support {Ξ³ : Ξ“} (r : GeneratedRepresentation B Ξ³)
(k : β„•) (hk : k < B.band Ξ³) (s : C0Ball) (hs : s ∈ tsupport r.value) :
dist (s.val k) (loc.tag Ξ³ k).val ≀ 2*dyadic (B.band Ξ³)+B.ell (B.band Ξ³)/2 := by
let l : B.coordinates γ := ⟨k,loc.contains_prefix γ (Finset.mem_range.mpr hk)⟩
let Ο† : Cube (B.coordinates Ξ³) β†’ ℝ := fun x => dist (x l) (loc.tag Ξ³ k)
have hφ : LipschitzWith 1 φ := by
simpa only [Ο†,Function.comp_def,one_mul] using (LipschitzWith.dist_left (loc.tag Ξ³ k)).comp (LipschitzWith.eval l)
have hp := r.support_bound hφ (loc.base_support γ l hk) s hs
exact hp.trans (add_le_add le_rfl r.budget.le)
theorem projected_concentration (Ξ³ : β„• β†’ Ξ“) (r : βˆ€ i, GeneratedRepresentation B (Ξ³ i))
(hj : Tendsto (fun i => B.band (Ξ³ i)) atTop atTop)
(v : β„• β†’ Icc (-1 : ℝ) 1) (hv : Tendsto (fun i => loc.tag (Ξ³ i)) atTop (nhds v))
(I : Finset β„•) {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) :
βˆ€αΆ  i in atTop, βˆ€ s ∈ tsupport (r i).value,
dist (cubeRestrict I s) (fun k : I => v k.val) < Ξ΅ := by
have ha : Tendsto (fun i => 2*dyadic (B.band (Ξ³ i))+B.ell (B.band (Ξ³ i))/2) atTop (nhds 0) := by
simpa only [Function.comp_def,mul_zero,zero_div,zero_add] using
((dyadic_tendsto.comp hj).const_mul 2).add ((loc.ell_tendsto.comp hj).div_const 2)
have he := ha.eventually (eventually_lt_nhds (half_pos hΞ΅))
have hall : βˆ€αΆ  i in atTop, βˆ€ k : I, k.val < B.band (Ξ³ i) ∧
dist (loc.tag (Ξ³ i) k.val) (v k.val) < Ξ΅/2 := by
apply Filter.eventually_all.mpr
intro k
exact (hj.eventually (eventually_gt_atTop k.val)).and
((Metric.tendsto_nhds.mp (tendsto_pi_nhds.mp hv k.val)) (Ξ΅/2) (half_pos hΞ΅))
filter_upwards [he,hall] with i hi htag
intro s hs
apply (dist_pi_lt_iff hΞ΅).mpr
intro k
have hb := loc.representation_support (r i) k.val (htag k).1 s hs
have hc := (htag k).2
have hd := dist_triangle (cubeRestrict I s k) (loc.tag (Ξ³ i) k.val) (v k.val)
change dist (s.val k.val) (v k.val).val < Ξ΅
change dist (s.val k.val) (v k.val).val ≀
dist (s.val k.val) (loc.tag (Ξ³ i) k.val).val + dist (loc.tag (Ξ³ i) k.val) (v k.val) at hd
linarith
end TagLocalization
end
end C0Absorption
namespace C0Absorption
noncomputable section
open Set Filter Topology
open scoped NNReal BigOperators ZeroAtInfty
theorem high_bands_compatible {Ξ“ : Type*} {B : CylinderBases Ξ“} (loc : TagLocalization B)
(Ξ³ : β„• β†’ Ξ“) (r : βˆ€ i, GeneratedRepresentation B (Ξ³ i)) (h : β„•)
(hr : βˆ€ i, (r i).operations.length ≀ h)
(hj : Tendsto (fun i => B.band (Ξ³ i)) atTop atTop)
(m : β„• β†’ SourceSpace B) {Ξ΄ : ℝ} (hΞ΄ : 0 < Ξ΄)
(hd : βˆ€ i, Ξ΄ ≀ |completedPairing (sourceClasses B) c0Origin (r i).value (m i)|) :
βˆƒ Ο† : β„• β†’ β„•, StrictMono Ο† ∧ βˆƒ F : β„• β†’ C0Ball β†’ ℝ,
(βˆ€ i, F i ∈ TClass B (h+1)) ∧
(βˆ€ i, Ξ΄/2 ≀ |completedPairing (sourceClasses B) c0Origin (F i) (m (Ο† i))|) ∧
βˆ€ n (Ξ΅ : Fin n β†’ ℝ), (βˆ€ i, |Ξ΅ i|=1) β†’
LipschitzWith (4^(h+1)*B.L0+1) (fun s => βˆ‘ i, Ξ΅ i*F i s) := by
obtain ⟨v,hv,ψ,hψ,hvψ⟩ := isCompact_univ.isSeqCompact.subseq_of_frequently_in
(x := fun i => loc.tag (Ξ³ i)) (Filter.Eventually.of_forall (fun _ => mem_univ _)).frequently
have hfl (i : β„•) := (r (ψ i)).exists_flatten_T h (hr (ψ i))
(fun k => v k.val) (m (ψ i)) (half_pos hΞ΄) (show (0 : ℝ)<1 by norm_num)
choose a rr hcap hops hdif hflat hsup using hfl
have hmem (i : β„•) : (rr i).value ∈ TClass B (h+1) := by
refine ⟨γ (ψ i),rr i,?_,rfl⟩
rw [hops i,List.length_append,List.length_singleton]
exact Nat.add_le_add_right (hr (ψ i)) 1
let C (i : β„•) : Set C0Ball :=
{s | dist (cubeRestrict (B.coordinates (γ (ψ i))) s)
(fun k => v k.val) < 3*dyadic (a i)/8}
let e (i : β„•) := (r (ψ i)).cubeValue
(flattenOperation (B.coordinates (γ (ψ i))) (a i) (fun k => v k.val)).point
have hC (i : β„•) : IsOpen (C i) :=
Metric.isOpen_ball.preimage (cubeRestrict_lipschitz _).continuous
have hnest (i : β„•) : βˆ€αΆ  j in atTop, tsupport (rr j).value βŠ† C i := by
have hp := loc.projected_concentration (γ ∘ ψ) rr (hj.comp hψ.tendsto_atTop) v hvψ
(B.coordinates (γ (ψ i))) (show 0 < 3*dyadic (a i)/8 by have := dyadic_pos (a i); positivity)
exact hp
obtain ⟨η,hη,hLip⟩ := nested_selection_lipschitz (convex_closedBall (0 : C0) 1)
(fun i => (rr i).value) (fun _ _ => 1) C e (4^(h+1)*B.L0) 0
(fun i => (rr i).value_lipschitz.continuous) (fun _ => LipschitzWith.const 1)
(fun i => by simpa only [mul_one] using TClass_lipschitz B (h+1) (hmem i))
hC (fun i s hs => hflat i s hs) hnest (by simp only [NNReal.coe_zero,mul_zero]; exact tendsto_const_nhds)
refine ⟨ψ ∘ η,hψ.comp hη,fun i => (rr (η i)).value,fun i => hmem _,?_,?_⟩
Β· intro i
have hb := hdif (Ξ· i)
have ha := hd (ψ (η i))
have hab := abs_sub_abs_le_abs_sub
(completedPairing (sourceClasses B) c0Origin (r (ψ (η i))).value (m (ψ (η i))))
(completedPairing (sourceClasses B) c0Origin (rr (η i)).value (m (ψ (η i))))
rw [abs_sub_comm] at hab
change Ξ΄/2 ≀ |completedPairing (sourceClasses B) c0Origin (rr (Ξ· i)).value (m (ψ (Ξ· i)))|
linarith
Β· intro n Ξ΅ hΞ΅
simpa only [mul_one] using hLip n Ξ΅ hΞ΅
end
end C0Absorption
end OAI