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.PacketPhysicalEulerTransform |
| 2 | |
| 3 | /-! Euler's spatial/amplitude rescaling, proved for the actual first |
| 4 | derivatives and scalar pressure. Time is unchanged. -/ |
| 5 | |
| 6 | noncomputable section |
| 7 | |
| 8 | namespace EulerSpatialRescaling |
| 9 | |
| 10 | open ContinuousLinearMap InnerProductSpace EulerLagrangian |
| 11 | |
| 12 | variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] |
| 13 | |
| 14 | def coordinates (ell : ℝ) : (ℝ × E) →L[ℝ] (ℝ × E) := |
| 15 | (fst ℝ ℝ E).prod ((ell⁻¹ • ContinuousLinearMap.id ℝ E).comp (snd ℝ ℝ E)) |
| 16 | |
| 17 | omit [CompleteSpace E] in |
| 18 | @[simp] theorem coordinates_apply (ell : ℝ) (q : ℝ × E) : |
| 19 | coordinates ell q=(q.1,ell⁻¹ • q.2) := rfl |
| 20 | |
| 21 | def velocity (ell : ℝ) (u : ℝ × E → E) (q : ℝ × E) : E := |
| 22 | ell • u (coordinates ell q) |
| 23 | |
| 24 | def pressure (ell : ℝ) (p : ℝ × E → ℝ) (q : ℝ × E) : ℝ := |
| 25 | ell^2*p (coordinates ell q) |
| 26 | |
| 27 | omit [CompleteSpace E] in |
| 28 | theorem velocity_hasFDerivAt (ell : ℝ) (u : ℝ × E → E) (q : ℝ × E) |
| 29 | (hu : DifferentiableAt ℝ u (coordinates ell q)) : |
| 30 | HasFDerivAt (velocity ell u) (ell • (fderiv ℝ u (coordinates ell q)).comp (coordinates ell)) q := by |
| 31 | have hc : HasFDerivAt (coordinates ell : ℝ × E → ℝ × E) (coordinates ell) q := |
| 32 | (coordinates (E := E) ell).hasFDerivAt |
| 33 | exact (hu.hasFDerivAt.comp q hc).const_smul ell |
| 34 | |
| 35 | theorem pressure_gradient (ell : ℝ) (hell : ell ≠ 0) (p : ℝ × E → ℝ) (q : ℝ × E) |
| 36 | (hp : DifferentiableAt ℝ (fun y => p (q.1,y)) (ell⁻¹ • q.2)) : |
| 37 | gradient (fun y => pressure ell p (q.1,y)) q.2 = |
| 38 | ell • gradient (fun y => p (q.1,y)) (ell⁻¹ • q.2) := by |
| 39 | have hs := (hp.hasFDerivAt.comp q.2 (ell⁻¹ • ContinuousLinearMap.id ℝ E).hasFDerivAt).const_smul (ell^2) |
| 40 | change HasFDerivAt (fun y => ell^2 • p (q.1,ell⁻¹ • y)) _ q.2 at hs |
| 41 | apply ext_inner_right ℝ |
| 42 | intro v |
| 43 | change inner ℝ (gradient (fun y => ell^2 • p (q.1,ell⁻¹ • y)) q.2) v = _ |
| 44 | rw [inner_gradient_left,real_inner_smul_left,inner_gradient_left,hs.fderiv] |
| 45 | simp only [smul_apply,comp_apply,id_apply,map_smul,smul_eq_mul] |
| 46 | field_simp [hell] |
| 47 | |
| 48 | theorem momentumResidual_eq (ell : ℝ) (hell : ell ≠ 0) |
| 49 | (u : ℝ × E → E) (p : ℝ × E → ℝ) (q : ℝ × E) |
| 50 | (hu : DifferentiableAt ℝ u (coordinates ell q)) |
| 51 | (hp : DifferentiableAt ℝ (fun y => p (q.1,y)) (ell⁻¹ • q.2)) : |
| 52 | momentumResidual (velocity ell u) (pressure ell p) q = |
| 53 | ell • momentumResidual u p (coordinates ell q) := by |
| 54 | unfold momentumResidual |
| 55 | rw [(velocity_hasFDerivAt ell u q hu).fderiv,pressure_gradient ell hell p q hp] |
| 56 | simp only [smul_apply,comp_apply] |
| 57 | have hd : coordinates ell ((1 : ℝ),velocity ell u q) = (1,u (coordinates ell q)) := by |
| 58 | simp only [coordinates_apply,velocity,smul_smul,inv_mul_cancel₀ hell,one_smul] |
| 59 | rw [hd,← smul_add] |
| 60 | rfl |
| 61 | |
| 62 | theorem momentumResidual_zero (ell : ℝ) (hell : ell ≠ 0) |
| 63 | (u : ℝ × E → E) (p : ℝ × E → ℝ) (q : ℝ × E) |
| 64 | (hu : DifferentiableAt ℝ u (coordinates ell q)) |
| 65 | (hp : DifferentiableAt ℝ (fun y => p (q.1,y)) (ell⁻¹ • q.2)) |
| 66 | (hEuler : momentumResidual u p (coordinates ell q)=0) : |
| 67 | momentumResidual (velocity ell u) (pressure ell p) q=0 := by |
| 68 | rw [momentumResidual_eq ell hell u p q hu hp,hEuler,smul_zero] |
| 69 | |
| 70 | omit [CompleteSpace E] in |
| 71 | theorem spatial_derivative (ell : ℝ) (hell : ell ≠ 0) |
| 72 | (u : ℝ × E → E) (t : ℝ) (x : E) |
| 73 | (hu : DifferentiableAt ℝ (fun y => u (t,y)) (ell⁻¹ • x)) : |
| 74 | fderiv ℝ (fun y => velocity ell u (t,y)) x = |
| 75 | fderiv ℝ (fun y => u (t,y)) (ell⁻¹ • x) := by |
| 76 | have hd := (hu.hasFDerivAt.comp x (ell⁻¹ • ContinuousLinearMap.id ℝ E).hasFDerivAt).const_smul ell |
| 77 | change HasFDerivAt (fun y => velocity ell u (t,y)) _ x at hd |
| 78 | rw [hd.fderiv] |
| 79 | apply ContinuousLinearMap.ext |
| 80 | intro v |
| 81 | simp only [smul_apply,comp_apply,id_apply,map_smul,smul_smul,mul_inv_cancel₀ hell,one_smul] |
| 82 | |
| 83 | end EulerSpatialRescaling |