Download data/lean/OAI/Analysis/AllenCahn/Modica.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 17.2 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/AllenCahn/Modica.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/AllenCahn/Modica.lean
-
curl -L -o Modica.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/AllenCahn/Modica.lean
17.2 kB
| import OAI.Analysis.AllenCahn.Basic | |
| namespace OAI | |
| noncomputable section | |
| namespace DeGiorgi | |
| open MeasureTheory | |
| open scoped ENNReal | |
| open Filter Topology | |
| lemma two_point_gradient_bounds {n : β} {f : Space n β β} | |
| (hf : Differentiable β f) {M L Ξ΅ : β} (hM : 0 β€ M) | |
| (hbound : β x, |f x| β€ M) (hL : 0 β€ L) (hΞ΅ : 0 < Ξ΅) {x y : Space n} | |
| (hpos : 0 < f y - f x - L * βy - xβ - Ξ΅ * (βxβ ^ 2 + βyβ ^ 2)) | |
| (hm : β a b : Space n, | |
| f b - f a - L * βb - aβ - Ξ΅ * (βaβ ^ 2 + βbβ ^ 2) β€ | |
| f y - f x - L * βy - xβ - Ξ΅ * (βxβ ^ 2 + βyβ ^ 2)) : | |
| let E := 2 * Real.sqrt (2 * M * Ξ΅) | |
| |βgradient f xβ ^ 2 - L ^ 2| β€ E * (2 * L + E) β§ | |
| |βgradient f yβ ^ 2 - L ^ 2| β€ E * (2 * L + E) := by | |
| have hxy : y β x := by | |
| rintro rfl | |
| simp only [sub_self, norm_zero, mul_zero] at hpos | |
| nlinarith [sq_nonneg βyβ] | |
| have hpen : Ξ΅ * (βxβ ^ 2 + βyβ ^ 2) β€ 2 * M := by | |
| have hx := (abs_le.mp (hbound x)).1 | |
| have hy := (abs_le.mp (hbound y)).2 | |
| have hz := mul_nonneg hL (norm_nonneg (y - x)) | |
| linarith | |
| let E := 2 * Real.sqrt (2 * M * Ξ΅) | |
| have hE : 0 β€ E := by dsimp [E]; positivity | |
| have hsmall : β z : Space n, Ξ΅ * βzβ ^ 2 β€ 2 * M β β(2 * Ξ΅) β’ zβ β€ E := by | |
| intro z hz | |
| rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 β€ 2 * Ξ΅)] | |
| have hs := Real.sq_sqrt (show 0 β€ 2 * M * Ξ΅ by positivity) | |
| have hc := mul_le_mul_of_nonneg_right hz hΞ΅.le | |
| dsimp [E] | |
| nlinarith [Real.sqrt_nonneg (2 * M * Ξ΅), norm_nonneg z] | |
| have hxsmall := hsmall x (by nlinarith [mul_nonneg hΞ΅.le (sq_nonneg βyβ)]) | |
| have hysmall := hsmall y (by nlinarith [mul_nonneg hΞ΅.le (sq_nonneg βxβ)]) | |
| let p : Space n := (L / βy - xβ) β’ (y - x) | |
| have hp : βpβ = L := by | |
| dsimp [p] | |
| rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (div_nonneg hL (norm_nonneg _)), | |
| div_mul_cancelβ L (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy))] | |
| have hgy := gradient_at_two_point_max_y hf L Ξ΅ hxy (hm x) | |
| have hnegmax : β a b : Space n, | |
| -f b - -f a - L * βb - aβ - Ξ΅ * (βaβ ^ 2 + βbβ ^ 2) β€ | |
| -f x - -f y - L * βx - yβ - Ξ΅ * (βyβ ^ 2 + βxβ ^ 2) := by | |
| intro a b | |
| simpa only [neg_sub_neg, norm_sub_rev, add_comm] using hm b a | |
| have hgx := gradient_at_two_point_max_y hf.neg L Ξ΅ (Ne.symm hxy) (hnegmax y) | |
| have hng : gradient (fun z => -f z) x = -gradient f x := by | |
| simp only [gradient, fderiv_fun_neg, map_neg] | |
| change gradient (fun z => -f z) x = _ at hgx | |
| rw [hng] at hgx | |
| have hxerr : βgradient f x - pβ β€ E := by | |
| have hvec : gradient f x - p = -(2 * Ξ΅) β’ x := by | |
| rw [norm_sub_rev] at hgx | |
| have hs : (L / βy - xβ) β’ (x - y) = -p := by | |
| dsimp [p] | |
| rw [β neg_sub y x, smul_neg] | |
| rw [hs] at hgx | |
| have hh := congrArg (fun z : Space n => -z) hgx | |
| simp only [neg_neg] at hh | |
| rw [hh] | |
| module | |
| rw [hvec, neg_smul, norm_neg] | |
| exact hxsmall | |
| have hyerr : βgradient f y - pβ β€ E := by | |
| change gradient f y = p + (2 * Ξ΅) β’ y at hgy | |
| rw [hgy, add_sub_cancel_left] | |
| exact hysmall | |
| exact β¨sq_norm_error hL hE hp hxerr, sq_norm_error hL hE hp hyerrβ© | |
| lemma lipschitz_of_laplacian_monotonicity {n : β} {f b h : Space n β β} | |
| (hf : ContDiff β 2 f) {M B L ΞΊ : β} (hM : 0 β€ M) (hB : 0 β€ B) | |
| (hL : 0 β€ L) (hΞΊ : 0 < ΞΊ) (hbound : β x, |f x| β€ M) | |
| (hb : β x, |b x| β€ B) | |
| (hpde : β x, Laplacian.laplacian f x = b x * βgradient f xβ ^ 2 + h x) | |
| (hmono : β x y, f x β€ f y β ΞΊ * (f y - f x) β€ | |
| (b y * L ^ 2 + h y) - (b x * L ^ 2 + h x)) : | |
| β x y, f y - f x β€ L * βy - xβ := by | |
| intro a c | |
| by_contra hn | |
| let Ξ΄ := f c - f a - L * βc - aβ | |
| have hΞ΄ : 0 < Ξ΄ := sub_pos.mpr (lt_of_not_ge hn) | |
| let E : β β β := fun t => 2 * Real.sqrt (2 * M * t) | |
| have hcont : Continuous (fun t : β => 4 * n * t + 2 * B * (E t * (2 * L + E t))) := by | |
| dsimp [E] | |
| fun_prop | |
| have hev : βαΆ t in π (0 : β), | |
| 4 * n * t + 2 * B * (E t * (2 * L + E t)) < ΞΊ * Ξ΄ / 2 := by | |
| have hzero : (fun t : β => 4 * n * t + 2 * B * (E t * (2 * L + E t))) 0 = 0 := by | |
| simp [E] | |
| exact (hcont.continuousAt.eventually_lt continuousAt_const (by simpa only [E, mul_zero, Real.sqrt_zero, zero_mul, add_zero] using (show 0 < ΞΊ * Ξ΄ / 2 by positivity))) | |
| have hcont2 : Continuous (fun t : β => t * (βaβ ^ 2 + βcβ ^ 2)) := by fun_prop | |
| have hev2 : βαΆ t in π (0 : β), t * (βaβ ^ 2 + βcβ ^ 2) < Ξ΄ / 2 := | |
| hcont2.continuousAt.eventually_lt continuousAt_const (by simpa using half_pos hΞ΄) | |
| have hex : β Ξ΅ : β, 0 < Ξ΅ β§ Ξ΅ * (βaβ ^ 2 + βcβ ^ 2) < Ξ΄ / 2 β§ | |
| 4 * n * Ξ΅ + 2 * B * (E Ξ΅ * (2 * L + E Ξ΅)) < ΞΊ * Ξ΄ / 2 := by | |
| have hevent : βαΆ t in π[>] (0 : β), 0 < t β§ | |
| t * (βaβ ^ 2 + βcβ ^ 2) < Ξ΄ / 2 β§ | |
| 4 * n * t + 2 * B * (E t * (2 * L + E t)) < ΞΊ * Ξ΄ / 2 := by | |
| filter_upwards [self_mem_nhdsWithin, hev2.filter_mono nhdsWithin_le_nhds, | |
| hev.filter_mono nhdsWithin_le_nhds] with t ht h1 h2 using β¨ht, h1, h2β© | |
| exact hevent.exists | |
| obtain β¨Ξ΅, hΞ΅, hseed, herrβ© := hex | |
| obtain β¨x, y, hmβ© := two_point_maximum hf.continuous hM hbound hL hΞ΅ | |
| have hval : Ξ΄ / 2 < f y - f x - L * βy - xβ - Ξ΅ * (βxβ ^ 2 + βyβ ^ 2) := by | |
| have hh := hm a c | |
| dsimp [Ξ΄] at hseed β’ | |
| linarith | |
| have hfd : Ξ΄ / 2 < f y - f x := by | |
| have hh := mul_nonneg hL (norm_nonneg (y - x)) | |
| have hh' := mul_nonneg hΞ΅.le (add_nonneg (sq_nonneg βxβ) (sq_nonneg βyβ)) | |
| linarith | |
| have hxy : f x β€ f y := by linarith | |
| have hgap := hmono x y hxy | |
| have hgrad := two_point_gradient_bounds (hf.differentiable (by norm_num)) hM hbound hL hΞ΅ | |
| (lt_trans (half_pos hΞ΄) hval) hm | |
| have hE : 0 β€ E Ξ΅ := by dsimp [E]; positivity | |
| have herror (z : Space n) (hz : |βgradient f zβ ^ 2 - L ^ 2| β€ E Ξ΅ * (2 * L + E Ξ΅)) : | |
| |b z * (βgradient f zβ ^ 2 - L ^ 2)| β€ B * (E Ξ΅ * (2 * L + E Ξ΅)) := by | |
| rw [abs_mul] | |
| exact mul_le_mul (hb z) hz (abs_nonneg _) hB | |
| have hx := abs_le.mp (herror x hgrad.1) | |
| have hy := abs_le.mp (herror y hgrad.2) | |
| have hlap := laplacian_at_two_point_max hf L Ξ΅ hm | |
| rw [hpde y, hpde x] at hlap | |
| have hstrict := mul_lt_mul_of_pos_left hfd hΞΊ | |
| nlinarith | |
| def defectWeight {n : β} (v : Space n β β) (x : Space n) : β := 1 - v x ^ 2 | |
| lemma hasDerivAt_artanh {t : β} (ht : t β Set.Ioo (-1 : β) 1) : | |
| HasDerivAt Real.artanh (1 / (1 - t ^ 2)) t := by | |
| have hm : 1 - t β 0 := ne_of_gt (sub_pos.mpr ht.2) | |
| have hp : 1 + t β 0 := ne_of_gt (by linarith [ht.1]) | |
| have hd : HasDerivAt (fun y : β => (1 + y) / (1 - y)) | |
| ((1 * (1 - t) - (1 + t) * (-1)) / (1 - t) ^ 2) t := | |
| ((hasDerivAt_id t).const_add 1).div ((hasDerivAt_id t).const_sub 1) hm | |
| have heq : 1 / 2 * (((1 * (1 - t) - (1 + t) * (-1)) / (1 - t) ^ 2) / | |
| ((1 + t) / (1 - t))) = 1 / (1 - t ^ 2) := by | |
| have hs : 1 - t ^ 2 = (1 - t) * (1 + t) := by ring | |
| rw [hs] | |
| field_simp | |
| ring | |
| have hh := (hd.log (div_ne_zero hp hm)).const_mul (1 / 2 : β) | |
| rw [heq] at hh | |
| apply hh.congr_of_eventuallyEq | |
| filter_upwards [isOpen_Ioo.mem_nhds ht] with y hy | |
| exact Real.artanh_eq_half_log β¨hy.1.le, hy.2.leβ© | |
| def inverseProfile {n : β} (v : Space n β β) (x : Space n) : β := | |
| Real.sqrt 2 * Real.artanh (v x) | |
| def diffuseDefect {n : β} (v : Space n β β) (x : Space n) : β := | |
| 1 - βgradient (inverseProfile v) xβ ^ 2 | |
| lemma profile_inverseProfile {n : β} {v : Space n β β} | |
| (hi : β x, v x β Set.Ioo (-1 : β) 1) (x : Space n) : | |
| profile (inverseProfile v x) = v x := by | |
| have h2 : Real.sqrt 2 β 0 := ne_of_gt (Real.sqrt_pos.mpr (by norm_num)) | |
| simp only [profile, inverseProfile, mul_div_cancel_leftβ _ h2] | |
| exact Real.tanh_artanh (hi x) | |
| lemma fderiv_inverseProfile {n : β} {v : Space n β β} {x : Space n} | |
| (hv : DifferentiableAt β v x) (hi : v x β Set.Ioo (-1 : β) 1) : | |
| fderiv β (inverseProfile v) x = | |
| (Real.sqrt 2 / defectWeight v x) β’ fderiv β v x := by | |
| have H := ((hasDerivAt_artanh hi).comp_hasFDerivAt x hv.hasFDerivAt).const_mul (Real.sqrt 2) | |
| change fderiv β (fun y => Real.sqrt 2 * Real.artanh (v y)) x = _ | |
| simpa only [Function.comp_apply, smul_smul, mul_one_div, defectWeight] | |
| using H.fderiv | |
| lemma gradient_inverseProfile {n : β} {v : Space n β β} {x : Space n} | |
| (hv : DifferentiableAt β v x) (hi : v x β Set.Ioo (-1 : β) 1) : | |
| gradient (inverseProfile v) x = (Real.sqrt 2 / defectWeight v x) β’ gradient v x := by | |
| simp only [gradient, fderiv_inverseProfile hv hi, map_smul] | |
| lemma inverseProfile_contDiff {n : β} {v : Space n β β} (hv : ContDiff β 2 v) | |
| (hi : β x, v x β Set.Ioo (-1 : β) 1) : ContDiff β 2 (inverseProfile v) := by | |
| have hm (x : Space n) : 1 - v x β 0 := ne_of_gt (sub_pos.mpr (hi x).2) | |
| have hp (x : Space n) : 1 + v x β 0 := ne_of_gt (by linarith [(hi x).1]) | |
| have hq : ContDiff β 2 (fun x => (1 + v x) / (1 - v x)) := | |
| (contDiff_const.add hv).div (contDiff_const.sub hv) hm | |
| have hl : ContDiff β 2 (fun x => (Real.sqrt 2 / 2) * Real.log ((1 + v x) / (1 - v x))) := | |
| contDiff_const.mul (hq.log (fun x => div_ne_zero (hp x) (hm x))) | |
| convert hl using 1 | |
| funext x | |
| dsimp [inverseProfile] | |
| rw [Real.artanh_eq_half_log β¨(hi x).1.le, (hi x).2.leβ©] | |
| ring | |
| lemma gradient_norm_sq {n : β} (f : Space n β β) (x : Space n) : | |
| βgradient f xβ ^ 2 = β i : Fin n, (coordDeriv f i x) ^ 2 := by | |
| have h := (basis n).sum_inner_mul_inner (gradient f x) (gradient f x) | |
| rw [real_inner_self_eq_norm_sq] at h | |
| simpa only [coordDeriv, real_inner_comm, inner_gradient_left, β pow_two] using h.symm | |
| lemma coordDeriv_mul {n : β} {f g : Space n β β} | |
| (hf : Differentiable β f) (hg : Differentiable β g) (i : Fin n) (x : Space n) : | |
| coordDeriv (fun y => f y * g y) i x = | |
| f x * coordDeriv g i x + g x * coordDeriv f i x := by | |
| simp [coordDeriv, fderiv_fun_mul (hf x) (hg x)] | |
| lemma weight_pos {t : β} (ht : t β Set.Ioo (-1 : β) 1) : 0 < 1 - t ^ 2 := by | |
| nlinarith [mul_pos (sub_pos.mpr ht.2) (show 0 < 1 + t by linarith [ht.1])] | |
| lemma coordDeriv_inverseProfile_coefficient {n : β} {v : Space n β β} | |
| (hv : Differentiable β v) (hi : β x, v x β Set.Ioo (-1 : β) 1) | |
| (i : Fin n) (x : Space n) : | |
| coordDeriv (fun y => Real.sqrt 2 / defectWeight v y) i x = | |
| (2 * Real.sqrt 2 * v x / (defectWeight v x) ^ 2) * coordDeriv v i x := by | |
| have hs : HasDerivAt (fun t : β => Real.sqrt 2 / (1 - t ^ 2)) | |
| (2 * Real.sqrt 2 * v x / (1 - v x ^ 2) ^ 2) (v x) := by | |
| convert (hasDerivAt_const (v x) (Real.sqrt 2)).div | |
| ((hasDerivAt_const (v x) (1 : β)).sub ((hasDerivAt_id (v x)).pow 2)) | |
| (ne_of_gt (weight_pos (hi x))) using 1 <;> first | rfl | (dsimp; ring) | |
| have hd := hs.comp_hasFDerivAt x (hv x).hasFDerivAt | |
| dsimp [coordDeriv, defectWeight] | |
| simpa only [Function.comp_def, smul_apply, smul_eq_mul] using | |
| congrArg (fun L : Space n βL[β] β => L (basis n i)) hd.fderiv | |
| lemma laplacian_inverseProfile {n : β} {v : Space n β β} | |
| (hv : ContDiff β 2 v) (hi : β x, v x β Set.Ioo (-1 : β) 1) (x : Space n) : | |
| Laplacian.laplacian (inverseProfile v) x = | |
| Real.sqrt 2 / defectWeight v x * Laplacian.laplacian v x + | |
| (2 * Real.sqrt 2 * v x / defectWeight v x ^ 2) * βgradient v xβ ^ 2 := by | |
| have hd := hv.differentiable (by norm_num) | |
| have hc : Differentiable β (fun y => Real.sqrt 2 / defectWeight v y) := by | |
| have H : ContDiff β 2 (fun y => Real.sqrt 2 / (1 - v y ^ 2)) := | |
| contDiff_const.div (contDiff_const.sub (hv.pow 2)) (fun y => ne_of_gt (weight_pos (hi y))) | |
| exact H.differentiable (by norm_num) | |
| have hfirst (i : Fin n) : coordDeriv (inverseProfile v) i = | |
| fun y => (Real.sqrt 2 / defectWeight v y) * coordDeriv v i y := by | |
| funext y | |
| simp [coordDeriv, fderiv_inverseProfile (hd y) (hi y)] | |
| rw [laplacian_eq_sum_coordDeriv (inverseProfile_contDiff hv hi)] | |
| simp_rw [hfirst] | |
| simp_rw [coordDeriv_mul hc ((coordDeriv_contDiff hv _).differentiable (by norm_num)), | |
| coordDeriv_inverseProfile_coefficient hd hi] | |
| rw [laplacian_eq_sum_coordDeriv hv, gradient_norm_sq, Finset.sum_add_distrib, | |
| β Finset.mul_sum] | |
| congr 1 | |
| rw [Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| ring | |
| lemma laplacian_regularized_inverse {n : β} {v : Space n β β} | |
| (hv : ContDiff β 2 v) (hb : β x, v x β Set.Icc (-1 : β) 1) | |
| (hAC : AllenCahn v) {r : β} (hr : 0 < r) (hr1 : r < 1) (x : Space n) : | |
| let t := r * v x | |
| Laplacian.laplacian (inverseProfile (fun y => r * v y)) x = | |
| Real.sqrt 2 * t * βgradient (inverseProfile (fun y => r * v y)) xβ ^ 2 + | |
| (-Real.sqrt 2 * t + Real.sqrt 2 * (1 - r ^ 2) / r ^ 2 * (t ^ 3 / (1 - t ^ 2))) := by | |
| have hreg : ContDiff β 2 (fun y => r * v y) := contDiff_const.mul hv | |
| have hi (y : Space n) : r * v y β Set.Ioo (-1 : β) 1 := by | |
| have H := mul_le_mul_of_nonneg_left (hb y).1 hr.le | |
| have H' := mul_le_mul_of_nonneg_left (hb y).2 hr.le | |
| constructor <;> nlinarith | |
| have hq : 1 - (r * v x) ^ 2 β 0 := ne_of_gt (weight_pos (hi x)) | |
| dsimp only | |
| rw [laplacian_inverseProfile hreg hi, laplacian_fun_const_mul hv, | |
| hAC, gradient_inverseProfile (hreg.differentiable (by norm_num) x) (hi x), | |
| norm_smul, Real.norm_eq_abs, mul_pow, sq_abs, | |
| div_pow, Real.sq_sqrt (by norm_num)] | |
| have hg : gradient (fun y => r * v y) x = r β’ gradient v x := by | |
| simp [gradient, fderiv_const_mul (hv.differentiable (by norm_num) x)] | |
| rw [hg, norm_smul, Real.norm_eq_abs, mul_pow, sq_abs] | |
| dsimp [defectWeight] | |
| have hqq : 1 - r ^ 2 * v x ^ 2 β 0 := by simpa only [mul_pow] using hq | |
| field_simp [ne_of_gt hr, hq, hqq] | |
| ring | |
| lemma cube_div_weight_monotone : | |
| MonotoneOn (fun t : β => t ^ 3 / (1 - t ^ 2)) (Set.Ioo (-1 : β) 1) := by | |
| have hd (t : β) (ht : t β Set.Ioo (-1 : β) 1) : | |
| HasDerivAt (fun t : β => t ^ 3 / (1 - t ^ 2)) | |
| (t ^ 2 * (3 - t ^ 2) / (1 - t ^ 2) ^ 2) t := by | |
| convert ((hasDerivAt_id t).pow 3).div | |
| ((hasDerivAt_const t (1 : β)).sub ((hasDerivAt_id t).pow 2)) | |
| (ne_of_gt (weight_pos ht)) using 1 <;> first | rfl | (dsimp; ring) | |
| apply monotoneOn_of_deriv_nonneg (convex_Ioo (-1 : β) 1) | |
| (fun t ht => (hd t ht).continuousAt.continuousWithinAt) | |
| Β· intro t ht | |
| exact (hd t (by simpa only [interior_Ioo] using ht)).differentiableAt.differentiableWithinAt | |
| Β· intro t ht | |
| have hi : t β Set.Ioo (-1 : β) 1 := by simpa only [interior_Ioo] using ht | |
| rw [(hd t hi).deriv] | |
| exact div_nonneg (mul_nonneg (sq_nonneg _) (by linarith [weight_pos hi])) (sq_nonneg _) | |
| lemma inverseProfile_scalar_quantitative {r s t : β} (hr : 0 < r) (hr1 : r < 1) | |
| (hs : s β Set.Icc (-r) r) (ht : t β Set.Icc (-r) r) (hst : s β€ t) : | |
| (1 - r ^ 2) * (Real.sqrt 2 * Real.artanh t - Real.sqrt 2 * Real.artanh s) β€ | |
| Real.sqrt 2 * (t - s) := by | |
| have hir : r β Set.Ioo (-1 : β) 1 := β¨by linarith, hr1β© | |
| have hqr := weight_pos hir | |
| have hi (z : β) (hz : z β Set.Icc (-r) r) : z β Set.Ioo (-1 : β) 1 := | |
| β¨by linarith [hz.1], by linarith [hz.2]β© | |
| have hd (z : β) (hz : z β Set.Icc (-r) r) : | |
| HasDerivAt (fun t => Real.sqrt 2 * Real.artanh t) (Real.sqrt 2 / (1 - z ^ 2)) z := by | |
| simpa only [mul_one_div] using (hasDerivAt_artanh (hi z hz)).const_mul (Real.sqrt 2) | |
| have hbound (z : β) (hz : z β Set.Icc (-r) r) : | |
| deriv (fun t => Real.sqrt 2 * Real.artanh t) z β€ Real.sqrt 2 / (1 - r ^ 2) := by | |
| rw [(hd z hz).deriv] | |
| have hsq : z ^ 2 β€ r ^ 2 := by | |
| nlinarith [mul_nonneg (sub_nonneg.mpr hz.2) (show 0 β€ z + r by linarith [hz.1])] | |
| exact div_le_div_of_nonneg_left (Real.sqrt_nonneg _) hqr (by linarith) | |
| have H := (convex_Icc (-r) r).image_sub_le_mul_sub_of_deriv_le | |
| (fun z hz => (hd z hz).continuousAt.continuousWithinAt) | |
| (fun z hz => (hd z (interior_subset hz)).differentiableAt.differentiableWithinAt) | |
| (fun z hz => hbound z (interior_subset hz)) s hs t ht hst | |
| have H' := mul_le_mul_of_nonneg_left H hqr.le | |
| calc | |
| _ β€ (1 - r ^ 2) * (Real.sqrt 2 / (1 - r ^ 2) * (t - s)) := H' | |
| _ = _ := by field_simp | |
| lemma inverseProfile_scalar_bound {r t : β} (hr : 0 < r) (hr1 : r < 1) | |
| (ht : t β Set.Icc (-r) r) : | |
| |Real.sqrt 2 * Real.artanh t| β€ Real.sqrt 2 * | |
| max |Real.artanh (-r)| |Real.artanh r| := by | |
| have hm : -r β Set.Ioo (-1 : β) 1 := β¨by linarith, by linarithβ© | |
| have hp : r β Set.Ioo (-1 : β) 1 := β¨by linarith, hr1β© | |
| have hi : t β Set.Ioo (-1 : β) 1 := β¨by linarith [ht.1], by linarith [ht.2]β© | |
| rw [abs_mul, abs_of_nonneg (Real.sqrt_nonneg _)] | |
| apply mul_le_mul_of_nonneg_left _ (Real.sqrt_nonneg _) | |
| apply abs_le.mpr | |
| constructor | |
| Β· have H := Real.strictMonoOn_artanh.monotoneOn hm hi ht.1 | |
| have H' := neg_abs_le (Real.artanh (-r)) | |
| have H'' := le_max_left |Real.artanh (-r)| |Real.artanh r| | |
| linarith | |
| Β· exact (Real.strictMonoOn_artanh.monotoneOn hi hp ht.2).trans | |
| ((le_abs_self _).trans (le_max_right _ _)) | |
| end DeGiorgi | |
| end | |
| end OAI | |