Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

refactor(Euler/Whole): 7 small modules folded into the file that imports them #716
Open
+0 −165 Euler/WholeSpaceGaussian.lean deleted
| @@ -1,165 +0,0 @@ | ||
| 1 | -import Euler.LpSmoothField | |
| 2 | -import Euler.LpParameterIntegral | |
| 3 | -import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform | |
| 4 | -import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm | |
| 5 | - | |
| 6 | -/-! | |
| 7 | -The normalized Gaussian on ordinary three-dimensional space. The estimates | |
| 8 | -below concern the literal Bochner integral, including its L²-to-uniform bound. | |
| 9 | -The parameterization exp(-|x|²/t) has heat generator one quarter of the Laplacian. | |
| 10 | --/ | |
| 11 | - | |
| 12 | -noncomputable section | |
| 13 | - | |
| 14 | -namespace EulerWholeSpaceGaussian | |
| 15 | - | |
| 16 | -open MeasureTheory InnerProductSpace EulerSmoothLimit EulerLpTranslation Filter | |
| 17 | -open scoped ContDiff ENNReal RealInnerProductSpace | |
| 18 | - | |
| 19 | -def normalization (t : ℝ) : ℝ := (Real.pi*t)^(-(3:ℝ)/2) | |
| 20 | - | |
| 21 | -def kernel (t : ℝ) (x : Space) : ℝ := | |
| 22 | - normalization t * Real.exp (-t⁻¹*‖x‖^2) | |
| 23 | - | |
| 24 | -theorem normalization_pos {t : ℝ} (ht : 0 < t) : 0 < normalization t := | |
| 25 | - Real.rpow_pos_of_pos (mul_pos Real.pi_pos ht) _ | |
| 26 | - | |
| 27 | -theorem kernel_pos {t : ℝ} (ht : 0 < t) (x : Space) : 0 < kernel t x := | |
| 28 | - mul_pos (normalization_pos ht) (Real.exp_pos _) | |
| 29 | - | |
| 30 | -theorem kernel_nonneg {t : ℝ} (ht : 0 < t) (x : Space) : 0 ≤ kernel t x := | |
| 31 | - (kernel_pos ht x).le | |
| 32 | - | |
| 33 | -theorem kernel_le_normalization {t : ℝ} (ht : 0 < t) (x : Space) : | |
| 34 | - kernel t x ≤ normalization t := by | |
| 35 | - unfold kernel | |
| 36 | - apply mul_le_of_le_one_right (normalization_pos ht).le | |
| 37 | - exact Real.exp_le_one_iff.mpr (mul_nonpos_of_nonpos_of_nonneg | |
| 38 | - (neg_nonpos.mpr (inv_pos.mpr ht).le) (sq_nonneg ‖x‖)) | |
| 39 | - | |
| 40 | -theorem kernel_smooth (t : ℝ) : ContDiff ℝ ∞ (kernel t) := by | |
| 41 | - unfold kernel | |
| 42 | - have hn : ContDiff ℝ ∞ (fun x : Space => ‖x‖^2) := contDiff_id.norm_sq ℝ | |
| 43 | - exact contDiff_const.mul ((contDiff_const.mul hn).exp) | |
| 44 | - | |
| 45 | -theorem exp_integrable {b : ℝ} (hb : 0 < b) : | |
| 46 | - Integrable (fun x : Space => Real.exp (-b*‖x‖^2)) := by | |
| 47 | - have h := (GaussianFourier.integrable_cexp_neg_mul_sq_norm_add | |
| 48 | - (V := Space) (b := (b : ℂ)) (by simpa using hb) 0 0).re | |
| 49 | - change Integrable (fun x : Space => (Complex.exp | |
| 50 | - (-(b : ℂ)*‖x‖^2 + 0*inner ℝ (0 : Space) x)).re) at h | |
| 51 | - simpa only [zero_mul, add_zero, ← Complex.ofReal_pow, ← Complex.ofReal_mul, | |
| 52 | - ← Complex.ofReal_neg, ← Complex.ofReal_exp, Complex.ofReal_re] using h | |
| 53 | - | |
| 54 | -theorem kernel_integrable {t : ℝ} (ht : 0 < t) : Integrable (kernel t) := | |
| 55 | - (exp_integrable (inv_pos.mpr ht)).const_mul _ | |
| 56 | - | |
| 57 | -theorem integral_kernel {t : ℝ} (ht : 0 < t) : | |
| 58 | - (∫ x : Space, kernel t x) = 1 := by | |
| 59 | - have hdim : Module.finrank ℝ Space = 3 := by simp [Space] | |
| 60 | - simp only [kernel] | |
| 61 | - rw [integral_const_mul, | |
| 62 | - GaussianFourier.integral_rexp_neg_mul_sq_norm (inv_pos.mpr ht), hdim] | |
| 63 | - simp only [Nat.cast_ofNat, div_inv_eq_mul] | |
| 64 | - unfold normalization | |
| 65 | - rw [← Real.rpow_add (mul_pos Real.pi_pos ht)] | |
| 66 | - norm_num | |
| 67 | - | |
| 68 | -theorem kernel_sq_integrable {t : ℝ} (ht : 0 < t) : | |
| 69 | - Integrable (fun x : Space => kernel t x ^ 2) := by | |
| 70 | - apply ((kernel_integrable ht).const_mul (normalization t)).mono' | |
| 71 | - ((kernel_smooth t).continuous.pow 2).aestronglyMeasurable | |
| 72 | - apply Eventually.of_forall | |
| 73 | - intro x | |
| 74 | - change ‖kernel t x ^ 2‖ ≤ normalization t * kernel t x | |
| 75 | - rw [Real.norm_of_nonneg (sq_nonneg _), pow_two] | |
| 76 | - exact mul_le_mul_of_nonneg_right (kernel_le_normalization ht x) (kernel_nonneg ht x) | |
| 77 | - | |
| 78 | -theorem kernel_memLp {t : ℝ} (ht : 0 < t) : MemLp (kernel t) 2 volume := | |
| 79 | - (memLp_two_iff_integrable_sq (kernel_smooth t).continuous.aestronglyMeasurable).2 | |
| 80 | - (kernel_sq_integrable ht) | |
| 81 | - | |
| 82 | -theorem integral_kernel_sq_le {t : ℝ} (ht : 0 < t) : | |
| 83 | - (∫ x : Space, kernel t x ^ 2) ≤ normalization t := by | |
| 84 | - calc | |
| 85 | - _ ≤ ∫ x : Space, normalization t * kernel t x := | |
| 86 | - integral_mono (kernel_sq_integrable ht) ((kernel_integrable ht).const_mul _) | |
| 87 | - (fun x => by | |
| 88 | - rw [pow_two] | |
| 89 | - exact mul_le_mul_of_nonneg_right (kernel_le_normalization ht x) (kernel_nonneg ht x)) | |
| 90 | - _ = normalization t := by rw [integral_const_mul, integral_kernel ht, mul_one] | |
| 91 | - | |
| 92 | -theorem sqrt_normalization {t : ℝ} (ht : 0 < t) : | |
| 93 | - Real.sqrt (normalization t) = (Real.pi*t)^(-(3:ℝ)/4) := by | |
| 94 | - rw [Real.sqrt_eq_rpow, normalization, ← Real.rpow_mul (mul_pos Real.pi_pos ht).le] | |
| 95 | - norm_num | |
| 96 | - | |
| 97 | -theorem sqrt_normalization_le {t : ℝ} (ht : 0 < t) : | |
| 98 | - Real.sqrt (normalization t) ≤ t^(-(3:ℝ)/4) := by | |
| 99 | - rw [sqrt_normalization ht] | |
| 100 | - apply Real.rpow_le_rpow_of_nonpos ht | |
| 101 | - · nlinarith [Real.pi_pos, Real.two_le_pi] | |
| 102 | - · norm_num | |
| 103 | - | |
| 104 | -section Averaging | |
| 105 | - | |
| 106 | -variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] | |
| 107 | - | |
| 108 | -/-- The actual whole-space Gaussian average, with no periodic identification. -/ | |
| 109 | -def average (t : ℝ) (f : Space → V) (x : Space) : V := | |
| 110 | - ∫ y : Space, kernel t y • f (x+y) | |
| 111 | - | |
| 112 | -theorem average_integrable_of_bound {t : ℝ} (ht : 0 < t) | |
| 113 | - (f : Space → V) (hf : Continuous f) (C : ℝ) (hb : ∀ x, ‖f x‖ ≤ C) (x : Space) : | |
| 114 | - Integrable (fun y : Space => kernel t y • f (x+y)) := by | |
| 115 | - apply ((kernel_integrable ht).mul_const C).mono' | |
| 116 | - (((kernel_smooth t).continuous.smul (hf.comp (continuous_const.add continuous_id))).aestronglyMeasurable) | |
| 117 | - apply Eventually.of_forall | |
| 118 | - intro y | |
| 119 | - change ‖kernel t y • f (x+y)‖ ≤ kernel t y * C | |
| 120 | - rw [norm_smul, Real.norm_of_nonneg (kernel_nonneg ht y)] | |
| 121 | - exact mul_le_mul_of_nonneg_left (hb _) (kernel_nonneg ht y) | |
| 122 | - | |
| 123 | -/-- Cauchy--Schwarz for scalar multiplication, in a form that retains the | |
| 124 | -ordinary L² norm of a Banach-valued field. -/ | |
| 125 | -theorem norm_integral_smul_le (k : Space → ℝ) (f : Space → V) | |
| 126 | - (hk : MemLp k 2 volume) (hf : MemLp f 2 volume) : | |
| 127 | - ‖∫ x : Space, k x • f x‖ ≤ | |
| 128 | - Real.sqrt (∫ x : Space, ‖k x‖^2) * (eLpNorm f 2 volume).toReal := by | |
| 129 | - have hp : (2:ℝ).HolderConjugate 2 := by norm_num [Real.holderConjugate_iff] | |
| 130 | - have hk' : MemLp (fun x => ‖k x‖) (ENNReal.ofReal (2:ℝ)) volume := by simpa using hk.norm | |
| 131 | - have hf' : MemLp (fun x => ‖f x‖) (ENNReal.ofReal (2:ℝ)) volume := by simpa using hf.norm | |
| 132 | - have h := integral_mul_le_Lp_mul_Lq_of_nonneg hp | |
| 133 | - (Eventually.of_forall (fun x => norm_nonneg (k x))) | |
| 134 | - (Eventually.of_forall (fun x => norm_nonneg (f x))) hk' hf' | |
| 135 | - have hnorm : (∫ x : Space, ‖k x‖*‖f x‖) ≤ | |
| 136 | - Real.sqrt (∫ x : Space, ‖k x‖^2) * Real.sqrt (∫ x : Space, ‖f x‖^2) := by | |
| 137 | - simpa only [Real.rpow_two, Real.sqrt_eq_rpow] using h | |
| 138 | - have he : Real.sqrt (∫ x : Space, ‖f x‖^2) = (eLpNorm f 2 volume).toReal := by | |
| 139 | - rw [EulerLpParameterIntegral.integral_norm_sq_eq volume f hf, | |
| 140 | - Real.sqrt_sq ENNReal.toReal_nonneg] | |
| 141 | - rw [he] at hnorm | |
| 142 | - exact (norm_integral_le_integral_norm _).trans (by simpa only [norm_smul] using hnorm) | |
| 143 | - | |
| 144 | -/-- The three-dimensional smoothing power t^(-3/4) is proved from the | |
| 145 | -normalized Gaussian density and the ordinary whole-space L² norm. -/ | |
| 146 | -theorem average_norm_le_L2 {t : ℝ} (ht : 0 < t) (f : Space → V) | |
| 147 | - (hf : MemLp f 2 volume) (x : Space) : | |
| 148 | - ‖average t f x‖ ≤ t^(-(3:ℝ)/4) * (eLpNorm f 2 volume).toReal := by | |
| 149 | - have hmp := measurePreserving_add_left (volume : Measure Space) x | |
| 150 | - have hs : MemLp (fun y : Space => f (x+y)) 2 volume := hf.comp_measurePreserving hmp | |
| 151 | - have he : eLpNorm (fun y : Space => f (x+y)) 2 volume = eLpNorm f 2 volume := | |
| 152 | - eLpNorm_comp_measurePreserving hf.aestronglyMeasurable hmp | |
| 153 | - have h := norm_integral_smul_le (kernel t) (fun y : Space => f (x+y)) (kernel_memLp ht) hs | |
| 154 | - rw [he] at h | |
| 155 | - have hk : (∫ y : Space, ‖kernel t y‖^2) ≤ normalization t := by | |
| 156 | - simpa only [Real.norm_eq_abs, sq_abs] using integral_kernel_sq_le ht | |
| 157 | - exact h.trans (mul_le_mul_of_nonneg_right | |
| 158 | - ((Real.sqrt_le_sqrt hk).trans (sqrt_normalization_le ht)) ENNReal.toReal_nonneg) | |
| 159 | - | |
| 160 | -theorem average_smoothField_norm {t : ℝ} (ht : 0 < t) (A : SmoothL2Field V) (x : Space) : | |
| 161 | - ‖average t A.field x‖ ≤ t^(-(3:ℝ)/4) * ‖A.toLp‖ := by | |
| 162 | - simpa only [SmoothL2Field.toLp, Lp.norm_toLp] using average_norm_le_L2 ht A.field A.memLp x | |
| 163 | - | |
| 164 | -end Averaging | |
| 165 | -end EulerWholeSpaceGaussian | |
+0 −115 Euler/WholeSpaceGaussianElliptic.lean deleted
| @@ -1,115 +0,0 @@ | ||
| 1 | -import Euler.WholeSpaceGaussianHigh | |
| 2 | -import Euler.MeanVectorIdentities | |
| 3 | - | |
| 4 | -/-! The logarithmic middle heat scales for an actual elliptic curl equation. -/ | |
| 5 | - | |
| 6 | -noncomputable section | |
| 7 | - | |
| 8 | -namespace EulerWholeSpaceGaussian | |
| 9 | - | |
| 10 | -open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set ContinuousLinearMap | |
| 11 | - EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSobolevBoundedField | |
| 12 | - EulerOrdinarySobolev EulerVectorCalculus EulerMeanHarmonic EulerMeanVectorIdentities Laplacian | |
| 13 | -open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 14 | - | |
| 15 | -def middleCost : ℝ := 5*(2:ℝ)^((3:ℝ)/2) | |
| 16 | - | |
| 17 | -theorem middleCost_nonneg : 0 ≤ middleCost := by unfold middleCost; positivity | |
| 18 | - | |
| 19 | -theorem secondAverage_elliptic (A G H : SmoothL2Field ℝ) (a b j : Fin 3) | |
| 20 | - (hΔ : ∀ y, Δ A.field y = partialDerivative G.field a y-partialDerivative H.field b y) | |
| 21 | - {t : ℝ} (ht : 0 < t) (x : Space) : | |
| 22 | - secondAverage t (A.directionalField (axis j)).field x = | |
| 23 | - average t ((G.directionalField (axis a)).directionalField (axis j)).field x - | |
| 24 | - average t ((H.directionalField (axis b)).directionalField (axis j)).field x := by | |
| 25 | - rw [secondAverage_eq_laplacian ht] | |
| 26 | - have he : Δ (A.directionalField (axis j)).field = | |
| 27 | - fun y => ((G.directionalField (axis a)).directionalField (axis j)).field y - | |
| 28 | - ((H.directionalField (axis b)).directionalField (axis j)).field y := by | |
| 29 | - funext y | |
| 30 | - change Δ (partialDerivative A.field j) y = _ | |
| 31 | - rw [laplacian_partialDerivative A.field A.smooth j y, funext hΔ, | |
| 32 | - partialDerivative_sub _ _ (contDiff_partialDerivative G.field G.smooth a) | |
| 33 | - (contDiff_partialDerivative H.field H.smooth b)] | |
| 34 | - rfl | |
| 35 | - rw [he, average_sub ht _ _ ((G.directionalField (axis a)).directionalField (axis j)).memLp | |
| 36 | - ((H.directionalField (axis b)).directionalField (axis j)).memLp] | |
| 37 | - | |
| 38 | -theorem secondAverage_elliptic_bound (A G H : SmoothL2Field ℝ) (a b j : Fin 3) | |
| 39 | - (hΔ : ∀ y, Δ A.field y = partialDerivative G.field a y-partialDerivative H.field b y) | |
| 40 | - (W : ℝ) (hG : ∀ y, ‖G.field y‖ ≤ W) (hH : ∀ y, ‖H.field y‖ ≤ W) | |
| 41 | - {t : ℝ} (ht : 0 < t) (x : Space) : | |
| 42 | - ‖(1/4:ℝ) • secondAverage t (A.directionalField (axis j)).field x‖ ≤ | |
| 43 | - middleCost*t⁻¹*W := by | |
| 44 | - have hg := average_field_second_bound ht G W hG (axis j) (axis a) x | |
| 45 | - have hh := average_field_second_bound ht H W hH (axis j) (axis b) x | |
| 46 | - simp only [axis_norm, mul_one] at hg hh | |
| 47 | - rw [norm_smul, Real.norm_of_nonneg (by norm_num : (0:ℝ) ≤ 1/4), | |
| 48 | - secondAverage_elliptic A G H a b j hΔ ht x] | |
| 49 | - apply (mul_le_mul_of_nonneg_left (norm_sub_le _ _) (by norm_num : (0:ℝ) ≤ 1/4)).trans | |
| 50 | - have h := mul_le_mul_of_nonneg_left (add_le_add hg hh) (by norm_num : (0:ℝ) ≤ 1/4) | |
| 51 | - exact h.trans_eq (by unfold middleCost; ring) | |
| 52 | - | |
| 53 | -/-- Integrating the genuine 1/t estimate gives the logarithmic middle term. -/ | |
| 54 | -theorem derivative_elliptic_middle (A G H : SmoothL2Field ℝ) (a b j : Fin 3) | |
| 55 | - (hΔ : ∀ y, Δ A.field y = partialDerivative G.field a y-partialDerivative H.field b y) | |
| 56 | - (W : ℝ) (hG : ∀ y, ‖G.field y‖ ≤ W) (hH : ∀ y, ‖H.field y‖ ≤ W) | |
| 57 | - (x : Space) {ε : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) : | |
| 58 | - ‖average ε (A.directionalField (axis j)).field x - | |
| 59 | - average 1 (A.directionalField (axis j)).field x‖ ≤ | |
| 60 | - middleCost*W*(-Real.log ε) := by | |
| 61 | - let D := A.directionalField (axis j) | |
| 62 | - let F : ℝ → ℝ := fun t => scaledAverage t D.field x | |
| 63 | - let B : ℝ → ℝ := fun t => middleCost*t⁻¹*W | |
| 64 | - have hc : Continuous F := scaledAverage_continuous D.field D.smooth.continuous | |
| 65 | - ‖finiteField D‖ (field_sup_bound D) x | |
| 66 | - have hd (t : ℝ) (ht : t ∈ Ioo ε 1) : | |
| 67 | - HasDerivAt F ((1/4:ℝ) • secondAverage t D.field x) t := | |
| 68 | - scaledAverage_field_hasDerivAt (hε.trans ht.1) D x | |
| 69 | - have hb (t : ℝ) (ht : t ∈ Ioo ε 1) : ‖deriv F t‖ ≤ B t := by | |
| 70 | - rw [(hd t ht).deriv] | |
| 71 | - exact secondAverage_elliptic_bound A G H a b j hΔ W hG hH (hε.trans ht.1) x | |
| 72 | - have hbi : IntervalIntegrable B volume ε 1 := by | |
| 73 | - apply ContinuousOn.intervalIntegrable_of_Icc hε1 | |
| 74 | - exact (continuousOn_const.mul (continuousOn_id.inv₀ | |
| 75 | - (fun t ht => (hε.trans_le ht.1).ne'))).mul continuousOn_const | |
| 76 | - have h := norm_sub_le_integral_of_norm_deriv_le_of_le hε1 hc.continuousOn | |
| 77 | - (fun t ht => (hd t ht).differentiableAt.differentiableWithinAt) | |
| 78 | - (Eventually.of_forall hb) hbi | |
| 79 | - have he : (∫ t in ε..(1:ℝ), B t) = middleCost*W*(-Real.log ε) := by | |
| 80 | - dsimp [B] | |
| 81 | - rw [intervalIntegral.integral_mul_const, intervalIntegral.integral_const_mul, | |
| 82 | - integral_inv_of_pos hε (by norm_num)] | |
| 83 | - simp only [one_div, Real.log_inv] | |
| 84 | - ring | |
| 85 | - rw [he] at h | |
| 86 | - change ‖scaledAverage 1 D.field x-scaledAverage ε D.field x‖ ≤ _ at h | |
| 87 | - rw [scaledAverage_eq (by norm_num : (0:ℝ)<1), scaledAverage_eq hε, norm_sub_rev] at h | |
| 88 | - exact h | |
| 89 | - | |
| 90 | -/-- The three heat scales, with every term attached to the original field. -/ | |
| 91 | -theorem elliptic_derivative_split (A G H : SmoothL2Field ℝ) (a b j : Fin 3) | |
| 92 | - (hΔ : ∀ y, Δ A.field y = partialDerivative G.field a y-partialDerivative H.field b y) | |
| 93 | - (W : ℝ) (hG : ∀ y, ‖G.field y‖ ≤ W) (hH : ∀ y, ‖H.field y‖ ≤ W) | |
| 94 | - (x : Space) {ε : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) : | |
| 95 | - ‖partialDerivative A.field j x‖ ≤ | |
| 96 | - lowCost*‖A.toLp‖ + middleCost*W*(-Real.log ε) + 3*ε^((1:ℝ)/4)*‖A.jetLp 3‖ := by | |
| 97 | - have hh := derivative_high_remainder A j x hε | |
| 98 | - have hm := derivative_elliptic_middle A G H a b j hΔ W hG hH x hε hε1 | |
| 99 | - have hl := average_field_first_bound A (axis j) x | |
| 100 | - simp only [axis_norm, mul_one] at hl | |
| 101 | - let v := partialDerivative A.field j x | |
| 102 | - let m := average ε (A.directionalField (axis j)).field x | |
| 103 | - let l := average 1 (A.directionalField (axis j)).field x | |
| 104 | - have he : v = (v-m)+(m-l)+l := by ring | |
| 105 | - calc | |
| 106 | - ‖v‖ = ‖(v-m)+(m-l)+l‖ := congrArg norm he | |
| 107 | - _ ≤ (‖v-m‖+‖m-l‖)+‖l‖ := (norm_add_le _ _).trans | |
| 108 | - (add_le_add (norm_add_le _ _) le_rfl) | |
| 109 | - _ ≤ _ := by | |
| 110 | - change ‖v-m‖ ≤ _ at hh | |
| 111 | - change ‖m-l‖ ≤ _ at hm | |
| 112 | - change ‖l‖ ≤ _ at hl | |
| 113 | - linarith | |
| 114 | - | |
| 115 | -end EulerWholeSpaceGaussian | |
+0 −79 Euler/WholeSpaceGaussianEvolution.lean deleted
| @@ -1,79 +0,0 @@ | ||
| 1 | -import Euler.WholeSpaceGaussianTimeKernel | |
| 2 | -import Euler.WholeSpaceGaussianIntegration | |
| 3 | -import Euler.WholeSpaceGaussianScale | |
| 4 | - | |
| 5 | -/-! The true heat-time evolution of Gaussian averaging on ordinary space. -/ | |
| 6 | - | |
| 7 | -noncomputable section | |
| 8 | - | |
| 9 | -namespace EulerWholeSpaceGaussian | |
| 10 | - | |
| 11 | -open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set ContinuousLinearMap | |
| 12 | -open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 13 | - | |
| 14 | -variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] | |
| 15 | - | |
| 16 | -/-- Differentiating the explicit kernel under its ordinary Bochner integral. -/ | |
| 17 | -theorem average_hasDerivAt_kernel {t : ℝ} (ht : 0 < t) | |
| 18 | - (f : Space → V) (hf : Continuous f) (C₀ : ℝ) | |
| 19 | - (h₀ : ∀ x, ‖f x‖ ≤ C₀) (x : Space) : | |
| 20 | - HasDerivAt (fun s : ℝ => average s f x) | |
| 21 | - (∫ y : Space, timeKernel t y • f (x+y)) t := by | |
| 22 | - have hC₀ : 0 ≤ C₀ := (norm_nonneg (f x)).trans (h₀ x) | |
| 23 | - let F : ℝ → Space → V := fun s y => kernel s y • f (x+y) | |
| 24 | - let F' : ℝ → Space → V := fun s y => timeKernel s y • f (x+y) | |
| 25 | - have hF (s : ℝ) : AEStronglyMeasurable (F s) volume := | |
| 26 | - ((kernel_smooth s).continuous.smul (hf.comp (continuous_const.add continuous_id))).aestronglyMeasurable | |
| 27 | - have hFd : AEStronglyMeasurable (F' t) volume := | |
| 28 | - ((timeKernel_continuous t).smul (hf.comp (continuous_const.add continuous_id))).aestronglyMeasurable | |
| 29 | - have hb (y : Space) (s : ℝ) (hs : s ∈ Ioo (t/2) (2*t)) : | |
| 30 | - ‖F' s y‖ ≤ timeEnvelope t y*C₀ := by | |
| 31 | - change ‖timeKernel s y • f (x+y)‖ ≤ _ | |
| 32 | - rw [norm_smul] | |
| 33 | - apply mul_le_mul (timeKernel_local_bound ht s hs y) (h₀ (x+y)) (norm_nonneg _) | |
| 34 | - unfold timeEnvelope | |
| 35 | - have hp := normalization_pos (by positivity : 0 < t/2) | |
| 36 | - positivity | |
| 37 | - have hd (y : Space) (s : ℝ) (hs : s ∈ Ioo (t/2) (2*t)) : | |
| 38 | - HasDerivAt (fun r => F r y) (F' s y) s := | |
| 39 | - (kernel_hasDerivAt (by linarith [hs.1] : 0 < s) y).smul_const (f (x+y)) | |
| 40 | - have h := hasDerivAt_integral_of_dominated_loc_of_deriv_le | |
| 41 | - (F := F) (F' := F') (bound := fun y : Space => timeEnvelope t y*C₀) | |
| 42 | - (Ioo_mem_nhds (by linarith : t/2 < t) (by linarith : t < 2*t)) | |
| 43 | - (Eventually.of_forall hF) (average_integrable_of_bound ht f hf C₀ h₀ x) hFd | |
| 44 | - (Eventually.of_forall hb) ((timeEnvelope_integrable ht).mul_const C₀) | |
| 45 | - (Eventually.of_forall hd) | |
| 46 | - exact h.2 | |
| 47 | - | |
| 48 | -def secondAverage (t : ℝ) (f : Space → V) (x : Space) : V := | |
| 49 | - ∑ i : Fin 3, average t (fun z => | |
| 50 | - fderiv ℝ (fun y => fderiv ℝ f y (EuclideanSpace.single i 1)) z | |
| 51 | - (EuclideanSpace.single i 1)) x | |
| 52 | - | |
| 53 | -/-- The explicit time-kernel integral equals one quarter of the sum of | |
| 54 | -the actual second spatial derivatives averaged against the same Gaussian. -/ | |
| 55 | -theorem timeIntegral_eq_secondAverage {t : ℝ} (ht : 0 < t) | |
| 56 | - (f : Space → V) (hf : ContDiff ℝ ∞ f) (C₀ C₁ C₂ : ℝ) | |
| 57 | - (h₀ : ∀ x, ‖f x‖ ≤ C₀) (h₁ : ∀ x, ‖fderiv ℝ f x‖ ≤ C₁) | |
| 58 | - (h₂ : ∀ x, ‖fderiv ℝ (fderiv ℝ f) x‖ ≤ C₂) (x : Space) : | |
| 59 | - (∫ y : Space, timeKernel t y • f (x+y)) = (1/4:ℝ) • secondAverage t f x := by | |
| 60 | - have hi (i : Fin 3) : Integrable (fun y : Space => | |
| 61 | - secondKernel t (EuclideanSpace.single i 1) (EuclideanSpace.single i 1) y • f (x+y)) := | |
| 62 | - integrable_kernel_smul _ (secondKernel_integrable ht _ _) _ | |
| 63 | - (hf.continuous.comp (continuous_const.add continuous_id)) C₀ (fun y => h₀ (x+y)) | |
| 64 | - simp_rw [timeKernel_second_sum, mul_smul, Finset.sum_smul] | |
| 65 | - rw [integral_smul, integral_finsetSum Finset.univ (fun i _ => hi i)] | |
| 66 | - congr 1 | |
| 67 | - apply Finset.sum_congr rfl | |
| 68 | - intro i _ | |
| 69 | - exact (average_second_identity ht f hf C₀ C₁ C₂ h₀ h₁ h₂ _ _ x).symm | |
| 70 | - | |
| 71 | -theorem average_hasDerivAt {t : ℝ} (ht : 0 < t) | |
| 72 | - (f : Space → V) (hf : ContDiff ℝ ∞ f) (C₀ C₁ C₂ : ℝ) | |
| 73 | - (h₀ : ∀ x, ‖f x‖ ≤ C₀) (h₁ : ∀ x, ‖fderiv ℝ f x‖ ≤ C₁) | |
| 74 | - (h₂ : ∀ x, ‖fderiv ℝ (fderiv ℝ f) x‖ ≤ C₂) (x : Space) : | |
| 75 | - HasDerivAt (fun s : ℝ => average s f x) ((1/4:ℝ) • secondAverage t f x) t := by | |
| 76 | - rw [← timeIntegral_eq_secondAverage ht f hf C₀ C₁ C₂ h₀ h₁ h₂ x] | |
| 77 | - exact average_hasDerivAt_kernel ht f hf.continuous C₀ h₀ x | |
| 78 | - | |
| 79 | -end EulerWholeSpaceGaussian | |
+371 −2 Euler/WholeSpaceGaussianFields.lean View file
| @@ -1,11 +1,380 @@ | ||
| 1 | -import Euler.WholeSpaceGaussianEvolution | |
| 2 | -import Euler.WholeSpaceGaussianLow | |
| 1 | +import Euler.WholeSpaceGaussianKernel | |
| 2 | +import Mathlib.Analysis.SpecialFunctions.Pow.Deriv | |
| 3 | +import Euler.WholeSpaceGaussianIntegration | |
| 4 | +import Mathlib.MeasureTheory.Measure.Haar.NormedSpace | |
| 3 | 5 | import Euler.MeanSobolevBoundedField |
| 4 | 6 | import Euler.OrdinaryH3Norms |
| 5 | 7 | import Euler.MeanHarmonicDerivatives |
| 6 | 8 | |
| 7 | 9 | /-! The heat estimates specialized to genuine ordinary smooth L² fields. -/ |
| 8 | 10 | |
| 11 | +/-! ## From `Euler/WholeSpaceGaussianTimeKernel.lean` | |
| 12 | + | |
| 13 | +The text of `Euler/WholeSpaceGaussianTimeKernel.lean`, folded into this file, which was its only importer. -/ | |
| 14 | + | |
| 15 | +section | |
| 16 | + | |
| 17 | +/-! The literal time derivative of the Gaussian density and local domination. -/ | |
| 18 | + | |
| 19 | +noncomputable section | |
| 20 | + | |
| 21 | +namespace EulerWholeSpaceGaussian | |
| 22 | + | |
| 23 | +open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set | |
| 24 | +open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 25 | + | |
| 26 | +def timeKernel (t : ℝ) (y : Space) : ℝ := | |
| 27 | + (t⁻¹^2*‖y‖^2-(3/2:ℝ)*t⁻¹)*kernel t y | |
| 28 | + | |
| 29 | +theorem normalization_hasDerivAt {t : ℝ} (ht : 0 < t) : | |
| 30 | + HasDerivAt normalization (-(3/2:ℝ)*t⁻¹*normalization t) t := by | |
| 31 | + have h := ((hasDerivAt_id t).const_mul Real.pi).rpow_const | |
| 32 | + (p := -(3:ℝ)/2) (Or.inl (mul_pos Real.pi_pos ht).ne') | |
| 33 | + change HasDerivAt normalization _ t at h | |
| 34 | + convert h using 1 | |
| 35 | + simp only [id_eq, mul_one] | |
| 36 | + rw [Real.rpow_sub_one (mul_pos Real.pi_pos ht).ne'] | |
| 37 | + unfold normalization | |
| 38 | + field_simp | |
| 39 | + | |
| 40 | +theorem kernel_hasDerivAt {t : ℝ} (ht : 0 < t) (y : Space) : | |
| 41 | + HasDerivAt (fun s : ℝ => kernel s y) (timeKernel t y) t := by | |
| 42 | + have h := (normalization_hasDerivAt ht).mul | |
| 43 | + (((hasDerivAt_inv ht.ne').neg.mul_const (‖y‖^2)).exp) | |
| 44 | + change HasDerivAt (fun s : ℝ => kernel s y) _ t at h | |
| 45 | + convert h using 1 | |
| 46 | + simp only [timeKernel, kernel, inv_pow, Pi.neg_apply, neg_neg] | |
| 47 | + ring | |
| 48 | + | |
| 49 | +theorem timeKernel_continuous (t : ℝ) : Continuous (timeKernel t) := by | |
| 50 | + unfold timeKernel | |
| 51 | + exact ((continuous_const.mul (continuous_norm.pow 2)).sub continuous_const).mul | |
| 52 | + (kernel_smooth t).continuous | |
| 53 | + | |
| 54 | +theorem timeKernel_second_sum (t : ℝ) (y : Space) : | |
| 55 | + timeKernel t y = (1/4:ℝ) * ∑ i : Fin 3, | |
| 56 | + secondKernel t (EuclideanSpace.single i 1) (EuclideanSpace.single i 1) y := by | |
| 57 | + simp [timeKernel, secondKernel, EuclideanSpace.inner_single_right, | |
| 58 | + EuclideanSpace.real_norm_sq_eq, Fin.sum_univ_three] | |
| 59 | + ring | |
| 60 | + | |
| 61 | +theorem timeKernel_bound {t : ℝ} (ht : 0 < t) (y : Space) : | |
| 62 | + ‖timeKernel t y‖ ≤ ((15/2:ℝ)*t⁻¹)*wideKernel t y := by | |
| 63 | + rw [timeKernel_second_sum, norm_mul, Real.norm_of_nonneg (by norm_num : (0:ℝ) ≤ 1/4)] | |
| 64 | + apply (mul_le_mul_of_nonneg_left (norm_sum_le _ _) (by norm_num : (0:ℝ) ≤ 1/4)).trans | |
| 65 | + have h (i : Fin 3) : | |
| 66 | + ‖secondKernel t (EuclideanSpace.single i 1) (EuclideanSpace.single i 1) y‖ ≤ | |
| 67 | + 10*t⁻¹*wideKernel t y := by | |
| 68 | + simpa only [PiLp.norm_single, norm_one, mul_one] using | |
| 69 | + secondKernel_bound ht (EuclideanSpace.single i 1) (EuclideanSpace.single i 1) y | |
| 70 | + have hb := Finset.sum_le_sum (fun i (_hi : i ∈ (Finset.univ : Finset (Fin 3))) => h i) | |
| 71 | + have hc := mul_le_mul_of_nonneg_left hb (by norm_num : (0:ℝ) ≤ 1/4) | |
| 72 | + apply hc.trans_eq | |
| 73 | + simp only [Fin.sum_univ_three] | |
| 74 | + ring | |
| 75 | + | |
| 76 | +def timeEnvelope (t : ℝ) (y : Space) : ℝ := | |
| 77 | + (15*t⁻¹*normalization (t/2))*Real.exp (-(4*t)⁻¹*‖y‖^2) | |
| 78 | + | |
| 79 | +theorem timeEnvelope_integrable {t : ℝ} (ht : 0 < t) : Integrable (timeEnvelope t) := | |
| 80 | + (exp_integrable (inv_pos.mpr (by positivity : 0 < 4*t))).const_mul _ | |
| 81 | + | |
| 82 | +theorem normalization_antitone {s t : ℝ} (hs : 0 < s) (hst : s ≤ t) : | |
| 83 | + normalization t ≤ normalization s := by | |
| 84 | + apply Real.rpow_le_rpow_of_nonpos (mul_pos Real.pi_pos hs) | |
| 85 | + · exact mul_le_mul_of_nonneg_left hst Real.pi_pos.le | |
| 86 | + · norm_num | |
| 87 | + | |
| 88 | +theorem timeKernel_local_bound {t : ℝ} (ht : 0 < t) (s : ℝ) | |
| 89 | + (hs : s ∈ Ioo (t/2) (2*t)) (y : Space) : | |
| 90 | + ‖timeKernel s y‖ ≤ timeEnvelope t y := by | |
| 91 | + have hhalf : 0 < t/2 := by positivity | |
| 92 | + have hspos : 0 < s := hhalf.trans hs.1 | |
| 93 | + have hn : normalization s ≤ normalization (t/2) := normalization_antitone hhalf hs.1.le | |
| 94 | + have hi : s⁻¹ ≤ (t/2)⁻¹ := inv_anti₀ hhalf hs.1.le | |
| 95 | + have hei : (4*t)⁻¹ ≤ (2*s)⁻¹ := inv_anti₀ (by positivity) (by linarith [hs.2]) | |
| 96 | + have he : Real.exp (-(2*s)⁻¹*‖y‖^2) ≤ Real.exp (-(4*t)⁻¹*‖y‖^2) := by | |
| 97 | + apply Real.exp_le_exp.mpr | |
| 98 | + nlinarith [sq_nonneg ‖y‖] | |
| 99 | + apply (timeKernel_bound hspos y).trans | |
| 100 | + change ((15/2:ℝ)*s⁻¹)*(normalization s*Real.exp (-(2*s)⁻¹*‖y‖^2)) ≤ _ | |
| 101 | + calc | |
| 102 | + _ ≤ ((15/2:ℝ)*(t/2)⁻¹)*(normalization (t/2)*Real.exp (-(4*t)⁻¹*‖y‖^2)) := by | |
| 103 | + apply mul_le_mul | |
| 104 | + · exact mul_le_mul_of_nonneg_left hi (by norm_num) | |
| 105 | + · exact mul_le_mul hn he (Real.exp_pos _).le (normalization_pos hhalf).le | |
| 106 | + · exact mul_nonneg (normalization_pos hspos).le (Real.exp_pos _).le | |
| 107 | + · positivity | |
| 108 | + _ = _ := by unfold timeEnvelope; field_simp | |
| 109 | + | |
| 110 | +end EulerWholeSpaceGaussian | |
| 111 | +end | |
| 112 | + | |
| 113 | +end | |
| 114 | + | |
| 115 | +/-! ## From `Euler/WholeSpaceGaussianLow.lean` | |
| 116 | + | |
| 117 | +The text of `Euler/WholeSpaceGaussianLow.lean`, folded into this file, which was its only importer. -/ | |
| 118 | + | |
| 119 | +section | |
| 120 | + | |
| 121 | +/-! The low-frequency derivative of the true Gaussian average is controlled | |
| 122 | +by the ordinary L² norm of the original field. -/ | |
| 123 | + | |
| 124 | +noncomputable section | |
| 125 | + | |
| 126 | +namespace EulerWholeSpaceGaussian | |
| 127 | + | |
| 128 | +open MeasureTheory InnerProductSpace EulerSmoothLimit Filter | |
| 129 | +open scoped ContDiff ENNReal RealInnerProductSpace | |
| 130 | + | |
| 131 | +theorem firstKernel_sq_bound {t : ℝ} (ht : 0 < t) (a y : Space) : | |
| 132 | + ‖firstKernel t a y‖^2 ≤ | |
| 133 | + (8*t⁻¹*normalization t*‖a‖^2)*wideKernel t y := by | |
| 134 | + have hi : ‖⟪y,a⟫_ℝ‖^2 ≤ ‖y‖^2*‖a‖^2 := by | |
| 135 | + have h : ‖⟪y,a⟫_ℝ‖ ≤ ‖y‖*‖a‖ := norm_inner_le_norm y a | |
| 136 | + simpa only [mul_pow] using pow_le_pow_left₀ (norm_nonneg ⟪y,a⟫_ℝ) h 2 | |
| 137 | + have hk : kernel t y ^ 2 ≤ normalization t * kernel t y := by | |
| 138 | + rw [pow_two] | |
| 139 | + exact mul_le_mul_of_nonneg_right (kernel_le_normalization ht y) (kernel_nonneg ht y) | |
| 140 | + calc | |
| 141 | + _ = 4*t⁻¹^2*‖⟪y,a⟫_ℝ‖^2*(kernel t y)^2 := by | |
| 142 | + simp only [firstKernel, norm_mul, norm_neg, Real.norm_ofNat, | |
| 143 | + Real.norm_of_nonneg (inv_pos.mpr ht).le, Real.norm_of_nonneg (kernel_nonneg ht y)] | |
| 144 | + ring | |
| 145 | + _ ≤ 4*t⁻¹^2*(‖y‖^2*‖a‖^2)*(normalization t*kernel t y) := by | |
| 146 | + apply mul_le_mul | |
| 147 | + · exact mul_le_mul_of_nonneg_left hi (by positivity) | |
| 148 | + · exact hk | |
| 149 | + · positivity | |
| 150 | + · positivity | |
| 151 | + _ = (4*t⁻¹^2*normalization t*‖a‖^2)*(‖y‖^2*kernel t y) := by ring | |
| 152 | + _ ≤ (4*t⁻¹^2*normalization t*‖a‖^2)*(2*t*wideKernel t y) := | |
| 153 | + mul_le_mul_of_nonneg_left (norm_sq_kernel_le ht y) | |
| 154 | + (by have := (normalization_pos ht).le; positivity) | |
| 155 | + _ = _ := by field_simp; ring | |
| 156 | + | |
| 157 | +theorem firstKernel_memLp {t : ℝ} (ht : 0 < t) (a : Space) : | |
| 158 | + MemLp (firstKernel t a) 2 volume := by | |
| 159 | + apply (memLp_two_iff_integrable_sq_norm | |
| 160 | + (firstKernel_smooth t a).continuous.aestronglyMeasurable).2 | |
| 161 | + apply ((wideKernel_integrable ht).const_mul | |
| 162 | + (8*t⁻¹*normalization t*‖a‖^2)).mono' | |
| 163 | + (((firstKernel_smooth t a).continuous.norm).pow 2).aestronglyMeasurable | |
| 164 | + exact Eventually.of_forall (fun y => by | |
| 165 | + change ‖‖firstKernel t a y‖^2‖ ≤ _ | |
| 166 | + rw [Real.norm_of_nonneg (sq_nonneg _)] | |
| 167 | + exact firstKernel_sq_bound ht a y) | |
| 168 | + | |
| 169 | +theorem integral_firstKernel_sq_bound {t : ℝ} (ht : 0 < t) (a : Space) : | |
| 170 | + (∫ y : Space, ‖firstKernel t a y‖^2) ≤ | |
| 171 | + (8*normalization t*(2:ℝ)^((3:ℝ)/2))*t⁻¹*‖a‖^2 := by | |
| 172 | + calc | |
| 173 | + _ ≤ ∫ y : Space, (8*t⁻¹*normalization t*‖a‖^2)*wideKernel t y := | |
| 174 | + integral_mono ((memLp_two_iff_integrable_sq_norm | |
| 175 | + (firstKernel_smooth t a).continuous.aestronglyMeasurable).1 (firstKernel_memLp ht a)) | |
| 176 | + ((wideKernel_integrable ht).const_mul _) (firstKernel_sq_bound ht a) | |
| 177 | + _ = _ := by rw [integral_const_mul, integral_wideKernel ht]; ring | |
| 178 | + | |
| 179 | +def lowCost : ℝ := Real.sqrt (8*normalization 1*(2:ℝ)^((3:ℝ)/2)) | |
| 180 | + | |
| 181 | +theorem lowCost_nonneg : 0 ≤ lowCost := Real.sqrt_nonneg _ | |
| 182 | + | |
| 183 | +theorem firstKernel_one_L2_bound (a : Space) : | |
| 184 | + Real.sqrt (∫ y : Space, ‖firstKernel 1 a y‖^2) ≤ lowCost*‖a‖ := by | |
| 185 | + have h := Real.sqrt_le_sqrt (integral_firstKernel_sq_bound (by norm_num : (0:ℝ)<1) a) | |
| 186 | + simpa only [inv_one, mul_one, Real.sqrt_mul (by | |
| 187 | + have := normalization_pos (by norm_num : (0:ℝ)<1) | |
| 188 | + positivity : 0 ≤ 8*normalization 1*(2:ℝ)^((3:ℝ)/2)), | |
| 189 | + Real.sqrt_sq (norm_nonneg a), lowCost] using h | |
| 190 | + | |
| 191 | +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] | |
| 192 | + | |
| 193 | +theorem average_first_L2_bound (f : Space → V) (hf : ContDiff ℝ ∞ f) | |
| 194 | + (hLp : MemLp f 2 volume) (C₀ C₁ : ℝ) | |
| 195 | + (h₀ : ∀ x, ‖f x‖ ≤ C₀) (h₁ : ∀ x, ‖fderiv ℝ f x‖ ≤ C₁) (a x : Space) : | |
| 196 | + ‖average 1 (fun y => fderiv ℝ f y a) x‖ ≤ | |
| 197 | + lowCost*‖a‖*(eLpNorm f 2 volume).toReal := by | |
| 198 | + rw [average_first_identity (by norm_num : (0:ℝ)<1) f hf C₀ C₁ h₀ h₁ a x, norm_neg] | |
| 199 | + have hmp := measurePreserving_add_left (volume : Measure Space) x | |
| 200 | + have hs : MemLp (fun y : Space => f (x+y)) 2 volume := hLp.comp_measurePreserving hmp | |
| 201 | + have he : eLpNorm (fun y : Space => f (x+y)) 2 volume = eLpNorm f 2 volume := | |
| 202 | + eLpNorm_comp_measurePreserving hLp.aestronglyMeasurable hmp | |
| 203 | + have h := norm_integral_smul_le (firstKernel 1 a) (fun y : Space => f (x+y)) | |
| 204 | + (firstKernel_memLp (by norm_num : (0:ℝ)<1) a) hs | |
| 205 | + rw [he] at h | |
| 206 | + exact h.trans (mul_le_mul_of_nonneg_right (firstKernel_one_L2_bound a) ENNReal.toReal_nonneg) | |
| 207 | + | |
| 208 | +end EulerWholeSpaceGaussian | |
| 209 | +end | |
| 210 | + | |
| 211 | +end | |
| 212 | + | |
| 213 | +/-! ## From `Euler/WholeSpaceGaussianScale.lean` | |
| 214 | + | |
| 215 | +The text of `Euler/WholeSpaceGaussianScale.lean`, folded into this file, which was its only importer. -/ | |
| 216 | + | |
| 217 | +section | |
| 218 | + | |
| 219 | +/-! The same Gaussian average as a continuous dilation of a fixed kernel. -/ | |
| 220 | + | |
| 221 | +noncomputable section | |
| 222 | + | |
| 223 | +namespace EulerWholeSpaceGaussian | |
| 224 | + | |
| 225 | +open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set | |
| 226 | +open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 227 | + | |
| 228 | +theorem normalization_sq {c : ℝ} (hc : 0 < c) : | |
| 229 | + normalization (c^2) = (c^3)⁻¹*normalization 1 := by | |
| 230 | + unfold normalization | |
| 231 | + rw [mul_one, Real.mul_rpow Real.pi_pos.le (sq_nonneg c)] | |
| 232 | + have h : (c^2)^(-(3:ℝ)/2) = (c^3)⁻¹ := by | |
| 233 | + rw [← Real.rpow_natCast, ← Real.rpow_mul hc.le] | |
| 234 | + norm_num [Real.rpow_neg, Real.rpow_natCast] | |
| 235 | + rw [h, mul_comm] | |
| 236 | + | |
| 237 | +theorem kernel_sq_smul {c : ℝ} (hc : 0 < c) (y : Space) : | |
| 238 | + kernel (c^2) (c • y) = (c^3)⁻¹*kernel 1 y := by | |
| 239 | + unfold kernel | |
| 240 | + rw [normalization_sq hc, norm_smul, Real.norm_of_nonneg hc.le, mul_pow] | |
| 241 | + have he : -(c^2)⁻¹*(c^2*‖y‖^2) = -(1:ℝ)⁻¹*‖y‖^2 := by field_simp | |
| 242 | + rw [he] | |
| 243 | + ring | |
| 244 | + | |
| 245 | +section Averaging | |
| 246 | + | |
| 247 | +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] | |
| 248 | + | |
| 249 | +/-- This formula continues the actual heat average to t=0 by dilation. -/ | |
| 250 | +def scaledAverage (t : ℝ) (f : Space → V) (x : Space) : V := | |
| 251 | + ∫ y : Space, kernel 1 y • f (x+Real.sqrt t • y) | |
| 252 | + | |
| 253 | +theorem scaledAverage_eq {t : ℝ} (ht : 0 < t) (f : Space → V) (x : Space) : | |
| 254 | + scaledAverage t f x = average t f x := by | |
| 255 | + have hc : 0 < Real.sqrt t := Real.sqrt_pos.mpr ht | |
| 256 | + have he (y : Space) : kernel t (Real.sqrt t • y) = | |
| 257 | + (Real.sqrt t ^ 3)⁻¹*kernel 1 y := by | |
| 258 | + simpa only [Real.sq_sqrt ht.le] using kernel_sq_smul hc y | |
| 259 | + have h := Measure.integral_comp_smul_of_nonneg (volume : Measure Space) | |
| 260 | + (fun y : Space => kernel t y • f (x+y)) (Real.sqrt t) (hR := hc.le) | |
| 261 | + have hdim : Module.finrank ℝ Space = 3 := by simp [Space] | |
| 262 | + simp only [he, mul_smul, integral_smul, hdim] at h | |
| 263 | + change (Real.sqrt t ^ 3)⁻¹ • scaledAverage t f x = | |
| 264 | + (Real.sqrt t ^ 3)⁻¹ • average t f x at h | |
| 265 | + exact (smul_right_injective V (inv_ne_zero (pow_ne_zero 3 hc.ne'))).eq_iff.mp h | |
| 266 | + | |
| 267 | +theorem scaledAverage_zero [CompleteSpace V] (f : Space → V) (x : Space) : scaledAverage 0 f x = f x := by | |
| 268 | + simp only [scaledAverage, Real.sqrt_zero, zero_smul, add_zero, integral_smul_const, | |
| 269 | + integral_kernel (by norm_num : (0:ℝ) < 1), one_smul] | |
| 270 | + | |
| 271 | +theorem scaledAverage_continuous (f : Space → V) (hf : Continuous f) | |
| 272 | + (C : ℝ) (hb : ∀ x, ‖f x‖ ≤ C) (x : Space) : | |
| 273 | + Continuous (fun t : ℝ => scaledAverage t f x) := by | |
| 274 | + apply continuous_of_dominated (bound := fun y : Space => kernel 1 y*C) | |
| 275 | + · intro t | |
| 276 | + exact ((kernel_smooth 1).continuous.smul | |
| 277 | + (hf.comp (show Continuous (fun y : Space => x+Real.sqrt t • y) by fun_prop))).aestronglyMeasurable | |
| 278 | + · intro t | |
| 279 | + exact Eventually.of_forall (fun y => by | |
| 280 | + rw [norm_smul, Real.norm_of_nonneg (kernel_nonneg (by norm_num) y)] | |
| 281 | + exact mul_le_mul_of_nonneg_left (hb _) (kernel_nonneg (by norm_num) y)) | |
| 282 | + · exact (kernel_integrable (by norm_num : (0:ℝ)<1)).mul_const C | |
| 283 | + · exact Eventually.of_forall (fun y => | |
| 284 | + continuous_const.smul (hf.comp | |
| 285 | + (show Continuous (fun t : ℝ => x+Real.sqrt t • y) by fun_prop))) | |
| 286 | + | |
| 287 | +end Averaging | |
| 288 | +end EulerWholeSpaceGaussian | |
| 289 | +end | |
| 290 | + | |
| 291 | +end | |
| 292 | + | |
| 293 | +/-! ## From `Euler/WholeSpaceGaussianEvolution.lean` | |
| 294 | + | |
| 295 | +The text of `Euler/WholeSpaceGaussianEvolution.lean`, folded into this file, which was its only importer. -/ | |
| 296 | + | |
| 297 | +section | |
| 298 | + | |
| 299 | +/-! The true heat-time evolution of Gaussian averaging on ordinary space. -/ | |
| 300 | + | |
| 301 | +noncomputable section | |
| 302 | + | |
| 303 | +namespace EulerWholeSpaceGaussian | |
| 304 | + | |
| 305 | +open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set ContinuousLinearMap | |
| 306 | +open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 307 | + | |
| 308 | +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] | |
| 309 | + | |
| 310 | +/-- Differentiating the explicit kernel under its ordinary Bochner integral. -/ | |
| 311 | +theorem average_hasDerivAt_kernel {t : ℝ} (ht : 0 < t) | |
| 312 | + (f : Space → V) (hf : Continuous f) (C₀ : ℝ) | |
| 313 | + (h₀ : ∀ x, ‖f x‖ ≤ C₀) (x : Space) : | |
| 314 | + HasDerivAt (fun s : ℝ => average s f x) | |
| 315 | + (∫ y : Space, timeKernel t y • f (x+y)) t := by | |
| 316 | + have hC₀ : 0 ≤ C₀ := (norm_nonneg (f x)).trans (h₀ x) | |
| 317 | + let F : ℝ → Space → V := fun s y => kernel s y • f (x+y) | |
| 318 | + let F' : ℝ → Space → V := fun s y => timeKernel s y • f (x+y) | |
| 319 | + have hF (s : ℝ) : AEStronglyMeasurable (F s) volume := | |
| 320 | + ((kernel_smooth s).continuous.smul (hf.comp (continuous_const.add continuous_id))).aestronglyMeasurable | |
| 321 | + have hFd : AEStronglyMeasurable (F' t) volume := | |
| 322 | + ((timeKernel_continuous t).smul (hf.comp (continuous_const.add continuous_id))).aestronglyMeasurable | |
| 323 | + have hb (y : Space) (s : ℝ) (hs : s ∈ Ioo (t/2) (2*t)) : | |
| 324 | + ‖F' s y‖ ≤ timeEnvelope t y*C₀ := by | |
| 325 | + change ‖timeKernel s y • f (x+y)‖ ≤ _ | |
| 326 | + rw [norm_smul] | |
| 327 | + apply mul_le_mul (timeKernel_local_bound ht s hs y) (h₀ (x+y)) (norm_nonneg _) | |
| 328 | + unfold timeEnvelope | |
| 329 | + have hp := normalization_pos (by positivity : 0 < t/2) | |
| 330 | + positivity | |
| 331 | + have hd (y : Space) (s : ℝ) (hs : s ∈ Ioo (t/2) (2*t)) : | |
| 332 | + HasDerivAt (fun r => F r y) (F' s y) s := | |
| 333 | + (kernel_hasDerivAt (by linarith [hs.1] : 0 < s) y).smul_const (f (x+y)) | |
| 334 | + have h := hasDerivAt_integral_of_dominated_loc_of_deriv_le | |
| 335 | + (F := F) (F' := F') (bound := fun y : Space => timeEnvelope t y*C₀) | |
| 336 | + (Ioo_mem_nhds (by linarith : t/2 < t) (by linarith : t < 2*t)) | |
| 337 | + (Eventually.of_forall hF) (average_integrable_of_bound ht f hf C₀ h₀ x) hFd | |
| 338 | + (Eventually.of_forall hb) ((timeEnvelope_integrable ht).mul_const C₀) | |
| 339 | + (Eventually.of_forall hd) | |
| 340 | + exact h.2 | |
| 341 | + | |
| 342 | +def secondAverage (t : ℝ) (f : Space → V) (x : Space) : V := | |
| 343 | + ∑ i : Fin 3, average t (fun z => | |
| 344 | + fderiv ℝ (fun y => fderiv ℝ f y (EuclideanSpace.single i 1)) z | |
| 345 | + (EuclideanSpace.single i 1)) x | |
| 346 | + | |
| 347 | +/-- The explicit time-kernel integral equals one quarter of the sum of | |
| 348 | +the actual second spatial derivatives averaged against the same Gaussian. -/ | |
| 349 | +theorem timeIntegral_eq_secondAverage {t : ℝ} (ht : 0 < t) | |
| 350 | + (f : Space → V) (hf : ContDiff ℝ ∞ f) (C₀ C₁ C₂ : ℝ) | |
| 351 | + (h₀ : ∀ x, ‖f x‖ ≤ C₀) (h₁ : ∀ x, ‖fderiv ℝ f x‖ ≤ C₁) | |
| 352 | + (h₂ : ∀ x, ‖fderiv ℝ (fderiv ℝ f) x‖ ≤ C₂) (x : Space) : | |
| 353 | + (∫ y : Space, timeKernel t y • f (x+y)) = (1/4:ℝ) • secondAverage t f x := by | |
| 354 | + have hi (i : Fin 3) : Integrable (fun y : Space => | |
| 355 | + secondKernel t (EuclideanSpace.single i 1) (EuclideanSpace.single i 1) y • f (x+y)) := | |
| 356 | + integrable_kernel_smul _ (secondKernel_integrable ht _ _) _ | |
| 357 | + (hf.continuous.comp (continuous_const.add continuous_id)) C₀ (fun y => h₀ (x+y)) | |
| 358 | + simp_rw [timeKernel_second_sum, mul_smul, Finset.sum_smul] | |
| 359 | + rw [integral_smul, integral_finsetSum Finset.univ (fun i _ => hi i)] | |
| 360 | + congr 1 | |
| 361 | + apply Finset.sum_congr rfl | |
| 362 | + intro i _ | |
| 363 | + exact (average_second_identity ht f hf C₀ C₁ C₂ h₀ h₁ h₂ _ _ x).symm | |
| 364 | + | |
| 365 | +theorem average_hasDerivAt {t : ℝ} (ht : 0 < t) | |
| 366 | + (f : Space → V) (hf : ContDiff ℝ ∞ f) (C₀ C₁ C₂ : ℝ) | |
| 367 | + (h₀ : ∀ x, ‖f x‖ ≤ C₀) (h₁ : ∀ x, ‖fderiv ℝ f x‖ ≤ C₁) | |
| 368 | + (h₂ : ∀ x, ‖fderiv ℝ (fderiv ℝ f) x‖ ≤ C₂) (x : Space) : | |
| 369 | + HasDerivAt (fun s : ℝ => average s f x) ((1/4:ℝ) • secondAverage t f x) t := by | |
| 370 | + rw [← timeIntegral_eq_secondAverage ht f hf C₀ C₁ C₂ h₀ h₁ h₂ x] | |
| 371 | + exact average_hasDerivAt_kernel ht f hf.continuous C₀ h₀ x | |
| 372 | + | |
| 373 | +end EulerWholeSpaceGaussian | |
| 374 | +end | |
| 375 | + | |
| 376 | +end | |
| 377 | + | |
| 9 | 378 | noncomputable section |
| 10 | 379 | |
| 11 | 380 | namespace EulerWholeSpaceGaussian |
+0 −56 Euler/WholeSpaceGaussianHigh.lean deleted
| @@ -1,56 +0,0 @@ | ||
| 1 | -import Euler.WholeSpaceGaussianFields | |
| 2 | -import Mathlib.MeasureTheory.Integral.IntervalIntegral.DistLEIntegral | |
| 3 | -import Mathlib.Analysis.SpecialFunctions.Integrals.Basic | |
| 4 | - | |
| 5 | -/-! The small-time heat remainder from genuine third spatial L² derivatives. -/ | |
| 6 | - | |
| 7 | -noncomputable section | |
| 8 | - | |
| 9 | -namespace EulerWholeSpaceGaussian | |
| 10 | - | |
| 11 | -open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set ContinuousLinearMap | |
| 12 | - EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSobolevBoundedField | |
| 13 | - EulerOrdinarySobolev EulerVectorCalculus | |
| 14 | -open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 15 | - | |
| 16 | -variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [FiniteDimensional ℝ V] | |
| 17 | - | |
| 18 | -/-- The heat remainder of one actual spatial derivative is O(ε^(1/4)) | |
| 19 | -times the third spatial L² tensor. No Hölder or heat estimate is assumed. -/ | |
| 20 | -theorem derivative_high_remainder (A : SmoothL2Field V) (j : Fin 3) (x : Space) | |
| 21 | - {ε : ℝ} (hε : 0 < ε) : | |
| 22 | - ‖fderiv ℝ A.field x (axis j) - | |
| 23 | - average ε (A.directionalField (axis j)).field x‖ ≤ | |
| 24 | - 3*ε^((1:ℝ)/4)*‖A.jetLp 3‖ := by | |
| 25 | - let D := A.directionalField (axis j) | |
| 26 | - let F : ℝ → V := fun t => scaledAverage t D.field x | |
| 27 | - let B : ℝ → ℝ := fun t => (3/4:ℝ)*t^(-(3:ℝ)/4)*‖A.jetLp 3‖ | |
| 28 | - have hc : Continuous F := scaledAverage_continuous D.field D.smooth.continuous | |
| 29 | - ‖finiteField D‖ (field_sup_bound D) x | |
| 30 | - have hd (t : ℝ) (ht : t ∈ Ioo 0 ε) : | |
| 31 | - HasDerivAt F ((1/4:ℝ) • secondAverage t D.field x) t := | |
| 32 | - scaledAverage_field_hasDerivAt ht.1 D x | |
| 33 | - have hb (t : ℝ) (ht : t ∈ Ioo 0 ε) : ‖deriv F t‖ ≤ B t := by | |
| 34 | - rw [(hd t ht).deriv, norm_smul, Real.norm_of_nonneg (by norm_num : (0:ℝ) ≤ 1/4)] | |
| 35 | - have h := mul_le_mul_of_nonneg_left (secondAverage_directional_bound ht.1 A j x) | |
| 36 | - (by norm_num : (0:ℝ) ≤ 1/4) | |
| 37 | - exact h.trans_eq (by dsimp [B]; ring) | |
| 38 | - have hbi : IntervalIntegrable B volume 0 ε := | |
| 39 | - ((intervalIntegral.intervalIntegrable_rpow' (by norm_num : (-1:ℝ) < -(3:ℝ)/4)).const_mul | |
| 40 | - (3/4:ℝ)).mul_const ‖A.jetLp 3‖ | |
| 41 | - have h := norm_sub_le_integral_of_norm_deriv_le_of_le hε.le hc.continuousOn | |
| 42 | - (fun t ht => (hd t ht).differentiableAt.differentiableWithinAt) | |
| 43 | - (Eventually.of_forall hb) hbi | |
| 44 | - have he : (∫ t in (0:ℝ)..ε, B t) = 3*ε^((1:ℝ)/4)*‖A.jetLp 3‖ := by | |
| 45 | - dsimp [B] | |
| 46 | - rw [intervalIntegral.integral_mul_const, intervalIntegral.integral_const_mul, | |
| 47 | - integral_rpow (Or.inl (by norm_num : (-1:ℝ) < -(3:ℝ)/4))] | |
| 48 | - rw [show -(3:ℝ)/4+1=(1:ℝ)/4 by norm_num, | |
| 49 | - Real.zero_rpow (by norm_num : (1:ℝ)/4 ≠ 0)] | |
| 50 | - ring | |
| 51 | - rw [he] at h | |
| 52 | - change ‖scaledAverage ε D.field x-scaledAverage 0 D.field x‖ ≤ _ at h | |
| 53 | - rw [scaledAverage_eq hε, scaledAverage_zero, norm_sub_rev] at h | |
| 54 | - exact h | |
| 55 | - | |
| 56 | -end EulerWholeSpaceGaussian | |
+174 −1 Euler/WholeSpaceGaussianKernel.lean View file
| @@ -1,8 +1,181 @@ | ||
| 1 | -import Euler.WholeSpaceGaussian | |
| 1 | +import Euler.LpSmoothField | |
| 2 | +import Euler.LpParameterIntegral | |
| 3 | +import Mathlib.Analysis.SpecialFunctions.Gaussian.FourierTransform | |
| 4 | +import Mathlib.MeasureTheory.Function.LpSeminorm.LpNorm | |
| 2 | 5 | import Mathlib.MeasureTheory.Integral.IntegralEqImproper |
| 3 | 6 | |
| 4 | 7 | /-! Actual first and second Gaussian kernels and their integrable bounds. -/ |
| 5 | 8 | |
| 9 | +/-! ## From `Euler/WholeSpaceGaussian.lean` | |
| 10 | + | |
| 11 | +The text of `Euler/WholeSpaceGaussian.lean`, folded into this file, which was its only importer. -/ | |
| 12 | + | |
| 13 | +section | |
| 14 | + | |
| 15 | +/-! | |
| 16 | +The normalized Gaussian on ordinary three-dimensional space. The estimates | |
| 17 | +below concern the literal Bochner integral, including its L²-to-uniform bound. | |
| 18 | +The parameterization exp(-|x|²/t) has heat generator one quarter of the Laplacian. | |
| 19 | +-/ | |
| 20 | + | |
| 21 | +noncomputable section | |
| 22 | + | |
| 23 | +namespace EulerWholeSpaceGaussian | |
| 24 | + | |
| 25 | +open MeasureTheory InnerProductSpace EulerSmoothLimit EulerLpTranslation Filter | |
| 26 | +open scoped ContDiff ENNReal RealInnerProductSpace | |
| 27 | + | |
| 28 | +def normalization (t : ℝ) : ℝ := (Real.pi*t)^(-(3:ℝ)/2) | |
| 29 | + | |
| 30 | +def kernel (t : ℝ) (x : Space) : ℝ := | |
| 31 | + normalization t * Real.exp (-t⁻¹*‖x‖^2) | |
| 32 | + | |
| 33 | +theorem normalization_pos {t : ℝ} (ht : 0 < t) : 0 < normalization t := | |
| 34 | + Real.rpow_pos_of_pos (mul_pos Real.pi_pos ht) _ | |
| 35 | + | |
| 36 | +theorem kernel_pos {t : ℝ} (ht : 0 < t) (x : Space) : 0 < kernel t x := | |
| 37 | + mul_pos (normalization_pos ht) (Real.exp_pos _) | |
| 38 | + | |
| 39 | +theorem kernel_nonneg {t : ℝ} (ht : 0 < t) (x : Space) : 0 ≤ kernel t x := | |
| 40 | + (kernel_pos ht x).le | |
| 41 | + | |
| 42 | +theorem kernel_le_normalization {t : ℝ} (ht : 0 < t) (x : Space) : | |
| 43 | + kernel t x ≤ normalization t := by | |
| 44 | + unfold kernel | |
| 45 | + apply mul_le_of_le_one_right (normalization_pos ht).le | |
| 46 | + exact Real.exp_le_one_iff.mpr (mul_nonpos_of_nonpos_of_nonneg | |
| 47 | + (neg_nonpos.mpr (inv_pos.mpr ht).le) (sq_nonneg ‖x‖)) | |
| 48 | + | |
| 49 | +theorem kernel_smooth (t : ℝ) : ContDiff ℝ ∞ (kernel t) := by | |
| 50 | + unfold kernel | |
| 51 | + have hn : ContDiff ℝ ∞ (fun x : Space => ‖x‖^2) := contDiff_id.norm_sq ℝ | |
| 52 | + exact contDiff_const.mul ((contDiff_const.mul hn).exp) | |
| 53 | + | |
| 54 | +theorem exp_integrable {b : ℝ} (hb : 0 < b) : | |
| 55 | + Integrable (fun x : Space => Real.exp (-b*‖x‖^2)) := by | |
| 56 | + have h := (GaussianFourier.integrable_cexp_neg_mul_sq_norm_add | |
| 57 | + (V := Space) (b := (b : ℂ)) (by simpa using hb) 0 0).re | |
| 58 | + change Integrable (fun x : Space => (Complex.exp | |
| 59 | + (-(b : ℂ)*‖x‖^2 + 0*inner ℝ (0 : Space) x)).re) at h | |
| 60 | + simpa only [zero_mul, add_zero, ← Complex.ofReal_pow, ← Complex.ofReal_mul, | |
| 61 | + ← Complex.ofReal_neg, ← Complex.ofReal_exp, Complex.ofReal_re] using h | |
| 62 | + | |
| 63 | +theorem kernel_integrable {t : ℝ} (ht : 0 < t) : Integrable (kernel t) := | |
| 64 | + (exp_integrable (inv_pos.mpr ht)).const_mul _ | |
| 65 | + | |
| 66 | +theorem integral_kernel {t : ℝ} (ht : 0 < t) : | |
| 67 | + (∫ x : Space, kernel t x) = 1 := by | |
| 68 | + have hdim : Module.finrank ℝ Space = 3 := by simp [Space] | |
| 69 | + simp only [kernel] | |
| 70 | + rw [integral_const_mul, | |
| 71 | + GaussianFourier.integral_rexp_neg_mul_sq_norm (inv_pos.mpr ht), hdim] | |
| 72 | + simp only [Nat.cast_ofNat, div_inv_eq_mul] | |
| 73 | + unfold normalization | |
| 74 | + rw [← Real.rpow_add (mul_pos Real.pi_pos ht)] | |
| 75 | + norm_num | |
| 76 | + | |
| 77 | +theorem kernel_sq_integrable {t : ℝ} (ht : 0 < t) : | |
| 78 | + Integrable (fun x : Space => kernel t x ^ 2) := by | |
| 79 | + apply ((kernel_integrable ht).const_mul (normalization t)).mono' | |
| 80 | + ((kernel_smooth t).continuous.pow 2).aestronglyMeasurable | |
| 81 | + apply Eventually.of_forall | |
| 82 | + intro x | |
| 83 | + change ‖kernel t x ^ 2‖ ≤ normalization t * kernel t x | |
| 84 | + rw [Real.norm_of_nonneg (sq_nonneg _), pow_two] | |
| 85 | + exact mul_le_mul_of_nonneg_right (kernel_le_normalization ht x) (kernel_nonneg ht x) | |
| 86 | + | |
| 87 | +theorem kernel_memLp {t : ℝ} (ht : 0 < t) : MemLp (kernel t) 2 volume := | |
| 88 | + (memLp_two_iff_integrable_sq (kernel_smooth t).continuous.aestronglyMeasurable).2 | |
| 89 | + (kernel_sq_integrable ht) | |
| 90 | + | |
| 91 | +theorem integral_kernel_sq_le {t : ℝ} (ht : 0 < t) : | |
| 92 | + (∫ x : Space, kernel t x ^ 2) ≤ normalization t := by | |
| 93 | + calc | |
| 94 | + _ ≤ ∫ x : Space, normalization t * kernel t x := | |
| 95 | + integral_mono (kernel_sq_integrable ht) ((kernel_integrable ht).const_mul _) | |
| 96 | + (fun x => by | |
| 97 | + rw [pow_two] | |
| 98 | + exact mul_le_mul_of_nonneg_right (kernel_le_normalization ht x) (kernel_nonneg ht x)) | |
| 99 | + _ = normalization t := by rw [integral_const_mul, integral_kernel ht, mul_one] | |
| 100 | + | |
| 101 | +theorem sqrt_normalization {t : ℝ} (ht : 0 < t) : | |
| 102 | + Real.sqrt (normalization t) = (Real.pi*t)^(-(3:ℝ)/4) := by | |
| 103 | + rw [Real.sqrt_eq_rpow, normalization, ← Real.rpow_mul (mul_pos Real.pi_pos ht).le] | |
| 104 | + norm_num | |
| 105 | + | |
| 106 | +theorem sqrt_normalization_le {t : ℝ} (ht : 0 < t) : | |
| 107 | + Real.sqrt (normalization t) ≤ t^(-(3:ℝ)/4) := by | |
| 108 | + rw [sqrt_normalization ht] | |
| 109 | + apply Real.rpow_le_rpow_of_nonpos ht | |
| 110 | + · nlinarith [Real.pi_pos, Real.two_le_pi] | |
| 111 | + · norm_num | |
| 112 | + | |
| 113 | +section Averaging | |
| 114 | + | |
| 115 | +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] | |
| 116 | + | |
| 117 | +/-- The actual whole-space Gaussian average, with no periodic identification. -/ | |
| 118 | +def average (t : ℝ) (f : Space → V) (x : Space) : V := | |
| 119 | + ∫ y : Space, kernel t y • f (x+y) | |
| 120 | + | |
| 121 | +theorem average_integrable_of_bound {t : ℝ} (ht : 0 < t) | |
| 122 | + (f : Space → V) (hf : Continuous f) (C : ℝ) (hb : ∀ x, ‖f x‖ ≤ C) (x : Space) : | |
| 123 | + Integrable (fun y : Space => kernel t y • f (x+y)) := by | |
| 124 | + apply ((kernel_integrable ht).mul_const C).mono' | |
| 125 | + (((kernel_smooth t).continuous.smul (hf.comp (continuous_const.add continuous_id))).aestronglyMeasurable) | |
| 126 | + apply Eventually.of_forall | |
| 127 | + intro y | |
| 128 | + change ‖kernel t y • f (x+y)‖ ≤ kernel t y * C | |
| 129 | + rw [norm_smul, Real.norm_of_nonneg (kernel_nonneg ht y)] | |
| 130 | + exact mul_le_mul_of_nonneg_left (hb _) (kernel_nonneg ht y) | |
| 131 | + | |
| 132 | +/-- Cauchy--Schwarz for scalar multiplication, in a form that retains the | |
| 133 | +ordinary L² norm of a Banach-valued field. -/ | |
| 134 | +theorem norm_integral_smul_le (k : Space → ℝ) (f : Space → V) | |
| 135 | + (hk : MemLp k 2 volume) (hf : MemLp f 2 volume) : | |
| 136 | + ‖∫ x : Space, k x • f x‖ ≤ | |
| 137 | + Real.sqrt (∫ x : Space, ‖k x‖^2) * (eLpNorm f 2 volume).toReal := by | |
| 138 | + have hp : (2:ℝ).HolderConjugate 2 := by norm_num [Real.holderConjugate_iff] | |
| 139 | + have hk' : MemLp (fun x => ‖k x‖) (ENNReal.ofReal (2:ℝ)) volume := by simpa using hk.norm | |
| 140 | + have hf' : MemLp (fun x => ‖f x‖) (ENNReal.ofReal (2:ℝ)) volume := by simpa using hf.norm | |
| 141 | + have h := integral_mul_le_Lp_mul_Lq_of_nonneg hp | |
| 142 | + (Eventually.of_forall (fun x => norm_nonneg (k x))) | |
| 143 | + (Eventually.of_forall (fun x => norm_nonneg (f x))) hk' hf' | |
| 144 | + have hnorm : (∫ x : Space, ‖k x‖*‖f x‖) ≤ | |
| 145 | + Real.sqrt (∫ x : Space, ‖k x‖^2) * Real.sqrt (∫ x : Space, ‖f x‖^2) := by | |
| 146 | + simpa only [Real.rpow_two, Real.sqrt_eq_rpow] using h | |
| 147 | + have he : Real.sqrt (∫ x : Space, ‖f x‖^2) = (eLpNorm f 2 volume).toReal := by | |
| 148 | + rw [EulerLpParameterIntegral.integral_norm_sq_eq volume f hf, | |
| 149 | + Real.sqrt_sq ENNReal.toReal_nonneg] | |
| 150 | + rw [he] at hnorm | |
| 151 | + exact (norm_integral_le_integral_norm _).trans (by simpa only [norm_smul] using hnorm) | |
| 152 | + | |
| 153 | +/-- The three-dimensional smoothing power t^(-3/4) is proved from the | |
| 154 | +normalized Gaussian density and the ordinary whole-space L² norm. -/ | |
| 155 | +theorem average_norm_le_L2 {t : ℝ} (ht : 0 < t) (f : Space → V) | |
| 156 | + (hf : MemLp f 2 volume) (x : Space) : | |
| 157 | + ‖average t f x‖ ≤ t^(-(3:ℝ)/4) * (eLpNorm f 2 volume).toReal := by | |
| 158 | + have hmp := measurePreserving_add_left (volume : Measure Space) x | |
| 159 | + have hs : MemLp (fun y : Space => f (x+y)) 2 volume := hf.comp_measurePreserving hmp | |
| 160 | + have he : eLpNorm (fun y : Space => f (x+y)) 2 volume = eLpNorm f 2 volume := | |
| 161 | + eLpNorm_comp_measurePreserving hf.aestronglyMeasurable hmp | |
| 162 | + have h := norm_integral_smul_le (kernel t) (fun y : Space => f (x+y)) (kernel_memLp ht) hs | |
| 163 | + rw [he] at h | |
| 164 | + have hk : (∫ y : Space, ‖kernel t y‖^2) ≤ normalization t := by | |
| 165 | + simpa only [Real.norm_eq_abs, sq_abs] using integral_kernel_sq_le ht | |
| 166 | + exact h.trans (mul_le_mul_of_nonneg_right | |
| 167 | + ((Real.sqrt_le_sqrt hk).trans (sqrt_normalization_le ht)) ENNReal.toReal_nonneg) | |
| 168 | + | |
| 169 | +theorem average_smoothField_norm {t : ℝ} (ht : 0 < t) (A : SmoothL2Field V) (x : Space) : | |
| 170 | + ‖average t A.field x‖ ≤ t^(-(3:ℝ)/4) * ‖A.toLp‖ := by | |
| 171 | + simpa only [SmoothL2Field.toLp, Lp.norm_toLp] using average_norm_le_L2 ht A.field A.memLp x | |
| 172 | + | |
| 173 | +end Averaging | |
| 174 | +end EulerWholeSpaceGaussian | |
| 175 | +end | |
| 176 | + | |
| 177 | +end | |
| 178 | + | |
| 6 | 179 | noncomputable section |
| 7 | 180 | |
| 8 | 181 | namespace EulerWholeSpaceGaussian |
+0 −90 Euler/WholeSpaceGaussianLow.lean deleted
| @@ -1,90 +0,0 @@ | ||
| 1 | -import Euler.WholeSpaceGaussianIntegration | |
| 2 | - | |
| 3 | -/-! The low-frequency derivative of the true Gaussian average is controlled | |
| 4 | -by the ordinary L² norm of the original field. -/ | |
| 5 | - | |
| 6 | -noncomputable section | |
| 7 | - | |
| 8 | -namespace EulerWholeSpaceGaussian | |
| 9 | - | |
| 10 | -open MeasureTheory InnerProductSpace EulerSmoothLimit Filter | |
| 11 | -open scoped ContDiff ENNReal RealInnerProductSpace | |
| 12 | - | |
| 13 | -theorem firstKernel_sq_bound {t : ℝ} (ht : 0 < t) (a y : Space) : | |
| 14 | - ‖firstKernel t a y‖^2 ≤ | |
| 15 | - (8*t⁻¹*normalization t*‖a‖^2)*wideKernel t y := by | |
| 16 | - have hi : ‖⟪y,a⟫_ℝ‖^2 ≤ ‖y‖^2*‖a‖^2 := by | |
| 17 | - have h : ‖⟪y,a⟫_ℝ‖ ≤ ‖y‖*‖a‖ := norm_inner_le_norm y a | |
| 18 | - simpa only [mul_pow] using pow_le_pow_left₀ (norm_nonneg ⟪y,a⟫_ℝ) h 2 | |
| 19 | - have hk : kernel t y ^ 2 ≤ normalization t * kernel t y := by | |
| 20 | - rw [pow_two] | |
| 21 | - exact mul_le_mul_of_nonneg_right (kernel_le_normalization ht y) (kernel_nonneg ht y) | |
| 22 | - calc | |
| 23 | - _ = 4*t⁻¹^2*‖⟪y,a⟫_ℝ‖^2*(kernel t y)^2 := by | |
| 24 | - simp only [firstKernel, norm_mul, norm_neg, Real.norm_ofNat, | |
| 25 | - Real.norm_of_nonneg (inv_pos.mpr ht).le, Real.norm_of_nonneg (kernel_nonneg ht y)] | |
| 26 | - ring | |
| 27 | - _ ≤ 4*t⁻¹^2*(‖y‖^2*‖a‖^2)*(normalization t*kernel t y) := by | |
| 28 | - apply mul_le_mul | |
| 29 | - · exact mul_le_mul_of_nonneg_left hi (by positivity) | |
| 30 | - · exact hk | |
| 31 | - · positivity | |
| 32 | - · positivity | |
| 33 | - _ = (4*t⁻¹^2*normalization t*‖a‖^2)*(‖y‖^2*kernel t y) := by ring | |
| 34 | - _ ≤ (4*t⁻¹^2*normalization t*‖a‖^2)*(2*t*wideKernel t y) := | |
| 35 | - mul_le_mul_of_nonneg_left (norm_sq_kernel_le ht y) | |
| 36 | - (by have := (normalization_pos ht).le; positivity) | |
| 37 | - _ = _ := by field_simp; ring | |
| 38 | - | |
| 39 | -theorem firstKernel_memLp {t : ℝ} (ht : 0 < t) (a : Space) : | |
| 40 | - MemLp (firstKernel t a) 2 volume := by | |
| 41 | - apply (memLp_two_iff_integrable_sq_norm | |
| 42 | - (firstKernel_smooth t a).continuous.aestronglyMeasurable).2 | |
| 43 | - apply ((wideKernel_integrable ht).const_mul | |
| 44 | - (8*t⁻¹*normalization t*‖a‖^2)).mono' | |
| 45 | - (((firstKernel_smooth t a).continuous.norm).pow 2).aestronglyMeasurable | |
| 46 | - exact Eventually.of_forall (fun y => by | |
| 47 | - change ‖‖firstKernel t a y‖^2‖ ≤ _ | |
| 48 | - rw [Real.norm_of_nonneg (sq_nonneg _)] | |
| 49 | - exact firstKernel_sq_bound ht a y) | |
| 50 | - | |
| 51 | -theorem integral_firstKernel_sq_bound {t : ℝ} (ht : 0 < t) (a : Space) : | |
| 52 | - (∫ y : Space, ‖firstKernel t a y‖^2) ≤ | |
| 53 | - (8*normalization t*(2:ℝ)^((3:ℝ)/2))*t⁻¹*‖a‖^2 := by | |
| 54 | - calc | |
| 55 | - _ ≤ ∫ y : Space, (8*t⁻¹*normalization t*‖a‖^2)*wideKernel t y := | |
| 56 | - integral_mono ((memLp_two_iff_integrable_sq_norm | |
| 57 | - (firstKernel_smooth t a).continuous.aestronglyMeasurable).1 (firstKernel_memLp ht a)) | |
| 58 | - ((wideKernel_integrable ht).const_mul _) (firstKernel_sq_bound ht a) | |
| 59 | - _ = _ := by rw [integral_const_mul, integral_wideKernel ht]; ring | |
| 60 | - | |
| 61 | -def lowCost : ℝ := Real.sqrt (8*normalization 1*(2:ℝ)^((3:ℝ)/2)) | |
| 62 | - | |
| 63 | -theorem lowCost_nonneg : 0 ≤ lowCost := Real.sqrt_nonneg _ | |
| 64 | - | |
| 65 | -theorem firstKernel_one_L2_bound (a : Space) : | |
| 66 | - Real.sqrt (∫ y : Space, ‖firstKernel 1 a y‖^2) ≤ lowCost*‖a‖ := by | |
| 67 | - have h := Real.sqrt_le_sqrt (integral_firstKernel_sq_bound (by norm_num : (0:ℝ)<1) a) | |
| 68 | - simpa only [inv_one, mul_one, Real.sqrt_mul (by | |
| 69 | - have := normalization_pos (by norm_num : (0:ℝ)<1) | |
| 70 | - positivity : 0 ≤ 8*normalization 1*(2:ℝ)^((3:ℝ)/2)), | |
| 71 | - Real.sqrt_sq (norm_nonneg a), lowCost] using h | |
| 72 | - | |
| 73 | -variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] | |
| 74 | - | |
| 75 | -theorem average_first_L2_bound (f : Space → V) (hf : ContDiff ℝ ∞ f) | |
| 76 | - (hLp : MemLp f 2 volume) (C₀ C₁ : ℝ) | |
| 77 | - (h₀ : ∀ x, ‖f x‖ ≤ C₀) (h₁ : ∀ x, ‖fderiv ℝ f x‖ ≤ C₁) (a x : Space) : | |
| 78 | - ‖average 1 (fun y => fderiv ℝ f y a) x‖ ≤ | |
| 79 | - lowCost*‖a‖*(eLpNorm f 2 volume).toReal := by | |
| 80 | - rw [average_first_identity (by norm_num : (0:ℝ)<1) f hf C₀ C₁ h₀ h₁ a x, norm_neg] | |
| 81 | - have hmp := measurePreserving_add_left (volume : Measure Space) x | |
| 82 | - have hs : MemLp (fun y : Space => f (x+y)) 2 volume := hLp.comp_measurePreserving hmp | |
| 83 | - have he : eLpNorm (fun y : Space => f (x+y)) 2 volume = eLpNorm f 2 volume := | |
| 84 | - eLpNorm_comp_measurePreserving hLp.aestronglyMeasurable hmp | |
| 85 | - have h := norm_integral_smul_le (firstKernel 1 a) (fun y : Space => f (x+y)) | |
| 86 | - (firstKernel_memLp (by norm_num : (0:ℝ)<1) a) hs | |
| 87 | - rw [he] at h | |
| 88 | - exact h.trans (mul_le_mul_of_nonneg_right (firstKernel_one_L2_bound a) ENNReal.toReal_nonneg) | |
| 89 | - | |
| 90 | -end EulerWholeSpaceGaussian | |
+0 −73 Euler/WholeSpaceGaussianScale.lean deleted
| @@ -1,73 +0,0 @@ | ||
| 1 | -import Euler.WholeSpaceGaussianKernel | |
| 2 | -import Mathlib.MeasureTheory.Measure.Haar.NormedSpace | |
| 3 | - | |
| 4 | -/-! The same Gaussian average as a continuous dilation of a fixed kernel. -/ | |
| 5 | - | |
| 6 | -noncomputable section | |
| 7 | - | |
| 8 | -namespace EulerWholeSpaceGaussian | |
| 9 | - | |
| 10 | -open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set | |
| 11 | -open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 12 | - | |
| 13 | -theorem normalization_sq {c : ℝ} (hc : 0 < c) : | |
| 14 | - normalization (c^2) = (c^3)⁻¹*normalization 1 := by | |
| 15 | - unfold normalization | |
| 16 | - rw [mul_one, Real.mul_rpow Real.pi_pos.le (sq_nonneg c)] | |
| 17 | - have h : (c^2)^(-(3:ℝ)/2) = (c^3)⁻¹ := by | |
| 18 | - rw [← Real.rpow_natCast, ← Real.rpow_mul hc.le] | |
| 19 | - norm_num [Real.rpow_neg, Real.rpow_natCast] | |
| 20 | - rw [h, mul_comm] | |
| 21 | - | |
| 22 | -theorem kernel_sq_smul {c : ℝ} (hc : 0 < c) (y : Space) : | |
| 23 | - kernel (c^2) (c • y) = (c^3)⁻¹*kernel 1 y := by | |
| 24 | - unfold kernel | |
| 25 | - rw [normalization_sq hc, norm_smul, Real.norm_of_nonneg hc.le, mul_pow] | |
| 26 | - have he : -(c^2)⁻¹*(c^2*‖y‖^2) = -(1:ℝ)⁻¹*‖y‖^2 := by field_simp | |
| 27 | - rw [he] | |
| 28 | - ring | |
| 29 | - | |
| 30 | -section Averaging | |
| 31 | - | |
| 32 | -variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] | |
| 33 | - | |
| 34 | -/-- This formula continues the actual heat average to t=0 by dilation. -/ | |
| 35 | -def scaledAverage (t : ℝ) (f : Space → V) (x : Space) : V := | |
| 36 | - ∫ y : Space, kernel 1 y • f (x+Real.sqrt t • y) | |
| 37 | - | |
| 38 | -theorem scaledAverage_eq {t : ℝ} (ht : 0 < t) (f : Space → V) (x : Space) : | |
| 39 | - scaledAverage t f x = average t f x := by | |
| 40 | - have hc : 0 < Real.sqrt t := Real.sqrt_pos.mpr ht | |
| 41 | - have he (y : Space) : kernel t (Real.sqrt t • y) = | |
| 42 | - (Real.sqrt t ^ 3)⁻¹*kernel 1 y := by | |
| 43 | - simpa only [Real.sq_sqrt ht.le] using kernel_sq_smul hc y | |
| 44 | - have h := Measure.integral_comp_smul_of_nonneg (volume : Measure Space) | |
| 45 | - (fun y : Space => kernel t y • f (x+y)) (Real.sqrt t) (hR := hc.le) | |
| 46 | - have hdim : Module.finrank ℝ Space = 3 := by simp [Space] | |
| 47 | - simp only [he, mul_smul, integral_smul, hdim] at h | |
| 48 | - change (Real.sqrt t ^ 3)⁻¹ • scaledAverage t f x = | |
| 49 | - (Real.sqrt t ^ 3)⁻¹ • average t f x at h | |
| 50 | - exact (smul_right_injective V (inv_ne_zero (pow_ne_zero 3 hc.ne'))).eq_iff.mp h | |
| 51 | - | |
| 52 | -theorem scaledAverage_zero [CompleteSpace V] (f : Space → V) (x : Space) : scaledAverage 0 f x = f x := by | |
| 53 | - simp only [scaledAverage, Real.sqrt_zero, zero_smul, add_zero, integral_smul_const, | |
| 54 | - integral_kernel (by norm_num : (0:ℝ) < 1), one_smul] | |
| 55 | - | |
| 56 | -theorem scaledAverage_continuous (f : Space → V) (hf : Continuous f) | |
| 57 | - (C : ℝ) (hb : ∀ x, ‖f x‖ ≤ C) (x : Space) : | |
| 58 | - Continuous (fun t : ℝ => scaledAverage t f x) := by | |
| 59 | - apply continuous_of_dominated (bound := fun y : Space => kernel 1 y*C) | |
| 60 | - · intro t | |
| 61 | - exact ((kernel_smooth 1).continuous.smul | |
| 62 | - (hf.comp (show Continuous (fun y : Space => x+Real.sqrt t • y) by fun_prop))).aestronglyMeasurable | |
| 63 | - · intro t | |
| 64 | - exact Eventually.of_forall (fun y => by | |
| 65 | - rw [norm_smul, Real.norm_of_nonneg (kernel_nonneg (by norm_num) y)] | |
| 66 | - exact mul_le_mul_of_nonneg_left (hb _) (kernel_nonneg (by norm_num) y)) | |
| 67 | - · exact (kernel_integrable (by norm_num : (0:ℝ)<1)).mul_const C | |
| 68 | - · exact Eventually.of_forall (fun y => | |
| 69 | - continuous_const.smul (hf.comp | |
| 70 | - (show Continuous (fun t : ℝ => x+Real.sqrt t • y) by fun_prop))) | |
| 71 | - | |
| 72 | -end Averaging | |
| 73 | -end EulerWholeSpaceGaussian | |
+0 −97 Euler/WholeSpaceGaussianTimeKernel.lean deleted
| @@ -1,97 +0,0 @@ | ||
| 1 | -import Euler.WholeSpaceGaussianKernel | |
| 2 | -import Mathlib.Analysis.SpecialFunctions.Pow.Deriv | |
| 3 | - | |
| 4 | -/-! The literal time derivative of the Gaussian density and local domination. -/ | |
| 5 | - | |
| 6 | -noncomputable section | |
| 7 | - | |
| 8 | -namespace EulerWholeSpaceGaussian | |
| 9 | - | |
| 10 | -open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set | |
| 11 | -open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 12 | - | |
| 13 | -def timeKernel (t : ℝ) (y : Space) : ℝ := | |
| 14 | - (t⁻¹^2*‖y‖^2-(3/2:ℝ)*t⁻¹)*kernel t y | |
| 15 | - | |
| 16 | -theorem normalization_hasDerivAt {t : ℝ} (ht : 0 < t) : | |
| 17 | - HasDerivAt normalization (-(3/2:ℝ)*t⁻¹*normalization t) t := by | |
| 18 | - have h := ((hasDerivAt_id t).const_mul Real.pi).rpow_const | |
| 19 | - (p := -(3:ℝ)/2) (Or.inl (mul_pos Real.pi_pos ht).ne') | |
| 20 | - change HasDerivAt normalization _ t at h | |
| 21 | - convert h using 1 | |
| 22 | - simp only [id_eq, mul_one] | |
| 23 | - rw [Real.rpow_sub_one (mul_pos Real.pi_pos ht).ne'] | |
| 24 | - unfold normalization | |
| 25 | - field_simp | |
| 26 | - | |
| 27 | -theorem kernel_hasDerivAt {t : ℝ} (ht : 0 < t) (y : Space) : | |
| 28 | - HasDerivAt (fun s : ℝ => kernel s y) (timeKernel t y) t := by | |
| 29 | - have h := (normalization_hasDerivAt ht).mul | |
| 30 | - (((hasDerivAt_inv ht.ne').neg.mul_const (‖y‖^2)).exp) | |
| 31 | - change HasDerivAt (fun s : ℝ => kernel s y) _ t at h | |
| 32 | - convert h using 1 | |
| 33 | - simp only [timeKernel, kernel, inv_pow, Pi.neg_apply, neg_neg] | |
| 34 | - ring | |
| 35 | - | |
| 36 | -theorem timeKernel_continuous (t : ℝ) : Continuous (timeKernel t) := by | |
| 37 | - unfold timeKernel | |
| 38 | - exact ((continuous_const.mul (continuous_norm.pow 2)).sub continuous_const).mul | |
| 39 | - (kernel_smooth t).continuous | |
| 40 | - | |
| 41 | -theorem timeKernel_second_sum (t : ℝ) (y : Space) : | |
| 42 | - timeKernel t y = (1/4:ℝ) * ∑ i : Fin 3, | |
| 43 | - secondKernel t (EuclideanSpace.single i 1) (EuclideanSpace.single i 1) y := by | |
| 44 | - simp [timeKernel, secondKernel, EuclideanSpace.inner_single_right, | |
| 45 | - EuclideanSpace.real_norm_sq_eq, Fin.sum_univ_three] | |
| 46 | - ring | |
| 47 | - | |
| 48 | -theorem timeKernel_bound {t : ℝ} (ht : 0 < t) (y : Space) : | |
| 49 | - ‖timeKernel t y‖ ≤ ((15/2:ℝ)*t⁻¹)*wideKernel t y := by | |
| 50 | - rw [timeKernel_second_sum, norm_mul, Real.norm_of_nonneg (by norm_num : (0:ℝ) ≤ 1/4)] | |
| 51 | - apply (mul_le_mul_of_nonneg_left (norm_sum_le _ _) (by norm_num : (0:ℝ) ≤ 1/4)).trans | |
| 52 | - have h (i : Fin 3) : | |
| 53 | - ‖secondKernel t (EuclideanSpace.single i 1) (EuclideanSpace.single i 1) y‖ ≤ | |
| 54 | - 10*t⁻¹*wideKernel t y := by | |
| 55 | - simpa only [PiLp.norm_single, norm_one, mul_one] using | |
| 56 | - secondKernel_bound ht (EuclideanSpace.single i 1) (EuclideanSpace.single i 1) y | |
| 57 | - have hb := Finset.sum_le_sum (fun i (_hi : i ∈ (Finset.univ : Finset (Fin 3))) => h i) | |
| 58 | - have hc := mul_le_mul_of_nonneg_left hb (by norm_num : (0:ℝ) ≤ 1/4) | |
| 59 | - apply hc.trans_eq | |
| 60 | - simp only [Fin.sum_univ_three] | |
| 61 | - ring | |
| 62 | - | |
| 63 | -def timeEnvelope (t : ℝ) (y : Space) : ℝ := | |
| 64 | - (15*t⁻¹*normalization (t/2))*Real.exp (-(4*t)⁻¹*‖y‖^2) | |
| 65 | - | |
| 66 | -theorem timeEnvelope_integrable {t : ℝ} (ht : 0 < t) : Integrable (timeEnvelope t) := | |
| 67 | - (exp_integrable (inv_pos.mpr (by positivity : 0 < 4*t))).const_mul _ | |
| 68 | - | |
| 69 | -theorem normalization_antitone {s t : ℝ} (hs : 0 < s) (hst : s ≤ t) : | |
| 70 | - normalization t ≤ normalization s := by | |
| 71 | - apply Real.rpow_le_rpow_of_nonpos (mul_pos Real.pi_pos hs) | |
| 72 | - · exact mul_le_mul_of_nonneg_left hst Real.pi_pos.le | |
| 73 | - · norm_num | |
| 74 | - | |
| 75 | -theorem timeKernel_local_bound {t : ℝ} (ht : 0 < t) (s : ℝ) | |
| 76 | - (hs : s ∈ Ioo (t/2) (2*t)) (y : Space) : | |
| 77 | - ‖timeKernel s y‖ ≤ timeEnvelope t y := by | |
| 78 | - have hhalf : 0 < t/2 := by positivity | |
| 79 | - have hspos : 0 < s := hhalf.trans hs.1 | |
| 80 | - have hn : normalization s ≤ normalization (t/2) := normalization_antitone hhalf hs.1.le | |
| 81 | - have hi : s⁻¹ ≤ (t/2)⁻¹ := inv_anti₀ hhalf hs.1.le | |
| 82 | - have hei : (4*t)⁻¹ ≤ (2*s)⁻¹ := inv_anti₀ (by positivity) (by linarith [hs.2]) | |
| 83 | - have he : Real.exp (-(2*s)⁻¹*‖y‖^2) ≤ Real.exp (-(4*t)⁻¹*‖y‖^2) := by | |
| 84 | - apply Real.exp_le_exp.mpr | |
| 85 | - nlinarith [sq_nonneg ‖y‖] | |
| 86 | - apply (timeKernel_bound hspos y).trans | |
| 87 | - change ((15/2:ℝ)*s⁻¹)*(normalization s*Real.exp (-(2*s)⁻¹*‖y‖^2)) ≤ _ | |
| 88 | - calc | |
| 89 | - _ ≤ ((15/2:ℝ)*(t/2)⁻¹)*(normalization (t/2)*Real.exp (-(4*t)⁻¹*‖y‖^2)) := by | |
| 90 | - apply mul_le_mul | |
| 91 | - · exact mul_le_mul_of_nonneg_left hi (by norm_num) | |
| 92 | - · exact mul_le_mul hn he (Real.exp_pos _).le (normalization_pos hhalf).le | |
| 93 | - · exact mul_nonneg (normalization_pos hspos).le (Real.exp_pos _).le | |
| 94 | - · positivity | |
| 95 | - _ = _ := by unfold timeEnvelope; field_simp | |
| 96 | - | |
| 97 | -end EulerWholeSpaceGaussian | |
+188 −1 Euler/WholeSpaceLogarithmic.lean View file
| @@ -1,9 +1,196 @@ | ||
| 1 | -import Euler.WholeSpaceGaussianElliptic | |
| 1 | +import Euler.WholeSpaceGaussianFields | |
| 2 | +import Mathlib.MeasureTheory.Integral.IntervalIntegral.DistLEIntegral | |
| 3 | +import Mathlib.Analysis.SpecialFunctions.Integrals.Basic | |
| 4 | +import Euler.MeanVectorIdentities | |
| 2 | 5 | import Euler.LogarithmicCutoffOptimization |
| 3 | 6 | |
| 4 | 7 | /-! The actual whole-space logarithmic derivative estimate for a scalar |
| 5 | 8 | elliptic equation whose right-hand side is the derivative of bounded fields. -/ |
| 6 | 9 | |
| 10 | +/-! ## From `Euler/WholeSpaceGaussianHigh.lean` | |
| 11 | + | |
| 12 | +The text of `Euler/WholeSpaceGaussianHigh.lean`, folded into this file, which was its only importer. -/ | |
| 13 | + | |
| 14 | +section | |
| 15 | + | |
| 16 | +/-! The small-time heat remainder from genuine third spatial L² derivatives. -/ | |
| 17 | + | |
| 18 | +noncomputable section | |
| 19 | + | |
| 20 | +namespace EulerWholeSpaceGaussian | |
| 21 | + | |
| 22 | +open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set ContinuousLinearMap | |
| 23 | + EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSobolevBoundedField | |
| 24 | + EulerOrdinarySobolev EulerVectorCalculus | |
| 25 | +open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 26 | + | |
| 27 | +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [FiniteDimensional ℝ V] | |
| 28 | + | |
| 29 | +/-- The heat remainder of one actual spatial derivative is O(ε^(1/4)) | |
| 30 | +times the third spatial L² tensor. No Hölder or heat estimate is assumed. -/ | |
| 31 | +theorem derivative_high_remainder (A : SmoothL2Field V) (j : Fin 3) (x : Space) | |
| 32 | + {ε : ℝ} (hε : 0 < ε) : | |
| 33 | + ‖fderiv ℝ A.field x (axis j) - | |
| 34 | + average ε (A.directionalField (axis j)).field x‖ ≤ | |
| 35 | + 3*ε^((1:ℝ)/4)*‖A.jetLp 3‖ := by | |
| 36 | + let D := A.directionalField (axis j) | |
| 37 | + let F : ℝ → V := fun t => scaledAverage t D.field x | |
| 38 | + let B : ℝ → ℝ := fun t => (3/4:ℝ)*t^(-(3:ℝ)/4)*‖A.jetLp 3‖ | |
| 39 | + have hc : Continuous F := scaledAverage_continuous D.field D.smooth.continuous | |
| 40 | + ‖finiteField D‖ (field_sup_bound D) x | |
| 41 | + have hd (t : ℝ) (ht : t ∈ Ioo 0 ε) : | |
| 42 | + HasDerivAt F ((1/4:ℝ) • secondAverage t D.field x) t := | |
| 43 | + scaledAverage_field_hasDerivAt ht.1 D x | |
| 44 | + have hb (t : ℝ) (ht : t ∈ Ioo 0 ε) : ‖deriv F t‖ ≤ B t := by | |
| 45 | + rw [(hd t ht).deriv, norm_smul, Real.norm_of_nonneg (by norm_num : (0:ℝ) ≤ 1/4)] | |
| 46 | + have h := mul_le_mul_of_nonneg_left (secondAverage_directional_bound ht.1 A j x) | |
| 47 | + (by norm_num : (0:ℝ) ≤ 1/4) | |
| 48 | + exact h.trans_eq (by dsimp [B]; ring) | |
| 49 | + have hbi : IntervalIntegrable B volume 0 ε := | |
| 50 | + ((intervalIntegral.intervalIntegrable_rpow' (by norm_num : (-1:ℝ) < -(3:ℝ)/4)).const_mul | |
| 51 | + (3/4:ℝ)).mul_const ‖A.jetLp 3‖ | |
| 52 | + have h := norm_sub_le_integral_of_norm_deriv_le_of_le hε.le hc.continuousOn | |
| 53 | + (fun t ht => (hd t ht).differentiableAt.differentiableWithinAt) | |
| 54 | + (Eventually.of_forall hb) hbi | |
| 55 | + have he : (∫ t in (0:ℝ)..ε, B t) = 3*ε^((1:ℝ)/4)*‖A.jetLp 3‖ := by | |
| 56 | + dsimp [B] | |
| 57 | + rw [intervalIntegral.integral_mul_const, intervalIntegral.integral_const_mul, | |
| 58 | + integral_rpow (Or.inl (by norm_num : (-1:ℝ) < -(3:ℝ)/4))] | |
| 59 | + rw [show -(3:ℝ)/4+1=(1:ℝ)/4 by norm_num, | |
| 60 | + Real.zero_rpow (by norm_num : (1:ℝ)/4 ≠ 0)] | |
| 61 | + ring | |
| 62 | + rw [he] at h | |
| 63 | + change ‖scaledAverage ε D.field x-scaledAverage 0 D.field x‖ ≤ _ at h | |
| 64 | + rw [scaledAverage_eq hε, scaledAverage_zero, norm_sub_rev] at h | |
| 65 | + exact h | |
| 66 | + | |
| 67 | +end EulerWholeSpaceGaussian | |
| 68 | +end | |
| 69 | + | |
| 70 | +end | |
| 71 | + | |
| 72 | +/-! ## From `Euler/WholeSpaceGaussianElliptic.lean` | |
| 73 | + | |
| 74 | +The text of `Euler/WholeSpaceGaussianElliptic.lean`, folded into this file, which was its only importer. -/ | |
| 75 | + | |
| 76 | +section | |
| 77 | + | |
| 78 | +/-! The logarithmic middle heat scales for an actual elliptic curl equation. -/ | |
| 79 | + | |
| 80 | +noncomputable section | |
| 81 | + | |
| 82 | +namespace EulerWholeSpaceGaussian | |
| 83 | + | |
| 84 | +open MeasureTheory InnerProductSpace EulerSmoothLimit Filter Set ContinuousLinearMap | |
| 85 | + EulerLpTranslation EulerLpTranslation.SmoothL2Field EulerMeanSobolevBoundedField | |
| 86 | + EulerOrdinarySobolev EulerVectorCalculus EulerMeanHarmonic EulerMeanVectorIdentities Laplacian | |
| 87 | +open scoped ContDiff ENNReal RealInnerProductSpace Topology | |
| 88 | + | |
| 89 | +def middleCost : ℝ := 5*(2:ℝ)^((3:ℝ)/2) | |
| 90 | + | |
| 91 | +theorem middleCost_nonneg : 0 ≤ middleCost := by unfold middleCost; positivity | |
| 92 | + | |
| 93 | +theorem secondAverage_elliptic (A G H : SmoothL2Field ℝ) (a b j : Fin 3) | |
| 94 | + (hΔ : ∀ y, Δ A.field y = partialDerivative G.field a y-partialDerivative H.field b y) | |
| 95 | + {t : ℝ} (ht : 0 < t) (x : Space) : | |
| 96 | + secondAverage t (A.directionalField (axis j)).field x = | |
| 97 | + average t ((G.directionalField (axis a)).directionalField (axis j)).field x - | |
| 98 | + average t ((H.directionalField (axis b)).directionalField (axis j)).field x := by | |
| 99 | + rw [secondAverage_eq_laplacian ht] | |
| 100 | + have he : Δ (A.directionalField (axis j)).field = | |
| 101 | + fun y => ((G.directionalField (axis a)).directionalField (axis j)).field y - | |
| 102 | + ((H.directionalField (axis b)).directionalField (axis j)).field y := by | |
| 103 | + funext y | |
| 104 | + change Δ (partialDerivative A.field j) y = _ | |
| 105 | + rw [laplacian_partialDerivative A.field A.smooth j y, funext hΔ, | |
| 106 | + partialDerivative_sub _ _ (contDiff_partialDerivative G.field G.smooth a) | |
| 107 | + (contDiff_partialDerivative H.field H.smooth b)] | |
| 108 | + rfl | |
| 109 | + rw [he, average_sub ht _ _ ((G.directionalField (axis a)).directionalField (axis j)).memLp | |
| 110 | + ((H.directionalField (axis b)).directionalField (axis j)).memLp] | |
| 111 | + | |
| 112 | +theorem secondAverage_elliptic_bound (A G H : SmoothL2Field ℝ) (a b j : Fin 3) | |
| 113 | + (hΔ : ∀ y, Δ A.field y = partialDerivative G.field a y-partialDerivative H.field b y) | |
| 114 | + (W : ℝ) (hG : ∀ y, ‖G.field y‖ ≤ W) (hH : ∀ y, ‖H.field y‖ ≤ W) | |
| 115 | + {t : ℝ} (ht : 0 < t) (x : Space) : | |
| 116 | + ‖(1/4:ℝ) • secondAverage t (A.directionalField (axis j)).field x‖ ≤ | |
| 117 | + middleCost*t⁻¹*W := by | |
| 118 | + have hg := average_field_second_bound ht G W hG (axis j) (axis a) x | |
| 119 | + have hh := average_field_second_bound ht H W hH (axis j) (axis b) x | |
| 120 | + simp only [axis_norm, mul_one] at hg hh | |
| 121 | + rw [norm_smul, Real.norm_of_nonneg (by norm_num : (0:ℝ) ≤ 1/4), | |
| 122 | + secondAverage_elliptic A G H a b j hΔ ht x] | |
| 123 | + apply (mul_le_mul_of_nonneg_left (norm_sub_le _ _) (by norm_num : (0:ℝ) ≤ 1/4)).trans | |
| 124 | + have h := mul_le_mul_of_nonneg_left (add_le_add hg hh) (by norm_num : (0:ℝ) ≤ 1/4) | |
| 125 | + exact h.trans_eq (by unfold middleCost; ring) | |
| 126 | + | |
| 127 | +/-- Integrating the genuine 1/t estimate gives the logarithmic middle term. -/ | |
| 128 | +theorem derivative_elliptic_middle (A G H : SmoothL2Field ℝ) (a b j : Fin 3) | |
| 129 | + (hΔ : ∀ y, Δ A.field y = partialDerivative G.field a y-partialDerivative H.field b y) | |
| 130 | + (W : ℝ) (hG : ∀ y, ‖G.field y‖ ≤ W) (hH : ∀ y, ‖H.field y‖ ≤ W) | |
| 131 | + (x : Space) {ε : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) : | |
| 132 | + ‖average ε (A.directionalField (axis j)).field x - | |
| 133 | + average 1 (A.directionalField (axis j)).field x‖ ≤ | |
| 134 | + middleCost*W*(-Real.log ε) := by | |
| 135 | + let D := A.directionalField (axis j) | |
| 136 | + let F : ℝ → ℝ := fun t => scaledAverage t D.field x | |
| 137 | + let B : ℝ → ℝ := fun t => middleCost*t⁻¹*W | |
| 138 | + have hc : Continuous F := scaledAverage_continuous D.field D.smooth.continuous | |
| 139 | + ‖finiteField D‖ (field_sup_bound D) x | |
| 140 | + have hd (t : ℝ) (ht : t ∈ Ioo ε 1) : | |
| 141 | + HasDerivAt F ((1/4:ℝ) • secondAverage t D.field x) t := | |
| 142 | + scaledAverage_field_hasDerivAt (hε.trans ht.1) D x | |
| 143 | + have hb (t : ℝ) (ht : t ∈ Ioo ε 1) : ‖deriv F t‖ ≤ B t := by | |
| 144 | + rw [(hd t ht).deriv] | |
| 145 | + exact secondAverage_elliptic_bound A G H a b j hΔ W hG hH (hε.trans ht.1) x | |
| 146 | + have hbi : IntervalIntegrable B volume ε 1 := by | |
| 147 | + apply ContinuousOn.intervalIntegrable_of_Icc hε1 | |
| 148 | + exact (continuousOn_const.mul (continuousOn_id.inv₀ | |
| 149 | + (fun t ht => (hε.trans_le ht.1).ne'))).mul continuousOn_const | |
| 150 | + have h := norm_sub_le_integral_of_norm_deriv_le_of_le hε1 hc.continuousOn | |
| 151 | + (fun t ht => (hd t ht).differentiableAt.differentiableWithinAt) | |
| 152 | + (Eventually.of_forall hb) hbi | |
| 153 | + have he : (∫ t in ε..(1:ℝ), B t) = middleCost*W*(-Real.log ε) := by | |
| 154 | + dsimp [B] | |
| 155 | + rw [intervalIntegral.integral_mul_const, intervalIntegral.integral_const_mul, | |
| 156 | + integral_inv_of_pos hε (by norm_num)] | |
| 157 | + simp only [one_div, Real.log_inv] | |
| 158 | + ring | |
| 159 | + rw [he] at h | |
| 160 | + change ‖scaledAverage 1 D.field x-scaledAverage ε D.field x‖ ≤ _ at h | |
| 161 | + rw [scaledAverage_eq (by norm_num : (0:ℝ)<1), scaledAverage_eq hε, norm_sub_rev] at h | |
| 162 | + exact h | |
| 163 | + | |
| 164 | +/-- The three heat scales, with every term attached to the original field. -/ | |
| 165 | +theorem elliptic_derivative_split (A G H : SmoothL2Field ℝ) (a b j : Fin 3) | |
| 166 | + (hΔ : ∀ y, Δ A.field y = partialDerivative G.field a y-partialDerivative H.field b y) | |
| 167 | + (W : ℝ) (hG : ∀ y, ‖G.field y‖ ≤ W) (hH : ∀ y, ‖H.field y‖ ≤ W) | |
| 168 | + (x : Space) {ε : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) : | |
| 169 | + ‖partialDerivative A.field j x‖ ≤ | |
| 170 | + lowCost*‖A.toLp‖ + middleCost*W*(-Real.log ε) + 3*ε^((1:ℝ)/4)*‖A.jetLp 3‖ := by | |
| 171 | + have hh := derivative_high_remainder A j x hε | |
| 172 | + have hm := derivative_elliptic_middle A G H a b j hΔ W hG hH x hε hε1 | |
| 173 | + have hl := average_field_first_bound A (axis j) x | |
| 174 | + simp only [axis_norm, mul_one] at hl | |
| 175 | + let v := partialDerivative A.field j x | |
| 176 | + let m := average ε (A.directionalField (axis j)).field x | |
| 177 | + let l := average 1 (A.directionalField (axis j)).field x | |
| 178 | + have he : v = (v-m)+(m-l)+l := by ring | |
| 179 | + calc | |
| 180 | + ‖v‖ = ‖(v-m)+(m-l)+l‖ := congrArg norm he | |
| 181 | + _ ≤ (‖v-m‖+‖m-l‖)+‖l‖ := (norm_add_le _ _).trans | |
| 182 | + (add_le_add (norm_add_le _ _) le_rfl) | |
| 183 | + _ ≤ _ := by | |
| 184 | + change ‖v-m‖ ≤ _ at hh | |
| 185 | + change ‖m-l‖ ≤ _ at hm | |
| 186 | + change ‖l‖ ≤ _ at hl | |
| 187 | + linarith | |
| 188 | + | |
| 189 | +end EulerWholeSpaceGaussian | |
| 190 | +end | |
| 191 | + | |
| 192 | +end | |
| 193 | + | |
| 7 | 194 | noncomputable section |
| 8 | 195 | |
| 9 | 196 | namespace EulerWholeSpaceGaussian |
+18 −0 routes/s5-euler-whole-1/README.md added View file
| @@ -0,0 +1,18 @@ | ||
| 1 | +--- | |
| 2 | +issue: 14 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s5-euler-whole-1 | |
| 6 | + | |
| 7 | +S-5 on the family `Euler/Whole*`: the kind of change is Lean Pool's "fewer modules". Seven small modules of the | |
| 8 | +family are folded into the file that alone imports each of them, their text unchanged — `WholeSpaceGaussianTimeKernel`, | |
| 9 | +`WholeSpaceGaussianLow`, `WholeSpaceGaussianScale` and `WholeSpaceGaussianEvolution` into | |
| 10 | +`Euler/WholeSpaceGaussianFields.lean`; `WholeSpaceGaussian` into `Euler/WholeSpaceGaussianKernel.lean`; | |
| 11 | +`WholeSpaceGaussianHigh` and `WholeSpaceGaussianElliptic` into `Euler/WholeSpaceLogarithmic.lean`. The plan is | |
| 12 | +`plan.json` in this folder, made by `docs/s5-folding/fold.py` as main has it. `WholeSpaceGaussianIntegration` also | |
| 13 | +has `Euler/WholeSpaceGaussianFields.lean` as its only importer, but folded in with the other four it takes the file | |
| 14 | +past main's `--cap` of 600, so it stays a module of its own. | |
| 15 | + | |
| 16 | +## Next | |
| 17 | + | |
| 18 | +The pull request is open; `challenge` and `build` judge it. Nothing is left to change by hand. | |
+21 −0 routes/s5-euler-whole-1/plan.json added View file
| @@ -0,0 +1,21 @@ | ||
| 1 | +{ | |
| 2 | +"imports": "in place", | |
| 3 | +"folds": { | |
| 4 | +"Euler/WholeSpaceLogarithmic.lean": [ | |
| 5 | +"Euler/WholeSpaceGaussianHigh.lean", | |
| 6 | +"Euler/WholeSpaceGaussianElliptic.lean", | |
| 7 | +"Euler/WholeSpaceLogarithmic.lean" | |
| 8 | +], | |
| 9 | +"Euler/WholeSpaceGaussianFields.lean": [ | |
| 10 | +"Euler/WholeSpaceGaussianTimeKernel.lean", | |
| 11 | +"Euler/WholeSpaceGaussianLow.lean", | |
| 12 | +"Euler/WholeSpaceGaussianScale.lean", | |
| 13 | +"Euler/WholeSpaceGaussianEvolution.lean", | |
| 14 | +"Euler/WholeSpaceGaussianFields.lean" | |
| 15 | +], | |
| 16 | +"Euler/WholeSpaceGaussianKernel.lean": [ | |
| 17 | +"Euler/WholeSpaceGaussian.lean", | |
| 18 | +"Euler/WholeSpaceGaussianKernel.lean" | |
| 19 | +] | |
| 20 | +} | |
| 21 | +} | |