Download data/lean/OAI/Analysis/AllenCahn/Resolvent.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 14.6 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/AllenCahn/Resolvent.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/AllenCahn/Resolvent.lean
-
curl -L -o Resolvent.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/AllenCahn/Resolvent.lean
14.6 kB
| import OAI.Analysis.AllenCahn.DefectLimits | |
| import OAI.Analysis.AllenCahn.SchwartzResolvent | |
| namespace OAI | |
| noncomputable section | |
| namespace DeGiorgi | |
| open Filter Set Topology | |
| open scoped NNReal | |
| open scoped SchwartzMap Laplacian ContDiff | |
| open FourierTransform | |
| open scoped ContDiff SchwartzMap Polynomial | |
| open Filter Topology | |
| lemma boundedAbove_quadratic_maximum {n : β} {f : Space n β β} | |
| (hf : Continuous f) {M Ξ΅ : β} (hb : β x, f x β€ M) (hΞ΅ : 0 < Ξ΅) : | |
| β x : Space n, β y, f y-Ξ΅*βyβ^2 β€ f x-Ξ΅*βxβ^2 := by | |
| let H : Space n β β := fun x => f x-Ξ΅*βxβ^2 | |
| have hc : Continuous H := by fun_prop | |
| let R := Real.sqrt ((M-f 0)/Ξ΅+1) | |
| have hR := Real.sqrt_nonneg ((M-f 0)/Ξ΅+1) | |
| have hR2 : R^2 = (M-f 0)/Ξ΅+1 := Real.sq_sqrt (by have := hb 0; positivity) | |
| have hh : βαΆ x in cocompact (Space n), H x β€ H 0 := by | |
| filter_upwards [(isCompact_closedBall (0 : Space n) R).compl_mem_cocompact] with x hx | |
| have hx' : R < βxβ := by | |
| simpa only [Set.mem_compl_iff,Metric.mem_closedBall,dist_zero_right,not_le] using hx | |
| have hsq : (M-f 0)/Ξ΅+1 < βxβ^2 := by nlinarith [norm_nonneg x] | |
| have hmul := mul_lt_mul_of_pos_left hsq hΞ΅ | |
| have he : Ξ΅*((M-f 0)/Ξ΅+1)=M-f 0+Ξ΅ := by field_simp | |
| rw [he] at hmul | |
| dsimp [H] | |
| simp only [norm_zero,zero_pow two_ne_zero,mul_zero,sub_zero] | |
| linarith [hb x] | |
| exact hc.exists_forall_ge' 0 hh | |
| lemma boundedAbove_maximum_principle {n : β} {f : Space n β β} | |
| (hf : ContDiff β 2 f) {M : β} (hb : β x, f x β€ M) | |
| (hpde : β x, 0 < f x β f x β€ Laplacian.laplacian f x) : β x, f x β€ 0 := by | |
| intro xβ | |
| by_contra hbad | |
| have hpos : 0 < f xβ := lt_of_not_ge hbad | |
| have hn : βαΆ t : β in π 0, | |
| 2*n*t < f xβ/2 β§ t*βxββ^2 < f xβ/2 := by | |
| apply Filter.Eventually.and | |
| Β· exact (isOpen_lt (continuous_const.mul continuous_id) continuous_const).mem_nhds | |
| (by simpa using half_pos hpos) | |
| Β· exact (isOpen_lt (continuous_id.mul continuous_const) continuous_const).mem_nhds | |
| (by simpa using half_pos hpos) | |
| obtain β¨Ξ΅,hΞ΅,he,hgapβ© := (frequently_gt_nhds (0 : β)).and_eventually hn |>.exists | |
| obtain β¨x,hmβ© := boundedAbove_quadratic_maximum hf.continuous hb hΞ΅ | |
| have hfx : f xβ/2 < f x := by | |
| have hh := hm xβ | |
| nlinarith [mul_nonneg hΞ΅.le (sq_nonneg βxβ)] | |
| have hp := hpde x (lt_trans (half_pos hpos) hfx) | |
| have hnorm : ContDiff β 2 (fun z : Space n => βzβ^2) := contDiff_id.norm_sq β | |
| have hF := hf.sub ((contDiff_const : ContDiff β 2 (fun _ : Space n => Ξ΅)).mul hnorm) | |
| have hm' : IsLocalMax (fun z : Space n => f z-Ξ΅*βzβ^2) x := .of_forall hm | |
| have hl := laplacian_nonpos_of_local_max hF hm' | |
| rw [laplacian_fun_sub hf (contDiff_const.mul hnorm),laplacian_fun_const_mul hnorm, | |
| laplacian_norm_sq] at hl | |
| linarith | |
| lemma boundedAbove_elliptic_comparison {n : β} {u F P : Space n β β} | |
| (hu : ContDiff β 2 u) (hF : ContDiff β 2 F) {M : β} | |
| (hb : β x, u x-F x β€ M) (hP : β x, 1 β€ P x) | |
| (he : β x, -Laplacian.laplacian u x+P x*u x β€ -Laplacian.laplacian F x+P x*F x) : | |
| β x, u x β€ F x := by | |
| have hh := boundedAbove_maximum_principle (hu.sub hF) hb (fun x hx => ?_) | |
| Β· intro x | |
| exact sub_nonpos.mp (hh x) | |
| Β· rw [laplacian_fun_sub hu hF] | |
| have hp := mul_le_mul_of_nonneg_right (hP x) hx.le | |
| nlinarith [he x] | |
| lemma polynomial_profile_iteratedDeriv (p : Polynomial β) (k : β) : | |
| β q : Polynomial β, iteratedDeriv k (fun s => p.eval (profile s)) = fun s => q.eval (profile s) := by | |
| induction k with | |
| | zero => exact β¨p,rflβ© | |
| | succ k ih => | |
| obtain β¨q,hqβ© := ih | |
| refine β¨q.derivative*(Polynomial.C ((Real.sqrt 2)β»ΒΉ)*(1-Polynomial.X^2)), ?_β© | |
| rw [iteratedDeriv_succ,hq] | |
| funext s | |
| have HH := (q.hasDerivAt (profile s)).comp s (profile_hasDerivAt s) | |
| change deriv ((fun y => q.eval y) β profile) s = _ | |
| rw [HH.deriv] | |
| simp only [Polynomial.eval_mul,Polynomial.eval_C,Polynomial.eval_sub, | |
| Polynomial.eval_one,Polynomial.eval_pow,Polynomial.eval_X,profileWeight,div_eq_mul_inv] | |
| ring | |
| lemma profile_temperate : profile.HasTemperateGrowth := by | |
| refine β¨profile_contDiff,fun k => ?_β© | |
| obtain β¨q,hqβ© := polynomial_profile_iteratedDeriv Polynomial.X k | |
| have he : iteratedDeriv k profile = fun s => q.eval (profile s) := by simpa using hq | |
| obtain β¨z,hz,hmβ© := isCompact_Icc.exists_isMaxOn | |
| (show (Set.Icc (-1 : β) 1).Nonempty from β¨0,by norm_numβ©) q.continuous.abs.continuousOn | |
| refine β¨0,|q.eval z|,fun x => ?_β© | |
| rw [norm_iteratedFDeriv_eq_norm_iteratedDeriv,he,Real.norm_eq_abs,pow_zero,mul_one] | |
| apply hm | |
| exact β¨(Real.neg_one_lt_tanh _).le,(Real.tanh_lt_one _).leβ© | |
| lemma profileWeight_temperate : profileWeight.HasTemperateGrowth := | |
| (Function.HasTemperateGrowth.const (1 : β)).sub (profile_temperate.pow 2) | |
| lemma profileWeight_le_one (s : β) : profileWeight s β€ 1 := by | |
| dsimp [profileWeight] | |
| nlinarith [sq_nonneg (profile s)] | |
| def realResolvent {n : β} (f : π’(Space n,β)) : π’(Space n,β) := | |
| Classical.choose (EllipticResolvent.exists_real_schwartz_resolvent f) | |
| lemma realResolvent_equation {n : β} (f : π’(Space n,β)) (x : Space n) : | |
| 2*realResolvent f x-Laplacian.laplacian (realResolvent f : Space n β β) x=f x := | |
| Classical.choose_spec (EllipticResolvent.exists_real_schwartz_resolvent f) x | |
| lemma schwartz_bounded {n : β} (f : π’(Space n,β)) : | |
| β M : β, 0 β€ M β§ β x, |f x| β€ M := | |
| β¨SchwartzMap.seminorm β 0 0 f,apply_nonneg _ _,SchwartzMap.norm_le_seminorm β fβ© | |
| lemma realResolvent_nonneg {n : β} {f : π’(Space n,β)} (hf : β x, 0 β€ f x) : | |
| β x, 0 β€ realResolvent f x := by | |
| obtain β¨M,hM,hbβ© := schwartz_bounded (realResolvent f) | |
| apply boundedAbove_elliptic_comparison (u := fun _ => 0) (F := (realResolvent f : Space n β β)) | |
| contDiff_const ((realResolvent f).smooth 2) (M := M) (P := fun _ => 2) | |
| Β· intro x | |
| linarith [(abs_le.mp (hb x)).1] | |
| Β· intro x; norm_num | |
| Β· intro x | |
| simpa only [InnerProductSpace.laplacian_const,Pi.zero_apply,neg_zero,mul_zero,add_zero] | |
| using (show (0 : β) β€ -Laplacian.laplacian (realResolvent f : Space n β β) x+2*realResolvent f x by | |
| linarith [realResolvent_equation f x,hf x]) | |
| lemma realResolvent_bound {n : β} {f : π’(Space n,β)} {M : β} | |
| (hf : β x, |f x| β€ M) : β x, |realResolvent f x| β€ M/2 := by | |
| obtain β¨B,hB,hbβ© := schwartz_bounded (realResolvent f) | |
| have hh (e : β) (he : |e|=1) : β x, e*realResolvent f x β€ M/2 := by | |
| apply boundedAbove_elliptic_comparison (u := fun x => e*realResolvent f x) | |
| (F := fun _ => M/2) (contDiff_const.mul ((realResolvent f).smooth 2)) contDiff_const | |
| (M := B+|M/2|) (P := fun _ => 2) | |
| Β· intro x | |
| have hmul : |e*realResolvent f x| β€ B := by rw [abs_mul,he,one_mul]; exact hb x | |
| linarith [(abs_le.mp hmul).2,le_abs_self (M/2),neg_abs_le (M/2)] | |
| Β· intro x; norm_num | |
| Β· intro x | |
| rw [laplacian_fun_const_mul ((realResolvent f).smooth 2)] | |
| have heq := congrArg (fun r : β => e*r) (realResolvent_equation f x) | |
| have hmul : |e*f x| β€ M := by rw [abs_mul,he,one_mul]; exact hf x | |
| simp only [InnerProductSpace.laplacian_const,Pi.zero_apply,neg_zero,zero_add] | |
| nlinarith [(abs_le.mp hmul).2] | |
| intro x | |
| have h1 := hh 1 (by norm_num) x | |
| have h2 := hh (-1) (by norm_num) x | |
| exact abs_le.mpr β¨by linarith,by linarithβ© | |
| end DeGiorgi | |
| end | |
| noncomputable section | |
| namespace DeGiorgi | |
| open Filter Set Topology | |
| open scoped NNReal | |
| open scoped SchwartzMap Laplacian ContDiff | |
| open FourierTransform | |
| open scoped ContDiff SchwartzMap LineDeriv | |
| open Filter Topology | |
| lemma realResolvent_mono {n : β} {f g : π’(Space n,β)} (h : β x, f x β€ g x) : | |
| β x, realResolvent f x β€ realResolvent g x := by | |
| obtain β¨M,hM,hMbβ© := schwartz_bounded (realResolvent f) | |
| obtain β¨N,hN,hNbβ© := schwartz_bounded (realResolvent g) | |
| apply boundedAbove_elliptic_comparison ((realResolvent f).smooth 2) | |
| ((realResolvent g).smooth 2) (M := M+N) (P := fun _ => 2) | |
| Β· intro x | |
| linarith [(abs_le.mp (hMb x)).2,(abs_le.mp (hNb x)).1] | |
| Β· intro x; norm_num | |
| Β· intro x | |
| linarith [realResolvent_equation f x,realResolvent_equation g x,h x] | |
| lemma realResolvent_comparison {n : β} {f : π’(Space n,β)} {F : Space n β β} | |
| (hF : ContDiff β 2 F) (hp : β x, 0 β€ F x) | |
| (he : β x, f x β€ 2*F x-Laplacian.laplacian F x) : | |
| β x, realResolvent f x β€ F x := by | |
| obtain β¨M,hM,hbβ© := schwartz_bounded (realResolvent f) | |
| apply boundedAbove_elliptic_comparison ((realResolvent f).smooth 2) hF | |
| (M := M) (P := fun _ => 2) | |
| Β· intro x; linarith [(abs_le.mp (hb x)).2,hp x] | |
| Β· intro x; norm_num | |
| Β· intro x; linarith [realResolvent_equation f x,he x] | |
| lemma realResolvent_isometry {n : β} (f : π’(Space n,β)) | |
| (J : Space n ββα΅’[β] Space n) (hJ : β x, f (J x)=f x) : | |
| β x, realResolvent f (J x)=realResolvent f x := by | |
| let u := realResolvent f | |
| have hu : ContDiff β 2 (fun x => u (J x)) := (u.smooth 2).comp J.contDiff | |
| obtain β¨M,hM,hbβ© := schwartz_bounded u | |
| have hEq (x) : 2*u (J x)-Laplacian.laplacian (fun x => u (J x)) x=f x := by | |
| rw [PoissonSupport.DeGiorgi.laplacian_comp_isometry (u.smooth 2)] | |
| exact (realResolvent_equation f (J x)).trans (hJ x) | |
| have hβ : β x, u (J x) β€ u x := by | |
| apply boundedAbove_elliptic_comparison hu (u.smooth 2) (M := 2*M) (P := fun _ => 2) | |
| Β· intro x; linarith [(abs_le.mp (hb x)).1,(abs_le.mp (hb (J x))).2] | |
| Β· intro x; norm_num | |
| Β· intro x; linarith [hEq x,realResolvent_equation f x] | |
| have hβ : β x, u x β€ u (J x) := by | |
| apply boundedAbove_elliptic_comparison (u.smooth 2) hu (M := 2*M) (P := fun _ => 2) | |
| Β· intro x; linarith [(abs_le.mp (hb x)).2,(abs_le.mp (hb (J x))).1] | |
| Β· intro x; norm_num | |
| Β· intro x; linarith [hEq x,realResolvent_equation f x] | |
| exact fun x => le_antisymm (hβ x) (hβ x) | |
| lemma schwartz_coordinateJet {n : β} (f : π’(Space n,β)) (l : List (Fin n)) : | |
| β g : π’(Space n,β), (g : Space n β β)=coordinateJet f l := by | |
| induction l with | |
| | nil => exact β¨f,rflβ© | |
| | cons i l ih => | |
| obtain β¨g,hgβ© := ih | |
| refine β¨β_{basis n i} g, ?_β© | |
| funext x | |
| rw [SchwartzMap.lineDerivOp_apply_eq_fderiv,hg] | |
| rfl | |
| lemma schwartz_jets_bounded {n : β} (f : π’(Space n,β)) (l : List (Fin n)) : | |
| β C : β, 0 β€ C β§ β x, |coordinateJet f l x| β€ C := by | |
| obtain β¨g,hgβ© := schwartz_coordinateJet f l | |
| simpa only [hg] using schwartz_bounded g | |
| lemma JetControl.reindex {n : β} {Ξ± Ξ² : Type*} {S : Set Ξ±} {T : Set Ξ²} | |
| {w f : Ξ± β Space n β β} {k : β} (h : JetControl S w f k) (g : Ξ² β Ξ±) | |
| (hg : β b β T, g b β S) : | |
| JetControl T (fun b => w (g b)) (fun b => f (g b)) k := by | |
| intro l hl | |
| obtain β¨C,hC,hbβ© := h l hl | |
| exact β¨C,hC,fun b hT x => hb (g b) (hg b hT) xβ© | |
| def resolventIterate {n : β} (V : Space n β β) (f : π’(Space n,β)) : β β π’(Space n,β) | |
| | 0 => 0 | |
| | k+1 => realResolvent (f+SchwartzMap.smulLeftCLM β V (resolventIterate V f k)) | |
| lemma resolventIterate_equation {n : β} {V : Space n β β} (hV : V.HasTemperateGrowth) | |
| (f : π’(Space n,β)) (k : β) (x : Space n) : | |
| 2*resolventIterate V f (k+1) x-Laplacian.laplacian (resolventIterate V f (k+1) : Space n β β) x = | |
| f x+V x*resolventIterate V f k x := by | |
| simpa only [resolventIterate,add_apply,SchwartzMap.smulLeftCLM_apply_apply hV,smul_eq_mul] | |
| using realResolvent_equation (f+SchwartzMap.smulLeftCLM β V (resolventIterate V f k)) x | |
| lemma resolventIterate_nonneg {n : β} {V : Space n β β} (hV : V.HasTemperateGrowth) | |
| (hV0 : β x, 0 β€ V x) {f : π’(Space n,β)} (hf : β x, 0 β€ f x) : | |
| β k x, 0 β€ resolventIterate V f k x := by | |
| intro k | |
| induction k with | |
| | zero => simp [resolventIterate] | |
| | succ k ih => | |
| apply realResolvent_nonneg | |
| intro x | |
| simpa only [add_apply,SchwartzMap.smulLeftCLM_apply_apply hV,smul_eq_mul] | |
| using add_nonneg (hf x) (mul_nonneg (hV0 x) (ih x)) | |
| lemma resolventIterate_comparison {n : β} {V F : Space n β β} | |
| (hV : V.HasTemperateGrowth) (hV0 : β x, 0 β€ V x) | |
| (hF : ContDiff β 2 F) (hF0 : β x, 0 β€ F x) {f : π’(Space n,β)} | |
| (he : β x, f x+V x*F x β€ 2*F x-Laplacian.laplacian F x) : | |
| β k x, resolventIterate V f k x β€ F x := by | |
| intro k | |
| induction k with | |
| | zero => simpa [resolventIterate] using hF0 | |
| | succ k ih => | |
| apply realResolvent_comparison hF hF0 | |
| intro x | |
| simp only [add_apply,SchwartzMap.smulLeftCLM_apply_apply hV,smul_eq_mul] | |
| exact (add_le_add le_rfl (mul_le_mul_of_nonneg_left (ih x) (hV0 x))).trans (he x) | |
| lemma resolventIterate_mono_source {n : β} {V : Space n β β} | |
| (hV : V.HasTemperateGrowth) (hV0 : β x, 0 β€ V x) {f g : π’(Space n,β)} | |
| (hfg : β x, f x β€ g x) : β k x, resolventIterate V f k x β€ resolventIterate V g k x := by | |
| intro k | |
| induction k with | |
| | zero => simp only [resolventIterate,le_refl,implies_true] | |
| | succ k ih => | |
| apply realResolvent_mono | |
| intro x | |
| simp only [add_apply,SchwartzMap.smulLeftCLM_apply_apply hV,smul_eq_mul] | |
| exact add_le_add (hfg x) (mul_le_mul_of_nonneg_left (ih x) (hV0 x)) | |
| lemma resolventIterate_mono_index {n : β} {V : Space n β β} | |
| (hV : V.HasTemperateGrowth) (hV0 : β x, 0 β€ V x) {f : π’(Space n,β)} | |
| (hf : β x, 0 β€ f x) (x : Space n) : Monotone (fun k => resolventIterate V f k x) := by | |
| apply monotone_nat_of_le_succ | |
| have H : β k x, resolventIterate V f k x β€ resolventIterate V f (k+1) x := by | |
| intro k | |
| induction k with | |
| | zero => simpa only [resolventIterate,zero_apply] using resolventIterate_nonneg hV hV0 hf 1 | |
| | succ k ih => | |
| apply realResolvent_mono | |
| intro x | |
| simp only [add_apply,SchwartzMap.smulLeftCLM_apply_apply hV,smul_eq_mul] | |
| exact add_le_add le_rfl (mul_le_mul_of_nonneg_left (ih x) (hV0 x)) | |
| exact fun k => H k x | |
| lemma resolventIterate_isometry {n : β} {V : Space n β β} (hV : V.HasTemperateGrowth) | |
| (J : Space n ββα΅’[β] Space n) {f : π’(Space n,β)} | |
| (hJV : β x, V (J x)=V x) (hJf : β x, f (J x)=f x) : | |
| β k x, resolventIterate V f k (J x)=resolventIterate V f k x := by | |
| intro k | |
| induction k with | |
| | zero => simp [resolventIterate] | |
| | succ k ih => | |
| apply realResolvent_isometry _ J | |
| intro x | |
| simp only [add_apply,SchwartzMap.smulLeftCLM_apply_apply hV,smul_eq_mul,hJV,hJf,ih] | |
| end DeGiorgi | |
| end | |
| end OAI | |