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.PacketPiolaAlgebra |
| 2 | import Euler.PacketPotentialMultiplier |
| 3 | import Euler.OperatorGevreyCalculus |
| 4 | |
| 5 | /-! A determinant-one three-dimensional matrix has a quadratic inverse. |
| 6 | This realizes the cofactor as an actual bounded bilinear map; its estimates |
| 7 | therefore require no derivatives or norm bounds for a separately given inverse. -/ |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | namespace EulerPacketCofactor |
| 12 | |
| 13 | open Set ContinuousLinearMap InnerProductSpace EulerSmoothLimit EulerPacketPiola |
| 14 | EulerPacketCrossProduct EulerOperatorGevreyCalculus EulerGevrey |
| 15 | open scoped ContDiff |
| 16 | |
| 17 | abbrev EndSpace := Space →L[ℝ] Space |
| 18 | |
| 19 | private local instance : NormedAddCommGroup EndSpace := inferInstance |
| 20 | private local instance : NormedSpace ℝ EndSpace := inferInstance |
| 21 | private local instance : NormedAddCommGroup (EndSpace →L[ℝ] EndSpace) := inferInstance |
| 22 | private local instance : NormedSpace ℝ (EndSpace →L[ℝ] EndSpace) := inferInstance |
| 23 | private local instance : NormedAddCommGroup (EndSpace →L[ℝ] EndSpace →L[ℝ] EndSpace) := inferInstance |
| 24 | private local instance : NormedSpace ℝ (EndSpace →L[ℝ] EndSpace →L[ℝ] EndSpace) := inferInstance |
| 25 | |
| 26 | def basis (i : Fin 3) : Space := EuclideanSpace.single i 1 |
| 27 | |
| 28 | @[simp] theorem basis_norm (i : Fin 3) : ‖basis i‖ = 1 := by |
| 29 | simp [basis] |
| 30 | |
| 31 | def rowLinear (i : Fin 3) : Space →ₗ[ℝ] EndSpace where |
| 32 | toFun a := (innerSL ℝ a).smulRight (basis i) |
| 33 | map_add' a b := by |
| 34 | apply ContinuousLinearMap.ext |
| 35 | intro v |
| 36 | simp only [ContinuousLinearMap.smulRight_apply, innerSL_apply_apply, |
| 37 | inner_add_left, add_apply, add_smul] |
| 38 | map_smul' c a := by |
| 39 | apply ContinuousLinearMap.ext |
| 40 | intro v |
| 41 | simp only [ContinuousLinearMap.smulRight_apply, innerSL_apply_apply, |
| 42 | real_inner_smul_left, RingHom.id_apply, smul_apply, smul_smul] |
| 43 | |
| 44 | theorem rowLinear_norm (i : Fin 3) (a : Space) : ‖rowLinear i a‖ ≤ ‖a‖ := by |
| 45 | apply opNorm_le_bound _ (norm_nonneg a) |
| 46 | intro v |
| 47 | change ‖(inner ℝ a v) • basis i‖ ≤ ‖a‖*‖v‖ |
| 48 | rw [norm_smul,basis_norm,mul_one,Real.norm_eq_abs] |
| 49 | exact abs_real_inner_le_norm a v |
| 50 | |
| 51 | def rowOperator (i : Fin 3) : Space →L[ℝ] EndSpace := |
| 52 | (rowLinear i).mkContinuous 1 (fun a => by simpa only [one_mul] using rowLinear_norm i a) |
| 53 | |
| 54 | @[simp] theorem rowOperator_apply (i : Fin 3) (a v : Space) : |
| 55 | rowOperator i a v = (inner ℝ a v) • basis i := rfl |
| 56 | |
| 57 | theorem rowOperator_norm (i : Fin 3) (a : Space) : ‖rowOperator i a‖ ≤ ‖a‖ := |
| 58 | rowLinear_norm i a |
| 59 | |
| 60 | def cofactorValue (A B : EndSpace) : EndSpace := |
| 61 | rowOperator 0 (crossOperator (A (basis 1)) (B (basis 2)))+ |
| 62 | rowOperator 1 (crossOperator (A (basis 2)) (B (basis 0)))+ |
| 63 | rowOperator 2 (crossOperator (A (basis 0)) (B (basis 1))) |
| 64 | |
| 65 | def cofactorLinear : EndSpace →ₗ[ℝ] EndSpace →ₗ[ℝ] EndSpace where |
| 66 | toFun A := |
| 67 | { toFun := cofactorValue A |
| 68 | map_add' B C := by |
| 69 | simp only [cofactorValue,add_apply,map_add] |
| 70 | abel |
| 71 | map_smul' c B := by |
| 72 | simp only [cofactorValue,smul_apply,map_smul,smul_add,RingHom.id_apply] } |
| 73 | map_add' A B := by |
| 74 | apply LinearMap.ext |
| 75 | intro C |
| 76 | change cofactorValue (A+B) C = cofactorValue A C+cofactorValue B C |
| 77 | simp only [cofactorValue,add_apply,map_add] |
| 78 | abel |
| 79 | map_smul' c A := by |
| 80 | apply LinearMap.ext |
| 81 | intro B |
| 82 | change cofactorValue (c • A) B = c • cofactorValue A B |
| 83 | simp only [cofactorValue,smul_apply,map_smul,smul_add] |
| 84 | |
| 85 | theorem cofactorValue_norm (A B : EndSpace) : ‖cofactorValue A B‖ ≤ 3*‖A‖*‖B‖ := by |
| 86 | have h (i j k : Fin 3) : |
| 87 | ‖rowOperator i (crossOperator (A (basis j)) (B (basis k)))‖ ≤ ‖A‖*‖B‖ := by |
| 88 | apply (rowOperator_norm i _).trans |
| 89 | change ‖cross (A (basis j)) (B (basis k))‖ ≤ ‖A‖*‖B‖ |
| 90 | exact (cross_norm_le _ _).trans (mul_le_mul |
| 91 | (by simpa only [basis_norm,mul_one] using A.le_opNorm (basis j)) |
| 92 | (by simpa only [basis_norm,mul_one] using B.le_opNorm (basis k)) |
| 93 | (norm_nonneg _) (norm_nonneg A)) |
| 94 | calc |
| 95 | ‖cofactorValue A B‖ ≤ |
| 96 | ‖rowOperator 0 (crossOperator (A (basis 1)) (B (basis 2)))‖+ |
| 97 | ‖rowOperator 1 (crossOperator (A (basis 2)) (B (basis 0)))‖+ |
| 98 | ‖rowOperator 2 (crossOperator (A (basis 0)) (B (basis 1)))‖ := norm_add₃_le |
| 99 | _ ≤ 3*‖A‖*‖B‖ := by nlinarith [h 0 1 2,h 1 2 0,h 2 0 1] |
| 100 | |
| 101 | def cofactorBilinear : EndSpace →L[ℝ] EndSpace →L[ℝ] EndSpace := |
| 102 | cofactorLinear.mkContinuous₂ 3 cofactorValue_norm |
| 103 | |
| 104 | @[simp] theorem cofactorBilinear_apply (A B : EndSpace) : cofactorBilinear A B = cofactorValue A B := rfl |
| 105 | |
| 106 | theorem cofactorBilinear_norm : ‖cofactorBilinear‖ ≤ 3 := |
| 107 | cofactorLinear.mkContinuous₂_norm_le (by norm_num) cofactorValue_norm |
| 108 | |
| 109 | def adjugate (A : EndSpace) : EndSpace := cofactorBilinear A A |
| 110 | |
| 111 | theorem adjugate_norm (A : EndSpace) : ‖adjugate A‖ ≤ 3*‖A‖^2 := by |
| 112 | change ‖cofactorValue A A‖ ≤ 3*‖A‖^2 |
| 113 | simpa only [pow_two,mul_assoc] using cofactorValue_norm A A |
| 114 | |
| 115 | theorem operatorMatrix_adjugate (A : EndSpace) : |
| 116 | operatorMatrix (adjugate A) = (operatorMatrix A).adjugate := by |
| 117 | ext i j |
| 118 | fin_cases i <;> fin_cases j <;> |
| 119 | simp [operatorMatrix,adjugate,cofactorValue,rowOperator_apply, |
| 120 | crossLeft_apply,cross,basis,EuclideanSpace.inner_single_right, |
| 121 | cross_apply,Matrix.adjugate_fin_three,Matrix.cons_val_two] <;> ring |
| 122 | |
| 123 | theorem operatorMatrix_injective : Function.Injective operatorMatrix := by |
| 124 | intro A B h |
| 125 | apply ContinuousLinearMap.ext |
| 126 | intro v |
| 127 | ext i |
| 128 | rw [operatorMatrix_apply,operatorMatrix_apply,h] |
| 129 | |
| 130 | theorem adjugate_comp (A : EndSpace) (hdet : (operatorMatrix A).det = 1) : |
| 131 | (adjugate A).comp A = ContinuousLinearMap.id ℝ Space := by |
| 132 | apply operatorMatrix_injective |
| 133 | rw [operatorMatrix_comp,operatorMatrix_adjugate,Matrix.adjugate_mul,hdet, |
| 134 | one_smul,operatorMatrix_id] |
| 135 | |
| 136 | theorem comp_adjugate (A : EndSpace) (hdet : (operatorMatrix A).det = 1) : |
| 137 | A.comp (adjugate A) = ContinuousLinearMap.id ℝ Space := by |
| 138 | apply operatorMatrix_injective |
| 139 | rw [operatorMatrix_comp,operatorMatrix_adjugate,Matrix.mul_adjugate,hdet, |
| 140 | one_smul,operatorMatrix_id] |
| 141 | |
| 142 | theorem inverse_eq_adjugate (A I : EndSpace) (hdet : (operatorMatrix A).det = 1) |
| 143 | (hI : ∀ v, I (A v) = v) : I = adjugate A := by |
| 144 | apply ContinuousLinearMap.ext |
| 145 | intro v |
| 146 | have hAv : A (adjugate A v) = v := congrArg (fun L : EndSpace => L v) (comp_adjugate A hdet) |
| 147 | calc |
| 148 | I v = I (A (adjugate A v)) := by rw [hAv] |
| 149 | _ = adjugate A v := hI _ |
| 150 | |
| 151 | end EulerPacketCofactor |