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.R3LocalizedPressure |
| 2 | import NavierStokes.PeriodicUniqueness |
| 3 | |
| 4 | /-! |
| 5 | # Real fields in the complex space-time pressure calculation |
| 6 | |
| 7 | These lemmas identify each space-time directional derivative with the |
| 8 | physical spatial or temporal derivative, including the Laplacian. |
| 9 | -/ |
| 10 | |
| 11 | noncomputable section |
| 12 | namespace NavierStokes.R3SpaceTimeCalculus |
| 13 | |
| 14 | open Set Filter MeasureTheory ProblemStatement |
| 15 | open R3SpaceTime R3WeakPressure R3LocalizedPressure |
| 16 | open scoped ContDiff |
| 17 | |
| 18 | def unpack : Domain ≃L[ℝ] SpaceTime := WithLp.prodContinuousLinearEquiv 2 ℝ ℝ Space |
| 19 | |
| 20 | def liftScalar (f : PressureField) (z : Domain) : ℂ := (f (timeProj z, spaceProj z) : ℝ) |
| 21 | |
| 22 | def liftVelocity (u : VelocityField) (i : Fin 3) : Domain → ℂ := liftScalar (fun tx => u tx i) |
| 23 | |
| 24 | @[simp] theorem liftScalar_pack (f : PressureField) (t : ℝ) (x : Space) : |
| 25 | liftScalar f (pack t x) = (f (t, x) : ℂ) := rfl |
| 26 | |
| 27 | @[simp] theorem liftVelocity_pack (u : VelocityField) (i : Fin 3) (t : ℝ) (x : Space) : |
| 28 | liftVelocity u i (pack t x) = (u (t, x) i : ℂ) := rfl |
| 29 | |
| 30 | theorem liftScalar_smooth {s : Set ℝ} {f : PressureField} |
| 31 | (hf : ContDiffOn ℝ ∞ f (s ×ˢ (univ : Set Space))) : |
| 32 | ContDiffOn ℝ ∞ (liftScalar f) (timeProj ⁻¹' s) := by |
| 33 | apply Complex.ofRealCLM.contDiff.comp_contDiffOn |
| 34 | (hf.comp unpack.contDiff.contDiffOn ?_) |
| 35 | intro z hz |
| 36 | exact ⟨hz, mem_univ _⟩ |
| 37 | |
| 38 | theorem liftVelocity_smooth {s : Set ℝ} {u : VelocityField} |
| 39 | (hu : ContDiffOn ℝ ∞ u (s ×ˢ (univ : Set Space))) (i : Fin 3) : |
| 40 | ContDiffOn ℝ ∞ (liftVelocity u i) (timeProj ⁻¹' s) := |
| 41 | liftScalar_smooth ((EuclideanSpace.proj i : Space →L[ℝ] ℝ).contDiff.comp_contDiffOn hu) |
| 42 | |
| 43 | theorem slice_smooth {s : Set ℝ} {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 44 | {f : SpaceTime → V} (hf : ContDiffOn ℝ ∞ f (s ×ˢ (univ : Set Space))) |
| 45 | {t : ℝ} (ht : t ∈ s) : ContDiff ℝ ∞ (fun x : Space => f (t, x)) := by |
| 46 | rw [← contDiffOn_univ] |
| 47 | exact hf.comp (contDiff_const.prodMk contDiff_id).contDiffOn (fun x _ => ⟨ht, mem_univ x⟩) |
| 48 | |
| 49 | theorem differentiable_at {s : Set ℝ} (hs : IsOpen s) {F : Domain → ℂ} |
| 50 | (hF : ContDiffOn ℝ ∞ F (timeProj ⁻¹' s)) {t : ℝ} (ht : t ∈ s) (x : Space) : |
| 51 | DifferentiableAt ℝ F (pack t x) := |
| 52 | (hF.contDiffAt ((hs.preimage timeProj.continuous).mem_nhds ht)).differentiableAt (by simp) |
| 53 | |
| 54 | theorem spatial_slice_derivative {F : Domain → ℂ} {t : ℝ} {x : Space} |
| 55 | (hF : DifferentiableAt ℝ F (pack t x)) (i : Fin 3) : |
| 56 | directional (spaceDirection i) F (pack t x) = |
| 57 | fderiv ℝ (fun y => F (pack t y)) x (coordinateVector i) := by |
| 58 | have hpack := unpack.symm.hasFDerivAt.comp x |
| 59 | ((hasFDerivAt_const t x).prodMk (hasFDerivAt_id x)) |
| 60 | have h := (hF.hasFDerivAt.comp x hpack).fderiv |
| 61 | have hh := congrArg (fun A : Space →L[ℝ] ℂ => A (coordinateVector i)) h |
| 62 | exact hh.symm |
| 63 | |
| 64 | theorem temporal_slice_derivative {F : Domain → ℂ} {t : ℝ} {x : Space} |
| 65 | (hF : DifferentiableAt ℝ F (pack t x)) : |
| 66 | directional timeDirection F (pack t x) = deriv (fun s => F (pack s x)) t := by |
| 67 | have hpack := unpack.symm.hasFDerivAt.comp_hasDerivAt t |
| 68 | ((hasDerivAt_id t).prodMk (hasDerivAt_const t x)) |
| 69 | have h := (hF.hasFDerivAt.comp_hasDerivAt t hpack).deriv |
| 70 | exact h.symm |
| 71 | |
| 72 | theorem fderiv_ofReal {f : Space → ℝ} (hf : ContDiff ℝ ∞ f) (x v : Space) : |
| 73 | fderiv ℝ (fun y => (f y : ℂ)) x v = (fderiv ℝ f x v : ℝ) := by |
| 74 | change fderiv ℝ (Complex.ofRealCLM ∘ f) x v = _ |
| 75 | rw [(Complex.ofRealCLM.hasFDerivAt.comp x (hf.differentiable (by simp) x).hasFDerivAt).fderiv] |
| 76 | rfl |
| 77 | |
| 78 | theorem lift_space_derivative {s : Set ℝ} (hs : IsOpen s) {f : PressureField} |
| 79 | (hf : ContDiffOn ℝ ∞ f (s ×ˢ (univ : Set Space))) {t : ℝ} (ht : t ∈ s) (x : Space) (i : Fin 3) : |
| 80 | directional (spaceDirection i) (liftScalar f) (pack t x) = |
| 81 | (fderiv ℝ (fun y => f (t, y)) x (coordinateVector i) : ℝ) := by |
| 82 | rw [spatial_slice_derivative (differentiable_at hs (liftScalar_smooth hf) ht x)] |
| 83 | exact fderiv_ofReal (slice_smooth hf ht) x (coordinateVector i) |
| 84 | |
| 85 | theorem lift_laplacian {s : Set ℝ} (hs : IsOpen s) {f : PressureField} |
| 86 | (hf : ContDiffOn ℝ ∞ f (s ×ˢ (univ : Set Space))) {t : ℝ} (ht : t ∈ s) (x : Space) : |
| 87 | functionLaplacian (liftScalar f) (pack t x) = |
| 88 | (∑ i : Fin 3, fderiv ℝ (fun y => fderiv ℝ (fun z => f (t, z)) y (coordinateVector i)) x |
| 89 | (coordinateVector i) : ℝ) := by |
| 90 | have hfs := liftScalar_smooth hf |
| 91 | unfold functionLaplacian |
| 92 | rw [Complex.ofReal_sum] |
| 93 | apply Finset.sum_congr rfl |
| 94 | intro i _ |
| 95 | rw [spatial_slice_derivative (differentiable_at hs |
| 96 | (directional_contDiffOn (hs.preimage timeProj.continuous) hfs (spaceDirection i)) ht x)] |
| 97 | have he : (fun y => directional (spaceDirection i) (liftScalar f) (pack t y)) = |
| 98 | (fun y => (fderiv ℝ (fun z => f (t, z)) y (coordinateVector i) : ℂ)) := |
| 99 | funext fun y => lift_space_derivative hs hf ht y i |
| 100 | rw [he] |
| 101 | exact fderiv_ofReal (PeriodicUniqueness.spatial_partial_contDiff (slice_smooth hf ht) i) x (coordinateVector i) |
| 102 | |
| 103 | theorem liftVelocity_laplacian {s : Set ℝ} (hs : IsOpen s) {u : VelocityField} |
| 104 | (hu : ContDiffOn ℝ ∞ u (s ×ˢ (univ : Set Space))) {t : ℝ} (ht : t ∈ s) (x : Space) (i : Fin 3) : |
| 105 | functionLaplacian (liftVelocity u i) (pack t x) = (spatialLaplacian u t x i : ℂ) := by |
| 106 | have hui : ContDiffOn ℝ ∞ (fun z => u z i) (s ×ˢ (univ : Set Space)) := |
| 107 | (EuclideanSpace.proj i : Space →L[ℝ] ℝ).contDiff.comp_contDiffOn hu |
| 108 | rw [liftVelocity, lift_laplacian hs hui ht] |
| 109 | congr 1 |
| 110 | have hus := slice_smooth hu ht |
| 111 | change _ = (EuclideanSpace.proj i : Space →L[ℝ] ℝ) (ProblemStatement.spatialLaplacian u t x) |
| 112 | rw [ProblemStatement.spatialLaplacian, map_sum] |
| 113 | apply Finset.sum_congr rfl |
| 114 | intro j _ |
| 115 | simp_rw [PeriodicUniqueness.fderiv_component hus] |
| 116 | exact PeriodicUniqueness.fderiv_component (PeriodicUniqueness.spatial_partial_contDiff hus j) i x (coordinateVector j) |
| 117 | |
| 118 | theorem liftVelocity_time {s : Set ℝ} (hs : IsOpen s) {u : VelocityField} |
| 119 | (hu : ContDiffOn ℝ ∞ u (s ×ˢ (univ : Set Space))) {t : ℝ} (ht : t ∈ s) (x : Space) (i : Fin 3) : |
| 120 | directional timeDirection (liftVelocity u i) (pack t x) = (temporalDerivative u t x i : ℂ) := by |
| 121 | rw [temporal_slice_derivative (differentiable_at hs (liftVelocity_smooth hu i) ht x)] |
| 122 | have hud : DifferentiableAt ℝ (fun r : ℝ => u (r, x)) t := |
| 123 | ((hu.contDiffAt ((hs.prod isOpen_univ).mem_nhds ⟨ht, mem_univ x⟩)).comp t |
| 124 | (contDiffAt_id.prodMk contDiffAt_const)).differentiableAt (by simp) |
| 125 | have h := (Complex.ofRealCLM.comp (EuclideanSpace.proj i)).hasFDerivAt.comp_hasDerivAt t hud.hasDerivAt |
| 126 | exact h.deriv |
| 127 | |
| 128 | theorem liftVelocity_divergence {s : Set ℝ} (hs : IsOpen s) {u : VelocityField} |
| 129 | (hu : ContDiffOn ℝ ∞ u (s ×ˢ (univ : Set Space))) {t : ℝ} (ht : t ∈ s) (x : Space) : |
| 130 | functionDivergence (liftVelocity u) (pack t x) = (spatialDivergence u t x : ℂ) := by |
| 131 | unfold functionDivergence spatialDivergence |
| 132 | rw [Complex.ofReal_sum] |
| 133 | apply Finset.sum_congr rfl |
| 134 | intro i _ |
| 135 | have hui : ContDiffOn ℝ ∞ (fun z => u z i) (s ×ˢ (univ : Set Space)) := |
| 136 | (EuclideanSpace.proj i : Space →L[ℝ] ℝ).contDiff.comp_contDiffOn hu |
| 137 | rw [liftVelocity, lift_space_derivative hs hui ht] |
| 138 | rw [PeriodicUniqueness.fderiv_component (slice_smooth hu ht)] |
| 139 | rfl |
| 140 | |
| 141 | end NavierStokes.R3SpaceTimeCalculus |