Download data/lean/OAI/Probability/JammingConcavity/RowVariableComparison.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 36.5 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/JammingConcavity/RowVariableComparison.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/JammingConcavity/RowVariableComparison.lean
-
curl -L -o RowVariableComparison.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/JammingConcavity/RowVariableComparison.lean
36.5 kB
| import Mathlib | |
| import OAI.Probability.JammingConcavity.ParabolicInterior | |
| namespace OAI | |
| /-! Row Variable Comparison. -/ | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Set | |
| open scoped NNReal ENNReal | |
| open Set Filter | |
| open scoped Topology | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped ENNReal NNReal Topology BigOperators | |
| open MeasureTheory Filter Set | |
| open scoped ENNReal NNReal BigOperators | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped ENNReal NNReal Topology | |
| open scoped NNReal ENNReal Topology | |
| open scoped NNReal Topology | |
| open Set | |
| open Set Filter MeasureTheory | |
| open Set Filter | |
| open scoped Topology | |
| namespace MicroscopicJamming | |
| namespace VariableDiffusion | |
| lemma backward_positive_strict_compact {Q R : β} (hQ : 0 < Q) (hR : 0 < R) | |
| {U b d a : β β β β β} | |
| (hc : ContinuousOn (fun p : β Γ β => U p.1 p.2) (Icc 0 Q ΓΛ’ Icc (-R) R)) | |
| (hx : β t β Icc 0 Q, Differentiable β (U t)) | |
| (ht : β t β Ico 0 Q, β x, HasDerivWithinAt (fun s => U s x) (d t x) (Ici t) t) | |
| (ha : β t β Ico 0 Q, β x, 0 β€ a t x) | |
| (hp : β t β Ico 0 Q, β x β Ioo (-R) R, 0 < U t x β | |
| 0 < d t x+a t x*deriv (deriv (U t)) x+b t x*deriv (U t) x) | |
| (hterm : β x β Icc (-R) R, U Q x β€ 0) | |
| (hleft : β t β Icc 0 Q, U t (-R) β€ 0) | |
| (hright : β t β Icc 0 Q, U t R β€ 0) : | |
| β t β Icc 0 Q, β x β Icc (-R) R, U t x β€ 0 := by | |
| have hne : (Icc 0 Q ΓΛ’ Icc (-R) R).Nonempty := | |
| β¨(0,0),β¨le_rfl,hQ.leβ©,by constructor <;> linarithβ© | |
| obtain β¨p,hpS,hmaxβ© := (isCompact_Icc.prod isCompact_Icc).exists_isMaxOn hne hc | |
| suffices h : U p.1 p.2 β€ 0 by | |
| intro t ht' x hx' | |
| exact (hmax (show (t,x) β Icc 0 Q ΓΛ’ Icc (-R) R from β¨ht',hx'β©)).trans h | |
| by_contra hn | |
| have hpos : 0 < U p.1 p.2 := lt_of_not_ge hn | |
| have htQ : p.1 < Q := lt_of_le_of_ne hpS.1.2 (by | |
| intro he | |
| have hh := hterm p.2 hpS.2 | |
| rw [β he] at hh | |
| exact (not_le_of_gt hpos) hh) | |
| have hxl : -R < p.2 := lt_of_le_of_ne hpS.2.1 (by | |
| intro he | |
| have hh := hleft p.1 hpS.1 | |
| rw [he] at hh | |
| exact (not_le_of_gt hpos) hh) | |
| have hxr : p.2 < R := lt_of_le_of_ne hpS.2.2 (by | |
| intro he | |
| have hh := hright p.1 hpS.1 | |
| rw [β he] at hh | |
| exact (not_le_of_gt hpos) hh) | |
| have hxmax : IsMaxOn (U p.1) (Icc (-R) R) p.2 := | |
| fun x hx' => hmax (show (p.1,x) β Icc 0 Q ΓΛ’ Icc (-R) R from β¨hpS.1,hx'β©) | |
| have hxlocal : IsLocalMax (U p.1) p.2 := | |
| hxmax.isLocalMax (Icc_mem_nhds hxl hxr) | |
| have hzero := hxlocal.deriv_eq_zero | |
| have hsecond := localMax_second_deriv_nonpos (hx p.1 hpS.1) hxlocal | |
| have htmax : IsMaxOn (fun t => U t p.2) (Icc p.1 Q) p.1 := | |
| fun t ht' => hmax (show (t,p.2) β Icc 0 Q ΓΛ’ Icc (-R) R from β¨β¨hpS.1.1.trans ht'.1,ht'.2β©,hpS.2β©) | |
| have htan : Q-p.1 β posTangentConeAt (Icc p.1 Q) p.1 := | |
| sub_mem_posTangentConeAt_of_segment_subset (segment_eq_Icc htQ.le βΈ Subset.rfl) | |
| have hd := (ht p.1 β¨hpS.1.1,htQβ© p.2).mono (show Icc p.1 Q β Ici p.1 from fun _ h => h.1) | |
| have hnonpos : (Q-p.1)*d p.1 p.2 β€ 0 := by | |
| simpa only [ContinuousLinearMap.smulRight_apply,ContinuousLinearMap.toSpanSingleton_apply,one_apply_eq_self,smul_eq_mul] using | |
| htmax.isLocalMaxOn.hasFDerivWithinAt_nonpos hd htan | |
| have hdt : d p.1 p.2 β€ 0 := by nlinarith [sub_pos.mpr htQ] | |
| have hstrict := hp p.1 β¨hpS.1.1,htQβ© p.2 β¨hxl,hxrβ© hpos | |
| rw [hzero,mul_zero,add_zero] at hstrict | |
| have hmul := mul_nonpos_of_nonneg_of_nonpos (ha p.1 β¨hpS.1.1,htQβ© p.2) hsecond | |
| linarith | |
| lemma polynomial_transport_neg (n : β) {K A a b x : β} (hK : 0 β€ K) (hA : 0 β€ A) | |
| (ha : a β€ A) (hb : |b| β€ K*(1+|x|)) : | |
| -(4*A*(n+2)^2+4*K*(n+2)+1)*(1+x^2)^(n+2)+ | |
| a*(2*(n+2)*(1+x^2)^(n+1)+4*(n+2)*(n+1)*x^2*(1+x^2)^n)+ | |
| b*(2*(n+2)*x*(1+x^2)^(n+1)) < 0 := by | |
| have hn : 0 β€ (n:β) := Nat.cast_nonneg n | |
| have hnorm : (1+|x|)*|x| β€ 2*(1+x^2) := by | |
| nlinarith [sq_abs x,sq_nonneg (|x|-1)] | |
| have hbx : b*x β€ 2*K*(1+x^2) := calc | |
| b*x β€ |b*x| := le_abs_self _ | |
| _ = |b| * |x| := abs_mul _ _ | |
| _ β€ K*(1+|x|)*|x| := mul_le_mul_of_nonneg_right hb (abs_nonneg _) | |
| _ β€ 2*K*(1+x^2) := by nlinarith [mul_le_mul_of_nonneg_left hnorm hK] | |
| have hq : 1+x^2 β€ (1+x^2)^2 := by nlinarith [sq_nonneg x,sq_nonneg (x^2)] | |
| have hxq : x^2 β€ (1+x^2)^2 := by nlinarith [sq_nonneg (x^2)] | |
| have h1 := mul_le_mul_of_nonneg_left hq (show 0 β€ 2*A*((n:β)+2) by positivity) | |
| have h2 := mul_le_mul_of_nonneg_left hxq (show 0 β€ 4*A*((n:β)+2)*(n+1) by positivity) | |
| have h3 := mul_le_mul_of_nonneg_left hbx (show 0 β€ 2*((n:β)+2)*(1+x^2) by positivity) | |
| have h4 := mul_le_mul_of_nonneg_right ha | |
| (show 0 β€ 2*((n:β)+2)*(1+x^2)+4*(n+2)*(n+1)*x^2 by positivity) | |
| have hneg : -(4*A*((n:β)+2)^2+4*K*(n+2)+1)*(1+x^2)^2+ | |
| a*(2*(n+2)*(1+x^2)+4*(n+2)*(n+1)*x^2)+2*(n+2)*b*x*(1+x^2) < 0 := by | |
| nlinarith [sq_pos_of_pos (show 0 < 1+x^2 by positivity), | |
| mul_nonneg (show 0β€2*A*((n:β)+2) by positivity) (sq_nonneg (1+x^2))] | |
| have hmul := mul_neg_of_pos_of_neg (show 0 < (1+x^2)^n by positivity) hneg | |
| convert hmul using 1; first | rfl | (simp only [pow_add,pow_one]; ring) | |
| lemma backward_polynomial_bound {Q K C A : β} (n : β) (hQ : 0 < Q) (hK : 0 β€ K) (hA : 0 β€ A) (hC : 0 β€ C) | |
| {U b d a : β β β β β} | |
| (hc : ContinuousOn (fun p : β Γ β => U p.1 p.2) (Icc 0 Q ΓΛ’ univ)) | |
| (hx : β t β Icc 0 Q, Differentiable β (U t) β§ Differentiable β (deriv (U t))) | |
| (ht : β t β Ico 0 Q, β x, HasDerivWithinAt (fun s => U s x) (d t x) (Ici t) t) | |
| (ha : β t β Icc 0 Q, β x, 0 β€ a t x β§ a t x β€ A) | |
| (hb : β t β Icc 0 Q, β x, |b t x| β€ K*(1+|x|)) | |
| (hg : β t β Icc 0 Q, β x, U t x β€ C*(1+x^2)^n) | |
| (hp : β t β Ico 0 Q, β x, 0 < U t x β | |
| 0 β€ d t x+a t x*deriv (deriv (U t)) x+b t x*deriv (U t) x) | |
| (hterm : β x, U Q x β€ 0) | |
| {Ξ΅ : β} (hΞ΅ : 0 < Ξ΅) : | |
| β t β Icc 0 Q, β x, U t x β€ polynomialBarrier n Ξ΅ (4*A*(n+2)^2+4*K*(n+2)+1) Q t x := by | |
| let c := 4*A*(n+2)^2+4*K*(n+2)+1 | |
| have hcpos : 0 β€ c := by dsimp [c]; positivity | |
| let V : β β β β β := fun t x => U t x-polynomialBarrier n Ξ΅ c Q t x | |
| let vd : β β β β β := fun t x => d t x+c*polynomialBarrier n Ξ΅ c Q t x | |
| have hvx (t : β) (ht' : t β Icc 0 Q) (x : β) : | |
| HasDerivAt (V t) (deriv (U t) x-Ξ΅*Real.exp (c*(Q-t))*(2*(n+2)*x*(1+x^2)^(n+1))) x := | |
| ((hx t ht').1 x).hasDerivAt.sub (polynomialBarrier_space n Ξ΅ c Q t x) | |
| have hvxx (t : β) (ht' : t β Icc 0 Q) (x : β) : | |
| deriv (deriv (V t)) x=deriv (deriv (U t)) x- | |
| Ξ΅*Real.exp (c*(Q-t))*(2*(n+2)*(1+x^2)^(n+1)+4*(n+2)*(n+1)*x^2*(1+x^2)^n) := by | |
| have he : deriv (V t)=fun y => deriv (U t) y-deriv (polynomialBarrier n Ξ΅ c Q t) y := by | |
| ext y | |
| rw [(hvx t ht' y).deriv,(polynomialBarrier_space n Ξ΅ c Q t y).deriv] | |
| rw [he] | |
| exact (((hx t ht').2 x).hasDerivAt.sub (polynomialBarrier_space2 n Ξ΅ c Q t x)).deriv | |
| have hvtime (t : β) (ht' : t β Ico 0 Q) (x : β) : | |
| HasDerivWithinAt (fun s => V s x) (vd t x) (Ici t) t := by | |
| convert (ht t ht' x).sub (polynomialBarrier_time n Ξ΅ c Q t x).hasDerivWithinAt using 1; first | rfl | (dsimp [V,vd]; ring) | |
| have hvp (t : β) (ht' : t β Ico 0 Q) (x : β) (hV : 0 < V t x) : | |
| 0 < vd t x+a t x*deriv (deriv (V t)) x+b t x*deriv (V t) x := by | |
| have htcc : t β Icc 0 Q := β¨ht'.1,ht'.2.leβ© | |
| rw [hvxx t htcc x,(hvx t htcc x).deriv] | |
| have hneg := polynomial_transport_neg n hK hA (ha t htcc x).2 (hb t htcc x) | |
| have hneg' := mul_neg_of_pos_of_neg (mul_pos hΞ΅ (Real.exp_pos (c*(Q-t)))) hneg | |
| have hUp : 0 < U t x := by | |
| have : 0 β€ polynomialBarrier n Ξ΅ c Q t x := by unfold polynomialBarrier; positivity | |
| dsimp [V] at hV | |
| linarith | |
| have hP := hp t ht' x hUp | |
| dsimp [vd,polynomialBarrier,c] at * | |
| nlinarith | |
| intro t ht' x | |
| let R := |x|+C/Ξ΅+1 | |
| have hdiv : 0 β€ C/Ξ΅ := div_nonneg hC hΞ΅.le | |
| have hR1 : 1 β€ R := by dsimp [R]; linarith [abs_nonneg x] | |
| have hR : 0 < R := by linarith | |
| have hxR : x β Icc (-R) R := by | |
| dsimp [R]; constructor <;> linarith [le_abs_self x,neg_abs_le x] | |
| have hCR : C β€ Ξ΅*(1+R^2) := by | |
| have hr : C/Ξ΅ β€ 1+R^2 := by dsimp [R] at hR1 β’; nlinarith [abs_nonneg x,sq_nonneg R] | |
| have hh := (div_le_iffβ hΞ΅).mp hr | |
| nlinarith | |
| have hCR2 : C β€ Ξ΅*(1+R^2)^2 := hCR.trans (mul_le_mul_of_nonneg_left | |
| (by nlinarith [sq_nonneg R,sq_nonneg (R^2)]) hΞ΅.le) | |
| have hB (s : β) (hs : s β Icc 0 Q) : | |
| C*(1+R^2)^n β€ polynomialBarrier n Ξ΅ c Q s R := by | |
| have he : 1 β€ Real.exp (c*(Q-s)) := | |
| Real.one_le_exp_iff.mpr (mul_nonneg hcpos (sub_nonneg.mpr hs.2)) | |
| calc | |
| C*(1+R^2)^n β€ (Ξ΅*(1+R^2)^2)*(1+R^2)^n := mul_le_mul_of_nonneg_right hCR2 (by positivity) | |
| _ = Ξ΅*(1+R^2)^(n+2) := by rw [pow_add]; ring | |
| _ β€ Real.exp (c*(Q-s))*(Ξ΅*(1+R^2)^(n+2)) := le_mul_of_one_le_left (by positivity) he | |
| _ = _ := by unfold polynomialBarrier; ring | |
| have hVc : ContinuousOn (fun p : β Γ β => V p.1 p.2) (Icc 0 Q ΓΛ’ Icc (-R) R) := by | |
| apply (hc.mono (by intro p hp'; exact β¨hp'.1,mem_univ _β©)).sub | |
| have hh : Continuous (fun p : β Γ β => polynomialBarrier n Ξ΅ c Q p.1 p.2) := by | |
| unfold polynomialBarrier | |
| fun_prop | |
| exact hh.continuousOn | |
| have hcomp := backward_positive_strict_compact (b := b) (a := a) hQ hR hVc | |
| (fun s hs y => (hvx s hs y).differentiableAt) hvtime (fun t ht x => (ha t β¨ht.1,ht.2.leβ© x).1) (fun s hs y _ => hvp s hs y) | |
| (fun y _ => by | |
| dsimp [V] | |
| have hn : 0 β€ polynomialBarrier n Ξ΅ c Q Q y := by unfold polynomialBarrier; positivity | |
| linarith [hterm y]) | |
| (fun s hs => by | |
| dsimp [V] | |
| have hh := hg s hs (-R) | |
| have hh' := hB s hs | |
| simp only [neg_sq] at hh | |
| have he : polynomialBarrier n Ξ΅ c Q s (-R)=polynomialBarrier n Ξ΅ c Q s R := by simp [polynomialBarrier] | |
| rw [he] | |
| linarith) | |
| (fun s hs => by dsimp [V]; linarith [hg s hs R,hB s hs]) | |
| have hh := hcomp t ht' x hxR | |
| dsimp [V] at hh | |
| linarith | |
| lemma backward_polynomial_comparison {Q K A : β} (hQ : 0 < Q) (hK : 0 β€ K) (hA : 0 β€ A) | |
| {U b d a : β β β β β} | |
| (hc : ContinuousOn (fun p : β Γ β => U p.1 p.2) (Icc 0 Q ΓΛ’ univ)) | |
| (hx : β t β Icc 0 Q, Differentiable β (U t) β§ Differentiable β (deriv (U t))) | |
| (ht : β t β Ico 0 Q, β x, HasDerivWithinAt (fun s => U s x) (d t x) (Ici t) t) | |
| (ha : β t β Icc 0 Q, β x, 0 β€ a t x β§ a t x β€ A) | |
| (hb : β t β Icc 0 Q, β x, |b t x| β€ K*(1+|x|)) | |
| (hg : Higher.UniformPolynomialGrowth (Icc 0 Q) U) | |
| (hp : β t β Ico 0 Q, β x, 0 < U t x β | |
| 0 β€ d t x+a t x*deriv (deriv (U t)) x+b t x*deriv (U t) x) | |
| (hterm : β x, U Q x β€ 0) : | |
| β t β Icc 0 Q, β x, U t x β€ 0 := by | |
| obtain β¨n,C,hC,hgβ© := hg | |
| have hg' (t : β) (ht' : t β Icc 0 Q) (x : β) : U t x β€ (C*2^n)*(1+x^2)^n := calc | |
| U t x β€ |U t x| := le_abs_self _ | |
| _ β€ C*(1+|x|)^n := hg t ht' x | |
| _ β€ C*(2*(1+x^2))^n := mul_le_mul_of_nonneg_left (pow_le_pow_leftβ (by positivity) | |
| (by nlinarith [sq_abs x,sq_nonneg (|x|-1)]) n) hC | |
| _ = _ := by rw [mul_pow]; ring | |
| intro t ht' x | |
| by_contra hn | |
| have hpos : 0 < U t x := lt_of_not_ge hn | |
| let M := Real.exp ((4*A*(n+2)^2+4*K*(n+2)+1)*(Q-t))*(1+x^2)^(n+2) | |
| have hM : 0 < M := by dsimp [M]; positivity | |
| let Ξ΅ := U t x/(2*M) | |
| have hΞ΅ : 0 < Ξ΅ := div_pos hpos (by positivity) | |
| have hh := backward_polynomial_bound n hQ hK hA (show 0 β€ C*2^n by positivity) hc hx ht ha hb hg' hp hterm hΞ΅ t ht' x | |
| have he : polynomialBarrier n Ξ΅ (4*A*(n+2)^2+4*K*(n+2)+1) Q t x=U t x/2 := by | |
| dsimp only [polynomialBarrier] | |
| rw [mul_assoc] | |
| change (U t x/(2*M))*M=U t x/2 | |
| field_simp | |
| rw [he] at hh | |
| linarith | |
| end VariableDiffusion | |
| end MicroscopicJamming | |
| open Set Filter | |
| open scoped Topology | |
| namespace MicroscopicJamming | |
| namespace VariableDiffusion | |
| lemma backward_reaction_source_upper {Q K R H S A : β} (hQ : 0 < Q) (hK : 0 β€ K) (hA : 0 β€ A) (hR : 0 β€ R) (hH : 0 β€ H) (hS : 0 β€ S) | |
| {U b d r a : β β β β β} | |
| (hc : ContinuousOn (fun p : β Γ β => U p.1 p.2) (Icc 0 Q ΓΛ’ univ)) | |
| (hx : β t β Icc 0 Q, Differentiable β (U t) β§ Differentiable β (deriv (U t))) | |
| (ht : β t β Ico 0 Q, β x, HasDerivWithinAt (fun s => U s x) (d t x) (Ici t) t) | |
| (ha : β t β Icc 0 Q, β x, 0 β€ a t x β§ a t x β€ A) | |
| (hb : β t β Icc 0 Q, β x, |b t x| β€ K*(1+|x|)) | |
| (hg : Higher.UniformPolynomialGrowth (Icc 0 Q) U) | |
| (hr : β t β Ico 0 Q, β x, r t x β€ R) | |
| (hp : β t β Ico 0 Q, β x, | |
| -S β€ d t x+a t x*deriv (deriv (U t)) x+b t x*deriv (U t) x+r t x*U t x) | |
| (hterm : β x, U Q x β€ H) : | |
| β t β Icc 0 Q, β x, U t x β€ (H+S*(Q-t))*Real.exp (R*(Q-t)) := by | |
| let E : β β β := fun t => Real.exp (R*(t-Q)) | |
| let V : β β β β β := fun t x => E t*U t x-(H+S*(Q-t)) | |
| let vd : β β β β β := fun t x => E t*(d t x+R*U t x)+S | |
| have hE (t : β) : HasDerivAt E (R*E t) t := by | |
| convert (((hasDerivAt_id t).sub_const Q).const_mul R).exp using 1 <;> first | rfl | (dsimp [E]; ring) | |
| have hEc : Continuous E := continuous_iff_continuousAt.mpr (fun t => (hE t).continuousAt) | |
| have hEp (t : β) : 0 < E t := Real.exp_pos _ | |
| have hEl (t : β) (ht' : t β Icc 0 Q) : E t β€ 1 := | |
| Real.exp_le_one_iff.mpr (mul_nonpos_of_nonneg_of_nonpos hR (sub_nonpos.mpr ht'.2)) | |
| have hvx (t : β) (ht' : t β Icc 0 Q) (x : β) : | |
| HasDerivAt (V t) (E t*deriv (U t) x) x := | |
| (((hx t ht').1 x).hasDerivAt.const_mul (E t)).sub_const (H+S*(Q-t)) | |
| have hvxx (t : β) (ht' : t β Icc 0 Q) (x : β) : | |
| HasDerivAt (deriv (V t)) (E t*deriv (deriv (U t)) x) x := by | |
| have he : deriv (V t)=fun y => E t*deriv (U t) y := funext (fun y => (hvx t ht' y).deriv) | |
| rw [he] | |
| exact ((hx t ht').2 x).hasDerivAt.const_mul (E t) | |
| have hvtime (t : β) (ht' : t β Ico 0 Q) (x : β) : | |
| HasDerivWithinAt (fun s => V s x) (vd t x) (Ici t) t := by | |
| have hW : HasDerivAt (fun s : β => H+S*(Q-s)) (-S) t := by | |
| convert (HasDerivAt.const_add H (((hasDerivAt_const t Q).sub (hasDerivAt_id t)).const_mul S)) using 1 <;> first | rfl | ring | |
| convert ((hE t).hasDerivWithinAt.mul (ht t ht' x)).sub hW.hasDerivWithinAt using 1; | |
| first | rfl | (dsimp [vd]; ring) | |
| have hWnon (t : β) (ht' : t β Icc 0 Q) : 0 β€ H+S*(Q-t) := by | |
| have := sub_nonneg.mpr ht'.2 | |
| positivity | |
| have hWle (t : β) (ht' : t β Icc 0 Q) : H+S*(Q-t) β€ H+S*Q := by nlinarith [ht'.1] | |
| have hvg : Higher.UniformPolynomialGrowth (Icc 0 Q) V := by | |
| obtain β¨n,C,hC,hgβ© := hg | |
| refine β¨n,C+H+S*Q,by positivity,fun t ht' x => ?_β© | |
| have he := mul_le_mul_of_nonneg_right (hEl t ht') (abs_nonneg (U t x)) | |
| have hp1 : 1 β€ (1+|x|)^n := one_le_powβ (by linarith [abs_nonneg x]) | |
| calc | |
| |V t x| β€ |E t*U t x|+|H+S*(Q-t)| := abs_sub _ _ | |
| _ = E t*|U t x|+(H+S*(Q-t)) := by rw [abs_mul,abs_of_pos (hEp t),abs_of_nonneg (hWnon t ht')] | |
| _ β€ |U t x|+(H+S*Q) := by simpa only [one_mul] using add_le_add he (hWle t ht') | |
| _ β€ C*(1+|x|)^n+(H+S*Q)*(1+|x|)^n := | |
| add_le_add (hg t ht' x) (le_mul_of_one_le_right (by positivity) hp1) | |
| _ = _ := by ring | |
| have hvc : ContinuousOn (fun p : β Γ β => V p.1 p.2) (Icc 0 Q ΓΛ’ univ) := | |
| ((hEc.comp continuous_fst).continuousOn.mul hc).sub | |
| (continuousOn_const.add (continuousOn_const.mul (continuousOn_const.sub continuousOn_fst))) | |
| have hcomp := backward_polynomial_comparison hQ hK hA hvc | |
| (fun t ht' => β¨fun x => (hvx t ht' x).differentiableAt,fun x => (hvxx t ht' x).differentiableAtβ©) | |
| hvtime ha hb hvg (fun t ht' x hpos => ?_) (fun x => ?_) | |
| Β· intro t ht' x | |
| have h := hcomp t ht' x | |
| dsimp [V] at h | |
| have hexp : E t*Real.exp (R*(Q-t))=1 := by rw [β Real.exp_add]; convert Real.exp_zero using 1; congr 1; ring | |
| have hh := mul_le_mul_of_nonneg_right (show E t*U t x β€ H+S*(Q-t) by linarith) (Real.exp_nonneg (R*(Q-t))) | |
| calc | |
| U t x = (E t*Real.exp (R*(Q-t)))*U t x := by rw [hexp,one_mul] | |
| _ = E t*U t x*Real.exp (R*(Q-t)) := by ring | |
| _ β€ _ := hh | |
| Β· rw [(hvxx t β¨ht'.1,ht'.2.leβ© x).deriv,(hvx t β¨ht'.1,ht'.2.leβ© x).deriv] | |
| have hpp := hp t ht' x | |
| have hrp := hr t ht' x | |
| have hUp : 0 β€ E t*U t x := by dsimp [V] at hpos; linarith [hWnon t β¨ht'.1,ht'.2.leβ©] | |
| have hnn := mul_nonneg (sub_nonneg.mpr hrp) hUp | |
| dsimp [vd] | |
| calc | |
| _ = E t*(d t x+a t x*deriv (deriv (U t)) x+b t x*deriv (U t) x+r t x*U t x)+ | |
| (R-r t x)*(E t*U t x)+S := by ring | |
| _ β₯ 0 := by | |
| have hh := mul_le_mul_of_nonneg_left hpp (hEp t).le | |
| have he := mul_le_mul_of_nonneg_right (hEl t β¨ht'.1,ht'.2.leβ©) hS | |
| nlinarith | |
| Β· dsimp [V,E] | |
| simp only [sub_self,mul_zero,Real.exp_zero,one_mul,add_zero] | |
| exact sub_nonpos.mpr (hterm x) | |
| lemma backward_reaction_source_bound {Q K R H S A : β} (hQ : 0 < Q) (hK : 0 β€ K) (hA : 0 β€ A) (hR : 0 β€ R) (hH : 0 β€ H) (hS : 0 β€ S) | |
| {U b d r a : β β β β β} | |
| (hc : ContinuousOn (fun p : β Γ β => U p.1 p.2) (Icc 0 Q ΓΛ’ univ)) | |
| (hx : β t β Icc 0 Q, Differentiable β (U t) β§ Differentiable β (deriv (U t))) | |
| (ht : β t β Ico 0 Q, β x, HasDerivWithinAt (fun s => U s x) (d t x) (Ici t) t) | |
| (ha : β t β Icc 0 Q, β x, 0 β€ a t x β§ a t x β€ A) | |
| (hb : β t β Icc 0 Q, β x, |b t x| β€ K*(1+|x|)) | |
| (hg : Higher.UniformPolynomialGrowth (Icc 0 Q) U) | |
| (hr : β t β Ico 0 Q, β x, r t x β€ R) | |
| (hp : β t β Ico 0 Q, β x, | |
| |d t x+a t x*deriv (deriv (U t)) x+b t x*deriv (U t) x+r t x*U t x| β€ S) | |
| (hterm : β x, |U Q x| β€ H) : | |
| β t β Icc 0 Q, β x, |U t x| β€ (H+S*(Q-t))*Real.exp (R*(Q-t)) := by | |
| have hupper := backward_reaction_source_upper hQ hK hA hR hH hS hc hx ht ha hb hg hr (fun t ht x => (abs_le.mp (hp t ht x)).1) | |
| (fun x => (le_abs_self _).trans (hterm x)) | |
| have hn1 (t : β) (ht' : t β Icc 0 Q) : deriv (fun x => -U t x)=fun x => -deriv (U t) x := by | |
| funext x; exact ((hx t ht').1 x).hasDerivAt.neg.deriv | |
| have hn2 (t : β) (ht' : t β Icc 0 Q) : deriv (deriv (fun x => -U t x))=fun x => -deriv (deriv (U t)) x := by | |
| rw [hn1 t ht']; funext x; exact ((hx t ht').2 x).hasDerivAt.neg.deriv | |
| have hneg := backward_reaction_source_upper (U:=fun t x => -U t x) (d:=fun t x => -d t x) | |
| hQ hK hA hR hH hS hc.neg | |
| (fun t ht' => β¨(hx t ht').1.neg,by rw [hn1 t ht']; exact (hx t ht').2.negβ©) | |
| (fun t ht' x => (ht t ht' x).neg) ha hb | |
| (by simpa only [neg_one_mul] using hg.const_mul (-1)) hr | |
| (fun t ht' x => by rw [hn2 t β¨ht'.1,ht'.2.leβ©,hn1 t β¨ht'.1,ht'.2.leβ©]; linarith [(abs_le.mp (hp t ht' x)).2]) | |
| (fun x => (neg_le_abs _).trans (hterm x)) | |
| intro t ht' x | |
| rw [abs_le] | |
| exact β¨by linarith [hneg t ht' x],hupper t ht' xβ© | |
| end VariableDiffusion | |
| end MicroscopicJamming | |
| open Set Filter | |
| open scoped Topology | |
| namespace MicroscopicJamming | |
| namespace VariableDiffusion | |
| lemma polynomialBarrier_growth (n : β) (e c Q : β) : | |
| Higher.UniformPolynomialGrowth (Icc 0 Q) (polynomialBarrier n e c Q) := by | |
| obtain β¨B,hBβ© := isCompact_Icc.exists_bound_of_continuousOn | |
| (f:=fun t : β => e*Real.exp (c*(Q-t))) (by fun_prop) | |
| refine β¨2*(n+2),max B 0,le_max_right _ _,fun t ht x => ?_β© | |
| have hp : 1+x^2 β€ (1+|x|)^2 := by nlinarith [sq_abs x,abs_nonneg x] | |
| have hb := hB t ht | |
| rw [Real.norm_eq_abs] at hb | |
| calc | |
| |polynomialBarrier n e c Q t x| = |e*Real.exp (c*(Q-t))| *(1+x^2)^(n+2) := by | |
| unfold polynomialBarrier; rw [abs_mul,abs_of_nonneg (show 0 β€ (1+x^2)^(n+2) by positivity)] | |
| _ β€ max B 0*((1+|x|)^2)^(n+2) := mul_le_mul (hb.trans (le_max_left _ _)) | |
| (pow_le_pow_leftβ (by positivity) hp _) (by positivity) (le_max_right _ _) | |
| _ = _ := by rw [βpow_mul] | |
| lemma backward_polynomial_source_upper {Q K R H S A : β} (n : β) | |
| (hQ : 0 < Q) (hK : 0 β€ K) (hA : 0 β€ A) (hR : 0 β€ R) (hH : 0 β€ H) (hS : 0 β€ S) | |
| {U b d r a : β β β β β} | |
| (hc : ContinuousOn (fun p : β Γ β => U p.1 p.2) (Icc 0 Q ΓΛ’ univ)) | |
| (hx : β t β Icc 0 Q, Differentiable β (U t) β§ Differentiable β (deriv (U t))) | |
| (ht : β t β Ico 0 Q, β x, HasDerivWithinAt (fun s => U s x) (d t x) (Ici t) t) | |
| (ha : β t β Icc 0 Q, β x, 0 β€ a t x β§ a t x β€ A) | |
| (hb : β t β Icc 0 Q, β x, |b t x| β€ K*(1+|x|)) | |
| (hg : Higher.UniformPolynomialGrowth (Icc 0 Q) U) | |
| (hr : β t β Ico 0 Q, β x, r t x β€ R) | |
| (hp : β t β Ico 0 Q, β x, | |
| -S*(1+x^2)^(n+2) β€ d t x+a t x*deriv (deriv (U t)) x+b t x*deriv (U t) x+r t x*U t x) | |
| (hterm : β x, U Q x β€ H*(1+x^2)^(n+2)) : | |
| β t β Icc 0 Q, β x, U t x β€ | |
| polynomialBarrier n (H+S) (R+(4*A*(n+2)^2+4*K*(n+2)+1)+1) Q t x := by | |
| let c := 4*A*(n+2)^2+4*K*(n+2)+1 | |
| let g := R+c+1 | |
| let W := polynomialBarrier n (H+S) g Q | |
| let V := fun t x => U t x-W t x | |
| let vd := fun t x => d t x+g*W t x | |
| have hc0 : 0 β€ c := by dsimp [c]; positivity | |
| have hg0 : 0 β€ g := by dsimp [g]; positivity | |
| have hWx (t x : β) := polynomialBarrier_space n (H+S) g Q t x | |
| have hWxx (t x : β) := polynomialBarrier_space2 n (H+S) g Q t x | |
| have hvx (t : β) (htt : tβIcc 0 Q) (x : β) : | |
| HasDerivAt (V t) (deriv (U t) x-deriv (W t) x) x := by | |
| exact ((hx t htt).1 x).hasDerivAt.sub (hWx t x).differentiableAt.hasDerivAt | |
| have hvxx (t : β) (htt : tβIcc 0 Q) (x : β) : | |
| HasDerivAt (deriv (V t)) (deriv (deriv (U t)) x-deriv (deriv (W t)) x) x := by | |
| have he : deriv (V t)=fun y => deriv (U t) y-deriv (W t) y := funext (fun y => (hvx t htt y).deriv) | |
| rw [he] | |
| exact ((hx t htt).2 x).hasDerivAt.sub (hWxx t x).differentiableAt.hasDerivAt | |
| have hvt (t : β) (htt : tβIco 0 Q) (x : β) : | |
| HasDerivWithinAt (fun s => V s x) (vd t x) (Ici t) t := by | |
| convert (ht t htt x).sub (polynomialBarrier_time n (H+S) g Q t x).hasDerivWithinAt using 1; | |
| first | rfl | (dsimp [vd,W]; ring) | |
| have hWc : Continuous (fun p : β Γ β => W p.1 p.2) := by dsimp [W,polynomialBarrier]; fun_prop | |
| have hWP (t : β) (htt : tβIco 0 Q) (x : β) : | |
| -g*W t x+a t x*deriv (deriv (W t)) x+b t x*deriv (W t) x+r t x*W t x β€ -S*(1+x^2)^(n+2) := by | |
| have htcc : tβIcc 0 Q := β¨htt.1,htt.2.leβ© | |
| have hn := (polynomial_transport_neg n hK hA (ha t htcc x).2 (hb t htcc x)).le | |
| have hm := mul_nonpos_of_nonneg_of_nonpos | |
| (show 0 β€ (H+S)*Real.exp (g*(Q-t)) by positivity) hn | |
| have he : 1 β€ Real.exp (g*(Q-t)) := Real.one_le_exp_iff.mpr (mul_nonneg hg0 (sub_nonneg.mpr htcc.2)) | |
| have hw : S*(1+x^2)^(n+2) β€ W t x := by | |
| calc | |
| _ β€ (H+S)*(1+x^2)^(n+2) := mul_le_mul_of_nonneg_right (by linarith) (by positivity) | |
| _ β€ ((H+S)*(1+x^2)^(n+2))*Real.exp (g*(Q-t)) := le_mul_of_one_le_right (by positivity) he | |
| _ = _ := by dsimp [W,polynomialBarrier]; ring | |
| have hrw := mul_nonpos_of_nonpos_of_nonneg (sub_nonpos.mpr (hr t htt x)) | |
| (show 0 β€ W t x by dsimp [W,polynomialBarrier]; positivity) | |
| rw [(hWx t x).deriv,(hWxx t x).deriv] | |
| dsimp [W,polynomialBarrier,g,c] at * | |
| nlinarith | |
| have hvp (t : β) (htt : tβIco 0 Q) (x : β) : | |
| -(0:β) β€ vd t x+a t x*deriv (deriv (V t)) x+b t x*deriv (V t) x+r t x*V t x := by | |
| rw [(hvx t β¨htt.1,htt.2.leβ© x).deriv,(hvxx t β¨htt.1,htt.2.leβ© x).deriv] | |
| have hh := hp t htt x | |
| have hw := hWP t htt x | |
| dsimp [vd,V] | |
| linarith | |
| have hvterm (x : β) : V Q x β€ 0 := by | |
| have hh := hterm x | |
| dsimp [V,W,polynomialBarrier] | |
| simp only [sub_self,mul_zero,Real.exp_zero,mul_one] | |
| nlinarith [show 0 β€ (1+x^2)^(n+2) by positivity] | |
| have hh := backward_reaction_source_upper hQ hK hA hR (le_refl 0) (le_refl 0) | |
| (hc.sub hWc.continuousOn) | |
| (fun t htt => β¨fun x => (hvx t htt x).differentiableAt,fun x => (hvxx t htt x).differentiableAtβ©) | |
| hvt ha hb (hg.sub (polynomialBarrier_growth n (H+S) g Q)) hr hvp hvterm | |
| intro t htt x | |
| have hv := hh t htt x | |
| simp only [zero_mul,add_zero] at hv | |
| dsimp [V] at hv | |
| exact sub_nonpos.mp hv | |
| lemma backward_polynomial_source_bound {Q K R H S A : β} (n : β) | |
| (hQ : 0 < Q) (hK : 0 β€ K) (hA : 0 β€ A) (hR : 0 β€ R) (hH : 0 β€ H) (hS : 0 β€ S) | |
| {U b d r a : β β β β β} | |
| (hc : ContinuousOn (fun p : β Γ β => U p.1 p.2) (Icc 0 Q ΓΛ’ univ)) | |
| (hx : β t β Icc 0 Q, Differentiable β (U t) β§ Differentiable β (deriv (U t))) | |
| (ht : β t β Ico 0 Q, β x, HasDerivWithinAt (fun s => U s x) (d t x) (Ici t) t) | |
| (ha : β t β Icc 0 Q, β x, 0 β€ a t x β§ a t x β€ A) | |
| (hb : β t β Icc 0 Q, β x, |b t x| β€ K*(1+|x|)) | |
| (hg : Higher.UniformPolynomialGrowth (Icc 0 Q) U) | |
| (hr : β t β Ico 0 Q, β x, r t x β€ R) | |
| (hp : β t β Ico 0 Q, β x, | |
| |d t x+a t x*deriv (deriv (U t)) x+b t x*deriv (U t) x+r t x*U t x| β€ S*(1+x^2)^(n+2)) | |
| (hterm : β x, |U Q x| β€ H*(1+x^2)^(n+2)) : | |
| β t β Icc 0 Q, β x, |U t x| β€ | |
| polynomialBarrier n (H+S) (R+(4*A*(n+2)^2+4*K*(n+2)+1)+1) Q t x := by | |
| have hupper := backward_polynomial_source_upper n hQ hK hA hR hH hS hc hx ht ha hb hg hr | |
| (fun t ht x => by linarith [(abs_le.mp (hp t ht x)).1]) | |
| (fun x => (le_abs_self _).trans (hterm x)) | |
| have hn1 (t : β) (htt : tβIcc 0 Q) : deriv (fun x => -U t x)=fun x => -deriv (U t) x := by | |
| funext x; exact ((hx t htt).1 x).hasDerivAt.neg.deriv | |
| have hn2 (t : β) (htt : tβIcc 0 Q) : deriv (deriv (fun x => -U t x))=fun x => -deriv (deriv (U t)) x := by | |
| rw [hn1 t htt]; funext x; exact ((hx t htt).2 x).hasDerivAt.neg.deriv | |
| have hneg := backward_polynomial_source_upper (U:=fun t x => -U t x) (d:=fun t x => -d t x) | |
| n hQ hK hA hR hH hS hc.neg | |
| (fun t htt => β¨(hx t htt).1.neg,by rw [hn1 t htt]; exact (hx t htt).2.negβ©) | |
| (fun t htt x => (ht t htt x).neg) ha hb | |
| (by simpa only [neg_one_mul] using hg.const_mul (-1)) hr | |
| (fun t htt x => by rw [hn2 t β¨htt.1,htt.2.leβ©,hn1 t β¨htt.1,htt.2.leβ©]; linarith [(abs_le.mp (hp t htt x)).2]) | |
| (fun x => (neg_le_abs _).trans (hterm x)) | |
| intro t htt x | |
| rw [abs_le] | |
| exact β¨by linarith [hneg t htt x],hupper t htt xβ© | |
| end VariableDiffusion | |
| end MicroscopicJamming | |
| open Set Filter | |
| open scoped Topology | |
| namespace MicroscopicJamming | |
| namespace Higher | |
| def FamilyGrowth {ΞΉ : Type*} (P : ΞΉ β Prop) (T : Set β) (F : ΞΉ β β β β β β) : Prop := | |
| β n : β,β C : β,0β€C β§ β i,P i β β tβT,β x,|F i t x|β€C*(1+|x|)^n | |
| lemma FamilyGrowth.const {ΞΉ : Type*} (P : ΞΉ β Prop) (T : Set β) (c : β) : | |
| FamilyGrowth P T (fun _ _ _ => c) := | |
| β¨0,|c|,abs_nonneg _,fun _ _ _ _ _ => by simpβ© | |
| lemma FamilyGrowth.of_bound {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F : ΞΉ β β β β β β} | |
| {C : β} (hC : 0β€C) (hF : β i,P i β β tβT,β x,|F i t x|β€C) : FamilyGrowth P T F := | |
| β¨0,C,hC,fun i hi t ht x => by simpa using hF i hi t ht xβ© | |
| lemma FamilyGrowth.of_linear_bound {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F : ΞΉ β β β β β β} | |
| {C : β} (hC : 0β€C) (hF : β i,P i β β tβT,β x,|F i t x|β€C*(1+|x|)) : FamilyGrowth P T F := | |
| β¨1,C,hC,fun i hi t ht x => by simpa using hF i hi t ht xβ© | |
| lemma FamilyGrowth.of_quadratic_bound {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F : ΞΉ β β β β β β} | |
| {C : β} (hC : 0β€C) (hF : β i,P i β β tβT,β x,|F i t x|β€C*(1+x^2)) : FamilyGrowth P T F := by | |
| refine β¨2,C,hC,fun i hi t ht x => (hF i hi t ht x).trans ?_β© | |
| apply mul_le_mul_of_nonneg_left _ hC | |
| nlinarith [sq_abs x,abs_nonneg x] | |
| lemma FamilyGrowth.comp {ΞΉ ΞΊ : Type*} {P : ΞΉ β Prop} {R : ΞΊ β Prop} {T : Set β} | |
| {F : ΞΉ β β β β β β} (hf : FamilyGrowth P T F) (g : ΞΊ β ΞΉ) (hg : β i,R i β P (g i)) : | |
| FamilyGrowth R T (fun i => F (g i)) := by | |
| obtain β¨n,C,hC,hfβ© := hf | |
| exact β¨n,C,hC,fun i hi => hf (g i) (hg i hi)β© | |
| lemma FamilyGrowth.add {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F G : ΞΉ β β β β β β} | |
| (hf : FamilyGrowth P T F) (hg : FamilyGrowth P T G) : | |
| FamilyGrowth P T (fun i t x => F i t x+G i t x) := by | |
| obtain β¨n,C,hC,hfβ© := hf | |
| obtain β¨m,D,hD,hgβ© := hg | |
| refine β¨max n m,C+D,by positivity,fun i hi t ht x => ?_β© | |
| calc | |
| |F i t x+G i t x| β€ |F i t x|+|G i t x| := abs_add_le _ _ | |
| _ β€ C*(1+|x|)^n+D*(1+|x|)^m := add_le_add (hf i hi t ht x) (hg i hi t ht x) | |
| _ β€ C*(1+|x|)^(max n m)+D*(1+|x|)^(max n m) := add_le_add | |
| (mul_le_mul_of_nonneg_left (pow_le_pow_rightβ (by linarith [abs_nonneg x]) (le_max_left _ _)) hC) | |
| (mul_le_mul_of_nonneg_left (pow_le_pow_rightβ (by linarith [abs_nonneg x]) (le_max_right _ _)) hD) | |
| _ = _ := by ring | |
| lemma FamilyGrowth.mul {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F G : ΞΉ β β β β β β} | |
| (hf : FamilyGrowth P T F) (hg : FamilyGrowth P T G) : | |
| FamilyGrowth P T (fun i t x => F i t x*G i t x) := by | |
| obtain β¨n,C,hC,hfβ© := hf | |
| obtain β¨m,D,hD,hgβ© := hg | |
| refine β¨n+m,C*D,by positivity,fun i hi t ht x => ?_β© | |
| calc | |
| |F i t x*G i t x| = |F i t x| * |G i t x| := abs_mul _ _ | |
| _ β€ C*(1+|x|)^n*(D*(1+|x|)^m) := mul_le_mul (hf i hi t ht x) (hg i hi t ht x) (abs_nonneg _) (by positivity) | |
| _ = _ := by rw [pow_add]; ring | |
| lemma FamilyGrowth.const_mul {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F : ΞΉ β β β β β β} | |
| (hf : FamilyGrowth P T F) (c : β) : FamilyGrowth P T (fun i t x => c*F i t x) := | |
| (FamilyGrowth.const P T c).mul hf | |
| lemma FamilyGrowth.sub {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F G : ΞΉ β β β β β β} | |
| (hf : FamilyGrowth P T F) (hg : FamilyGrowth P T G) : | |
| FamilyGrowth P T (fun i t x => F i t x-G i t x) := by | |
| simpa only [neg_one_mul,sub_eq_add_neg] using hf.add (hg.const_mul (-1)) | |
| lemma FamilyGrowth.congr {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F G : ΞΉ β β β β β β} | |
| (hf : FamilyGrowth P T F) (he : β i,P i β β tβT,β x,F i t x=G i t x) : FamilyGrowth P T G := by | |
| obtain β¨n,C,hC,hfβ© := hf | |
| exact β¨n,C,hC,fun i hi t ht x => by rw [βhe i hi t ht x]; exact hf i hi t ht xβ© | |
| lemma FamilyGrowth.finset_sum {ΞΉ ΞΊ : Type*} {P : ΞΉ β Prop} {T : Set β} | |
| (s : Finset ΞΊ) {F : ΞΊ β ΞΉ β β β β β β} | |
| (hf : β kβs,FamilyGrowth P T (F k)) : FamilyGrowth P T (fun i t x => β kβs,F k i t x) := by | |
| classical | |
| induction s using Finset.induction_on with | |
| | empty => simpa using FamilyGrowth.const P T 0 | |
| | @insert a s ha ih => | |
| simpa only [Finset.sum_insert ha] using (hf a (Finset.mem_insert_self _ _)).add | |
| (ih (fun k hk => hf k (Finset.mem_insert_of_mem hk))) | |
| lemma FamilyGrowth.individual {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F : ΞΉ β β β β β β} | |
| (hf : FamilyGrowth P T F) {i : ΞΉ} (hi : P i) : UniformPolynomialGrowth T (F i) := by | |
| obtain β¨n,C,hC,hfβ© := hf | |
| exact β¨n,C,hC,hf i hiβ© | |
| lemma FamilyGrowth.polynomial_source {ΞΉ : Type*} {P : ΞΉ β Prop} {T : Set β} {F : ΞΉ β β β β β β} | |
| (hf : FamilyGrowth P T F) : | |
| β n : β,β C : β,0β€C β§ β i,P i β β tβT,β x,|F i t x|β€C*(1+x^2)^(n+2) := by | |
| obtain β¨n,C,hC,hfβ© := hf | |
| refine β¨n,C*2^n,by positivity,fun i hi t ht x => ?_β© | |
| have hp : 1+|x| β€ 2*(1+x^2) := by nlinarith [sq_abs x,sq_nonneg (|x|-1)] | |
| calc | |
| _ β€ C*(1+|x|)^n := hf i hi t ht x | |
| _ β€ C*(2*(1+x^2))^n := mul_le_mul_of_nonneg_left (pow_le_pow_leftβ (by positivity) hp _) hC | |
| _ = (C*2^n)*(1+x^2)^n := by rw [mul_pow]; ring | |
| _ β€ _ := mul_le_mul_of_nonneg_left (pow_le_pow_rightβ (by nlinarith [sq_nonneg x]) (by omega)) (by positivity) | |
| end Higher | |
| end MicroscopicJamming | |
| open Set Filter | |
| open scoped Topology | |
| namespace MicroscopicJamming | |
| namespace Higher | |
| def heatDomain : Set (β Γ β) := Ioi (0:β) ΓΛ’ univ | |
| lemma heatDomain_open : IsOpen heatDomain := isOpen_Ioi.prod isOpen_univ | |
| lemma heatJet_hasFDeriv {u : β β β} (hu : SmoothPolynomial u) (n : β) | |
| {p : β Γ β} (hp : p β heatDomain) : | |
| HasFDerivAt (fun p : β Γ β => gaussianHeat (iteratedDeriv n u) p.1 p.2) | |
| (((1/2:β)*gaussianHeat (iteratedDeriv (n+2) u) p.1 p.2) β’ | |
| ContinuousLinearMap.fst β β β + | |
| gaussianHeat (iteratedDeriv (n+1) u) p.1 p.2 β’ ContinuousLinearMap.snd β β β) p := by | |
| have htime := heat_jointly_continuous (hu.continuous (n+2)) (hu.growth (n+2)) | |
| have hspace := heat_jointly_continuous (hu.continuous (n+1)) (hu.growth (n+1)) | |
| have hh := hasStrictFDerivAt_uncurry_coprod (π := β) (Eβ := β) (Eβ := β) (F := β) | |
| (f := fun t x => gaussianHeat (iteratedDeriv n u) t x) | |
| (fβ := fun t x => ContinuousLinearMap.smulRight (1 : β βL[β] β) | |
| ((1/2:β)*gaussianHeat (iteratedDeriv (n+2) u) t x)) | |
| (fβ := fun t x => ContinuousLinearMap.smulRight (1 : β βL[β] β) | |
| (gaussianHeat (iteratedDeriv (n+1) u) t x)) | |
| (show βαΆ v : β Γ β in π p, HasFDerivAt | |
| (fun t => gaussianHeat (iteratedDeriv n u) t v.2) | |
| ((1 : β βL[β] β).smulRight ((1/2:β)*gaussianHeat (iteratedDeriv (n+2) u) v.1 v.2)) v.1 from by | |
| filter_upwards [heatDomain_open.mem_nhds hp] with v hv | |
| exact (heat_jet_time_derivative hu hv.1 n v.2).hasFDerivAt) | |
| (Eventually.of_forall fun v => (space_derivative (hu.continuous n).measurable | |
| (hu.continuous (n+1)).measurable (hu.growth n) (hu.growth (n+1)) | |
| (fun y => by simpa only [iteratedDeriv_succ] using (hu.differentiable n y).hasDerivAt) | |
| v.1 v.2).hasFDerivAt) | |
| (by | |
| convert (htime.continuousAt.const_mul (1/2:β)).smul (continuousAt_const (y := (1 : β βL[β] β))) using 1; ext v; simp [Function.HasUncurry.uncurry,mul_comm]) | |
| (by | |
| convert hspace.continuousAt.smul (continuousAt_const (y := (1 : β βL[β] β))) using 1; ext v; simp [Function.HasUncurry.uncurry,mul_comm]) | |
| have he : ((1 : β βL[β] β).smulRight ((1/2:β)*gaussianHeat (iteratedDeriv (n+2) u) p.1 p.2)).coprod | |
| ((1 : β βL[β] β).smulRight (gaussianHeat (iteratedDeriv (n+1) u) p.1 p.2)) = | |
| ((1/2:β)*gaussianHeat (iteratedDeriv (n+2) u) p.1 p.2) β’ ContinuousLinearMap.fst β β β + | |
| gaussianHeat (iteratedDeriv (n+1) u) p.1 p.2 β’ ContinuousLinearMap.snd β β β := by | |
| apply ContinuousLinearMap.ext | |
| intro z | |
| simp [ContinuousLinearMap.coprod_apply,mul_comm] | |
| simpa only [Function.HasUncurry.uncurry, id_eq, he] using hh.hasFDerivAt | |
| lemma heatJet_contDiffOn {u : β β β} (hu : SmoothPolynomial u) (k n : β) : | |
| ContDiffOn β (k : WithTop ββ) | |
| (fun p : β Γ β => gaussianHeat (iteratedDeriv n u) p.1 p.2) heatDomain := by | |
| induction k generalizing n with | |
| | zero => exact contDiffOn_zero.mpr (heat_jointly_continuous (hu.continuous n) (hu.growth n)).continuousOn | |
| | succ k ih => | |
| rw [Nat.cast_add,Nat.cast_one,contDiffOn_succ_iff_fderiv_of_isOpen heatDomain_open] | |
| refine β¨fun p hp => (heatJet_hasFDeriv hu n hp).differentiableAt.differentiableWithinAt,?_,?_β© | |
| Β· simp | |
| Β· have hc : ContDiffOn β (k : WithTop ββ) (fun p : β Γ β => | |
| ((1/2:β)*gaussianHeat (iteratedDeriv (n+2) u) p.1 p.2) β’ ContinuousLinearMap.fst β β β + | |
| gaussianHeat (iteratedDeriv (n+1) u) p.1 p.2 β’ ContinuousLinearMap.snd β β β) heatDomain := | |
| ((contDiffOn_const.mul (ih (n+2))).smul contDiffOn_const).add | |
| ((ih (n+1)).smul contDiffOn_const) | |
| apply hc.congr | |
| intro p hp | |
| exact (heatJet_hasFDeriv hu n hp).fderiv | |
| lemma heat_jointly_smooth {u : β β β} (hu : SmoothPolynomial u) : | |
| ContDiffOn β ((β€ : ββ) : WithTop ββ) (fun p : β Γ β => gaussianHeat u p.1 p.2) heatDomain := by | |
| rw [contDiffOn_infty] | |
| intro k | |
| simpa using heatJet_contDiffOn hu k 0 | |
| lemma gaussianRowOperator_jointly_smooth {u : β β β} (hu : SmoothPolynomial u) | |
| {a B : β} (ha : 0 β€ a) (hB : β x,u x β€ B) : | |
| ContDiffOn β ((β€ : ββ) : WithTop ββ) | |
| (fun p : β Γ β => gaussianRowOperator a p.1 u p.2) heatDomain := by | |
| by_cases haz : a=0 | |
| Β· simpa [gaussianRowOperator,haz] using heat_jointly_smooth hu | |
| Β· have hh := (heat_jointly_smooth (exp_smoothPolynomial hu ha hB)).log | |
| (fun p _ => (exp_heat_pos hu.smooth.continuous hB ha).ne') | |
| simpa [gaussianRowOperator,haz,div_eq_mul_inv,mul_comm] using hh.mul contDiffOn_const | |
| end Higher | |
| end MicroscopicJamming | |
| end | |
| end OAI | |