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

| 1 | import NavierStokes.PrimaryPulseBounds |
| 2 | import NavierStokes.PhaseEstimates |
| 3 | import NavierStokes.ChartScales |
| 4 | import NavierStokes.PrimaryCovarianceBounds |
| 5 | import NavierStokes.PrimaryRepresentatives |
| 6 | |
| 7 | /-! |
| 8 | # Base estimates imply the actual pulse geometry |
| 9 | |
| 10 | The inputs concern normalized base fields and frozen representative data. |
| 11 | Normal, damping, and moving-basis errors are conclusions. The dyadic cutoff |
| 12 | is chosen after all fixed constants and before the band or slow point. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | namespace NavierStokes.BasePhaseGeometry |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Topology ContDiff InnerProductSpace |
| 21 | |
| 22 | abbrev Slow := PhaseCalculus.Slow |
| 23 | abbrev Plane := MovingFrameODE.Plane |
| 24 | abbrev Space := MovingFrameODE.Space |
| 25 | |
| 26 | /-- The normalized base error `Q^(2h)` is exactly the squared native small |
| 27 | parameter used by the phase estimates. -/ |
| 28 | theorem epsilon_squared (h : ℝ) (n : ℕ) : |
| 29 | ChartScales.epsilon h n ^ 2 = ChartScales.Q n ^ (2 * h) := by |
| 30 | symm |
| 31 | simpa only [ChartScales.epsilon, Nat.cast_ofNat, mul_comm] using |
| 32 | Real.rpow_mul_natCast (ChartScales.Q_pos n).le h 2 |
| 33 | |
| 34 | noncomputable def dampingDenominator (u : ℝ) : ℝ := |
| 35 | (1 + u ^ 2) * Real.sqrt (1 + u ^ 2) |
| 36 | |
| 37 | noncomputable def referenceScale (lam viscosity u : ℝ) : ℝ := |
| 38 | Real.sqrt (lam / (viscosity * dampingDenominator u)) |
| 39 | |
| 40 | theorem dampingDenominator_pos (u : ℝ) : 0 < dampingDenominator u := |
| 41 | PulseGrowth.dampingDenominator_pos u |
| 42 | |
| 43 | theorem dampingDenominator_one_le (u : ℝ) : 1 ≤ dampingDenominator u := by |
| 44 | have hs : 1 ≤ Real.sqrt (1 + u ^ 2) := (PhaseJetBounds.radius_bounds u).1 |
| 45 | unfold dampingDenominator |
| 46 | nlinarith [sq_nonneg u, Real.sqrt_nonneg (1 + u ^ 2)] |
| 47 | |
| 48 | theorem referenceScale_pos {lam viscosity u : ℝ} (hlam : 0 < lam) (hv : 0 < viscosity) : |
| 49 | 0 < referenceScale lam viscosity u := |
| 50 | Real.sqrt_pos.mpr (div_pos hlam (mul_pos hv (dampingDenominator_pos u))) |
| 51 | |
| 52 | theorem referenceScale_normalization {lam viscosity u : ℝ} |
| 53 | (hlam : 0 < lam) (hv : 0 < viscosity) : |
| 54 | viscosity * referenceScale lam viscosity u ^ 2 = lam / dampingDenominator u := by |
| 55 | have hD := dampingDenominator_pos u |
| 56 | rw [referenceScale, Real.sq_sqrt (div_nonneg hlam.le (mul_nonneg hv.le hD.le))] |
| 57 | field_simp [hv.ne', hD.ne'] |
| 58 | |
| 59 | /-- Uniform scale bounds are derived from the actual rounded viscosity |
| 60 | factor, rather than imposed on the chosen phase normal. -/ |
| 61 | theorem referenceScale_bounds {lam l M viscosity u : ℝ} |
| 62 | (hl : 0 < l) (hlam : l ≤ lam) (hM : lam ≤ M) |
| 63 | (hvlo : 1 ≤ viscosity) (hvhi : viscosity ≤ 4) : |
| 64 | Real.sqrt (l / (4 * dampingDenominator u)) ≤ referenceScale lam viscosity u ∧ |
| 65 | referenceScale lam viscosity u ≤ Real.sqrt M := by |
| 66 | have hv : 0 < viscosity := zero_lt_one.trans_le hvlo |
| 67 | have hD := dampingDenominator_pos u |
| 68 | have hlampos := hl.trans_le hlam |
| 69 | constructor |
| 70 | · apply Real.sqrt_le_sqrt |
| 71 | exact (div_le_div_of_nonneg_right hlam (by positivity : 0 ≤ 4 * dampingDenominator u)).trans |
| 72 | (div_le_div_of_nonneg_left hlampos.le (mul_pos hv hD) |
| 73 | (mul_le_mul_of_nonneg_right hvhi hD.le)) |
| 74 | · apply Real.sqrt_le_sqrt |
| 75 | apply (div_le_iff₀ (mul_pos hv hD)).mpr |
| 76 | have hVD : 1 ≤ viscosity * dampingDenominator u := |
| 77 | one_le_mul_of_one_le_of_one_le hvlo (dampingDenominator_one_le u) |
| 78 | exact hM.trans (le_mul_of_one_le_right (hlampos.le.trans hM) hVD) |
| 79 | |
| 80 | theorem dyadic_referenceScale_normalization (h u : ℝ) {lam : ℝ} (hlam : 0 < lam) (n : ℕ) : |
| 81 | (ChartScales.epsilon h n * (ChartScales.carrier h n : ℝ) ^ 2) * |
| 82 | referenceScale lam (ChartScales.epsilon h n * (ChartScales.carrier h n : ℝ) ^ 2) u ^ 2 = |
| 83 | lam / dampingDenominator u := by |
| 84 | apply referenceScale_normalization hlam |
| 85 | have hk : 0 < (ChartScales.carrier h n : ℝ) := |
| 86 | Scaling.carrier_frequency_pos (ChartScales.epsilon_pos h n) |
| 87 | exact mul_pos (ChartScales.epsilon_pos h n) (pow_pos hk 2) |
| 88 | |
| 89 | theorem localBase_mono {F G F0 G0 : Slow → ℝ} {U : Set Slow} {M T ε : ℝ} |
| 90 | (h : PhaseEstimates.LocalBaseBounds F G F0 G0 U M ε) (hMT : M ≤ T) : |
| 91 | PhaseEstimates.LocalBaseBounds F G F0 G0 U T ε where |
| 92 | convex := h.convex |
| 93 | actualF := h.actualF |
| 94 | actualG := h.actualG |
| 95 | referenceF := h.referenceF |
| 96 | referenceG := h.referenceG |
| 97 | secondF := h.secondF |
| 98 | secondG := h.secondG |
| 99 | secondF_bound x hx := (h.secondF_bound x hx).trans hMT |
| 100 | secondG_bound x hx := (h.secondG_bound x hx).trans hMT |
| 101 | firstF_bound x hx := (h.firstF_bound x hx).trans hMT |
| 102 | valueF_error x hx := (h.valueF_error x hx).trans (mul_le_mul_of_nonneg_right hMT (sq_nonneg ε)) |
| 103 | firstF_error x hx := (h.firstF_error x hx).trans (mul_le_mul_of_nonneg_right hMT (sq_nonneg ε)) |
| 104 | firstG_error x hx := (h.firstG_error x hx).trans (mul_le_mul_of_nonneg_right hMT (sq_nonneg ε)) |
| 105 | radialF_bound x hx := (h.radialF_bound x hx).trans hMT |
| 106 | axialF_bound x hx := (h.axialF_bound x hx).trans hMT |
| 107 | axialG_bound x hx := (h.axialG_bound x hx).trans hMT |
| 108 | |
| 109 | /-- The norm of an actual base derivative is bounded by the reference |
| 110 | derivative and the normalized C1 error. -/ |
| 111 | theorem derivative_norm_of_error {F F0 : Slow → ℝ} {q : Slow} {M ε : ℝ} |
| 112 | (hM : 0 ≤ M) (hε : ε ^ 2 ≤ 1) |
| 113 | (href : ‖fderiv ℝ F0 q‖ ≤ M) |
| 114 | (herr : ‖fderiv ℝ F q - fderiv ℝ F0 q‖ ≤ M * ε ^ 2) : |
| 115 | ‖fderiv ℝ F q‖ ≤ 2 * M := by |
| 116 | have hnorm := norm_sub_le_norm_sub_add_norm_sub (fderiv ℝ F q) (fderiv ℝ F0 q) 0 |
| 117 | simp only [sub_zero] at hnorm |
| 118 | have he := mul_le_mul_of_nonneg_left hε hM |
| 119 | nlinarith |
| 120 | |
| 121 | /-- Primitive normalized-base C1 errors and fixed reference C2 bounds give |
| 122 | all local hypotheses used by the phase estimate. -/ |
| 123 | theorem localBase_of_normalized_error |
| 124 | {F G F0 G0 : Slow → ℝ} {U : Set Slow} {M ε : ℝ} |
| 125 | (hM : 0 ≤ M) (hε : ε ^ 2 ≤ 1) (hU : Convex ℝ U) |
| 126 | (hF : ∀ x ∈ U, DifferentiableAt ℝ F x) (hG : ∀ x ∈ U, DifferentiableAt ℝ G x) |
| 127 | (hF0 : ∀ x ∈ U, DifferentiableAt ℝ F0 x) (hG0 : ∀ x ∈ U, DifferentiableAt ℝ G0 x) |
| 128 | (hF02 : ∀ x ∈ U, DifferentiableAt ℝ (fderiv ℝ F0) x) |
| 129 | (hG02 : ∀ x ∈ U, DifferentiableAt ℝ (fderiv ℝ G0) x) |
| 130 | (hDF0 : ∀ x ∈ U, ‖fderiv ℝ F0 x‖ ≤ M) |
| 131 | (hDG0 : ∀ x ∈ U, ‖fderiv ℝ G0 x‖ ≤ M) |
| 132 | (hDDF0 : ∀ x ∈ U, ‖fderiv ℝ (fderiv ℝ F0) x‖ ≤ M) |
| 133 | (hDDG0 : ∀ x ∈ U, ‖fderiv ℝ (fderiv ℝ G0) x‖ ≤ M) |
| 134 | (hvalue : ∀ x ∈ U, |F x - F0 x| ≤ M * ε ^ 2) |
| 135 | (hDF : ∀ x ∈ U, ‖fderiv ℝ F x - fderiv ℝ F0 x‖ ≤ M * ε ^ 2) |
| 136 | (hDG : ∀ x ∈ U, ‖fderiv ℝ G x - fderiv ℝ G0 x‖ ≤ M * ε ^ 2) : |
| 137 | PhaseEstimates.LocalBaseBounds F G F0 G0 U (2 * M) ε := by |
| 138 | have hgradF x hx := derivative_norm_of_error hM hε (hDF0 x hx) (hDF x hx) |
| 139 | have hgradG x hx := derivative_norm_of_error hM hε (hDG0 x hx) (hDG x hx) |
| 140 | have hM2 : M ≤ 2 * M := by linarith |
| 141 | have hdir (f : Slow → ℝ) (x : Slow) (e : Slow) (he : ‖e‖ ≤ 1) |
| 142 | (hf : ‖fderiv ℝ f x‖ ≤ 2 * M) : |fderiv ℝ f x e| ≤ 2 * M := by |
| 143 | rw [← Real.norm_eq_abs] |
| 144 | exact (ContinuousLinearMap.le_opNorm _ _).trans |
| 145 | ((mul_le_mul hf he (norm_nonneg _) (by positivity)).trans_eq (mul_one _)) |
| 146 | refine ⟨hU, hF, hG, hF0, hG0, hF02, hG02, |
| 147 | fun x hx => (hDDF0 x hx).trans hM2, fun x hx => (hDDG0 x hx).trans hM2, |
| 148 | fun x hx => (hDF0 x hx).trans hM2, |
| 149 | fun x hx => (hvalue x hx).trans (mul_le_mul_of_nonneg_right hM2 (sq_nonneg ε)), |
| 150 | fun x hx => (hDF x hx).trans (mul_le_mul_of_nonneg_right hM2 (sq_nonneg ε)), |
| 151 | fun x hx => (hDG x hx).trans (mul_le_mul_of_nonneg_right hM2 (sq_nonneg ε)), ?_, ?_, ?_⟩ |
| 152 | · intro x hx |
| 153 | exact hdir F x (1, (0, 0)) (by norm_num) (hgradF x hx) |
| 154 | · intro x hx |
| 155 | exact hdir F x (0, (1, 0)) (by norm_num) (hgradF x hx) |
| 156 | · intro x hx |
| 157 | exact hdir G x (0, (1, 0)) (by norm_num) (hgradG x hx) |
| 158 | |
| 159 | theorem scaled_div_mono {a A δ b B : ℝ} (hδ : 0 ≤ δ) (hb : 0 < b) |
| 160 | (hbB : b ≤ B) (ha : 0 ≤ a) (haA : a ≤ A) : a * δ / B ≤ A * δ / b := by |
| 161 | have hB : 0 < B := hb.trans_le hbB |
| 162 | have hd := div_le_div_of_nonneg_left hδ hb hbB |
| 163 | simpa only [mul_div_assoc] using mul_le_mul haA hd (div_nonneg hδ hB.le) (ha.trans haA) |
| 164 | |
| 165 | /-- Normal comparison and base comparison imply the three geometric |
| 166 | coefficient errors. All changing-frame terms are included. -/ |
| 167 | theorem frame_errors_of_normal_close |
| 168 | {n nDot : Space} {K g g0 : Plane} {F F0 B s b M A δ η : ℝ} |
| 169 | (hb : 0 < b) (hbB : b ≤ B) (hK : ‖K‖ = 1) |
| 170 | (hsmall : δ ≤ B / 2) |
| 171 | (hn : ‖n - MovingFrameODE.pack (B * s) (B • K)‖ ≤ δ) |
| 172 | (hnd : ‖nDot‖ ≤ δ) |
| 173 | (hM : 1 ≤ M) (hA : 0 ≤ A) (hs : |s| ≤ A) |
| 174 | (hF0 : |F0| ≤ M) (hg0 : ‖g0‖ ≤ M) (horth : ⟪K, g0⟫_ℝ = 0) |
| 175 | (hη : 0 ≤ η) (hF : |F - F0| ≤ η) (hg : ‖g - g0‖ ≤ η) : |
| 176 | let G := M + 2 + 2 * A |
| 177 | let E := η + 8 * (1 + A) * δ / b |
| 178 | let R := PrimaryODE.localFrame n |
| 179 | let r := MovingFrameODE.radialSlope n |
| 180 | let rd := PhaseEstimates.slopeDerivative n nDot |
| 181 | let rot := PhaseEstimates.angularVelocity n nDot |
| 182 | |MovingFrameODE.coeff11 r rd ⟪R 0, g⟫_ℝ| ≤ 16 * G ^ 2 * (1 + G) * E ∧ |
| 183 | |MovingFrameODE.coeff12 F (R 1 0) r rot - 2 * F0 * (MovingFrameODE.quarterTurn K) 0 / (1 + s ^ 2)| ≤ |
| 184 | 16 * G ^ 2 * (1 + G) * E ∧ |
| 185 | |MovingFrameODE.coeff21 F (R 1 0) ⟪R 1, g⟫_ℝ r rot - |
| 186 | (-(2 * F0 * (MovingFrameODE.quarterTurn K) 0 + ⟪MovingFrameODE.quarterTurn K, g0⟫_ℝ))| ≤ |
| 187 | 16 * G ^ 2 * (1 + G) * E := by |
| 188 | dsimp only |
| 189 | have hB : 0 < B := hb.trans_le hbB |
| 190 | have hδ : 0 ≤ δ := (norm_nonneg _).trans hn |
| 191 | obtain ⟨hlow, _, hne, _⟩ := PhaseEstimates.normal_lower_bounds hB hK hsmall hn |
| 192 | have hr := PhaseEstimates.radialSlope_uniform_bound hB hK hsmall hn hs |
| 193 | let E := η + 8 * (1 + A) * δ / b |
| 194 | have hE : 0 ≤ E := by dsimp [E]; positivity |
| 195 | have hηE : η ≤ E := by |
| 196 | have : 0 ≤ 8 * (1 + A) * δ / b := by positivity |
| 197 | dsimp [E] |
| 198 | linarith |
| 199 | have hfac : 8 * (1 + A) * δ / b ≤ E := by dsimp [E]; linarith |
| 200 | have h0 : PrimaryODE.localFrame n 0 = MovingFrameODE.normalDirection n := by |
| 201 | rw [PrimaryODE.localFrame_eq hne, MovingFrameODE.normalFrame_zero] |
| 202 | have h1 : PrimaryODE.localFrame n 1 = MovingFrameODE.quarterTurn (MovingFrameODE.normalDirection n) := by |
| 203 | rw [PrimaryODE.localFrame_eq hne, MovingFrameODE.normalFrame_one] |
| 204 | have hKerr : ‖PrimaryODE.localFrame n 0 - K‖ ≤ E := by |
| 205 | rw [h0] |
| 206 | exact (PhaseEstimates.normalDirection_close hB hK hsmall hn).trans |
| 207 | ((scaled_div_mono hδ hb hbB (by norm_num : (0 : ℝ) ≤ 4) (by nlinarith)).trans hfac) |
| 208 | have hNerr : ‖PrimaryODE.localFrame n 1 - MovingFrameODE.quarterTurn K‖ ≤ E := by |
| 209 | rw [h1] |
| 210 | exact (PhaseEstimates.transverseDirection_close hB hK hsmall hn).trans |
| 211 | ((scaled_div_mono hδ hb hbB (by norm_num : (0 : ℝ) ≤ 4) (by nlinarith)).trans hfac) |
| 212 | have hrerr : |MovingFrameODE.radialSlope n - s| ≤ E := |
| 213 | (PhaseEstimates.radialSlope_close hB hK hsmall hn).trans |
| 214 | ((scaled_div_mono hδ hb hbB (by positivity) (by nlinarith [abs_nonneg s])).trans hfac) |
| 215 | have hrderr : |PhaseEstimates.slopeDerivative n nDot| ≤ E := |
| 216 | (PhaseEstimates.slopeDerivative_bound hB hlow hnd).trans |
| 217 | ((scaled_div_mono hδ hb hbB (by positivity) |
| 218 | (by nlinarith [abs_nonneg (MovingFrameODE.radialSlope n)])).trans hfac) |
| 219 | have hωerr : |PhaseEstimates.angularVelocity n nDot| ≤ E := |
| 220 | (PhaseEstimates.angularVelocity_bound hB hlow hnd).trans |
| 221 | ((scaled_div_mono hδ hb hbB (by norm_num : (0 : ℝ) ≤ 4) (by nlinarith)).trans hfac) |
| 222 | have h := MovingFrameODE.frame_coefficients_close |
| 223 | (B := PrimaryODE.localFrame n) (B0 := MovingFrameODE.frameOfUnit K hK) |
| 224 | (g := g) (g0 := g0) (F := F) (F0 := F0) (ρ := MovingFrameODE.radialSlope n) |
| 225 | (s := s) (ρ' := PhaseEstimates.slopeDerivative n nDot) |
| 226 | (rot := PhaseEstimates.angularVelocity n nDot) (M := M + 2 + 2 * A) (η := E) |
| 227 | (by linarith) hE (hr.trans (by linarith)) (hs.trans (by linarith)) |
| 228 | (hF0.trans (by linarith)) (hg0.trans (by linarith)) (by simpa using horth) |
| 229 | (hF.trans hηE) (hg.trans hηE) (by simpa using hKerr) (by simpa using hNerr) hrerr hrderr hωerr |
| 230 | simpa only [MovingFrameODE.frameOfUnit_one, E] using h |
| 231 | |
| 232 | theorem norm_pack_sq (x : ℝ) (w : Plane) : |
| 233 | ‖MovingFrameODE.pack x w‖ ^ 2 = x ^ 2 + ‖w‖ ^ 2 := by |
| 234 | rw [PhaseCalculus.vec3_norm_sq, ViscousPropagator.plane_norm_sq] |
| 235 | change x ^ 2 + w 0 ^ 2 + w 1 ^ 2 = x ^ 2 + (w 0 ^ 2 + w 1 ^ 2) |
| 236 | ring |
| 237 | |
| 238 | theorem reference_normal_sq {K : Plane} (hK : ‖K‖ = 1) (B s : ℝ) : |
| 239 | ‖MovingFrameODE.pack (B * s) (B • K)‖ ^ 2 = B ^ 2 * (1 + s ^ 2) := by |
| 240 | rw [norm_pack_sq, norm_smul, hK, mul_one, Real.norm_eq_abs, sq_abs] |
| 241 | ring |
| 242 | |
| 243 | theorem reference_normal_bound {K : Plane} {B s A : ℝ} |
| 244 | (hK : ‖K‖ = 1) (hB : 0 ≤ B) (hs : |s| ≤ A) : |
| 245 | ‖MovingFrameODE.pack (B * s) (B • K)‖ ≤ B * (A + 2) := by |
| 246 | have hc (i : Fin 2) : |K i| ≤ 1 := by |
| 247 | simpa only [Real.norm_eq_abs, hK] using PiLp.norm_apply_le K i |
| 248 | have hn := PhaseEstimates.vec3_norm_le_sum (MovingFrameODE.pack (B * s) (B • K)) |
| 249 | change ‖MovingFrameODE.pack (B * s) (B • K)‖ ≤ |B * s| + |B * K 0| + |B * K 1| at hn |
| 250 | simp only [abs_mul, abs_of_nonneg hB] at hn |
| 251 | nlinarith [mul_le_mul_of_nonneg_left hs hB, |
| 252 | mul_le_mul_of_nonneg_left (hc 0) hB, mul_le_mul_of_nonneg_left (hc 1) hB] |
| 253 | |
| 254 | /-- The damping error is two-sided. It follows from normal comparison and |
| 255 | the actual bounded viscosity coefficient, including all high harmonics. -/ |
| 256 | theorem damping_error_of_normal_close |
| 257 | {n : Space} {K : Plane} {B s A M δ ν : ℝ} |
| 258 | (hK : ‖K‖ = 1) (hB : 0 < B) (hBM : B ≤ M) (hs : |s| ≤ A) |
| 259 | (hsmall : δ ≤ B / 2) |
| 260 | (hn : ‖n - MovingFrameODE.pack (B * s) (B • K)‖ ≤ δ) |
| 261 | (hν0 : 0 ≤ ν) (hν4 : ν ≤ 4) : |
| 262 | |ν * ‖n‖ ^ 2 - ν * B ^ 2 * (1 + s ^ 2)| ≤ 4 * M * (2 * A + 5) * δ := by |
| 263 | let r := MovingFrameODE.pack (B * s) (B • K) |
| 264 | have hA : 0 ≤ A := (abs_nonneg s).trans hs |
| 265 | have hM : 0 ≤ M := hB.le.trans hBM |
| 266 | have hδ : 0 ≤ δ := (norm_nonneg _).trans hn |
| 267 | have hr : ‖r‖ ≤ M * (A + 2) := |
| 268 | (reference_normal_bound hK hB.le hs).trans (mul_le_mul_of_nonneg_right hBM (by positivity)) |
| 269 | have hn' : ‖n‖ ≤ M * (A + 3) := by |
| 270 | have hh := norm_sub_le_norm_sub_add_norm_sub n r 0 |
| 271 | simp only [sub_zero] at hh |
| 272 | nlinarith |
| 273 | have hdiff : |‖n‖ - ‖r‖| ≤ δ := (abs_norm_sub_norm_le n r).trans hn |
| 274 | have hsq : |‖n‖ ^ 2 - ‖r‖ ^ 2| ≤ δ * (M * (2 * A + 5)) := by |
| 275 | calc |
| 276 | _ = |‖n‖ - ‖r‖| * (‖n‖ + ‖r‖) := by |
| 277 | rw [← abs_of_nonneg (add_nonneg (norm_nonneg n) (norm_nonneg r)), ← abs_mul] |
| 278 | congr 1 |
| 279 | ring |
| 280 | _ ≤ δ * (M * (2 * A + 5)) := mul_le_mul hdiff (by nlinarith) |
| 281 | (add_nonneg (norm_nonneg n) (norm_nonneg r)) hδ |
| 282 | calc |
| 283 | _ = ν * |‖n‖ ^ 2 - ‖r‖ ^ 2| := by |
| 284 | rw [show ν * ‖n‖ ^ 2 - ν * B ^ 2 * (1 + s ^ 2) = ν * (‖n‖ ^ 2 - ‖r‖ ^ 2) by |
| 285 | dsimp [r]; rw [reference_normal_sq hK]; ring, abs_mul, abs_of_nonneg hν0] |
| 286 | _ ≤ 4 * (δ * (M * (2 * A + 5))) := mul_le_mul hν4 hsq (abs_nonneg _) (by norm_num) |
| 287 | _ = _ := by ring |
| 288 | |
| 289 | noncomputable def normalConstant (M : ℝ) : ℝ := |
| 290 | 8 * PhaseEstimates.phaseConstant (2 * M) |
| 291 | |
| 292 | theorem normalConstant_pos {M : ℝ} (hM : 1 ≤ M) : 0 < normalConstant M := by |
| 293 | have : 0 < M := zero_lt_one.trans_le hM |
| 294 | unfold normalConstant PhaseEstimates.phaseConstant |
| 295 | positivity |
| 296 | |
| 297 | /-- The actual two-mesh enlargement has diameter three mesh units. Using |
| 298 | the phase estimate at half the scale retains a fixed, band-independent |
| 299 | constant and does not strengthen this geometric input. -/ |
| 300 | theorem phase_errors_on_mesh |
| 301 | {F G F0 G0 : Slow → ℝ} {U : Set Slow} {q q0 : Slow} |
| 302 | {ε target pz v θ B sigma u L M S k : ℝ} {K : Plane} |
| 303 | (hbase : PhaseEstimates.LocalBaseBounds F G F0 G0 U M ε) |
| 304 | (hq : q ∈ U) (hq0 : q0 ∈ U) (hdiameter : ‖q - q0‖ ≤ 3 / S ^ 3) |
| 305 | (hR : q.1 ≠ 0) (hR0 : q0.1 ≠ 0) |
| 306 | (hg : PhaseEstimates.shearVector F0 G0 q0 ≠ 0) |
| 307 | (horth : ⟪K, PhaseEstimates.shearVector F0 G0 q0⟫_ℝ = 0) |
| 308 | (hfreq : (!₂[target / q0.1, pz] : Plane) = |
| 309 | PhaseEstimates.representativeFrequency B sigma u L K (PhaseEstimates.shearVector F0 G0 q0)) |
| 310 | (hM : 1 ≤ M) (hS : 2 ≤ S) (hk : 1 ≤ k) (hε : 0 < ε) |
| 311 | (htarget : |target| ≤ M) (hpz : |pz| ≤ M) (hB : |B| ≤ M) |
| 312 | (hsigma : |sigma| = 1) (hu : |u| ≤ M) |
| 313 | (hgi : 1 / ‖PhaseEstimates.shearVector F0 G0 q0‖ ≤ M) |
| 314 | (hL : 1 / |L| ≤ M / S) (hv : |v| ≤ M * S) |
| 315 | (hRi : |1 / q.1| ≤ M) (hR0i : |1 / q0.1| ≤ M) |
| 316 | (hε2 : S ^ 2 * ε ^ 2 ≤ 1) (hk2 : S ^ 2 / k ≤ 1) |
| 317 | (hε1 : ε * S ^ 2 ≤ 1) : |
| 318 | ‖PhaseCalculus.phaseNormal ε (PhaseEstimates.roundedFrequency k target) pz |
| 319 | (sigma * B * u / 2) F G (q, (θ, v)) - |
| 320 | PhaseEstimates.referenceNormal B sigma u L v K‖ ≤ normalConstant M / S ∧ |
| 321 | ‖PhaseCalculus.normalSlotDerivative ε (PhaseEstimates.roundedFrequency k target) pz F G q‖ ≤ |
| 322 | normalConstant M / S := by |
| 323 | have hS0 : 0 < S := by linarith |
| 324 | have hk0 : 0 < k := by linarith |
| 325 | have hM0 : 0 ≤ M := by linarith |
| 326 | have hM2 : M ≤ 2 * M := by linarith |
| 327 | have hd : ‖q - q0‖ ≤ 1 / (S / 2) ^ 3 := hdiameter.trans (by |
| 328 | apply (div_le_div_iff₀ (pow_pos hS0 3) (pow_pos (half_pos hS0) 3)).2 |
| 329 | nlinarith [pow_pos hS0 3]) |
| 330 | have hL' : 1 / |L| ≤ (2 * M) / (S / 2) := hL.trans (by |
| 331 | apply (div_le_div_iff₀ hS0 (half_pos hS0)).2 |
| 332 | nlinarith) |
| 333 | have he := PhaseEstimates.actual_phase_estimates |
| 334 | (v := v) (θ := θ) (localBase_mono hbase hM2) hq hq0 hd hR hR0 hg horth hfreq |
| 335 | (by linarith) (by linarith) hk hε (htarget.trans hM2) (hpz.trans hM2) (hB.trans hM2) |
| 336 | hsigma (hu.trans hM2) (hgi.trans hM2) hL' (by nlinarith [hv]) |
| 337 | (hRi.trans hM2) (hR0i.trans hM2) |
| 338 | have hband := PhaseEstimates.phaseError_le_four_div (S := S / 2) (ε := ε) (k := k) |
| 339 | (half_pos hS0) (by nlinarith [sq_nonneg (S * ε)]) |
| 340 | ((div_le_iff₀ hk0).2 (by |
| 341 | have h := (div_le_iff₀ hk0).1 hk2 |
| 342 | nlinarith [sq_nonneg S])) |
| 343 | (by nlinarith [mul_nonneg hε.le (sq_nonneg S)]) |
| 344 | have hc : 0 ≤ PhaseEstimates.phaseConstant (2 * M) := by |
| 345 | unfold PhaseEstimates.phaseConstant |
| 346 | positivity |
| 347 | have hbound : PhaseEstimates.phaseConstant (2 * M) * |
| 348 | PhaseEstimates.phaseError (S / 2) ε k ≤ normalConstant M / S := by |
| 349 | calc |
| 350 | _ ≤ PhaseEstimates.phaseConstant (2 * M) * (4 / (S / 2)) := |
| 351 | mul_le_mul_of_nonneg_left hband hc |
| 352 | _ = _ := by unfold normalConstant; field_simp ; ring |
| 353 | exact ⟨he.1.trans hbound, he.2.trans hbound⟩ |
| 354 | |
| 355 | theorem signedSlot_sq {sigma : ℝ} (hsigma : |sigma| = 1) (u L v : ℝ) : |
| 356 | PhaseEstimates.signedSlot sigma u L v ^ 2 = PulseGrowth.slotMagnitude u L v ^ 2 := by |
| 357 | have hh : sigma ^ 2 = 1 := by nlinarith [sq_abs sigma] |
| 358 | simp only [PhaseEstimates.signedSlot, PulseGrowth.slotMagnitude, mul_pow, hh, one_mul] |
| 359 | |
| 360 | /-- Exact reference diagonalization; its scalar identities are supplied by |
| 361 | the representative eigenpair construction. -/ |
| 362 | theorem reference_off_diagonal {lam c0 u L v s a b : ℝ} |
| 363 | (hc : c0 ≠ 0) (hs : s ^ 2 = PulseGrowth.slotMagnitude u L v ^ 2) |
| 364 | (ha : lam / c0 = a) (hb : lam * c0 = b) : |
| 365 | ViscousPropagator.referenceEigenvalue lam u L v / PrimaryODE.referenceProfile c0 u L v = |
| 366 | a / (1 + s ^ 2) ∧ |
| 367 | ViscousPropagator.referenceEigenvalue lam u L v * PrimaryODE.referenceProfile c0 u L v = b := by |
| 368 | let r := Real.sqrt (1 + PulseGrowth.slotMagnitude u L v ^ 2) |
| 369 | have hr : 0 < r := by dsimp [r]; positivity |
| 370 | have hr2 : r ^ 2 = 1 + s ^ 2 := by |
| 371 | dsimp [r] |
| 372 | rw [Real.sq_sqrt (by positivity), hs] |
| 373 | change (lam / r) / (c0 * r) = a / (1 + s ^ 2) ∧ (lam / r) * (c0 * r) = b |
| 374 | constructor |
| 375 | · rw [← ha, ← hr2] |
| 376 | field_simp [hc, hr.ne'] |
| 377 | · calc |
| 378 | _ = lam * c0 := by field_simp [hr.ne'] |
| 379 | _ = b := hb |
| 380 | |
| 381 | theorem reference_profile_bounds {c0 u L v c M A : ℝ} |
| 382 | (hc : 0 < c) (hcl : c ≤ |c0|) (hch : |c0| ≤ M) |
| 383 | (hs : |PulseGrowth.slotMagnitude u L v| ≤ A) : |
| 384 | |PrimaryODE.referenceProfile c0 u L v| ≤ M * (1 + A) ∧ |
| 385 | |1 / PrimaryODE.referenceProfile c0 u L v| ≤ 1 / c := by |
| 386 | have hb := PhaseJetBounds.radius_bounds (PulseGrowth.slotMagnitude u L v) |
| 387 | have hM : 0 ≤ M := (abs_nonneg _).trans hch |
| 388 | have hr : 0 < Real.sqrt (1 + PulseGrowth.slotMagnitude u L v ^ 2) := by positivity |
| 389 | have hlow : c ≤ |c0| * Real.sqrt (1 + PulseGrowth.slotMagnitude u L v ^ 2) := |
| 390 | hcl.trans (le_mul_of_one_le_right (abs_nonneg _) hb.1) |
| 391 | constructor |
| 392 | · simpa only [PrimaryODE.referenceProfile, abs_mul, abs_of_pos hr] using |
| 393 | mul_le_mul hch (hb.2.trans (by linarith)) (Real.sqrt_nonneg _) hM |
| 394 | · rw [abs_div, abs_one, PrimaryODE.referenceProfile, abs_mul, abs_of_pos hr] |
| 395 | exact one_div_le_one_div_of_le hc hlow |
| 396 | |
| 397 | theorem reference_profile_rate_bound {u L v A M S : ℝ} |
| 398 | (hA : 0 ≤ A) (_hM : 0 ≤ M) (_hS : 0 < S) |
| 399 | (hs : |PulseGrowth.slotMagnitude u L v| ≤ A) |
| 400 | (huL : |u / L| ≤ M / S) : |
| 401 | |PrimaryODE.referenceProfileRate u L v| ≤ A * M / S := by |
| 402 | have hden : 1 ≤ 1 + PulseGrowth.slotMagnitude u L v ^ 2 := by nlinarith [sq_nonneg (PulseGrowth.slotMagnitude u L v)] |
| 403 | have hdenpos : 0 < 1 + PulseGrowth.slotMagnitude u L v ^ 2 := by positivity |
| 404 | rw [PrimaryODE.referenceProfileRate, abs_div, abs_mul, abs_of_pos hdenpos] |
| 405 | calc |
| 406 | _ ≤ |PulseGrowth.slotMagnitude u L v| * |u / L| := |
| 407 | div_le_self (mul_nonneg (abs_nonneg _) (abs_nonneg _)) hden |
| 408 | _ ≤ A * (M / S) := mul_le_mul hs huL (abs_nonneg _) hA |
| 409 | _ = _ := by ring |
| 410 | |
| 411 | noncomputable def frequencyBound (M : ℝ) : ℝ := M + M * (M + M ^ 4) + (M + M ^ 4) + M ^ 2 + 4 |
| 412 | |
| 413 | theorem frequencyBound_bounds {M : ℝ} (hM : 1 ≤ M) : |
| 414 | M ≤ frequencyBound M ∧ M * (M + M ^ 4) + 1 ≤ frequencyBound M ∧ |
| 415 | M + M ^ 4 ≤ frequencyBound M ∧ M ^ 2 ≤ frequencyBound M ∧ 4 ≤ frequencyBound M := by |
| 416 | have h0 : 0 ≤ M := by linarith |
| 417 | have h4 : 0 ≤ M ^ 4 := pow_nonneg h0 _ |
| 418 | have hprod : 0 ≤ M * (M + M ^ 4) := mul_nonneg h0 (add_nonneg h0 h4) |
| 419 | unfold frequencyBound |
| 420 | constructor |
| 421 | · nlinarith [sq_nonneg M] |
| 422 | constructor |
| 423 | · nlinarith [sq_nonneg M] |
| 424 | constructor |
| 425 | · nlinarith [sq_nonneg M] |
| 426 | constructor <;> nlinarith [sq_nonneg M] |
| 427 | |
| 428 | noncomputable def normalLower (M u : ℝ) : ℝ := |
| 429 | Real.sqrt ((1 / M) / (4 * dampingDenominator u)) |
| 430 | |
| 431 | theorem normalLower_pos {M u : ℝ} (hM : 1 ≤ M) : 0 < normalLower M u := by |
| 432 | apply Real.sqrt_pos.mpr |
| 433 | exact div_pos (one_div_pos.mpr (zero_lt_one.trans_le hM)) |
| 434 | (mul_pos (by norm_num) (dampingDenominator_pos u)) |
| 435 | |
| 436 | noncomputable def phaseConstant (M : ℝ) : ℝ := normalConstant (frequencyBound M) |
| 437 | |
| 438 | theorem phaseConstant_pos {M : ℝ} (hM : 1 ≤ M) : 0 < phaseConstant M := |
| 439 | normalConstant_pos (hM.trans (frequencyBound_bounds hM).1) |
| 440 | |
| 441 | noncomputable def coordinateConstant (M u : ℝ) : ℝ := |
| 442 | 16 * (M + 2 + 2 * (3 * M)) ^ 2 * (1 + (M + 2 + 2 * (3 * M))) * |
| 443 | (16 * M ^ 2 + 8 * (1 + 3 * M) * phaseConstant M / normalLower M u) |
| 444 | |
| 445 | noncomputable def eigenBound (M : ℝ) : ℝ := M * (2 + 3 * M) |
| 446 | |
| 447 | noncomputable def modalConstant (M u : ℝ) : ℝ := |
| 448 | (1 + 2 * eigenBound M) * coordinateConstant M u + 3 * M ^ 3 |
| 449 | |
| 450 | noncomputable def dampingConstant (M : ℝ) : ℝ := |
| 451 | 4 * M * (6 * M + 5) * phaseConstant M |
| 452 | |
| 453 | theorem error_constants_nonneg {M u : ℝ} (hM : 1 ≤ M) : |
| 454 | 0 ≤ coordinateConstant M u ∧ 0 ≤ modalConstant M u ∧ 0 ≤ dampingConstant M := by |
| 455 | have hM0 : 0 ≤ M := by linarith |
| 456 | have hD := (phaseConstant_pos hM).le |
| 457 | have hb := (normalLower_pos (u := u) hM).le |
| 458 | have hc : 0 ≤ coordinateConstant M u := by unfold coordinateConstant; positivity |
| 459 | exact ⟨hc, by unfold modalConstant eigenBound; positivity, |
| 460 | by unfold dampingConstant; positivity⟩ |
| 461 | |
| 462 | /-- Only numerical scale conditions occur here. In particular, no normal, |
| 463 | coefficient, solution, or covariance estimate is assumed. -/ |
| 464 | structure LargeBand (h M u : ℝ) (n : ℕ) : Prop where |
| 465 | four_le : 4 ≤ n |
| 466 | two_le_scale : 2 ≤ ChartScales.S n |
| 467 | epsilon_square : ChartScales.S n ^ 2 * ChartScales.epsilon h n ^ 2 ≤ 1 |
| 468 | carrier : ChartScales.S n ^ 2 / (ChartScales.carrier h n : ℝ) ≤ 1 |
| 469 | epsilon : ChartScales.epsilon h n * ChartScales.S n ^ 2 ≤ 1 |
| 470 | small : phaseConstant M / ChartScales.S n ≤ normalLower M u / 2 |
| 471 | |
| 472 | /-- All constants are fixed before this threshold. An arbitrary previous |
| 473 | band cutoff and arbitrary additional slow-scale requirement are allowed. -/ |
| 474 | theorem exists_large_band (h M u T : ℝ) (hh : 0 < h) (hM : 1 ≤ M) (N0 : ℕ) : |
| 475 | ∃ N ≥ N0, ∀ n ≥ N, LargeBand h M u n ∧ T ≤ ChartScales.S n := by |
| 476 | have hb := normalLower_pos (u := u) hM |
| 477 | have hD := phaseConstant_pos hM |
| 478 | have hs := PhaseEstimates.chart_S_tendsto_atTop.eventually |
| 479 | (eventually_ge_atTop (max T (max 2 (2 * phaseConstant M / normalLower M u)))) |
| 480 | have hall : ∀ᶠ n : ℕ in atTop, LargeBand h M u n ∧ T ≤ ChartScales.S n := by |
| 481 | filter_upwards [PhaseEstimates.eventually_band_conditions h hh, hs, |
| 482 | (eventually_ge_atTop (4 : ℕ))] with n hn hscale hn4 |
| 483 | have hS2 : 2 ≤ ChartScales.S n := (le_max_left _ _).trans ((le_max_right _ _).trans hscale) |
| 484 | have hS0 : 0 < ChartScales.S n := by linarith |
| 485 | have hcut : 2 * phaseConstant M / normalLower M u ≤ ChartScales.S n := |
| 486 | (le_max_right _ _).trans ((le_max_right _ _).trans hscale) |
| 487 | refine ⟨⟨hn4, hS2, hn.2.1, hn.2.2.1, hn.2.2.2, ?_⟩, (le_max_left _ _).trans hscale⟩ |
| 488 | apply (div_le_iff₀ hS0).2 |
| 489 | have ht := (div_le_iff₀ hb).1 hcut |
| 490 | nlinarith |
| 491 | obtain ⟨N, hN⟩ := eventually_atTop.1 hall |
| 492 | exact ⟨max N N0, le_max_right _ _, fun n hn => hN n ((le_max_left _ _).trans hn)⟩ |
| 493 | |
| 494 | theorem base_error_on_mesh {S ε M : ℝ} (hS : 1 ≤ S) (hM : 1 ≤ M) |
| 495 | (hε : S ^ 2 * ε ^ 2 ≤ 1) : |
| 496 | M * (3 / S ^ 3 + ε ^ 2) ≤ 16 * M ^ 2 / S ∧ |
| 497 | 4 * M ^ 2 * (3 / S ^ 3 + ε ^ 2) ≤ 16 * M ^ 2 / S := by |
| 498 | have hS0 : 0 < S := zero_lt_one.trans_le hS |
| 499 | have hM0 : 0 ≤ M := by linarith |
| 500 | have he : ε ^ 2 ≤ 1 / S := by |
| 501 | apply (le_div_iff₀ hS0).2 |
| 502 | have hsq : S ≤ S ^ 2 := by nlinarith |
| 503 | have hm := mul_le_mul_of_nonneg_right hsq (sq_nonneg ε) |
| 504 | nlinarith |
| 505 | have hcube := (PhaseEstimates.inverse_cube_bounds hS).1 |
| 506 | have hsum : 3 / S ^ 3 + ε ^ 2 ≤ 4 / S := by |
| 507 | calc |
| 508 | _ = 3 * (1 / S ^ 3) + ε ^ 2 := by ring |
| 509 | _ ≤ 3 * (1 / S) + 1 / S := add_le_add |
| 510 | (mul_le_mul_of_nonneg_left hcube (by norm_num)) he |
| 511 | _ = _ := by ring |
| 512 | have h4 : 4 * M ^ 2 * (3 / S ^ 3 + ε ^ 2) ≤ 16 * M ^ 2 / S := by |
| 513 | calc |
| 514 | _ ≤ 4 * M ^ 2 * (4 / S) := mul_le_mul_of_nonneg_left hsum (by positivity) |
| 515 | _ = _ := by ring |
| 516 | refine ⟨?_, h4⟩ |
| 517 | exact (mul_le_mul_of_nonneg_right (by nlinarith : M ≤ 4 * M ^ 2) |
| 518 | (by positivity : 0 ≤ 3 / S ^ 3 + ε ^ 2)).trans h4 |
| 519 | |
| 520 | /-- Fixed normalized-base data and frozen representative data. The |
| 521 | representative point is selected separately from the actual enlarged |
| 522 | mesh; the equality and distance fields are the interface to that proof. |
| 523 | All phase quantities below are constructed from this record. -/ |
| 524 | structure FamilyData {ι : Type*} (D : PhaseJetBounds.Domain ι Slow) |
| 525 | (h r0 u M : ℝ) where |
| 526 | band : ι → ℕ |
| 527 | scale_eq : ∀ i, D.scale i = ChartScales.S (band i) |
| 528 | F : ι → Slow → ℝ |
| 529 | G : ι → Slow → ℝ |
| 530 | F0 : ι → Slow → ℝ |
| 531 | G0 : ι → Slow → ℝ |
| 532 | U : ι → Set Slow |
| 533 | q0 : ι → Slow |
| 534 | K : ι → Plane |
| 535 | lam : ι → ℝ |
| 536 | c0 : ι → ℝ |
| 537 | sigma : ι → ℝ |
| 538 | theta : ι → ℝ |
| 539 | base : ∀ i, PhaseEstimates.LocalBaseBounds (F i) (G i) (F0 i) (G0 i) (U i) M |
| 540 | (ChartScales.epsilon h (band i)) |
| 541 | baseF : PhaseJetBounds.PolynomialJets D F |
| 542 | baseG : PhaseJetBounds.PolynomialJets D G |
| 543 | inside : ∀ i, D.carrier i ⊆ U i |
| 544 | representative_inside : ∀ i, q0 i ∈ U i |
| 545 | distance : ∀ i q, q ∈ D.carrier i → ‖q - q0 i‖ ≤ 3 / D.scale i ^ 3 |
| 546 | radius : ∀ i q, q ∈ D.carrier i → 1 / M ≤ |q.1| ∧ |q.1| ≤ M |
| 547 | representative_radius : ∀ i, 1 / M ≤ |(q0 i).1| ∧ |(q0 i).1| ≤ M |
| 548 | unit : ∀ i, ‖K i‖ = 1 |
| 549 | orthogonal : ∀ i, ⟪K i, PhaseEstimates.shearVector (F0 i) (G0 i) (q0 i)⟫_ℝ = 0 |
| 550 | frequency_bound : ∀ i, |F0 i (q0 i)| ≤ M |
| 551 | shear_bound : ∀ i, ‖PhaseEstimates.shearVector (F0 i) (G0 i) (q0 i)‖ ≤ M |
| 552 | shear_inv : ∀ i, 1 / M ≤ ‖PhaseEstimates.shearVector (F0 i) (G0 i) (q0 i)‖ |
| 553 | lambda_bound : ∀ i, 1 / M ≤ lam i ∧ lam i ≤ M |
| 554 | ratio_bound : ∀ i, 1 / M ≤ |c0 i| ∧ |c0 i| ≤ M |
| 555 | eigen12 : ∀ i, lam i / c0 i = 2 * F0 i (q0 i) * (MovingFrameODE.quarterTurn (K i)) 0 |
| 556 | eigen21 : ∀ i, lam i * c0 i = |
| 557 | -(2 * F0 i (q0 i) * (MovingFrameODE.quarterTurn (K i)) 0 + |
| 558 | ⟪MovingFrameODE.quarterTurn (K i), PhaseEstimates.shearVector (F0 i) (G0 i) (q0 i)⟫_ℝ) |
| 559 | sign : ∀ i, |sigma i| = 1 |
| 560 | |
| 561 | namespace FamilyData |
| 562 | |
| 563 | variable {ι : Type*} {D : PhaseJetBounds.Domain ι Slow} {h r0 u M : ℝ} |
| 564 | variable (a : FamilyData D h r0 u M) |
| 565 | |
| 566 | noncomputable def length (i : ι) : ℝ := ChartScales.slotLength r0 h (a.band i) |
| 567 | noncomputable def viscosity (i : ι) : ℝ := |
| 568 | ChartScales.epsilon h (a.band i) * (ChartScales.carrier h (a.band i) : ℝ) ^ 2 |
| 569 | noncomputable def B (i : ι) : ℝ := referenceScale (a.lam i) (a.viscosity i) u |
| 570 | noncomputable def frequency (i : ι) : Plane := |
| 571 | PhaseEstimates.representativeFrequency (a.B i) (a.sigma i) u (a.length i) (a.K i) |
| 572 | (PhaseEstimates.shearVector (a.F0 i) (a.G0 i) (a.q0 i)) |
| 573 | noncomputable def target (i : ι) : ℝ := (a.q0 i).1 * a.frequency i 0 |
| 574 | noncomputable def phase : PhaseJetBounds.PhaseFamily ι where |
| 575 | epsilon i := ChartScales.epsilon h (a.band i) |
| 576 | p i := PhaseEstimates.roundedFrequency (ChartScales.carrier h (a.band i)) (a.target i) |
| 577 | pz i := a.frequency i 1 |
| 578 | x0 i := a.sigma i * a.B i * u / 2 |
| 579 | theta := a.theta |
| 580 | F := a.F |
| 581 | G := a.G |
| 582 | noncomputable def frame (i : ι) : PrimaryODE.FrameData Slow := |
| 583 | a.phase.frameData a.lam a.c0 (fun _ => u) a.length a.viscosity i |
| 584 | noncomputable def slot (i : ι) : Set ℝ := Ioo (-(a.length i)) (2 * a.length i) |
| 585 | noncomputable def slope (i : ι) (z : Slow × ℝ) : ℝ := |
| 586 | PhaseEstimates.signedSlot (a.sigma i) u (a.length i) z.2 |
| 587 | |
| 588 | /-- The actual angular carrier is a nonzero integer, including the |
| 589 | zero-floor case, which is replaced by the integer one. -/ |
| 590 | noncomputable def angularMode (i : ι) : ℤ := |
| 591 | PhaseEstimates.nonzeroRound ((ChartScales.carrier h (a.band i) : ℝ) * a.target i) |
| 592 | |
| 593 | theorem angularMode_ne_zero (i : ι) : a.angularMode i ≠ 0 := |
| 594 | PhaseEstimates.nonzeroRound_ne_zero _ |
| 595 | |
| 596 | theorem carrier_mul_angular_frequency (i : ι) : |
| 597 | (ChartScales.carrier h (a.band i) : ℝ) * a.phase.p i = (a.angularMode i : ℝ) := |
| 598 | PhaseEstimates.roundedFrequency_integer |
| 599 | (zero_lt_one.trans_le (PhaseEstimates.chart_carrier_ge_one h (a.band i))).ne' _ |
| 600 | |
| 601 | theorem angular_rounding_error (i : ι) : |
| 602 | |a.phase.p i - a.target i| ≤ 1 / (ChartScales.carrier h (a.band i) : ℝ) := |
| 603 | PhaseEstimates.roundedFrequency_error |
| 604 | (zero_lt_one.trans_le (PhaseEstimates.chart_carrier_ge_one h (a.band i))) _ |
| 605 | |
| 606 | theorem lambda_pos (hM : 1 ≤ M) (i : ι) : 0 < a.lam i := |
| 607 | (one_div_pos.mpr (zero_lt_one.trans_le hM)).trans_le (a.lambda_bound i).1 |
| 608 | |
| 609 | theorem ratio_ne (hM : 1 ≤ M) (i : ι) : a.c0 i ≠ 0 := |
| 610 | abs_pos.mp ((one_div_pos.mpr (zero_lt_one.trans_le hM)).trans_le (a.ratio_bound i).1) |
| 611 | |
| 612 | theorem B_bounds (hh : 0 ≤ h) (hM : 1 ≤ M) (i : ι) : |
| 613 | normalLower M u ≤ a.B i ∧ a.B i ≤ M := by |
| 614 | have hv := ChartScales.carrier_viscosity_bounds h hh (a.band i) |
| 615 | have hb := referenceScale_bounds (u := u) |
| 616 | (one_div_pos.mpr (zero_lt_one.trans_le hM)) (a.lambda_bound i).1 (a.lambda_bound i).2 hv.1 hv.2 |
| 617 | refine ⟨hb.1, hb.2.trans ?_⟩ |
| 618 | calc |
| 619 | Real.sqrt M ≤ Real.sqrt (M ^ 2) := Real.sqrt_le_sqrt (by nlinarith) |
| 620 | _ = M := Real.sqrt_sq (by linarith) |
| 621 | |
| 622 | theorem B_pos (hh : 0 ≤ h) (hM : 1 ≤ M) (i : ι) : 0 < a.B i := |
| 623 | (normalLower_pos hM).trans_le (a.B_bounds hh hM i).1 |
| 624 | |
| 625 | theorem length_pos (hr : 0 < r0) (i : ι) : 0 < a.length i := |
| 626 | div_pos (mul_pos (by norm_num) hr) (ChartScales.timeCoefficient_pos h (a.band i)) |
| 627 | |
| 628 | theorem reciprocal_bound {x : ℝ} (hM : 1 ≤ M) (hx : 1 / M ≤ x) : 1 / x ≤ M := by |
| 629 | have hM0 : 0 < M := zero_lt_one.trans_le hM |
| 630 | have hx0 := (one_div_pos.mpr hM0).trans_le hx |
| 631 | apply (div_le_iff₀ hx0).2 |
| 632 | have hi := (div_le_iff₀ hM0).1 hx |
| 633 | nlinarith |
| 634 | |
| 635 | theorem length_inverse (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 / (2 * r0) ≤ M) |
| 636 | (i : ι) (hn : 4 ≤ a.band i) : 1 / |a.length i| ≤ M / D.scale i := by |
| 637 | have hS : 0 < D.scale i := zero_lt_one.trans_le (D.one_le_scale i) |
| 638 | have hl := (ChartScales.slotLength_bounds r0 h hr.le hh hn).1 |
| 639 | rw [← a.scale_eq i] at hl |
| 640 | rw [abs_of_pos (a.length_pos hr i)] |
| 641 | calc |
| 642 | _ ≤ 1 / (2 * r0 * D.scale i) := |
| 643 | one_div_le_one_div_of_le (by positivity) hl |
| 644 | _ = (1 / (2 * r0)) / D.scale i := by ring |
| 645 | _ ≤ M / D.scale i := div_le_div_of_nonneg_right hM hS.le |
| 646 | |
| 647 | theorem slot_abs (hr : 0 < r0) {i : ι} {v : ℝ} (hv : v ∈ a.slot i) : |
| 648 | |v| ≤ 2 * a.length i := by |
| 649 | have hL := a.length_pos hr i |
| 650 | exact abs_le.mpr ⟨by dsimp [slot] at hv; linarith [hv.1], le_of_lt hv.2⟩ |
| 651 | |
| 652 | theorem slot_bound (hh : 0 ≤ h) (hr : 0 < r0) (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 653 | {i : ι} (hn : 4 ≤ a.band i) {v : ℝ} (hv : v ∈ a.slot i) : |
| 654 | |v| ≤ M * D.scale i := by |
| 655 | have hl := (ChartScales.slotLength_bounds r0 h hr.le hh hn).2 |
| 656 | rw [← a.scale_eq i] at hl |
| 657 | change a.length i ≤ 2 * r0 * ChartScales.Tg * D.scale i at hl |
| 658 | have hS : 0 ≤ D.scale i := (zero_lt_one.trans_le (D.one_le_scale i)).le |
| 659 | have hm := mul_le_mul_of_nonneg_right hslot hS |
| 660 | nlinarith [a.slot_abs hr hv] |
| 661 | |
| 662 | theorem magnitude_bound (hr : 0 < r0) (hu : 0 ≤ u) (huM : u ≤ M) |
| 663 | {i : ι} {v : ℝ} (hv : v ∈ a.slot i) : |
| 664 | |PulseGrowth.slotMagnitude u (a.length i) v| ≤ 3 * M := by |
| 665 | have hL := a.length_pos hr i |
| 666 | have hv' := a.slot_abs hr hv |
| 667 | have hmul : |u * v / a.length i| ≤ 2 * u := by |
| 668 | rw [abs_div, abs_mul, abs_of_nonneg hu, abs_of_pos hL] |
| 669 | apply (div_le_iff₀ hL).2 |
| 670 | nlinarith [mul_le_mul_of_nonneg_left hv' hu] |
| 671 | have ha := abs_add_le (u / 2) (u * v / a.length i) |
| 672 | rw [abs_div, abs_of_nonneg hu] at ha |
| 673 | norm_num at ha |
| 674 | dsimp [PulseGrowth.slotMagnitude] |
| 675 | linarith |
| 676 | |
| 677 | theorem slope_bound (hr : 0 < r0) (hu : 0 ≤ u) (huM : u ≤ M) |
| 678 | {i : ι} {q : Slow} {v : ℝ} (hv : v ∈ a.slot i) : |a.slope i (q, v)| ≤ 3 * M := by |
| 679 | simpa only [slope, PhaseEstimates.signedSlot, PulseGrowth.slotMagnitude, abs_mul, a.sign i, one_mul] using |
| 680 | a.magnitude_bound hr hu huM hv |
| 681 | |
| 682 | theorem frequency_identity (hM : 1 ≤ M) (i : ι) : |
| 683 | (!₂[a.target i / (a.q0 i).1, a.frequency i 1] : Plane) = a.frequency i := by |
| 684 | have hr : (a.q0 i).1 ≠ 0 := abs_pos.mp |
| 685 | ((one_div_pos.mpr (zero_lt_one.trans_le hM)).trans_le (a.representative_radius i).1) |
| 686 | ext j |
| 687 | fin_cases j |
| 688 | · change (a.q0 i).1 * a.frequency i 0 / (a.q0 i).1 = a.frequency i 0 |
| 689 | field_simp |
| 690 | · rfl |
| 691 | |
| 692 | theorem frequencies_bounded (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 693 | (hu : |u| ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 694 | (i : ι) (hn : 4 ≤ a.band i) : |
| 695 | |a.target i| ≤ M * (M + M ^ 4) ∧ |a.frequency i 1| ≤ M + M ^ 4 := by |
| 696 | have hr0 : (a.q0 i).1 ≠ 0 := abs_pos.mp |
| 697 | ((one_div_pos.mpr (zero_lt_one.trans_le hM)).trans_le (a.representative_radius i).1) |
| 698 | exact PhaseEstimates.representative_uniform_frequency_bounds hr0 (by linarith) |
| 699 | (D.one_le_scale i) (by simpa only [abs_of_pos (a.B_pos hh hM i)] using (a.B_bounds hh hM i).2) |
| 700 | (a.sign i) hu (reciprocal_bound hM (a.shear_inv i)) |
| 701 | (a.length_inverse hh hr hL i hn) (a.unit i) (a.representative_radius i).2 |
| 702 | (a.frequency_identity hM i) |
| 703 | |
| 704 | theorem frozen_constants (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 705 | (hu : |u| ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 706 | (i : ι) (hn : 4 ≤ a.band i) : |
| 707 | |a.phase.epsilon i| ≤ frequencyBound M ∧ |a.phase.p i| ≤ frequencyBound M ∧ |
| 708 | |a.phase.pz i| ≤ frequencyBound M ∧ |a.phase.x0 i| ≤ frequencyBound M := by |
| 709 | have hb := frequencyBound_bounds hM |
| 710 | have hf := a.frequencies_bounded hh hr hM hu hL i hn |
| 711 | have hk := PhaseEstimates.chart_carrier_ge_one h (a.band i) |
| 712 | have hround := PhaseEstimates.roundedFrequency_error (zero_lt_one.trans_le hk) (a.target i) |
| 713 | have hinv : 1 / (ChartScales.carrier h (a.band i) : ℝ) ≤ 1 := by |
| 714 | simpa using one_div_le_one_div_of_le (by norm_num : (0 : ℝ) < 1) hk |
| 715 | refine ⟨?_, ?_, hf.2.trans hb.2.2.1, ?_⟩ |
| 716 | · have he := ChartScales.epsilon_le_one h hh (a.band i) |
| 717 | simpa only [phase, abs_of_pos (ChartScales.epsilon_pos h (a.band i))] using |
| 718 | he.trans (hM.trans hb.1) |
| 719 | · have htri := abs_sub_le (PhaseEstimates.roundedFrequency (ChartScales.carrier h (a.band i)) |
| 720 | (a.target i)) (a.target i) 0 |
| 721 | simp only [sub_zero] at htri |
| 722 | change |PhaseEstimates.roundedFrequency (ChartScales.carrier h (a.band i)) (a.target i)| ≤ _ |
| 723 | linarith [hb.2.1] |
| 724 | · change |a.sigma i * a.B i * u / 2| ≤ _ |
| 725 | rw [abs_div, abs_mul, abs_mul, a.sign i, one_mul, abs_of_pos (a.B_pos hh hM i)] |
| 726 | norm_num |
| 727 | have hm := mul_le_mul (a.B_bounds hh hM i).2 hu (abs_nonneg u) (by linarith : 0 ≤ M) |
| 728 | nlinarith [hb.2.2.2.1, sq_nonneg M] |
| 729 | |
| 730 | /-- Actual phase-normal and normal-motion estimates for every enlarged |
| 731 | slot point. These follow from the normalized base error and rounding. -/ |
| 732 | theorem phase_estimates (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 733 | (hu : |u| ≤ M) (hL : 1 / (2 * r0) ≤ M) (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 734 | (i : ι) (hn : LargeBand h M u (a.band i)) {q : Slow} (hq : q ∈ D.carrier i) |
| 735 | {v : ℝ} (hv : v ∈ a.slot i) : |
| 736 | ‖a.phase.normal i (q, v) - MovingFrameODE.pack (a.B i * a.slope i (q, v)) (a.B i • a.K i)‖ ≤ |
| 737 | phaseConstant M / D.scale i ∧ |
| 738 | ‖a.phase.velocity i (q, v)‖ ≤ phaseConstant M / D.scale i := by |
| 739 | have hb := frequencyBound_bounds hM |
| 740 | have hf := a.frequencies_bounded hh hr hM hu hL i hn.four_le |
| 741 | have hM0 : 0 < M := zero_lt_one.trans_le hM |
| 742 | have hR : q.1 ≠ 0 := abs_pos.mp ((one_div_pos.mpr hM0).trans_le (a.radius i q hq).1) |
| 743 | have hR0 : (a.q0 i).1 ≠ 0 := abs_pos.mp |
| 744 | ((one_div_pos.mpr hM0).trans_le (a.representative_radius i).1) |
| 745 | have hg : PhaseEstimates.shearVector (a.F0 i) (a.G0 i) (a.q0 i) ≠ 0 := |
| 746 | norm_pos_iff.mp ((one_div_pos.mpr hM0).trans_le (a.shear_inv i)) |
| 747 | have hinvR : |1 / q.1| ≤ M := by |
| 748 | simpa only [abs_div, abs_one] using reciprocal_bound hM (a.radius i q hq).1 |
| 749 | have hinvR0 : |1 / (a.q0 i).1| ≤ M := by |
| 750 | simpa only [abs_div, abs_one] using reciprocal_bound hM (a.representative_radius i).1 |
| 751 | have hS0 : 0 ≤ D.scale i := (zero_lt_one.trans_le (D.one_le_scale i)).le |
| 752 | have he := phase_errors_on_mesh (θ := a.theta i) (v := v) |
| 753 | (localBase_mono (a.base i) hb.1) (a.inside i hq) (a.representative_inside i) |
| 754 | (a.distance i q hq) hR hR0 hg (a.orthogonal i) (a.frequency_identity hM i) |
| 755 | (hM.trans hb.1) (by simpa only [a.scale_eq i] using hn.two_le_scale) |
| 756 | (PhaseEstimates.chart_carrier_ge_one h (a.band i)) (ChartScales.epsilon_pos h (a.band i)) |
| 757 | (hf.1.trans (by linarith [hb.2.1])) (hf.2.trans hb.2.2.1) |
| 758 | (by simpa only [abs_of_pos (a.B_pos hh hM i)] using (a.B_bounds hh hM i).2.trans hb.1) |
| 759 | (a.sign i) (hu.trans hb.1) ((reciprocal_bound hM (a.shear_inv i)).trans hb.1) |
| 760 | ((a.length_inverse hh hr hL i hn.four_le).trans (div_le_div_of_nonneg_right hb.1 hS0)) |
| 761 | ((a.slot_bound hh hr hslot hn.four_le hv).trans (mul_le_mul_of_nonneg_right hb.1 hS0)) |
| 762 | (hinvR.trans hb.1) (hinvR0.trans hb.1) |
| 763 | (by simpa only [a.scale_eq i] using hn.epsilon_square) |
| 764 | (by simpa only [a.scale_eq i] using hn.carrier) |
| 765 | (by simpa only [a.scale_eq i] using hn.epsilon) |
| 766 | exact he |
| 767 | |
| 768 | theorem base_estimates (hM : 1 ≤ M) (i : ι) (hn : LargeBand h M u (a.band i)) |
| 769 | {q : Slow} (hq : q ∈ D.carrier i) : |
| 770 | |a.F i q - a.F0 i (a.q0 i)| ≤ 16 * M ^ 2 / D.scale i ∧ |
| 771 | ‖PhaseEstimates.shearVector (a.F i) (a.G i) q - |
| 772 | PhaseEstimates.shearVector (a.F0 i) (a.G0 i) (a.q0 i)‖ ≤ 16 * M ^ 2 / D.scale i := by |
| 773 | have hb := base_error_on_mesh (D.one_le_scale i) hM |
| 774 | (by simpa only [a.scale_eq i] using hn.epsilon_square) |
| 775 | exact ⟨(PhaseEstimates.localBase_value_error (a.base i) (by linarith) |
| 776 | (a.inside i hq) (a.representative_inside i) (a.distance i q hq)).trans hb.1, |
| 777 | (PhaseEstimates.localBase_shear_error (a.base i) hM (a.inside i hq) |
| 778 | (a.representative_inside i) (a.distance i q hq) (a.representative_radius i).2).trans hb.2⟩ |
| 779 | |
| 780 | theorem phase_error_small (hh : 0 ≤ h) (hM : 1 ≤ M) (i : ι) |
| 781 | (hn : LargeBand h M u (a.band i)) : phaseConstant M / D.scale i ≤ a.B i / 2 := by |
| 782 | have hs : phaseConstant M / D.scale i ≤ normalLower M u / 2 := by |
| 783 | simpa only [a.scale_eq i] using hn.small |
| 784 | exact hs.trans (div_le_div_of_nonneg_right (a.B_bounds hh hM i).1 (by norm_num)) |
| 785 | |
| 786 | theorem quotient_rate_bound (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 787 | (hu : |u| ≤ M) (hL : 1 / (2 * r0) ≤ M) (i : ι) (hn : 4 ≤ a.band i) : |
| 788 | |u / a.length i| ≤ M ^ 2 / D.scale i := by |
| 789 | have hi := a.length_inverse hh hr hL i hn |
| 790 | calc |
| 791 | _ = |u| * (1 / |a.length i|) := by rw [abs_div]; ring |
| 792 | _ ≤ M * (M / D.scale i) := mul_le_mul hu hi |
| 793 | (one_div_nonneg.mpr (abs_nonneg _)) (by linarith) |
| 794 | _ = _ := by ring |
| 795 | |
| 796 | /-- The three coordinate errors of the actual constructed tangent frame |
| 797 | are estimated before changing to the moving eigenbasis. -/ |
| 798 | theorem coordinate_errors (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 799 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 800 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 801 | (i : ι) (hn : LargeBand h M u (a.band i)) {q : Slow} (hq : q ∈ D.carrier i) |
| 802 | {v : ℝ} (hv : v ∈ a.slot i) : |
| 803 | |(a.frame i).errorA (q, v)| ≤ coordinateConstant M u / D.scale i ∧ |
| 804 | |(a.frame i).errorB (q, v)| ≤ coordinateConstant M u / D.scale i ∧ |
| 805 | |(a.frame i).errorC (q, v)| ≤ coordinateConstant M u / D.scale i := by |
| 806 | have hS : 0 < D.scale i := zero_lt_one.trans_le (D.one_le_scale i) |
| 807 | have hM0 : 0 ≤ M := by linarith |
| 808 | have he := a.phase_estimates hh hr hM (by simpa only [abs_of_pos hu] using huM) |
| 809 | hL hslot i hn hq hv |
| 810 | have hb := a.base_estimates hM i hn hq |
| 811 | have hs := a.slope_bound hr hu.le huM (q := q) hv |
| 812 | have hc := frame_errors_of_normal_close (normalLower_pos hM) (a.B_bounds hh hM i).1 |
| 813 | (a.unit i) (a.phase_error_small hh hM i hn) he.1 he.2 hM |
| 814 | (by positivity : 0 ≤ 3 * M) hs (a.frequency_bound i) (a.shear_bound i) (a.orthogonal i) |
| 815 | (by positivity : 0 ≤ 16 * M ^ 2 / D.scale i) hb.1 hb.2 |
| 816 | have heq : 16 * (M + 2 + 2 * (3 * M)) ^ 2 * (1 + (M + 2 + 2 * (3 * M))) * |
| 817 | (16 * M ^ 2 / D.scale i + 8 * (1 + 3 * M) * (phaseConstant M / D.scale i) / normalLower M u) = |
| 818 | coordinateConstant M u / D.scale i := by unfold coordinateConstant; ring |
| 819 | dsimp only at hc |
| 820 | rw [heq] at hc |
| 821 | have href := reference_off_diagonal (u := u) (L := a.length i) (v := v) |
| 822 | (s := a.slope i (q, v)) (a.ratio_ne hM i) (signedSlot_sq (a.sign i) u (a.length i) v) |
| 823 | (a.eigen12 i) (a.eigen21 i) |
| 824 | refine ⟨hc.1, ?_, ?_⟩ |
| 825 | · change |MovingFrameODE.coeff12 (a.F i q) (PrimaryODE.localFrame (a.phase.normal i (q, v)) 1 0) |
| 826 | (MovingFrameODE.radialSlope (a.phase.normal i (q, v))) |
| 827 | (PhaseEstimates.angularVelocity (a.phase.normal i (q, v)) (a.phase.velocity i (q, v))) - |
| 828 | ViscousPropagator.referenceEigenvalue (a.lam i) u (a.length i) v / |
| 829 | PrimaryODE.referenceProfile (a.c0 i) u (a.length i) v| ≤ _ |
| 830 | rw [href.1] |
| 831 | exact hc.2.1 |
| 832 | · change |MovingFrameODE.coeff21 (a.F i q) (PrimaryODE.localFrame (a.phase.normal i (q, v)) 1 0) |
| 833 | ⟪PrimaryODE.localFrame (a.phase.normal i (q, v)) 1, |
| 834 | PhaseEstimates.shearVector (a.F i) (a.G i) q⟫_ℝ |
| 835 | (MovingFrameODE.radialSlope (a.phase.normal i (q, v))) |
| 836 | (PhaseEstimates.angularVelocity (a.phase.normal i (q, v)) (a.phase.velocity i (q, v))) - |
| 837 | ViscousPropagator.referenceEigenvalue (a.lam i) u (a.length i) v * |
| 838 | PrimaryODE.referenceProfile (a.c0 i) u (a.length i) v| ≤ _ |
| 839 | rw [href.2] |
| 840 | exact hc.2.2 |
| 841 | |
| 842 | theorem modal_errors (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 843 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 844 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 845 | (i : ι) (hn : LargeBand h M u (a.band i)) {q : Slow} (hq : q ∈ D.carrier i) |
| 846 | {v : ℝ} (hv : v ∈ a.slot i) : |
| 847 | |(a.frame i).error11 (q, v)| ≤ modalConstant M u / D.scale i ∧ |
| 848 | |(a.frame i).error12 (q, v)| ≤ modalConstant M u / D.scale i ∧ |
| 849 | |(a.frame i).error21 (q, v)| ≤ modalConstant M u / D.scale i ∧ |
| 850 | |(a.frame i).error22 (q, v)| ≤ modalConstant M u / D.scale i := by |
| 851 | have hM0 : 0 ≤ M := by linarith |
| 852 | have hS : 0 < D.scale i := zero_lt_one.trans_le (D.one_le_scale i) |
| 853 | have hc := a.coordinate_errors hh hr hM hu huM hL hslot i hn hq hv |
| 854 | have hmag := a.magnitude_bound hr hu.le huM hv |
| 855 | have hprof := reference_profile_bounds (one_div_pos.mpr (zero_lt_one.trans_le hM)) |
| 856 | (a.ratio_bound i).1 (a.ratio_bound i).2 hmag |
| 857 | have hrate := reference_profile_rate_bound (by positivity : 0 ≤ 3 * M) |
| 858 | (sq_nonneg M) hS hmag (a.quotient_rate_bound hh hr hM |
| 859 | (by simpa only [abs_of_pos hu] using huM) hL i hn.four_le) |
| 860 | have hH : 0 ≤ eigenBound M := by unfold eigenBound; positivity |
| 861 | have hH1 : M * (1 + 3 * M) ≤ eigenBound M := by unfold eigenBound; nlinarith |
| 862 | have hH2 : M ≤ eigenBound M := by unfold eigenBound; nlinarith |
| 863 | have hhi : |1 / PrimaryODE.referenceProfile (a.c0 i) u (a.length i) v| ≤ eigenBound M := by |
| 864 | simpa only [one_div_one_div] using hprof.2.trans (by simpa only [one_div_one_div] using hH2) |
| 865 | have hout := MovingFrameODE.modal_errors_le hH hc.1 hc.2.1 hc.2.2 |
| 866 | (hprof.1.trans hH1) hhi hrate |
| 867 | have heq : (1 + 2 * eigenBound M) * (coordinateConstant M u / D.scale i) + |
| 868 | (3 * M) * M ^ 2 / D.scale i = modalConstant M u / D.scale i := by |
| 869 | unfold modalConstant |
| 870 | ring |
| 871 | rw [heq] at hout |
| 872 | exact hout |
| 873 | |
| 874 | /-- Two-sided comparison with the Gaussian reference viscosity. -/ |
| 875 | theorem damping_error (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 876 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 877 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 878 | (i : ι) (hn : LargeBand h M u (a.band i)) {q : Slow} (hq : q ∈ D.carrier i) |
| 879 | {v : ℝ} (hv : v ∈ a.slot i) : |
| 880 | |(a.frame i).viscosity (q, v) - |
| 881 | ViscousPropagator.referenceViscosity (a.lam i) u (a.length i) v| ≤ dampingConstant M / D.scale i := by |
| 882 | have hvb := ChartScales.carrier_viscosity_bounds h hh (a.band i) |
| 883 | have hν : 0 < a.viscosity i := zero_lt_one.trans_le hvb.1 |
| 884 | have he := (a.phase_estimates hh hr hM (by simpa only [abs_of_pos hu] using huM) |
| 885 | hL hslot i hn hq hv).1 |
| 886 | have hout := damping_error_of_normal_close (a.unit i) (a.B_pos hh hM i) |
| 887 | (a.B_bounds hh hM i).2 (a.slope_bound hr hu.le huM (q := q) hv) |
| 888 | (a.phase_error_small hh hM i hn) he hν.le hvb.2 |
| 889 | have hB : a.viscosity i * a.B i ^ 2 = a.lam i / dampingDenominator u := |
| 890 | referenceScale_normalization (a.lambda_pos hM i) hν |
| 891 | have href : a.viscosity i * a.B i ^ 2 * (1 + a.slope i (q, v) ^ 2) = |
| 892 | ViscousPropagator.referenceViscosity (a.lam i) u (a.length i) v := by |
| 893 | rw [hB, show a.slope i (q, v) ^ 2 = PulseGrowth.slotMagnitude u (a.length i) v ^ 2 from |
| 894 | signedSlot_sq (a.sign i) u (a.length i) v] |
| 895 | unfold ViscousPropagator.referenceViscosity dampingDenominator |
| 896 | ring |
| 897 | rw [href] at hout |
| 898 | convert! hout using 1 |
| 899 | unfold dampingConstant |
| 900 | ring |
| 901 | |
| 902 | theorem interval_subset_slot (hr : 0 < r0) (i : ι) : Icc 0 (a.length i) ⊆ a.slot i := by |
| 903 | intro v hv |
| 904 | have hL := a.length_pos hr i |
| 905 | exact ⟨by linarith [hv.1], by linarith [hv.2]⟩ |
| 906 | |
| 907 | theorem normal_nonzero (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 908 | (hu : |u| ≤ M) (hL : 1 / (2 * r0) ≤ M) (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 909 | (i : ι) (hn : LargeBand h M u (a.band i)) {q : Slow} (hq : q ∈ D.carrier i) |
| 910 | {v : ℝ} (hv : v ∈ a.slot i) : |
| 911 | normalLower M u / 2 ≤ MovingFrameODE.normalScale (a.phase.normal i (q, v)) ∧ |
| 912 | MovingFrameODE.tail (a.phase.normal i (q, v)) ≠ 0 := by |
| 913 | have hn' := PhaseEstimates.normal_lower_bounds (a.B_pos hh hM i) (a.unit i) |
| 914 | (a.phase_error_small hh hM i hn) (a.phase_estimates hh hr hM hu hL hslot i hn hq hv).1 |
| 915 | exact ⟨(div_le_div_of_nonneg_right (a.B_bounds hh hM i).1 (by norm_num)).trans hn'.1, |
| 916 | hn'.2.2.1⟩ |
| 917 | |
| 918 | theorem kinematics (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 919 | (hu : |u| ≤ M) (hL : 1 / (2 * r0) ≤ M) (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 920 | (i : ι) (hn : LargeBand h M u (a.band i)) {q : Slow} (hq : q ∈ D.carrier i) : |
| 921 | (a.frame i).Kinematics q (Icc 0 (a.length i)) := by |
| 922 | apply PrimaryODE.FrameData.ofNormalLocal_kinematics |
| 923 | · intro v _ |
| 924 | exact PhaseCalculus.hasDerivAt_phaseNormal_slot _ _ _ _ _ _ _ _ _ |
| 925 | (ChartScales.epsilon_pos h (a.band i)).ne' ((a.base i).actualF q (a.inside i hq)) |
| 926 | ((a.base i).actualG q (a.inside i hq)) |
| 927 | · intro v hv |
| 928 | exact (a.normal_nonzero hh hr hM hu hL hslot i hn hq (a.interval_subset_slot hr i hv)).2 |
| 929 | · intro v _ |
| 930 | exact mul_ne_zero (a.ratio_ne hM i) (by positivity : Real.sqrt (1 + PulseGrowth.slotMagnitude u (a.length i) v ^ 2) ≠ 0) |
| 931 | · intro v _ |
| 932 | exact PrimaryODE.hasDerivAt_referenceProfile (a.c0 i) u (a.length i) v |
| 933 | |
| 934 | theorem coefficientControl (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 935 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 936 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 937 | (i : ι) (hn : LargeBand h M u (a.band i)) {q : Slow} (hq : q ∈ D.carrier i) : |
| 938 | PrimaryCovarianceBounds.CoefficientControl (a.frame i) (a.lam i) u (a.length i) |
| 939 | (D.scale i) (modalConstant M u) (dampingConstant M) q where |
| 940 | eigenvalue _ _ := rfl |
| 941 | errors _ hv := a.modal_errors hh hr hM hu huM hL hslot i hn hq (a.interval_subset_slot hr i hv) |
| 942 | viscosity _ hv := a.damping_error hh hr hM hu huM hL hslot i hn hq (a.interval_subset_slot hr i hv) |
| 943 | |
| 944 | /-- The actual modal energy bound holds with the same constants for every |
| 945 | nonzero harmonic. The damping discrepancy is not multiplied by `j²`. -/ |
| 946 | theorem energy_bound (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 947 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 948 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 949 | (i : ι) (hn : LargeBand h M u (a.band i)) {q : Slow} (hq : q ∈ D.carrier i) |
| 950 | {v : ℝ} (hv : v ∈ a.slot i) {j : ℤ} (hj : j ≠ 0) (w : Plane) : |
| 951 | ⟪w, (a.frame i).coefficient j (q, v) w⟫_ℝ ≤ |
| 952 | (ViscousPropagator.referenceEigenvalue (a.lam i) u (a.length i) v - |
| 953 | ViscousPropagator.referenceViscosity (a.lam i) u (a.length i) v + |
| 954 | (dampingConstant M + 4 * modalConstant M u) / D.scale i) * ‖w‖ ^ 2 := by |
| 955 | have hν : 0 ≤ (a.frame i).viscosity (q, v) := by |
| 956 | change 0 ≤ a.viscosity i * ‖a.phase.normal i (q, v)‖ ^ 2 |
| 957 | exact mul_nonneg (zero_le_one.trans (ChartScales.carrier_viscosity_bounds h hh (a.band i)).1) |
| 958 | (sq_nonneg _) |
| 959 | have hl : 0 ≤ (a.frame i).eigenvalue (q, v) := by |
| 960 | change 0 ≤ a.lam i / Real.sqrt (1 + PulseGrowth.slotMagnitude u (a.length i) v ^ 2) |
| 961 | exact div_nonneg (a.lambda_pos hM i).le (Real.sqrt_nonneg _) |
| 962 | have hd := a.damping_error hh hr hM hu huM hL hslot i hn hq hv |
| 963 | apply (a.frame i).energy_bound (q, v) hj hl hν |
| 964 | · linarith [(abs_le.mp hd).1] |
| 965 | · exact a.modal_errors hh hr hM hu huM hL hslot i hn hq hv |
| 966 | |
| 967 | noncomputable def outputBound (M : ℝ) : ℝ := frequencyBound M + 3 * M + M ^ 2 + 4 |
| 968 | noncomputable def outputLower (M u : ℝ) : ℝ := min (normalLower M u / 2) (1 / M) |
| 969 | |
| 970 | theorem outputBound_bounds (hM : 1 ≤ M) : |
| 971 | frequencyBound M ≤ outputBound M ∧ 3 * M ≤ outputBound M ∧ |
| 972 | M ^ 2 ≤ outputBound M ∧ 4 ≤ outputBound M ∧ M ≤ outputBound M := by |
| 973 | have hb := frequencyBound_bounds hM |
| 974 | have hM0 : 0 ≤ M := by linarith |
| 975 | unfold outputBound |
| 976 | exact ⟨by nlinarith [sq_nonneg M], by nlinarith [sq_nonneg M], |
| 977 | by nlinarith, by nlinarith [sq_nonneg M], by nlinarith [sq_nonneg M]⟩ |
| 978 | |
| 979 | theorem outputLower_pos (hM : 1 ≤ M) : 0 < outputLower M u := |
| 980 | lt_min (half_pos (normalLower_pos hM)) (one_div_pos.mpr (zero_lt_one.trans_le hM)) |
| 981 | |
| 982 | /-- The actual phase family satisfies every order-zero input of the |
| 983 | previous primary-pulse theorem. Its normal comparison, modal errors, |
| 984 | and damping comparison are proved here from the base and mesh data. -/ |
| 985 | noncomputable def construction (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 986 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 987 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) |
| 988 | (hlarge : ∀ i, LargeBand h M u (a.band i)) : PrimaryPulseBounds.PhaseConstruction D := by |
| 989 | have hb := outputBound_bounds hM |
| 990 | have he := error_constants_nonneg (u := u) hM |
| 991 | have huabs : |u| ≤ M := by simpa only [abs_of_pos hu] using huM |
| 992 | refine { |
| 993 | phase := a.phase |
| 994 | V := a.slot |
| 995 | openV := fun _ => isOpen_Ioo |
| 996 | lam := a.lam |
| 997 | c0 := a.c0 |
| 998 | u := fun _ => u |
| 999 | L := a.length |
| 1000 | viscosity := a.viscosity |
| 1001 | B := a.B |
| 1002 | K := a.K |
| 1003 | slope := a.slope |
| 1004 | error := fun i _ => phaseConstant M / D.scale i |
| 1005 | r := 1 / M |
| 1006 | b := outputLower M u |
| 1007 | M := outputBound M |
| 1008 | C := modalConstant M u |
| 1009 | E := dampingConstant M |
| 1010 | r_pos := one_div_pos.mpr (zero_lt_one.trans_le hM) |
| 1011 | b_pos := outputLower_pos hM |
| 1012 | one_le_M := hM.trans hb.2.2.2.2 |
| 1013 | C_nonneg := he.2.1 |
| 1014 | E_nonneg := he.2.2 |
| 1015 | baseF := a.baseF |
| 1016 | baseG := a.baseG |
| 1017 | constants := ?_ |
| 1018 | epsilon_ne := fun i => (ChartScales.epsilon_pos h (a.band i)).ne' |
| 1019 | radius := fun i q hq => ⟨(a.radius i q hq).1, (a.radius i q hq).2.trans hb.2.2.2.2⟩ |
| 1020 | slot := fun i v hv => (a.slot_bound hh hr hslot (hlarge i).four_le hv).trans |
| 1021 | (mul_le_mul_of_nonneg_right hb.2.2.2.2 (by linarith [D.one_le_scale i])) |
| 1022 | lam_bound := ?_ |
| 1023 | c0_bound := ?_ |
| 1024 | u_bound := fun _ => huabs.trans hb.2.2.2.2 |
| 1025 | rate_bound := ?_ |
| 1026 | viscosity_bound := ?_ |
| 1027 | B_bound := ?_ |
| 1028 | K_unit := a.unit |
| 1029 | slope_bound := fun _ _ hz => (a.slope_bound hr hu.le huM hz.2).trans hb.2.1 |
| 1030 | error_small := fun i _ _ => a.phase_error_small hh hM i (hlarge i) |
| 1031 | normal_close := fun i _ hz => (a.phase_estimates hh hr hM huabs hL hslot i (hlarge i) hz.1 hz.2).1 |
| 1032 | lam_pos := a.lambda_pos hM |
| 1033 | u_pos := fun _ => hu |
| 1034 | L_pos := a.length_pos hr |
| 1035 | interval := a.interval_subset_slot hr |
| 1036 | viscosity_nonneg := fun i => zero_le_one.trans (ChartScales.carrier_viscosity_bounds h hh (a.band i)).1 |
| 1037 | damping_error := ?_ |
| 1038 | modal_errors := fun i q hq v hv => |
| 1039 | a.modal_errors hh hr hM hu huM hL hslot i (hlarge i) hq (a.interval_subset_slot hr i hv) } |
| 1040 | · intro i |
| 1041 | have hc := a.frozen_constants hh hr hM huabs hL i (hlarge i).four_le |
| 1042 | exact ⟨hc.1.trans hb.1, hc.2.1.trans hb.1, hc.2.2.1.trans hb.1, hc.2.2.2.trans hb.1⟩ |
| 1043 | · intro i |
| 1044 | simpa only [abs_of_pos (a.lambda_pos hM i)] using (a.lambda_bound i).2.trans hb.2.2.2.2 |
| 1045 | · intro i |
| 1046 | exact ⟨(min_le_right _ _).trans (a.ratio_bound i).1, (a.ratio_bound i).2.trans hb.2.2.2.2⟩ |
| 1047 | · intro i |
| 1048 | have hi := a.quotient_rate_bound hh hr hM huabs hL i (hlarge i).four_le |
| 1049 | exact ((le_div_iff₀ (zero_lt_one.trans_le (D.one_le_scale i))).1 hi).trans hb.2.2.1 |
| 1050 | · intro i |
| 1051 | have hv := ChartScales.carrier_viscosity_bounds h hh (a.band i) |
| 1052 | simpa only [viscosity, abs_of_nonneg (zero_le_one.trans hv.1)] using hv.2.trans hb.2.2.2.1 |
| 1053 | · intro i |
| 1054 | have hlo : outputLower M u ≤ normalLower M u / 2 := min_le_left _ _ |
| 1055 | exact ⟨(by linarith [(a.B_bounds hh hM i).1]), (a.B_bounds hh hM i).2.trans hb.2.2.2.2⟩ |
| 1056 | · intro i q hq v hv |
| 1057 | have hd := a.damping_error hh hr hM hu huM hL hslot i (hlarge i) hq (a.interval_subset_slot hr i hv) |
| 1058 | change ViscousPropagator.referenceViscosity (a.lam i) u (a.length i) v - |
| 1059 | dampingConstant M / D.scale i ≤ (a.frame i).viscosity (q, v) |
| 1060 | linarith [(abs_le.mp hd).1] |
| 1061 | |
| 1062 | theorem construction_frame (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 1063 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 1064 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) (hlarge : ∀ i, LargeBand h M u (a.band i)) : |
| 1065 | (a.construction hh hr hM hu huM hL hslot hlarge).frame = a.frame := rfl |
| 1066 | |
| 1067 | /-- Every fixed derivative of the actual coefficient is controlled after |
| 1068 | the derived zeroth-order geometry is inserted. -/ |
| 1069 | theorem frame_jets (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 1070 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 1071 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) (hlarge : ∀ i, LargeBand h M u (a.band i)) : |
| 1072 | PhaseJetBounds.FrameJets (D.slot a.slot (fun _ => isOpen_Ioo)) a.frame := by |
| 1073 | let p := a.construction hh hr hM hu huM hL hslot hlarge |
| 1074 | exact p.phase.frameData_jets_of_phase_comparison D p.V p.openV p.lam p.c0 p.u p.L |
| 1075 | p.viscosity p.B p.K p.slope p.error p.baseF p.baseG p.r_pos p.b_pos p.one_le_M |
| 1076 | p.constants p.epsilon_ne p.radius p.slot p.lam_bound p.c0_bound p.u_bound p.rate_bound |
| 1077 | p.viscosity_bound p.B_bound p.K_unit p.slope_bound p.error_small p.normal_close |
| 1078 | |
| 1079 | theorem pulse_jets (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 1080 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 1081 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) (hlarge : ∀ i, LargeBand h M u (a.band i)) : |
| 1082 | PrimaryPulseBounds.EnvelopeJets |
| 1083 | (PrimaryPulseBounds.productDomain D (fun _ => Ioo (0 : ℝ) 1) (fun _ => isOpen_Ioo)) |
| 1084 | (fun i z => PrimaryPulseBounds.referenceP (a.lam i) u (a.length i) (a.length i * z.2)) |
| 1085 | (fun i => PrimaryPulseBounds.normalizedPulse (a.frame i) (a.lam i) u (a.length i)) := |
| 1086 | (a.construction hh hr hM hu huM hL hslot hlarge).pulse_jets |
| 1087 | |
| 1088 | theorem coefficient_jets (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) |
| 1089 | (hu : 0 < u) (huM : u ≤ M) (hL : 1 / (2 * r0) ≤ M) |
| 1090 | (hslot : 4 * r0 * ChartScales.Tg ≤ M) (hlarge : ∀ i, LargeBand h M u (a.band i)) (j : ℤ) : |
| 1091 | PhaseJetBounds.PolynomialJets (D.slot a.slot (fun _ => isOpen_Ioo)) |
| 1092 | (fun i => (a.frame i).coefficient j) := |
| 1093 | (a.frame_jets hh hr hM hu huM hL hslot hlarge).coefficient j |
| 1094 | |
| 1095 | end FamilyData |
| 1096 | |
| 1097 | namespace Representatives |
| 1098 | |
| 1099 | open PrimaryRepresentatives |
| 1100 | |
| 1101 | theorem normal_inner_shear {g : Plane} (hg : g ≠ 0) : |
| 1102 | ⟪normalDirection g, g⟫_ℝ = ‖g‖ := by |
| 1103 | calc |
| 1104 | _ = ⟪normalDirection g, ‖g‖ • normalDirection g⟫_ℝ := by |
| 1105 | rw [norm_smul_normalDirection hg] |
| 1106 | _ = ‖g‖ := by |
| 1107 | rw [real_inner_smul_right, real_inner_self_eq_norm_sq, normalDirection_unit hg] |
| 1108 | ring |
| 1109 | |
| 1110 | /-- A compact fixed reference profile chooses every uniform constant |
| 1111 | before the band threshold. `A` may include all prescribed base-chart, |
| 1112 | derivative, and radial-annulus constants. -/ |
| 1113 | theorem ordered_constants {K : Set Slow} (hK : IsCompact K) |
| 1114 | {F0 G0 : Slow → ℝ} |
| 1115 | (hF : ContinuousOn F0 K) (hg : ContinuousOn (PhaseEstimates.shearVector F0 G0) K) |
| 1116 | (hR : ∀ q ∈ K, 0 < q.1) |
| 1117 | (hc : ∀ q ∈ K, ReferenceCone (F0 q) (PhaseEstimates.shearVector F0 G0 q)) |
| 1118 | (h r0 u A T : ℝ) (hh : 0 < h) (N0 : ℕ) : |
| 1119 | ∃ M : ℝ, 1 ≤ M ∧ A ≤ M ∧ |u| ≤ M ∧ 1 / (2 * r0) ≤ M ∧ |
| 1120 | 4 * r0 * ChartScales.Tg ≤ M ∧ |
| 1121 | (∀ q ∈ K, ParameterBounds M q.1 (F0 q) (PhaseEstimates.shearVector F0 G0 q)) ∧ |
| 1122 | ∃ N ≥ N0, ∀ n ≥ N, LargeBand h M u n ∧ T ≤ ChartScales.S n := by |
| 1123 | obtain ⟨M0, hM0, hp⟩ := compact_parameter_bounds hK hF hg hR hc |
| 1124 | let M := max M0 (max A (max |u| (max (1 / (2 * r0)) (4 * r0 * ChartScales.Tg)))) |
| 1125 | have h0 : M0 ≤ M := le_max_left _ _ |
| 1126 | have hM : 1 ≤ M := hM0.trans h0 |
| 1127 | refine ⟨M, hM, (le_max_left _ _).trans (le_max_right _ _), |
| 1128 | (le_max_left _ _).trans ((le_max_right _ _).trans (le_max_right _ _)), |
| 1129 | (le_max_left _ _).trans ((le_max_right _ _).trans ((le_max_right _ _).trans (le_max_right _ _))), |
| 1130 | (le_max_right _ _).trans ((le_max_right _ _).trans ((le_max_right _ _).trans (le_max_right _ _))), |
| 1131 | fun q hq => (hp q hq).mono h0, ?_⟩ |
| 1132 | exact exists_large_band h M u T hh hM N0 |
| 1133 | |
| 1134 | /-- One target-cone choice, one compact parameter constant, and then one |
| 1135 | band threshold. Both the mixed-point target margin and all analytic |
| 1136 | phase estimates hold after that same threshold. -/ |
| 1137 | theorem ordered_target_constants {K : Set Slow} (hK : IsCompact K) |
| 1138 | {F0 G0 : Slow → ℝ} {T0 : Slow → Plane} |
| 1139 | (hF : ContinuousOn F0 K) (hg : ContinuousOn (PhaseEstimates.shearVector F0 G0) K) |
| 1140 | (hT : ContinuousOn T0 K) (hR : ∀ q ∈ K, 0 < q.1) |
| 1141 | (hc : ∀ q ∈ K, ReferenceCone (F0 q) (PhaseEstimates.shearVector F0 G0 q)) |
| 1142 | (ht : ∀ q ∈ K, TargetCone (F0 q) (PhaseEstimates.shearVector F0 G0 q) (T0 q)) |
| 1143 | (h r0 A Tmin : ℝ) (hh : 0 < h) (N0 : ℕ) : |
| 1144 | ∃ u η M : ℝ, 0 < u ∧ 0 < η ∧ 1 ≤ M ∧ A ≤ M ∧ u ≤ M ∧ |
| 1145 | 1 / (2 * r0) ≤ M ∧ 4 * r0 * ChartScales.Tg ≤ M ∧ |
| 1146 | (∀ q ∈ K, ParameterBounds M q.1 (F0 q) (PhaseEstimates.shearVector F0 G0 q)) ∧ |
| 1147 | ∃ N ≥ N0, (∀ n ≥ N, LargeBand h M u n ∧ Tmin ≤ ChartScales.S n) ∧ |
| 1148 | ∀ L : ActiveLabel K, N ≤ L.val.1 → ∀ q ∈ K, q ∈ gridBox L.val.1 L.val.2 2 → |
| 1149 | ⟪T0 q, normalDirection (PhaseEstimates.shearVector F0 G0 (representative K L))⟫_ℝ ≤ -η ∧ |
| 1150 | |c0 (F0 (representative K L)) (PhaseEstimates.shearVector F0 G0 (representative K L)) * |
| 1151 | ⟪T0 q, transverseDirection (PhaseEstimates.shearVector F0 G0 (representative K L))⟫_ℝ / |
| 1152 | ⟪T0 q, normalDirection (PhaseEstimates.shearVector F0 G0 (representative K L))⟫_ℝ| + η ≤ |
| 1153 | slopeRatio u := by |
| 1154 | obtain ⟨u, η, hu, hη, N1, htarget⟩ := representative_target_margin hK hF hg hT hc ht |
| 1155 | obtain ⟨M, hM, hA, huM, hL, hslot, hp, N, hN, hlarge⟩ := |
| 1156 | ordered_constants hK hF hg hR hc h r0 u A Tmin hh (max N0 N1) |
| 1157 | refine ⟨u, η, M, hu, hη, hM, hA, ?_, hL, hslot, hp, N, |
| 1158 | (le_max_left _ _).trans hN, hlarge, ?_⟩ |
| 1159 | · simpa only [abs_of_pos hu] using huM |
| 1160 | · intro L hLN q hq hbox |
| 1161 | exact htarget L ((le_max_right _ _).trans (hN.trans hLN)) q hq hbox |
| 1162 | |
| 1163 | /-- The actual selected mesh representatives and their derived compact |
| 1164 | eigenpairs instantiate the analytic phase data. In particular, neither |
| 1165 | representative closeness nor eigenpair bounds are fields of the resulting |
| 1166 | construction that the caller must postulate independently. -/ |
| 1167 | noncomputable def family {ι : Type*} (D : PhaseJetBounds.Domain ι Slow) |
| 1168 | {K : Set Slow} (label : ι → ActiveLabel K) (U : Set Slow) |
| 1169 | (F G : ι → Slow → ℝ) (F0 G0 : Slow → ℝ) |
| 1170 | (h r0 u M : ℝ) (sigma theta : ι → ℝ) (hM : 1 ≤ M) |
| 1171 | (hscale : ∀ i, D.scale i = ChartScales.S (label i).val.1) |
| 1172 | (hgrid : ∀ i, D.carrier i ⊆ gridBox (label i).val.1 (label i).val.2 2) |
| 1173 | (hinside : ∀ i, D.carrier i ⊆ U) (hKU : K ⊆ U) |
| 1174 | (hbase : ∀ i, PhaseEstimates.LocalBaseBounds (F i) (G i) F0 G0 U M |
| 1175 | (ChartScales.epsilon h (label i).val.1)) |
| 1176 | (hF : PhaseJetBounds.PolynomialJets D F) (hG : PhaseJetBounds.PolynomialJets D G) |
| 1177 | (hradius : ∀ q ∈ U, 1 / M ≤ |q.1| ∧ |q.1| ≤ M) |
| 1178 | (hR : ∀ q ∈ K, 0 < q.1) |
| 1179 | (hc : ∀ q ∈ K, ReferenceCone (F0 q) (PhaseEstimates.shearVector F0 G0 q)) |
| 1180 | (hp : ∀ q ∈ K, ParameterBounds M q.1 (F0 q) (PhaseEstimates.shearVector F0 G0 q)) |
| 1181 | (hsigma : ∀ i, |sigma i| = 1) : FamilyData D h r0 u M := by |
| 1182 | have hq i := representative_mem K (label i) |
| 1183 | have hlow i := (hp _ (hq i)).positive_lower hM (hR _ (hq i)) (hc _ (hq i)) |
| 1184 | refine { |
| 1185 | band := fun i => (label i).val.1 |
| 1186 | scale_eq := hscale |
| 1187 | F := F |
| 1188 | G := G |
| 1189 | F0 := fun _ => F0 |
| 1190 | G0 := fun _ => G0 |
| 1191 | U := fun _ => U |
| 1192 | q0 := fun i => representative K (label i) |
| 1193 | K := fun i => transverseDirection (PhaseEstimates.shearVector F0 G0 (representative K (label i))) |
| 1194 | lam := fun i => lambda0 (F0 (representative K (label i))) |
| 1195 | (PhaseEstimates.shearVector F0 G0 (representative K (label i))) |
| 1196 | c0 := fun i => c0 (F0 (representative K (label i))) |
| 1197 | (PhaseEstimates.shearVector F0 G0 (representative K (label i))) |
| 1198 | sigma := sigma |
| 1199 | theta := theta |
| 1200 | base := hbase |
| 1201 | baseF := hF |
| 1202 | baseG := hG |
| 1203 | inside := hinside |
| 1204 | representative_inside := fun i => hKU (hq i) |
| 1205 | distance := ?_ |
| 1206 | radius := fun i q hq => hradius q (hinside i hq) |
| 1207 | representative_radius := fun i => hradius _ (hKU (hq i)) |
| 1208 | unit := fun i => transverseDirection_unit (hc _ (hq i)).shear_ne_zero |
| 1209 | orthogonal := fun _ => transverseDirection_inner_shear _ |
| 1210 | frequency_bound := fun i => (hp _ (hq i)).frequency |
| 1211 | shear_bound := fun i => (hp _ (hq i)).shear |
| 1212 | shear_inv := fun i => by simpa only [one_div] using (hlow i).2.1 |
| 1213 | lambda_bound := fun i => ⟨by simpa only [one_div] using (hlow i).2.2.1, (hp _ (hq i)).lambda⟩ |
| 1214 | ratio_bound := fun i => ⟨by simpa only [one_div] using (hlow i).2.2.2, (hp _ (hq i)).ratio⟩ |
| 1215 | eigen12 := ?_ |
| 1216 | eigen21 := ?_ |
| 1217 | sign := hsigma } |
| 1218 | · intro i q hqi |
| 1219 | simpa only [hscale i] using representative_enlarged_distance K (label i) (hgrid i hqi) |
| 1220 | · intro i |
| 1221 | simpa only [quarterTurn_transverseDirection] using (hc _ (hq i)).lambda0_div_c0 |
| 1222 | · intro i |
| 1223 | simpa only [quarterTurn_transverseDirection, normal_inner_shear (hc _ (hq i)).shear_ne_zero] |
| 1224 | using (hc _ (hq i)).lambda0_mul_c0 |
| 1225 | |
| 1226 | end Representatives |
| 1227 | |
| 1228 | end NavierStokes.BasePhaseGeometry |