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 Mathlib.Analysis.InnerProductSpace.Calculus |
| 2 | import Mathlib.Analysis.Calculus.MeanValue |
| 3 | import Mathlib.Analysis.SpecialFunctions.ExpDeriv |
| 4 | import Mathlib.Data.Complex.Basic |
| 5 | import Mathlib.Tactic.FieldSimp |
| 6 | import Mathlib.Tactic.Linarith |
| 7 | import Mathlib.Tactic.Module |
| 8 | |
| 9 | /-! |
| 10 | # Tangent projection and pressure cancellation |
| 11 | |
| 12 | This file checks the algebra in manuscript Lemma 8.4, equation (27), and |
| 13 | Appendix A.3. The vectors are in an arbitrary real inner-product space; |
| 14 | `Kt` denotes the value of the matrix `K` on `t`. No assertion about the |
| 15 | existence, size, or differentiated estimates of a pulse is made here. |
| 16 | -/ |
| 17 | |
| 18 | namespace NavierStokes.TangentProjection |
| 19 | |
| 20 | noncomputable section |
| 21 | |
| 22 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] |
| 23 | |
| 24 | open scoped InnerProductSpace |
| 25 | |
| 26 | /-- Orthogonal projection onto the hyperplane perpendicular to `n`, for `n ≠ 0`. -/ |
| 27 | def tangentProj (n f : E) : E := f - (⟪n, f⟫_ℝ / ⟪n, n⟫_ℝ) • n |
| 28 | |
| 29 | /-- The right-hand side of equation (27), with the viscous coefficient `δ`. -/ |
| 30 | def projectedRhs (n n' t Kt f : E) (δ : ℝ) : E := |
| 31 | -Kt + ((⟪n, Kt⟫_ℝ - ⟪n', t⟫_ℝ) / ⟪n, n⟫_ℝ) • n - δ • t - tangentProj n f |
| 32 | |
| 33 | /-- The real coefficient of the normal vector canceled by pressure. -/ |
| 34 | def pressureCoefficient (n n' t Kt f : E) : ℝ := |
| 35 | (⟪n, Kt⟫_ℝ - ⟪n', t⟫_ℝ + ⟪n, f⟫_ℝ) / ⟪n, n⟫_ℝ |
| 36 | |
| 37 | theorem tangentProj_normal {n : E} (hn : n ≠ 0) (f : E) : |
| 38 | ⟪n, tangentProj n f⟫_ℝ = 0 := by |
| 39 | have hn2 : ⟪n, n⟫_ℝ ≠ 0 := inner_self_ne_zero.mpr hn |
| 40 | simp only [tangentProj, inner_sub_right, inner_smul_right] |
| 41 | rw [div_mul_cancel₀ _ hn2, sub_self] |
| 42 | |
| 43 | theorem tangentProj_of_tangent (n f : E) (hf : ⟪n, f⟫_ℝ = 0) : |
| 44 | tangentProj n f = f := by |
| 45 | simp [tangentProj, hf] |
| 46 | |
| 47 | theorem tangentProj_idempotent {n : E} (hn : n ≠ 0) (f : E) : |
| 48 | tangentProj n (tangentProj n f) = tangentProj n f := |
| 49 | tangentProj_of_tangent n _ (tangentProj_normal hn f) |
| 50 | |
| 51 | /-- The full normal identity includes the damping of an existing tangency defect. -/ |
| 52 | theorem normal_projectedRhs {n : E} (hn : n ≠ 0) (n' t Kt f : E) (δ : ℝ) : |
| 53 | ⟪n, projectedRhs n n' t Kt f δ⟫_ℝ = -⟪n', t⟫_ℝ - δ * ⟪n, t⟫_ℝ := by |
| 54 | have hn2 : ⟪n, n⟫_ℝ ≠ 0 := inner_self_ne_zero.mpr hn |
| 55 | simp only [projectedRhs, inner_sub_right, inner_add_right, inner_neg_right, |
| 56 | inner_smul_right, tangentProj_normal hn, div_mul_cancel₀ _ hn2] |
| 57 | ring |
| 58 | |
| 59 | /-- In particular the projected vector field has the normal derivative required by tangency. -/ |
| 60 | theorem normal_projectedRhs_of_tangent {n : E} (hn : n ≠ 0) |
| 61 | (n' t Kt f : E) (δ : ℝ) (ht : ⟪n, t⟫_ℝ = 0) : |
| 62 | ⟪n, projectedRhs n n' t Kt f δ⟫_ℝ = -⟪n', t⟫_ℝ := by |
| 63 | rw [normal_projectedRhs hn, ht] |
| 64 | ring |
| 65 | |
| 66 | /-- Rearranging the projected equation leaves exactly this normal vector. -/ |
| 67 | theorem projected_balance (n n' t Kt f : E) (δ : ℝ) : |
| 68 | projectedRhs n n' t Kt f δ + Kt + δ • t + f = |
| 69 | pressureCoefficient n n' t Kt f • n := by |
| 70 | unfold projectedRhs tangentProj pressureCoefficient |
| 71 | module |
| 72 | |
| 73 | /-- A pressure force with the opposite normal coefficient cancels the residual exactly. -/ |
| 74 | theorem pressure_cancellation (n n' t Kt f : E) (δ : ℝ) : |
| 75 | projectedRhs n n' t Kt f δ + Kt + δ • t - |
| 76 | pressureCoefficient n n' t Kt f • n = -f := by |
| 77 | have h := projected_balance n n' t Kt f δ |
| 78 | rw [← h] |
| 79 | abel |
| 80 | |
| 81 | /-- Actual differentiation of tangency gives the normal derivative in Appendix A.3. -/ |
| 82 | theorem differentiated_tangency {n t : ℝ → E} {n' t' : E} {x : ℝ} |
| 83 | (hn : HasDerivAt n n' x) (ht : HasDerivAt t t' x) |
| 84 | (htangent : ∀ y, ⟪n y, t y⟫_ℝ = 0) : |
| 85 | ⟪n x, t'⟫_ℝ = -⟪n', t x⟫_ℝ := by |
| 86 | have hp := hn.inner ℝ ht |
| 87 | have heq : (fun y => ⟪n y, t y⟫_ℝ) = fun _ => (0 : ℝ) := funext htangent |
| 88 | rw [heq] at hp |
| 89 | have hz := hp.unique (hasDerivAt_const x (0 : ℝ)) |
| 90 | linarith |
| 91 | |
| 92 | /-- Along any differentiable solution of (27), the tangency defect solves `h' = -δ h`. -/ |
| 93 | theorem tangency_defect_derivative {n t : ℝ → E} {n' : E} {x : ℝ} |
| 94 | {Kt f : E} {δ : ℝ} (hn0 : n x ≠ 0) |
| 95 | (hn : HasDerivAt n n' x) |
| 96 | (ht : HasDerivAt t (projectedRhs (n x) n' (t x) Kt f δ) x) : |
| 97 | HasDerivAt (fun y => ⟪n y, t y⟫_ℝ) (-δ * ⟪n x, t x⟫_ℝ) x := by |
| 98 | convert! hn.inner ℝ ht using 1 |
| 99 | rw [normal_projectedRhs hn0] |
| 100 | ring |
| 101 | |
| 102 | /-- Integrating-factor proof of zero-data uniqueness for the scalar defect equation. |
| 103 | The primitive `D` is explicit, so no existence assumption is hidden in this statement. -/ |
| 104 | theorem scalar_defect_zero (h δ D : ℝ → ℝ) |
| 105 | (hD : ∀ x, HasDerivAt D (δ x) x) |
| 106 | (hh : ∀ x, HasDerivAt h (-δ x * h x) x) |
| 107 | (x₀ : ℝ) (hzero : h x₀ = 0) : ∀ x, h x = 0 := by |
| 108 | have hp : ∀ x, HasDerivAt (fun y => Real.exp (D y) * h y) 0 x := by |
| 109 | intro x |
| 110 | convert! (hD x).exp.mul (hh x) using 1 |
| 111 | ring |
| 112 | intro x |
| 113 | have heq := is_const_of_deriv_eq_zero (fun y => (hp y).differentiableAt) |
| 114 | (fun y => (hp y).deriv) x x₀ |
| 115 | have hz : Real.exp (D x) * h x = 0 := by |
| 116 | simpa only [hzero, mul_zero] using heq |
| 117 | exact (mul_eq_zero.mp hz).resolve_left (Real.exp_ne_zero _) |
| 118 | |
| 119 | /-- Initial tangency persists for a differentiable solution of the projected equation. |
| 120 | This version is global in slot time and assumes an explicit primitive of the damping. -/ |
| 121 | theorem tangency_preserved (n n' t Kt f : ℝ → E) (δ D : ℝ → ℝ) |
| 122 | (hn0 : ∀ x, n x ≠ 0) |
| 123 | (hn : ∀ x, HasDerivAt n (n' x) x) |
| 124 | (ht : ∀ x, HasDerivAt t (projectedRhs (n x) (n' x) (t x) (Kt x) (f x) (δ x)) x) |
| 125 | (hD : ∀ x, HasDerivAt D (δ x) x) |
| 126 | (x₀ : ℝ) (hzero : ⟪n x₀, t x₀⟫_ℝ = 0) : ∀ x, ⟪n x, t x⟫_ℝ = 0 := by |
| 127 | exact scalar_defect_zero (fun x => ⟪n x, t x⟫_ℝ) δ D hD |
| 128 | (fun x => tangency_defect_derivative (hn0 x) (hn x) (ht x)) x₀ hzero |
| 129 | |
| 130 | /-- Nonnegative viscosity gives a nonnegative scalar damping coefficient. -/ |
| 131 | theorem viscous_coefficient_nonneg (ε k j : ℝ) (n : E) (hε : 0 ≤ ε) : |
| 132 | 0 ≤ ε * k ^ 2 * j ^ 2 * ⟪n, n⟫_ℝ := by |
| 133 | exact mul_nonneg (mul_nonneg (mul_nonneg hε (sq_nonneg k)) (sq_nonneg j)) |
| 134 | (real_inner_self_nonneg) |
| 135 | |
| 136 | /-- The damping term has nonpositive contribution to the energy derivative. -/ |
| 137 | theorem damping_dissipative (δ : ℝ) (t : E) (hδ : 0 ≤ δ) : |
| 138 | ⟪t, -δ • t⟫_ℝ ≤ 0 := by |
| 139 | rw [inner_smul_right] |
| 140 | exact mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr hδ) real_inner_self_nonneg |
| 141 | |
| 142 | /-- With `c = k j' ≠ 0`, the manuscript's pressure is `i A / c`. |
| 143 | Multiplication by the Fourier gradient `i c` yields `-A`, fixing the sign. -/ |
| 144 | theorem complex_pressure_sign (A c : ℂ) (hc : c ≠ 0) : |
| 145 | (Complex.I * c) * (Complex.I * A / c) = -A := by |
| 146 | calc |
| 147 | (Complex.I * c) * (Complex.I * A / c) = |
| 148 | (Complex.I * Complex.I) * A * (c / c) := by ring |
| 149 | _ = -A := by rw [Complex.I_mul_I, div_self hc]; ring |
| 150 | |
| 151 | end |
| 152 | |
| 153 | end NavierStokes.TangentProjection |