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 Euler.GraphVelocityTrace |
| 2 | import Euler.SmoothTimeFieldPrecomp |
| 3 | import Euler.SmoothTimeFieldLinear |
| 4 | import Euler.SmoothFlowVolume |
| 5 | import Euler.SmoothFlowJets |
| 6 | import Euler.SmoothFlowTimeGevrey |
| 7 | import Euler.SmoothFlowAcceleration |
| 8 | |
| 9 | /-! The true physical graph flow and its first two time derivatives. |
| 10 | The change of labels is an actual ODE conjugacy, and the resulting |
| 11 | three-dimensional flow preserves ordinary Lebesgue volume. -/ |
| 12 | |
| 13 | /-! ## From `Euler/SmoothScaledFlow.lean` |
| 14 | |
| 15 | The text of `Euler/SmoothScaledFlow.lean`, folded into this file, which was its only importer. -/ |
| 16 | |
| 17 | section |
| 18 | |
| 19 | /-! A physical label dilation of a smooth velocity has the conjugate |
| 20 | actual flow. Displacement, material velocity and material acceleration |
| 21 | are the literal dilations of the corresponding original fields. -/ |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | namespace EulerSmoothBanachFlow |
| 26 | |
| 27 | open Set ContinuousLinearMap MeasureTheory EulerSmoothFlowGevrey |
| 28 | open scoped ContDiff |
| 29 | |
| 30 | variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 31 | (T : ℝ) (hT : 0 ≤ T) (A : SmoothTimeField (Icc (0 : ℝ) T) E E) (ell : ℝ) |
| 32 | |
| 33 | def scaledCoefficient : SmoothTimeField (Icc (0 : ℝ) T) E E := |
| 34 | (A.precompLinear (ell⁻¹ • ContinuousLinearMap.id ℝ E)).map (ell • ContinuousLinearMap.id ℝ E) |
| 35 | |
| 36 | @[simp] theorem scaledCoefficient_apply (t : Icc (0 : ℝ) T) (x : E) : |
| 37 | (scaledCoefficient T A ell).field t x = ell • A.field t (ell⁻¹ • x) := rfl |
| 38 | |
| 39 | theorem scaledCoefficient_timeDerivative |
| 40 | (A₁ : SmoothTimeField (Icc (0 : ℝ) T) E E) |
| 41 | (htime : SmoothTimeField.TimeDerivative T hT A A₁) : |
| 42 | SmoothTimeField.TimeDerivative T hT (scaledCoefficient T A ell) (scaledCoefficient T A₁ ell) := |
| 43 | (htime.precompLinear (ell⁻¹ • ContinuousLinearMap.id ℝ E)).map (ell • ContinuousLinearMap.id ℝ E) |
| 44 | |
| 45 | variable [FiniteDimensional ℝ E] |
| 46 | |
| 47 | theorem scaled_flow_eq (hell : ell ≠ 0) (s t : ℝ) (x : E) : |
| 48 | (flowData T hT (scaledCoefficient T A ell)).flow s t x = |
| 49 | ell • (flowData T hT A).flow s t (ell⁻¹ • x) := by |
| 50 | let V := flowData T hT (scaledCoefficient T A ell) |
| 51 | have hd (r : ℝ) : HasDerivAt (fun q => ell • (flowData T hT A).flow s q (ell⁻¹ • x)) |
| 52 | (V.velocity r (ell • (flowData T hT A).flow s r (ell⁻¹ • x))) r := by |
| 53 | have h := ((flowData T hT A).flow_hasDerivAt s r (ell⁻¹ • x)).const_smul ell |
| 54 | convert h using 1 |
| 55 | · rfl |
| 56 | · change ell • A.field (projIcc 0 T hT r) |
| 57 | (ell⁻¹ • (ell • (flowData T hT A).flow s r (ell⁻¹ • x))) = _ |
| 58 | simp only [smul_smul,inv_mul_cancel₀ hell,one_smul] |
| 59 | rfl |
| 60 | have hi : ell • (flowData T hT A).flow s s (ell⁻¹ • x) = x := by |
| 61 | simp only [EulerBoundedLipschitzFlow.Data.flow_initial,smul_smul,mul_inv_cancel₀ hell,one_smul] |
| 62 | exact (congrFun (V.flow_unique s x _ hd hi) t).symm |
| 63 | |
| 64 | theorem scaled_displacement_eq (hell : ell ≠ 0) (t : Icc (0 : ℝ) T) (x : E) : |
| 65 | displacement T hT (scaledCoefficient T A ell) t x = |
| 66 | ell • displacement T hT A t (ell⁻¹ • x) := by |
| 67 | rw [displacement_eq,displacement_eq] |
| 68 | change (flowData T hT (scaledCoefficient T A ell)).flow 0 t x-x = _ |
| 69 | rw [scaled_flow_eq T hT A ell hell,smul_sub,smul_smul,mul_inv_cancel₀ hell,one_smul] |
| 70 | rfl |
| 71 | |
| 72 | theorem scaled_materialVelocity_eq (hell : ell ≠ 0) (t : Icc (0 : ℝ) T) (x : E) : |
| 73 | materialVelocity T hT (scaledCoefficient T A ell) t x = |
| 74 | ell • materialVelocity T hT A t (ell⁻¹ • x) := by |
| 75 | unfold materialVelocity |
| 76 | rw [scaledCoefficient_apply] |
| 77 | change ell • A.field t (ell⁻¹ • (flowData T hT (scaledCoefficient T A ell)).flow 0 t x) = _ |
| 78 | rw [scaled_flow_eq T hT A ell hell,smul_smul,inv_mul_cancel₀ hell,one_smul] |
| 79 | rfl |
| 80 | |
| 81 | omit [FiniteDimensional ℝ E] in |
| 82 | theorem scaledCoefficient_fderiv (hell : ell ≠ 0) (t : Icc (0 : ℝ) T) (x : E) : |
| 83 | fderiv ℝ ((scaledCoefficient T A ell).field t : E → E) x = |
| 84 | fderiv ℝ (A.field t : E → E) (ell⁻¹ • x) := by |
| 85 | have h := ((((A.smooth t).differentiable (by simp) (ell⁻¹ • x)).hasFDerivAt).comp x |
| 86 | ((ell⁻¹ • ContinuousLinearMap.id ℝ E).hasFDerivAt)).const_smul ell |
| 87 | change HasFDerivAt (fun y => ell • A.field t (ell⁻¹ • y)) _ x at h |
| 88 | change fderiv ℝ (fun y => ell • A.field t (ell⁻¹ • y)) x = _ |
| 89 | rw [h.fderiv] |
| 90 | ext v |
| 91 | simp only [FunLike.coe_smul,Pi.smul_apply,comp_apply,id_apply,map_smul,smul_smul,mul_inv_cancel₀ hell,one_smul] |
| 92 | |
| 93 | omit [FiniteDimensional ℝ E] in |
| 94 | theorem scaledCoefficient_trace_zero (hell : ell ≠ 0) |
| 95 | (hdiv : ∀ t x, LinearMap.trace ℝ E (fderiv ℝ (A.field t : E → E) x).toLinearMap=0) |
| 96 | (t : Icc (0 : ℝ) T) (x : E) : |
| 97 | LinearMap.trace ℝ E (fderiv ℝ ((scaledCoefficient T A ell).field t : E → E) x).toLinearMap=0 := by |
| 98 | rw [scaledCoefficient_fderiv T A ell hell] |
| 99 | exact hdiv t _ |
| 100 | |
| 101 | end EulerSmoothBanachFlow |
| 102 | end |
| 103 | |
| 104 | end |
| 105 | |
| 106 | /-! ## From `Euler/SmoothGraphFlow.lean` |
| 107 | |
| 108 | The text of `Euler/SmoothGraphFlow.lean`, folded into this file, which was its only importer. -/ |
| 109 | |
| 110 | section |
| 111 | |
| 112 | /-! The graph restriction of the actual lifted flow is the actual flow |
| 113 | of a smooth three-dimensional velocity. It preserves ordinary spatial |
| 114 | volume when the original lifted velocity has zero trace. -/ |
| 115 | |
| 116 | noncomputable section |
| 117 | |
| 118 | namespace EulerGraphInvariantFlow |
| 119 | |
| 120 | open Set MeasureTheory ContinuousLinearMap EulerLiftedGradientSpace EulerSmoothBanachFlow |
| 121 | open scoped ContDiff |
| 122 | |
| 123 | variable (k : ℝ) (m : Vector3) (T : ℝ) (hT : 0 ≤ T) |
| 124 | (A : SmoothTimeField (Icc (0 : ℝ) T) LiftTangent LiftTangent) |
| 125 | |
| 126 | def graphCoefficient : SmoothTimeField (Icc (0 : ℝ) T) Vector3 Vector3 := |
| 127 | (A.precompLinear (graphLinear k m)).map (fst ℝ Vector3 ℝ) |
| 128 | |
| 129 | @[simp] theorem graphCoefficient_apply (t : Icc (0 : ℝ) T) (x : Vector3) : |
| 130 | (graphCoefficient k m T A).field t x = (A.field t (graphLinear k m x)).1 := rfl |
| 131 | |
| 132 | theorem graphCoefficient_timeDerivative |
| 133 | (A₁ : SmoothTimeField (Icc (0 : ℝ) T) LiftTangent LiftTangent) |
| 134 | (htime : SmoothTimeField.TimeDerivative T hT A A₁) : |
| 135 | SmoothTimeField.TimeDerivative T hT (graphCoefficient k m T A) (graphCoefficient k m T A₁) := |
| 136 | (htime.precompLinear (graphLinear k m)).map (fst ℝ Vector3 ℝ) |
| 137 | |
| 138 | variable (hgraph : ∀ t z, graphConstraint k m (A.field t z)=0) |
| 139 | |
| 140 | include hgraph in |
| 141 | theorem flowData_tangent (r : ℝ) (z : LiftTangent) : |
| 142 | graphConstraint k m ((flowData T hT A).velocity r z)=0 := |
| 143 | hgraph (projIcc 0 T hT r) z |
| 144 | |
| 145 | include hgraph in |
| 146 | theorem graph_flow_eq (s t : ℝ) (x : Vector3) : |
| 147 | graphFlow k m (flowData T hT A) s t x = |
| 148 | (flowData T hT (graphCoefficient k m T A)).flow s t x := by |
| 149 | let V := flowData T hT (graphCoefficient k m T A) |
| 150 | have hd (r : ℝ) : HasDerivAt (fun q => graphFlow k m (flowData T hT A) s q x) |
| 151 | (V.velocity r (graphFlow k m (flowData T hT A) s r x)) r := |
| 152 | graphFlow_hasDerivAt k m (flowData T hT A) (flowData_tangent k m T hT A hgraph) s r x |
| 153 | exact congrFun (V.flow_unique s x (fun q => graphFlow k m (flowData T hT A) s q x) |
| 154 | hd (graphFlow_initial k m (flowData T hT A) s x)) t |
| 155 | |
| 156 | include hgraph in |
| 157 | theorem graph_flow_cover (s t : ℝ) (x : Vector3) : |
| 158 | (flowData T hT A).flow s t (graphLinear k m x) = |
| 159 | graphLinear k m ((flowData T hT (graphCoefficient k m T A)).flow s t x) := by |
| 160 | rw [graphFlow_invariant k m (flowData T hT A) (flowData_tangent k m T hT A hgraph), |
| 161 | graph_flow_eq k m T hT A hgraph] |
| 162 | |
| 163 | include hgraph in |
| 164 | theorem graph_displacement_eq (t : Icc (0 : ℝ) T) (x : Vector3) : |
| 165 | (displacement T hT A t (graphLinear k m x)).1 = |
| 166 | displacement T hT (graphCoefficient k m T A) t x := by |
| 167 | rw [displacement_eq,displacement_eq] |
| 168 | change ((flowData T hT A).flow 0 t (graphLinear k m x)-graphLinear k m x).1 = _ |
| 169 | rw [graph_flow_cover k m T hT A hgraph] |
| 170 | rfl |
| 171 | |
| 172 | variable (hdiv : ∀ t z, |
| 173 | LinearMap.trace ℝ LiftTangent (fderiv ℝ (A.field t : LiftTangent → LiftTangent) z).toLinearMap=0) |
| 174 | |
| 175 | include hgraph hdiv in |
| 176 | theorem graphCoefficient_trace_zero (t : Icc (0 : ℝ) T) (x : Vector3) : |
| 177 | LinearMap.trace ℝ Vector3 |
| 178 | (fderiv ℝ ((graphCoefficient k m T A).field t : Vector3 → Vector3) x).toLinearMap=0 := |
| 179 | graphVelocity_trace_zero k m (A.field t) ((A.smooth t).differentiable (by simp)) |
| 180 | (hgraph t) (hdiv t) x |
| 181 | |
| 182 | end EulerGraphInvariantFlow |
| 183 | end |
| 184 | |
| 185 | end |
| 186 | |
| 187 | noncomputable section |
| 188 | |
| 189 | namespace EulerGraphInvariantFlow |
| 190 | |
| 191 | open Set MeasureTheory ContinuousLinearMap EulerLiftedGradientSpace EulerSmoothBanachFlow |
| 192 | EulerSmoothFlowGevrey |
| 193 | open scoped ContDiff |
| 194 | |
| 195 | variable (k : ℝ) (m : Vector3) (T : ℝ) (hT : 0 ≤ T) |
| 196 | (A A₁ : SmoothTimeField (Icc (0 : ℝ) T) LiftTangent LiftTangent) |
| 197 | (hgraph : ∀ t z, graphConstraint k m (A.field t z)=0) |
| 198 | |
| 199 | include hgraph in |
| 200 | theorem graph_materialVelocity_eq (t : Icc (0 : ℝ) T) (x : Vector3) : |
| 201 | materialVelocity T hT (graphCoefficient k m T A) t x = |
| 202 | (materialVelocity T hT A t (graphLinear k m x)).1 := by |
| 203 | change (A.field t (graphLinear k m |
| 204 | ((flowData T hT (graphCoefficient k m T A)).flow 0 t x))).1 = _ |
| 205 | rw [← graph_flow_cover k m T hT A hgraph] |
| 206 | rfl |
| 207 | |
| 208 | def physicalCoefficient (ell : ℝ) : SmoothTimeField (Icc (0 : ℝ) T) Vector3 Vector3 := |
| 209 | scaledCoefficient T (graphCoefficient k m T A) ell |
| 210 | |
| 211 | @[simp] theorem physicalCoefficient_apply (ell : ℝ) (t : Icc (0 : ℝ) T) (x : Vector3) : |
| 212 | (physicalCoefficient k m T A ell).field t x = ell • (A.field t (graphLinear k m (ell⁻¹ • x))).1 := rfl |
| 213 | |
| 214 | theorem physicalCoefficient_timeDerivative (ell : ℝ) |
| 215 | (htime : SmoothTimeField.TimeDerivative T hT A A₁) : |
| 216 | SmoothTimeField.TimeDerivative T hT (physicalCoefficient k m T A ell) |
| 217 | (physicalCoefficient k m T A₁ ell) := |
| 218 | scaledCoefficient_timeDerivative T hT (graphCoefficient k m T A) ell |
| 219 | (graphCoefficient k m T A₁) (graphCoefficient_timeDerivative k m T hT A A₁ htime) |
| 220 | |
| 221 | include hgraph in |
| 222 | theorem physical_displacement_eq (ell : ℝ) (hell : ell ≠ 0) |
| 223 | (t : Icc (0 : ℝ) T) (x : Vector3) : |
| 224 | displacement T hT (physicalCoefficient k m T A ell) t x = |
| 225 | ell • (displacement T hT A t (graphLinear k m (ell⁻¹ • x))).1 := by |
| 226 | rw [physicalCoefficient,scaled_displacement_eq T hT (graphCoefficient k m T A) ell hell, |
| 227 | ← graph_displacement_eq k m T hT A hgraph] |
| 228 | |
| 229 | include hgraph in |
| 230 | theorem physical_materialVelocity_eq (ell : ℝ) (hell : ell ≠ 0) |
| 231 | (t : Icc (0 : ℝ) T) (x : Vector3) : |
| 232 | materialVelocity T hT (physicalCoefficient k m T A ell) t x = |
| 233 | ell • (materialVelocity T hT A t (graphLinear k m (ell⁻¹ • x))).1 := by |
| 234 | rw [physicalCoefficient,scaled_materialVelocity_eq T hT (graphCoefficient k m T A) ell hell, |
| 235 | graph_materialVelocity_eq k m T hT A hgraph] |
| 236 | |
| 237 | variable (hdiv : ∀ t z, |
| 238 | LinearMap.trace ℝ LiftTangent (fderiv ℝ (A.field t : LiftTangent → LiftTangent) z).toLinearMap=0) |
| 239 | |
| 240 | include hgraph hdiv in |
| 241 | theorem physicalCoefficient_trace_zero (ell : ℝ) (hell : ell ≠ 0) |
| 242 | (t : Icc (0 : ℝ) T) (x : Vector3) : |
| 243 | LinearMap.trace ℝ Vector3 |
| 244 | (fderiv ℝ ((physicalCoefficient k m T A ell).field t : Vector3 → Vector3) x).toLinearMap=0 := |
| 245 | scaledCoefficient_trace_zero T (graphCoefficient k m T A) ell hell |
| 246 | (graphCoefficient_trace_zero k m T A hgraph hdiv) t x |
| 247 | |
| 248 | include hgraph hdiv in |
| 249 | theorem physical_forward_measurePreserving (ell : ℝ) (hell : ell ≠ 0) (t : Icc (0 : ℝ) T) : |
| 250 | MeasurePreserving ((flowData T hT (physicalCoefficient k m T A ell)).forward t) volume volume := by |
| 251 | exact forward_measurePreserving T hT (physicalCoefficient k m T A ell) |
| 252 | (physicalCoefficient_trace_zero k m T A hgraph hdiv ell hell) volume t |
| 253 | |
| 254 | end EulerGraphInvariantFlow |