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.PacketNeighborStability |
| 2 | import Euler.PacketWithinRay |
| 3 | |
| 4 | /-! |
| 5 | The normalized physical equations retain the actual neighboring initial |
| 6 | discrepancy. The scalar comparison solutions below are constructed, and |
| 7 | the third ray coordinate and all denominator bounds follow from the ray |
| 8 | equation. |
| 9 | -/ |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | |
| 14 | namespace EulerPacketMovingFrame |
| 15 | |
| 16 | open Set Real EulerPacketRay EulerPacketBridge EulerPacketGrowth |
| 17 | EulerPacketPerturbation EulerPacketFrameStability EulerPacketExistence |
| 18 | |
| 19 | theorem ray_controlled_velocity_error_within |
| 20 | {β Θ T e ε : ℝ} {R A C : ℝ → Fin 3 → Fin 3 → ℝ} {P Q N : ℝ → ℝ} |
| 21 | (hβ : 0 ≤ β) (hβupper : β ≤ 1) (hΘ : 1 ≤ Θ) (hT0 : 0 < T) (hT : T ≤ Θ) |
| 22 | (he : 0 ≤ e) (hε : 0 ≤ ε) (hεe : ε ≤ e) (hsmall : 10000*e*Θ^5 ≤ 1) |
| 23 | (hRc : ∀ i j, ContinuousOn (fun t => R t i j) (Icc 0 T)) |
| 24 | (hP : ∀ t ∈ Icc 0 T, HasDerivWithinAt P |
| 25 | (R t 0 0*P t+R t 0 1*Q t+R t 0 2*N t) (Icc 0 T) t) |
| 26 | (hQ : ∀ t ∈ Icc 0 T, HasDerivWithinAt Q |
| 27 | (R t 1 0*P t+R t 1 1*Q t+R t 1 2*N t) (Icc 0 T) t) |
| 28 | (hN : ∀ t ∈ Icc 0 T, HasDerivWithinAt N |
| 29 | (R t 2 0*P t+R t 2 1*Q t+R t 2 2*N t) (Icc 0 T) t) |
| 30 | (hRclose : ∀ t ∈ Icc 0 T, ∀ i j, |R t i j-idealRayEntry β i j| ≤ 4*e) |
| 31 | (hAclose : ∀ t ∈ Icc 0 T, ∀ i j, |A t i j-idealVelocityEntry β i j| ≤ 3*e) |
| 32 | (hCclose : ∀ t ∈ Icc 0 T, ∀ j, |
| 33 | |C t 0 j-idealUnprojectedEntry 0 j| ≤ 5*e ∧ |
| 34 | |C t 1 j-idealUnprojectedEntry 1 j| ≤ 5*e) |
| 35 | (hinitial : norm3 (P 0) (Q 0) (N 0-1) ≤ e) : |
| 36 | ∀ t ∈ Icc 0 T, |
| 37 | (norm3 (P t-β*t^2) (Q t+2*β*t) (N t-1) ≤ 800*e*Θ^5 ∧ 1/2 ≤ N t) ∧ |
| 38 | ∀ U V : ℝ, |
| 39 | |velocityFirstRhs (A t) (C t) ε (P t) (Q t) (N t) U V-idealVelocityFirst β t U V|+ |
| 40 | |velocitySecondRhs (A t) (C t) ε (P t) (Q t) (N t) U V+U| ≤ |
| 41 | 200000*e*Θ^12*(|U|+|V|) := by |
| 42 | have hΘ0 : 0 ≤ Θ := by linarith only [hΘ] |
| 43 | have hs : 400*(4*e)*Θ^5 ≤ 1 := by nlinarith only [hsmall, mul_nonneg he (pow_nonneg hΘ0 5)] |
| 44 | have hi : norm3 (P 0) (Q 0) (N 0-1) ≤ 4*e := hinitial.trans (by linarith only [he]) |
| 45 | have hnear := ray_closeness_within hβ hβupper hΘ hT0 hT |
| 46 | (show 0 ≤ 4*e by positivity) hs hRc hP hQ hN hRclose hi |
| 47 | intro t ht |
| 48 | obtain ⟨herr, hn⟩ := hnear t ht |
| 49 | have herr' : norm3 (P t-β*t^2) (Q t+2*β*t) (N t-1) ≤ 800*e*Θ^5 := by |
| 50 | nlinarith only [herr] |
| 51 | refine ⟨⟨herr', hn⟩, ?_⟩ |
| 52 | intro U V |
| 53 | have herrorP : |P t-β*t^2| ≤ 800*e*Θ^5 := by |
| 54 | unfold norm3 at herr' |
| 55 | linarith only [herr', abs_nonneg (Q t+2*β*t), abs_nonneg (N t-1)] |
| 56 | have herrorQ : |Q t-(-2*β*t)| ≤ 800*e*Θ^5 := by |
| 57 | have heq : Q t-(-2*β*t) = Q t+2*β*t := by ring |
| 58 | rw [heq] |
| 59 | unfold norm3 at herr' |
| 60 | linarith only [herr', abs_nonneg (P t-β*t^2), abs_nonneg (N t-1)] |
| 61 | have herrorN : |N t-1| ≤ 800*e*Θ^5 := by |
| 62 | unfold norm3 at herr' |
| 63 | linarith only [herr', abs_nonneg (P t-β*t^2), abs_nonneg (Q t+2*β*t)] |
| 64 | have htΘ : t ≤ Θ := ht.2.trans hT |
| 65 | have ht2 : t^2 ≤ Θ^2 := (sq_le_sq₀ ht.1 hΘ0).mpr htΘ |
| 66 | have hP₀ : |β*t^2| ≤ Θ^2 := by |
| 67 | rw [abs_of_nonneg (mul_nonneg hβ (sq_nonneg t))] |
| 68 | nlinarith only [mul_le_mul_of_nonneg_right hβupper (sq_nonneg t), ht2] |
| 69 | have hQ₀ : |-2*β*t| ≤ 2*Θ^2 := by |
| 70 | rw [abs_mul, abs_mul, abs_of_nonneg hβ, abs_of_nonneg ht.1] |
| 71 | norm_num only [abs_neg, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 2)] |
| 72 | nlinarith only [mul_le_mul_of_nonneg_right hβupper ht.1, htΘ, hΘ, sq_nonneg (Θ-1)] |
| 73 | have hb : |β| ≤ 1 := by rwa [abs_of_nonneg hβ] |
| 74 | exact velocity_rhs_error_firstTwo hΘ he hε hεe hsmall hb (hAclose t ht) |
| 75 | (hCclose t ht) hP₀ hQ₀ herrorP herrorQ herrorN |
| 76 | |
| 77 | theorem controlled_neighbor_relative_error_within |
| 78 | {σ Θ T e ε lam : ℝ} {F F₁ G G₁ Z Z₁ U V P Q N : ℝ → ℝ} |
| 79 | {R A C : ℝ → Fin 3 → Fin 3 → ℝ} |
| 80 | (hσ : 0 < σ) (hσsmall : σ ≤ 1/4) (hΘ : 1 ≤ Θ) |
| 81 | (hT0 : 0 < T) (hT : T ≤ Θ) (he : 0 ≤ e) (hε : 0 ≤ ε) (hεe : ε ≤ e) |
| 82 | (hlam : 0 ≤ lam) (hsmall : 8000000*e*Θ^21 ≤ 1) |
| 83 | (hF : ∀ t, 0 ≤ t → HasDerivAt F (F₁ t) t) |
| 84 | (hG : ∀ t, 0 ≤ t → HasDerivAt G (G₁ t) t) |
| 85 | (hfluxF : ∀ t, 0 ≤ t → HasDerivAt (fun s => (1+(σ^2*s^2)^2)*F₁ s) |
| 86 | (2*(1-σ^2*(σ^2*t^2))*F t) t) |
| 87 | (hfluxG : ∀ t, 0 ≤ t → HasDerivAt (fun s => (1+(σ^2*s^2)^2)*G₁ s) |
| 88 | (2*(1-σ^2*(σ^2*t^2))*G t) t) |
| 89 | (hF0 : F 0 = 1) (hF₁0 : F₁ 0 = 0) (hG₁0 : G₁ 0 = 1) |
| 90 | (hRc : ∀ i j, ContinuousOn (fun t => R t i j) (Icc 0 T)) |
| 91 | (hAc : ∀ i j, ContinuousOn (fun t => A t i j) (Icc 0 T)) |
| 92 | (hCc : ∀ i j, ContinuousOn (fun t => C t i j) (Icc 0 T)) |
| 93 | (hP : ∀ t ∈ Icc 0 T, HasDerivWithinAt P |
| 94 | (R t 0 0*P t+R t 0 1*Q t+R t 0 2*N t) (Icc 0 T) t) |
| 95 | (hQ : ∀ t ∈ Icc 0 T, HasDerivWithinAt Q |
| 96 | (R t 1 0*P t+R t 1 1*Q t+R t 1 2*N t) (Icc 0 T) t) |
| 97 | (hN : ∀ t ∈ Icc 0 T, HasDerivWithinAt N |
| 98 | (R t 2 0*P t+R t 2 1*Q t+R t 2 2*N t) (Icc 0 T) t) |
| 99 | (hU : ∀ t ∈ Icc 0 T, HasDerivWithinAt U |
| 100 | (velocityFirstRhs (A t) (C t) ε (P t) (Q t) (N t) (U t) (V t)) (Icc 0 T) t) |
| 101 | (hV : ∀ t ∈ Icc 0 T, HasDerivWithinAt V |
| 102 | (velocitySecondRhs (A t) (C t) ε (P t) (Q t) (N t) (U t) (V t)) (Icc 0 T) t) |
| 103 | (hRclose : ∀ t ∈ Icc 0 T, ∀ i j, |R t i j-idealRayEntry (σ^2) i j| ≤ 4*e) |
| 104 | (hAclose : ∀ t ∈ Icc 0 T, ∀ i j, |A t i j-idealVelocityEntry (σ^2) i j| ≤ 3*e) |
| 105 | (hCclose : ∀ t ∈ Icc 0 T, ∀ j, |
| 106 | |C t 0 j-idealUnprojectedEntry 0 j| ≤ 5*e ∧ |
| 107 | |C t 1 j-idealUnprojectedEntry 1 j| ≤ 5*e) |
| 108 | (hZ : ∀ t ∈ Icc 0 T, HasDerivAt Z (Z₁ t) t) |
| 109 | (hfluxZ : ∀ t ∈ Icc 0 T, HasDerivAt (fun s => (1+(σ^2*s^2)^2)*Z₁ s) |
| 110 | (2*(1-σ^2*(σ^2*t^2))*Z t) t) |
| 111 | (hrayInitial : norm3 (P 0) (Q 0) (N 0-1) ≤ e) |
| 112 | (hvelocityInitial : |V 0-1|+|U 0+lam| ≤ e) |
| 113 | (hZ0 : Z 0 = 1) (hZ₁0 : Z₁ 0 = lam) : |
| 114 | ∀ t ∈ Icc 0 T, |
| 115 | |V t-Z t|+|U t+Z₁ t| ≤ 400000000*e*Θ^29*(1+lam)*F t := by |
| 116 | have hΘ0 : 0 ≤ Θ := by linarith only [hΘ] |
| 117 | have hσ2 : σ^2 ≤ 1 := by nlinarith only [hσ, hσsmall] |
| 118 | have hgeom : 10000*e*Θ^5 ≤ 1 := by |
| 119 | have hh := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 5 ≤ 21)) he |
| 120 | nlinarith only [hsmall, hh, mul_nonneg he (pow_nonneg hΘ0 21)] |
| 121 | have he1 : e ≤ 1 := by |
| 122 | have hh := mul_le_mul_of_nonneg_left (one_le_pow₀ hΘ : 1 ≤ Θ^21) he |
| 123 | nlinarith only [hsmall, hh, he] |
| 124 | have hcontrol := ray_controlled_velocity_error_within (sq_nonneg σ) hσ2 hΘ hT0 hT |
| 125 | he hε hεe hgeom hRc hP hQ hN hRclose hAclose hCclose hrayInitial |
| 126 | have hPc : ContinuousOn P (Icc 0 T) := fun t ht => (hP t ht).continuousWithinAt |
| 127 | have hQc : ContinuousOn Q (Icc 0 T) := fun t ht => (hQ t ht).continuousWithinAt |
| 128 | have hNc : ContinuousOn N (Icc 0 T) := fun t ht => (hN t ht).continuousWithinAt |
| 129 | have hUc : ContinuousOn U (Icc 0 T) := fun t ht => (hU t ht).continuousWithinAt |
| 130 | have hVc : ContinuousOn V (Icc 0 T) := fun t ht => (hV t ht).continuousWithinAt |
| 131 | have hNne : ∀ t ∈ Icc 0 T, N t ≠ 0 := by |
| 132 | intro t ht |
| 133 | linarith only [(hcontrol t ht).1.2] |
| 134 | obtain ⟨hU₁c, hV₁c⟩ := continuousOn_velocity_rhs (ε := ε) hAc hCc hPc hQc hNc hUc hVc hNne |
| 135 | have hs : 40*(200000*e)*Θ^21 ≤ 1 := by nlinarith only [hsmall] |
| 136 | have herror := velocity_difference_bound_within hσ hσsmall hΘ hT0 hT |
| 137 | (show 0 ≤ 200000*e by positivity) hs hF hG hfluxF hfluxG hF0 hF₁0 hG₁0 |
| 138 | hU hV hU₁c hV₁c hZ hfluxZ (fun t ht => (hcontrol t ht).2 (U t) (V t)) |
| 139 | have hcoef : 20*e*Θ^8+800*(200000*e)*Θ^29*(1+lam+e) ≤ 400000000*e*Θ^29*(1+lam) := by |
| 140 | have h1 := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 8 ≤ 29)) |
| 141 | (show 0 ≤ 20*e by positivity) |
| 142 | have h2 := mul_le_mul_of_nonneg_left (show 1+lam+e ≤ 2*(1+lam) by linarith only [he1, hlam]) |
| 143 | (show 0 ≤ 160000000*e*Θ^29 by positivity) |
| 144 | nlinarith only [h1, h2, mul_nonneg (mul_nonneg he (pow_nonneg hΘ0 29)) hlam, |
| 145 | mul_nonneg he (pow_nonneg hΘ0 29)] |
| 146 | intro t ht |
| 147 | have hFp : 0 ≤ F t := (equation30_global_positive hσ hσsmall hF hfluxF hF0 |
| 148 | (by rw [hF₁0]) t ht.1).le |
| 149 | have hh := herror t ht |
| 150 | rw [hZ0, hZ₁0] at hh |
| 151 | have hb := neighbor_initial_error_bound hΘ (show 0 ≤ 200000*e by positivity) hlam hFp hvelocityInitial hh |
| 152 | exact hb.trans (mul_le_mul_of_nonneg_right hcoef hFp) |
| 153 | |
| 154 | def neighborStabilityConstant : ℝ := 1000000000*exp 6 |
| 155 | |
| 156 | theorem neighborStabilityConstant_ge : 1000000000 ≤ neighborStabilityConstant := by |
| 157 | have h : 1 ≤ exp (6:ℝ) := one_le_exp_iff.mpr (by norm_num) |
| 158 | unfold neighborStabilityConstant |
| 159 | linarith only [h] |
| 160 | |
| 161 | theorem controlled_neighbor_stage_references_within |
| 162 | {σ Θ T e ε lam : ℝ} {U V P Q N : ℝ → ℝ} {R A C : ℝ → Fin 3 → Fin 3 → ℝ} |
| 163 | (hσ : 0 < σ) (hσsmall : σ ≤ 1/4) (hΘ : 1 ≤ Θ) |
| 164 | (hT0 : 0 < T) (hT : T ≤ Θ) (he : 0 ≤ e) (hε : 0 ≤ ε) (hεe : ε ≤ e) |
| 165 | (hlam : 0 ≤ lam) (hsmall : 1000000*neighborStabilityConstant*e*Θ^40 ≤ 1) |
| 166 | (hRc : ∀ i j, ContinuousOn (fun t => R t i j) (Icc 0 T)) |
| 167 | (hAc : ∀ i j, ContinuousOn (fun t => A t i j) (Icc 0 T)) |
| 168 | (hCc : ∀ i j, ContinuousOn (fun t => C t i j) (Icc 0 T)) |
| 169 | (hP : ∀ t ∈ Icc 0 T, HasDerivWithinAt P |
| 170 | (R t 0 0*P t+R t 0 1*Q t+R t 0 2*N t) (Icc 0 T) t) |
| 171 | (hQ : ∀ t ∈ Icc 0 T, HasDerivWithinAt Q |
| 172 | (R t 1 0*P t+R t 1 1*Q t+R t 1 2*N t) (Icc 0 T) t) |
| 173 | (hN : ∀ t ∈ Icc 0 T, HasDerivWithinAt N |
| 174 | (R t 2 0*P t+R t 2 1*Q t+R t 2 2*N t) (Icc 0 T) t) |
| 175 | (hU : ∀ t ∈ Icc 0 T, HasDerivWithinAt U |
| 176 | (velocityFirstRhs (A t) (C t) ε (P t) (Q t) (N t) (U t) (V t)) (Icc 0 T) t) |
| 177 | (hV : ∀ t ∈ Icc 0 T, HasDerivWithinAt V |
| 178 | (velocitySecondRhs (A t) (C t) ε (P t) (Q t) (N t) (U t) (V t)) (Icc 0 T) t) |
| 179 | (hRclose : ∀ t ∈ Icc 0 T, ∀ i j, |R t i j-idealRayEntry (σ^2) i j| ≤ 4*e) |
| 180 | (hAclose : ∀ t ∈ Icc 0 T, ∀ i j, |A t i j-idealVelocityEntry (σ^2) i j| ≤ 3*e) |
| 181 | (hCclose : ∀ t ∈ Icc 0 T, ∀ j, |
| 182 | |C t 0 j-idealUnprojectedEntry 0 j| ≤ 5*e ∧ |
| 183 | |C t 1 j-idealUnprojectedEntry 1 j| ≤ 5*e) |
| 184 | (hrayInitial : norm3 (P 0) (Q 0) (N 0-1) ≤ e) |
| 185 | (hvelocityInitial : |V 0-1|+|U 0+lam| ≤ e) : |
| 186 | ∃ F F₁ Z Z₁ : ℝ → ℝ, |
| 187 | F 0 = 1 ∧ F₁ 0 = 0 ∧ Z 0 = 1 ∧ Z₁ 0 = lam ∧ |
| 188 | (∀ t, HasDerivAt F (F₁ t) t) ∧ (∀ t, HasDerivAt Z (Z₁ t) t) ∧ |
| 189 | (∀ t, HasDerivAt (fun s => (1+(σ^2*s^2)^2)*F₁ s) |
| 190 | (2*(1-σ^2*(σ^2*t^2))*F t) t) ∧ |
| 191 | (∀ t, HasDerivAt (fun s => (1+(σ^2*s^2)^2)*Z₁ s) |
| 192 | (2*(1-σ^2*(σ^2*t^2))*Z t) t) ∧ |
| 193 | (∀ t ∈ Icc 0 T, |V t-Z t|+|U t+Z₁ t| ≤ 400000000*e*Θ^29*(1+lam)*F t) ∧ |
| 194 | (∀ t ∈ Icc 1 T, 0 < V t ∧ |V t/Z t-1| ≤ neighborStabilityConstant*e*Θ^29 ∧ |
| 195 | |U t/V t+Z₁ t/Z t| ≤ 10*(neighborStabilityConstant*e*Θ^29)) := by |
| 196 | have hσ2 : σ^2 ≤ 1 := by nlinarith only [hσ, hσsmall] |
| 197 | obtain ⟨F, F₁, G, G₁, hF0, hF₁0, _, hG₁0, hF, hG, hfluxF, hfluxG⟩ := |
| 198 | equation30_exists_fundamental_system (sq_nonneg σ) hσ2 |
| 199 | obtain ⟨Z, Z₁, hZ0, hZ₁0, hZ, hfluxZ⟩ := equation30_exists_global (sq_nonneg σ) hσ2 1 lam |
| 200 | have hK := neighborStabilityConstant_ge |
| 201 | have hΘ0 : 0 ≤ Θ := by linarith only [hΘ] |
| 202 | have hsmallODE : 8000000*e*Θ^21 ≤ 1 := by |
| 203 | have hm := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 21 ≤ 40)) he |
| 204 | have hprod := mul_nonneg (show 0 ≤ neighborStabilityConstant-8 by linarith only [hK]) |
| 205 | (mul_nonneg he (pow_nonneg hΘ0 40)) |
| 206 | nlinarith only [hsmall, hm, hprod] |
| 207 | have herror := controlled_neighbor_relative_error_within hσ hσsmall hΘ hT0 hT he hε hεe |
| 208 | hlam hsmallODE (fun t _ => hF t) (fun t _ => hG t) (fun t _ => hfluxF t) (fun t _ => hfluxG t) |
| 209 | hF0 hF₁0 hG₁0 hRc hAc hCc hP hQ hN hU hV hRclose hAclose hCclose |
| 210 | (fun t _ => hZ t) (fun t _ => hfluxZ t) hrayInitial hvelocityInitial hZ0 hZ₁0 |
| 211 | refine ⟨F, F₁, Z, Z₁, hF0, hF₁0, hZ0, hZ₁0, hF, hZ, hfluxF, hfluxZ, herror, ?_⟩ |
| 212 | intro t ht |
| 213 | let δ := 400000000*e*Θ^29 |
| 214 | have hδ : 0 ≤ δ := by dsimp [δ]; positivity |
| 215 | have hs : 4*exp 6*δ ≤ 1 := by |
| 216 | have hm := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 29 ≤ 40)) |
| 217 | (show 0 ≤ neighborStabilityConstant*e by positivity [neighborStabilityConstant]) |
| 218 | have hn : 0 ≤ neighborStabilityConstant*e*Θ^40 := by positivity [neighborStabilityConstant] |
| 219 | dsimp [δ] |
| 220 | unfold neighborStabilityConstant at hm hn hsmall |
| 221 | nlinarith only [hm, hn, hsmall] |
| 222 | have herror' : |V t-Z t|+|U t+Z₁ t| ≤ δ*(1+lam)*F t := |
| 223 | herror t ⟨by linarith only [ht.1], ht.2⟩ |
| 224 | have hc := equation30_relative_state_consequences hσ hσsmall hlam ht.1 hδ hs |
| 225 | (fun t _ => hF t) (fun t _ => hZ t) (fun t _ => hfluxF t) (fun t _ => hfluxZ t) |
| 226 | hF0 hF₁0 hZ0 hZ₁0 herror' |
| 227 | refine ⟨hc.1, ?_, ?_⟩ |
| 228 | · dsimp [δ] at hc |
| 229 | unfold neighborStabilityConstant |
| 230 | nlinarith only [hc.2.1, mul_nonneg (mul_nonneg (exp_pos (6:ℝ)).le he) (pow_nonneg hΘ0 29)] |
| 231 | · dsimp [δ] at hc |
| 232 | unfold neighborStabilityConstant |
| 233 | nlinarith only [hc.2.2, mul_nonneg (mul_nonneg (exp_pos (6:ℝ)).le he) (pow_nonneg hΘ0 29)] |
| 234 | |
| 235 | end EulerPacketMovingFrame |