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.MeanBoundaryOperator |
| 2 | import Euler.PacketCrossProduct |
| 3 | import Mathlib.LinearAlgebra.Matrix.Adjugate |
| 4 | |
| 5 | /-! |
| 6 | The finite-dimensional algebra in the curl Piola identity. Antisymmetrizing |
| 7 | `Fᵀ A F` transforms by the actual adjugate of `F`. In particular, a |
| 8 | determinant-one change of variables transforms curl by `F⁻¹`. |
| 9 | -/ |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | namespace EulerPacketPiola |
| 14 | |
| 15 | open EulerSmoothLimit EulerMeanBoundary Matrix InnerProductSpace |
| 16 | |
| 17 | abbrev Mat3 := Matrix (Fin 3) (Fin 3) ℝ |
| 18 | |
| 19 | def matrixAntisym (A : Mat3) : Fin 3 → ℝ := |
| 20 | ![A 2 1 - A 1 2, A 0 2 - A 2 0, A 1 0 - A 0 1] |
| 21 | |
| 22 | /-- The adjugate transformation law is a polynomial identity, without invertibility assumptions. -/ |
| 23 | theorem matrixAntisym_congruence (F A : Mat3) : |
| 24 | matrixAntisym (F.transpose * A * F) = F.adjugate.mulVec (matrixAntisym A) := by |
| 25 | ext i |
| 26 | fin_cases i <;> |
| 27 | norm_num [matrixAntisym, Matrix.mul_apply, Matrix.transpose_apply, |
| 28 | Matrix.mulVec, dotProduct, Fin.sum_univ_three, Matrix.adjugate_fin_three, |
| 29 | Matrix.cons_val_two] <;> |
| 30 | ring |
| 31 | |
| 32 | def operatorMatrix (A : Space →L[ℝ] Space) : Mat3 := |
| 33 | fun i j => (A (EuclideanSpace.single j 1)) i |
| 34 | |
| 35 | theorem operatorMatrix_apply (A : Space →L[ℝ] Space) (x : Space) (i : Fin 3) : |
| 36 | (A x) i = (operatorMatrix A).mulVec (WithLp.ofLp x) i := by |
| 37 | have hx : (∑ j : Fin 3, x j • EuclideanSpace.single j (1 : ℝ)) = x := by |
| 38 | ext j |
| 39 | simp [Pi.single_apply, mul_ite] |
| 40 | calc |
| 41 | (A x) i = (A (∑ j : Fin 3, x j • EuclideanSpace.single j (1 : ℝ))) i := by rw [hx] |
| 42 | _ = (operatorMatrix A).mulVec (WithLp.ofLp x) i := by |
| 43 | simp only [map_sum, map_smul, WithLp.ofLp_sum, Finset.sum_apply, PiLp.smul_apply, smul_eq_mul, |
| 44 | Matrix.mulVec, dotProduct, operatorMatrix] |
| 45 | apply Finset.sum_congr rfl |
| 46 | intro j _ |
| 47 | exact mul_comm _ _ |
| 48 | |
| 49 | theorem operatorMatrix_comp (A B : Space →L[ℝ] Space) : |
| 50 | operatorMatrix (A.comp B) = operatorMatrix A * operatorMatrix B := by |
| 51 | ext i j |
| 52 | exact operatorMatrix_apply A (B (EuclideanSpace.single j 1)) i |
| 53 | |
| 54 | theorem operatorMatrix_id : operatorMatrix (ContinuousLinearMap.id ℝ Space) = 1 := by |
| 55 | ext i j |
| 56 | simp [operatorMatrix, Matrix.one_apply] |
| 57 | |
| 58 | theorem operatorMatrix_adjoint (A : Space →L[ℝ] Space) : |
| 59 | operatorMatrix A.adjoint = (operatorMatrix A).transpose := by |
| 60 | ext i j |
| 61 | have hi := A.adjoint_inner_right (EuclideanSpace.single i 1) (EuclideanSpace.single j 1) |
| 62 | simpa only [operatorMatrix, Matrix.transpose_apply, EuclideanSpace.inner_single_left, |
| 63 | EuclideanSpace.inner_single_right, conj_trivial, one_mul, mul_one] using hi |
| 64 | |
| 65 | theorem matrixAntisym_operator (A : Space →L[ℝ] Space) : |
| 66 | matrixAntisym (operatorMatrix A) = WithLp.ofLp (curlMatrix A) := by |
| 67 | ext i |
| 68 | fin_cases i <;> rfl |
| 69 | |
| 70 | theorem operatorMatrix_inverse (F : Space ≃L[ℝ] Space) : |
| 71 | operatorMatrix F.toContinuousLinearMap * operatorMatrix F.symm.toContinuousLinearMap = 1 := by |
| 72 | rw [← operatorMatrix_comp] |
| 73 | have he : F.toContinuousLinearMap.comp F.symm.toContinuousLinearMap = |
| 74 | ContinuousLinearMap.id ℝ Space := by ext x; simp |
| 75 | rw [he, operatorMatrix_id] |
| 76 | |
| 77 | theorem adjugate_operatorMatrix (F : Space ≃L[ℝ] Space) |
| 78 | (hdet : (operatorMatrix F.toContinuousLinearMap).det = 1) : |
| 79 | (operatorMatrix F.toContinuousLinearMap).adjugate = |
| 80 | operatorMatrix F.symm.toContinuousLinearMap := by |
| 81 | calc |
| 82 | (operatorMatrix F.toContinuousLinearMap).adjugate = |
| 83 | (operatorMatrix F.toContinuousLinearMap).adjugate * |
| 84 | (operatorMatrix F.toContinuousLinearMap * operatorMatrix F.symm.toContinuousLinearMap) := by |
| 85 | rw [operatorMatrix_inverse, Matrix.mul_one] |
| 86 | _ = ((operatorMatrix F.toContinuousLinearMap).adjugate * |
| 87 | operatorMatrix F.toContinuousLinearMap) * operatorMatrix F.symm.toContinuousLinearMap := |
| 88 | (Matrix.mul_assoc _ _ _).symm |
| 89 | _ = operatorMatrix F.symm.toContinuousLinearMap := by |
| 90 | rw [Matrix.adjugate_mul, hdet, one_smul, Matrix.one_mul] |
| 91 | |
| 92 | /-- The actual Euclidean curl tensor transforms by the inverse under a unit Jacobian. -/ |
| 93 | theorem curlMatrix_congruence (F : Space ≃L[ℝ] Space) |
| 94 | (hdet : (operatorMatrix F.toContinuousLinearMap).det = 1) |
| 95 | (A : Space →L[ℝ] Space) : |
| 96 | curlMatrix (F.toContinuousLinearMap.adjoint.comp (A.comp F.toContinuousLinearMap)) = |
| 97 | F.symm (curlMatrix A) := by |
| 98 | have hm := matrixAntisym_congruence (operatorMatrix F.toContinuousLinearMap) (operatorMatrix A) |
| 99 | rw [adjugate_operatorMatrix F hdet] at hm |
| 100 | ext i |
| 101 | change (curlMatrix (F.toContinuousLinearMap.adjoint.comp (A.comp F.toContinuousLinearMap))) i = |
| 102 | (F.symm.toContinuousLinearMap (curlMatrix A)) i |
| 103 | rw [operatorMatrix_apply F.symm.toContinuousLinearMap (curlMatrix A) i] |
| 104 | have he := congrFun hm i |
| 105 | rw [Matrix.mul_assoc, ← operatorMatrix_adjoint, ← operatorMatrix_comp, ← operatorMatrix_comp, |
| 106 | matrixAntisym_operator, matrixAntisym_operator] at he |
| 107 | exact he |
| 108 | |
| 109 | /-- Algebraic Piola curl identity for a genuine first derivative in label coordinates. -/ |
| 110 | theorem curlMatrix_piola (F : Space ≃L[ℝ] Space) |
| 111 | (hdet : (operatorMatrix F.toContinuousLinearMap).det = 1) |
| 112 | (B : Space →L[ℝ] Space) : |
| 113 | curlMatrix (F.toContinuousLinearMap.adjoint.comp B) = |
| 114 | F.symm (curlMatrix (B.comp F.symm.toContinuousLinearMap)) := by |
| 115 | have h := curlMatrix_congruence F hdet (B.comp F.symm.toContinuousLinearMap) |
| 116 | have he : (B.comp F.symm.toContinuousLinearMap).comp F.toContinuousLinearMap = B := by |
| 117 | ext x |
| 118 | simp |
| 119 | rw [he] at h |
| 120 | exact h |
| 121 | |
| 122 | end EulerPacketPiola |