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.H3Embedding |
| 2 | import NavierStokes.R3.H3Approximation |
| 3 | import Mathlib.MeasureTheory.Function.ConvergenceInMeasure |
| 4 | |
| 5 | /-! # Sobolev embedding for genuine weak H³ fields |
| 6 | |
| 7 | The estimate is passed through a smooth compact approximation in L² of all |
| 8 | weak jets. No classical derivatives of the limiting field are used. |
| 9 | -/ |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | open Set Filter MeasureTheory |
| 14 | open scoped ContDiff Topology InnerProductSpace BigOperators |
| 15 | |
| 16 | namespace NavierStokesR3.H3Embedding |
| 17 | |
| 18 | open NavierStokes.ProblemStatement NavierStokes.PeriodicIntegration |
| 19 | open H3Comparison |
| 20 | |
| 21 | def weakH3Energy (f : Space → Space) (df : Fin 3 → Space → Space) |
| 22 | (ddf : Fin 3 → Fin 3 → Space → Space) |
| 23 | (dddf : Fin 3 → Fin 3 → Fin 3 → Space → Space) : ℝ := |
| 24 | squareEnergy f + squareEnergy (df 0) + squareEnergy (df 1) + squareEnergy (df 2) + |
| 25 | squareEnergy (ddf 1 0) + squareEnergy (ddf 2 0) + squareEnergy (ddf 2 1) + |
| 26 | squareEnergy (dddf 2 1 0) + (∑ i, ∑ j, squareEnergy (ddf i j)) + |
| 27 | (∑ i, ∑ j, ∑ k, squareEnergy (dddf i j k)) |
| 28 | |
| 29 | def weakH3Norm (f : Space → Space) (df : Fin 3 → Space → Space) |
| 30 | (ddf : Fin 3 → Fin 3 → Space → Space) |
| 31 | (dddf : Fin 3 → Fin 3 → Fin 3 → Space → Space) : ℝ := |
| 32 | Real.sqrt (weakH3Energy f df ddf dddf) |
| 33 | |
| 34 | theorem weakH3Energy_nonneg (f : Space → Space) (df : Fin 3 → Space → Space) |
| 35 | (ddf : Fin 3 → Fin 3 → Space → Space) |
| 36 | (dddf : Fin 3 → Fin 3 → Fin 3 → Space → Space) : |
| 37 | 0 ≤ weakH3Energy f df ddf dddf := by |
| 38 | have h2 : 0 ≤ ∑ i, ∑ j, squareEnergy (ddf i j) := |
| 39 | Finset.sum_nonneg (fun _ _ => Finset.sum_nonneg (fun _ _ => squareEnergy_nonneg _)) |
| 40 | have h3 : 0 ≤ ∑ i, ∑ j, ∑ k, squareEnergy (dddf i j k) := |
| 41 | Finset.sum_nonneg (fun _ _ => Finset.sum_nonneg (fun _ _ => |
| 42 | Finset.sum_nonneg (fun _ _ => squareEnergy_nonneg _))) |
| 43 | unfold weakH3Energy |
| 44 | apply add_nonneg (add_nonneg _ h2) h3 |
| 45 | repeat' apply add_nonneg |
| 46 | all_goals exact squareEnergy_nonneg _ |
| 47 | |
| 48 | theorem squareEnergy_eq_norm_toLp {f : Space → Space} (hf : MemLp f 2 volume) : |
| 49 | squareEnergy f = ‖hf.toLp f‖ ^ 2 := by |
| 50 | rw [← real_inner_self_eq_norm_sq, L2.inner_def] |
| 51 | apply integral_congr_ae |
| 52 | filter_upwards [hf.coeFn_toLp] with x hx |
| 53 | rw [hx, real_inner_self_eq_norm_sq] |
| 54 | |
| 55 | theorem squareEnergy_tendsto_of_toLp {f : ℕ → Space → Space} {g : Space → Space} |
| 56 | (hf : ∀ n, MemLp (f n) 2 volume) (hg : MemLp g 2 volume) |
| 57 | (ht : Tendsto (fun n => (hf n).toLp (f n)) atTop (𝓝 (hg.toLp g))) : |
| 58 | Tendsto (fun n => squareEnergy (f n)) atTop (𝓝 (squareEnergy g)) := by |
| 59 | have he : (fun n => squareEnergy (f n)) = fun n => ‖(hf n).toLp (f n)‖ ^ 2 := |
| 60 | funext (fun n => squareEnergy_eq_norm_toLp (hf n)) |
| 61 | rw [he, squareEnergy_eq_norm_toLp hg] |
| 62 | exact ht.norm.pow 2 |
| 63 | |
| 64 | theorem approximation_energy_tendsto {f : Space → Space} {df : Fin 3 → Space → Space} |
| 65 | {ddf : Fin 3 → Fin 3 → Space → Space} |
| 66 | {dddf : Fin 3 → Fin 3 → Fin 3 → Space → Space} |
| 67 | (h : H3Approximation f df ddf dddf) : |
| 68 | Tendsto (fun n => derivativeH3Energy (h.approx n)) atTop |
| 69 | (𝓝 (weakH3Energy f df ddf dddf)) := by |
| 70 | have h0 := squareEnergy_tendsto_of_toLp h.approx_memLp h.memLp h.tendsto |
| 71 | have h1 (i) := squareEnergy_tendsto_of_toLp (fun n => h.derivative_approx_memLp n i) |
| 72 | (h.derivative_memLp i) (h.derivative_tendsto i) |
| 73 | have h2 (i j) := squareEnergy_tendsto_of_toLp (fun n => h.second_approx_memLp n i j) |
| 74 | (h.second_memLp i j) (h.second_tendsto i j) |
| 75 | have h3 (i j k) := squareEnergy_tendsto_of_toLp (fun n => h.third_approx_memLp n i j k) |
| 76 | (h.third_memLp i j k) (h.third_tendsto i j k) |
| 77 | apply ((((((((h0.add (h1 0)).add (h1 1)).add (h1 2)).add (h2 1 0)).add |
| 78 | (h2 2 0)).add (h2 2 1)).add (h3 2 1 0)).add ?_).add ?_ |
| 79 | · exact tendsto_finsetSum _ (fun i _ => tendsto_finsetSum _ (fun j _ => h2 i j)) |
| 80 | · exact tendsto_finsetSum _ (fun i _ => tendsto_finsetSum _ (fun j _ => |
| 81 | tendsto_finsetSum _ (fun k _ => h3 i j k))) |
| 82 | |
| 83 | theorem approximation_finiteH3 {f : Space → Space} {df : Fin 3 → Space → Space} |
| 84 | {ddf : Fin 3 → Fin 3 → Space → Space} |
| 85 | {dddf : Fin 3 → Fin 3 → Fin 3 → Space → Space} |
| 86 | (h : H3Approximation f df ddf dddf) (n : ℕ) : HasFiniteH3 (h.approx n) := by |
| 87 | refine ⟨?_, ?_, ?_, ?_⟩ |
| 88 | · exact (memLp_two_iff_integrable_sq_norm (h.approx_memLp n).aestronglyMeasurable).1 |
| 89 | (h.approx_memLp n) |
| 90 | · intro i |
| 91 | exact (memLp_two_iff_integrable_sq_norm |
| 92 | (h.derivative_approx_memLp n i).aestronglyMeasurable).1 (h.derivative_approx_memLp n i) |
| 93 | · intro i j |
| 94 | exact (memLp_two_iff_integrable_sq_norm |
| 95 | (h.second_approx_memLp n i j).aestronglyMeasurable).1 (h.second_approx_memLp n i j) |
| 96 | · intro i j k |
| 97 | exact (memLp_two_iff_integrable_sq_norm |
| 98 | (h.third_approx_memLp n i j k).aestronglyMeasurable).1 (h.third_approx_memLp n i j k) |
| 99 | |
| 100 | /-- The whole-space Sobolev estimate for almost every value of any weak H³ |
| 101 | representative. -/ |
| 102 | theorem ae_norm_sq_le_weakH3Energy {f : Space → Space} {df : Fin 3 → Space → Space} |
| 103 | {ddf : Fin 3 → Fin 3 → Space → Space} |
| 104 | {dddf : Fin 3 → Fin 3 → Fin 3 → Space → Space} |
| 105 | (h : H3Approximation f df ddf dddf) : |
| 106 | ∀ᵐ x ∂volume, ‖f x‖ ^ 2 ≤ 8 * weakH3Energy f df ddf dddf := by |
| 107 | obtain ⟨ns, hns, hae⟩ := (tendstoInMeasure_of_tendsto_Lp h.tendsto).exists_seq_tendsto_ae |
| 108 | have ha : ∀ᵐ x ∂volume, ∀ n, (h.approx_memLp (ns n)).toLp (h.approx (ns n)) x = |
| 109 | h.approx (ns n) x := |
| 110 | ae_all_iff.2 (fun n => (h.approx_memLp (ns n)).coeFn_toLp) |
| 111 | filter_upwards [hae, ha, h.memLp.coeFn_toLp] with x hx hax hfx |
| 112 | have ht : Tendsto (fun n => h.approx (ns n) x) atTop (𝓝 (f x)) := by |
| 113 | simpa only [hax, hfx] using hx |
| 114 | have hen := (approximation_energy_tendsto h).comp hns.tendsto_atTop |
| 115 | exact le_of_tendsto_of_tendsto (ht.norm.pow 2) (tendsto_const_nhds.mul hen) |
| 116 | (Filter.Eventually.of_forall (fun n => |
| 117 | norm_sq_le_eight_derivativeH3Energy (h.smooth (ns n)) (approximation_finiteH3 h (ns n)) x)) |
| 118 | |
| 119 | /-- A continuous representative of a weak H³ field satisfies the Sobolev |
| 120 | bound at every point. -/ |
| 121 | theorem norm_sq_le_weakH3Energy {f : Space → Space} {df : Fin 3 → Space → Space} |
| 122 | {ddf : Fin 3 → Fin 3 → Space → Space} |
| 123 | {dddf : Fin 3 → Fin 3 → Fin 3 → Space → Space} |
| 124 | (h : H3Approximation f df ddf dddf) (hf : Continuous f) (x : Space) : |
| 125 | ‖f x‖ ^ 2 ≤ 8 * weakH3Energy f df ddf dddf := by |
| 126 | have hc : IsClosed {x | ‖f x‖ ^ 2 ≤ 8 * weakH3Energy f df ddf dddf} := |
| 127 | isClosed_le (hf.norm.pow 2) continuous_const |
| 128 | have heq := hc.ae_eq_univ_iff_eq.mp (show |
| 129 | {x | ‖f x‖ ^ 2 ≤ 8 * weakH3Energy f df ddf dddf} =ᵐ[volume] univ from by |
| 130 | filter_upwards [ae_norm_sq_le_weakH3Energy h] with y hy |
| 131 | exact propext ⟨fun _ => mem_univ y, fun _ => hy⟩) |
| 132 | change x ∈ {x | ‖f x‖ ^ 2 ≤ 8 * weakH3Energy f df ddf dddf} |
| 133 | rw [heq] |
| 134 | exact mem_univ _ |
| 135 | |
| 136 | theorem norm_le_weakH3Norm {f : Space → Space} {df : Fin 3 → Space → Space} |
| 137 | {ddf : Fin 3 → Fin 3 → Space → Space} |
| 138 | {dddf : Fin 3 → Fin 3 → Fin 3 → Space → Space} |
| 139 | (h : H3Approximation f df ddf dddf) (hf : Continuous f) (x : Space) : |
| 140 | ‖f x‖ ≤ 3 * weakH3Norm f df ddf dddf := by |
| 141 | have he := norm_sq_le_weakH3Energy h hf x |
| 142 | have hn : 0 ≤ weakH3Norm f df ddf dddf := Real.sqrt_nonneg _ |
| 143 | have hs : weakH3Norm f df ddf dddf ^ 2 = weakH3Energy f df ddf dddf := |
| 144 | Real.sq_sqrt (weakH3Energy_nonneg f df ddf dddf) |
| 145 | nlinarith [weakH3Energy_nonneg f df ddf dddf] |
| 146 | |
| 147 | end NavierStokesR3.H3Embedding |