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.FlatCutoff |
| 2 | import NavierStokes.SmoothCovariance |
| 3 | import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas |
| 4 | |
| 5 | /-! |
| 6 | # Covariance amplitudes across an exponential-flat edge |
| 7 | |
| 8 | The normalized matrix and target are actual smooth functions with an explicit |
| 9 | strict cone. Columns are then multiplied by `edge κᵢ`, and the target by |
| 10 | `edge σ`. Exact inverse and square-root identities exhibit a positive remaining |
| 11 | exponential whenever `κᵢ < σ`; in particular the squared-factor convention |
| 12 | `κᵢ = 2 λᵢ` is covered by `λᵢ < σ / 2`. |
| 13 | |
| 14 | The coefficient quotients are proved smooth from these formulas. Their |
| 15 | smoothness across the singular matrix at the edge is not assumed. |
| 16 | -/ |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | namespace NavierStokes.FlatCovariance |
| 21 | |
| 22 | open Matrix Set |
| 23 | open SmoothCovariance (Mat2 Vec2) |
| 24 | open FlatCutoff (edge) |
| 25 | open scoped ContDiff Topology |
| 26 | |
| 27 | /-- Multiplication of column `j` by its scalar factor `c j`. -/ |
| 28 | def columns (G : Mat2) (c : Vec2) : Mat2 := fun i j => c j * G i j |
| 29 | |
| 30 | def scaledTarget (r : ℝ) (T : Vec2) : Vec2 := fun i => r * T i |
| 31 | |
| 32 | /-- The actual edge-degenerate covariance matrix. -/ |
| 33 | def edgeMatrix (κ : Vec2) (G : ℝ → Mat2) (x : ℝ) : Mat2 := |
| 34 | columns (G x) (fun j => edge (κ j) x) |
| 35 | |
| 36 | def edgeTarget (σ : ℝ) (T : ℝ → Vec2) (x : ℝ) : Vec2 := |
| 37 | scaledTarget (edge σ x) (T x) |
| 38 | |
| 39 | /-- The actual matrix-inverse solve, also defined at the zero edge. -/ |
| 40 | def inverseCoefficients (σ : ℝ) (κ : Vec2) (G : ℝ → Mat2) (T : ℝ → Vec2) |
| 41 | (x : ℝ) : Vec2 := |
| 42 | (edgeMatrix κ G x)⁻¹.mulVec (edgeTarget σ T x) |
| 43 | |
| 44 | def primaryAmplitude (σ : ℝ) (κ : Vec2) (G : ℝ → Mat2) (T : ℝ → Vec2) |
| 45 | (x : ℝ) : Vec2 := |
| 46 | fun i => Real.sqrt (inverseCoefficients σ κ G T x i) |
| 47 | |
| 48 | /-- The signed covariance update divides by the fixed positive primary. -/ |
| 49 | def signedAmplitude (σ τ : ℝ) (κ : Vec2) (G : ℝ → Mat2) |
| 50 | (T R : ℝ → Vec2) (x : ℝ) : Vec2 := |
| 51 | fun i => inverseCoefficients τ κ G R x i / (2 * primaryAmplitude σ κ G T x i) |
| 52 | |
| 53 | theorem sqrt_edge (c x : ℝ) : Real.sqrt (edge c x) = edge (c / 2) x := by |
| 54 | by_cases hx : x ≤ 0 |
| 55 | · simp [FlatCutoff.edge_of_nonpos c hx, FlatCutoff.edge_of_nonpos (c / 2) hx] |
| 56 | · have hp : 0 < x := lt_of_not_ge hx |
| 57 | rw [FlatCutoff.edge_of_pos c hp, FlatCutoff.edge_of_pos (c / 2) hp, |
| 58 | ← Real.exp_half] |
| 59 | congr 1 |
| 60 | ring |
| 61 | |
| 62 | theorem edge_mul (c d x : ℝ) : edge c x * edge d x = edge (c + d) x := by |
| 63 | by_cases hx : x ≤ 0 |
| 64 | · simp [FlatCutoff.edge_of_nonpos c hx, FlatCutoff.edge_of_nonpos d hx, |
| 65 | FlatCutoff.edge_of_nonpos (c + d) hx] |
| 66 | · have hp : 0 < x := lt_of_not_ge hx |
| 67 | rw [FlatCutoff.edge_of_pos c hp, FlatCutoff.edge_of_pos d hp, |
| 68 | FlatCutoff.edge_of_pos (c + d) hp, ← Real.exp_add] |
| 69 | congr 1 |
| 70 | ring |
| 71 | |
| 72 | theorem edge_sq (c x : ℝ) : edge c x ^ 2 = edge (2 * c) x := by |
| 73 | rw [pow_two, edge_mul] |
| 74 | congr 1 |
| 75 | ring |
| 76 | |
| 77 | theorem squared_column_factors (lam : Vec2) (G : ℝ → Mat2) (x : ℝ) : |
| 78 | columns (G x) (fun j => edge (lam j) x ^ 2) = |
| 79 | edgeMatrix (fun j => 2 * lam j) G x := by |
| 80 | ext i j |
| 81 | simp only [columns, edgeMatrix, edge_sq] |
| 82 | |
| 83 | theorem determinant_columns (G : Mat2) (c : Vec2) : |
| 84 | (columns G c).det = c 0 * c 1 * G.det := by |
| 85 | simp only [Matrix.det_fin_two, columns] |
| 86 | ring |
| 87 | |
| 88 | theorem columns_det_ne_zero {G : Mat2} {c : Vec2} |
| 89 | (hG : G.det ≠ 0) (hc : ∀ i, c i ≠ 0) : (columns G c).det ≠ 0 := by |
| 90 | rw [determinant_columns] |
| 91 | exact mul_ne_zero (mul_ne_zero (hc 0) (hc 1)) hG |
| 92 | |
| 93 | /-- Cramer's formula records the exact effect of individual column factors. -/ |
| 94 | theorem weights_columns (G : Mat2) (c : Vec2) (T : Vec2) (r : ℝ) |
| 95 | (hG : G.det ≠ 0) (hc : ∀ i, c i ≠ 0) (i : Fin 2) : |
| 96 | SmoothCovariance.weights (columns G c) (scaledTarget r T) i = |
| 97 | (r / c i) * SmoothCovariance.weights G T i := by |
| 98 | have hc0 := hc 0 |
| 99 | have hc1 := hc 1 |
| 100 | fin_cases i <;> |
| 101 | simp only [SmoothCovariance.weights, determinant_columns, |
| 102 | SmoothCovariance.cramerNumerator, columns, scaledTarget, |
| 103 | Matrix.cons_val_zero, Matrix.cons_val_one, Fin.zero_eta, Fin.mk_one] <;> |
| 104 | field_simp |
| 105 | |
| 106 | theorem edgeMatrix_det_ne_zero {κ : Vec2} {G : ℝ → Mat2} {x : ℝ} |
| 107 | (hG : (G x).det ≠ 0) (hx : 0 < x) : (edgeMatrix κ G x).det ≠ 0 := |
| 108 | columns_det_ne_zero hG (fun i => ne_of_gt (FlatCutoff.edge_pos (κ i) hx)) |
| 109 | |
| 110 | theorem inverseCoefficients_of_nonpos (σ : ℝ) (κ : Vec2) |
| 111 | (G : ℝ → Mat2) (T : ℝ → Vec2) {x : ℝ} (hx : x ≤ 0) : |
| 112 | inverseCoefficients σ κ G T x = 0 := by |
| 113 | have ht : edgeTarget σ T x = 0 := by |
| 114 | ext i |
| 115 | simp [edgeTarget, scaledTarget, FlatCutoff.edge_of_nonpos σ hx] |
| 116 | simp [inverseCoefficients, ht] |
| 117 | |
| 118 | theorem primaryAmplitude_of_nonpos (σ : ℝ) (κ : Vec2) |
| 119 | (G : ℝ → Mat2) (T : ℝ → Vec2) {x : ℝ} (hx : x ≤ 0) (i : Fin 2) : |
| 120 | primaryAmplitude σ κ G T x i = 0 := by |
| 121 | simp [primaryAmplitude, inverseCoefficients_of_nonpos σ κ G T hx] |
| 122 | |
| 123 | theorem signedAmplitude_of_nonpos (σ τ : ℝ) (κ : Vec2) |
| 124 | (G : ℝ → Mat2) (T R : ℝ → Vec2) {x : ℝ} (hx : x ≤ 0) (i : Fin 2) : |
| 125 | signedAmplitude σ τ κ G T R x i = 0 := by |
| 126 | simp [signedAmplitude, inverseCoefficients_of_nonpos τ κ G R hx] |
| 127 | |
| 128 | /-- Exact cancellation of the column exponential in the actual inverse. |
| 129 | This identity includes the edge and the full zero half-line. -/ |
| 130 | theorem inverseCoefficients_factor (σ : ℝ) (κ : Vec2) |
| 131 | (G : ℝ → Mat2) (T : ℝ → Vec2) {x : ℝ} (hG : (G x).det ≠ 0) (i : Fin 2) : |
| 132 | inverseCoefficients σ κ G T x i = |
| 133 | edge (σ - κ i) x * SmoothCovariance.weights (G x) (T x) i := by |
| 134 | by_cases hx : x ≤ 0 |
| 135 | · simp [inverseCoefficients_of_nonpos σ κ G T hx, |
| 136 | FlatCutoff.edge_of_nonpos (σ - κ i) hx] |
| 137 | · have hp : 0 < x := lt_of_not_ge hx |
| 138 | have hs := SmoothCovariance.inverse_formula (edgeMatrix κ G x) (edgeTarget σ T x) |
| 139 | (edgeMatrix_det_ne_zero hG hp) |
| 140 | change ((edgeMatrix κ G x)⁻¹.mulVec (edgeTarget σ T x)) i = _ |
| 141 | rw [hs] |
| 142 | dsimp only [edgeMatrix, edgeTarget] |
| 143 | rw [weights_columns (G x) (fun j => edge (κ j) x) (T x) (edge σ x) hG |
| 144 | (fun j => ne_of_gt (FlatCutoff.edge_pos (κ j) hp)) i] |
| 145 | rw [congrFun (FlatCutoff.edge_div_edge σ (κ i)) x] |
| 146 | |
| 147 | /-- Taking the square root halves the *remaining* exponential exponent. -/ |
| 148 | theorem primaryAmplitude_factor (σ : ℝ) (κ : Vec2) |
| 149 | (G : ℝ → Mat2) (T : ℝ → Vec2) {x : ℝ} (hG : (G x).det ≠ 0) (i : Fin 2) : |
| 150 | primaryAmplitude σ κ G T x i = edge ((σ - κ i) / 2) x * |
| 151 | SmoothCovariance.amplitudes (G x) (T x) i := by |
| 152 | unfold primaryAmplitude |
| 153 | rw [inverseCoefficients_factor σ κ G T hG i, |
| 154 | Real.sqrt_mul (FlatCutoff.edge_nonneg (σ - κ i) x), sqrt_edge] |
| 155 | rfl |
| 156 | |
| 157 | /-- The signed update retains the explicitly computed exponential margin; |
| 158 | the target `R` may have either sign. -/ |
| 159 | theorem signedAmplitude_factor (σ τ : ℝ) (κ : Vec2) |
| 160 | (G : ℝ → Mat2) (T R : ℝ → Vec2) {x : ℝ} (hG : (G x).det ≠ 0) (i : Fin 2) : |
| 161 | signedAmplitude σ τ κ G T R x i = edge (τ - (σ + κ i) / 2) x * |
| 162 | (SmoothCovariance.weights (G x) (R x) i / |
| 163 | (2 * SmoothCovariance.amplitudes (G x) (T x) i)) := by |
| 164 | unfold signedAmplitude |
| 165 | rw [inverseCoefficients_factor τ κ G R hG i, primaryAmplitude_factor σ κ G T hG i] |
| 166 | calc |
| 167 | _ = (edge (τ - κ i) x / edge ((σ - κ i) / 2) x) * |
| 168 | (SmoothCovariance.weights (G x) (R x) i / |
| 169 | (2 * SmoothCovariance.amplitudes (G x) (T x) i)) := by |
| 170 | simp only [div_eq_mul_inv, _root_.mul_inv_rev] |
| 171 | ring |
| 172 | _ = _ := by |
| 173 | rw [congrFun (FlatCutoff.edge_div_edge (τ - κ i) ((σ - κ i) / 2)) x] |
| 174 | congr 2 |
| 175 | ring |
| 176 | |
| 177 | /-- Exact linearity in a scalar target factor, with no regularity or |
| 178 | nonvanishing assumption on that factor. -/ |
| 179 | theorem inverseCoefficients_target_factor (σ : ℝ) (κ : Vec2) |
| 180 | (G : ℝ → Mat2) (T : ℝ → Vec2) (f : ℝ → ℝ) (x : ℝ) (i : Fin 2) : |
| 181 | inverseCoefficients σ κ G (fun y j => f y * T y j) x i = |
| 182 | f x * inverseCoefficients σ κ G T x i := by |
| 183 | simp only [inverseCoefficients, edgeTarget, scaledTarget, Matrix.mulVec, |
| 184 | dotProduct, Fin.sum_univ_two] |
| 185 | ring |
| 186 | |
| 187 | theorem signedAmplitude_target_factor (σ τ : ℝ) (κ : Vec2) |
| 188 | (G : ℝ → Mat2) (T R : ℝ → Vec2) (f : ℝ → ℝ) (x : ℝ) (i : Fin 2) : |
| 189 | signedAmplitude σ τ κ G T (fun y j => f y * R y j) x i = |
| 190 | f x * signedAmplitude σ τ κ G T R x i := by |
| 191 | unfold signedAmplitude |
| 192 | rw [inverseCoefficients_target_factor] |
| 193 | ring |
| 194 | |
| 195 | theorem inverseCoefficients_pos {σ : ℝ} {κ : Vec2} |
| 196 | {G : ℝ → Mat2} {T : ℝ → Vec2} {x : ℝ} |
| 197 | (hcone : SmoothCovariance.StrictCone (G x) (T x)) (hx : 0 < x) (i : Fin 2) : |
| 198 | 0 < inverseCoefficients σ κ G T x i := by |
| 199 | rw [inverseCoefficients_factor σ κ G T hcone.det_ne_zero i] |
| 200 | exact mul_pos (FlatCutoff.edge_pos _ hx) (hcone.weights_pos i) |
| 201 | |
| 202 | theorem primaryAmplitude_pos {σ : ℝ} {κ : Vec2} |
| 203 | {G : ℝ → Mat2} {T : ℝ → Vec2} {x : ℝ} |
| 204 | (hcone : SmoothCovariance.StrictCone (G x) (T x)) (hx : 0 < x) (i : Fin 2) : |
| 205 | 0 < primaryAmplitude σ κ G T x i := |
| 206 | Real.sqrt_pos.mpr (inverseCoefficients_pos hcone hx i) |
| 207 | |
| 208 | /-- The inverse still reconstructs its target at every real point, including |
| 209 | the zero half-line where the matrix itself is singular. -/ |
| 210 | theorem inverse_reconstruct (σ : ℝ) (κ : Vec2) |
| 211 | (G : ℝ → Mat2) (T : ℝ → Vec2) {x : ℝ} (hG : (G x).det ≠ 0) : |
| 212 | (edgeMatrix κ G x).mulVec (inverseCoefficients σ κ G T x) = edgeTarget σ T x := by |
| 213 | by_cases hx : x ≤ 0 |
| 214 | · rw [inverseCoefficients_of_nonpos σ κ G T hx, Matrix.mulVec_zero] |
| 215 | ext i |
| 216 | simp [edgeTarget, scaledTarget, FlatCutoff.edge_of_nonpos σ hx] |
| 217 | · have hp : 0 < x := lt_of_not_ge hx |
| 218 | unfold inverseCoefficients |
| 219 | rw [Matrix.mulVec_mulVec, |
| 220 | Matrix.mul_nonsing_inv _ (isUnit_iff_ne_zero.mpr (edgeMatrix_det_ne_zero hG hp)), |
| 221 | Matrix.one_mulVec] |
| 222 | |
| 223 | theorem primary_reconstruct {σ : ℝ} {κ : Vec2} |
| 224 | {G : ℝ → Mat2} {T : ℝ → Vec2} {x : ℝ} |
| 225 | (hcone : SmoothCovariance.StrictCone (G x) (T x)) : |
| 226 | (edgeMatrix κ G x).mulVec (fun i => primaryAmplitude σ κ G T x i ^ 2) = |
| 227 | edgeTarget σ T x := by |
| 228 | have hy : ∀ i, 0 ≤ inverseCoefficients σ κ G T x i := by |
| 229 | intro i |
| 230 | by_cases hx : x ≤ 0 |
| 231 | · simp [inverseCoefficients_of_nonpos σ κ G T hx] |
| 232 | · exact le_of_lt (inverseCoefficients_pos hcone (lt_of_not_ge hx) i) |
| 233 | have hs : (fun i => primaryAmplitude σ κ G T x i ^ 2) = |
| 234 | inverseCoefficients σ κ G T x := by |
| 235 | funext i |
| 236 | exact Real.sq_sqrt (hy i) |
| 237 | rw [hs] |
| 238 | exact inverse_reconstruct σ κ G T hcone.det_ne_zero |
| 239 | |
| 240 | /-- Exact two-sided cross covariance of the primary and signed increment. -/ |
| 241 | theorem signed_cross_reconstruct {σ τ : ℝ} {κ : Vec2} |
| 242 | {G : ℝ → Mat2} {T R : ℝ → Vec2} {x : ℝ} |
| 243 | (hcone : SmoothCovariance.StrictCone (G x) (T x)) : |
| 244 | (edgeMatrix κ G x).mulVec |
| 245 | (fun i => 2 * primaryAmplitude σ κ G T x i * signedAmplitude σ τ κ G T R x i) = |
| 246 | edgeTarget τ R x := by |
| 247 | have hcross : |
| 248 | (fun i => 2 * primaryAmplitude σ κ G T x i * signedAmplitude σ τ κ G T R x i) = |
| 249 | inverseCoefficients τ κ G R x := by |
| 250 | funext i |
| 251 | by_cases hx : x ≤ 0 |
| 252 | · simp [primaryAmplitude_of_nonpos σ κ G T hx, |
| 253 | inverseCoefficients_of_nonpos τ κ G R hx] |
| 254 | · have ha : primaryAmplitude σ κ G T x i ≠ 0 := |
| 255 | ne_of_gt (primaryAmplitude_pos hcone (lt_of_not_ge hx) i) |
| 256 | unfold signedAmplitude |
| 257 | field_simp |
| 258 | rw [hcross] |
| 259 | exact inverse_reconstruct τ κ G R hcone.det_ne_zero |
| 260 | |
| 261 | section Smooth |
| 262 | |
| 263 | variable {s : Set ℝ} {σ τ : ℝ} {κ : Vec2} |
| 264 | variable {G : ℝ → Mat2} {T R : ℝ → Vec2} |
| 265 | |
| 266 | theorem edgeMatrix_contDiffOn |
| 267 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 268 | (hκ : ∀ i, 0 < κ i) (i j : Fin 2) : |
| 269 | ContDiffOn ℝ ∞ (fun x => edgeMatrix κ G x i j) s := |
| 270 | (FlatCutoff.edge_contDiff (hκ j) (n := ⊤)).contDiffOn.mul (hG i j) |
| 271 | |
| 272 | theorem edgeTarget_contDiffOn |
| 273 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 274 | (hσ : 0 < σ) (i : Fin 2) : |
| 275 | ContDiffOn ℝ ∞ (fun x => edgeTarget σ T x i) s := |
| 276 | (FlatCutoff.edge_contDiff hσ (n := ⊤)).contDiffOn.mul (hT i) |
| 277 | |
| 278 | /-- Smooth inverse coefficients at the edge, proved by the surviving |
| 279 | exponential factor even though the actual matrix degenerates there. -/ |
| 280 | theorem inverseCoefficients_contDiffOn |
| 281 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 282 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 283 | (hdet : ∀ x ∈ s, (G x).det ≠ 0) |
| 284 | (hgap : ∀ i, κ i < σ) (i : Fin 2) : |
| 285 | ContDiffOn ℝ ∞ (fun x => inverseCoefficients σ κ G T x i) s := by |
| 286 | apply ((FlatCutoff.edge_contDiff (sub_pos.mpr (hgap i)) (n := ⊤)).contDiffOn.mul |
| 287 | (SmoothCovariance.contDiffOn_weights hG hT hdet i)).congr |
| 288 | intro x hx |
| 289 | exact inverseCoefficients_factor σ κ G T (hdet x hx) i |
| 290 | |
| 291 | theorem primaryAmplitude_contDiffOn |
| 292 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 293 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 294 | (hcone : ∀ x ∈ s, SmoothCovariance.StrictCone (G x) (T x)) |
| 295 | (hgap : ∀ i, κ i < σ) (i : Fin 2) : |
| 296 | ContDiffOn ℝ ∞ (fun x => primaryAmplitude σ κ G T x i) s := by |
| 297 | have hp : 0 < (σ - κ i) / 2 := by linarith [hgap i] |
| 298 | apply ((FlatCutoff.edge_contDiff hp (n := ⊤)).contDiffOn.mul |
| 299 | (SmoothCovariance.contDiffOn_amplitudes hG hT hcone i)).congr |
| 300 | intro x hx |
| 301 | exact primaryAmplitude_factor σ κ G T (hcone x hx).det_ne_zero i |
| 302 | |
| 303 | /-- Every fixed inverse-power loss is absorbed by the concrete primary |
| 304 | exponential, including at zero. -/ |
| 305 | theorem primaryAmplitude_div_pow_contDiffOn |
| 306 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 307 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 308 | (hcone : ∀ x ∈ s, SmoothCovariance.StrictCone (G x) (T x)) |
| 309 | (hgap : ∀ i, κ i < σ) (i : Fin 2) (loss : ℕ) : |
| 310 | ContDiffOn ℝ ∞ (fun x => primaryAmplitude σ κ G T x i / x ^ loss) s := by |
| 311 | have hp : 0 < (σ - κ i) / 2 := by linarith [hgap i] |
| 312 | apply ((FlatCutoff.edge_div_pow_contDiff hp loss (n := ⊤)).contDiffOn.mul |
| 313 | (SmoothCovariance.contDiffOn_amplitudes hG hT hcone i)).congr |
| 314 | intro x hx |
| 315 | rw [primaryAmplitude_factor σ κ G T (hcone x hx).det_ne_zero i] |
| 316 | ring |
| 317 | |
| 318 | /-- The normalized signed quotient is smooth because its denominator is |
| 319 | proved strictly positive from the explicit normalized cone. -/ |
| 320 | theorem signed_normal_contDiffOn |
| 321 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 322 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 323 | (hR : ∀ i, ContDiffOn ℝ ∞ (fun x => R x i) s) |
| 324 | (hcone : ∀ x ∈ s, SmoothCovariance.StrictCone (G x) (T x)) (i : Fin 2) : |
| 325 | ContDiffOn ℝ ∞ (fun x => SmoothCovariance.weights (G x) (R x) i / |
| 326 | (2 * SmoothCovariance.amplitudes (G x) (T x) i)) s := by |
| 327 | apply (SmoothCovariance.contDiffOn_weights hG hR |
| 328 | (fun x hx => (hcone x hx).det_ne_zero) i).div |
| 329 | (contDiffOn_const.mul (SmoothCovariance.contDiffOn_amplitudes hG hT hcone i)) |
| 330 | intro x hx |
| 331 | exact mul_ne_zero (by norm_num) (ne_of_gt ((hcone x hx).amplitudes_pos i)) |
| 332 | |
| 333 | theorem signedAmplitude_contDiffOn |
| 334 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 335 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 336 | (hR : ∀ i, ContDiffOn ℝ ∞ (fun x => R x i) s) |
| 337 | (hcone : ∀ x ∈ s, SmoothCovariance.StrictCone (G x) (T x)) |
| 338 | (hgap : ∀ i, (σ + κ i) / 2 < τ) (i : Fin 2) : |
| 339 | ContDiffOn ℝ ∞ (fun x => signedAmplitude σ τ κ G T R x i) s := by |
| 340 | apply ((FlatCutoff.edge_contDiff (sub_pos.mpr (hgap i)) (n := ⊤)).contDiffOn.mul |
| 341 | (signed_normal_contDiffOn hG hT hR hcone i)).congr |
| 342 | intro x hx |
| 343 | exact signedAmplitude_factor σ τ κ G T R (hcone x hx).det_ne_zero i |
| 344 | |
| 345 | theorem signedAmplitude_div_pow_contDiffOn |
| 346 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 347 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 348 | (hR : ∀ i, ContDiffOn ℝ ∞ (fun x => R x i) s) |
| 349 | (hcone : ∀ x ∈ s, SmoothCovariance.StrictCone (G x) (T x)) |
| 350 | (hgap : ∀ i, (σ + κ i) / 2 < τ) (i : Fin 2) (loss : ℕ) : |
| 351 | ContDiffOn ℝ ∞ (fun x => signedAmplitude σ τ κ G T R x i / x ^ loss) s := by |
| 352 | apply ((FlatCutoff.edge_div_pow_contDiff (sub_pos.mpr (hgap i)) loss (n := ⊤)).contDiffOn.mul |
| 353 | (signed_normal_contDiffOn hG hT hR hcone i)).congr |
| 354 | intro x hx |
| 355 | rw [signedAmplitude_factor σ τ κ G T R (hcone x hx).det_ne_zero i] |
| 356 | ring |
| 357 | |
| 358 | /-- An actual signed-stress numerator with an inverse-power loss still gives |
| 359 | a smooth signed amplitude. Smoothness of the singular quotient is a result. -/ |
| 360 | theorem signed_inverse_power_target_contDiffOn |
| 361 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 362 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 363 | (hR : ∀ i, ContDiffOn ℝ ∞ (fun x => R x i) s) |
| 364 | (hcone : ∀ x ∈ s, SmoothCovariance.StrictCone (G x) (T x)) |
| 365 | (hgap : ∀ i, (σ + κ i) / 2 < τ) (i : Fin 2) (loss : ℕ) : |
| 366 | ContDiffOn ℝ ∞ (fun x => signedAmplitude σ τ κ G T |
| 367 | (fun y j => (y ^ loss)⁻¹ * R y j) x i) s := by |
| 368 | apply (signedAmplitude_div_pow_contDiffOn hG hT hR hcone hgap i loss).congr |
| 369 | intro x hx |
| 370 | rw [signedAmplitude_target_factor] |
| 371 | simp only [div_eq_mul_inv] |
| 372 | ring |
| 373 | |
| 374 | /-- When a fundamental column factor is `edge λᵢ` and covariance therefore |
| 375 | carries its square, the concrete condition is exactly `λᵢ < σ / 2`. A signed |
| 376 | stress with the same target envelope retains the same flat exponent. -/ |
| 377 | theorem squared_factors_smooth {lam : Vec2} |
| 378 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 379 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 380 | (hR : ∀ i, ContDiffOn ℝ ∞ (fun x => R x i) s) |
| 381 | (hcone : ∀ x ∈ s, SmoothCovariance.StrictCone (G x) (T x)) |
| 382 | (hgap : ∀ i, lam i < σ / 2) (i : Fin 2) (loss : ℕ) : |
| 383 | ContDiffOn ℝ ∞ (fun x => primaryAmplitude σ (fun j => 2 * lam j) G T x i / x ^ loss) s ∧ |
| 384 | ContDiffOn ℝ ∞ (fun x => signedAmplitude σ σ (fun j => 2 * lam j) G T R x i / x ^ loss) s := by |
| 385 | constructor |
| 386 | · exact primaryAmplitude_div_pow_contDiffOn hG hT hcone |
| 387 | (fun j => by linarith [hgap j]) i loss |
| 388 | · exact signedAmplitude_div_pow_contDiffOn hG hT hR hcone |
| 389 | (fun j => by linarith [hgap j]) i loss |
| 390 | |
| 391 | /-- The requested stricter half-exponent condition also suffices when the |
| 392 | exponential appears directly in a covariance column, without a square. -/ |
| 393 | theorem direct_half_factors_smooth |
| 394 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun x => G x i j) s) |
| 395 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun x => T x i) s) |
| 396 | (hR : ∀ i, ContDiffOn ℝ ∞ (fun x => R x i) s) |
| 397 | (hcone : ∀ x ∈ s, SmoothCovariance.StrictCone (G x) (T x)) |
| 398 | (hσ : 0 < σ) (hgap : ∀ i, κ i < σ / 2) (i : Fin 2) (loss : ℕ) : |
| 399 | ContDiffOn ℝ ∞ (fun x => primaryAmplitude σ κ G T x i / x ^ loss) s ∧ |
| 400 | ContDiffOn ℝ ∞ (fun x => signedAmplitude σ σ κ G T R x i / x ^ loss) s := by |
| 401 | constructor |
| 402 | · exact primaryAmplitude_div_pow_contDiffOn hG hT hcone |
| 403 | (fun j => by linarith [hgap j]) i loss |
| 404 | · exact signedAmplitude_div_pow_contDiffOn hG hT hR hcone |
| 405 | (fun j => by linarith [hgap j]) i loss |
| 406 | |
| 407 | end Smooth |
| 408 | |
| 409 | /-- Concrete compact-family lower bounds with the vanishing factors left |
| 410 | explicit. In particular the primary square-root denominator is controlled. -/ |
| 411 | theorem compact_weighted_lower_bounds {K : Set ℝ} (hK : IsCompact K) |
| 412 | {σ : ℝ} {κ : Vec2} {G : ℝ → Mat2} {T : ℝ → Vec2} |
| 413 | (hG : ∀ i j, ContinuousOn (fun x => G x i j) K) |
| 414 | (hT : ∀ i, ContinuousOn (fun x => T x i) K) |
| 415 | (hcone : ∀ x ∈ K, SmoothCovariance.StrictCone (G x) (T x)) : |
| 416 | ∃ δ : ℝ, 0 < δ ∧ ∀ x ∈ K, ∀ i, |
| 417 | δ * edge (σ - κ i) x ≤ inverseCoefficients σ κ G T x i ∧ |
| 418 | δ * edge ((σ - κ i) / 2) x ≤ primaryAmplitude σ κ G T x i := by |
| 419 | obtain ⟨δ, hδ, hbound⟩ := SmoothCovariance.compact_uniform_amplitudes hK hG hT hcone |
| 420 | refine ⟨δ, hδ, ?_⟩ |
| 421 | intro x hx i |
| 422 | rw [inverseCoefficients_factor σ κ G T (hcone x hx).det_ne_zero i, |
| 423 | primaryAmplitude_factor σ κ G T (hcone x hx).det_ne_zero i] |
| 424 | constructor |
| 425 | · simpa only [mul_comm] using mul_le_mul_of_nonneg_left ((hbound x hx).2 i).1 |
| 426 | (FlatCutoff.edge_nonneg (σ - κ i) x) |
| 427 | · simpa only [mul_comm] using mul_le_mul_of_nonneg_left ((hbound x hx).2 i).2 |
| 428 | (FlatCutoff.edge_nonneg ((σ - κ i) / 2) x) |
| 429 | |
| 430 | /-- A smooth function that is zero on the nonpositive half-line has every |
| 431 | derivative zero at the joining point. -/ |
| 432 | theorem iteratedDeriv_zero_of_nonpos_zero {f : ℝ → ℝ} |
| 433 | (hf : ContDiff ℝ ∞ f) (hzero : ∀ x ≤ 0, f x = 0) (n : ℕ) : |
| 434 | iteratedDeriv n f 0 = 0 := by |
| 435 | have hz : iteratedDeriv n (fun _ : ℝ => (0 : ℝ)) = fun _ => 0 := by |
| 436 | induction n with |
| 437 | | zero => rw [iteratedDeriv_zero] |
| 438 | | succ n ih => |
| 439 | rw [iteratedDeriv_succ, ih] |
| 440 | funext x |
| 441 | exact deriv_const x 0 |
| 442 | have heq : EqOn f (fun _ : ℝ => (0 : ℝ)) (Iio 0) := |
| 443 | fun x hx => hzero x hx.le |
| 444 | have hd := heq.iteratedDeriv_of_isOpen isOpen_Iio n |
| 445 | rw [hz] at hd |
| 446 | have hc : Continuous (iteratedDeriv n f) := hf.continuous_iteratedDeriv n |
| 447 | (WithTop.coe_le_coe.mpr (le_top : (n : ℕ∞) ≤ ⊤)) |
| 448 | have hcl := hd.closure hc continuous_const |
| 449 | apply hcl |
| 450 | simp |
| 451 | |
| 452 | section GlobalFlatness |
| 453 | |
| 454 | variable {σ τ : ℝ} {κ : Vec2} {G : ℝ → Mat2} {T R : ℝ → Vec2} |
| 455 | |
| 456 | theorem primaryAmplitude_div_pow_contDiff |
| 457 | (hG : ∀ i j, ContDiff ℝ ∞ (fun x => G x i j)) |
| 458 | (hT : ∀ i, ContDiff ℝ ∞ (fun x => T x i)) |
| 459 | (hcone : ∀ x, SmoothCovariance.StrictCone (G x) (T x)) |
| 460 | (hgap : ∀ i, κ i < σ) (i : Fin 2) (loss : ℕ) : |
| 461 | ContDiff ℝ ∞ (fun x => primaryAmplitude σ κ G T x i / x ^ loss) := |
| 462 | contDiffOn_univ.mp (primaryAmplitude_div_pow_contDiffOn |
| 463 | (fun i j => (hG i j).contDiffOn) (fun i => (hT i).contDiffOn) |
| 464 | (fun x _ => hcone x) hgap i loss) |
| 465 | |
| 466 | theorem signedAmplitude_div_pow_contDiff |
| 467 | (hG : ∀ i j, ContDiff ℝ ∞ (fun x => G x i j)) |
| 468 | (hT : ∀ i, ContDiff ℝ ∞ (fun x => T x i)) |
| 469 | (hR : ∀ i, ContDiff ℝ ∞ (fun x => R x i)) |
| 470 | (hcone : ∀ x, SmoothCovariance.StrictCone (G x) (T x)) |
| 471 | (hgap : ∀ i, (σ + κ i) / 2 < τ) (i : Fin 2) (loss : ℕ) : |
| 472 | ContDiff ℝ ∞ (fun x => signedAmplitude σ τ κ G T R x i / x ^ loss) := |
| 473 | contDiffOn_univ.mp (signedAmplitude_div_pow_contDiffOn |
| 474 | (fun i j => (hG i j).contDiffOn) (fun i => (hT i).contDiffOn) |
| 475 | (fun i => (hR i).contDiffOn) (fun x _ => hcone x) hgap i loss) |
| 476 | |
| 477 | /-- Actual all-order flatness of the primary, also after every fixed |
| 478 | inverse-power loss, obtained from the proved smooth zero extension. -/ |
| 479 | theorem primary_weighted_derivatives_zero |
| 480 | (hG : ∀ i j, ContDiff ℝ ∞ (fun x => G x i j)) |
| 481 | (hT : ∀ i, ContDiff ℝ ∞ (fun x => T x i)) |
| 482 | (hcone : ∀ x, SmoothCovariance.StrictCone (G x) (T x)) |
| 483 | (hgap : ∀ i, κ i < σ) (i : Fin 2) (loss n : ℕ) : |
| 484 | iteratedDeriv n (fun x => primaryAmplitude σ κ G T x i / x ^ loss) 0 = 0 := by |
| 485 | apply iteratedDeriv_zero_of_nonpos_zero |
| 486 | (primaryAmplitude_div_pow_contDiff hG hT hcone hgap i loss) |
| 487 | intro x hx |
| 488 | simp [primaryAmplitude_of_nonpos σ κ G T hx i] |
| 489 | |
| 490 | theorem signed_weighted_derivatives_zero |
| 491 | (hG : ∀ i j, ContDiff ℝ ∞ (fun x => G x i j)) |
| 492 | (hT : ∀ i, ContDiff ℝ ∞ (fun x => T x i)) |
| 493 | (hR : ∀ i, ContDiff ℝ ∞ (fun x => R x i)) |
| 494 | (hcone : ∀ x, SmoothCovariance.StrictCone (G x) (T x)) |
| 495 | (hgap : ∀ i, (σ + κ i) / 2 < τ) (i : Fin 2) (loss n : ℕ) : |
| 496 | iteratedDeriv n (fun x => signedAmplitude σ τ κ G T R x i / x ^ loss) 0 = 0 := by |
| 497 | apply iteratedDeriv_zero_of_nonpos_zero |
| 498 | (signedAmplitude_div_pow_contDiff hG hT hR hcone hgap i loss) |
| 499 | intro x hx |
| 500 | simp [signedAmplitude_of_nonpos σ τ κ G T R hx i] |
| 501 | |
| 502 | end GlobalFlatness |
| 503 | |
| 504 | section ParameterFamilies |
| 505 | |
| 506 | variable {E : Type*} |
| 507 | |
| 508 | /-- Evaluation of the actual inverse amplitude at a smooth signed edge |
| 509 | coordinate, with independent smooth parameters in the normalized data. -/ |
| 510 | def parameterPrimary (σ : ℝ) (κ : Vec2) (d : E → ℝ) |
| 511 | (G : E → Mat2) (T : E → Vec2) (z : E) : Vec2 := |
| 512 | primaryAmplitude σ κ (fun _ => G z) (fun _ => T z) (d z) |
| 513 | |
| 514 | def parameterSigned (σ τ : ℝ) (κ : Vec2) (d : E → ℝ) |
| 515 | (G : E → Mat2) (T R : E → Vec2) (z : E) : Vec2 := |
| 516 | signedAmplitude σ τ κ (fun _ => G z) (fun _ => T z) (fun _ => R z) (d z) |
| 517 | |
| 518 | theorem parameterPrimary_of_nonpos (σ : ℝ) (κ : Vec2) (d : E → ℝ) |
| 519 | (G : E → Mat2) (T : E → Vec2) {z : E} (hz : d z ≤ 0) (i : Fin 2) : |
| 520 | parameterPrimary σ κ d G T z i = 0 := |
| 521 | primaryAmplitude_of_nonpos σ κ (fun _ => G z) (fun _ => T z) hz i |
| 522 | |
| 523 | theorem parameterSigned_of_nonpos (σ τ : ℝ) (κ : Vec2) (d : E → ℝ) |
| 524 | (G : E → Mat2) (T R : E → Vec2) {z : E} (hz : d z ≤ 0) (i : Fin 2) : |
| 525 | parameterSigned σ τ κ d G T R z i = 0 := |
| 526 | signedAmplitude_of_nonpos σ τ κ (fun _ => G z) (fun _ => T z) (fun _ => R z) hz i |
| 527 | |
| 528 | variable [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 529 | |
| 530 | /-- Joint smoothness in the edge coordinate and all additional parameters, |
| 531 | after any fixed inverse power of the edge coordinate. -/ |
| 532 | theorem parameterPrimary_div_pow_contDiffOn |
| 533 | {s : Set E} {σ : ℝ} {κ : Vec2} {d : E → ℝ} |
| 534 | {G : E → Mat2} {T : E → Vec2} |
| 535 | (hd : ContDiffOn ℝ ∞ d s) |
| 536 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun z => G z i j) s) |
| 537 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun z => T z i) s) |
| 538 | (hcone : ∀ z ∈ s, SmoothCovariance.StrictCone (G z) (T z)) |
| 539 | (hgap : ∀ i, κ i < σ) (i : Fin 2) (loss : ℕ) : |
| 540 | ContDiffOn ℝ ∞ (fun z => parameterPrimary σ κ d G T z i / d z ^ loss) s := by |
| 541 | have hp : 0 < (σ - κ i) / 2 := by linarith [hgap i] |
| 542 | apply (((FlatCutoff.edge_div_pow_contDiff hp loss (n := ⊤)).comp_contDiffOn hd).mul |
| 543 | (SmoothCovariance.contDiffOn_amplitudes hG hT hcone i)).congr |
| 544 | intro z hz |
| 545 | unfold parameterPrimary |
| 546 | rw [primaryAmplitude_factor σ κ (fun _ => G z) (fun _ => T z) |
| 547 | (hcone z hz).det_ne_zero i] |
| 548 | dsimp only [Function.comp_def] |
| 549 | ring |
| 550 | |
| 551 | theorem parameterSigned_div_pow_contDiffOn |
| 552 | {s : Set E} {σ τ : ℝ} {κ : Vec2} {d : E → ℝ} |
| 553 | {G : E → Mat2} {T R : E → Vec2} |
| 554 | (hd : ContDiffOn ℝ ∞ d s) |
| 555 | (hG : ∀ i j, ContDiffOn ℝ ∞ (fun z => G z i j) s) |
| 556 | (hT : ∀ i, ContDiffOn ℝ ∞ (fun z => T z i) s) |
| 557 | (hR : ∀ i, ContDiffOn ℝ ∞ (fun z => R z i) s) |
| 558 | (hcone : ∀ z ∈ s, SmoothCovariance.StrictCone (G z) (T z)) |
| 559 | (hgap : ∀ i, (σ + κ i) / 2 < τ) (i : Fin 2) (loss : ℕ) : |
| 560 | ContDiffOn ℝ ∞ (fun z => parameterSigned σ τ κ d G T R z i / d z ^ loss) s := by |
| 561 | have hn : ContDiffOn ℝ ∞ (fun z => SmoothCovariance.weights (G z) (R z) i / |
| 562 | (2 * SmoothCovariance.amplitudes (G z) (T z) i)) s := by |
| 563 | apply (SmoothCovariance.contDiffOn_weights hG hR |
| 564 | (fun z hz => (hcone z hz).det_ne_zero) i).div |
| 565 | (contDiffOn_const.mul (SmoothCovariance.contDiffOn_amplitudes hG hT hcone i)) |
| 566 | intro z hz |
| 567 | exact mul_ne_zero (by norm_num) (ne_of_gt ((hcone z hz).amplitudes_pos i)) |
| 568 | apply (((FlatCutoff.edge_div_pow_contDiff (sub_pos.mpr (hgap i)) loss |
| 569 | (n := ⊤)).comp_contDiffOn hd).mul hn).congr |
| 570 | intro z hz |
| 571 | unfold parameterSigned |
| 572 | rw [signedAmplitude_factor σ τ κ (fun _ => G z) (fun _ => T z) (fun _ => R z) |
| 573 | (hcone z hz).det_ne_zero i] |
| 574 | dsimp only [Function.comp_def] |
| 575 | ring |
| 576 | |
| 577 | end ParameterFamilies |
| 578 | |
| 579 | end NavierStokes.FlatCovariance |