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 Euler.PacketGeometryData |
| 2 | import Euler.PacketPhysicalCoefficients |
| 3 | |
| 4 | /-! Consequences of the literal numerical guards for a physical geometry stage. -/ |
| 5 | |
| 6 | /-! ## From `Euler/PacketShearMotion.lean` |
| 7 | |
| 8 | The text of `Euler/PacketShearMotion.lean`, folded into this file, which was its only importer. -/ |
| 9 | |
| 10 | section |
| 11 | |
| 12 | /-! Actual shear motion, exposed for the compression scale guard. -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | |
| 17 | namespace EulerPacketMovingFrame |
| 18 | |
| 19 | open Set EulerSmoothLimit EulerPacketNormalizedPrimary EulerPacketRay |
| 20 | EulerPacketCoefficientControl InnerProductSpace ContinuousLinearMap |
| 21 | |
| 22 | theorem physical_shear_motion_bound |
| 23 | {B B₁ E : ℝ → Space →L[ℝ] Space} {m v : ℝ → Space} |
| 24 | {c t₀ a ε Θ G d β : ℝ} {S : Set ℝ} |
| 25 | (ha : 1/2 ≤ a) (hε : 0 < ε) (hΘ : 1 ≤ Θ) (hG : 1 ≤ G) (hd : 0 ≤ d) |
| 26 | (hsmall : 16*(ε*Θ*(4*G)^2+d) ≤ 1) |
| 27 | (hmap : MapsTo (physicalTime t₀ a ε) (Icc 0 Θ) S) |
| 28 | (hBd : ∀ t ∈ S, HasDerivWithinAt B (B₁ t) S t) |
| 29 | (hmd : ∀ t ∈ S, HasDerivWithinAt m (-(B t).adjoint (m t)) S t) |
| 30 | (hvd : ∀ t ∈ S, HasDerivWithinAt v (-(B t) (v t)+ |
| 31 | (2*⟪m t,(B t) (v t)⟫_ℝ/‖m t‖^2) • m t) S t) |
| 32 | (hm0 : ∀ t ∈ S, m t ≠ 0) (hv0 : ∀ t ∈ S, v t ≠ 0) |
| 33 | (hmv : ∀ t ∈ S, ⟪m t,v t⟫_ℝ = 0) |
| 34 | (hB : ∀ t ∈ S, ‖B t‖ ≤ G) (hB₁ : ∀ t ∈ S, ‖B₁ t‖ ≤ G^2) |
| 35 | (hE : ∀ t ∈ S, ‖E t‖ ≤ d) |
| 36 | (hb0 : rescaledFrame B m v t₀ a ε 0 0 1 = a) |
| 37 | (hk0 : rescaledFrame B m v t₀ a ε 0 2 1 = a*β) |
| 38 | (hh0 : rescaledShear c m v t₀ a ε 0 = a/ε^2) : |
| 39 | let e := 16*(ε*Θ*(4*G)^2+d) |
| 40 | ε ≤ e ∧ ∀ τ ∈ Icc 0 Θ, |ε^2*rescaledShear c m v t₀ a ε τ/a-1| ≤ e := by |
| 41 | let e := 16*(ε*Θ*(4*G)^2+d) |
| 42 | let Bf := rescaledFrame B m v t₀ a ε |
| 43 | let Ef := rescaledFrame E m v t₀ a ε |
| 44 | let Hf := rescaledShear c m v t₀ a ε |
| 45 | let Df : ℝ → Fin 3 → Fin 3 → ℝ := fun τ i j => |
| 46 | frameMatrixRate (B (physicalTime t₀ a ε τ)) (B₁ (physicalTime t₀ a ε τ)) |
| 47 | (unit (m (physicalTime t₀ a ε τ))) (unit (v (physicalTime t₀ a ε τ))) i j*(ε/a) |
| 48 | let H₁f : ℝ → ℝ := fun τ => -(Bf τ 0 0+Bf τ 1 1)*Hf τ*(ε/a) |
| 49 | have ha0 : 0 < a := by linarith |
| 50 | have hG0 : 0 ≤ G := by linarith |
| 51 | have hscale : |ε/a| ≤ 2*ε := by |
| 52 | rw [abs_div, abs_of_pos hε, abs_of_pos ha0, div_le_iff₀ ha0] |
| 53 | linarith only [mul_nonneg hε.le (sub_nonneg.mpr ha)] |
| 54 | have hBF : ∀ τ ∈ Icc 0 Θ, ∀ i j, |Bf τ i j| ≤ 4*G := by |
| 55 | intro τ hτ i j |
| 56 | have ht := hmap hτ |
| 57 | exact (frameMatrix_abs_le _ _ _ (unit_inner_self (hm0 _ ht)) |
| 58 | (unit_inner_self (hv0 _ ht)) (unit_inner_zero (hmv _ ht)) i j).trans |
| 59 | ((hB _ ht).trans (by linarith)) |
| 60 | have hEF : ∀ τ ∈ Icc 0 Θ, ∀ i j, |Ef τ i j| ≤ d := by |
| 61 | intro τ hτ i j |
| 62 | have ht := hmap hτ |
| 63 | exact (frameMatrix_abs_le _ _ _ (unit_inner_self (hm0 _ ht)) |
| 64 | (unit_inner_self (hv0 _ ht)) (unit_inner_zero (hmv _ ht)) i j).trans (hE _ ht) |
| 65 | have hDF : ∀ τ ∈ Icc 0 Θ, ∀ i j, |
| 66 | HasDerivWithinAt (fun s => Bf s i j) (Df τ i j) (Icc 0 Θ) τ := by |
| 67 | intro τ hτ i j |
| 68 | have ht := hmap hτ |
| 69 | exact (frameMatrix_hasDerivWithinAt (hBd _ ht) (hmd _ ht) (hvd _ ht) |
| 70 | (hm0 _ ht) (hv0 _ ht) (hmv _ ht) i j).comp τ |
| 71 | (physicalTime_hasDerivAt t₀ a ε τ).hasDerivWithinAt hmap |
| 72 | have hDFbound : ∀ τ ∈ Icc 0 Θ, ∀ i j, |Df τ i j| ≤ 2*ε*(4*G)^2 := by |
| 73 | intro τ hτ i j |
| 74 | have ht := hmap hτ |
| 75 | have hrate := frameMatrixRate_abs_le (B (physicalTime t₀ a ε τ)) |
| 76 | (B₁ (physicalTime t₀ a ε τ)) _ _ (unit_inner_self (hm0 _ ht)) |
| 77 | (unit_inner_self (hv0 _ ht)) (unit_inner_zero (hmv _ ht)) i j |
| 78 | have hnormsq : ‖B (physicalTime t₀ a ε τ)‖^2 ≤ G^2 := |
| 79 | pow_le_pow_left₀ (norm_nonneg _) (hB _ ht) 2 |
| 80 | have hrate' : |frameMatrixRate (B (physicalTime t₀ a ε τ)) (B₁ (physicalTime t₀ a ε τ)) |
| 81 | (unit (m (physicalTime t₀ a ε τ))) (unit (v (physicalTime t₀ a ε τ))) i j| ≤ 13*G^2 := by |
| 82 | linarith only [hrate, hnormsq, hB₁ _ ht] |
| 83 | dsimp [Df] |
| 84 | rw [abs_mul] |
| 85 | calc |
| 86 | _ ≤ (13*G^2)*(2*ε) := mul_le_mul hrate' hscale (abs_nonneg _) (by positivity) |
| 87 | _ ≤ 2*ε*(4*G)^2 := by linarith only [mul_nonneg hε.le (sq_nonneg G)] |
| 88 | have hHF : ∀ τ ∈ Icc 0 Θ, HasDerivWithinAt Hf (H₁f τ) (Icc 0 Θ) τ := by |
| 89 | intro τ hτ |
| 90 | have ht := hmap hτ |
| 91 | exact (primaryShear_hasDerivWithinAt (B (physicalTime t₀ a ε τ)) c (hmd _ ht) |
| 92 | (hvd _ ht) (hm0 _ ht) (hv0 _ ht) (hmv _ ht)).comp τ |
| 93 | (physicalTime_hasDerivAt t₀ a ε τ).hasDerivWithinAt hmap |
| 94 | have hHFbound : ∀ τ ∈ Icc 0 Θ, |H₁f τ| ≤ (4*ε*(4*G))*|Hf τ| := by |
| 95 | intro τ hτ |
| 96 | have ht := hmap hτ |
| 97 | have hrate := primaryShear_rate_bound (B (physicalTime t₀ a ε τ)) c m v _ |
| 98 | (hm0 _ ht) (hv0 _ ht) (hmv _ ht) |
| 99 | have hrate' : |-(Bf τ 0 0+Bf τ 1 1)*Hf τ| ≤ 2*G*|Hf τ| := by |
| 100 | exact hrate.trans (mul_le_mul_of_nonneg_right |
| 101 | (mul_le_mul_of_nonneg_left (hB _ ht) (by norm_num)) (abs_nonneg _)) |
| 102 | dsimp [H₁f] |
| 103 | rw [abs_mul] |
| 104 | calc |
| 105 | _ ≤ (2*G*|Hf τ|)*(2*ε) := mul_le_mul hrate' hscale (abs_nonneg _) (by positivity) |
| 106 | _ ≤ (4*ε*(4*G))*|Hf τ| := by |
| 107 | linarith only [mul_nonneg (mul_nonneg hε.le hG0) (abs_nonneg (Hf τ))] |
| 108 | have herr := normalized_motion_errors_within ha hε hΘ (show 1 ≤ 4*G by linarith) |
| 109 | hd hsmall hBF hEF (fun τ hτ => hDF τ hτ 0 1) (fun τ hτ => hDF τ hτ 2 1) |
| 110 | (fun τ hτ => hDFbound τ hτ 0 1) (fun τ hτ => hDFbound τ hτ 2 1) |
| 111 | hHF hHFbound hb0 hk0 hh0 |
| 112 | exact ⟨herr.1, fun τ hτ => (herr.2 τ hτ).2.2.1⟩ |
| 113 | |
| 114 | end EulerPacketMovingFrame |
| 115 | end |
| 116 | |
| 117 | end |
| 118 | |
| 119 | noncomputable section |
| 120 | |
| 121 | |
| 122 | namespace EulerPacketMovingFrame.PhysicalGeometryData |
| 123 | |
| 124 | open Set Real EulerSmoothLimit EulerPacketRay EulerPacketFrameQuantitative |
| 125 | |
| 126 | variable {α : Type*} (D : PhysicalGeometryData α) |
| 127 | |
| 128 | theorem a_pos : 0 < D.a := by linarith only [D.a_lower] |
| 129 | theorem Theta_pos : 0 < D.Θ := by linarith only [D.Theta_lower] |
| 130 | theorem error_nonneg : 0 ≤ D.error := by unfold error; positivity [D.epsilon_pos, D.Theta_pos, D.d_nonneg] |
| 131 | |
| 132 | theorem target_from_sigma : 1/D.σ ≤ D.target := by |
| 133 | have hy : 1 ≤ D.y⁻¹ := by |
| 134 | rw [← one_div] |
| 135 | apply (le_div_iff₀ D.y_pos).mpr |
| 136 | linarith only [D.y_small] |
| 137 | exact div_le_div_of_nonneg_right hy D.sigma_pos.le |
| 138 | |
| 139 | theorem target_one : 1 ≤ D.target := by |
| 140 | have hs : 1 ≤ 1/D.σ := (le_div_iff₀ D.sigma_pos).mpr (by linarith only [D.sigma_small]) |
| 141 | exact hs.trans D.target_from_sigma |
| 142 | |
| 143 | theorem target_pos : 0 < D.target := lt_of_lt_of_le zero_lt_one D.target_one |
| 144 | theorem horizon_one : 1 ≤ D.H := D.target_one.trans D.target_le_horizon |
| 145 | theorem horizon_pos : 0 < D.H := lt_of_lt_of_le zero_lt_one D.horizon_one |
| 146 | theorem target_le_Theta : D.target ≤ D.Θ := D.target_le_horizon.trans D.horizon_le_Theta |
| 147 | |
| 148 | theorem sigma_Theta : 1 ≤ D.σ*D.Θ := by |
| 149 | have h := (div_le_iff₀ D.sigma_pos).mp (D.target_from_sigma.trans D.target_le_Theta) |
| 150 | linarith only [h] |
| 151 | |
| 152 | theorem target_scale : 1 ≤ D.σ^2*D.target^2 := by |
| 153 | have h : 1 ≤ D.σ*D.target := by |
| 154 | have hh := (div_le_iff₀ D.sigma_pos).mp D.target_from_sigma |
| 155 | linarith only [hh] |
| 156 | have hh := mul_le_mul h h (by norm_num : (0:ℝ) ≤ 1) (by positivity : 0 ≤ D.σ*D.target) |
| 157 | linarith only [hh] |
| 158 | |
| 159 | theorem time_mem {τ : ℝ} (hτ : τ ∈ Icc 0 D.H) : D.time τ ∈ D.S := |
| 160 | D.time_maps ⟨hτ.1, hτ.2.trans D.horizon_le_Theta⟩ |
| 161 | |
| 162 | theorem target_time_mem : D.targetTime ∈ D.S := |
| 163 | D.time_mem ⟨D.target_pos.le, D.target_le_horizon⟩ |
| 164 | |
| 165 | theorem error_le_half : D.error ≤ 1/2 := by |
| 166 | have hp := scaled_power_le D.Theta_lower |
| 167 | ((by norm_num : (1:ℝ) ≤ 1000000000).trans neighborStabilityConstant_ge) D.error_nonneg |
| 168 | (by decide : 0 ≤ 40) |
| 169 | have hs := D.small |
| 170 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 171 | norm_num only [pow_zero, mul_one] at hp |
| 172 | linarith only [hp, hs] |
| 173 | |
| 174 | theorem error_le_one : D.error ≤ 1 := D.error_le_half.trans (by norm_num) |
| 175 | |
| 176 | theorem epsilon_le_error : D.ε ≤ D.error := by |
| 177 | have hg : 1 ≤ (4*D.G)^2 := by linarith only [D.G_lower, sq_nonneg (D.G-1)] |
| 178 | have hc : 1 ≤ D.Θ*(4*D.G)^2 := by |
| 179 | simpa only [one_mul] using mul_le_mul D.Theta_lower hg |
| 180 | (by norm_num : (0:ℝ) ≤ 1) D.Theta_pos.le |
| 181 | have hh := mul_le_mul_of_nonneg_left hc D.epsilon_pos.le |
| 182 | unfold error |
| 183 | linarith only [hh, D.d_nonneg, D.epsilon_pos] |
| 184 | |
| 185 | theorem epsilon_le_one : D.ε ≤ 1 := D.epsilon_le_error.trans D.error_le_one |
| 186 | |
| 187 | theorem ray_error_small : 800*D.error*D.Θ^5 ≤ 1/2 := by |
| 188 | have hp := scaled_power_le D.Theta_lower |
| 189 | ((by norm_num : (1:ℝ) ≤ 1000000000).trans neighborStabilityConstant_ge) D.error_nonneg |
| 190 | (by decide : 5 ≤ 40) |
| 191 | have hs := D.small |
| 192 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 193 | linarith only [hp, hs] |
| 194 | |
| 195 | theorem relative_error_small : neighborStabilityConstant*D.error*D.Θ^29 ≤ 1/2 := by |
| 196 | have hK : 0 ≤ neighborStabilityConstant := (by norm_num : (0:ℝ) ≤ 1000000000).trans neighborStabilityConstant_ge |
| 197 | have hp := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ D.Theta_lower (by decide : 29 ≤ 40)) |
| 198 | (mul_nonneg hK D.error_nonneg) |
| 199 | have hs := D.small |
| 200 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 201 | linarith only [hp, hs] |
| 202 | |
| 203 | theorem scalar_error_small : 4*exp 6*(400000000*D.error*D.Θ^29) ≤ 1 := by |
| 204 | have hr := D.relative_error_small |
| 205 | have hK : 0 ≤ neighborStabilityConstant := |
| 206 | (by norm_num : (0:ℝ) ≤ 1000000000).trans neighborStabilityConstant_ge |
| 207 | have hp := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ D.Theta_lower (by decide : 29 ≤ 40)) |
| 208 | (mul_nonneg hK D.error_nonneg) |
| 209 | have hs := D.small |
| 210 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 211 | unfold neighborStabilityConstant at hp hs hr |
| 212 | linarith only [hp, hs, hr] |
| 213 | |
| 214 | theorem propagator_small : 8000000*D.error*D.Θ^21 ≤ 1 := by |
| 215 | have hp := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ D.Theta_lower (by decide : 21 ≤ 40)) D.error_nonneg |
| 216 | have hk : 0 ≤ neighborStabilityConstant-8 := by linarith only [neighborStabilityConstant_ge] |
| 217 | have hmul := mul_nonneg hk (mul_nonneg D.error_nonneg (pow_nonneg D.Theta_pos.le 40)) |
| 218 | have hs := D.small |
| 219 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 220 | linarith only [hp, hmul, hs] |
| 221 | |
| 222 | theorem action_error (ξ : α) {τ : ℝ} (hτ : τ ∈ Icc 0 D.H) : |
| 223 | ∀ i j, |scaledAction (D.M ξ (D.time τ)) D.m D.v D.a D.ε (D.time τ) i j- |
| 224 | idealVelocityEntry (D.σ^2) i j| ≤ 3*D.error := by |
| 225 | have h := physical_matrix_errors D.a_lower D.epsilon_pos D.Theta_lower D.G_lower D.d_nonneg |
| 226 | D.error_le_one D.time_maps D.B_derivative D.old_ray_equation D.old_velocity_equation |
| 227 | D.old_ray_nonzero D.old_velocity_nonzero D.old_tangent D.B_bound D.B_derivative_bound |
| 228 | (D.E_bound ξ) (D.parent_decomposition ξ) D.initial_coupling D.initial_tilt D.initial_shear |
| 229 | exact (h.2 τ ⟨hτ.1, hτ.2.trans D.horizon_le_Theta⟩).2.1 |
| 230 | |
| 231 | theorem target_shear_lower : D.a/(2*D.ε^2) ≤ D.targetShear := by |
| 232 | have hh := physical_shear_motion_bound D.a_lower D.epsilon_pos D.Theta_lower D.G_lower D.d_nonneg |
| 233 | D.error_le_one D.time_maps D.B_derivative D.old_ray_equation D.old_velocity_equation |
| 234 | D.old_ray_nonzero D.old_velocity_nonzero D.old_tangent D.B_bound D.B_derivative_bound |
| 235 | (D.E_bound D.center) D.initial_coupling D.initial_tilt D.initial_shear |
| 236 | have hb := (abs_le.mp (hh.2 D.target ⟨D.target_pos.le, D.target_le_Theta⟩)).1 |
| 237 | have hratio : 1/2 ≤ D.ε^2*D.targetShear/D.a := by |
| 238 | change -D.error ≤ D.ε^2*D.targetShear/D.a-1 at hb |
| 239 | linarith only [hb, D.error_le_half] |
| 240 | have hmul := (le_div_iff₀ D.a_pos).mp hratio |
| 241 | apply (div_le_iff₀ (show 0 < 2*D.ε^2 by positivity [D.epsilon_pos])).mpr |
| 242 | linarith only [hmul] |
| 243 | |
| 244 | theorem target_shear_pos : 0 < D.targetShear := |
| 245 | lt_of_lt_of_le (by positivity [D.a_pos, D.epsilon_pos]) D.target_shear_lower |
| 246 | |
| 247 | theorem compression_domination : |
| 248 | 30*(‖D.B D.targetTime‖+‖D.E D.center D.targetTime‖)*D.target < D.targetShear*D.ε := by |
| 249 | have hguard := D.compression_guard |
| 250 | change 60*(D.G+D.d)*D.target*D.ε < D.a at hguard |
| 251 | have hlower := mul_le_mul_of_nonneg_right D.target_shear_lower D.epsilon_pos.le |
| 252 | have heq : (D.a/(2*D.ε^2))*D.ε = D.a/(2*D.ε) := by |
| 253 | field_simp [ne_of_gt D.epsilon_pos] |
| 254 | rw [heq] at hlower |
| 255 | have hsmall : 30*(D.G+D.d)*D.target < D.a/(2*D.ε) := |
| 256 | (lt_div_iff₀ (show 0 < 2*D.ε by positivity [D.epsilon_pos])).mpr (by linarith only [hguard]) |
| 257 | have hnorm := add_le_add (D.B_bound _ D.target_time_mem) (D.E_bound D.center _ D.target_time_mem) |
| 258 | have hm := mul_le_mul_of_nonneg_right hnorm (show 0 ≤ 30*D.target by positivity [D.target_pos]) |
| 259 | have hfirst : 30*(‖D.B D.targetTime‖+‖D.E D.center D.targetTime‖)*D.target ≤ |
| 260 | 30*(D.G+D.d)*D.target := by linarith only [hm] |
| 261 | exact hfirst.trans_lt (hsmall.trans_le hlower) |
| 262 | |
| 263 | end EulerPacketMovingFrame.PhysicalGeometryData |