Download data/lean/OAI/Analysis/AllenCahn/PoissonEstimates.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 17.8 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/AllenCahn/PoissonEstimates.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/AllenCahn/PoissonEstimates.lean
-
curl -L -o PoissonEstimates.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/AllenCahn/PoissonEstimates.lean
17.8 kB
| import OAI.Analysis.AllenCahn.PoissonMaximum | |
| namespace OAI | |
| noncomputable section | |
| namespace PoissonSupport.DeGiorgi | |
| open MeasureTheory | |
| open scoped ENNReal | |
| open Filter Topology | |
| lemma laplacian_poisson_at_max {n : β} {f : Space n β β} | |
| (hf : ContDiff β 2 f) (A Ξ΅ : β) {x y : Space n} | |
| (hxy : y β x) (hsmall : βy - xβ < 1) | |
| (hm : β a b : Space n, | |
| f b - f a - poissonPenalty A βb - aβ - Ξ΅ * (βaβ ^ 2 + βbβ ^ 2) β€ | |
| f y - f x - poissonPenalty A βy - xβ - Ξ΅ * (βxβ ^ 2 + βyβ ^ 2)) : | |
| Laplacian.laplacian f y - Laplacian.laplacian f x β€ -8 * A + 4 * n * Ξ΅ := by | |
| let r := βy - xβ | |
| have hr : 0 < r := norm_pos_iff.mpr (sub_ne_zero.mpr hxy) | |
| let e : Space n := rβ»ΒΉ β’ (y - x) | |
| have he : βeβ = 1 := by simp [e, norm_smul, r, hr.ne'] | |
| have her : r β’ e = y - x := by dsimp [e]; rw [smul_smul, mul_inv_cancelβ hr.ne', one_smul] | |
| let J := reflect e | |
| let a : Space n := (-2 : β) β’ e | |
| let g : Space n β β := fun z => r + inner β a z | |
| have hg : ContDiff β 2 g := contDiff_const.add (innerSL β a).contDiff | |
| have hg0 : g 0 = r := by simp [g] | |
| have hdistance : β z : Space n, y + J z - (x + z) = g z β’ e := by | |
| intro z | |
| have hai : inner β a z = (-2 : β) * inner β e z := by | |
| dsimp only [a] | |
| rw [real_inner_smul_left] | |
| change y + reflect e z - (x + z) = (r + inner β a z) β’ e | |
| rw [reflect_apply he, hai, add_smul, her, neg_mul, neg_smul] | |
| abel | |
| have hnear : βαΆ z in π (0 : Space n), 0 < g z β§ g z < 1 := | |
| ((hg.continuous.isOpen_preimage _ isOpen_Ioo).mem_nhds (by simpa [hg0] using And.intro hr hsmall)) | |
| let F : Space n β β := fun z => f (y + J z) - f (x + z) - | |
| A * (2 * g z - (g z) ^ 2) - Ξ΅ * (βx + zβ ^ 2 + βy + J zβ ^ 2) | |
| have hfy : ContDiff β 2 (fun z => f (y + J z)) := | |
| hf.comp (contDiff_const.add J.contDiff) | |
| have hfx : ContDiff β 2 (fun z => f (x + z)) := hf.comp (contDiff_const.add contDiff_id) | |
| have hnx : ContDiff β 2 (fun z : Space n => βx + zβ ^ 2) := | |
| (contDiff_const.add contDiff_id).norm_sq β | |
| have hny : ContDiff β 2 (fun z : Space n => βy + J zβ ^ 2) := | |
| (contDiff_const.add J.contDiff).norm_sq β | |
| have hp : ContDiff β 2 (fun z => A * (2 * g z - (g z) ^ 2)) := by fun_prop | |
| have hq : ContDiff β 2 (fun z => Ξ΅ * (βx + zβ ^ 2 + βy + J zβ ^ 2)) := by fun_prop | |
| have hF : ContDiff β 2 F := ((hfy.sub hfx).sub hp).sub hq | |
| have hmax : IsLocalMax F 0 := by | |
| filter_upwards [hnear] with z hz | |
| have hnorm : βy + J z - (x + z)β = g z := by | |
| rw [hdistance, norm_smul, he, mul_one, Real.norm_eq_abs, abs_of_pos hz.1] | |
| have hh := hm (x + z) (y + J z) | |
| rw [hnorm, poissonPenalty_of_le A hz.2.le, poissonPenalty_of_le A hsmall.le] at hh | |
| simpa [F, hg0, r] using hh | |
| have hl := laplacian_nonpos_of_local_max hF hmax | |
| have hly : Laplacian.laplacian (fun z => f (y + J z)) 0 = Laplacian.laplacian f y := by | |
| have ht : ContDiff β 2 (fun u => f (y + u)) := hf.comp (contDiff_const.add contDiff_id) | |
| simpa only [map_zero, laplacian_translate hf, add_zero] using laplacian_comp_isometry ht J 0 | |
| have hns : ContDiff β 2 (fun z : Space n => βzβ ^ 2) := contDiff_id.norm_sq β | |
| have hlny : Laplacian.laplacian (fun z => βy + J zβ ^ 2) 0 = 2 * n := by | |
| have ht : ContDiff β 2 (fun u : Space n => βy + uβ ^ 2) := | |
| (contDiff_const.add contDiff_id).norm_sq β | |
| simpa only [map_zero, laplacian_translate hns, laplacian_norm_sq] using | |
| laplacian_comp_isometry ht J 0 | |
| have hal : βaβ ^ 2 = 4 := by simp [a, norm_smul, he]; norm_num | |
| have hlg : Laplacian.laplacian g 0 = 0 := laplacian_affine a r 0 | |
| have hlgs : Laplacian.laplacian (fun z => g z ^ 2) 0 = 8 := by | |
| rw [show (fun z => g z ^ 2) = (fun z => (r + inner β a z) ^ 2) from rfl, | |
| laplacian_affine_sq, hal] | |
| norm_num | |
| have hg2 : ContDiff β 2 (fun z => 2 * g z) := contDiff_const.mul hg | |
| dsimp only [F] at hl | |
| rw [laplacian_fun_sub ((hfy.sub hfx).sub hp) hq, | |
| laplacian_fun_sub (hfy.sub hfx) hp, laplacian_fun_sub hfy hfx, | |
| hly, laplacian_translate hf, | |
| laplacian_fun_const_mul (hg2.sub (hg.pow 2)), | |
| laplacian_fun_sub hg2 (hg.pow 2), | |
| laplacian_fun_const_mul hg, hlg, hlgs, | |
| laplacian_fun_const_mul (hnx.add hny), laplacian_fun_add hnx hny, | |
| laplacian_translate hns, laplacian_norm_sq, hlny] at hl | |
| simp only [add_zero] at hl | |
| linarith | |
| lemma bounded_poisson_lipschitz {n : β} {f : Space n β β} | |
| (hf : ContDiff β 2 f) {M C : β} (hM : 0 β€ M) (hC : 0 β€ C) | |
| (hbound : β x, |f x| β€ M) (hlap : β x, |Laplacian.laplacian f x| β€ C) : | |
| β x y, |f y - f x| β€ 2 * (2 * M + C + 1) * βy - xβ := by | |
| let A := 2 * M + C + 1 | |
| have hA : 0 < A := by dsimp [A]; positivity | |
| have hlarge : 2 * M < A := by dsimp [A]; linarith | |
| have honeway : β x y, f y - f x β€ 2 * A * βy - xβ := by | |
| intro xβ yβ | |
| by_contra hbad | |
| have hbad' : 2 * A * βyβ - xββ < f yβ - f xβ := lt_of_not_ge hbad | |
| let Ξ΄ := f yβ - f xβ - poissonPenalty A βyβ - xββ | |
| have hΞ΄ : 0 < Ξ΄ := by | |
| dsimp [Ξ΄] | |
| have hh := poissonPenalty_le_linear hA.le (norm_nonneg (yβ - xβ)) | |
| linarith | |
| let S := βxββ ^ 2 + βyββ ^ 2 | |
| have hS : 0 β€ S := by dsimp [S]; positivity | |
| let Ξ΅ := min (Ξ΄ / (2 * (S + 1))) (1 / (n + 1 : β)) | |
| have hΞ΅ : 0 < Ξ΅ := lt_min (by positivity) (by positivity) | |
| have hΞ΅S : Ξ΅ * (S + 1) β€ Ξ΄ / 2 := by | |
| have hh := min_le_left (Ξ΄ / (2 * (S + 1))) (1 / (n + 1 : β)) | |
| have hh' := (le_div_iffβ (show 0 < 2 * (S + 1) by positivity)).mp hh | |
| change Ξ΅ * (2 * (S + 1)) β€ Ξ΄ at hh' | |
| linarith | |
| have hΞ΅n : (n : β) * Ξ΅ β€ 1 := by | |
| have hh := min_le_right (Ξ΄ / (2 * (S + 1))) (1 / (n + 1 : β)) | |
| have hh' := (le_div_iffβ (show 0 < (n : β) + 1 by positivity)).mp hh | |
| change Ξ΅ * ((n : β) + 1) β€ 1 at hh' | |
| nlinarith | |
| have hposβ : 0 < f yβ - f xβ - poissonPenalty A βyβ - xββ - | |
| Ξ΅ * (βxββ ^ 2 + βyββ ^ 2) := by | |
| change 0 < Ξ΄ - Ξ΅ * S | |
| nlinarith | |
| obtain β¨x, y, hmβ© := poisson_maximum hf.continuous hM hbound hA.le hΞ΅ | |
| have hp : 0 < f y - f x - poissonPenalty A βy - xβ - Ξ΅ * (βxβ ^ 2 + βyβ ^ 2) := | |
| hposβ.trans_le (hm xβ yβ) | |
| have hpen : 0 β€ Ξ΅ * (βxβ ^ 2 + βyβ ^ 2) := by positivity | |
| have hxy : y β x := by | |
| rintro rfl | |
| simp only [sub_self, norm_zero, poissonPenalty, sub_zero, max_eq_left zero_le_one, | |
| one_pow, sub_self, mul_zero] at hp | |
| linarith | |
| have hs : βy - xβ < 1 := by | |
| by_contra h | |
| rw [poissonPenalty_of_ge A (le_of_not_gt h)] at hp | |
| have hbβ := (abs_le.mp (hbound x)).1 | |
| have hbβ := (abs_le.mp (hbound y)).2 | |
| linarith | |
| have hl := laplacian_poisson_at_max hf A Ξ΅ hxy hs hm | |
| have hbβ := (abs_le.mp (hlap y)).1 | |
| have hbβ := (abs_le.mp (hlap x)).2 | |
| dsimp [A] at hl | |
| linarith | |
| intro x y | |
| apply abs_le.mpr | |
| constructor | |
| Β· have h := honeway y x | |
| rw [norm_sub_rev x y] at h | |
| linarith | |
| Β· exact honeway x y | |
| lemma gradient_poisson_at_max_y {n : β} {f : Space n β β} | |
| (hf : Differentiable β f) (A Ξ΅ : β) {x y : Space n} | |
| (hxy : y β x) (hs : βy - xβ < 1) | |
| (hm : β b : Space n, | |
| f b - f x - poissonPenalty A βb - xβ - Ξ΅ * (βxβ ^ 2 + βbβ ^ 2) β€ | |
| f y - f x - poissonPenalty A βy - xβ - Ξ΅ * (βxβ ^ 2 + βyβ ^ 2)) : | |
| gradient f y = (2 * A * (1 - βy - xβ) / βy - xβ) β’ (y - x) + | |
| (2 * Ξ΅) β’ y := by | |
| have hn : HasFDerivAt (fun b : Space n => βb - xβ) | |
| (βy - xββ»ΒΉ β’ innerSL β (y - x)) y := by | |
| simpa only [Function.comp_def, ContinuousLinearMap.comp_id, id_eq] using | |
| (hasFDerivAt_norm_nonzero (sub_ne_zero.mpr hxy)).comp y | |
| ((hasFDerivAt_id y).sub_const x) | |
| have hq : HasFDerivAt (fun b : Space n => βxβ ^ 2 + βbβ ^ 2) | |
| ((2 : β) β’ innerSL β y) y := by | |
| have hh := (hasStrictFDerivAt_norm_sq y).hasFDerivAt.const_add (βxβ ^ 2) | |
| rw [β Nat.cast_smul_eq_nsmul β 2, Nat.cast_ofNat] at hh | |
| exact hh | |
| have hp := ((hn.const_mul 2).sub (hn.pow 2)).const_mul A | |
| have hd := (((hf y).hasFDerivAt.sub_const (f x)).fun_sub hp).fun_sub (hq.const_mul Ξ΅) | |
| have hnear : βαΆ b : Space n in π y, βb - xβ < 1 := | |
| (isOpen_lt (continuous_id.sub continuous_const).norm continuous_const).mem_nhds hs | |
| have hmax : IsLocalMax (fun b : Space n => f b - f x - | |
| A * (2 * βb - xβ - βb - xβ ^ 2) - Ξ΅ * (βxβ ^ 2 + βbβ ^ 2)) y := by | |
| filter_upwards [hnear] with b hb | |
| simpa only [poissonPenalty_of_le A hb.le, poissonPenalty_of_le A hs.le] using hm b | |
| have hz := hmax.hasFDerivAt_eq_zero hd | |
| apply (InnerProductSpace.toDual β (Space n)).injective | |
| ext z | |
| have he := congrArg (fun L : Space n βL[β] β => L z) hz | |
| simp only [sub_apply, smul_apply, smul_eq_mul, zero_apply, pow_one, | |
| Nat.cast_ofNat, Nat.reduceSub, nsmul_eq_mul, innerSL_apply_apply] at he | |
| simp only [toDual_gradient, map_add, map_smul, add_apply, smul_apply, | |
| InnerProductSpace.toDual_apply_apply, smul_eq_mul] | |
| change (fderiv β f y) z = _ | |
| change (fderiv β f y) z - A * (2 * (βy - xββ»ΒΉ * inner β (y - x) z) - | |
| (2 * βy - xβ) * (βy - xββ»ΒΉ * inner β (y - x) z)) - | |
| Ξ΅ * (2 * inner β y z) = 0 at he | |
| rw [div_eq_mul_inv] | |
| nlinarith | |
| lemma poisson_gradient_bounds {n : β} {f : Space n β β} | |
| (hf : Differentiable β f) {M A Ξ΅ : β} (hM : 0 β€ M) | |
| (hbound : β x, |f x| β€ M) (hA : 0 β€ A) (hΞ΅ : 0 < Ξ΅) | |
| {x y : Space n} (hxy : y β x) (hs : βy - xβ < 1) | |
| (hpos : 0 < f y - f x - poissonPenalty A βy - xβ - Ξ΅ * (βxβ ^ 2 + βyβ ^ 2)) | |
| (hm : β a b : Space n, | |
| f b - f a - poissonPenalty A βb - aβ - Ξ΅ * (βaβ ^ 2 + βbβ ^ 2) β€ | |
| f y - f x - poissonPenalty A βy - xβ - Ξ΅ * (βxβ ^ 2 + βyβ ^ 2)) : | |
| βgradient f xβ β€ 2 * A + 2 * Real.sqrt (2 * M * Ξ΅) β§ | |
| βgradient f yβ β€ 2 * A + 2 * Real.sqrt (2 * M * Ξ΅) := by | |
| 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 := poissonPenalty_nonneg hA (norm_nonneg (y - x)) | |
| linarith | |
| have hsmall : β z : Space n, Ξ΅ * βzβ ^ 2 β€ 2 * M β | |
| β(2 * Ξ΅) β’ zβ β€ 2 * Real.sqrt (2 * M * Ξ΅) := by | |
| intro z hz | |
| rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 β€ 2 * Ξ΅)] | |
| have hsq := Real.sq_sqrt (show 0 β€ 2 * M * Ξ΅ by positivity) | |
| have hc := mul_le_mul_of_nonneg_right hz hΞ΅.le | |
| 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β)]) | |
| have hpbound {a b : Space n} (hab : b β a) (hr : βb - aβ < 1) : | |
| β(2 * A * (1 - βb - aβ) / βb - aβ) β’ (b - a)β β€ 2 * A := by | |
| rw [norm_smul, Real.norm_eq_abs, abs_of_nonneg (by positivity), | |
| div_mul_cancelβ _ (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hab))] | |
| nlinarith [norm_nonneg (b - a)] | |
| have hgy := gradient_poisson_at_max_y hf A Ξ΅ hxy hs (hm x) | |
| have hnegmax : β a b : Space n, | |
| -f b - -f a - poissonPenalty A βb - aβ - Ξ΅ * (βaβ ^ 2 + βbβ ^ 2) β€ | |
| -f x - -f y - poissonPenalty A β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_poisson_at_max_y hf.neg A Ξ΅ (Ne.symm hxy) | |
| (by simpa only [norm_sub_rev] using hs) (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 | |
| constructor | |
| Β· calc βgradient f xβ = β-gradient f xβ := (norm_neg _).symm | |
| _ = β(2 * A * (1 - βx - yβ) / βx - yβ) β’ (x - y) + (2 * Ξ΅) β’ xβ := congrArg norm hgx | |
| _ β€ _ := (norm_add_le _ _).trans (add_le_add | |
| (hpbound (Ne.symm hxy) (by simpa only [norm_sub_rev] using hs)) hxsmall) | |
| Β· rw [hgy] | |
| exact (norm_add_le _ _).trans (add_le_add (hpbound hxy hs) hysmall) | |
| lemma bounded_unit_drift_lipschitz {n : β} {f : Space n β β} | |
| (hf : ContDiff β 2 f) (b : Space n β Space n) {M C : β} | |
| (hM : 0 β€ M) (hC : 0 β€ C) (hbound : β x, |f x| β€ M) | |
| (hb : β x, βb xβ β€ 1) | |
| (hpde : β x, |Laplacian.laplacian f x - fderiv β f x (b x)| β€ C) : | |
| β x y, |f y - f x| β€ 2 * (2 * M + C + 3) * βy - xβ := by | |
| let A := 2 * M + C + 3 | |
| have hA : 0 < A := by dsimp [A]; positivity | |
| have hlarge : 2 * M < A := by dsimp [A]; linarith | |
| have honeway : β x y, f y - f x β€ 2 * A * βy - xβ := by | |
| intro xβ yβ | |
| by_contra hbad | |
| have hbad' : 2 * A * βyβ - xββ < f yβ - f xβ := lt_of_not_ge hbad | |
| let Ξ΄ := f yβ - f xβ - poissonPenalty A βyβ - xββ | |
| have hΞ΄ : 0 < Ξ΄ := by | |
| dsimp [Ξ΄] | |
| have hh := poissonPenalty_le_linear hA.le (norm_nonneg (yβ - xβ)) | |
| linarith | |
| let S := βxββ ^ 2 + βyββ ^ 2 | |
| have hS : 0 β€ S := by dsimp [S]; positivity | |
| let Ξ΅ := min (Ξ΄ / (2 * (S + 1))) (min (1 / (n + 1 : β)) (1 / (8 * M + 1))) | |
| have hΞ΅ : 0 < Ξ΅ := lt_min (by positivity) (lt_min (by positivity) (by positivity)) | |
| have hΞ΅S : Ξ΅ * (S + 1) β€ Ξ΄ / 2 := by | |
| have hh := min_le_left (Ξ΄ / (2 * (S + 1))) (min (1 / (n + 1 : β)) (1 / (8 * M + 1))) | |
| have hh' := (le_div_iffβ (show 0 < 2 * (S + 1) by positivity)).mp hh | |
| change Ξ΅ * (2 * (S + 1)) β€ Ξ΄ at hh' | |
| linarith | |
| have hΞ΅n : (n : β) * Ξ΅ β€ 1 := by | |
| have hh : Ξ΅ β€ 1 / (n + 1 : β) := (min_le_right _ _).trans (min_le_left _ _) | |
| have hh' := (le_div_iffβ (show 0 < (n : β) + 1 by positivity)).mp hh | |
| nlinarith | |
| have hΞ΅M : 2 * Real.sqrt (2 * M * Ξ΅) β€ 1 := by | |
| have hh : Ξ΅ β€ 1 / (8 * M + 1) := (min_le_right _ _).trans (min_le_right _ _) | |
| have hh' := (le_div_iffβ (show 0 < 8 * M + 1 by positivity)).mp hh | |
| have hs := Real.sq_sqrt (show 0 β€ 2 * M * Ξ΅ by positivity) | |
| nlinarith [Real.sqrt_nonneg (2 * M * Ξ΅)] | |
| have hposβ : 0 < f yβ - f xβ - poissonPenalty A βyβ - xββ - | |
| Ξ΅ * (βxββ ^ 2 + βyββ ^ 2) := by | |
| change 0 < Ξ΄ - Ξ΅ * S | |
| nlinarith | |
| obtain β¨x, y, hmβ© := poisson_maximum hf.continuous hM hbound hA.le hΞ΅ | |
| have hp : 0 < f y - f x - poissonPenalty A βy - xβ - Ξ΅ * (βxβ ^ 2 + βyβ ^ 2) := | |
| hposβ.trans_le (hm xβ yβ) | |
| have hpen : 0 β€ Ξ΅ * (βxβ ^ 2 + βyβ ^ 2) := by positivity | |
| have hxy : y β x := by | |
| rintro rfl | |
| simp only [sub_self, norm_zero, poissonPenalty, sub_zero, max_eq_left zero_le_one, | |
| one_pow, sub_self, mul_zero] at hp | |
| linarith | |
| have hs : βy - xβ < 1 := by | |
| by_contra h | |
| rw [poissonPenalty_of_ge A (le_of_not_gt h)] at hp | |
| have hbβ := (abs_le.mp (hbound x)).1 | |
| have hbβ := (abs_le.mp (hbound y)).2 | |
| linarith | |
| have hl := laplacian_poisson_at_max hf A Ξ΅ hxy hs hm | |
| have hg := poisson_gradient_bounds (hf.differentiable (by norm_num)) hM hbound hA.le hΞ΅ hxy hs hp hm | |
| have hdr (z : Space n) : |fderiv β f z (b z)| β€ βgradient f zβ := by | |
| rw [β toDual_gradient] | |
| change |inner β (gradient f z) (b z)| β€ _ | |
| exact (abs_real_inner_le_norm _ _).trans (by nlinarith [norm_nonneg (gradient f z), hb z]) | |
| have hx := (abs_le.mp (hpde x)).2 | |
| have hy := (abs_le.mp (hpde y)).1 | |
| have hdβ := (abs_le.mp (hdr x)).2 | |
| have hdβ := (abs_le.mp (hdr y)).1 | |
| dsimp [A] at * | |
| linarith | |
| intro x y | |
| apply abs_le.mpr | |
| constructor | |
| Β· have h := honeway y x | |
| rw [norm_sub_rev x y] at h | |
| linarith | |
| Β· exact honeway x y | |
| lemma fderiv_dilation {n : β} {f : Space n β β} (hf : Differentiable β f) | |
| (r : β) (x a : Space n) : | |
| fderiv β (fun z => f (r β’ z)) x a = r * fderiv β f (r β’ x) a := by | |
| have hd : HasFDerivAt (fun z => f (r β’ z)) | |
| ((fderiv β f (r β’ x)).comp (r β’ ContinuousLinearMap.id β (Space n))) x := by | |
| simpa only [Function.comp_def, id_eq] using | |
| (hf (r β’ x)).hasFDerivAt.comp x ((hasFDerivAt_id x).const_smul r) | |
| rw [hd.fderiv] | |
| simp | |
| lemma coordDeriv_dilation {n : β} {f : Space n β β} (hf : Differentiable β f) | |
| (r : β) (i : Fin n) (x : Space n) : | |
| coordDeriv (fun z => f (r β’ z)) i x = r * coordDeriv f i (r β’ x) := | |
| fderiv_dilation hf r x (basis n i) | |
| lemma coordDeriv_const_mul {n : β} {f : Space n β β} (hf : Differentiable β f) | |
| (r : β) (i : Fin n) (x : Space n) : | |
| coordDeriv (fun z => r * f z) i x = r * coordDeriv f i x := by | |
| dsimp [coordDeriv] | |
| rw [fderiv_const_mul (hf x)] | |
| simp | |
| lemma laplacian_dilation {n : β} {f : Space n β β} (hf : ContDiff β 2 f) | |
| (r : β) (x : Space n) : | |
| Laplacian.laplacian (fun z => f (r β’ z)) x = r ^ 2 * Laplacian.laplacian f (r β’ x) := by | |
| have hc : ContDiff β 2 (fun z => f (r β’ z)) := hf.comp (contDiff_id.const_smul r) | |
| rw [laplacian_eq_sum_coordDeriv hc, laplacian_eq_sum_coordDeriv hf, Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| have he : coordDeriv (fun z => f (r β’ z)) i = fun z => r * coordDeriv f i (r β’ z) := | |
| funext (coordDeriv_dilation (hf.differentiable (by norm_num)) r i) | |
| have hd : Differentiable β (fun z => coordDeriv f i (r β’ z)) := | |
| ((coordDeriv_contDiff hf i).differentiable (by norm_num)).comp (differentiable_id.const_smul r) | |
| rw [he, coordDeriv_const_mul hd, | |
| coordDeriv_dilation ((coordDeriv_contDiff hf i).differentiable (by norm_num))] | |
| ring | |
| end PoissonSupport.DeGiorgi | |
| end | |
| end OAI | |