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 | /- |
| 2 | Copyright 2026 The Formal Conjectures Authors. |
| 3 | |
| 4 | This file has been modified from its original form in the Formal Conjectures |
| 5 | project. |
| 6 | |
| 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | you may not use this file except in compliance with the License. |
| 9 | You may obtain a copy of the License at |
| 10 | |
| 11 | https://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | -/ |
| 19 | |
| 20 | import Mathlib |
| 21 | |
| 22 | /-! |
| 23 | # Independent definitions for the Navier–Stokes Comparator submission |
| 24 | |
| 25 | This is a copy of the definitions and helper lemmas in `NavierStokes.Comparator`, |
| 26 | without either challenge theorem or an import of the reference. The proof adapters |
| 27 | use this module so their import closure contains no reference placeholders. |
| 28 | Comparator checks these definitions against the independent reference at runtime. |
| 29 | |
| 30 | Source: |
| 31 | https://github.com/google-deepmind/formal-conjectures/blob/8bf45ed70d48b2b2a501de9c00b26bfa38c573ee/FormalConjectures/Millenium/NavierStokes.lean |
| 32 | -/ |
| 33 | |
| 34 | open ContDiff Set InnerProductSpace MeasureTheory |
| 35 | open scoped Laplacian |
| 36 | |
| 37 | namespace NavierStokes.Comparator |
| 38 | |
| 39 | -- Inlined notation from FormalConjecturesForMathlib.Geometry.Euclidean and Geometry.«3d». |
| 40 | local notation "ℝ^" n:65 => EuclideanSpace ℝ (Fin n) |
| 41 | local notation "ℝ³" => EuclideanSpace ℝ (Fin 3) |
| 42 | |
| 43 | variable {n : ℕ} |
| 44 | |
| 45 | /-- |
| 46 | The divergence $\nabla \cdot v$ of a vector field $v : \mathbb{R}^n \to \mathbb{R}^n$ |
| 47 | at a point $x$, computed as the trace of the Jacobian matrix. |
| 48 | |
| 49 | In coordinates, $\nabla \cdot v = \sum_i \partial v_i / \partial x_i$. |
| 50 | |
| 51 | This is available as the notation `∇⬝ v`. If `v` is not differentiable at `x`, then |
| 52 | `fderiv` is the zero map, so this definition has the corresponding junk value $0$. |
| 53 | -/ |
| 54 | noncomputable |
| 55 | def divergence (v : ℝ^n → ℝ^n) (x : ℝ^n) : ℝ := (fderiv ℝ v x).trace ℝ (ℝ^n) |
| 56 | |
| 57 | @[inherit_doc] |
| 58 | local notation "∇⬝" => divergence |
| 59 | |
| 60 | /-- The divergence of a vector field is $0$ at points where `fderiv` has its junk value. -/ |
| 61 | @[simp] |
| 62 | theorem divergence_of_not_differentiableAt {v : ℝ^n → ℝ^n} {x : ℝ^n} |
| 63 | (hv : ¬ DifferentiableAt ℝ v x) : ∇⬝ v x = 0 := by |
| 64 | simp [divergence, fderiv_zero_of_not_differentiableAt hv] |
| 65 | |
| 66 | /-- The divergence of the zero vector field is zero. -/ |
| 67 | @[simp] |
| 68 | theorem divergence_zero (x : ℝ^n) : ∇⬝ (0 : ℝ^n → ℝ^n) x = 0 := by |
| 69 | simp [divergence] |
| 70 | |
| 71 | /-- The divergence of a constant vector field is zero. -/ |
| 72 | @[simp] |
| 73 | theorem divergence_const (c : ℝ^n) (x : ℝ^n) : |
| 74 | ∇⬝ (fun _ : ℝ^n => c) x = 0 := by |
| 75 | simp [divergence] |
| 76 | |
| 77 | /-- Divergence is additive at points where both vector fields are differentiable. -/ |
| 78 | theorem divergence_add {v w : ℝ^n → ℝ^n} {x : ℝ^n} |
| 79 | (hv : DifferentiableAt ℝ v x) (hw : DifferentiableAt ℝ w x) : |
| 80 | ∇⬝ (fun y => v y + w y) x = ∇⬝ v x + ∇⬝ w x := by |
| 81 | rw [divergence, fderiv_fun_add hv hw] |
| 82 | exact map_add _ _ _ |
| 83 | |
| 84 | /-- Divergence commutes with scalar multiplication at differentiability points. -/ |
| 85 | theorem divergence_smul (c : ℝ) {v : ℝ^n → ℝ^n} {x : ℝ^n} |
| 86 | (hv : DifferentiableAt ℝ v x) : ∇⬝ (fun y => c • v y) x = c * ∇⬝ v x := by |
| 87 | rw [divergence, fderiv_fun_const_smul hv c] |
| 88 | simp [divergence] |
| 89 | |
| 90 | /-- |
| 91 | A function $f : \mathbb{R}^n \to \alpha$ is 1-periodic if it is periodic in each |
| 92 | coordinate with period $1$, i.e. $f(x + e_i) = f(x)$ for each unit vector $e_i$. |
| 93 | This captures functions on the $n$-torus $\mathbb{R}^n/\mathbb{Z}^n$. |
| 94 | -/ |
| 95 | def IsOnePeriodic {α : Sort*} (f : ℝ^n → α) : Prop := |
| 96 | ∀ x i, f (x + EuclideanSpace.single i 1) = f x |
| 97 | |
| 98 | /-- |
| 99 | Basic conditions on initial velocity field for the Navier-Stokes equations |
| 100 | in $n$-dimensional space. |
| 101 | |
| 102 | The initial velocity must be: |
| 103 | - Divergence-free (incompressibility condition: $\nabla \cdot u_0 = 0$) |
| 104 | - Smooth ($C^\infty$) |
| 105 | |
| 106 | These conditions apply regardless of spatial dimension. |
| 107 | -/ |
| 108 | structure InitialVelocityCondition (u₀ : ℝ^n → ℝ^n) : Prop where |
| 109 | /-- The initial velocity field is divergence-free (equation 2). |
| 110 | This is the incompressibility constraint for the fluid. -/ |
| 111 | div_free : ∀ x, ∇⬝ u₀ x = 0 |
| 112 | /-- The initial velocity field is smooth ($C^\infty$ in all variables). -/ |
| 113 | smooth : ContDiff ℝ ∞ u₀ |
| 114 | |
| 115 | /-- |
| 116 | Initial velocity conditions for the Navier-Stokes problem on all of $\mathbb{R}^n$. |
| 117 | |
| 118 | In addition to being smooth and divergence-free, the velocity must decay |
| 119 | faster than any polynomial at spatial infinity (condition 4 in Fefferman's paper). |
| 120 | |
| 121 | This condition ensures the velocity field has finite energy and reasonable |
| 122 | behavior as $\lVert x \rVert \to \infty$. |
| 123 | -/ |
| 124 | structure InitialVelocityConditionDecay (u₀ : ℝ^n → ℝ^n) : Prop extends |
| 125 | InitialVelocityCondition u₀ where |
| 126 | /-- All derivatives of u₀ decay faster than any polynomial (condition 4). |
| 127 | For any derivative order $m$ and any decay rate $K$, there exists a constant $C$ |
| 128 | such that $\lVert \partial^m u_0(x) \rVert \le C/(1+\lVert x \rVert)^K$. -/ |
| 129 | decay : ∀ m : ℕ, ∀ K : ℝ, ∃ C : ℝ, ∀ x, ‖iteratedFDeriv ℝ m u₀ x‖ ≤ C / (1 + ‖x‖) ^ K |
| 130 | |
| 131 | /-- |
| 132 | Initial velocity conditions for the periodic Navier-Stokes problem on |
| 133 | $\mathbb{R}^n/\mathbb{Z}^n$. |
| 134 | |
| 135 | The velocity must be smooth, divergence-free, and 1-periodic in each coordinate |
| 136 | (condition 8, part 1 in Fefferman's paper). |
| 137 | -/ |
| 138 | structure InitialVelocityConditionPeriodic (u₀ : ℝ^n → ℝ^n) : Prop extends |
| 139 | InitialVelocityCondition u₀ where |
| 140 | /-- The initial velocity is 1-periodic in each direction (condition 8, part 1). -/ |
| 141 | isOnePeriodic : IsOnePeriodic u₀ |
| 142 | |
| 143 | /-- |
| 144 | The basic smoothness condition on the external forcing term. |
| 145 | |
| 146 | The force $f(x,t)$ must be smooth ($C^\infty$) in both space and time variables |
| 147 | for $t \ge 0$. |
| 148 | -/ |
| 149 | structure ForceCondition (f : ℝ^n → ℝ → ℝ^n) : Prop where |
| 150 | /-- The force is smooth on $\mathbb{R}^n \times [0,\infty)$. -/ |
| 151 | smooth : ContDiffOn ℝ ∞ (↿f) (Set.univ ×ˢ Set.Ici 0) |
| 152 | |
| 153 | /-- |
| 154 | Force conditions for the Navier-Stokes problem on all of $\mathbb{R}^n$. |
| 155 | |
| 156 | The force must be smooth and decay faster than any polynomial |
| 157 | in both space and time (condition 5 in Fefferman's paper). |
| 158 | -/ |
| 159 | structure ForceConditionDecay (f : ℝ^n → ℝ → ℝ^n) : Prop extends ForceCondition f where |
| 160 | /-- All derivatives of f decay faster than any polynomial in space and time (condition 5). |
| 161 | For any derivative order $m$ and any decay rate $K$, there exists $C$ such that |
| 162 | $\lVert \partial^m_{x,t} f(x,t) \rVert \le C/(1+\lVert x \rVert+t)^K$ for |
| 163 | $t \ge 0$. -/ |
| 164 | decay : ∀ m : ℕ, ∀ K : ℝ, ∃ C : ℝ, ∀ x, ∀ t ≥ 0, |
| 165 | ‖iteratedFDerivWithin ℝ m (↿f) (Set.univ ×ˢ Set.Ici 0) (x, t)‖ ≤ C / (1 + ‖x‖ + t) ^ K |
| 166 | |
| 167 | /-- |
| 168 | Force conditions for the periodic Navier-Stokes problem on |
| 169 | $\mathbb{R}^n/\mathbb{Z}^n$. |
| 170 | |
| 171 | The force must be smooth, 1-periodic in space, and decay in time |
| 172 | (conditions 8, part 1 and 9 in Fefferman's paper). |
| 173 | -/ |
| 174 | structure ForceConditionPeriodic (f : ℝ^n → ℝ → ℝ^n) : Prop extends ForceCondition f where |
| 175 | /-- The force is 1-periodic in space for all times $t \ge 0$ (condition 8, part 1). -/ |
| 176 | isOnePeriodic : ∀ t ≥ 0, IsOnePeriodic (f · t) |
| 177 | /-- All derivatives of f decay faster than any polynomial in time (condition 9). -/ |
| 178 | decay : ∀ m : ℕ, ∀ K : ℝ, ∃ C : ℝ, ∀ x, ∀ t ≥ 0, |
| 179 | ‖iteratedFDerivWithin ℝ m (↿f) (Set.univ ×ˢ Set.Ici 0) (x, t)‖ ≤ C / (1 + t) ^ K |
| 180 | |
| 181 | /-- |
| 182 | A solution (v, p) to the Navier-Stokes equations in n-dimensional space |
| 183 | with viscosity $\nu$, initial velocity $u_0$, and external force $f$. |
| 184 | |
| 185 | This structure captures the core requirements for a solution: |
| 186 | 1. The velocity and pressure satisfy the Navier-Stokes PDE (equation 1) |
| 187 | 2. The velocity remains divergence-free for all time (equation 2) |
| 188 | 3. The initial condition is satisfied (equation 3) |
| 189 | 4. The solution is smooth ($C^\infty$) for all time $t \ge 0$ (equations 6, 11) |
| 190 | -/ |
| 191 | structure NavierStokesExistenceAndSmoothness |
| 192 | (nu : ℝ) (u₀ : ℝ^n → ℝ^n) (f : ℝ^n → ℝ → ℝ^n) |
| 193 | (v : ℝ^n → ℝ → ℝ^n) (p : ℝ^n → ℝ → ℝ) : Prop where |
| 194 | /-- The Navier-Stokes equation (equation 1): |
| 195 | $\partial v/\partial t + (v \cdot \nabla)v = \nu\Delta v - \nabla p + f$. -/ |
| 196 | navier_stokes : ∀ x, ∀ t ≥ 0, |
| 197 | derivWithin (v x ·) (Set.Ici 0) t + fderiv ℝ (v · t) x (v x t) = |
| 198 | nu • Δ (v · t) x - gradient (p · t) x + f x t |
| 199 | /-- Incompressibility constraint (equation 2): $\nabla \cdot v = 0$ for all |
| 200 | $x$ and $t \ge 0$. -/ |
| 201 | div_free : ∀ x, ∀ t ≥ 0, ∇⬝ (v · t) x = 0 |
| 202 | /-- Initial condition (equation 3): $v(x,0) = u_0(x)$ for all $x$. -/ |
| 203 | initial_condition : ∀ x, v x 0 = u₀ x |
| 204 | /-- The velocity field is smooth ($C^\infty$) on $\mathbb{R}^n \times [0,\infty)$ |
| 205 | (conditions 6, 11). -/ |
| 206 | velocity_smooth : ContDiffOn ℝ ∞ (↿v) (Set.univ ×ˢ Set.Ici 0) |
| 207 | /-- The pressure field is smooth ($C^\infty$) on $\mathbb{R}^n \times [0,\infty)$ |
| 208 | (conditions 6, 11). -/ |
| 209 | pressure_smooth : ContDiffOn ℝ ∞ (↿p) (Set.univ ×ˢ Set.Ici 0) |
| 210 | |
| 211 | /-- |
| 212 | A solution to the Navier-Stokes equations on all of $\mathbb{R}^n$ with appropriate |
| 213 | decay and energy bounds. |
| 214 | |
| 215 | In addition to the basic solution properties, we require: |
| 216 | - The velocity is in $L^2$ at each time $t \ge 0$ (finite kinetic energy) |
| 217 | - The total energy remains bounded for all time (condition 7) |
| 218 | -/ |
| 219 | structure NavierStokesExistenceAndSmoothnessRn |
| 220 | (nu : ℝ) (u₀ : ℝ^n → ℝ^n) (f : ℝ^n → ℝ → ℝ^n) |
| 221 | (v : ℝ^n → ℝ → ℝ^n) (p : ℝ^n → ℝ → ℝ) : Prop |
| 222 | extends NavierStokesExistenceAndSmoothness nu u₀ f v p where |
| 223 | /-- The velocity is square-integrable at each time $t \ge 0$ (condition 7). -/ |
| 224 | integrable : ∀ t ≥ 0, MemLp (‖v · t‖) 2 |
| 225 | /-- The kinetic energy $\int \lVert v(x,t) \rVert^2\,dx$ remains uniformly bounded |
| 226 | for all time (condition 7), where the integral is the Lebesgue integral. -/ |
| 227 | globally_bounded_energy : ∃ E, ∀ t ≥ 0, (∫ x : ℝ^n, ‖v x t‖ ^ 2) < E |
| 228 | |
| 229 | /-- |
| 230 | A solution to the Navier-Stokes equations on the $n$-torus $\mathbb{R}^n/\mathbb{Z}^n$. |
| 231 | |
| 232 | The velocity must be 1-periodic in each spatial direction for all times (condition 10). |
| 233 | The pressure is also required to be 1-periodic, following the errata appended to the |
| 234 | Clay problem statement. |
| 235 | -/ |
| 236 | structure NavierStokesExistenceAndSmoothnessPeriodic |
| 237 | (nu : ℝ) (u₀ : ℝ^n → ℝ^n) (f : ℝ^n → ℝ → ℝ^n) |
| 238 | (v : ℝ^n → ℝ → ℝ^n) (p : ℝ^n → ℝ → ℝ) : Prop |
| 239 | extends NavierStokesExistenceAndSmoothness nu u₀ f v p where |
| 240 | /-- The velocity is 1-periodic in space for all times $t \ge 0$ (condition 10). -/ |
| 241 | isOnePeriodic_velocity : ∀ t ≥ 0, IsOnePeriodic (v · t) |
| 242 | /-- The pressure is 1-periodic in space for all times $t \ge 0$ (Clay errata). -/ |
| 243 | isOnePeriodic_pressure : ∀ t ≥ 0, IsOnePeriodic (p · t) |
| 244 | |
| 245 | end NavierStokes.Comparator |