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.LinearFundamentalPath |
| 2 | import Mathlib.Analysis.Calculus.FDeriv.Analytic |
| 3 | import Mathlib.Topology.Instances.Matrix |
| 4 | import Mathlib.Analysis.Normed.Module.FiniteDimension |
| 5 | import Mathlib.Analysis.Matrix.Normed |
| 6 | |
| 7 | /-! Jacobi's formula in every finite dimension, and determinant preservation |
| 8 | for the actual linear evolution with trace-free coefficient. -/ |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | |
| 13 | namespace EulerLinearEvolutionDeterminant |
| 14 | |
| 15 | open Set Matrix EulerVolterraConvolution EulerLinearDuhamel |
| 16 | open scoped Matrix.Norms.Elementwise |
| 17 | |
| 18 | private def determinantRows (ι : Type*) [Fintype ι] [DecidableEq ι] : |
| 19 | ContinuousMultilinearMap ℝ (fun _ : ι => ι → ℝ) ℝ where |
| 20 | toMultilinearMap := Matrix.detRowAlternating.toMultilinearMap |
| 21 | cont := continuous_id.matrix_det |
| 22 | |
| 23 | theorem matrixJacobi {ι : Type*} [Fintype ι] [DecidableEq ι] |
| 24 | (F M : ℝ → Matrix ι ι ℝ) (S : Set ℝ) (t : ℝ) |
| 25 | (hF : HasDerivWithinAt F (M t * F t) S t) : |
| 26 | HasDerivWithinAt (fun s => (F s).det) ((M t).trace * (F t).det) S t := by |
| 27 | have h := (determinantRows ι).hasFDerivAt (F t) |>.comp_hasDerivWithinAt t hF |
| 28 | have he : (determinantRows ι).linearDeriv (F t) (M t * F t) = |
| 29 | (M t).trace * (F t).det := by |
| 30 | calc |
| 31 | _ = ∑ i, ((F t).updateRow i ((M t * F t) i)).det := |
| 32 | (determinantRows ι).linearDeriv_apply (fun i j => F t i j) |
| 33 | (fun i j => (M t * F t) i j) |
| 34 | _ = _ := ?_ |
| 35 | rw [Matrix.trace, Finset.sum_mul] |
| 36 | apply Finset.sum_congr rfl |
| 37 | intro i _ |
| 38 | have hr : (M t * F t) i = ∑ j, M t i j • F t j := by |
| 39 | funext j |
| 40 | simp only [Matrix.mul_apply, Finset.sum_apply, Pi.smul_apply, smul_eq_mul] |
| 41 | rw [hr, Matrix.det_updateRow_sum] |
| 42 | rfl |
| 43 | exact h.congr_deriv he |
| 44 | |
| 45 | section Operators |
| 46 | |
| 47 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 48 | |
| 49 | private def operatorCoordinates : |
| 50 | (E →L[ℝ] E) →L[ℝ] Matrix (Fin (Module.finrank ℝ E)) (Fin (Module.finrank ℝ E)) ℝ := |
| 51 | ((LinearMap.toMatrix (Module.finBasis ℝ E) (Module.finBasis ℝ E)).toLinearMap.comp |
| 52 | (ContinuousLinearMap.coeLM ℝ)).toContinuousLinearMap |
| 53 | |
| 54 | private theorem operatorCoordinates_comp (A B : E →L[ℝ] E) : |
| 55 | operatorCoordinates (A.comp B) = operatorCoordinates A * operatorCoordinates B := by |
| 56 | exact LinearMap.toMatrix_comp (Module.finBasis ℝ E) (Module.finBasis ℝ E) |
| 57 | (Module.finBasis ℝ E) A.toLinearMap B.toLinearMap |
| 58 | |
| 59 | private theorem operatorCoordinates_det (A : E →L[ℝ] E) : |
| 60 | (operatorCoordinates A).det = A.det := |
| 61 | LinearMap.det_toMatrix (Module.finBasis ℝ E) A.toLinearMap |
| 62 | |
| 63 | private theorem operatorCoordinates_trace (A : E →L[ℝ] E) : |
| 64 | (operatorCoordinates A).trace = LinearMap.trace ℝ E A.toLinearMap := |
| 65 | (LinearMap.trace_eq_matrix_trace ℝ (Module.finBasis ℝ E) A.toLinearMap).symm |
| 66 | |
| 67 | /-- The finite-dimensional Jacobi formula does not assume invertibility. -/ |
| 68 | theorem operatorJacobi (F M : ℝ → (E →L[ℝ] E)) (S : Set ℝ) (t : ℝ) |
| 69 | (hF : HasDerivWithinAt F ((M t).comp (F t)) S t) : |
| 70 | HasDerivWithinAt (fun s => (F s).det) |
| 71 | (LinearMap.trace ℝ E (M t).toLinearMap * (F t).det) S t := by |
| 72 | have hc := ContinuousLinearMap.hasFDerivAt (𝕜 := ℝ) |
| 73 | (E := E →L[ℝ] E) |
| 74 | (F := Matrix (Fin (Module.finrank ℝ E)) (Fin (Module.finrank ℝ E)) ℝ) |
| 75 | (x := F t) (operatorCoordinates (E := E)) |
| 76 | have hm := HasFDerivAt.comp_hasDerivWithinAt (𝕜 := ℝ) |
| 77 | (F := E →L[ℝ] E) |
| 78 | (E := Matrix (Fin (Module.finrank ℝ E)) (Fin (Module.finrank ℝ E)) ℝ) t hc hF |
| 79 | have hm' := hm.congr_deriv (operatorCoordinates_comp (M t) (F t)) |
| 80 | have h := matrixJacobi (fun s => operatorCoordinates (F s)) |
| 81 | (fun s => operatorCoordinates (M s)) S t hm' |
| 82 | simpa only [operatorCoordinates_det, operatorCoordinates_trace] using h |
| 83 | |
| 84 | end Operators |
| 85 | |
| 86 | end EulerLinearEvolutionDeterminant |
| 87 | |
| 88 | namespace EulerLinearDuhamel.Evolution |
| 89 | |
| 90 | open Set EulerVolterraConvolution EulerLinearEvolutionDeterminant |
| 91 | |
| 92 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 93 | {T : ℝ} {hT : 0 ≤ T} {B : C(Icc (0 : ℝ) T,E →L[ℝ] E)} |
| 94 | |
| 95 | theorem det_forward_eq_initial (U : Evolution T hT B) |
| 96 | (htrace : ∀ t, LinearMap.trace ℝ E (B t).toLinearMap = 0) |
| 97 | (t : Icc (0 : ℝ) T) : (U.forward t).det = (U.forward ⟨0,le_rfl,hT⟩).det := by |
| 98 | have hd : ∀ s ∈ Icc (0 : ℝ) T, |
| 99 | HasDerivWithinAt (fun r => (extendPath T hT U.forward r).det) 0 (Icc 0 T) s := by |
| 100 | intro s hs |
| 101 | have hF := U.derivative ⟨s,hs⟩ |
| 102 | have h := operatorJacobi (extendPath T hT U.forward) (extendPath T hT B) |
| 103 | (Icc 0 T) s (by |
| 104 | simpa only [extendPath, projIcc_of_mem hT hs] using hF) |
| 105 | simpa only [extendPath, projIcc_of_mem hT hs, htrace, zero_mul] using h |
| 106 | have h := Convex.norm_image_sub_le_of_norm_hasDerivWithin_le (C := 0) hd |
| 107 | (fun s hs => by simp) (convex_Icc (0 : ℝ) T) |
| 108 | (show (0 : ℝ) ∈ Icc 0 T from ⟨le_rfl,hT⟩) t.property |
| 109 | simpa only [zero_mul, norm_le_zero_iff, sub_eq_zero, extendPath, |
| 110 | projIcc_of_mem hT t.property, projIcc_of_mem hT ⟨le_rfl,hT⟩] using h |
| 111 | |
| 112 | end EulerLinearDuhamel.Evolution |
| 113 | |
| 114 | namespace EulerLinearDuhamel |
| 115 | |
| 116 | open Set |
| 117 | |
| 118 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 119 | |
| 120 | theorem constructedEvolution_det_one (T : ℝ) (hT : 0 ≤ T) |
| 121 | (B : C(Icc (0 : ℝ) T,E →L[ℝ] E)) |
| 122 | (htrace : ∀ t, LinearMap.trace ℝ E (B t).toLinearMap = 0) |
| 123 | (t : Icc (0 : ℝ) T) : ((constructedEvolution T hT B).forward t).det = 1 := by |
| 124 | rw [(constructedEvolution T hT B).det_forward_eq_initial htrace t, |
| 125 | constructedEvolution_initial] |
| 126 | exact LinearMap.det_id |
| 127 | |
| 128 | end EulerLinearDuhamel |