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

Merge pull request #242 from s1-ns-reference-1
Browse fileschore(NavierStokes/Reference): delete 86 declarations nothing uses
Checks
challenge Program · challenge files and build config
Details
+0 −15 NavierStokes/ReferenceBounds.lean View file
| @@ -282,21 +282,6 @@ theorem p1_equation {p : Point} (hp : p ∈ D.carrier) (hX : 0 < p.1) | ||
| 282 | 282 | (1 + logSlope P p) * P.angularLag h p) / NaturalAxisData.L h p.2 := by ring |
| 283 | 283 | _ = _ := by rw [hQ] |
| 284 | 284 | |
| 285 | -theorem ns_equation {p : Point} (hp : p ∈ D.carrier) (hX : p.1 ≠ 0) (h : ℝ) : | |
| 286 | - p.1 * deriv (fun x => ns P h (x, p.2)) p.1 + ns P h p = | |
| 287 | - P.axialSource h p / NaturalAxisData.L h p.2 := by | |
| 288 | - have hN := P.axialLag_equation h hp hX | |
| 289 | - have hNd := P.axialLag_hasDerivAt h hp hX | |
| 290 | - have hd := hNd.div_const (NaturalAxisData.L h p.2) | |
| 291 | - rw [show deriv (fun x => ns P h (x, p.2)) p.1 = | |
| 292 | - deriv (fun x => P.axialLag h (x, p.2)) p.1 / NaturalAxisData.L h p.2 by | |
| 293 | - simpa only [ns, ← hNd.deriv] using hd.deriv] | |
| 294 | - unfold ns | |
| 295 | - calc | |
| 296 | - _ = (p.1 * deriv (fun x => P.axialLag h (x, p.2)) p.1 + P.axialLag h p) / | |
| 297 | - NaturalAxisData.L h p.2 := by ring | |
| 298 | - _ = _ := by rw [hN] | |
| 299 | - | |
| 300 | 285 | theorem lower_comparison_preserves {X a L b q : ℝ} |
| 301 | 286 | (ha : 0 < a) (haX : a ≤ X) (hL : 0 < L) (hq : 0 ≤ q) (hqa : b * L ≤ q * a) : |
| 302 | 287 | b ≤ b * a / X + q / (2 * L) * (X - a ^ 2 / X) := by |
+0 −292 NavierStokes/ReferenceEndpointRate.lean View file
| @@ -15,296 +15,4 @@ variable {h j σ Λ : ℝ} {P0 : ℝ → ℝ} | ||
| 15 | 15 | (d : AnalyticInputs h j σ P0) (hΛ : 0 < Λ) (hP0 : ContDiff ℝ ∞ P0) |
| 16 | 16 | (hs : NaturalAxisRange.Parameters h j) |
| 17 | 17 | |
| 18 | -/-- The same stock-driven continuation, on the full printed numerical range. -/ | |
| 19 | -def reference (q : Choice d Λ) : StockReference parameterInterval where | |
| 20 | - exponent := h | |
| 21 | - radius0 := (q.input hΛ).endpoint | |
| 22 | - radius0_pos := (q.input hΛ).endpoint_pos | |
| 23 | - domain := (q.input hΛ).radialDomain | |
| 24 | - profiles := q.profiles hΛ hP0 | |
| 25 | - log_mem := fun y _ hη => StressActivation.FromReference.log_radius_mem (q.input hΛ) y hη | |
| 26 | - f_pos := fun y _ hη => (q.input hΛ).refF_pos q.δ | |
| 27 | - (StressActivation.FromReference.log_radius_mem (q.input hΛ) y hη) | |
| 28 | - (mul_pos (q.input hΛ).endpoint_pos (Real.exp_pos _)).le | |
| 29 | - L_ne_zero := fun η hη => (lt_of_lt_of_le (by norm_num : (0:ℝ)<4879/5000) | |
| 30 | - (AppendixJoiningResults.axis_L_lower_bound_window hs.h_pos.le hs.h_le | |
| 31 | - ⟨hη.1.le,hη.2.le⟩)).ne' | |
| 32 | - | |
| 33 | -theorem reference_eq_ofNatural (hs' : NaturalAxisData.SmallParameters h j) (q : Choice d Λ) : | |
| 34 | - reference d hΛ hP0 hs q = | |
| 35 | - ofNatural q.profile.family hΛ hs' q.δ_pos q.δ_lt hP0 := rfl | |
| 36 | - | |
| 37 | -theorem reference_radius (q : Choice d Λ) : | |
| 38 | - (reference d hΛ hP0 hs q).radius0 = 4/Λ := rfl | |
| 39 | - | |
| 40 | -theorem reference_finalTime (q : Choice d Λ) : | |
| 41 | - (reference d hΛ hP0 hs q).finalTime = Real.log (110/(4/Λ)) := rfl | |
| 42 | - | |
| 43 | -theorem reference_initialU (q : Choice d Λ) : | |
| 44 | - (reference d hΛ hP0 hs q).initialU = fun η => q.profile.family.U (4/Λ,η) := by | |
| 45 | - funext η | |
| 46 | - exact (q.input hΛ).refU_eq_natural_initial q.δ le_rfl | |
| 47 | - | |
| 48 | -theorem reference_initialU_error (q : Choice d Λ) (n : ℕ) {η : ℝ} (hη : η ∈ J) : | |
| 49 | - |iteratedDeriv n (fun ξ => (reference d hΛ hP0 hs q).initialU ξ - NaturalAxisData.U j ξ) η| ≤ | |
| 50 | - ReferenceJetBounds.jetConstant d.coefficients 0 n / Λ := by | |
| 51 | - rw [reference_initialU] | |
| 52 | - have hY : Λ*(4/Λ) = 4 := by field_simp | |
| 53 | - rw [naturalU_error_jet d q.profile (by rw [hY]; norm_num) (original_interval_interior hη) n, | |
| 54 | - abs_mul, abs_of_pos (one_div_pos.mpr hΛ)] | |
| 55 | - have hb := (ReferenceJetBounds.coefficient_jet_bound d.coefficients q.profile.coefficients | |
| 56 | - q.profile.norm_ball 0 n (p := (Λ*(4/Λ),η)) (by rw [hY]; norm_num)).2 | |
| 57 | - convert! mul_le_mul_of_nonneg_left hb (one_div_nonneg.mpr hΛ.le) using 1 | |
| 58 | - ring | |
| 59 | - | |
| 60 | -theorem radius_final_interval {J' : Set ℝ} (R : StockReference J') {t : ℝ} | |
| 61 | - (ht : t ≤ R.finalTime) : radius R.radius0 t ∈ Ioc (0:ℝ) 110 := by | |
| 62 | - refine ⟨mul_pos R.radius0_pos (Real.exp_pos t),?_⟩ | |
| 63 | - have he := Real.exp_le_exp.mpr ht | |
| 64 | - rw [StockReference.finalTime, Real.exp_log (div_pos (by norm_num) R.radius0_pos)] at he | |
| 65 | - have hm := mul_le_mul_of_nonneg_left he R.radius0_pos.le | |
| 66 | - simpa only [radius,mul_div_cancel₀ _ R.radius0_pos.ne'] using hm | |
| 67 | - | |
| 68 | -/-- One stock bound is chosen before every admissible amplitude and reference width. -/ | |
| 69 | -theorem exists_reference_axialStock_bound (hσ : 0 < σ) | |
| 70 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 71 | - (N : ℕ) : ∃ B, 0 ≤ B ∧ ∀ q : Choice d Λ, ∀ n ≤ N, | |
| 72 | - ∀ t ≤ (reference d hΛ hP0 hs q).finalTime, ∀ η ∈ J, | |
| 73 | - |parameterJet n (reference d hΛ hP0 hs q).axialStock (t,η)| ≤ B := by | |
| 74 | - obtain ⟨B,hB,hb⟩ := (uniform_axialFormula d hΛ hP0 hs hσ hscale N | |
| 75 | - (by norm_num : (0:ℝ)≤110)).2 | |
| 76 | - refine ⟨B,hB,?_⟩ | |
| 77 | - intro q n hn t ht η hη | |
| 78 | - let R := reference d hΛ hP0 hs q | |
| 79 | - let X := radius R.radius0 t | |
| 80 | - have hX := radius_final_interval R ht | |
| 81 | - have hm (ξ : ℝ) (hξ : ξ ∈ parameterInterval) : (X,ξ) ∈ R.domain.carrier := R.log_mem t ξ hξ | |
| 82 | - have he : (fun ξ => R.axialStock (t,ξ)) =ᶠ[𝓝 η] | |
| 83 | - (fun ξ => axialFormula R.profiles h (X,ξ)) := by | |
| 84 | - filter_upwards [parameterInterval_open.mem_nhds (original_interval_interior hη)] with ξ hξ | |
| 85 | - exact (axialFormula_eq R.profiles h (hm ξ hξ) hX.1).symm | |
| 86 | - rw [parameterJet_eq_iteratedDeriv parameterInterval_open (R.axialStock_smooth parameterInterval_open) | |
| 87 | - n (original_interval_interior hη), he.iteratedDeriv_eq n] | |
| 88 | - have hsl : ∀ ξ ∈ J, ContDiffAt ℝ ∞ (fun ξ => axialFormula R.profiles h (X,ξ)) ξ := by | |
| 89 | - intro ξ hξ | |
| 90 | - have he' : (fun z => axialFormula R.profiles h (X,z)) =ᶠ[𝓝 ξ] | |
| 91 | - (fun z => R.axialStock (t,z)) := by | |
| 92 | - filter_upwards [parameterInterval_open.mem_nhds (original_interval_interior hξ)] with z hz | |
| 93 | - exact axialFormula_eq R.profiles h (hm z hz) hX.1 | |
| 94 | - exact (slice_smoothAt (logDomain parameterInterval parameterInterval_open) | |
| 95 | - (R.axialStock_smooth parameterInterval_open) ⟨mem_univ _,original_interval_interior hξ⟩).congr_of_eventuallyEq he' | |
| 96 | - exact (bound_iff_jets hsl).mp (hb (q,⟨X,hX.1.le,hX.2⟩)) n hn η hη | |
| 97 | - | |
| 98 | -/-- The endpoint integral has a linear control cost for any actual stock reference. -/ | |
| 99 | -theorem endpoint_error_from_stock {J' : Set ℝ} (hJ : IsOpen J') | |
| 100 | - (R : StockReference J') {g : ℝ → ℝ} (hg : ContDiffOn ℝ ∞ g J') | |
| 101 | - {T κ w η M I : ℝ} (hT : 0 < T) (hκ : κ ∈ Icc (0:ℝ) 1) | |
| 102 | - (hfinal : 0 ≤ R.finalTime) (hη : η ∈ J') (hM : 0 ≤ M) (n : ℕ) | |
| 103 | - (hi : |iteratedDeriv n (fun ξ => R.initialU ξ-g ξ) η| ≤ I) | |
| 104 | - (hb : ∀ t ∈ Icc (0:ℝ) R.finalTime, |parameterJet n R.axialStock (t,η)| ≤ M) : | |
| 105 | - |iteratedDeriv n (fun ξ => R.endpointU T κ w ξ-g ξ) η| ≤ I+M*(T+κ*R.finalTime) := by | |
| 106 | - apply jet_transfer n | |
| 107 | - (((R.endpointU_smooth hJ T κ w).contDiffAt (hJ.mem_nhds hη)).sub | |
| 108 | - (hg.contDiffAt (hJ.mem_nhds hη))) | |
| 109 | - (((R.initialU_smooth hJ).contDiffAt (hJ.mem_nhds hη)).sub | |
| 110 | - (hg.contDiffAt (hJ.mem_nhds hη))) | |
| 111 | - · have he : (fun ξ => (R.endpointU T κ w ξ-g ξ)-(R.initialU ξ-g ξ)) = | |
| 112 | - fun ξ => R.axialVelocity T κ w (R.finalTime,ξ)-R.initialU ξ := by | |
| 113 | - funext ξ | |
| 114 | - simp only [StockReference.endpointU] | |
| 115 | - ring | |
| 116 | - rw [he] | |
| 117 | - exact axialField_jet_error_bound hJ (R.axialStock_smooth hJ) R.initialU | |
| 118 | - hT hκ hfinal hη hM n hb | |
| 119 | - · exact hi | |
| 120 | - | |
| 121 | -/-- The joining constant is chosen before amplitude and before all smaller widths. | |
| 122 | -The natural coefficient constant displayed on the right does not depend on `Λ`. -/ | |
| 123 | -theorem exists_linear_jet_constant (hΛ1 : 1 ≤ Λ) (hσ : 0 < σ) | |
| 124 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 125 | - (N : ℕ) : ∃ Cjoin, 0 ≤ Cjoin ∧ ∀ q : Choice d Λ, | |
| 126 | - ∀ T, 0 < T → ∀ κ ∈ Icc (0:ℝ) 1, ∀ w₁, 0 ≤ w₁ → ∀ w₂, 0 ≤ w₂ → | |
| 127 | - ∀ n ≤ N, ∀ η ∈ J, | |
| 128 | - |iteratedDeriv n (fun ξ => (reference d hΛ hP0 hs q).endpointU T κ w₁ ξ- | |
| 129 | - NaturalAxisData.U j ξ) η| ≤ ReferenceJetBounds.jetConstant d.coefficients 0 n/Λ + | |
| 130 | - Cjoin*(T+κ+w₁+w₂) := by | |
| 131 | - obtain ⟨B,hB,hb⟩ := exists_reference_axialStock_bound d hΛ hP0 hs hσ hscale N | |
| 132 | - let Y := Real.log (110/(4/Λ)) | |
| 133 | - refine ⟨B*(1+|Y|), mul_nonneg hB (by positivity),?_⟩ | |
| 134 | - intro q T hT κ hκ w₁ hw₁ w₂ hw₂ n hn η hη | |
| 135 | - let R := reference d hΛ hP0 hs q | |
| 136 | - have hR4 : R.radius0 ≤ 4 := by | |
| 137 | - change 4/Λ ≤ 4 | |
| 138 | - exact (div_le_iff₀ hΛ).mpr (by nlinarith) | |
| 139 | - have hfinal : 0 ≤ R.finalTime := by | |
| 140 | - apply Real.log_nonneg | |
| 141 | - exact (le_div_iff₀ R.radius0_pos).mpr (by linarith) | |
| 142 | - have hres := endpoint_error_from_stock parameterInterval_open R (uStar_smooth j).contDiffOn (w := w₁) | |
| 143 | - hT hκ hfinal (original_interval_interior hη) hB n | |
| 144 | - (reference_initialU_error d hΛ hP0 hs q n hη) | |
| 145 | - (fun t ht => hb q n hn t ht.2 η hη) | |
| 146 | - have hsum : T+κ*Y ≤ (1+|Y|)*(T+κ+w₁+w₂) := by | |
| 147 | - have h1 := mul_nonneg (abs_nonneg Y) hT.le | |
| 148 | - have h2 := mul_le_mul_of_nonneg_left (le_abs_self Y) hκ.1 | |
| 149 | - have h3 := mul_nonneg (by positivity : 0 ≤ 1+|Y|) (add_nonneg hw₁ hw₂) | |
| 150 | - nlinarith [hκ.1] | |
| 151 | - apply hres.trans | |
| 152 | - exact add_le_add le_rfl ((mul_le_mul_of_nonneg_left hsum hB).trans_eq (by ring)) | |
| 153 | - | |
| 154 | -/-- All orders through `N` share one natural constant chosen before `Λ`, and | |
| 155 | -one joining constant chosen before amplitude and the transition widths. -/ | |
| 156 | -theorem exists_linear_Ck_constants (hσ : 0 < σ) (N : ℕ) : | |
| 157 | - ∃ Cnat, 0 ≤ Cnat ∧ ∀ Λ, ∀ hΛ : 0 < Λ, 1 ≤ Λ → | |
| 158 | - AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ → | |
| 159 | - ∃ Cjoin, 0 ≤ Cjoin ∧ ∀ q : Choice d Λ, | |
| 160 | - ∀ T, 0 < T → ∀ κ ∈ Icc (0:ℝ) 1, ∀ w₁, 0 ≤ w₁ → ∀ w₂, 0 ≤ w₂ → | |
| 161 | - ∀ n ≤ N, ∀ η ∈ J, | |
| 162 | - |iteratedDeriv n (fun ξ => (reference d hΛ hP0 hs q).endpointU T κ w₁ ξ- | |
| 163 | - NaturalAxisData.U j ξ) η| ≤ Cnat/Λ+Cjoin*(T+κ+w₁+w₂) := by | |
| 164 | - obtain ⟨Cnat,hCnat,hcn⟩ := finite_majorant | |
| 165 | - (fun n => ReferenceJetBounds.jetConstant d.coefficients 0 n) N | |
| 166 | - refine ⟨Cnat,zero_le_one.trans hCnat,?_⟩ | |
| 167 | - intro Λ hΛ hΛ1 hscale | |
| 168 | - obtain ⟨Cjoin,hCjoin,hcj⟩ := exists_linear_jet_constant d hΛ hP0 hs hΛ1 hσ hscale N | |
| 169 | - refine ⟨Cjoin,hCjoin,?_⟩ | |
| 170 | - intro q T hT κ hκ w₁ hw₁ w₂ hw₂ n hn η hη | |
| 171 | - exact (hcj q T hT κ hκ w₁ hw₁ w₂ hw₂ n hn η hη).trans | |
| 172 | - (add_le_add (div_le_div_of_nonneg_right (hcn n hn) hΛ.le) le_rfl) | |
| 173 | - | |
| 174 | -theorem exists_reference_angularStock_bound (hΛ1 : 1 ≤ Λ) (hσ : 0 < σ) | |
| 175 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 176 | - (N : ℕ) : ∃ B, 0 ≤ B ∧ ∀ q : Choice d Λ, ∀ n ≤ N, | |
| 177 | - ∀ t ∈ Icc (0:ℝ) (reference d hΛ hP0 hs q).finalTime, ∀ η ∈ J, | |
| 178 | - |parameterJet n (reference d hΛ hP0 hs q).angularStock (t,η)| ≤ B := by | |
| 179 | - have ha : 0 < 4/Λ := div_pos (by norm_num) hΛ | |
| 180 | - have haR : 4/Λ ≤ (110:ℝ) := (div_le_iff₀ hΛ).mpr (by nlinarith) | |
| 181 | - obtain ⟨B,hB,hb⟩ := (uniform_reference_quantities d hΛ hP0 hs hσ hscale N ha haR).2.2.1.2 | |
| 182 | - refine ⟨B,hB,?_⟩ | |
| 183 | - intro q n hn t ht η hη | |
| 184 | - let R := reference d hΛ hP0 hs q | |
| 185 | - let X := radius R.radius0 t | |
| 186 | - have hX := radius_final_interval R ht.2 | |
| 187 | - have hXa : 4/Λ ≤ X := by | |
| 188 | - have hm := mul_le_mul_of_nonneg_left (Real.one_le_exp ht.1) R.radius0_pos.le | |
| 189 | - change R.radius0 ≤ R.radius0*Real.exp t | |
| 190 | - simpa only [mul_one] using hm | |
| 191 | - rw [parameterJet_eq_iteratedDeriv parameterInterval_open (R.angularStock_smooth parameterInterval_open) | |
| 192 | - n (original_interval_interior hη)] | |
| 193 | - have hj := (bound_iff_jets (k := N) (B := B) (fun ξ hξ => slice_smoothAt | |
| 194 | - (logDomain parameterInterval parameterInterval_open) (R.angularStock_smooth parameterInterval_open) | |
| 195 | - (X := t) (η := ξ) ⟨mem_univ _,original_interval_interior hξ⟩)).mp | |
| 196 | - exact hj (hb (q,⟨X,hXa,hX.2⟩)) n hn η hη | |
| 197 | - | |
| 198 | -/-- A uniform stock bound controls every logarithmic endpoint jet, including order zero. -/ | |
| 199 | -theorem logarithmic_error_from_stock {J' : Set ℝ} (hJ : IsOpen J') | |
| 200 | - (R : StockReference J') {T κ w₁ w₂ η M : ℝ} (hκ : κ ∈ Icc (0:ℝ) 1) | |
| 201 | - (hfinal : 0 ≤ R.finalTime) (hη : η ∈ J') (hM : 0 ≤ M) (n : ℕ) | |
| 202 | - (hb : ∀ t ∈ Icc (0:ℝ) R.finalTime, |parameterJet n R.angularStock (t,η)| ≤ M) : | |
| 203 | - |iteratedDeriv n (fun ξ => R.logAmplitude T κ w₁ w₂ (R.finalTime,ξ)-R.initialLog ξ) η| ≤ | |
| 204 | - (M+1)*R.finalTime := by | |
| 205 | - rw [StockReference.logAmplitude,logField,integrate_error_jet hJ R.initialLog | |
| 206 | - (angularSlope_smooth T κ R.bigTime w₁ w₂ hJ (R.angularStock_smooth hJ)) n R.finalTime hη] | |
| 207 | - have hi := integral_norm_bound hfinal (F := fun t => | |
| 208 | - parameterJet n (angularSlope T κ R.bigTime w₁ w₂ R.angularStock) (t,η)) (M := M+1) (by | |
| 209 | - intro t ht | |
| 210 | - rw [parameterJet_angularSlope hJ (R.angularStock_smooth hJ) T κ R.bigTime w₁ w₂ n hη] | |
| 211 | - have hs := step_mem (R.bigTime+w₁) w₂ t | |
| 212 | - have hd := damping_mem T hκ t | |
| 213 | - have hz := (controlled_product_bound (a := 1-step (R.bigTime+w₁) w₂ t) | |
| 214 | - (by constructor <;> linarith [hs.1,hs.2]) | |
| 215 | - hd.1 hM (hb t ht)).trans (mul_le_of_le_one_left hM hd.2) | |
| 216 | - have hf : |if n=0 then (2/5:ℝ)*step (R.bigTime+w₁) w₂ t else 0| ≤ 1 := by | |
| 217 | - split_ifs | |
| 218 | - · rw [abs_of_nonneg (mul_nonneg (by norm_num) hs.1)] | |
| 219 | - linarith [hs.2] | |
| 220 | - · norm_num | |
| 221 | - exact (abs_sub _ _).trans (add_le_add hz hf)) | |
| 222 | - simpa only [sub_zero] using hi | |
| 223 | - | |
| 224 | -/-- The normalized logarithmic endpoint envelope is uniform before amplitude and | |
| 225 | -all transition widths, without requiring a separately assumed small-control bound. -/ | |
| 226 | -theorem exists_endpointLog_bound (hΛ1 : 1 ≤ Λ) (hσ : 0 < σ) | |
| 227 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 228 | - (N : ℕ) : ∃ B, 0 ≤ B ∧ ∀ q : Choice d Λ, ∀ T κ w₁ w₂ : ℝ, | |
| 229 | - κ ∈ Icc (0:ℝ) 1 → ∀ n ≤ N, ∀ η ∈ J, | |
| 230 | - |iteratedDeriv n ((reference d hΛ hP0 hs q).endpointLog T κ w₁ w₂ q.C) η| ≤ B := by | |
| 231 | - obtain ⟨M,hM,hm⟩ := exists_reference_angularStock_bound d hΛ hP0 hs hΛ1 hσ hscale N | |
| 232 | - obtain ⟨B,hB,hb⟩ := exists_normalizedReferenceLog_jets d hΛ hσ hscale N | |
| 233 | - let Y := Real.log (110/(4/Λ)) | |
| 234 | - let c := Real.log 220/2 | |
| 235 | - refine ⟨B+(|c|+(M+1)*|Y|),by positivity,?_⟩ | |
| 236 | - intro q T κ w₁ w₂ hκ n hn η hη | |
| 237 | - let R := reference d hΛ hP0 hs q | |
| 238 | - let L := fun ξ => Real.log q.C+R.initialLog ξ | |
| 239 | - have hL : ContDiffOn ℝ ∞ L parameterInterval := | |
| 240 | - contDiffOn_const.add (R.initialLog_smooth parameterInterval_open) | |
| 241 | - have hLbound : |iteratedDeriv n L η| ≤ B := | |
| 242 | - hb q.C q.C_pos q.profile q.δ q.δ_pos q.δ_lt (4/Λ) | |
| 243 | - (div_nonneg (by norm_num) hΛ.le) n hn η hη | |
| 244 | - have hR4 : R.radius0 ≤ 4 := by | |
| 245 | - change 4/Λ ≤ 4 | |
| 246 | - exact (div_le_iff₀ hΛ).mpr (by nlinarith) | |
| 247 | - have hfinal : 0 ≤ R.finalTime := by | |
| 248 | - apply Real.log_nonneg | |
| 249 | - exact (le_div_iff₀ R.radius0_pos).mpr (by linarith) | |
| 250 | - have herr := logarithmic_error_from_stock parameterInterval_open R | |
| 251 | - (T := T) (w₁ := w₁) (w₂ := w₂) hκ hfinal (original_interval_interior hη) hM n | |
| 252 | - (fun t ht => hm q n hn t ht η hη) | |
| 253 | - apply jet_transfer n | |
| 254 | - ((R.endpointLog_smooth parameterInterval_open T κ w₁ w₂ q.C).contDiffAt | |
| 255 | - (parameterInterval_open.mem_nhds (original_interval_interior hη))) | |
| 256 | - (hL.contDiffAt (parameterInterval_open.mem_nhds (original_interval_interior hη))) | |
| 257 | - · have he : (fun ξ => R.endpointLog T κ w₁ w₂ q.C ξ-L ξ) = | |
| 258 | - fun ξ => c+(R.logAmplitude T κ w₁ w₂ (R.finalTime,ξ)-R.initialLog ξ) := by | |
| 259 | - funext ξ | |
| 260 | - dsimp [StockReference.endpointLog,L,c] | |
| 261 | - ring | |
| 262 | - rw [he] | |
| 263 | - have herr' : |iteratedDeriv n (fun ξ => R.logAmplitude T κ w₁ w₂ (R.finalTime,ξ)-R.initialLog ξ) η| | |
| 264 | - ≤ (M+1)*|Y| := herr.trans (mul_le_mul_of_nonneg_left (le_abs_self Y) (by positivity)) | |
| 265 | - by_cases hn0 : n=0 | |
| 266 | - · subst n | |
| 267 | - simp only [iteratedDeriv_zero] at herr' ⊢ | |
| 268 | - exact (abs_add_le _ _).trans (add_le_add le_rfl herr') | |
| 269 | - · rw [iteratedDeriv_const_add (Nat.pos_of_ne_zero hn0)] | |
| 270 | - exact herr'.trans (le_add_of_nonneg_left (abs_nonneg c)) | |
| 271 | - · exact hLbound | |
| 272 | - | |
| 273 | -/-- The two conclusions of the current `join:scale-envelope` hold together for | |
| 274 | -one actual stock-driven continuation and one choice of constants in the printed order. -/ | |
| 275 | -theorem exists_entrance_envelope (hσ : 0 < σ) (N : ℕ) : | |
| 276 | - ∃ Cnat, 0 ≤ Cnat ∧ ∀ Λ, ∀ hΛ : 0 < Λ, 1 ≤ Λ → | |
| 277 | - AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ → | |
| 278 | - ∃ B Cjoin, 0 ≤ B ∧ 0 ≤ Cjoin ∧ ∀ q : Choice d Λ, | |
| 279 | - ∀ T, 0 < T → ∀ κ ∈ Icc (0:ℝ) 1, ∀ w₁, 0 ≤ w₁ → ∀ w₂, 0 ≤ w₂ → | |
| 280 | - ∀ n ≤ N, ∀ η ∈ J, | |
| 281 | - |iteratedDeriv n ((reference d hΛ hP0 hs q).endpointLog T κ w₁ w₂ q.C) η| ≤ B ∧ | |
| 282 | - |iteratedDeriv n (fun ξ => (reference d hΛ hP0 hs q).endpointU T κ w₁ ξ- | |
| 283 | - NaturalAxisData.U j ξ) η| ≤ Cnat/Λ+Cjoin*(T+κ+w₁+w₂) := by | |
| 284 | - obtain ⟨Cnat,hCnat,hcn⟩ := exists_linear_Ck_constants d hP0 hs hσ N | |
| 285 | - refine ⟨Cnat,hCnat,?_⟩ | |
| 286 | - intro Λ hΛ hΛ1 hscale | |
| 287 | - obtain ⟨Cjoin,hCjoin,hcj⟩ := hcn Λ hΛ hΛ1 hscale | |
| 288 | - obtain ⟨B,hB,hb⟩ := exists_endpointLog_bound d hΛ hP0 hs hΛ1 hσ hscale N | |
| 289 | - exact ⟨B,Cjoin,hB,hCjoin,fun q T hT κ hκ w₁ hw₁ w₂ hw₂ n hn η hη => | |
| 290 | - ⟨hb q T κ w₁ w₂ hκ n hn η hη,hcj q T hT κ hκ w₁ hw₁ w₂ hw₂ n hn η hη⟩⟩ | |
| 291 | - | |
| 292 | -/-- These endpoint functions are exactly the physical fields at `X_i = 110`. -/ | |
| 293 | -theorem endpointU_eq_physical {J' : Set ℝ} (R : StockReference J') | |
| 294 | - (hR : R.radius0 < 110) (T κ w η : ℝ) : | |
| 295 | - R.endpointU T κ w η = R.physicalU T κ w (110,η) := by | |
| 296 | - rw [StockReference.physicalU,ite_eq_right (not_le.mpr hR)] | |
| 297 | - rfl | |
| 298 | - | |
| 299 | -theorem endpointLog_eq_physical {J' : Set ℝ} (R : StockReference J') | |
| 300 | - (hR : R.radius0 < 110) (T κ w₁ w₂ : ℝ) {C : ℝ} (hC : 0 < C) (η : ℝ) : | |
| 301 | - R.endpointLog T κ w₁ w₂ C η = | |
| 302 | - Real.log (C*(Real.sqrt 220*R.physicalF T κ w₁ w₂ (110,η))) := by | |
| 303 | - rw [StockReference.physicalF,ite_eq_right (not_le.mpr hR)] | |
| 304 | - rw [Real.log_mul hC.ne' (mul_ne_zero (Real.sqrt_pos.mpr (by norm_num)).ne' (Real.exp_pos _).ne'), | |
| 305 | - Real.log_mul (Real.sqrt_pos.mpr (by norm_num)).ne' (Real.exp_pos _).ne', | |
| 306 | - Real.log_exp,Real.log_sqrt (by norm_num)] | |
| 307 | - simp only [StockReference.endpointLog,StockReference.logPoint,StockReference.logTime, | |
| 308 | - StockReference.finalTime,add_assoc] | |
| 309 | - | |
| 310 | 18 | end NavierStokes.ReferenceEndpointRate |
+0 −35 NavierStokes/ReferencePath.lean View file
| @@ -335,16 +335,6 @@ def rampLimit : ℝ := Real.log (41 / 40 : ℝ) | ||
| 335 | 335 | |
| 336 | 336 | theorem rampLimit_pos : 0 < rampLimit := Real.log_pos (by norm_num) |
| 337 | 337 | |
| 338 | -theorem exists_small_length {ε : ℝ} (hε : 0 < ε) : | |
| 339 | - ∃ δ : ℝ, 0 < δ ∧ 2 * δ < rampLimit ∧ δ < ε := by | |
| 340 | - have hT := rampLimit_pos | |
| 341 | - refine ⟨min (rampLimit / 4) (ε / 2), lt_min (by positivity) (by positivity), ?_, ?_⟩ | |
| 342 | - · have := min_le_left (rampLimit / 4) (ε / 2) | |
| 343 | - have := rampLimit_pos | |
| 344 | - linarith | |
| 345 | - · have := min_le_right (rampLimit / 4) (ε / 2) | |
| 346 | - linarith | |
| 347 | - | |
| 348 | 338 | /-- Only the proved natural-profile regularity and positivity are used in |
| 349 | 339 | constructing REF. The natural ODE is not replaced by a surrogate assumption. -/ |
| 350 | 340 | structure Input where |
| @@ -582,22 +572,6 @@ theorem refU_smooth {δ : ℝ} (hδ : 0 < δ) (hδT : 2 * δ < rampLimit) : | ||
| 582 | 572 | exact N.refU_eq_natural_initial δ hq.le |
| 583 | 573 | exact (hs.congr_of_eventuallyEq heq).contDiffWithinAt |
| 584 | 574 | |
| 585 | -theorem refF_frozen {δ : ℝ} (hδ : 0 < δ) (hδT : 2 * δ < rampLimit) | |
| 586 | - {p : Point} (hη : p.2 ∈ parameterInterval) (hX : N.endpoint * Real.exp (2 * δ) ≤ p.1) : | |
| 587 | - N.refF δ p = Real.exp (continuation δ N.logF (2 * δ, p.2)) := by | |
| 588 | - have hp : 0 < p.1 := (mul_pos N.endpoint_pos (Real.exp_pos _)).trans_le hX | |
| 589 | - rw [N.refF_eq_logtime hδ hδT hη hp, | |
| 590 | - continuation_frozen rampLimit_pos hδ hδT parameterInterval_open N.logF_smooth | |
| 591 | - (p := (N.logTime p.1, p.2)) hη ((N.le_logTime_iff hp).2 hX)] | |
| 592 | - | |
| 593 | -theorem refU_frozen {δ : ℝ} (hδ : 0 < δ) (hδT : 2 * δ < rampLimit) | |
| 594 | - {p : Point} (hη : p.2 ∈ parameterInterval) (hX : N.endpoint * Real.exp (2 * δ) ≤ p.1) : | |
| 595 | - N.refU δ p = continuation δ N.logU (2 * δ, p.2) := by | |
| 596 | - have hp : 0 < p.1 := (mul_pos N.endpoint_pos (Real.exp_pos _)).trans_le hX | |
| 597 | - rw [N.refU_eq_logtime hδ hδT hη hp, | |
| 598 | - continuation_frozen rampLimit_pos hδ hδT parameterInterval_open N.logU_smooth | |
| 599 | - (p := (N.logTime p.1, p.2)) hη ((N.le_logTime_iff hp).2 hX)] | |
| 600 | - | |
| 601 | 575 | /-- Actual pressure, moments, and lag variables are recomputed from REF. -/ |
| 602 | 576 | def histories {δ : ℝ} (hδ : 0 < δ) (hδT : 2 * δ < rampLimit) |
| 603 | 577 | (P0 : ℝ → ℝ) (hP0 : ContDiff ℝ ∞ P0) : ProfileHistories.Profiles N.radialDomain where |
| @@ -816,15 +790,6 @@ theorem freeze_before_Xbig (hscale : 1 ≤ N.scale) {δ : ℝ} (hδT : 2 * δ < | ||
| 816 | 790 | dsimp [Xbig] |
| 817 | 791 | linarith |
| 818 | 792 | |
| 819 | -/-- In particular the reference is already frozen throughout [100,110]. -/ | |
| 820 | -theorem frozen_through_Xi (hscale : 1 ≤ N.scale) {δ : ℝ} (hδ : 0 < δ) | |
| 821 | - (hδT : 2 * δ < rampLimit) {p : Point} (hη : p.2 ∈ parameterInterval) | |
| 822 | - (hX : p.1 ∈ Icc Xbig Xi) : | |
| 823 | - N.refF δ p = Real.exp (continuation δ N.logF (2 * δ, p.2)) ∧ | |
| 824 | - N.refU δ p = continuation δ N.logU (2 * δ, p.2) := by | |
| 825 | - have hfreeze := (N.freeze_before_Xbig hscale hδT).le.trans hX.1 | |
| 826 | - exact ⟨N.refF_frozen hδ hδT hη hfreeze, N.refU_frozen hδ hδT hη hfreeze⟩ | |
| 827 | - | |
| 828 | 793 | end Input |
| 829 | 794 | |
| 830 | 795 | end NavierStokes.ReferencePath |
+0 −388 NavierStokes/ReferenceUniformJets.lean View file
| @@ -10,400 +10,12 @@ namespace NavierStokes.ReferenceUniformJets | ||
| 10 | 10 | open Set Filter MeasureTheory ProfileHistories ReferencePath |
| 11 | 11 | open scoped Topology ContDiff |
| 12 | 12 | |
| 13 | -abbrev etaJet := TransitionRamp.parameterJet | |
| 14 | - | |
| 15 | -theorem etaJet_smooth (D : RadialDomain) {F : Field} | |
| 16 | - (hF : ContDiffOn ℝ ∞ F D.carrier) (n : ℕ) : | |
| 17 | - ContDiffOn ℝ ∞ (etaJet n F) D.carrier := by | |
| 18 | - induction n with | |
| 19 | - | zero => exact hF | |
| 20 | - | succ n ih => exact parameterPartial_smooth D ih | |
| 21 | - | |
| 22 | -theorem etaJet_eq_iteratedDeriv (D : RadialDomain) {F : Field} | |
| 23 | - (hF : ContDiffOn ℝ ∞ F D.carrier) (n : ℕ) {p : Point} (hp : p ∈ D.carrier) : | |
| 24 | - etaJet n F p = iteratedDeriv n (fun η => F (p.1, η)) p.2 := by | |
| 25 | - induction n generalizing p with | |
| 26 | - | zero => rfl | |
| 27 | - | succ n ih => | |
| 28 | - have he : (fun η => etaJet n F (p.1, η)) =ᶠ[𝓝 p.2] | |
| 29 | - iteratedDeriv n (fun η => F (p.1, η)) := by | |
| 30 | - filter_upwards [(continuousAt_const.prodMk continuousAt_id).eventually | |
| 31 | - (D.isOpen.mem_nhds hp)] with η hη | |
| 32 | - exact ih hη | |
| 33 | - change parameterPartial (etaJet n F) p = _ | |
| 34 | - rw [iteratedDeriv_succ] | |
| 35 | - exact (parameterPartial_hasDerivAt D (etaJet_smooth D hF n) hp).deriv.symm.trans he.deriv_eq | |
| 36 | - | |
| 37 | -theorem parameterPartial_congr_on (D : RadialDomain) {F G : Field} | |
| 38 | - (he : EqOn F G D.carrier) {p : Point} (hp : p ∈ D.carrier) : | |
| 39 | - parameterPartial F p = parameterPartial G p := by | |
| 40 | - have hh : F =ᶠ[𝓝 p] G := by | |
| 41 | - filter_upwards [D.isOpen.mem_nhds hp] with q hq | |
| 42 | - exact he hq | |
| 43 | - exact congrArg (fun A : Point →L[ℝ] ℝ => A (0, 1)) hh.fderiv_eq | |
| 44 | - | |
| 45 | -theorem etaJet_congr_on (D : RadialDomain) {F G : Field} | |
| 46 | - (he : EqOn F G D.carrier) (n : ℕ) {p : Point} (hp : p ∈ D.carrier) : | |
| 47 | - etaJet n F p = etaJet n G p := by | |
| 48 | - induction n generalizing p with | |
| 49 | - | zero => exact he hp | |
| 50 | - | succ n ih => exact parameterPartial_congr_on D (fun p hp => ih hp) hp | |
| 51 | - | |
| 52 | -theorem etaJet_primitive (D : RadialDomain) {F : Field} | |
| 53 | - (hF : ContDiffOn ℝ ∞ F D.carrier) (n : ℕ) {p : Point} (hp : p ∈ D.carrier) : | |
| 54 | - etaJet n (primitive F) p = primitive (etaJet n F) p := by | |
| 55 | - induction n generalizing p with | |
| 56 | - | zero => rfl | |
| 57 | - | succ n ih => | |
| 58 | - change parameterPartial (etaJet n (primitive F)) p = _ | |
| 59 | - rw [parameterPartial_congr_on D (fun q hq => ih hq) hp, | |
| 60 | - parameterPartial_primitive D (etaJet_smooth D hF n) hp] | |
| 61 | - rfl | |
| 62 | - | |
| 63 | -theorem etaJet_mul_radial (D : RadialDomain) {F : Field} {c : ℝ → ℝ} | |
| 64 | - (hF : ContDiffOn ℝ ∞ F D.carrier) (hc : ContDiff ℝ ∞ c) | |
| 65 | - (n : ℕ) {p : Point} (hp : p ∈ D.carrier) : | |
| 66 | - etaJet n (fun q => c q.1 * F q) p = c p.1 * etaJet n F p := by | |
| 67 | - have hprod : ContDiffOn ℝ ∞ (fun q : Point => c q.1 * F q) D.carrier := | |
| 68 | - (hc.comp contDiff_fst).contDiffOn.mul hF | |
| 69 | - rw [etaJet_eq_iteratedDeriv D hprod n hp, etaJet_eq_iteratedDeriv D hF n hp] | |
| 70 | - exact iteratedDeriv_const_mul (c p.1) | |
| 71 | - (((hF.contDiffAt (D.isOpen.mem_nhds hp)).comp p.2 | |
| 72 | - (contDiffAt_const.prodMk contDiffAt_id)).of_le (TransitionRamp.nat_le_infty n)) | |
| 73 | - | |
| 74 | -theorem etaJet_sub (D : RadialDomain) {F G : Field} | |
| 75 | - (hF : ContDiffOn ℝ ∞ F D.carrier) (hG : ContDiffOn ℝ ∞ G D.carrier) | |
| 76 | - (n : ℕ) {p : Point} (hp : p ∈ D.carrier) : | |
| 77 | - etaJet n (fun q => F q - G q) p = etaJet n F p - etaJet n G p := by | |
| 78 | - rw [etaJet_eq_iteratedDeriv D (hF.sub hG) n hp, | |
| 79 | - etaJet_eq_iteratedDeriv D hF n hp, etaJet_eq_iteratedDeriv D hG n hp] | |
| 80 | - exact iteratedDeriv_sub | |
| 81 | - (((hF.contDiffAt (D.isOpen.mem_nhds hp)).comp p.2 | |
| 82 | - (contDiffAt_const.prodMk contDiffAt_id)).of_le (TransitionRamp.nat_le_infty n)) | |
| 83 | - (((hG.contDiffAt (D.isOpen.mem_nhds hp)).comp p.2 | |
| 84 | - (contDiffAt_const.prodMk contDiffAt_id)).of_le (TransitionRamp.nat_le_infty n)) | |
| 85 | - | |
| 86 | -theorem slopeCutoff_antitone {δ : ℝ} (hδ : 0 < δ) : Antitone (slopeCutoff δ) := by | |
| 87 | - intro s t hst | |
| 88 | - have he := Real.smoothTransition.monotone | |
| 89 | - (div_le_div_of_nonneg_right (sub_le_sub_right hst δ) hδ.le) | |
| 90 | - unfold slopeCutoff | |
| 91 | - linarith | |
| 92 | - | |
| 93 | -theorem slopeCutoff_deriv_nonpos {δ : ℝ} (hδ : 0 < δ) (t : ℝ) : | |
| 94 | - deriv (slopeCutoff δ) t ≤ 0 := (slopeCutoff_antitone hδ).deriv_nonpos | |
| 95 | - | |
| 96 | -/-- The prescribed same-radius ODE has a positive averaging representation. -/ | |
| 97 | -theorem continuation_parts {T δ : ℝ} (hT : 0 < T) (hδ : 0 < δ) | |
| 98 | - {J : Set ℝ} (hJ : IsOpen J) {G : Field} | |
| 99 | - (hG : ContDiffOn ℝ ∞ G (earlyStrip T hT J hJ).carrier) | |
| 100 | - {p : Point} (hp : p ∈ (earlyStrip T hT J hJ).carrier) : | |
| 101 | - continuation δ G p = slopeCutoff δ p.1 * G p - | |
| 102 | - primitive (fun q => deriv (slopeCutoff δ) q.1 * G q) p := by | |
| 103 | - let D := earlyStrip T hT J hJ | |
| 104 | - have hmem (x : ℝ) (hx : x ∈ uIcc 0 p.1) : (x, p.2) ∈ D.carrier := D.segment_mem hp hx | |
| 105 | - have hc := slopeCutoff_smooth δ | |
| 106 | - have hdc : Continuous (deriv (slopeCutoff δ)) := hc.continuous_deriv (by simp) | |
| 107 | - have hg : ContinuousOn (fun x => G (x, p.2)) (uIcc 0 p.1) := | |
| 108 | - (radial_slice_continuous D hG p.2).mono hmem | |
| 109 | - have hgd : ContinuousOn (fun x => radialPartial G (x, p.2)) (uIcc 0 p.1) := | |
| 110 | - (radial_slice_continuous D (radialPartial_smooth D hG) p.2).mono hmem | |
| 111 | - have he := intervalIntegral.integral_mul_deriv_eq_deriv_mul_of_hasDerivAt | |
| 112 | - hc.continuous.continuousOn hg | |
| 113 | - (fun x _ => (hc.differentiable (by simp)).differentiableAt.hasDerivAt) | |
| 114 | - (fun x hx => radialPartial_hasDerivAt D hG (hmem x (Ioo_subset_Icc_self hx))) | |
| 115 | - (hdc.intervalIntegrable 0 p.1) (hgd.intervalIntegrable) | |
| 116 | - change G (0, p.2) + (∫ x in (0 : ℝ)..p.1, slopeCutoff δ x * radialPartial G (x, p.2)) = _ | |
| 117 | - rw [he, slopeCutoff_one hδ (by linarith : (0 : ℝ) ≤ δ)] | |
| 118 | - simp only [one_mul, primitive] | |
| 119 | - ring | |
| 120 | - | |
| 121 | -theorem continuation_etaJet_parts {T δ : ℝ} (hT : 0 < T) (hδ : 0 < δ) | |
| 122 | - {J : Set ℝ} (hJ : IsOpen J) {G : Field} | |
| 123 | - (hG : ContDiffOn ℝ ∞ G (earlyStrip T hT J hJ).carrier) | |
| 124 | - (n : ℕ) {p : Point} (hp : p ∈ (earlyStrip T hT J hJ).carrier) : | |
| 125 | - etaJet n (continuation δ G) p = slopeCutoff δ p.1 * etaJet n G p - | |
| 126 | - primitive (fun q => deriv (slopeCutoff δ) q.1 * etaJet n G q) p := by | |
| 127 | - let D := earlyStrip T hT J hJ | |
| 128 | - have hc := slopeCutoff_smooth δ | |
| 129 | - have hd : ContDiff ℝ ∞ (deriv (slopeCutoff δ)) := (contDiff_infty_iff_deriv.mp hc).2 | |
| 130 | - have hg : ContDiffOn ℝ ∞ (fun q : Point => deriv (slopeCutoff δ) q.1 * G q) D.carrier := | |
| 131 | - (hd.comp contDiff_fst).contDiffOn.mul hG | |
| 132 | - have hprod : ContDiffOn ℝ ∞ (fun q : Point => slopeCutoff δ q.1 * G q) D.carrier := by | |
| 133 | - simpa only [Function.comp_def] using (hc.comp contDiff_fst).contDiffOn.mul hG | |
| 134 | - rw [etaJet_congr_on D (fun q hq => continuation_parts hT hδ hJ hG hq) n hp, | |
| 135 | - etaJet_sub D hprod (primitive_smooth D hg) n hp, | |
| 136 | - etaJet_mul_radial D hG hc n hp, etaJet_primitive D hg n hp] | |
| 137 | - congr 1 | |
| 138 | - apply intervalIntegral.integral_congr | |
| 139 | - intro x hx | |
| 140 | - exact etaJet_mul_radial D hG hd n (D.segment_mem hp hx) | |
| 141 | - | |
| 142 | -/-- Parameter differentiation preserves the positive-average contraction. -/ | |
| 143 | -theorem continuation_etaJet_bound {T δ : ℝ} (hT : 0 < T) (hδ : 0 < δ) | |
| 144 | - {J : Set ℝ} (hJ : IsOpen J) {G : Field} | |
| 145 | - (hG : ContDiffOn ℝ ∞ G (earlyStrip T hT J hJ).carrier) | |
| 146 | - (n : ℕ) {p : Point} (hp : p ∈ (earlyStrip T hT J hJ).carrier) | |
| 147 | - (hp0 : 0 ≤ p.1) {B : ℝ} (_hB : 0 ≤ B) | |
| 148 | - (hb : ∀ x ∈ Icc (0 : ℝ) p.1, |etaJet n G (x, p.2)| ≤ B) : | |
| 149 | - |etaJet n (continuation δ G) p| ≤ B := by | |
| 150 | - rw [continuation_etaJet_parts hT hδ hJ hG n hp] | |
| 151 | - have hd := (slopeCutoff_smooth δ).continuous_deriv (by simp) | |
| 152 | - have hi : |primitive (fun q => deriv (slopeCutoff δ) q.1 * etaJet n G q) p| ≤ | |
| 153 | - (1 - slopeCutoff δ p.1) * B := by | |
| 154 | - have he := intervalIntegral.norm_integral_le_of_norm_le (μ := volume) hp0 | |
| 155 | - (f := fun x => deriv (slopeCutoff δ) x * etaJet n G (x, p.2)) | |
| 156 | - (g := fun x => -deriv (slopeCutoff δ) x * B) | |
| 157 | - (Eventually.of_forall (fun x hx => by | |
| 158 | - rw [Real.norm_eq_abs, abs_mul, abs_of_nonpos (slopeCutoff_deriv_nonpos hδ x)] | |
| 159 | - exact mul_le_mul_of_nonneg_left (hb x ⟨hx.1.le, hx.2⟩) | |
| 160 | - (neg_nonneg.mpr (slopeCutoff_deriv_nonpos hδ x)))) | |
| 161 | - ((hd.neg.mul continuous_const).intervalIntegrable 0 p.1) | |
| 162 | - rw [intervalIntegral.integral_mul_const, intervalIntegral.integral_neg, | |
| 163 | - intervalIntegral.integral_eq_sub_of_hasDerivAt | |
| 164 | - (fun x _ => ((slopeCutoff_smooth δ).differentiable (by simp)).differentiableAt.hasDerivAt) | |
| 165 | - (hd.intervalIntegrable 0 p.1), | |
| 166 | - slopeCutoff_one hδ (by linarith : (0 : ℝ) ≤ δ)] at he | |
| 167 | - simpa only [Real.norm_eq_abs, primitive, neg_sub] using he | |
| 168 | - calc | |
| 169 | - _ ≤ |slopeCutoff δ p.1 * etaJet n G p| + | |
| 170 | - |primitive (fun q => deriv (slopeCutoff δ) q.1 * etaJet n G q) p| := by | |
| 171 | - simpa only [Real.norm_eq_abs] using norm_sub_le | |
| 172 | - (slopeCutoff δ p.1 * etaJet n G p) | |
| 173 | - (primitive (fun q => deriv (slopeCutoff δ) q.1 * etaJet n G q) p) | |
| 174 | - _ ≤ slopeCutoff δ p.1 * B + (1 - slopeCutoff δ p.1) * B := by | |
| 175 | - apply add_le_add _ hi | |
| 176 | - rw [abs_mul, abs_of_nonneg (slopeCutoff_mem δ p.1).1] | |
| 177 | - exact mul_le_mul_of_nonneg_left (hb p.1 ⟨hp0, le_rfl⟩) (slopeCutoff_mem δ p.1).1 | |
| 178 | - _ = B := by ring | |
| 179 | - | |
| 180 | -/-- The reference continuation preserves additive constants exactly. -/ | |
| 181 | -theorem continuation_add_const (δ c : ℝ) (G : Field) (p : Point) : | |
| 182 | - continuation δ (fun q => c + G q) p = c + continuation δ G p := by | |
| 183 | - have hd : dampedSlope δ (fun q => c + G q) = dampedSlope δ G := by | |
| 184 | - funext q | |
| 185 | - simp only [dampedSlope, radialPartial, fderiv_const_add] | |
| 186 | - simp only [continuation, hd] | |
| 187 | - ring | |
| 188 | - | |
| 189 | -/-- The bound covers the entire frozen hold, with no width-dependent constant. -/ | |
| 190 | -theorem continuation_jet_bound {T δ : ℝ} (hT : 0 < T) (hδ : 0 < δ) | |
| 191 | - (hδT : 2 * δ < T) {J : Set ℝ} (hJ : IsOpen J) {G : Field} | |
| 192 | - (hG : ContDiffOn ℝ ∞ G (earlyStrip T hT J hJ).carrier) | |
| 193 | - (n : ℕ) {t η B : ℝ} (ht : 0 ≤ t) (hη : η ∈ J) (hB : 0 ≤ B) | |
| 194 | - (hb : ∀ s ∈ Icc (0 : ℝ) (2 * δ), | |
| 195 | - |iteratedDeriv n (fun ξ => G (s, ξ)) η| ≤ B) : | |
| 196 | - |iteratedDeriv n (fun ξ => continuation δ G (t, ξ)) η| ≤ B := by | |
| 197 | - have hs := continuation_smooth hT hδ hδT hJ hG | |
| 198 | - have hlocal (u : ℝ) (hu : u ∈ Icc (0 : ℝ) (2 * δ)) : | |
| 199 | - |iteratedDeriv n (fun ξ => continuation δ G (u, ξ)) η| ≤ B := by | |
| 200 | - rw [← etaJet_eq_iteratedDeriv (fullStrip J hJ) hs n (p := (u, η)) ⟨mem_univ _, hη⟩] | |
| 201 | - apply continuation_etaJet_bound hT hδ hJ hG n (p := (u, η)) ⟨hu.2.trans_lt hδT, hη⟩ hu.1 hB | |
| 202 | - intro s hs | |
| 203 | - rw [etaJet_eq_iteratedDeriv (earlyStrip T hT J hJ) hG n (p := (s, η)) | |
| 204 | - ⟨(hs.2.trans hu.2).trans_lt hδT, hη⟩] | |
| 205 | - exact hb s ⟨hs.1, hs.2.trans hu.2⟩ | |
| 206 | - by_cases hsmall : t ≤ 2 * δ | |
| 207 | - · exact hlocal t ⟨ht, hsmall⟩ | |
| 208 | - · have he : (fun ξ => continuation δ G (t, ξ)) =ᶠ[𝓝 η] | |
| 209 | - (fun ξ => continuation δ G (2 * δ, ξ)) := by | |
| 210 | - filter_upwards [hJ.mem_nhds hη] with ξ hξ | |
| 211 | - exact continuation_frozen hT hδ hδT hJ hG hξ (le_of_not_ge hsmall) | |
| 212 | - rw [he.iteratedDeriv_eq n] | |
| 213 | - exact hlocal (2 * δ) ⟨by positivity, le_rfl⟩ | |
| 214 | - | |
| 215 | 13 | section NaturalReference |
| 216 | 14 | |
| 217 | 15 | open NaturalProfile NaturalAxisCoefficients TransitionRamp |
| 218 | 16 | |
| 219 | 17 | variable {h j σ Λ : ℝ} {P0 : ℝ → ℝ} (d : AnalyticInputs h j σ P0) |
| 220 | 18 | |
| 221 | -theorem short_scaled_radius {s : ℝ} (_hs0 : 0 ≤ s) (hs : s < rampLimit) : | |
| 222 | - 4 * Real.exp s ∈ Icc (0 : ℝ) (41 / 10) := by | |
| 223 | - have he : Real.exp s < 41 / 40 := by | |
| 224 | - simpa only [rampLimit, Real.exp_log (by norm_num : (0 : ℝ) < 41 / 40)] using | |
| 225 | - Real.exp_lt_exp.mpr hs | |
| 226 | - constructor <;> nlinarith [Real.exp_pos s] | |
| 227 | - | |
| 228 | -/-- All axial parameter jets, including at the axis, use one bound chosen | |
| 229 | -before the normalization and valid for every admissible reference width. -/ | |
| 230 | -theorem exists_referenceU_jets (hΛ : 0 < Λ) (N : ℕ) : | |
| 231 | - ∃ B, 1 ≤ B ∧ ∀ C, ∀ E : NaturalEntrance.CoefficientProfile d Λ C, | |
| 232 | - ∀ δ, 0 < δ → 2 * δ < rampLimit → ∀ X, 0 ≤ X → ∀ n ≤ N, | |
| 233 | - ∀ η ∈ Icc (-1 : ℝ) 1, | |
| 234 | - |iteratedDeriv n (fun ξ => (Input.ofNatural hΛ E.family).refU δ (X, ξ)) η| ≤ B := by | |
| 235 | - obtain ⟨B, hB, hb⟩ := exists_naturalU_jets d hΛ N | |
| 236 | - refine ⟨B, hB, ?_⟩ | |
| 237 | - intro C E δ hδ hδT X hX n hn η hη | |
| 238 | - let A := Input.ofNatural hΛ E.family | |
| 239 | - have hηJ := original_interval_interior hη | |
| 240 | - by_cases hXi : X ≤ A.endpoint | |
| 241 | - · have he : (fun ξ => A.refU δ (X, ξ)) = fun ξ => E.family.U (X, ξ) := | |
| 242 | - funext (fun ξ => A.refU_eq_natural_initial δ hXi) | |
| 243 | - rw [he] | |
| 244 | - apply hb C E X _ n hn η hη | |
| 245 | - have hu := mul_le_mul_of_nonneg_left hXi hΛ.le | |
| 246 | - have heq : Λ * A.endpoint = 4 := A.scale_endpoint | |
| 247 | - rw [heq] at hu | |
| 248 | - exact ⟨mul_nonneg hΛ.le hX, by linarith⟩ | |
| 249 | - · have hXp : 0 < X := A.endpoint_pos.trans (lt_of_not_ge hXi) | |
| 250 | - have ht : 0 ≤ A.logTime X := (A.le_logTime_iff hXp).mpr | |
| 251 | - (by simpa only [Real.exp_zero, mul_one] using (le_of_not_ge hXi)) | |
| 252 | - have he : (fun ξ => A.refU δ (X, ξ)) =ᶠ[𝓝 η] | |
| 253 | - (fun ξ => continuation δ A.logU (A.logTime X, ξ)) := by | |
| 254 | - filter_upwards [parameterInterval_open.mem_nhds hηJ] with ξ hξ | |
| 255 | - exact A.refU_eq_logtime hδ hδT hξ hXp | |
| 256 | - rw [he.iteratedDeriv_eq n] | |
| 257 | - apply continuation_jet_bound rampLimit_pos hδ hδT parameterInterval_open A.logU_smooth | |
| 258 | - n ht hηJ (zero_le_one.trans hB) | |
| 259 | - intro t ht | |
| 260 | - change |iteratedDeriv n (fun ξ => E.family.U (A.endpoint * Real.exp t, ξ)) η| ≤ B | |
| 261 | - apply hb C E _ _ n hn η hη | |
| 262 | - have heq : Λ * (A.endpoint * Real.exp t) = 4 * Real.exp t := by | |
| 263 | - rw [← mul_assoc, show Λ * A.endpoint = 4 from A.scale_endpoint] | |
| 264 | - rw [heq] | |
| 265 | - exact short_scaled_radius ht.1 (ht.2.trans_lt hδT) | |
| 266 | - | |
| 267 | -/-- The normalization cancels exactly in the logarithmic natural field. -/ | |
| 268 | -theorem normalized_natural_log_identity (hσ : 0 < σ) | |
| 269 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 270 | - {C : ℝ} (E : NaturalEntrance.CoefficientProfile d Λ C) (hC : 0 < C) | |
| 271 | - {X η : ℝ} (hX : Λ * X ∈ Icc (0 : ℝ) (41 / 10)) (hη : η ∈ parameterInterval) : | |
| 272 | - Real.log C + Real.log (E.family.f (X, η)) = normalizedNaturalLog d E (Λ * X) η := by | |
| 273 | - have hphi : 0 < AxisEvaluation.profile window d.coefficients.epsilon E.coefficients.1 (Λ * X, η) := | |
| 274 | - lt_trans (by norm_num) (NaturalEntrance.coefficient_phi_lower d.coefficients hσ | |
| 275 | - (NaturalEntrance.profileErrorConstant_nonneg d) hscale E.coefficients E.norm_error hX.1 hX.2 hη) | |
| 276 | - rw [natural_normalization_identity d E hC hphi, | |
| 277 | - Real.log_mul (inv_ne_zero hC.ne') (Real.exp_pos _).ne', Real.log_inv, Real.log_exp] | |
| 278 | - ring | |
| 279 | - | |
| 280 | -noncomputable def normalizedReferenceLog {C : ℝ} | |
| 281 | - (E : NaturalEntrance.CoefficientProfile d Λ C) (hΛ : 0 < Λ) (δ X η : ℝ) : ℝ := | |
| 282 | - Real.log C + Real.log ((Input.ofNatural hΛ E.family).refF δ (X, η)) | |
| 283 | - | |
| 284 | -theorem normalizedReferenceLog_smooth {C : ℝ} | |
| 285 | - (E : NaturalEntrance.CoefficientProfile d Λ C) (hΛ : 0 < Λ) | |
| 286 | - {δ X : ℝ} (hδ : 0 < δ) (hδT : 2 * δ < rampLimit) (hX : 0 ≤ X) : | |
| 287 | - ContDiffOn ℝ ∞ (normalizedReferenceLog d E hΛ δ X) parameterInterval := by | |
| 288 | - let A := Input.ofNatural hΛ E.family | |
| 289 | - have hp (η : ℝ) (hη : η ∈ parameterInterval) : (X, η) ∈ A.radialDomain.carrier := | |
| 290 | - ⟨lt_of_lt_of_le (by norm_num) (mul_nonneg hΛ.le hX), hη⟩ | |
| 291 | - have hf : ContDiffOn ℝ ∞ (fun η => A.refF δ (X, η)) parameterInterval := | |
| 292 | - (A.refF_smooth hδ hδT).comp (contDiff_const.prodMk contDiff_id).contDiffOn hp | |
| 293 | - exact contDiffOn_const.add (hf.log (fun η hη => (A.refF_pos δ (hp η hη) hX).ne')) | |
| 294 | - | |
| 295 | -/-- Both upper and lower logarithmic bounds, in every fixed parameter jet, | |
| 296 | -are uniform before choosing `C` and over the entire allowed cutoff interval. -/ | |
| 297 | -theorem exists_normalizedReferenceLog_jets (hΛ : 0 < Λ) (hσ : 0 < σ) | |
| 298 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 299 | - (N : ℕ) : | |
| 300 | - ∃ B, 1 ≤ B ∧ ∀ C, 0 < C → ∀ E : NaturalEntrance.CoefficientProfile d Λ C, | |
| 301 | - ∀ δ, 0 < δ → 2 * δ < rampLimit → ∀ X, 0 ≤ X → ∀ n ≤ N, | |
| 302 | - ∀ η ∈ Icc (-1 : ℝ) 1, | |
| 303 | - |iteratedDeriv n (normalizedReferenceLog d E hΛ δ X) η| ≤ B := by | |
| 304 | - obtain ⟨B, hB, hb⟩ := exists_normalized_natural_jets d hΛ hσ hscale N | |
| 305 | - refine ⟨B, hB, ?_⟩ | |
| 306 | - intro C hC E δ hδ hδT X hX n hn η hη | |
| 307 | - let A := Input.ofNatural hΛ E.family | |
| 308 | - have hηJ := original_interval_interior hη | |
| 309 | - by_cases hXi : X ≤ A.endpoint | |
| 310 | - · have hY : Λ * X ∈ Icc (0 : ℝ) (41 / 10) := by | |
| 311 | - have hu := mul_le_mul_of_nonneg_left hXi hΛ.le | |
| 312 | - rw [show Λ * A.endpoint = 4 from A.scale_endpoint] at hu | |
| 313 | - exact ⟨mul_nonneg hΛ.le hX, by linarith⟩ | |
| 314 | - have he : normalizedReferenceLog d E hΛ δ X =ᶠ[𝓝 η] normalizedNaturalLog d E (Λ * X) := by | |
| 315 | - filter_upwards [parameterInterval_open.mem_nhds hηJ] with ξ hξ | |
| 316 | - unfold normalizedReferenceLog | |
| 317 | - rw [A.refF_eq_natural_initial δ hXi] | |
| 318 | - exact normalized_natural_log_identity d hσ hscale E hC hY hξ | |
| 319 | - rw [he.iteratedDeriv_eq n] | |
| 320 | - exact hb C E (Λ * X) hY n hn η hη | |
| 321 | - · have hXp : 0 < X := A.endpoint_pos.trans (lt_of_not_ge hXi) | |
| 322 | - have ht : 0 ≤ A.logTime X := (A.le_logTime_iff hXp).mpr | |
| 323 | - (by simpa only [Real.exp_zero, mul_one] using (le_of_not_ge hXi)) | |
| 324 | - let G : ProfileHistories.Field := fun p => Real.log C + A.logF p | |
| 325 | - have hG : ContDiffOn ℝ ∞ G (earlyStrip rampLimit rampLimit_pos parameterInterval parameterInterval_open).carrier := | |
| 326 | - contDiffOn_const.add A.logF_smooth | |
| 327 | - have he : normalizedReferenceLog d E hΛ δ X =ᶠ[𝓝 η] | |
| 328 | - (fun ξ => continuation δ G (A.logTime X, ξ)) := by | |
| 329 | - filter_upwards [parameterInterval_open.mem_nhds hηJ] with ξ hξ | |
| 330 | - unfold normalizedReferenceLog | |
| 331 | - rw [A.refF_eq_logtime hδ hδT hξ hXp, Real.log_exp] | |
| 332 | - exact (continuation_add_const δ (Real.log C) A.logF _).symm | |
| 333 | - rw [he.iteratedDeriv_eq n] | |
| 334 | - apply continuation_jet_bound rampLimit_pos hδ hδT parameterInterval_open hG n ht hηJ | |
| 335 | - (zero_le_one.trans hB) | |
| 336 | - intro s hs | |
| 337 | - have hY := short_scaled_radius hs.1 (hs.2.trans_lt hδT) | |
| 338 | - have heq : Λ * (A.endpoint * Real.exp s) = 4 * Real.exp s := by | |
| 339 | - rw [← mul_assoc, show Λ * A.endpoint = 4 from A.scale_endpoint] | |
| 340 | - have he : (fun ξ => G (s, ξ)) =ᶠ[𝓝 η] normalizedNaturalLog d E (4 * Real.exp s) := by | |
| 341 | - filter_upwards [parameterInterval_open.mem_nhds hηJ] with ξ hξ | |
| 342 | - change Real.log C + Real.log (E.family.f (A.endpoint * Real.exp s, ξ)) = _ | |
| 343 | - rw [normalized_natural_log_identity d hσ hscale E hC (heq ▸ hY) hξ, heq] | |
| 344 | - rw [he.iteratedDeriv_eq n] | |
| 345 | - exact hb C E (4 * Real.exp s) hY n hn η hη | |
| 346 | - | |
| 347 | - | |
| 348 | -theorem normalizedReferenceF_identity {C : ℝ} | |
| 349 | - (E : NaturalEntrance.CoefficientProfile d Λ C) (hΛ : 0 < Λ) (hC : 0 < C) | |
| 350 | - (δ : ℝ) {X η : ℝ} (hX : 0 ≤ X) (hη : η ∈ parameterInterval) : | |
| 351 | - C * (Input.ofNatural hΛ E.family).refF δ (X, η) = | |
| 352 | - Real.exp (normalizedReferenceLog d E hΛ δ X η) := by | |
| 353 | - let A := Input.ofNatural hΛ E.family | |
| 354 | - have hp : (X, η) ∈ A.radialDomain.carrier := | |
| 355 | - ⟨lt_of_lt_of_le (by norm_num) (mul_nonneg hΛ.le hX), hη⟩ | |
| 356 | - rw [normalizedReferenceLog, Real.exp_add, Real.exp_log hC, | |
| 357 | - Real.exp_log (A.refF_pos δ hp hX)] | |
| 358 | - | |
| 359 | -/-- Normalized angular fields and their reciprocals have uniform all-order | |
| 360 | -parameter bounds, including on the natural part of the reference. -/ | |
| 361 | -theorem exists_normalizedReferenceF_jets (hΛ : 0 < Λ) (hσ : 0 < σ) | |
| 362 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 363 | - (N : ℕ) : | |
| 364 | - ∃ K, 1 ≤ K ∧ ∀ C, 0 < C → ∀ E : NaturalEntrance.CoefficientProfile d Λ C, | |
| 365 | - ∀ δ, 0 < δ → 2 * δ < rampLimit → ∀ X, 0 ≤ X → ∀ n ≤ N, | |
| 366 | - ∀ η ∈ Icc (-1 : ℝ) 1, | |
| 367 | - |iteratedDeriv n (fun ξ => C * (Input.ofNatural hΛ E.family).refF δ (X, ξ)) η| ≤ K ∧ | |
| 368 | - |iteratedDeriv n (fun ξ => (C * (Input.ofNatural hΛ E.family).refF δ (X, ξ))⁻¹) η| ≤ K := by | |
| 369 | - obtain ⟨B, hB, hb⟩ := exists_normalizedReferenceLog_jets d hΛ hσ hscale N | |
| 370 | - obtain ⟨K, hK, hk⟩ := finite_majorant (fun n => n.factorial * Real.exp B * B ^ n) N | |
| 371 | - refine ⟨K, hK, ?_⟩ | |
| 372 | - intro C hC E δ hδ hδT X hX n hn η hη | |
| 373 | - let A := Input.ofNatural hΛ E.family | |
| 374 | - let L := normalizedReferenceLog d E hΛ δ X | |
| 375 | - have hηJ := original_interval_interior hη | |
| 376 | - have hL := normalizedReferenceLog_smooth d E hΛ hδ hδT hX | |
| 377 | - have hLb (i : ℕ) (hi : i ≤ n) : |iteratedDeriv i L η| ≤ B := | |
| 378 | - hb C hC E δ hδ hδT X hX i (hi.trans hn) η hη | |
| 379 | - have he : (fun ξ => C * A.refF δ (X, ξ)) =ᶠ[𝓝 η] (fun ξ => Real.exp (L ξ)) := by | |
| 380 | - filter_upwards [parameterInterval_open.mem_nhds hηJ] with ξ hξ | |
| 381 | - exact normalizedReferenceF_identity d E hΛ hC δ hX hξ | |
| 382 | - have hi : (fun ξ => (C * A.refF δ (X, ξ))⁻¹) =ᶠ[𝓝 η] (fun ξ => Real.exp (-L ξ)) := by | |
| 383 | - filter_upwards [he] with ξ hξ | |
| 384 | - rw [hξ, Real.exp_neg] | |
| 385 | - constructor | |
| 386 | - · rw [he.iteratedDeriv_eq n] | |
| 387 | - exact (exp_jet_bound_local parameterInterval_open hL hηJ n hB hLb).trans (hk n hn) | |
| 388 | - · rw [hi.iteratedDeriv_eq n] | |
| 389 | - exact (exp_jet_bound_local parameterInterval_open hL.neg hηJ n hB | |
| 390 | - (fun i hi => by simpa only [iteratedDeriv_fun_neg, abs_neg] using hLb i hi)).trans (hk n hn) | |
| 391 | - | |
| 392 | -/-- The unnormalized angular field has its actual `C⁻¹` scale, uniformly | |
| 393 | -through the reference cutoff and the arbitrarily long frozen hold. -/ | |
| 394 | -theorem referenceF_jet_of_normalized {C δ X η K : ℝ} | |
| 395 | - (E : NaturalEntrance.CoefficientProfile d Λ C) (hΛ : 0 < Λ) (hC : 0 < C) | |
| 396 | - (hδ : 0 < δ) (hδT : 2 * δ < rampLimit) (hX : 0 ≤ X) | |
| 397 | - (hη : η ∈ parameterInterval) (n : ℕ) | |
| 398 | - (hb : |iteratedDeriv n (fun ξ => C * (Input.ofNatural hΛ E.family).refF δ (X, ξ)) η| ≤ K) : | |
| 399 | - |iteratedDeriv n (fun ξ => (Input.ofNatural hΛ E.family).refF δ (X, ξ)) η| ≤ K / C := by | |
| 400 | - let A := Input.ofNatural hΛ E.family | |
| 401 | - have hp : (X, η) ∈ A.radialDomain.carrier := | |
| 402 | - ⟨lt_of_lt_of_le (by norm_num) (mul_nonneg hΛ.le hX), hη⟩ | |
| 403 | - have hs := ((A.refF_smooth hδ hδT).contDiffAt (A.radialDomain.isOpen.mem_nhds hp)).comp η | |
| 404 | - (contDiffAt_const.prodMk contDiffAt_id) | |
| 405 | - rw [iteratedDeriv_const_mul_field, abs_mul, abs_of_pos hC] at hb | |
| 406 | - exact (le_div_iff₀ hC).mpr (by simpa only [mul_comm] using hb) | |
| 407 | 19 | |
| 408 | 20 | end NaturalReference |
| 409 | 21 | |
+0 −415 NavierStokes/ReferenceUniformStocks.lean View file
| @@ -11,190 +11,12 @@ open Set Filter MeasureTheory ProfileHistories ReferencePath | ||
| 11 | 11 | open ReferenceUniformJets ClosedIntervalJetAlgebra |
| 12 | 12 | open scoped Topology ContDiff |
| 13 | 13 | |
| 14 | -/-- A family of smooth parameter functions with one bound for all its members. -/ | |
| 15 | -def Uniform {ι : Type*} (k : ℕ) (F : ι → ℝ → ℝ) : Prop := | |
| 16 | - (∀ i, ContDiffOn ℝ ∞ (F i) J) ∧ ∃ B, 0 ≤ B ∧ ∀ i, Bound k (F i) B | |
| 17 | - | |
| 18 | 14 | namespace Uniform |
| 19 | 15 | |
| 20 | 16 | variable {ι κ : Type*} {k : ℕ} {F G : ι → ℝ → ℝ} |
| 21 | 17 | |
| 22 | -theorem reindex (hF : Uniform k F) (r : κ → ι) : Uniform k (fun i => F (r i)) := | |
| 23 | - ⟨fun i => hF.1 (r i), by obtain ⟨B,hB,hb⟩ := hF.2; exact ⟨B,hB,fun i => hb (r i)⟩⟩ | |
| 24 | - | |
| 25 | -theorem of_le (hF : Uniform k F) {n : ℕ} (hn : n ≤ k) : Uniform n F := | |
| 26 | - ⟨hF.1, by obtain ⟨B,hB,hb⟩ := hF.2; exact ⟨B,hB,fun i => (hb i).of_le hn⟩⟩ | |
| 27 | - | |
| 28 | -theorem const (c : ℝ) : Uniform k (fun _ : ι => fun _ : ℝ => c) := | |
| 29 | - ⟨fun _ => contDiffOn_const, |c|, abs_nonneg c, fun _ => Bound.const k c⟩ | |
| 30 | - | |
| 31 | -theorem id : Uniform k (fun _ : ι => fun η : ℝ => η) := | |
| 32 | - ⟨fun _ => contDiffOn_id, 1, zero_le_one, fun _ => Bound.id k⟩ | |
| 33 | - | |
| 34 | -theorem parameter (c : ι → ℝ) {B : ℝ} (hB : 0 ≤ B) (hb : ∀ i, |c i| ≤ B) : | |
| 35 | - Uniform k (fun i => fun _ : ℝ => c i) := | |
| 36 | - ⟨fun _ => contDiffOn_const, B, hB, fun i => (Bound.const k (c i)).mono (hb i)⟩ | |
| 37 | - | |
| 38 | -theorem add (hF : Uniform k F) (hG : Uniform k G) : | |
| 39 | - Uniform k (fun i η => F i η + G i η) := by | |
| 40 | - obtain ⟨B,hB,hb⟩ := hF.2 | |
| 41 | - obtain ⟨C,hC,hc⟩ := hG.2 | |
| 42 | - exact ⟨fun i => (hF.1 i).add (hG.1 i), B+C, add_nonneg hB hC, | |
| 43 | - fun i => (hb i).add (hF.1 i) (hG.1 i) (hc i)⟩ | |
| 44 | - | |
| 45 | -theorem sub (hF : Uniform k F) (hG : Uniform k G) : | |
| 46 | - Uniform k (fun i η => F i η - G i η) := by | |
| 47 | - obtain ⟨B,hB,hb⟩ := hF.2 | |
| 48 | - obtain ⟨C,hC,hc⟩ := hG.2 | |
| 49 | - exact ⟨fun i => (hF.1 i).sub (hG.1 i), B+C, add_nonneg hB hC, | |
| 50 | - fun i => (hb i).sub (hF.1 i) (hG.1 i) (hc i)⟩ | |
| 51 | - | |
| 52 | -theorem mul (hF : Uniform k F) (hG : Uniform k G) : | |
| 53 | - Uniform k (fun i η => F i η * G i η) := by | |
| 54 | - obtain ⟨B,hB,hb⟩ := hF.2 | |
| 55 | - obtain ⟨C,hC,hc⟩ := hG.2 | |
| 56 | - exact ⟨fun i => (hF.1 i).mul (hG.1 i), 2^k*B*C, | |
| 57 | - mul_nonneg (mul_nonneg (by positivity) hB) hC, | |
| 58 | - fun i => (hb i).mul (hF.1 i) (hG.1 i) (hc i)⟩ | |
| 59 | - | |
| 60 | -theorem neg (hF : Uniform k F) : Uniform k (fun i η => -F i η) := by | |
| 61 | - simpa only [zero_sub] using (const (ι := ι) (k := k) 0).sub hF | |
| 62 | - | |
| 63 | -theorem congr (hF : Uniform k F) (he : ∀ i, EqOn (G i) (F i) J) : Uniform k G := by | |
| 64 | - obtain ⟨B,hB,hb⟩ := hF.2 | |
| 65 | - exact ⟨fun i => (hF.1 i).congr (he i), B,hB,fun i => (hb i).congr (he i)⟩ | |
| 66 | - | |
| 67 | -theorem inverse (hF : Uniform k F) {μ : ℝ} (hμ : 0 < μ) | |
| 68 | - (hp : ∀ i η, η ∈ J → μ ≤ F i η) : Uniform k (fun i η => (F i η)⁻¹) := by | |
| 69 | - obtain ⟨B,hB,hb⟩ := hF.2 | |
| 70 | - obtain ⟨C,hC,hc⟩ := inverse_bound k μ B hμ | |
| 71 | - exact ⟨fun i => (hF.1 i).inv (fun η hη => (hμ.trans_le (hp i η hη)).ne'), | |
| 72 | - C,hC,fun i => hc _ (hF.1 i) (hp i) (hb i)⟩ | |
| 73 | - | |
| 74 | 18 | end Uniform |
| 75 | 19 | |
| 76 | -theorem bound_iff_jets {k : ℕ} {f : ℝ → ℝ} {B : ℝ} | |
| 77 | - (hf : ∀ η ∈ J, ContDiffAt ℝ ∞ f η) : | |
| 78 | - Bound k f B ↔ ∀ n ≤ k, ∀ η ∈ J, |iteratedDeriv n f η| ≤ B := by | |
| 79 | - constructor <;> intro hb n hn η hη | |
| 80 | - · have hh := hb n hn η hη | |
| 81 | - rw [iteratedFDerivWithin_eq_iteratedFDeriv uniqueDiff | |
| 82 | - ((hf η hη).of_le (TransitionRamp.nat_le_infty n)) hη, | |
| 83 | - norm_iteratedFDeriv_eq_norm_iteratedDeriv, Real.norm_eq_abs] at hh | |
| 84 | - exact hh | |
| 85 | - · rw [iteratedFDerivWithin_eq_iteratedFDeriv uniqueDiff | |
| 86 | - ((hf η hη).of_le (TransitionRamp.nat_le_infty n)) hη, | |
| 87 | - norm_iteratedFDeriv_eq_norm_iteratedDeriv, Real.norm_eq_abs] | |
| 88 | - exact hb n hn η hη | |
| 89 | - | |
| 90 | -theorem slice_smoothAt (D : RadialDomain) {F : Field} | |
| 91 | - (hF : ContDiffOn ℝ ∞ F D.carrier) {X η : ℝ} (hp : (X,η) ∈ D.carrier) : | |
| 92 | - ContDiffAt ℝ ∞ (fun ξ => F (X,ξ)) η := | |
| 93 | - (hF.contDiffAt (D.isOpen.mem_nhds hp)).comp η | |
| 94 | - (contDiffAt_const.prodMk contDiffAt_id) | |
| 95 | - | |
| 96 | -theorem primitive_bound (D : RadialDomain) {F : Field} | |
| 97 | - (hF : ContDiffOn ℝ ∞ F D.carrier) {k : ℕ} {X B : ℝ} (hX : 0 ≤ X) | |
| 98 | - (hmem : ∀ x ∈ Icc 0 X, ∀ η ∈ J, (x,η) ∈ D.carrier) | |
| 99 | - (hb : ∀ x ∈ Icc 0 X, Bound k (fun η => F (x,η)) B) : | |
| 100 | - Bound k (fun η => primitive F (X,η)) (B*X) := by | |
| 101 | - apply (bound_iff_jets (fun η hη => slice_smoothAt D (primitive_smooth D hF) | |
| 102 | - (hmem X ⟨hX,le_rfl⟩ η hη))).mpr | |
| 103 | - intro n hn η hη | |
| 104 | - rw [← etaJet_eq_iteratedDeriv D (primitive_smooth D hF) n | |
| 105 | - (hmem X ⟨hX,le_rfl⟩ η hη), etaJet_primitive D hF n (hmem X ⟨hX,le_rfl⟩ η hη)] | |
| 106 | - change |∫ x in (0 : ℝ)..X, etaJet n F (x,η)| ≤ B*X | |
| 107 | - have hi := intervalIntegral.norm_integral_le_of_norm_le_const (a := (0:ℝ)) (b := X) | |
| 108 | - (C := B) (f := fun x => etaJet n F (x,η)) (fun x hx => by | |
| 109 | - rw [uIoc_of_le hX] at hx | |
| 110 | - have hxx : x ∈ Icc 0 X := ⟨hx.1.le,hx.2⟩ | |
| 111 | - rw [Real.norm_eq_abs, etaJet_eq_iteratedDeriv D hF n (hmem x hxx η hη)] | |
| 112 | - exact (bound_iff_jets (fun ξ hξ => slice_smoothAt D hF (hmem x hxx ξ hξ))).mp | |
| 113 | - (hb x hxx) n hn η hη) | |
| 114 | - simpa only [Real.norm_eq_abs, sub_zero, abs_of_nonneg hX, mul_comm] using hi | |
| 115 | - | |
| 116 | -abbrev Slab (R : ℝ) := {X : ℝ // X ∈ Icc 0 R} | |
| 117 | - | |
| 118 | -abbrev FieldUniform {ι : Type*} (k : ℕ) (R : ℝ) (F : ι → Field) : Prop := | |
| 119 | - Uniform k (fun q : ι × Slab R => fun η => F q.1 (q.2,η)) | |
| 120 | - | |
| 121 | -theorem fieldUniform_primitive {ι : Type*} (D : ι → RadialDomain) {F : ι → Field} | |
| 122 | - (hF : ∀ i, ContDiffOn ℝ ∞ (F i) (D i).carrier) {k : ℕ} {R : ℝ} (hR : 0 ≤ R) | |
| 123 | - (hmem : ∀ i, ∀ X ∈ Icc 0 R, ∀ η ∈ J, (X,η) ∈ (D i).carrier) | |
| 124 | - (hb : FieldUniform k R F) : FieldUniform k R (fun i => primitive (F i)) := by | |
| 125 | - obtain ⟨B,hB,hb⟩ := hb.2 | |
| 126 | - refine ⟨fun q η hη => (slice_smoothAt (D q.1) (primitive_smooth (D q.1) (hF q.1)) | |
| 127 | - (hmem q.1 q.2 q.2.property η hη)).contDiffWithinAt, | |
| 128 | - B*R, mul_nonneg hB hR, ?_⟩ | |
| 129 | - intro q | |
| 130 | - exact (primitive_bound (D q.1) (hF q.1) q.2.property.1 | |
| 131 | - (fun X hX => hmem q.1 X ⟨hX.1,hX.2.trans q.2.property.2⟩) | |
| 132 | - (fun X hX => hb (q.1,⟨X,⟨hX.1,hX.2.trans q.2.property.2⟩⟩))).mono | |
| 133 | - (mul_le_mul_of_nonneg_left q.2.property.2 hB) | |
| 134 | - | |
| 135 | -theorem fieldUniform_partial {ι : Type*} (D : ι → RadialDomain) {F : ι → Field} | |
| 136 | - (hF : ∀ i, ContDiffOn ℝ ∞ (F i) (D i).carrier) {k : ℕ} {R : ℝ} | |
| 137 | - (hmem : ∀ i, ∀ X ∈ Icc 0 R, ∀ η ∈ J, (X,η) ∈ (D i).carrier) | |
| 138 | - (hb : FieldUniform (k+1) R F) : FieldUniform k R (fun i => parameterPartial (F i)) := by | |
| 139 | - obtain ⟨B,hB,hb⟩ := hb.2 | |
| 140 | - refine ⟨fun q η hη => (slice_smoothAt (D q.1) (parameterPartial_smooth (D q.1) (hF q.1)) | |
| 141 | - (hmem q.1 q.2 q.2.property η hη)).contDiffWithinAt, B,hB,?_⟩ | |
| 142 | - intro q | |
| 143 | - apply (hb q).derivWithin.congr | |
| 144 | - intro η hη | |
| 145 | - exact ((parameterPartial_hasDerivAt (D q.1) (hF q.1) | |
| 146 | - (hmem q.1 q.2 q.2.property η hη)).hasDerivWithinAt.derivWithin | |
| 147 | - (uniqueDiff η hη)).symm | |
| 148 | - | |
| 149 | -theorem uniform_smooth_fixed {ι : Type*} {g : ℝ → ℝ} | |
| 150 | - (hg : ContDiffOn ℝ ∞ g parameterInterval) (k : ℕ) : | |
| 151 | - Uniform k (fun _ : ι => g) := by | |
| 152 | - obtain ⟨B,hB,hb⟩ := TransitionRamp.compact_scalar_jets parameterInterval_open isCompact_Icc | |
| 153 | - NaturalAxisCoefficients.original_interval_interior hg k | |
| 154 | - refine ⟨fun _ => hg.mono NaturalAxisCoefficients.original_interval_interior,B,hB,fun _ => ?_⟩ | |
| 155 | - exact (bound_iff_jets (fun η hη => hg.contDiffAt | |
| 156 | - (parameterInterval_open.mem_nhds (NaturalAxisCoefficients.original_interval_interior hη)))).mpr hb | |
| 157 | - | |
| 158 | -theorem parameterPartial_const_mul (D : RadialDomain) {F : Field} | |
| 159 | - (hF : ContDiffOn ℝ ∞ F D.carrier) (c : ℝ) {p : Point} (hp : p ∈ D.carrier) : | |
| 160 | - parameterPartial (fun q => c*F q) p = c*parameterPartial F p := | |
| 161 | - (parameterPartial_hasDerivAt D (contDiffOn_const.mul hF) hp).unique | |
| 162 | - ((parameterPartial_hasDerivAt D hF hp).const_mul c) | |
| 163 | - | |
| 164 | -def axialFormula {D : RadialDomain} (P : Profiles D) (h : ℝ) (p : Point) : ℝ := | |
| 165 | - (-ActivationStocks.massFlux h p.1 p.2 (P.M p) (parameterPartial P.M p)*P.U p + | |
| 166 | - NaturalAxisData.D h*(P.M p-p.2*parameterPartial P.M p) + | |
| 167 | - 4*h*p.2*P.S p-NaturalAxisData.d p.2*parameterPartial P.S p + | |
| 168 | - p.1*(4*NaturalAxisData.A h*p.2*P.pressure p- | |
| 169 | - NaturalAxisData.d p.2*parameterPartial P.pressure p)) / NaturalAxisData.L h p.2 | |
| 170 | - | |
| 171 | -theorem axialFormula_eq {D : RadialDomain} (P : Profiles D) (h : ℝ) | |
| 172 | - {p : Point} (hp : p ∈ D.carrier) (hX : 0 < p.1) : | |
| 173 | - axialFormula P h p = p.1*P.axialLag h p/NaturalAxisData.L h p.2 := by | |
| 174 | - rw [axialFormula, P.axialLag_integrated h hp hX, | |
| 175 | - ← ActivationStocks.profile_massFlux P h hp] | |
| 176 | - dsimp only [StressAlgebra.axialExponent, StressAlgebra.velocityExponent, | |
| 177 | - StressAlgebra.coordinateFactor, NaturalAxisData.D, NaturalAxisData.A, NaturalAxisData.d] | |
| 178 | - congr 1 | |
| 179 | - field_simp | |
| 180 | - ring | |
| 181 | - | |
| 182 | -def angularNormalizedFormula {D : RadialDomain} (P : Profiles D) (h C : ℝ) (p : Point) : ℝ := | |
| 183 | - (-ActivationStocks.massFlux h p.1 p.2 (P.M p) (parameterPartial P.M p) + | |
| 184 | - ActivationStocks.angularRemainder h p.2 (C*P.I p) | |
| 185 | - (parameterPartial (fun q => C*P.I q) p) (C*P.J p) | |
| 186 | - (parameterPartial (fun q => C*P.J q) p) * (2*p.1)⁻¹ * (C*P.f p)⁻¹) / | |
| 187 | - NaturalAxisData.L h p.2 | |
| 188 | - | |
| 189 | -theorem angularNormalizedFormula_eq {D : RadialDomain} (P : Profiles D) (h C : ℝ) | |
| 190 | - {p : Point} (hp : p ∈ D.carrier) (hX : 0 < p.1) (hC : 0 < C) (hf : 0 < P.f p) : | |
| 191 | - angularNormalizedFormula P h C p = ActivationStocks.profileStockOne P h p := by | |
| 192 | - rw [ActivationStocks.profileStockOne_eq P h hp hX.ne' hf.ne', angularNormalizedFormula, | |
| 193 | - parameterPartial_const_mul D P.I_smooth C hp, parameterPartial_const_mul D P.J_smooth C hp] | |
| 194 | - unfold ActivationStocks.stockOne ActivationStocks.angularRemainder | |
| 195 | - congr 2 | |
| 196 | - field_simp | |
| 197 | - | |
| 198 | 20 | section ActualReference |
| 199 | 21 | |
| 200 | 22 | open NaturalProfile |
| @@ -215,247 +37,10 @@ namespace Choice | ||
| 215 | 37 | |
| 216 | 38 | variable {d} |
| 217 | 39 | |
| 218 | -def input (hΛ : 0 < Λ) (q : Choice d Λ) : Input := Input.ofNatural hΛ q.profile.family | |
| 219 | - | |
| 220 | -def profiles (hΛ : 0 < Λ) (hP0 : ContDiff ℝ ∞ P0) (q : Choice d Λ) : | |
| 221 | - Profiles (q.input hΛ).radialDomain := | |
| 222 | - (q.input hΛ).histories q.δ_pos q.δ_lt P0 hP0 | |
| 223 | - | |
| 224 | -theorem mem (hΛ : 0 < Λ) (q : Choice d Λ) {X η : ℝ} (hX : 0 ≤ X) | |
| 225 | - (hη : η ∈ J) : (X,η) ∈ (q.input hΛ).radialDomain.carrier := | |
| 226 | - ⟨lt_of_lt_of_le (by norm_num) (mul_nonneg hΛ.le hX), NaturalAxisCoefficients.original_interval_interior hη⟩ | |
| 227 | - | |
| 228 | -theorem C_pos (q : Choice d Λ) : 0 < q.C := zero_lt_one.trans_le q.C_ge_one | |
| 229 | - | |
| 230 | 40 | end Choice |
| 231 | 41 | |
| 232 | 42 | variable (hΛ : 0 < Λ) (hP0 : ContDiff ℝ ∞ P0) |
| 233 | 43 | |
| 234 | -theorem uniform_refU (k : ℕ) (R : ℝ) : | |
| 235 | - FieldUniform k R (fun q : Choice d Λ => (q.profiles hΛ hP0).U) := by | |
| 236 | - obtain ⟨B,hB,hb⟩ := exists_referenceU_jets d hΛ k | |
| 237 | - refine ⟨fun q η hη => (slice_smoothAt _ (q.1.profiles hΛ hP0).U_smooth | |
| 238 | - (q.1.mem hΛ q.2.property.1 hη)).contDiffWithinAt, B,zero_le_one.trans hB,?_⟩ | |
| 239 | - intro q | |
| 240 | - apply (bound_iff_jets (fun η hη => slice_smoothAt _ (q.1.profiles hΛ hP0).U_smooth | |
| 241 | - (q.1.mem hΛ q.2.property.1 hη))).mpr | |
| 242 | - intro n hn η hη | |
| 243 | - exact hb q.1.C q.1.profile q.1.δ q.1.δ_pos q.1.δ_lt q.2 q.2.property.1 n hn η hη | |
| 244 | - | |
| 245 | -theorem uniform_refF_normalized (hσ : 0 < σ) | |
| 246 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 247 | - (k : ℕ) (R : ℝ) : | |
| 248 | - FieldUniform k R (fun q : Choice d Λ => fun p => q.C*(q.profiles hΛ hP0).f p) ∧ | |
| 249 | - FieldUniform k R (fun q : Choice d Λ => fun p => (q.C*(q.profiles hΛ hP0).f p)⁻¹) := by | |
| 250 | - obtain ⟨B,hB,hb⟩ := exists_normalizedReferenceF_jets d hΛ hσ hscale k | |
| 251 | - have hs (q : Choice d Λ × Slab R) (η : ℝ) (hη : η ∈ J) : | |
| 252 | - ContDiffAt ℝ ∞ (fun ξ => q.1.C*(q.1.profiles hΛ hP0).f (q.2,ξ)) η := | |
| 253 | - contDiffAt_const.mul (slice_smoothAt _ (q.1.profiles hΛ hP0).f_smooth | |
| 254 | - (q.1.mem hΛ q.2.property.1 hη)) | |
| 255 | - have hp (q : Choice d Λ × Slab R) (η : ℝ) (hη : η ∈ J) : | |
| 256 | - 0 < q.1.C*(q.1.profiles hΛ hP0).f (q.2,η) := | |
| 257 | - mul_pos q.1.C_pos ((q.1.input hΛ).refF_pos _ (q.1.mem hΛ q.2.property.1 hη) q.2.property.1) | |
| 258 | - constructor | |
| 259 | - · refine ⟨fun q η hη => (hs q η hη).contDiffWithinAt,B,zero_le_one.trans hB,?_⟩ | |
| 260 | - intro q | |
| 261 | - apply (bound_iff_jets (hs q)).mpr | |
| 262 | - intro n hn η hη | |
| 263 | - exact (hb q.1.C q.1.C_pos q.1.profile q.1.δ q.1.δ_pos q.1.δ_lt q.2 q.2.property.1 n hn η hη).1 | |
| 264 | - · refine ⟨fun q η hη => ((hs q η hη).inv (hp q η hη).ne').contDiffWithinAt, | |
| 265 | - B,zero_le_one.trans hB,?_⟩ | |
| 266 | - intro q | |
| 267 | - apply (bound_iff_jets (fun η hη => (hs q η hη).inv (hp q η hη).ne')).mpr | |
| 268 | - intro n hn η hη | |
| 269 | - exact (hb q.1.C q.1.C_pos q.1.profile q.1.δ q.1.δ_pos q.1.δ_lt q.2 q.2.property.1 n hn η hη).2 | |
| 270 | - | |
| 271 | -theorem uniform_refF (hσ : 0 < σ) | |
| 272 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 273 | - (k : ℕ) (R : ℝ) : FieldUniform k R (fun q : Choice d Λ => (q.profiles hΛ hP0).f) := by | |
| 274 | - have hi : Uniform k (fun q : Choice d Λ × Slab R => fun _ : ℝ => q.1.C⁻¹) := | |
| 275 | - Uniform.parameter _ zero_le_one (fun q => by | |
| 276 | - rw [abs_of_pos (inv_pos.mpr q.1.C_pos)] | |
| 277 | - exact inv_le_one_of_one_le₀ q.1.C_ge_one) | |
| 278 | - exact (hi.mul (uniform_refF_normalized d hΛ hP0 hσ hscale k R).1).congr | |
| 279 | - (fun q η _ => by field_simp [q.1.C_pos.ne']) | |
| 280 | - | |
| 281 | -theorem uniform_radius {ι : Type*} (k : ℕ) {R : ℝ} (hR : 0 ≤ R) : | |
| 282 | - Uniform k (fun q : ι × Slab R => fun _ : ℝ => (q.2 : ℝ)) := | |
| 283 | - Uniform.parameter _ hR (fun q => by rw [abs_of_nonneg q.2.property.1]; exact q.2.property.2) | |
| 284 | - | |
| 285 | -theorem uniform_ref_histories (hσ : 0 < σ) | |
| 286 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 287 | - (k : ℕ) {R : ℝ} (hR : 0 ≤ R) : | |
| 288 | - FieldUniform k R (fun q : Choice d Λ => (q.profiles hΛ hP0).M) ∧ | |
| 289 | - FieldUniform k R (fun q : Choice d Λ => (q.profiles hΛ hP0).S) ∧ | |
| 290 | - FieldUniform k R (fun q : Choice d Λ => (q.profiles hΛ hP0).pressure) ∧ | |
| 291 | - FieldUniform k R (fun q : Choice d Λ => fun p => q.C*(q.profiles hΛ hP0).I p) ∧ | |
| 292 | - FieldUniform k R (fun q : Choice d Λ => fun p => q.C*(q.profiles hΛ hP0).J p) := by | |
| 293 | - let D := fun q : Choice d Λ => (q.input hΛ).radialDomain | |
| 294 | - let P := fun q : Choice d Λ => q.profiles hΛ hP0 | |
| 295 | - have hm : ∀ q, ∀ X ∈ Icc 0 R, ∀ η ∈ J, (X,η) ∈ (D q).carrier := | |
| 296 | - fun q X hX η hη => q.mem hΛ hX.1 hη | |
| 297 | - have hu := uniform_refU d hΛ hP0 k R | |
| 298 | - have hf := uniform_refF d hΛ hP0 hσ hscale k R | |
| 299 | - have hcf := (uniform_refF_normalized d hΛ hP0 hσ hscale k R).1 | |
| 300 | - have hx := uniform_radius (ι := Choice d Λ) k hR | |
| 301 | - have hM := fieldUniform_primitive D (fun q => (P q).U_smooth) hR hm hu | |
| 302 | - have hff : FieldUniform k R (fun q : Choice d Λ => fun p => (P q).f p^2) := by | |
| 303 | - simpa only [pow_two] using hf.mul hf | |
| 304 | - have he : FieldUniform k R (fun q : Choice d Λ => (P q).energyDensity) := by | |
| 305 | - exact ((hu.mul hu).sub (hx.mul (hf.mul hf))).congr | |
| 306 | - (fun q η _ => by dsimp [Profiles.energyDensity,P]; ring) | |
| 307 | - have hS := fieldUniform_primitive D (fun q => (P q).energyDensity_smooth) hR hm he | |
| 308 | - have hpress : FieldUniform k R (fun q : Choice d Λ => (P q).pressure) := by | |
| 309 | - have hz := fieldUniform_primitive D (fun q => (P q).f_smooth.pow 2) hR hm hff | |
| 310 | - exact (uniform_smooth_fixed (ι := Choice d Λ × Slab R) hP0.contDiffOn k).add hz | |
| 311 | - have hH : FieldUniform k R (fun q : Choice d Λ => fun p => q.C*(P q).H p) := by | |
| 312 | - exact (((Uniform.const 2).mul hx).mul hcf).congr (fun q η _ => by dsimp [Profiles.H]; ring) | |
| 313 | - have hI := fieldUniform_primitive D | |
| 314 | - (fun q => contDiffOn_const.mul (P q).H_smooth) hR hm hH | |
| 315 | - have hI' : FieldUniform k R (fun q : Choice d Λ => fun p => q.C*(P q).I p) := by | |
| 316 | - apply hI.congr | |
| 317 | - intro q η _ | |
| 318 | - simp only [Profiles.I, primitive, intervalIntegral.integral_const_mul] | |
| 319 | - have hJ := fieldUniform_primitive D | |
| 320 | - (fun q => contDiffOn_const.mul (P q).transportDensity_smooth) hR hm | |
| 321 | - ((hu.mul hH).congr (fun q η _ => by dsimp [Profiles.transportDensity]; ring)) | |
| 322 | - have hJ' : FieldUniform k R (fun q : Choice d Λ => fun p => q.C*(P q).J p) := by | |
| 323 | - apply hJ.congr | |
| 324 | - intro q η _ | |
| 325 | - simp only [Profiles.J, primitive, intervalIntegral.integral_const_mul] | |
| 326 | - exact ⟨hM,hS,hpress,hI',hJ'⟩ | |
| 327 | - | |
| 328 | -theorem uniform_geometric_factors (hs : NaturalAxisRange.Parameters h j) (k : ℕ) {ι : Type*} : | |
| 329 | - Uniform k (fun _ : ι => NaturalAxisData.d) ∧ | |
| 330 | - Uniform k (fun _ : ι => fun η => (NaturalAxisData.L h η)⁻¹) := by | |
| 331 | - have hi : Uniform k (fun _ : ι => fun η : ℝ => η) := Uniform.id | |
| 332 | - have hd : Uniform k (fun _ : ι => NaturalAxisData.d) := by | |
| 333 | - exact ((Uniform.const 1).sub (hi.mul hi)).congr | |
| 334 | - (fun q η _ => by dsimp [NaturalAxisData.d]; ring) | |
| 335 | - have hl : Uniform k (fun _ : ι => fun η => NaturalAxisData.L h η) := by | |
| 336 | - exact ((Uniform.const 1).sub (((Uniform.const (2*h)).mul hi).mul hi)).congr | |
| 337 | - (fun q η _ => by dsimp [NaturalAxisData.L]; ring) | |
| 338 | - exact ⟨hd,hl.inverse (by norm_num : (0:ℝ)<49/50) | |
| 339 | - (fun _ _ hη => NaturalAxisRange.L_lower_bound hs hη)⟩ | |
| 340 | - | |
| 341 | -theorem uniform_axialFormula (hs : NaturalAxisRange.Parameters h j) (hσ : 0 < σ) | |
| 342 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 343 | - (k : ℕ) {R : ℝ} (hR : 0 ≤ R) : | |
| 344 | - FieldUniform k R (fun q : Choice d Λ => axialFormula (q.profiles hΛ hP0) h) := by | |
| 345 | - let D := fun q : Choice d Λ => (q.input hΛ).radialDomain | |
| 346 | - let P := fun q : Choice d Λ => q.profiles hΛ hP0 | |
| 347 | - have hm : ∀ q, ∀ X ∈ Icc 0 R, ∀ η ∈ J, (X,η) ∈ (D q).carrier := | |
| 348 | - fun q X hX η hη => q.mem hΛ hX.1 hη | |
| 349 | - obtain ⟨hM,hS,hp,-⟩ := uniform_ref_histories d hΛ hP0 hσ hscale (k+1) hR | |
| 350 | - have hMη := fieldUniform_partial D (fun q => (P q).M_smooth) hm hM | |
| 351 | - have hSη := fieldUniform_partial D (fun q => (P q).S_smooth) hm hS | |
| 352 | - have hpη := fieldUniform_partial D (fun q => (P q).pressure_smooth) hm hp | |
| 353 | - have hM := hM.of_le (Nat.le_succ k) | |
| 354 | - have hS := hS.of_le (Nat.le_succ k) | |
| 355 | - have hp := hp.of_le (Nat.le_succ k) | |
| 356 | - have hu := uniform_refU d hΛ hP0 k R | |
| 357 | - have hx := uniform_radius (ι := Choice d Λ) k hR | |
| 358 | - have hη : Uniform k (fun _ : Choice d Λ × Slab R => fun η : ℝ => η) := Uniform.id | |
| 359 | - obtain ⟨hd,hl⟩ := uniform_geometric_factors hs k (ι := Choice d Λ × Slab R) | |
| 360 | - have hmass := (hx.sub ((((Uniform.const (2*NaturalAxisData.D h)).mul hη).mul hM))).sub | |
| 361 | - (hd.mul hMη) | |
| 362 | - have hn := (((hmass.neg.mul hu).add | |
| 363 | - ((Uniform.const (NaturalAxisData.D h)).mul (hM.sub (hη.mul hMη)))).add | |
| 364 | - (((Uniform.const (4*h)).mul hη).mul hS)).sub (hd.mul hSη) | |
| 365 | - have hlast := hx.mul ((((Uniform.const (4*NaturalAxisData.A h)).mul hη).mul hp).sub | |
| 366 | - (hd.mul hpη)) | |
| 367 | - exact ((hn.add hlast).mul hl).congr (fun q η _ => by | |
| 368 | - simp only [axialFormula,ActivationStocks.massFlux,div_eq_mul_inv,mul_assoc,P]) | |
| 369 | - | |
| 370 | -abbrev PositiveSlab (a R : ℝ) := {X : ℝ // X ∈ Icc a R} | |
| 371 | - | |
| 372 | -def toSlab {a R : ℝ} (ha : 0 ≤ a) (X : PositiveSlab a R) : Slab R := | |
| 373 | - ⟨X,ha.trans X.property.1,X.property.2⟩ | |
| 374 | - | |
| 375 | -theorem uniform_angularNormalizedFormula (hs : NaturalAxisRange.Parameters h j) (hσ : 0 < σ) | |
| 376 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 377 | - (k : ℕ) {a R : ℝ} (ha : 0 < a) (haR : a ≤ R) : | |
| 378 | - Uniform k (fun q : Choice d Λ × PositiveSlab a R => fun η => | |
| 379 | - angularNormalizedFormula (q.1.profiles hΛ hP0) h q.1.C (q.2,η)) := by | |
| 380 | - let D := fun q : Choice d Λ => (q.input hΛ).radialDomain | |
| 381 | - let P := fun q : Choice d Λ => q.profiles hΛ hP0 | |
| 382 | - let r : Choice d Λ × PositiveSlab a R → Choice d Λ × Slab R := | |
| 383 | - fun q => (q.1,toSlab ha.le q.2) | |
| 384 | - have hm : ∀ q, ∀ X ∈ Icc 0 R, ∀ η ∈ J, (X,η) ∈ (D q).carrier := | |
| 385 | - fun q X hX η hη => q.mem hΛ hX.1 hη | |
| 386 | - obtain ⟨hM,-,-,hI,hJ⟩ := uniform_ref_histories d hΛ hP0 hσ hscale (k+1) (ha.le.trans haR) | |
| 387 | - have hMη := (fieldUniform_partial D (fun q => (P q).M_smooth) hm hM).reindex r | |
| 388 | - have hIη := (fieldUniform_partial D | |
| 389 | - (fun q => contDiffOn_const.mul (P q).I_smooth) hm hI).reindex r | |
| 390 | - have hJη := (fieldUniform_partial D | |
| 391 | - (fun q => contDiffOn_const.mul (P q).J_smooth) hm hJ).reindex r | |
| 392 | - have hM := (hM.of_le (Nat.le_succ k)).reindex r | |
| 393 | - have hI := (hI.of_le (Nat.le_succ k)).reindex r | |
| 394 | - have hJ := (hJ.of_le (Nat.le_succ k)).reindex r | |
| 395 | - have hx := (uniform_radius (ι := Choice d Λ) k (ha.le.trans haR)).reindex r | |
| 396 | - have hη : Uniform k (fun _ : Choice d Λ × PositiveSlab a R => fun η : ℝ => η) := Uniform.id | |
| 397 | - obtain ⟨hd,hl⟩ := uniform_geometric_factors hs k (ι := Choice d Λ × PositiveSlab a R) | |
| 398 | - have hmass := (hx.sub ((((Uniform.const (2*NaturalAxisData.D h)).mul hη).mul hM))).sub | |
| 399 | - (hd.mul hMη) | |
| 400 | - have hr := ((((Uniform.const (1-h)).mul hI).sub | |
| 401 | - (((Uniform.const (NaturalAxisData.D h)).mul hη).mul hIη)).sub (hd.mul hJη)).add | |
| 402 | - (((Uniform.const (2*(h-NaturalAxisData.D h))).mul hη).mul hJ) | |
| 403 | - have hxi : Uniform k (fun q : Choice d Λ × PositiveSlab a R => fun _ : ℝ => (2*(q.2:ℝ))⁻¹) := | |
| 404 | - Uniform.parameter _ (inv_nonneg.mpr (by positivity : 0 ≤ 2*a)) (fun q => by | |
| 405 | - rw [abs_of_pos (inv_pos.mpr (mul_pos (by norm_num) (ha.trans_le q.2.property.1)))] | |
| 406 | - exact inv_anti₀ (by positivity) (mul_le_mul_of_nonneg_left q.2.property.1 (by norm_num))) | |
| 407 | - have hfi := ((uniform_refF_normalized d hΛ hP0 hσ hscale k R).2).reindex r | |
| 408 | - exact ((hmass.neg.add ((hr.mul hxi).mul hfi)).mul hl).congr (fun q η _ => by | |
| 409 | - simp only [angularNormalizedFormula,ActivationStocks.massFlux, | |
| 410 | - ActivationStocks.angularRemainder,div_eq_mul_inv,mul_assoc,P,r,toSlab]) | |
| 411 | - | |
| 412 | -/-- The four literal reference quantities in `join:reference`, with all amplitudes | |
| 413 | -and all admissible cutoff widths included in one uniform family. -/ | |
| 414 | -theorem uniform_reference_quantities (hs : NaturalAxisRange.Parameters h j) (hσ : 0 < σ) | |
| 415 | - (hscale : AxisReference.stabilityScale d.coefficients.epsilon (profileErrorConstant d) ≤ Λ) | |
| 416 | - (k : ℕ) {a R : ℝ} (ha : 0 < a) (haR : a ≤ R) : | |
| 417 | - Uniform k (fun q : Choice d Λ × PositiveSlab a R => fun η => | |
| 418 | - q.1.C*(q.1.profiles hΛ hP0).E (q.2,η)) ∧ | |
| 419 | - Uniform k (fun q : Choice d Λ × PositiveSlab a R => fun η => | |
| 420 | - (q.1.C*(q.1.profiles hΛ hP0).E (q.2,η))⁻¹) ∧ | |
| 421 | - Uniform k (fun q : Choice d Λ × PositiveSlab a R => fun η => | |
| 422 | - ActivationStocks.profileStockOne (q.1.profiles hΛ hP0) h (q.2,η)) ∧ | |
| 423 | - Uniform k (fun q : Choice d Λ × PositiveSlab a R => fun η => | |
| 424 | - (q.1.profiles hΛ hP0).axialLag h (q.2,η) / NaturalAxisData.L h η) := by | |
| 425 | - let r : Choice d Λ × PositiveSlab a R → Choice d Λ × Slab R := | |
| 426 | - fun q => (q.1,toSlab ha.le q.2) | |
| 427 | - have hcf := ((uniform_refF_normalized d hΛ hP0 hσ hscale k R).1).reindex r | |
| 428 | - have hcfi := ((uniform_refF_normalized d hΛ hP0 hσ hscale k R).2).reindex r | |
| 429 | - have he : Uniform k (fun q : Choice d Λ × PositiveSlab a R => fun _ : ℝ => Real.sqrt (2*(q.2:ℝ))) := | |
| 430 | - Uniform.parameter _ (Real.sqrt_nonneg _) (fun q => by | |
| 431 | - rw [abs_of_nonneg (Real.sqrt_nonneg _)] | |
| 432 | - exact Real.sqrt_le_sqrt (mul_le_mul_of_nonneg_left q.2.property.2 (by norm_num))) | |
| 433 | - have hei : Uniform k (fun q : Choice d Λ × PositiveSlab a R => fun _ : ℝ => | |
| 434 | - (Real.sqrt (2*(q.2:ℝ)))⁻¹) := | |
| 435 | - Uniform.parameter _ (inv_nonneg.mpr (Real.sqrt_nonneg (2*a))) (fun q => by | |
| 436 | - rw [abs_of_pos (inv_pos.mpr (Real.sqrt_pos.mpr | |
| 437 | - (mul_pos (by norm_num) (ha.trans_le q.2.property.1))))] | |
| 438 | - exact inv_anti₀ (Real.sqrt_pos.mpr (by positivity)) | |
| 439 | - (Real.sqrt_le_sqrt (mul_le_mul_of_nonneg_left q.2.property.1 (by norm_num)))) | |
| 440 | - have hp := uniform_angularNormalizedFormula d hΛ hP0 hs hσ hscale k ha haR | |
| 441 | - have haF := (uniform_axialFormula d hΛ hP0 hs hσ hscale k (ha.le.trans haR)).reindex r | |
| 442 | - have hxi : Uniform k (fun q : Choice d Λ × PositiveSlab a R => fun _ : ℝ => (q.2:ℝ)⁻¹) := | |
| 443 | - Uniform.parameter _ (inv_nonneg.mpr ha.le) (fun q => by | |
| 444 | - rw [abs_of_pos (inv_pos.mpr (ha.trans_le q.2.property.1))] | |
| 445 | - exact inv_anti₀ ha q.2.property.1) | |
| 446 | - refine ⟨(he.mul hcf).congr (fun q η _ => by dsimp [Profiles.E,r,toSlab]; ring), | |
| 447 | - (hei.mul hcfi).congr (fun q η _ => by | |
| 448 | - simp only [Profiles.E,mul_inv_rev,r,toSlab]; ring), | |
| 449 | - hp.congr (fun q η hη => ?_), (haF.mul hxi).congr (fun q η hη => ?_)⟩ | |
| 450 | - · exact (angularNormalizedFormula_eq (q.1.profiles hΛ hP0) h q.1.C | |
| 451 | - (q.1.mem hΛ (ha.le.trans q.2.property.1) hη) (ha.trans_le q.2.property.1) q.1.C_pos | |
| 452 | - ((q.1.input hΛ).refF_pos q.1.δ | |
| 453 | - (q.1.mem hΛ (ha.le.trans q.2.property.1) hη) (ha.le.trans q.2.property.1))).symm | |
| 454 | - · dsimp only [r,toSlab] | |
| 455 | - rw [axialFormula_eq _ h (q.1.mem hΛ (ha.le.trans q.2.property.1) hη) | |
| 456 | - (ha.trans_le q.2.property.1)] | |
| 457 | - field_simp [(ha.trans_le q.2.property.1).ne'] | |
| 458 | - | |
| 459 | 44 | end ActualReference |
| 460 | 45 | |
| 461 | 46 | end NavierStokes.ReferenceUniformStocks |
+18 −0 routes/s1-ns-reference-1/README.md added View file
| @@ -0,0 +1,18 @@ | ||
| 1 | +--- | |
| 2 | +issue: 10 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s1-ns-reference-1 | |
| 6 | + | |
| 7 | +Issue #10 (S-1, delete declarations that nothing uses), unit `s1-ns-reference-1`: the family | |
| 8 | +`NavierStokes/Reference*` (`ReferenceBounds.lean`, `ReferenceEndpointRate.lean`, `ReferencePath.lean`, | |
| 9 | +`ReferenceUniformJets.lean`, `ReferenceUniformStocks.lean`). I delete the 86 declarations listed in the | |
| 10 | +unit that nothing on main uses, 1145 lines, and nothing else. The cut comes from Treant's run of | |
| 11 | +2026-12-03, re-read against this project's declaration graph under the rule that the paper's results | |
| 12 | +stay: no remaining declaration names a deleted one, and no deleted docstring cites the paper. | |
| 13 | + | |
| 14 | +## Next | |
| 15 | + | |
| 16 | +Open the pull request; the maintainer agent reads it with the coarser measure at the head against | |
| 17 | +`main`. A follow-up unit may merge the now-empty `ReferenceEndpointRate.lean`, | |
| 18 | +`ReferenceUniformJets.lean` and `ReferenceUniformStocks.lean` into their importers. | |