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.NativeBandExtension |
| 2 | |
| 3 | /-! |
| 4 | # Literal flat dyadic products from locally bounded interior jets |
| 5 | |
| 6 | The unmasked factor is smooth only in the open dyadic band. Its actual |
| 7 | interior jets are locally bounded at each face. Flatness of the fixed cutoff |
| 8 | then proves smoothness and vanishing of all jets of the literal product, |
| 9 | without assigning new values to the unmasked factor outside the band. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | |
| 14 | namespace NavierStokes.FlatDyadicExtension |
| 15 | |
| 16 | open Set Function Filter |
| 17 | open WaveEdgeExtension (window windowDomain extension extendedJets) |
| 18 | open scoped Topology ContDiff BigOperators |
| 19 | |
| 20 | variable {D E : Type*} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 21 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 22 | |
| 23 | private theorem nat_le_infty (n : ℕ) : (n : WithTop ℕ∞) ≤ ∞ := |
| 24 | ENat.natCast_le_of_coe_top_le_withTop le_rfl n |
| 25 | |
| 26 | /-- The constant and neighborhood may depend on the face point and finite |
| 27 | jet order. Values and derivatives of `g` outside the open band are unused. -/ |
| 28 | def LocalJetBounds (Ω : Set D) (q : D → ℝ) (g : D → E) : Prop := |
| 29 | ∀ x ∈ Ω, q x = 1 / 2 ∨ q x = 2 → ∀ m : ℕ, |
| 30 | ∃ C : ℝ, 0 ≤ C ∧ ∀ᶠ y in 𝓝 x, |
| 31 | y ∈ windowDomain Ω q (1 / 2) 2 → |
| 32 | ∀ j : ℕ, j ≤ m → ‖iteratedFDeriv ℝ j g y‖ ≤ C |
| 33 | |
| 34 | theorem tensor_hasFDerivAt {f : D → E} {x : D} (hf : ContDiffAt ℝ ∞ f x) (n : ℕ) : |
| 35 | HasFDerivAt (iteratedFDeriv ℝ n f) (iteratedFDeriv ℝ (n + 1) f x).curryLeft x := by |
| 36 | have hi : ContDiffAt ℝ 1 (iteratedFDeriv ℝ n f) x := |
| 37 | hf.iteratedFDeriv_right (by exact_mod_cast (le_top : 1 + (n : ℕ∞) ≤ ⊤)) |
| 38 | have hd := (hi.differentiableAt (by simp)).hasFDerivAt |
| 39 | simp only [fderiv_iteratedFDeriv, Function.comp_apply] at hd |
| 40 | exact hd |
| 41 | |
| 42 | /-- One extra zero tensor makes each flat jet little-o of ambient distance. -/ |
| 43 | theorem flat_jet_isLittleO {f : D → E} {x : D} (hf : ContDiffAt ℝ ∞ f x) |
| 44 | (hz : ∀ n : ℕ, iteratedFDeriv ℝ n f x = 0) (n : ℕ) : |
| 45 | (iteratedFDeriv ℝ n f) =o[𝓝 x] (fun y => y - x) := by |
| 46 | have hcurry : (0 : D[×(n + 1)]→L[ℝ] E).curryLeft = 0 := by |
| 47 | ext u v |
| 48 | rfl |
| 49 | have hd : HasFDerivAt (iteratedFDeriv ℝ n f) (0 : D →L[ℝ] (D[×n]→L[ℝ] E)) x := by |
| 50 | have ht := tensor_hasFDerivAt hf n |
| 51 | rw [hz (n + 1), hcurry] at ht |
| 52 | exact ht |
| 53 | rw [hasFDerivAt_iff_isLittleO] at hd |
| 54 | simpa only [hz n, _root_.zero_apply, sub_zero] using |
| 55 | hd |
| 56 | |
| 57 | /-- A flat smooth scalar times a factor with locally bounded interior jets |
| 58 | has little-o interior product jets. Zero extension needs no source values |
| 59 | or source regularity on the other side of the boundary. -/ |
| 60 | theorem product_jet_extension_isLittleO {Ω : Set D} (hΩ : IsOpen Ω) |
| 61 | {q φ : D → ℝ} (hq : ContinuousOn q Ω) (hφ : ContDiffOn ℝ ∞ φ Ω) |
| 62 | {a b : ℝ} {g : D → E} (hg : ContDiffOn ℝ ∞ g (windowDomain Ω q a b)) |
| 63 | {x : D} (hx : x ∈ Ω) (hflat : ∀ n : ℕ, iteratedFDeriv ℝ n φ x = 0) |
| 64 | (m : ℕ) |
| 65 | (hB : ∃ C : ℝ, 0 ≤ C ∧ ∀ᶠ y in 𝓝 x, |
| 66 | y ∈ windowDomain Ω q a b → ∀ j : ℕ, j ≤ m → ‖iteratedFDeriv ℝ j g y‖ ≤ C) : |
| 67 | extension q a b (iteratedFDeriv ℝ m (fun y => φ y • g y)) |
| 68 | =o[𝓝 x] (fun y => y - x) := by |
| 69 | obtain ⟨C, hC, hb⟩ := hB |
| 70 | let M : ℝ := C + 1 |
| 71 | have hM : 0 < M := by dsimp [M]; linarith |
| 72 | have hCM : C ≤ M := by dsimp [M]; linarith |
| 73 | have hU := WaveEdgeExtension.windowDomain_open hΩ hq a b |
| 74 | have hφx := hφ.contDiffAt (hΩ.mem_nhds hx) |
| 75 | apply Asymptotics.IsLittleO.of_bound |
| 76 | intro ε hε |
| 77 | let δ : ℝ := ε / ((2 : ℝ) ^ m * M) |
| 78 | have hden : 0 < (2 : ℝ) ^ m * M := mul_pos (pow_pos (by norm_num) _) hM |
| 79 | have hδ : 0 < δ := div_pos hε hden |
| 80 | have hsmall : ∀ᶠ y in 𝓝 x, ∀ j ∈ Finset.range (m + 1), |
| 81 | ‖iteratedFDeriv ℝ j φ y‖ ≤ δ * ‖y - x‖ := |
| 82 | (eventually_all_finset _).2 (fun j _ => (flat_jet_isLittleO hφx hflat j).bound hδ) |
| 83 | filter_upwards [hΩ.mem_nhds hx, hb, hsmall] with y hyΩ hby hsy |
| 84 | by_cases hy : y ∈ window q a b |
| 85 | · rw [WaveEdgeExtension.extension_inside q a b _ hy] |
| 86 | have hyU : y ∈ windowDomain Ω q a b := ⟨hyΩ, hy⟩ |
| 87 | change IsOpen (Ω ∩ window q a b) at hU |
| 88 | change y ∈ Ω ∩ window q a b at hyU |
| 89 | have hprod := norm_iteratedFDerivWithin_smul_le |
| 90 | (hφ.mono (inter_subset_left (t := window q a b))) hg hU.uniqueDiffOn hyU |
| 91 | (n := m) (nat_le_infty m) |
| 92 | simp only [iteratedFDerivWithin_of_isOpen _ hU hyU] at hprod |
| 93 | calc |
| 94 | _ ≤ ∑ j ∈ Finset.range (m + 1), (m.choose j : ℝ) * |
| 95 | ‖iteratedFDeriv ℝ j φ y‖ * ‖iteratedFDeriv ℝ (m - j) g y‖ := hprod |
| 96 | _ ≤ ∑ j ∈ Finset.range (m + 1), (m.choose j : ℝ) * (δ * ‖y - x‖) * M := by |
| 97 | apply Finset.sum_le_sum |
| 98 | intro j hj |
| 99 | exact mul_le_mul |
| 100 | (mul_le_mul_of_nonneg_left (hsy j hj) (Nat.cast_nonneg _)) |
| 101 | ((hby hyU (m - j) (Nat.sub_le _ _)).trans hCM) |
| 102 | (norm_nonneg _) (mul_nonneg (Nat.cast_nonneg _) (mul_nonneg hδ.le (norm_nonneg _))) |
| 103 | _ = (2 : ℝ) ^ m * (δ * ‖y - x‖) * M := by |
| 104 | rw [← Finset.sum_mul, ← Finset.sum_mul] |
| 105 | have hchoose : (∑ j ∈ Finset.range (m + 1), (m.choose j : ℝ)) = (2 : ℝ) ^ m := by |
| 106 | exact_mod_cast Nat.sum_range_choose m |
| 107 | rw [hchoose] |
| 108 | _ = (δ * ((2 : ℝ) ^ m * M)) * ‖y - x‖ := by ring |
| 109 | _ = ε * ‖y - x‖ := by rw [div_mul_cancel₀ ε hden.ne'] |
| 110 | · rw [WaveEdgeExtension.extension_outside q a b _ hy, norm_zero] |
| 111 | exact mul_nonneg hε.le (norm_nonneg _) |
| 112 | |
| 113 | /-! ## A Taylor family for the literal window extension -/ |
| 114 | |
| 115 | def SmallOJets (Ω : Set D) (q : D → ℝ) (a b : ℝ) (f : D → E) : Prop := |
| 116 | ∀ n : ℕ, ∀ x ∈ Ω, q x = a ∨ q x = b → |
| 117 | extension q a b (iteratedFDeriv ℝ n f) =o[𝓝 x] (fun y => y - x) |
| 118 | |
| 119 | theorem hasFDerivAt_extension_zero {q : D → ℝ} {a b : ℝ} {f : D → E} {x : D} |
| 120 | (hx : x ∉ window q a b) |
| 121 | (hf : extension q a b f =o[𝓝 x] (fun y => y - x)) : |
| 122 | HasFDerivAt (extension q a b f) (0 : D →L[ℝ] E) x := by |
| 123 | rw [hasFDerivAt_iff_isLittleO] |
| 124 | simpa only [WaveEdgeExtension.extension_outside q a b f hx, |
| 125 | _root_.zero_apply, sub_zero] using hf |
| 126 | |
| 127 | theorem extendedJets_hasFDerivAt {Ω : Set D} (hΩ : IsOpen Ω) {q : D → ℝ} |
| 128 | (hq : ContinuousOn q Ω) {a b : ℝ} {f : D → E} |
| 129 | (hf : ContDiffOn ℝ ∞ f (windowDomain Ω q a b)) |
| 130 | (hB : SmallOJets Ω q a b f) (n : ℕ) {x : D} (hx : x ∈ Ω) : |
| 131 | HasFDerivAt (fun y => extendedJets q a b f y n) |
| 132 | (extendedJets q a b f x (n + 1)).curryLeft x := by |
| 133 | have hqc := (hq x hx).continuousAt (hΩ.mem_nhds hx) |
| 134 | change HasFDerivAt (extension q a b (iteratedFDeriv ℝ n f)) |
| 135 | (extension q a b (iteratedFDeriv ℝ (n + 1) f) x).curryLeft x |
| 136 | have hcurry : (0 : D[×(n + 1)]→L[ℝ] E).curryLeft = 0 := by |
| 137 | ext u v |
| 138 | rfl |
| 139 | rcases lt_trichotomy (q x) a with hleft | heq | hleft |
| 140 | · have hn : x ∉ window q a b := fun h => (not_lt_of_ge hleft.le) h.1 |
| 141 | rw [WaveEdgeExtension.extension_outside q a b _ hn, hcurry] |
| 142 | exact (hasFDerivAt_const (0 : D[×n]→L[ℝ] E) x).congr_of_eventuallyEq |
| 143 | (WaveEdgeExtension.extension_germ_left a b _ hqc hleft) |
| 144 | · have hn : x ∉ window q a b := fun h => (not_lt_of_ge heq.le) h.1 |
| 145 | rw [WaveEdgeExtension.extension_outside q a b _ hn, hcurry] |
| 146 | exact hasFDerivAt_extension_zero hn (hB n x hx (Or.inl heq)) |
| 147 | · rcases lt_trichotomy (q x) b with hright | heq | hright |
| 148 | · have hin : x ∈ window q a b := ⟨hleft, hright⟩ |
| 149 | rw [WaveEdgeExtension.extension_inside q a b _ hin] |
| 150 | have hd := tensor_hasFDerivAt |
| 151 | (hf.contDiffAt ((WaveEdgeExtension.windowDomain_open hΩ hq a b).mem_nhds ⟨hx, hin⟩)) n |
| 152 | exact hd.congr_of_eventuallyEq (WaveEdgeExtension.extension_germ_inside a b _ hqc hin) |
| 153 | · have hn : x ∉ window q a b := fun h => (not_lt_of_ge heq.ge) h.2 |
| 154 | rw [WaveEdgeExtension.extension_outside q a b _ hn, hcurry] |
| 155 | exact hasFDerivAt_extension_zero hn (hB n x hx (Or.inr heq)) |
| 156 | · have hn : x ∉ window q a b := fun h => (not_lt_of_ge hright.le) h.2 |
| 157 | rw [WaveEdgeExtension.extension_outside q a b _ hn, hcurry] |
| 158 | exact (hasFDerivAt_const (0 : D[×n]→L[ℝ] E) x).congr_of_eventuallyEq |
| 159 | (WaveEdgeExtension.extension_germ_right a b _ hqc hright) |
| 160 | |
| 161 | theorem hasFTaylorSeriesUpToOn_extension {Ω : Set D} (hΩ : IsOpen Ω) {q : D → ℝ} |
| 162 | (hq : ContinuousOn q Ω) {a b : ℝ} {f : D → E} |
| 163 | (hf : ContDiffOn ℝ ∞ f (windowDomain Ω q a b)) (hB : SmallOJets Ω q a b f) : |
| 164 | HasFTaylorSeriesUpToOn ∞ (extension q a b f) (extendedJets q a b f) Ω := by |
| 165 | classical |
| 166 | constructor |
| 167 | · intro x hx |
| 168 | by_cases hi : x ∈ window q a b |
| 169 | · simp only [extendedJets, extension, ite_eq_left hi] |
| 170 | rfl |
| 171 | · simp only [extendedJets, extension, ite_eq_right hi] |
| 172 | rfl |
| 173 | · intro n _ x hx |
| 174 | exact (extendedJets_hasFDerivAt hΩ hq hf hB n hx).hasFDerivWithinAt |
| 175 | · intro n _ x hx |
| 176 | exact (extendedJets_hasFDerivAt hΩ hq hf hB n hx).continuousAt.continuousWithinAt |
| 177 | |
| 178 | theorem iteratedFDeriv_extension {Ω : Set D} (hΩ : IsOpen Ω) {q : D → ℝ} |
| 179 | (hq : ContinuousOn q Ω) {a b : ℝ} {f : D → E} |
| 180 | (hf : ContDiffOn ℝ ∞ f (windowDomain Ω q a b)) (hB : SmallOJets Ω q a b f) |
| 181 | (n : ℕ) {x : D} (hx : x ∈ Ω) : |
| 182 | iteratedFDeriv ℝ n (extension q a b f) x = extension q a b (iteratedFDeriv ℝ n f) x := by |
| 183 | have h := hasFTaylorSeriesUpToOn_extension hΩ hq hf hB |
| 184 | have he := (h.eq_iteratedFDerivWithin_of_uniqueDiffOn |
| 185 | (ENat.natCast_lt_of_coe_top_le_withTop le_rfl n).le hΩ.uniqueDiffOn hx).symm |
| 186 | rwa [iteratedFDerivWithin_of_isOpen n hΩ hx] at he |
| 187 | |
| 188 | /-! ## The fixed dyadic cutoff -/ |
| 189 | |
| 190 | omit [NormedAddCommGroup D] [NormedSpace ℝ D] in |
| 191 | theorem dyadicProduct_eq_extension (q : D → ℝ) (g : D → E) : |
| 192 | (fun x => SquaredPartition.dyadicProfile (q x) • g x) = |
| 193 | extension q (1 / 2) 2 (fun x => SquaredPartition.dyadicProfile (q x) • g x) := by |
| 194 | classical |
| 195 | funext x |
| 196 | by_cases hx : x ∈ window q (1 / 2) 2 |
| 197 | · exact (WaveEdgeExtension.extension_inside q (1 / 2) 2 |
| 198 | (fun y => SquaredPartition.dyadicProfile (q y) • g y) hx).symm |
| 199 | · rw [WaveEdgeExtension.extension_outside q (1 / 2) 2 |
| 200 | (fun y => SquaredPartition.dyadicProfile (q y) • g y) hx] |
| 201 | have hz : SquaredPartition.dyadicProfile (q x) = 0 := by |
| 202 | by_contra hn |
| 203 | have hm : q x ∈ Function.support SquaredPartition.dyadicProfile := hn |
| 204 | rw [SquaredPartition.dyadicProfile_support] at hm |
| 205 | exact hx hm |
| 206 | rw [hz, zero_smul] |
| 207 | |
| 208 | /-- Main endpoint: the literal product is smooth on the ambient open domain |
| 209 | and every actual tensor vanishes at either dyadic face. -/ |
| 210 | theorem dyadic_product_smooth_and_flat {Ω : Set D} (hΩ : IsOpen Ω) |
| 211 | {q : D → ℝ} (hq : ContDiffOn ℝ ∞ q Ω) {g : D → E} |
| 212 | (hg : ContDiffOn ℝ ∞ g (windowDomain Ω q (1 / 2) 2)) |
| 213 | (hB : LocalJetBounds Ω q g) : |
| 214 | ContDiffOn ℝ ∞ (fun x => SquaredPartition.dyadicProfile (q x) • g x) Ω ∧ |
| 215 | ∀ x ∈ Ω, q x = 1 / 2 ∨ q x = 2 → ∀ n : ℕ, |
| 216 | iteratedFDeriv ℝ n (fun y => SquaredPartition.dyadicProfile (q y) • g y) x = 0 := by |
| 217 | let φ : D → ℝ := fun x => SquaredPartition.dyadicProfile (q x) |
| 218 | let f : D → E := fun x => φ x • g x |
| 219 | have hφ : ContDiffOn ℝ ∞ φ Ω := SquaredPartition.dyadicProfile_smooth.comp_contDiffOn hq |
| 220 | have hf : ContDiffOn ℝ ∞ f (windowDomain Ω q (1 / 2) 2) := |
| 221 | (hφ.mono (inter_subset_left (t := window q (1 / 2) 2))).smul hg |
| 222 | have hsmall : SmallOJets Ω q (1 / 2) 2 f := by |
| 223 | intro n x hx hedge |
| 224 | have hflat : ∀ j : ℕ, iteratedFDeriv ℝ j φ x = 0 := by |
| 225 | intro j |
| 226 | apply NativeBandExtension.flat_comp_jets SquaredPartition.dyadicProfile_smooth |
| 227 | (hq.contDiffAt (hΩ.mem_nhds hx)) _ j |
| 228 | intro k |
| 229 | rcases hedge with he | he |
| 230 | · rw [he] |
| 231 | exact (NativeBandExtension.dyadicProfile_endpoint_jets k).1 |
| 232 | · rw [he] |
| 233 | exact (NativeBandExtension.dyadicProfile_endpoint_jets k).2 |
| 234 | exact product_jet_extension_isLittleO hΩ hq.continuousOn hφ hg hx hflat n (hB x hx hedge n) |
| 235 | have heq : f = extension q (1 / 2) 2 f := dyadicProduct_eq_extension q g |
| 236 | constructor |
| 237 | · change ContDiffOn ℝ ∞ f Ω |
| 238 | rw [heq] |
| 239 | exact (hasFTaylorSeriesUpToOn_extension hΩ hq.continuousOn hf hsmall).contDiffOn |
| 240 | · intro x hx hedge n |
| 241 | change iteratedFDeriv ℝ n f x = 0 |
| 242 | rw [heq, iteratedFDeriv_extension hΩ hq.continuousOn hf hsmall n hx] |
| 243 | apply WaveEdgeExtension.extension_outside |
| 244 | rcases hedge with he | he |
| 245 | · exact fun hin => (not_lt_of_ge he.le) hin.1 |
| 246 | · exact fun hin => (not_lt_of_ge he.ge) hin.2 |
| 247 | |
| 248 | theorem dyadic_product_contDiffOn {Ω : Set D} (hΩ : IsOpen Ω) |
| 249 | {q : D → ℝ} (hq : ContDiffOn ℝ ∞ q Ω) {g : D → E} |
| 250 | (hg : ContDiffOn ℝ ∞ g (windowDomain Ω q (1 / 2) 2)) |
| 251 | (hB : LocalJetBounds Ω q g) : |
| 252 | ContDiffOn ℝ ∞ (fun x => SquaredPartition.dyadicProfile (q x) • g x) Ω := |
| 253 | (dyadic_product_smooth_and_flat hΩ hq hg hB).1 |
| 254 | |
| 255 | theorem dyadic_product_face {Ω : Set D} (hΩ : IsOpen Ω) |
| 256 | {q : D → ℝ} (hq : ContDiffOn ℝ ∞ q Ω) {g : D → E} |
| 257 | (hg : ContDiffOn ℝ ∞ g (windowDomain Ω q (1 / 2) 2)) |
| 258 | (hB : LocalJetBounds Ω q g) {x : D} (hx : x ∈ Ω) (he : q x = 1 / 2 ∨ q x = 2) : |
| 259 | ContDiffAt ℝ ∞ (fun y => SquaredPartition.dyadicProfile (q y) • g y) x ∧ |
| 260 | ∀ n : ℕ, iteratedFDeriv ℝ n (fun y => SquaredPartition.dyadicProfile (q y) • g y) x = 0 := |
| 261 | ⟨(dyadic_product_contDiffOn hΩ hq hg hB).contDiffAt (hΩ.mem_nhds hx), |
| 262 | (dyadic_product_smooth_and_flat hΩ hq hg hB).2 x hx he⟩ |
| 263 | |
| 264 | end NavierStokes.FlatDyadicExtension |