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.SimilarityProfile |
| 2 | import NavierStokes.Scaling |
| 3 | |
| 4 | /-! |
| 5 | # Homogeneity of the actual similarity coordinates |
| 6 | |
| 7 | The coordinate `q` is the positive branch constructed in |
| 8 | `SimilarityCoordinates`. Its scaling law follows from uniqueness of that |
| 9 | branch. The band coordinates below are `(R,(Z,T))`, with `T = τ / Q`. |
| 10 | Consequently the profile coordinate is `X = R² / (2 q(T,Z))`, not a fixed |
| 11 | function of `R` alone. Profile weights are transported exactly by a change |
| 12 | of band scale. |
| 13 | -/ |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | namespace NavierStokes.SimilarityHomogeneity |
| 18 | |
| 19 | open SimilarityCoordinates |
| 20 | open scoped ContDiff |
| 21 | |
| 22 | abbrev D := CoordinateAlgebra.D |
| 23 | |
| 24 | /-- The scalar defining equation has the required anisotropic homogeneity. -/ |
| 25 | theorem forwardScalar_scale {Q q : ℝ} (hQ : 0 < Q) (hq : 0 < q) (a z : ℝ) : |
| 26 | forwardScalar a (Q ^ ((1 - a) / 2) * z) (Q * q) = |
| 27 | Q * forwardScalar a z q := by |
| 28 | have hp : (Q ^ ((1 - a) / 2)) ^ 2 * Q ^ a = Q := by |
| 29 | rw [← Real.rpow_mul_natCast hQ.le, ← Real.rpow_add hQ] |
| 30 | rw [show (1 - a) / 2 * (2 : ℕ) + a = (1 : ℝ) by ring, Real.rpow_one] |
| 31 | unfold forwardScalar |
| 32 | rw [Real.mul_rpow hQ.le hq.le, mul_pow] |
| 33 | calc |
| 34 | Q * q - (Q ^ ((1 - a) / 2)) ^ 2 * z ^ 2 * (Q ^ a * q ^ a) = |
| 35 | Q * q - ((Q ^ ((1 - a) / 2)) ^ 2 * Q ^ a) * (z ^ 2 * q ^ a) := by ring |
| 36 | _ = Q * (q - z ^ 2 * q ^ a) := by rw [hp]; ring |
| 37 | |
| 38 | /-- Exact scaling of the defined coordinate, obtained by positive-branch |
| 39 | uniqueness rather than by postulating homogeneity. -/ |
| 40 | theorem coordinateQ_scale {a Q τ z : ℝ} (ha : 0 < a) (ha1 : a < 1) |
| 41 | (hQ : 0 < Q) (hτ : 0 < τ) : |
| 42 | coordinateQ a (Q * τ, Q ^ ((1 - a) / 2) * z) = |
| 43 | Q * coordinateQ a (τ, z) := by |
| 44 | have hs := coordinateQ_spec ha ha1 (p := (τ, z)) hτ |
| 45 | apply (eq_coordinateQ ha ha1 (mul_pos hQ hτ) (mul_pos hQ hs.1) ?_).symm |
| 46 | rw [forwardScalar_scale hQ hs.1, hs.2] |
| 47 | |
| 48 | /-- The defined axial similarity parameter is invariant under scaling. -/ |
| 49 | theorem coordinateEta_scale {a Q τ z : ℝ} (ha : 0 < a) (ha1 : a < 1) |
| 50 | (hQ : 0 < Q) (hτ : 0 < τ) : |
| 51 | coordinateEta a (Q * τ, Q ^ ((1 - a) / 2) * z) = |
| 52 | coordinateEta a (τ, z) := by |
| 53 | have hq := (coordinateQ_spec ha ha1 (p := (τ, z)) hτ).1 |
| 54 | unfold coordinateEta |
| 55 | rw [coordinateQ_scale ha ha1 hQ hτ, Real.mul_rpow hQ.le hq.le] |
| 56 | exact mul_div_mul_left _ _ (Real.rpow_pos_of_pos hQ _).ne' |
| 57 | |
| 58 | /-- Scaling `s` and `τ` by the same factor preserves the defined `X`. -/ |
| 59 | theorem coordinateX_scale {a Q τ z s : ℝ} (ha : 0 < a) (ha1 : a < 1) |
| 60 | (hQ : 0 < Q) (hτ : 0 < τ) : |
| 61 | coordinateX a (Q * s) (Q * τ, Q ^ ((1 - a) / 2) * z) = |
| 62 | coordinateX a s (τ, z) := by |
| 63 | unfold coordinateX |
| 64 | rw [coordinateQ_scale ha ha1 hQ hτ] |
| 65 | exact mul_div_mul_left _ _ hQ.ne' |
| 66 | |
| 67 | /-- The manuscript's exact `h,D` convention. -/ |
| 68 | theorem coordinateQ_scale_h {h Q τ z : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 69 | (hQ : 0 < Q) (hτ : 0 < τ) : |
| 70 | coordinateQ (2 * h) (Q * τ, Q ^ D h * z) = |
| 71 | Q * coordinateQ (2 * h) (τ, z) := by |
| 72 | simpa only [SimilarityProfile.D_eq] using |
| 73 | coordinateQ_scale (a := 2 * h) (by linarith) (by linarith) hQ hτ |
| 74 | |
| 75 | theorem coordinateEta_scale_h {h Q τ z : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 76 | (hQ : 0 < Q) (hτ : 0 < τ) : |
| 77 | coordinateEta (2 * h) (Q * τ, Q ^ D h * z) = |
| 78 | coordinateEta (2 * h) (τ, z) := by |
| 79 | simpa only [SimilarityProfile.D_eq] using |
| 80 | coordinateEta_scale (a := 2 * h) (by linarith) (by linarith) hQ hτ |
| 81 | |
| 82 | theorem coordinateX_scale_h {h Q τ z s : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 83 | (hQ : 0 < Q) (hτ : 0 < τ) : |
| 84 | coordinateX (2 * h) (Q * s) (Q * τ, Q ^ D h * z) = |
| 85 | coordinateX (2 * h) s (τ, z) := by |
| 86 | simpa only [SimilarityProfile.D_eq] using |
| 87 | coordinateX_scale (a := 2 * h) (s := s) (by linarith) (by linarith) hQ hτ |
| 88 | |
| 89 | /-- Physical time is `t=1-τ`; physical points have layout `(t,(s,z))`. -/ |
| 90 | noncomputable def physicalScale (h Q : ℝ) (p : SimilarityProfile.PhysicalPoint) : |
| 91 | SimilarityProfile.PhysicalPoint := |
| 92 | (1 - Q * (1 - p.1), (Q * p.2.1, Q ^ D h * p.2.2)) |
| 93 | |
| 94 | theorem physicalScale_smooth (h Q : ℝ) : ContDiff ℝ ∞ (physicalScale h Q) := |
| 95 | (contDiff_const.sub (contDiff_const.mul (contDiff_const.sub contDiff_fst))).prodMk |
| 96 | ((contDiff_const.mul contDiff_snd.fst).prodMk |
| 97 | (contDiff_const.mul contDiff_snd.snd)) |
| 98 | |
| 99 | theorem physicalScale_time_lt_one {h Q : ℝ} (hQ : 0 < Q) |
| 100 | {p : SimilarityProfile.PhysicalPoint} (hp : p.1 < 1) : |
| 101 | (physicalScale h Q p).1 < 1 := by |
| 102 | change 1 - Q * (1 - p.1) < 1 |
| 103 | linarith [mul_pos hQ (sub_pos.mpr hp)] |
| 104 | |
| 105 | theorem q_physicalScale {h Q : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 106 | (hQ : 0 < Q) {p : SimilarityProfile.PhysicalPoint} (hp : p.1 < 1) : |
| 107 | SimilarityProfile.q h (physicalScale h Q p) = Q * SimilarityProfile.q h p := by |
| 108 | change coordinateQ (2 * h) (1 - (1 - Q * (1 - p.1)), Q ^ D h * p.2.2) = _ |
| 109 | rw [show 1 - (1 - Q * (1 - p.1)) = Q * (1 - p.1) by ring] |
| 110 | exact coordinateQ_scale_h hh hh1 hQ (sub_pos.mpr hp) |
| 111 | |
| 112 | theorem eta_physicalScale {h Q : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 113 | (hQ : 0 < Q) {p : SimilarityProfile.PhysicalPoint} (hp : p.1 < 1) : |
| 114 | SimilarityProfile.eta h (physicalScale h Q p) = SimilarityProfile.eta h p := by |
| 115 | change coordinateEta (2 * h) (1 - (1 - Q * (1 - p.1)), Q ^ D h * p.2.2) = _ |
| 116 | rw [show 1 - (1 - Q * (1 - p.1)) = Q * (1 - p.1) by ring] |
| 117 | exact coordinateEta_scale_h hh hh1 hQ (sub_pos.mpr hp) |
| 118 | |
| 119 | theorem X_physicalScale {h Q : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 120 | (hQ : 0 < Q) {p : SimilarityProfile.PhysicalPoint} (hp : p.1 < 1) : |
| 121 | SimilarityProfile.X h (physicalScale h Q p) = SimilarityProfile.X h p := by |
| 122 | unfold SimilarityProfile.X |
| 123 | rw [q_physicalScale hh hh1 hQ hp] |
| 124 | change (Q * p.2.1) / (Q * SimilarityProfile.q h p) = _ |
| 125 | exact mul_div_mul_left _ _ hQ.ne' |
| 126 | |
| 127 | theorem inner_physicalScale {h Q : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 128 | (hQ : 0 < Q) {p : SimilarityProfile.PhysicalPoint} (hp : p.1 < 1) : |
| 129 | SimilarityProfile.inner h (physicalScale h Q p) = SimilarityProfile.inner h p := |
| 130 | Prod.ext (X_physicalScale hh hh1 hQ hp) (eta_physicalScale hh hh1 hQ hp) |
| 131 | |
| 132 | /-- Homogeneity holds for every profile, without assuming its smoothness. -/ |
| 133 | theorem pullback_physicalScale {h Q b : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 134 | (hQ : 0 < Q) {p : SimilarityProfile.PhysicalPoint} (hp : p.1 < 1) |
| 135 | (f : SimilarityProfile.InnerProfile) : |
| 136 | SimilarityProfile.pullback h b f (physicalScale h Q p) = |
| 137 | Q ^ b * SimilarityProfile.pullback h b f p := by |
| 138 | unfold SimilarityProfile.pullback |
| 139 | rw [q_physicalScale hh hh1 hQ hp, inner_physicalScale hh hh1 hQ hp, |
| 140 | Real.mul_rpow hQ.le (SimilarityProfile.q_pos hh hh1 hp).le] |
| 141 | ring |
| 142 | |
| 143 | abbrev ChartPoint := ℝ × (ℝ × ℝ) |
| 144 | |
| 145 | /-- A band chart is ordered `(R,(Z,T))`. -/ |
| 146 | noncomputable def chartQ (h : ℝ) (p : ChartPoint) : ℝ := |
| 147 | coordinateQ (2 * h) (p.2.2, p.2.1) |
| 148 | |
| 149 | noncomputable def chartEta (h : ℝ) (p : ChartPoint) : ℝ := |
| 150 | coordinateEta (2 * h) (p.2.2, p.2.1) |
| 151 | |
| 152 | noncomputable def chartX (h : ℝ) (p : ChartPoint) : ℝ := |
| 153 | coordinateX (2 * h) (p.1 ^ 2 / 2) (p.2.2, p.2.1) |
| 154 | |
| 155 | noncomputable def chartInner (h : ℝ) (p : ChartPoint) : ℝ × ℝ := |
| 156 | (chartX h p, chartEta h p) |
| 157 | |
| 158 | /-- Transition from the band of scale `Q` to the band of scale `Q'`. -/ |
| 159 | noncomputable def chartTransition (h Q Q' : ℝ) (p : ChartPoint) : ChartPoint := |
| 160 | ((Q / Q') ^ (1 / 2 : ℝ) * p.1, |
| 161 | ((Q / Q') ^ D h * p.2.1, (Q / Q') * p.2.2)) |
| 162 | |
| 163 | theorem chartTransition_smooth (h Q Q' : ℝ) : |
| 164 | ContDiff ℝ ∞ (chartTransition h Q Q') := |
| 165 | (contDiff_const.mul contDiff_fst).prodMk |
| 166 | ((contDiff_const.mul contDiff_snd.fst).prodMk |
| 167 | (contDiff_const.mul contDiff_snd.snd)) |
| 168 | |
| 169 | theorem chartTransition_time_pos {h Q Q' : ℝ} (hQ : 0 < Q) (hQ' : 0 < Q') |
| 170 | {p : ChartPoint} (hp : 0 < p.2.2) : 0 < (chartTransition h Q Q' p).2.2 := |
| 171 | mul_pos (div_pos hQ hQ') hp |
| 172 | |
| 173 | theorem chartQ_transition {h Q Q' : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 174 | (hQ : 0 < Q) (hQ' : 0 < Q') {p : ChartPoint} (hp : 0 < p.2.2) : |
| 175 | chartQ h (chartTransition h Q Q' p) = (Q / Q') * chartQ h p := |
| 176 | coordinateQ_scale_h hh hh1 (div_pos hQ hQ') hp |
| 177 | |
| 178 | theorem chartEta_transition {h Q Q' : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 179 | (hQ : 0 < Q) (hQ' : 0 < Q') {p : ChartPoint} (hp : 0 < p.2.2) : |
| 180 | chartEta h (chartTransition h Q Q' p) = chartEta h p := |
| 181 | coordinateEta_scale_h hh hh1 (div_pos hQ hQ') hp |
| 182 | |
| 183 | theorem chartX_transition {h Q Q' : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 184 | (hQ : 0 < Q) (hQ' : 0 < Q') {p : ChartPoint} (hp : 0 < p.2.2) : |
| 185 | chartX h (chartTransition h Q Q' p) = chartX h p := by |
| 186 | have hr : 0 < Q / Q' := div_pos hQ hQ' |
| 187 | have hs : ((Q / Q') ^ (1 / 2 : ℝ) * p.1) ^ 2 / 2 = |
| 188 | (Q / Q') * (p.1 ^ 2 / 2) := by |
| 189 | rw [mul_pow, ← Real.rpow_mul_natCast hr.le] |
| 190 | norm_num |
| 191 | ring |
| 192 | change coordinateX (2 * h) (((Q / Q') ^ (1 / 2 : ℝ) * p.1) ^ 2 / 2) |
| 193 | ((Q / Q') * p.2.2, (Q / Q') ^ D h * p.2.1) = _ |
| 194 | rw [hs] |
| 195 | exact coordinateX_scale_h hh hh1 hr hp |
| 196 | |
| 197 | theorem chartInner_transition {h Q Q' : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 198 | (hQ : 0 < Q) (hQ' : 0 < Q') {p : ChartPoint} (hp : 0 < p.2.2) : |
| 199 | chartInner h (chartTransition h Q Q' p) = chartInner h p := |
| 200 | Prod.ext (chartX_transition hh hh1 hQ hQ' hp) (chartEta_transition hh hh1 hQ hQ' hp) |
| 201 | |
| 202 | /-- The genuine chart-to-physical map, with radial variable `s=r²/2`. -/ |
| 203 | noncomputable def chartToPhysical (h Q : ℝ) (p : ChartPoint) : |
| 204 | SimilarityProfile.PhysicalPoint := |
| 205 | (1 - Q * p.2.2, (Q * (p.1 ^ 2 / 2), Q ^ D h * p.2.1)) |
| 206 | |
| 207 | theorem chartToPhysical_smooth (h Q : ℝ) : ContDiff ℝ ∞ (chartToPhysical h Q) := |
| 208 | (contDiff_const.sub (contDiff_const.mul contDiff_snd.snd)).prodMk |
| 209 | ((contDiff_const.mul ((contDiff_fst.pow 2).div_const 2)).prodMk |
| 210 | (contDiff_const.mul contDiff_snd.fst)) |
| 211 | |
| 212 | theorem chartToPhysical_time_lt_one {h Q : ℝ} (hQ : 0 < Q) |
| 213 | {p : ChartPoint} (hp : 0 < p.2.2) : (chartToPhysical h Q p).1 < 1 := by |
| 214 | change 1 - Q * p.2.2 < 1 |
| 215 | linarith [mul_pos hQ hp] |
| 216 | |
| 217 | /-- The radial component really is obtained from `r = sqrt(Q) R`. -/ |
| 218 | theorem chartToPhysical_radial {Q : ℝ} (hQ : 0 < Q) (h : ℝ) (p : ChartPoint) : |
| 219 | (chartToPhysical h Q p).2.1 = (Scaling.radialLength Q * p.1) ^ 2 / 2 := by |
| 220 | unfold chartToPhysical Scaling.radialLength |
| 221 | dsimp only |
| 222 | rw [mul_pow, ← Real.rpow_mul_natCast hQ.le] |
| 223 | norm_num |
| 224 | ring |
| 225 | |
| 226 | theorem q_chartToPhysical {h Q : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 227 | (hQ : 0 < Q) {p : ChartPoint} (hp : 0 < p.2.2) : |
| 228 | SimilarityProfile.q h (chartToPhysical h Q p) = Q * chartQ h p := by |
| 229 | change coordinateQ (2 * h) (1 - (1 - Q * p.2.2), Q ^ D h * p.2.1) = _ |
| 230 | rw [show 1 - (1 - Q * p.2.2) = Q * p.2.2 by ring] |
| 231 | exact coordinateQ_scale_h hh hh1 hQ hp |
| 232 | |
| 233 | theorem eta_chartToPhysical {h Q : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 234 | (hQ : 0 < Q) {p : ChartPoint} (hp : 0 < p.2.2) : |
| 235 | SimilarityProfile.eta h (chartToPhysical h Q p) = chartEta h p := by |
| 236 | change coordinateEta (2 * h) (1 - (1 - Q * p.2.2), Q ^ D h * p.2.1) = _ |
| 237 | rw [show 1 - (1 - Q * p.2.2) = Q * p.2.2 by ring] |
| 238 | exact coordinateEta_scale_h hh hh1 hQ hp |
| 239 | |
| 240 | theorem X_chartToPhysical {h Q : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 241 | (hQ : 0 < Q) {p : ChartPoint} (hp : 0 < p.2.2) : |
| 242 | SimilarityProfile.X h (chartToPhysical h Q p) = chartX h p := by |
| 243 | unfold SimilarityProfile.X |
| 244 | rw [q_chartToPhysical hh hh1 hQ hp] |
| 245 | change (Q * (p.1 ^ 2 / 2)) / (Q * chartQ h p) = (p.1 ^ 2 / 2) / chartQ h p |
| 246 | exact mul_div_mul_left _ _ hQ.ne' |
| 247 | |
| 248 | theorem inner_chartToPhysical {h Q : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 249 | (hQ : 0 < Q) {p : ChartPoint} (hp : 0 < p.2.2) : |
| 250 | SimilarityProfile.inner h (chartToPhysical h Q p) = chartInner h p := |
| 251 | Prod.ext (X_chartToPhysical hh hh1 hQ hp) (eta_chartToPhysical hh hh1 hQ hp) |
| 252 | |
| 253 | /-- Two band descriptions of the same physical point agree exactly. -/ |
| 254 | theorem chartToPhysical_transition {h Q Q' : ℝ} (hQ : 0 < Q) (hQ' : 0 < Q') |
| 255 | (p : ChartPoint) : |
| 256 | chartToPhysical h Q' (chartTransition h Q Q' p) = chartToPhysical h Q p := by |
| 257 | have hr : 0 < Q / Q' := div_pos hQ hQ' |
| 258 | have hs : ((Q / Q') ^ (1 / 2 : ℝ)) ^ 2 = Q / Q' := by |
| 259 | rw [← Real.rpow_mul_natCast hr.le] |
| 260 | norm_num |
| 261 | have hz : Q' ^ D h * (Q / Q') ^ D h = Q ^ D h := by |
| 262 | rw [← Real.mul_rpow hQ'.le hr.le] |
| 263 | congr 1 |
| 264 | field_simp |
| 265 | apply Prod.ext |
| 266 | · dsimp [chartToPhysical, chartTransition] |
| 267 | field_simp |
| 268 | · apply Prod.ext |
| 269 | · dsimp [chartToPhysical, chartTransition] |
| 270 | rw [mul_pow, hs] |
| 271 | field_simp |
| 272 | · dsimp [chartToPhysical, chartTransition] |
| 273 | rw [← mul_assoc, hz] |
| 274 | |
| 275 | theorem chartTransition_refl {Q : ℝ} (hQ : 0 < Q) (h : ℝ) (p : ChartPoint) : |
| 276 | chartTransition h Q Q p = p := by |
| 277 | simp [chartTransition, hQ.ne'] |
| 278 | |
| 279 | theorem chartTransition_comp {h Q Q' Q'' : ℝ} |
| 280 | (hQ : 0 < Q) (hQ' : 0 < Q') (hQ'' : 0 < Q'') (p : ChartPoint) : |
| 281 | chartTransition h Q' Q'' (chartTransition h Q Q' p) = |
| 282 | chartTransition h Q Q'' p := by |
| 283 | have hr : Q' / Q'' * (Q / Q') = Q / Q'' := by field_simp |
| 284 | have hpow (a : ℝ) : (Q' / Q'') ^ a * (Q / Q') ^ a = (Q / Q'') ^ a := by |
| 285 | rw [← Real.mul_rpow (div_pos hQ' hQ'').le (div_pos hQ hQ').le, hr] |
| 286 | apply Prod.ext |
| 287 | · dsimp [chartTransition] |
| 288 | rw [← mul_assoc, hpow] |
| 289 | · apply Prod.ext |
| 290 | · dsimp [chartTransition] |
| 291 | rw [← mul_assoc, hpow] |
| 292 | · dsimp [chartTransition] |
| 293 | rw [← mul_assoc, hr] |
| 294 | |
| 295 | theorem chartTransition_inverse {h Q Q' : ℝ} (hQ : 0 < Q) (hQ' : 0 < Q') |
| 296 | (p : ChartPoint) : |
| 297 | chartTransition h Q' Q (chartTransition h Q Q' p) = p := by |
| 298 | rw [chartTransition_comp hQ hQ' hQ, chartTransition_refl hQ] |
| 299 | |
| 300 | /-- The usual open annular-chart domain; profile annulus restrictions can |
| 301 | be added using `chartX_mem_transition`. -/ |
| 302 | noncomputable def chartDomain : Set ChartPoint := {p | 0 < p.1 ∧ 0 < p.2.2} |
| 303 | |
| 304 | theorem isOpen_chartDomain : IsOpen chartDomain := |
| 305 | (isOpen_lt continuous_const continuous_fst).inter |
| 306 | (isOpen_lt continuous_const continuous_snd.snd) |
| 307 | |
| 308 | theorem chartTransition_mem_iff {h Q Q' : ℝ} (hQ : 0 < Q) (hQ' : 0 < Q') |
| 309 | (p : ChartPoint) : chartTransition h Q Q' p ∈ chartDomain ↔ p ∈ chartDomain := by |
| 310 | change (0 < (Q / Q') ^ (1 / 2 : ℝ) * p.1 ∧ 0 < (Q / Q') * p.2.2) ↔ _ |
| 311 | rw [mul_pos_iff_of_pos_left (Real.rpow_pos_of_pos (div_pos hQ hQ') _), |
| 312 | mul_pos_iff_of_pos_left (div_pos hQ hQ')] |
| 313 | rfl |
| 314 | |
| 315 | theorem chartInner_smoothAt {h : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 316 | {p : ChartPoint} (hp : 0 < p.2.2) : ContDiffAt ℝ ∞ (chartInner h) p := by |
| 317 | have hm : ContDiffAt ℝ ∞ (fun x : ChartPoint => (x.2.2, x.2.1)) p := |
| 318 | contDiffAt_snd.snd.prodMk contDiffAt_snd.fst |
| 319 | have hq : ContDiffAt ℝ ∞ (chartQ h) p := |
| 320 | (coordinateQ_smooth (by linarith) (by linarith) (p := (p.2.2, p.2.1)) hp).comp p hm |
| 321 | have he : ContDiffAt ℝ ∞ (chartEta h) p := |
| 322 | (coordinateEta_smooth (by linarith) (by linarith) (p := (p.2.2, p.2.1)) hp).comp p hm |
| 323 | have hqp : 0 < chartQ h p := |
| 324 | (coordinateQ_spec (by linarith) (by linarith) (p := (p.2.2, p.2.1)) hp).1 |
| 325 | exact (((contDiffAt_fst.pow 2).div_const 2).div hq hqp.ne').prodMk he |
| 326 | |
| 327 | theorem chartX_mem_transition {h Q Q' : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) |
| 328 | (hQ : 0 < Q) (hQ' : 0 < Q') {p : ChartPoint} (hp : 0 < p.2.2) (I : Set ℝ) : |
| 329 | chartX h (chartTransition h Q Q' p) ∈ I ↔ chartX h p ∈ I := by |
| 330 | rw [chartX_transition hh hh1 hQ hQ' hp] |
| 331 | |
| 332 | /-- Every profile depending on both actual inner coordinates is unchanged. -/ |
| 333 | theorem chartProfile_transition {E : Type*} {h Q Q' : ℝ} |
| 334 | (hh : 0 < h) (hh1 : h < 1 / 2) (hQ : 0 < Q) (hQ' : 0 < Q') |
| 335 | {p : ChartPoint} (hp : 0 < p.2.2) (F : (ℝ × ℝ) → E) : |
| 336 | F (chartInner h (chartTransition h Q Q' p)) = F (chartInner h p) := by |
| 337 | rw [chartInner_transition hh hh1 hQ hQ' hp] |
| 338 | |
| 339 | noncomputable def chartWeight {E : Type*} (h : ℝ) (ζ : ℝ → E) (p : ChartPoint) : E := |
| 340 | ζ (chartX h p) |
| 341 | |
| 342 | /-- In particular an arbitrarily flat weight is transported with factor one. -/ |
| 343 | theorem chartWeight_transition {E : Type*} {h Q Q' : ℝ} |
| 344 | (hh : 0 < h) (hh1 : h < 1 / 2) (hQ : 0 < Q) (hQ' : 0 < Q') |
| 345 | {p : ChartPoint} (hp : 0 < p.2.2) (ζ : ℝ → E) : |
| 346 | chartWeight h ζ (chartTransition h Q Q' p) = chartWeight h ζ p := |
| 347 | congrArg ζ (chartX_transition hh hh1 hQ hQ' hp) |
| 348 | |
| 349 | /-- The lesser of one and the two logarithmic distances to fixed profile |
| 350 | edges. Positivity is asserted only inside a positive profile interval. -/ |
| 351 | noncomputable def profileLogDistance (left right X : ℝ) : ℝ := |
| 352 | min 1 (min (Real.log X - Real.log left) (Real.log right - Real.log X)) |
| 353 | |
| 354 | theorem profileLogDistance_pos {left right X : ℝ} (hl : 0 < left) |
| 355 | (hLX : left < X) (hXR : X < right) : 0 < profileLogDistance left right X := by |
| 356 | exact lt_min zero_lt_one (lt_min (sub_pos.mpr (Real.log_lt_log hl hLX)) |
| 357 | (sub_pos.mpr (Real.log_lt_log (hl.trans hLX) hXR))) |
| 358 | |
| 359 | noncomputable def chartLogDistance (h left right : ℝ) (p : ChartPoint) : ℝ := |
| 360 | profileLogDistance left right (chartX h p) |
| 361 | |
| 362 | theorem chartLogDistance_transition {h Q Q' : ℝ} |
| 363 | (hh : 0 < h) (hh1 : h < 1 / 2) (hQ : 0 < Q) (hQ' : 0 < Q') |
| 364 | {p : ChartPoint} (hp : 0 < p.2.2) (left right : ℝ) : |
| 365 | chartLogDistance h left right (chartTransition h Q Q' p) = |
| 366 | chartLogDistance h left right p := |
| 367 | congrArg (profileLogDistance left right) (chartX_transition hh hh1 hQ hQ' hp) |
| 368 | |
| 369 | /-- Exact transport includes square-root flat weights and every real edge |
| 370 | power, including the negative powers used for derivative losses. -/ |
| 371 | theorem chartWeightedFactor_transition {h Q Q' : ℝ} |
| 372 | (hh : 0 < h) (hh1 : h < 1 / 2) (hQ : 0 < Q) (hQ' : 0 < Q') |
| 373 | {p : ChartPoint} (hp : 0 < p.2.2) (ζ : ℝ → ℝ) (left right exponent : ℝ) : |
| 374 | Real.sqrt (chartWeight h ζ (chartTransition h Q Q' p)) * |
| 375 | chartLogDistance h left right (chartTransition h Q Q' p) ^ exponent = |
| 376 | Real.sqrt (chartWeight h ζ p) * chartLogDistance h left right p ^ exponent := by |
| 377 | rw [chartWeight_transition hh hh1 hQ hQ' hp, |
| 378 | chartLogDistance_transition hh hh1 hQ hQ' hp] |
| 379 | |
| 380 | end NavierStokes.SimilarityHomogeneity |