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.ProblemStatement |
| 2 | import Mathlib.Analysis.Calculus.FDeriv.Add |
| 3 | import Mathlib.Analysis.Calculus.FDeriv.Mul |
| 4 | import Mathlib.Tactic.Abel |
| 5 | |
| 6 | /-! |
| 7 | # Calculus of the physical Navier--Stokes residual |
| 8 | |
| 9 | These identities concern the ordinary Frechet derivatives used by the actual |
| 10 | PDE target in `ProblemStatement`. The velocity hypotheses give two continuous |
| 11 | spatial derivatives on the time slice and a differentiable time slice at the |
| 12 | point in question. No abstract differential operators are assumed linear. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | namespace NavierStokes.ResidualCalculus |
| 18 | |
| 19 | open ProblemStatement Set |
| 20 | open scoped BigOperators ContDiff |
| 21 | |
| 22 | /-- Time differentiation is additive for differentiable velocity time slices. -/ |
| 23 | theorem temporalDerivative_add |
| 24 | (u e : VelocityField) (t : ℝ) (x : Space) |
| 25 | (hu : DifferentiableAt ℝ (fun s : ℝ => u (s, x)) t) |
| 26 | (he : DifferentiableAt ℝ (fun s : ℝ => e (s, x)) t) : |
| 27 | temporalDerivative (fun z => u z + e z) t x = |
| 28 | temporalDerivative u t x + temporalDerivative e t x := by |
| 29 | unfold temporalDerivative |
| 30 | rw [fderiv_fun_add hu he] |
| 31 | rfl |
| 32 | |
| 33 | /-- The spatial derivative is additive under actual spatial differentiability. -/ |
| 34 | theorem spatialDerivative_add |
| 35 | (u e : VelocityField) (t : ℝ) (x : Space) |
| 36 | (hu : DifferentiableAt ℝ (fun y : Space => u (t, y)) x) |
| 37 | (he : DifferentiableAt ℝ (fun y : Space => e (t, y)) x) : |
| 38 | spatialDerivative (fun z => u z + e z) t x = |
| 39 | spatialDerivative u t x + spatialDerivative e t x := fderiv_fun_add hu he |
| 40 | |
| 41 | /-- Pressure-gradient additivity follows from derivative additivity and the |
| 42 | fixed Euclidean coordinate basis in the PDE target. -/ |
| 43 | theorem pressureGradient_add |
| 44 | (p q : PressureField) (t : ℝ) (x : Space) |
| 45 | (hp : DifferentiableAt ℝ (fun y : Space => p (t, y)) x) |
| 46 | (hq : DifferentiableAt ℝ (fun y : Space => q (t, y)) x) : |
| 47 | pressureGradient (fun z => p z + q z) t x = |
| 48 | pressureGradient p t x + pressureGradient q t x := by |
| 49 | unfold pressureGradient |
| 50 | rw [fderiv_fun_add hp hq] |
| 51 | simp only [add_apply, add_smul, Finset.sum_add_distrib] |
| 52 | |
| 53 | /-- The quadratic advection term produces exactly its two cross terms and the |
| 54 | self-advection of the perturbation. -/ |
| 55 | theorem advection_add |
| 56 | (u e : VelocityField) (t : ℝ) (x : Space) |
| 57 | (hu : DifferentiableAt ℝ (fun y : Space => u (t, y)) x) |
| 58 | (he : DifferentiableAt ℝ (fun y : Space => e (t, y)) x) : |
| 59 | advection (fun z => u z + e z) t x = |
| 60 | advection u t x + spatialDerivative u t x (e (t, x)) + |
| 61 | spatialDerivative e t x (u (t, x)) + advection e t x := by |
| 62 | unfold advection |
| 63 | rw [spatialDerivative_add u e t x hu he] |
| 64 | simp only [add_apply, map_add] |
| 65 | abel |
| 66 | |
| 67 | /-- A constant spatial scalar factors out of the actual spatial derivative. -/ |
| 68 | theorem spatialDerivative_const_smul |
| 69 | (u : VelocityField) (t : ℝ) (x : Space) (c : ℝ) |
| 70 | (hu : DifferentiableAt ℝ (fun y : Space => u (t, y)) x) : |
| 71 | spatialDerivative (fun z => c • u z) t x = c • spatialDerivative u t x := fderiv_fun_const_smul hu c |
| 72 | |
| 73 | /-- Constant-scalar linearity of divergence, using coordinate evaluation. -/ |
| 74 | theorem spatialDivergence_const_smul |
| 75 | (u : VelocityField) (t : ℝ) (x : Space) (c : ℝ) |
| 76 | (hu : DifferentiableAt ℝ (fun y : Space => u (t, y)) x) : |
| 77 | spatialDivergence (fun z => c • u z) t x = c * spatialDivergence u t x := by |
| 78 | unfold spatialDivergence |
| 79 | rw [spatialDerivative_const_smul u t x c hu] |
| 80 | simp only [smul_apply, PiLp.smul_apply, smul_eq_mul, Finset.mul_sum] |
| 81 | |
| 82 | end NavierStokes.ResidualCalculus |