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 NavierStokes.ProblemStatement |
| 2 | import Mathlib.Analysis.Calculus.FDeriv.Symmetric |
| 3 | import Mathlib.Analysis.Calculus.FDeriv.Add |
| 4 | import Mathlib.Tactic.Abel |
| 5 | import Mathlib.Tactic.FinCases |
| 6 | |
| 7 | /-! |
| 8 | # The physical Euclidean curl |
| 9 | |
| 10 | All derivatives in this file are genuine Fréchet derivatives on the Euclidean |
| 11 | space used in `ProblemStatement`. In particular, mixed-partial symmetry is |
| 12 | proved from C² regularity, rather than assumed for formal derivative symbols. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | namespace NavierStokes.SpatialCurl |
| 18 | |
| 19 | open ProblemStatement Set Filter |
| 20 | open scoped BigOperators ContDiff Topology |
| 21 | |
| 22 | /-- The `(j,i)` entry of a spatial derivative. -/ |
| 23 | def derivativeEntry (i j : Fin 3) : (Space →L[ℝ] Space) →L[ℝ] ℝ := |
| 24 | (EuclideanSpace.proj j).comp (ContinuousLinearMap.apply ℝ Space (coordinateVector i)) |
| 25 | |
| 26 | @[simp] theorem derivativeEntry_apply (i j : Fin 3) (L : Space →L[ℝ] Space) : |
| 27 | derivativeEntry i j L = (L (coordinateVector i)) j := rfl |
| 28 | |
| 29 | /-- The usual antisymmetric part of a Jacobian, identified with a vector. -/ |
| 30 | def curlLinear : (Space →L[ℝ] Space) →L[ℝ] Space := |
| 31 | (derivativeEntry 1 2 - derivativeEntry 2 1).smulRight (coordinateVector 0) + |
| 32 | (derivativeEntry 2 0 - derivativeEntry 0 2).smulRight (coordinateVector 1) + |
| 33 | (derivativeEntry 0 1 - derivativeEntry 1 0).smulRight (coordinateVector 2) |
| 34 | |
| 35 | @[simp] theorem curlLinear_apply_zero (L : Space →L[ℝ] Space) : |
| 36 | (curlLinear L) 0 = (L (coordinateVector 1)) 2 - (L (coordinateVector 2)) 1 := by |
| 37 | simp [curlLinear, coordinateVector] |
| 38 | |
| 39 | @[simp] theorem curlLinear_apply_one (L : Space →L[ℝ] Space) : |
| 40 | (curlLinear L) 1 = (L (coordinateVector 2)) 0 - (L (coordinateVector 0)) 2 := by |
| 41 | simp [curlLinear, coordinateVector] |
| 42 | |
| 43 | @[simp] theorem curlLinear_apply_two (L : Space →L[ℝ] Space) : |
| 44 | (curlLinear L) 2 = (L (coordinateVector 0)) 1 - (L (coordinateVector 1)) 0 := by |
| 45 | simp [curlLinear, coordinateVector] |
| 46 | |
| 47 | /-- Curl of a potential on physical Euclidean three-space. -/ |
| 48 | def curl (A : Space → Space) (x : Space) : Space := curlLinear (fderiv ℝ A x) |
| 49 | |
| 50 | /-- Curl taken only in space, with the physical time held fixed. -/ |
| 51 | def spatialCurl (A : VelocityField) : VelocityField := |
| 52 | fun z => curl (fun y => A (z.1, y)) z.2 |
| 53 | |
| 54 | /-- Actual mixed-partial symmetry, obtained from Schwarz's theorem. -/ |
| 55 | theorem mixed_partial_symmetry {A : Space → Space} {x : Space} |
| 56 | (hA : ContDiffAt ℝ 2 A x) (i j : Fin 3) : |
| 57 | fderiv ℝ (fderiv ℝ A) x (coordinateVector i) (coordinateVector j) = |
| 58 | fderiv ℝ (fderiv ℝ A) x (coordinateVector j) (coordinateVector i) := by |
| 59 | exact (hA.isSymmSndFDerivAt (by simp)).eq (coordinateVector i) (coordinateVector j) |
| 60 | |
| 61 | /-- Differentiating the curl is applying a fixed continuous linear map to |
| 62 | the actual second derivative of its potential. -/ |
| 63 | theorem fderiv_curl {A : Space → Space} {x : Space} |
| 64 | (hA : ContDiffAt ℝ 2 A x) : |
| 65 | fderiv ℝ (curl A) x = curlLinear.comp (fderiv ℝ (fderiv ℝ A) x) := by |
| 66 | have hd : DifferentiableAt ℝ (fderiv ℝ A) x := |
| 67 | (hA.fderiv_right (m := 1) (by norm_num)).differentiableAt (by norm_num) |
| 68 | exact (curlLinear.hasFDerivAt.comp x hd.hasFDerivAt).fderiv |
| 69 | |
| 70 | /-- Divergence of curl is zero for every C² potential at the point in question. -/ |
| 71 | theorem divergence_curl {A : Space → Space} {x : Space} |
| 72 | (hA : ContDiffAt ℝ 2 A x) : |
| 73 | (∑ i : Fin 3, (fderiv ℝ (curl A) x (coordinateVector i)) i) = 0 := by |
| 74 | rw [fderiv_curl hA] |
| 75 | rw [Fin.sum_univ_three] |
| 76 | simp only [ContinuousLinearMap.comp_apply, curlLinear_apply_zero, |
| 77 | curlLinear_apply_one, curlLinear_apply_two] |
| 78 | have h01 := congrArg (fun v : Space => v 2) (mixed_partial_symmetry hA 0 1) |
| 79 | have h02 := congrArg (fun v : Space => v 1) (mixed_partial_symmetry hA 0 2) |
| 80 | have h12 := congrArg (fun v : Space => v 0) (mixed_partial_symmetry hA 1 2) |
| 81 | dsimp at h01 h02 h12 |
| 82 | rw [h01, h02, h12] |
| 83 | abel |
| 84 | |
| 85 | /-- The divergence in the actual PDE target vanishes on every C² spatial |
| 86 | slice, including the time-zero slice when its spatial regularity is given. -/ |
| 87 | theorem spatialDivergence_spatialCurl (A : VelocityField) (t : ℝ) (x : Space) |
| 88 | (hA : ContDiffAt ℝ 2 (fun y : Space => A (t, y)) x) : |
| 89 | spatialDivergence (spatialCurl A) t x = 0 := by |
| 90 | change (∑ i : Fin 3, |
| 91 | (fderiv ℝ (curl (fun y : Space => A (t, y))) x (coordinateVector i)) i) = 0 |
| 92 | exact divergence_curl hA |
| 93 | |
| 94 | /-- One derivative of regularity is sufficient for taking the curl. -/ |
| 95 | theorem contDiffAt_curl {A : Space → Space} {x : Space} {m n : WithTop ℕ∞} |
| 96 | (hA : ContDiffAt ℝ n A x) (hmn : m + 1 ≤ n) : ContDiffAt ℝ m (curl A) x := |
| 97 | curlLinear.contDiff.comp_contDiffAt x (hA.fderiv_right hmn) |
| 98 | |
| 99 | theorem contDiff_curl {A : Space → Space} {m n : WithTop ℕ∞} |
| 100 | (hA : ContDiff ℝ n A) (hmn : m + 1 ≤ n) : ContDiff ℝ m (curl A) := |
| 101 | curlLinear.contDiff.comp (hA.fderiv_right hmn) |
| 102 | |
| 103 | /-- Joint spacetime smoothness is preserved, with loss of one derivative. -/ |
| 104 | theorem contDiff_spatialCurl {A : VelocityField} {m n : WithTop ℕ∞} |
| 105 | (hA : ContDiff ℝ n A) (hmn : m + 1 ≤ n) : ContDiff ℝ m (spatialCurl A) := by |
| 106 | have hp : ContDiff ℝ n (fun p : SpaceTime × Space => A (p.1.1, p.2)) := |
| 107 | hA.comp (contDiff_fst.fst.prodMk contDiff_snd) |
| 108 | have hd : ContDiff ℝ m |
| 109 | (fun z : SpaceTime => fderiv ℝ (fun y : Space => A (z.1, y)) z.2) := |
| 110 | hp.fderiv contDiff_snd hmn |
| 111 | exact curlLinear.contDiff.comp hd |
| 112 | |
| 113 | theorem contDiffAt_spatialCurl {A : VelocityField} {z : SpaceTime} {m n : WithTop ℕ∞} |
| 114 | (hA : ContDiffAt ℝ n A z) (hmn : m + 1 ≤ n) : |
| 115 | ContDiffAt ℝ m (spatialCurl A) z := by |
| 116 | have hp : ContDiffAt ℝ n (fun p : SpaceTime × Space => A (p.1.1, p.2)) (z, z.2) := |
| 117 | hA.comp (z, z.2) (contDiffAt_fst.fst.prodMk contDiffAt_snd) |
| 118 | have hd : ContDiffAt ℝ m |
| 119 | (fun w : SpaceTime => fderiv ℝ (fun y : Space => A (w.1, y)) w.2) z := |
| 120 | hp.fderiv contDiffAt_snd hmn |
| 121 | exact curlLinear.contDiff.comp_contDiffAt z hd |
| 122 | |
| 123 | /-- Relative spacetime regularity suffices even at the endpoint of a time |
| 124 | interval, since the spatial derivative is taken on all of space. -/ |
| 125 | theorem contDiffOn_spatialCurl {A : VelocityField} {times : Set ℝ} |
| 126 | {m n : WithTop ℕ∞} (hA : ContDiffOn ℝ n A (times ×ˢ (univ : Set Space))) |
| 127 | (hmn : m + 1 ≤ n) : |
| 128 | ContDiffOn ℝ m (spatialCurl A) (times ×ˢ (univ : Set Space)) := by |
| 129 | intro z hz |
| 130 | have hp : ContDiffWithinAt ℝ n |
| 131 | (fun p : SpaceTime × Space => A (p.1.1, p.2)) |
| 132 | ((times ×ˢ (univ : Set Space)) ×ˢ (univ : Set Space)) (z, z.2) := by |
| 133 | apply (hA z hz).comp (z, z.2) |
| 134 | (contDiff_fst.fst.prodMk contDiff_snd).contDiffWithinAt |
| 135 | intro p hp |
| 136 | exact ⟨hp.1.1, mem_univ _⟩ |
| 137 | have hd : ContDiffWithinAt ℝ m |
| 138 | (fun w : SpaceTime => fderivWithin ℝ (fun y : Space => A (w.1, y)) univ w.2) |
| 139 | (times ×ˢ (univ : Set Space)) z := |
| 140 | hp.fderivWithin contDiffWithinAt_snd uniqueDiffOn_univ hmn hz (by simp) |
| 141 | have hd' : ContDiffWithinAt ℝ m |
| 142 | (fun w : SpaceTime => fderiv ℝ (fun y : Space => A (w.1, y)) w.2) |
| 143 | (times ×ˢ (univ : Set Space)) z := by |
| 144 | simpa only [fderivWithin_univ] using hd |
| 145 | exact hd'.continuousLinearMap_comp curlLinear |
| 146 | |
| 147 | theorem contDiff_spatialSlice {A : VelocityField} {times : Set ℝ} {n : WithTop ℕ∞} |
| 148 | (hA : ContDiffOn ℝ n A (times ×ˢ (univ : Set Space))) |
| 149 | {t : ℝ} (ht : t ∈ times) : ContDiff ℝ n (fun x : Space => A (t, x)) := |
| 150 | hA.comp_contDiff (contDiff_const.prodMk contDiff_id) (fun x => ⟨ht, mem_univ x⟩) |
| 151 | |
| 152 | theorem spatialDivergence_spatialCurl_on {A : VelocityField} {times : Set ℝ} |
| 153 | (hA : ContDiffOn ℝ 2 A (times ×ˢ (univ : Set Space))) |
| 154 | {t : ℝ} (ht : t ∈ times) (x : Space) : |
| 155 | spatialDivergence (spatialCurl A) t x = 0 := |
| 156 | spatialDivergence_spatialCurl A t x (contDiff_spatialSlice hA ht).contDiffAt |
| 157 | |
| 158 | /-- Equality of potentials on a neighborhood gives equality of their curls. -/ |
| 159 | theorem curl_eq_of_eventuallyEq {A B : Space → Space} {x : Space} |
| 160 | (h : A =ᶠ[𝓝 x] B) : curl A x = curl B x := by |
| 161 | unfold curl |
| 162 | rw [h.fderiv_eq] |
| 163 | |
| 164 | theorem curl_eventuallyEq {A B : Space → Space} {x : Space} |
| 165 | (h : A =ᶠ[𝓝 x] B) : curl A =ᶠ[𝓝 x] curl B := |
| 166 | h.fderiv.mono fun _ h' => congrArg curlLinear h' |
| 167 | |
| 168 | /-- A periodic potential gives a periodic curl; the identity also holds for |
| 169 | the totalized derivative at points without differentiability. -/ |
| 170 | theorem curl_periodic {A : Space → Space} {a : Space} |
| 171 | (h : ∀ x, A (x + a) = A x) : ∀ x, curl A (x + a) = curl A x := by |
| 172 | intro x |
| 173 | unfold curl |
| 174 | congr 1 |
| 175 | rw [← fderiv_comp_add_right a] |
| 176 | exact congrArg (fun f : Space → Space => fderiv ℝ f x) (funext h) |
| 177 | |
| 178 | theorem spatialCurl_periodic {A : VelocityField} {times : Set ℝ} |
| 179 | (hA : UnitSpatialPeriodsOn times A) : UnitSpatialPeriodsOn times (spatialCurl A) := by |
| 180 | intro t ht x i |
| 181 | exact curl_periodic (fun y => hA t ht y i) x |
| 182 | |
| 183 | @[simp] theorem curl_zero (x : Space) : curl (fun _ => (0 : Space)) x = 0 := by |
| 184 | simp [curl] |
| 185 | |
| 186 | theorem spatialCurl_eq_zero_of_timeSlice {A : VelocityField} {t : ℝ} |
| 187 | (hA : ∀ x : Space, A (t, x) = 0) (x : Space) : spatialCurl A (t, x) = 0 := by |
| 188 | change curl (fun y : Space => A (t, y)) x = 0 |
| 189 | rw [funext hA] |
| 190 | exact curl_zero x |
| 191 | |
| 192 | theorem compactFutureTimeSupport_spatialCurl {A : VelocityField} |
| 193 | (hA : CompactFutureTimeSupport A) : CompactFutureTimeSupport (spatialCurl A) := by |
| 194 | obtain ⟨T, hT, hzero⟩ := hA |
| 195 | exact ⟨T, hT, fun t ht x => spatialCurl_eq_zero_of_timeSlice (hzero t ht) x⟩ |
| 196 | |
| 197 | theorem curl_eq_zero_of_not_mem_tsupport {A : Space → Space} {x : Space} |
| 198 | (hx : x ∉ tsupport A) : curl A x = 0 := by |
| 199 | simp [curl, fderiv_of_notMem_tsupport ℝ hx] |
| 200 | |
| 201 | /-- Taking a curl cannot enlarge closed spatial support. -/ |
| 202 | theorem tsupport_curl_subset (A : Space → Space) : tsupport (curl A) ⊆ tsupport A := by |
| 203 | apply closure_minimal _ isClosed_closure |
| 204 | intro x hx |
| 205 | by_contra h |
| 206 | exact hx (curl_eq_zero_of_not_mem_tsupport h) |
| 207 | |
| 208 | theorem hasCompactSupport_curl {A : Space → Space} (hA : HasCompactSupport A) : |
| 209 | HasCompactSupport (curl A) := |
| 210 | hA.fderiv ℝ |>.comp_left (g := curlLinear) (map_zero curlLinear) |
| 211 | |
| 212 | theorem tsupport_curl_cutoff_subset (χ : Space → ℝ) (A : Space → Space) : |
| 213 | tsupport (curl (fun y => χ y • A y)) ⊆ tsupport χ := |
| 214 | (tsupport_curl_subset _).trans (tsupport_smul_subset_left χ A) |
| 215 | |
| 216 | theorem hasCompactSupport_curl_cutoff {χ : Space → ℝ} (hχ : HasCompactSupport χ) |
| 217 | (A : Space → Space) : HasCompactSupport (curl (fun y => χ y • A y)) := |
| 218 | hasCompactSupport_curl hχ.smul_right |
| 219 | |
| 220 | /-- Multiplying the potential by a spatial cutoff and then taking its curl |
| 221 | gives a genuinely divergence-free field. -/ |
| 222 | theorem divergence_curl_cutoff {χ : Space → ℝ} {A : Space → Space} {x : Space} |
| 223 | (hχ : ContDiffAt ℝ 2 χ x) (hA : ContDiffAt ℝ 2 A x) : |
| 224 | (∑ i : Fin 3, (fderiv ℝ (curl (fun y => χ y • A y)) x (coordinateVector i)) i) = 0 := |
| 225 | divergence_curl (hχ.smul hA) |
| 226 | |
| 227 | /-- A cutoff equal to one near a point preserves the original curl there. -/ |
| 228 | theorem curl_cutoff_eq {χ : Space → ℝ} {A : Space → Space} {x : Space} |
| 229 | (hχ : ∀ᶠ y in 𝓝 x, χ y = 1) : curl (fun y => χ y • A y) x = curl A x := by |
| 230 | apply curl_eq_of_eventuallyEq |
| 231 | filter_upwards [hχ] with y hy |
| 232 | simp [hy] |
| 233 | |
| 234 | end NavierStokes.SpatialCurl |