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.R3.H3WeakEmbedding |
| 2 | import NavierStokes.R3.CompactTimeIntegral |
| 3 | import Mathlib.Analysis.Calculus.Deriv.Slope |
| 4 | import Mathlib.Analysis.Calculus.MeanValue |
| 5 | import Mathlib.MeasureTheory.Integral.DominatedConvergence |
| 6 | |
| 7 | /-! # L² time differentiation for compact smooth fields |
| 8 | |
| 9 | Pointwise time differentiation passes to the actual L² space by dominated |
| 10 | convergence of the squared slope error. A compact uniform derivative bound |
| 11 | supplies the domination through the mean value theorem. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | open Set Filter MeasureTheory |
| 17 | open scoped Topology ContDiff InnerProductSpace |
| 18 | |
| 19 | namespace NavierStokesR3.H3Comparison |
| 20 | |
| 21 | open ProblemStatement |
| 22 | |
| 23 | theorem lp_norm_sq_eq_integral (v : Lp Space 2 (volume : Measure Space)) : |
| 24 | ‖v‖ ^ 2 = ∫ x : Space, ‖v x‖ ^ 2 := by |
| 25 | rw [← real_inner_self_eq_norm_sq, L2.inner_def] |
| 26 | apply integral_congr_ae |
| 27 | exact Filter.Eventually.of_forall (fun x => real_inner_self_eq_norm_sq (v x)) |
| 28 | |
| 29 | /-- A compact spatially supported field whose pointwise time derivative is |
| 30 | jointly continuous has the asserted derivative in the genuine L² space. -/ |
| 31 | theorem hasDerivAt_L2_of_compact_support |
| 32 | {a b t : ℝ} {u du : VelocityField} {K : Set Space} |
| 33 | (hK : IsCompact K) (hu : ContinuousOn u (Icc a b ×ˢ univ)) |
| 34 | (hdu : ContinuousOn du (Icc a b ×ˢ univ)) |
| 35 | (hsu : ∀ r ∈ Icc a b, ∀ x ∉ K, u (r, x) = 0) |
| 36 | (hsdu : ∀ r ∈ Icc a b, ∀ x ∉ K, du (r, x) = 0) |
| 37 | (hd : ∀ r ∈ Icc a b, ∀ x : Space, |
| 38 | HasDerivAt (fun s => u (s, x)) (du (r, x)) r) |
| 39 | (ht : t ∈ Ioo a b) |
| 40 | {F : ℝ → Lp Space 2 (volume : Measure Space)} |
| 41 | (hF : ∀ r ∈ Icc a b, F r =ᵐ[volume] fun x => u (r, x)) |
| 42 | {D : Lp Space 2 (volume : Measure Space)} (hD : D =ᵐ[volume] fun x => du (t, x)) : |
| 43 | HasDerivAt F D t := by |
| 44 | have htt : t ∈ Icc a b := Ioo_subset_Icc_self ht |
| 45 | obtain ⟨C, hC⟩ := (isCompact_Icc.prod hK).exists_bound_of_continuousOn |
| 46 | (hdu.mono (Set.prod_mono (Subset.refl _) (subset_univ K))) |
| 47 | let M : ℝ := max C 0 |
| 48 | have hM : 0 ≤ M := le_max_right _ _ |
| 49 | have hbound (r : ℝ) (hr : r ∈ Icc a b) (x : Space) : ‖du (r, x)‖ ≤ M := by |
| 50 | by_cases hx : x ∈ K |
| 51 | · exact (hC (r, x) ⟨hr, hx⟩).trans (le_max_left _ _) |
| 52 | · rw [hsdu r hr x hx, norm_zero] |
| 53 | exact hM |
| 54 | let E : ℝ → Space → Space := fun r x => (r - t)⁻¹ • (u (r, x) - u (t, x)) - du (t, x) |
| 55 | have hEsupport (r : ℝ) (hr : r ∈ Icc a b) (x : Space) (hx : x ∉ K) : E r x = 0 := by |
| 56 | simp only [E, hsu r hr x hx, hsu t htt x hx, hsdu t htt x hx, sub_self, |
| 57 | smul_zero] |
| 58 | have hEnorm (r : ℝ) (hr : r ∈ Icc a b) (hrt : r ≠ t) (x : Space) : ‖E r x‖ ≤ 2 * M := by |
| 59 | have hlip := Convex.norm_image_sub_le_of_norm_hasDerivWithin_le |
| 60 | (fun s hs => (hd s hs x).hasDerivWithinAt) (fun s hs => hbound s hs x) |
| 61 | (convex_Icc a b) htt hr |
| 62 | have hslope : ‖(r - t)⁻¹ • (u (r, x) - u (t, x))‖ ≤ M := by |
| 63 | rw [norm_smul, norm_inv] |
| 64 | calc |
| 65 | ‖r - t‖⁻¹ * ‖u (r, x) - u (t, x)‖ ≤ ‖r - t‖⁻¹ * (M * ‖r - t‖) := |
| 66 | mul_le_mul_of_nonneg_left hlip (inv_nonneg.mpr (norm_nonneg _)) |
| 67 | _ = M := by |
| 68 | have hn : ‖r - t‖ ≠ 0 := norm_ne_zero_iff.mpr (sub_ne_zero.mpr hrt) |
| 69 | field_simp |
| 70 | exact (norm_sub_le _ _).trans (by linarith [hbound t htt x]) |
| 71 | have hnear : ∀ᶠ r in 𝓝[≠] t, r ∈ Icc a b ∧ r ≠ t := by |
| 72 | filter_upwards [nhdsWithin_le_nhds (Ioo_mem_nhds ht.1 ht.2), self_mem_nhdsWithin] |
| 73 | with r hr hrt |
| 74 | exact ⟨Ioo_subset_Icc_self hr, hrt⟩ |
| 75 | let bound : Space → ℝ := K.indicator (fun _ => (2 * M) ^ 2) |
| 76 | have hboundi : Integrable bound := by |
| 77 | exact (integrableOn_const (C := (2 * M) ^ 2) hK.measure_ne_top).integrable_indicator hK.measurableSet |
| 78 | have hmeas : ∀ᶠ r in 𝓝[≠] t, AEStronglyMeasurable (fun x => ‖E r x‖ ^ 2) volume := by |
| 79 | filter_upwards [hnear] with r hr |
| 80 | exact (((CompactTimeIntegral.continuous_slice hu hr.1).sub |
| 81 | (CompactTimeIntegral.continuous_slice hu htt)).const_smul (r - t)⁻¹ |>.sub |
| 82 | (CompactTimeIntegral.continuous_slice hdu htt)).norm.pow 2 |>.aestronglyMeasurable |
| 83 | have hdom : ∀ᶠ r in 𝓝[≠] t, ∀ᵐ x ∂volume, ‖‖E r x‖ ^ 2‖ ≤ bound x := by |
| 84 | filter_upwards [hnear] with r hr |
| 85 | apply Filter.Eventually.of_forall |
| 86 | intro x |
| 87 | rw [Real.norm_of_nonneg (sq_nonneg _)] |
| 88 | by_cases hx : x ∈ K |
| 89 | · dsimp only [bound] |
| 90 | rw [Set.indicator_of_mem hx] |
| 91 | exact pow_le_pow_left₀ (norm_nonneg _) (hEnorm r hr.1 hr.2 x) 2 |
| 92 | · dsimp only [bound] |
| 93 | rw [Set.indicator_of_notMem hx, hEsupport r hr.1 x hx] |
| 94 | simp |
| 95 | have hpoint : ∀ᵐ x ∂volume, Tendsto (fun r => ‖E r x‖ ^ 2) (𝓝[≠] t) (𝓝 0) := by |
| 96 | apply Filter.Eventually.of_forall |
| 97 | intro x |
| 98 | have hs := (hd t htt x).tendsto_slope |
| 99 | have hc : Tendsto (fun _ : ℝ => du (t, x)) (𝓝[≠] t) (𝓝 (du (t, x))) := |
| 100 | tendsto_const_nhds |
| 101 | simpa only [E, slope_def_module, sub_self, norm_zero, ne_eq, OfNat.ofNat_ne_zero, |
| 102 | not_false_eq_true, zero_pow] using (hs.sub hc).norm.pow 2 |
| 103 | have hint := tendsto_integral_filter_of_dominated_convergence bound hmeas hdom hboundi hpoint |
| 104 | have hint0 : Tendsto (fun r => ∫ x, ‖E r x‖ ^ 2) (𝓝[≠] t) (𝓝 0) := by |
| 105 | simpa only [integral_zero] using hint |
| 106 | have hcoe (r : ℝ) (hr : r ∈ Icc a b) : |
| 107 | (slope F t r - D : Lp Space 2 (volume : Measure Space)) =ᵐ[volume] E r := by |
| 108 | filter_upwards [Lp.coeFn_sub (slope F t r) D, |
| 109 | Lp.coeFn_smul (r - t)⁻¹ (F r - F t), Lp.coeFn_sub (F r) (F t), hF r hr, hF t htt, hD] |
| 110 | with x h1 h2 h3 h4 h5 h6 |
| 111 | simp only [Pi.smul_apply, Pi.sub_apply] at h1 h2 h3 |
| 112 | rw [h1] |
| 113 | change ((r - t)⁻¹ • (F r - F t) : Lp Space 2 (volume : Measure Space)) x - D x = _ |
| 114 | rw [h2, h3, h4, h5, h6] |
| 115 | have heq : (fun r => ‖slope F t r - D‖ ^ 2) =ᶠ[𝓝[≠] t] fun r => ∫ x, ‖E r x‖ ^ 2 := by |
| 116 | filter_upwards [hnear] with r hr |
| 117 | rw [lp_norm_sq_eq_integral] |
| 118 | exact integral_congr_ae ((hcoe r hr.1).fun_comp (fun x => ‖x‖ ^ 2)) |
| 119 | have hsquare := hint0.congr' heq.symm |
| 120 | apply hasDerivAt_iff_tendsto_slope.mpr |
| 121 | apply tendsto_iff_norm_sub_tendsto_zero.mpr |
| 122 | simpa only [Real.sqrt_sq_eq_abs, abs_of_nonneg (norm_nonneg _), Real.sqrt_zero] using hsquare.sqrt |
| 123 | |
| 124 | end NavierStokesR3.H3Comparison |