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.PacketMovingRay |
| 2 | |
| 3 | /-! The actual projected primary-velocity ODE in the normalized moving frame. -/ |
| 4 | |
| 5 | noncomputable section |
| 6 | |
| 7 | |
| 8 | namespace EulerPacketMovingFrame |
| 9 | |
| 10 | open EulerSmoothLimit EulerPacketNormalizedPrimary EulerPacketRay InnerProductSpace ContinuousLinearMap |
| 11 | |
| 12 | theorem frameSkew_antisymm (B : Fin 3 → Fin 3 → ℝ) (i j : Fin 3) : |
| 13 | frameSkew B j i = -frameSkew B i j := by |
| 14 | fin_cases i <;> fin_cases j <;> simp [frameSkew, Fin.ext_iff] |
| 15 | |
| 16 | theorem frameMatrix_adjoint (B : Space →L[ℝ] Space) (p q : Space) (i j : Fin 3) : |
| 17 | frameMatrix B.adjoint p q i j = frameMatrix B p q j i := by |
| 18 | unfold frameMatrix |
| 19 | rw [adjoint_inner_right, real_inner_comm (frame p q j) (B (frame p q i))] |
| 20 | |
| 21 | theorem frame_action (M : Space →L[ℝ] Space) (p q x : Space) |
| 22 | (hp : ⟪p,p⟫_ℝ = 1) (hq : ⟪q,q⟫_ℝ = 1) (hpq : ⟪p,q⟫_ℝ = 0) (i : Fin 3) : |
| 23 | (∑ j : Fin 3, frameMatrix M p q i j * ⟪frame p q j,x⟫_ℝ) = |
| 24 | ⟪frame p q i,M x⟫_ℝ := by |
| 25 | have h := frame_inner_expand p q hp hq hpq (M.adjoint (frame p q i)) x |
| 26 | have hm (j : Fin 3) : ⟪frame p q j,M.adjoint (frame p q i)⟫_ℝ = frameMatrix M p q i j := by |
| 27 | rw [adjoint_inner_right, real_inner_comm (frame p q i) (M (frame p q j))] |
| 28 | rfl |
| 29 | simp only [hm, adjoint_inner_left] at h |
| 30 | exact h |
| 31 | |
| 32 | theorem frame_norm_sq (p q x : Space) |
| 33 | (hp : ⟪p,p⟫_ℝ = 1) (hq : ⟪q,q⟫_ℝ = 1) (hpq : ⟪p,q⟫_ℝ = 0) : |
| 34 | (∑ j : Fin 3, ⟪frame p q j,x⟫_ℝ^2) = ‖x‖^2 := by |
| 35 | simpa only [pow_two, real_inner_self_eq_norm_sq] using frame_inner_expand p q hp hq hpq x x |
| 36 | |
| 37 | theorem frame_flux (M : Space →L[ℝ] Space) (p q r w : Space) |
| 38 | (hp : ⟪p,p⟫_ℝ = 1) (hq : ⟪q,q⟫_ℝ = 1) (hpq : ⟪p,q⟫_ℝ = 0) : |
| 39 | (∑ i : Fin 3, ⟪frame p q i,r⟫_ℝ * |
| 40 | (∑ j : Fin 3, frameMatrix M p q i j * ⟪frame p q j,w⟫_ℝ)) = ⟪r,M w⟫_ℝ := by |
| 41 | simp_rw [frame_action M p q w hp hq hpq] |
| 42 | exact frame_inner_expand p q hp hq hpq r (M w) |
| 43 | |
| 44 | theorem movingVelocityRate_identity (B M : Space →L[ℝ] Space) (p q w : Space) |
| 45 | (hp : ⟪p,p⟫_ℝ = 1) (hq : ⟪q,q⟫_ℝ = 1) (hpq : ⟪p,q⟫_ℝ = 0) (i : Fin 3) : |
| 46 | -⟪frame p q i,M w⟫_ℝ + ⟪frameRate B p q i,w⟫_ℝ = |
| 47 | -(∑ j : Fin 3, (frameMatrix M p q i j + frameSkew (frameMatrix B p q) i j) * |
| 48 | ⟪frame p q j,w⟫_ℝ) := by |
| 49 | have h := movingRayRate_identity B M.adjoint p q w hp hq hpq i |
| 50 | rw [adjoint_inner_left] at h |
| 51 | simpa only [frameMatrix_adjoint, frameSkew_antisymm (frameMatrix B p q) i, |
| 52 | sub_neg_eq_add] using h |
| 53 | |
| 54 | def movingVelocity (m v w : ℝ → Space) (t : ℝ) (i : Fin 3) : ℝ := |
| 55 | ⟪normalizedFrame m v t i,w t⟫_ℝ |
| 56 | |
| 57 | def movingFlux (M : Space →L[ℝ] Space) (m v r w : ℝ → Space) (t : ℝ) : ℝ := |
| 58 | ∑ i : Fin 3, movingRay m v r t i * |
| 59 | (∑ j : Fin 3, frameMatrix M (unit (m t)) (unit (v t)) i j * movingVelocity m v w t j) |
| 60 | |
| 61 | def movingDenominator (m v r : ℝ → Space) (t : ℝ) : ℝ := |
| 62 | ∑ j : Fin 3, (movingRay m v r t j)^2 |
| 63 | |
| 64 | theorem movingFlux_eq (M : Space →L[ℝ] Space) (m v r w : ℝ → Space) (t : ℝ) |
| 65 | (hm : m t ≠ 0) (hv : v t ≠ 0) (hmv : ⟪m t,v t⟫_ℝ = 0) : |
| 66 | movingFlux M m v r w t = ⟪r t,M (w t)⟫_ℝ := |
| 67 | frame_flux M (unit (m t)) (unit (v t)) (r t) (w t) |
| 68 | (unit_inner_self hm) (unit_inner_self hv) (unit_inner_zero hmv) |
| 69 | |
| 70 | theorem movingDenominator_eq (m v r : ℝ → Space) (t : ℝ) |
| 71 | (hm : m t ≠ 0) (hv : v t ≠ 0) (hmv : ⟪m t,v t⟫_ℝ = 0) : |
| 72 | movingDenominator m v r t = ‖r t‖^2 := |
| 73 | frame_norm_sq (unit (m t)) (unit (v t)) (r t) |
| 74 | (unit_inner_self hm) (unit_inner_self hv) (unit_inner_zero hmv) |
| 75 | |
| 76 | theorem moving_pairing (m v r w : ℝ → Space) (t : ℝ) |
| 77 | (hm : m t ≠ 0) (hv : v t ≠ 0) (hmv : ⟪m t,v t⟫_ℝ = 0) : |
| 78 | (∑ j : Fin 3, movingRay m v r t j * movingVelocity m v w t j) = ⟪r t,w t⟫_ℝ := |
| 79 | frame_inner_expand (unit (m t)) (unit (v t)) |
| 80 | (unit_inner_self hm) (unit_inner_self hv) (unit_inner_zero hmv) (r t) (w t) |
| 81 | |
| 82 | /-- The physical projected ODE becomes the exact `-(M+S)` moving-frame |
| 83 | equation, with its actual scalar pressure flux and denominator. -/ |
| 84 | theorem movingVelocity_hasDerivWithinAt (B M : Space →L[ℝ] Space) |
| 85 | {m v r w : ℝ → Space} {t : ℝ} {S : Set ℝ} |
| 86 | (hm : HasDerivWithinAt m (-B.adjoint (m t)) S t) |
| 87 | (hv : HasDerivWithinAt v (-B (v t) + (2*⟪m t,B (v t)⟫_ℝ / ‖m t‖^2) • m t) S t) |
| 88 | (hw : HasDerivWithinAt w (-M (w t) + (2*⟪r t,M (w t)⟫_ℝ / ‖r t‖^2) • r t) S t) |
| 89 | (hm0 : m t ≠ 0) (hv0 : v t ≠ 0) (hmv : ⟪m t,v t⟫_ℝ = 0) (i : Fin 3) : |
| 90 | HasDerivWithinAt (fun s => movingVelocity m v w s i) |
| 91 | (-(∑ j : Fin 3, (frameMatrix M (unit (m t)) (unit (v t)) i j + |
| 92 | frameSkew (frameMatrix B (unit (m t)) (unit (v t))) i j) * movingVelocity m v w t j) + |
| 93 | (2*movingFlux M m v r w t / movingDenominator m v r t)*movingRay m v r t i) S t := by |
| 94 | have h := (normalizedFrame_hasDerivWithinAt B hm hv hm0 hv0 hmv i).inner ℝ hw |
| 95 | apply h.congr_deriv |
| 96 | rw [movingFlux_eq M m v r w t hm0 hv0 hmv, movingDenominator_eq m v r t hm0 hv0 hmv] |
| 97 | have he := movingVelocityRate_identity B M (unit (m t)) (unit (v t)) (w t) |
| 98 | (unit_inner_self hm0) (unit_inner_self hv0) (unit_inner_zero hmv) i |
| 99 | simp only [inner_add_right, inner_neg_right, real_inner_smul_right] |
| 100 | change -⟪frame (unit (m t)) (unit (v t)) i,M (w t)⟫_ℝ + |
| 101 | (2*⟪r t,M (w t)⟫_ℝ/‖r t‖^2)*movingRay m v r t i + |
| 102 | ⟪frameRate B (unit (m t)) (unit (v t)) i,w t⟫_ℝ = _ |
| 103 | simp only [movingVelocity, normalizedFrame] |
| 104 | linarith only [he] |
| 105 | |
| 106 | end EulerPacketMovingFrame |