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.HeatedOutgoing |
| 2 | import NavierStokes.TerminalEdgeFactor |
| 3 | import NavierStokes.LeadingStress |
| 4 | import NavierStokes.HeatSwitchCone |
| 5 | import NavierStokes.TerminalCone |
| 6 | import NavierStokes.HeatSwitchHistoryDerivatives |
| 7 | import NavierStokes.HeatTailHistoryLimits |
| 8 | |
| 9 | /-! |
| 10 | # The same compensated histories and the terminal backward stress |
| 11 | |
| 12 | All forward histories in this file use the supplied compensation witness. |
| 13 | The base outgoing energy identity is kept explicit; zero changes alone do |
| 14 | not imply a zero total energy moment. |
| 15 | -/ |
| 16 | |
| 17 | noncomputable section |
| 18 | |
| 19 | namespace NavierStokes.TerminalHistoryBridge |
| 20 | |
| 21 | open Set Filter Function MeasureTheory |
| 22 | open scoped Topology ContDiff |
| 23 | open OutgoingProfile (Profile) |
| 24 | open HeatedOutgoing (CompensationWitness Coeff) |
| 25 | |
| 26 | private theorem two_le_infty : (2 : WithTop ℕ∞) ≤ ∞ := WithTop.coe_le_coe.mpr le_top |
| 27 | |
| 28 | noncomputable def angularHistory (F : Profile) (XR : ℝ) (c : ℝ → Coeff) |
| 29 | (η X : ℝ) : ℝ := ∫ u in Ioc 0 X, HeatedOutgoing.H F XR c (u,η) |
| 30 | |
| 31 | noncomputable def energyHistory (F : Profile) (XR : ℝ) (c : ℝ → Coeff) |
| 32 | (η X : ℝ) : ℝ := ∫ u in Ioc 0 X, HeatedOutgoing.energyDensity F XR c η u |
| 33 | |
| 34 | noncomputable def powerHistory (F : Profile) (XR X : ℝ) : ℝ := |
| 35 | ∫ u in Ioc 0 X, OutgoingDilation.powerH F XR u |
| 36 | |
| 37 | theorem split_positive_integral {f : ℝ → ℝ} (hf : IntegrableOn f (Ioi 0)) |
| 38 | {X : ℝ} (hX : 0 ≤ X) : |
| 39 | (∫ u in Ioc 0 X, f u) + (∫ u in Ioi X, f u) = ∫ u in Ioi 0, f u := by |
| 40 | simpa only [Ioc_union_Ioi_eq_Ioi hX] using |
| 41 | (setIntegral_union Ioc_disjoint_Ioi_same measurableSet_Ioi |
| 42 | (hf.mono_set Ioc_subset_Ioi_self) (hf.mono_set (Ioi_subset_Ioi hX))).symm |
| 43 | |
| 44 | noncomputable def normalization (F : Profile) (XR : ℝ) : ℝ := |
| 45 | TerminalPressure.releasedNormalization F.data (OutgoingDilation.switchRadius F XR) |
| 46 | |
| 47 | noncomputable def shift (F : Profile) (XR : ℝ) : ℝ := |
| 48 | Real.log (OutgoingDilation.switchRadius F XR) - 1/5 |
| 49 | |
| 50 | noncomputable def physicalAngular (F : Profile) (XR : ℝ) (c : ℝ → Coeff) : |
| 51 | SimilarityProfile.PhysicalProfile := |
| 52 | SimilarityProfile.pullback F.data.h (-TerminalPressure.amplitudeExponent F.data.h) |
| 53 | (HeatedOutgoing.E F XR c) |
| 54 | |
| 55 | noncomputable def physicalPressure (F : Profile) (XR : ℝ) (c : ℝ → Coeff) : |
| 56 | SimilarityProfile.PhysicalProfile := |
| 57 | SimilarityProfile.pullback F.data.h (-2*TerminalPressure.amplitudeExponent F.data.h) |
| 58 | (HeatedOutgoing.Pi F XR c) |
| 59 | |
| 60 | theorem physicalAngular_eq_terminal (F : Profile) {XR : ℝ} (hXR : 0 < XR) |
| 61 | (c : ℝ → Coeff) {p : SimilarityProfile.PhysicalPoint} |
| 62 | (ht : p.1 < 1) (hs : 0 < p.2.1) |
| 63 | (hfull : 1/2 ≤ Real.log (SimilarityProfile.X F.data.h p / |
| 64 | OutgoingDilation.switchRadius F XR) + 1/5) : |
| 65 | physicalAngular F XR c p = |
| 66 | TerminalStress.physicalHeat (normalization F XR) (1+F.data.h) p * |
| 67 | TerminalPressure.outgoingTaper F.data (shift F XR) (Real.log (SimilarityProfile.X F.data.h p)) := by |
| 68 | have hK := OutgoingDilation.switchRadius_pos F XR hXR |
| 69 | have hX := div_pos hs (SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht) |
| 70 | unfold physicalAngular SimilarityProfile.pullback SimilarityProfile.inner |
| 71 | rw [HeatedOutgoing.E_after_switch F XR c (SimilarityProfile.eta F.data.h p) |
| 72 | (SimilarityProfile.X F.data.h p) hXR (HeatedOutgoing.full_switch_above_radius hK hX hfull)] |
| 73 | exact TerminalPressure.physicalEdit_eq_released_carrier F.data hK ht hs hfull |
| 74 | |
| 75 | theorem full_switch_radial {F : Profile} {XR : ℝ} (hXR : 0 < XR) |
| 76 | {p : SimilarityProfile.PhysicalPoint} (ht : p.1 < 1) (hs : 0 < p.2.1) |
| 77 | (hfull : 1/2 ≤ Real.log (SimilarityProfile.X F.data.h p / |
| 78 | OutgoingDilation.switchRadius F XR) + 1/5) {u : ℝ} (hu : p.2.1 ≤ u) : |
| 79 | 1/2 ≤ Real.log (SimilarityProfile.X F.data.h (p.1,(u,p.2.2)) / |
| 80 | OutgoingDilation.switchRadius F XR) + 1/5 := by |
| 81 | have hq := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht |
| 82 | have hK := OutgoingDilation.switchRadius_pos F XR hXR |
| 83 | have hX : 0 < SimilarityProfile.X F.data.h p := div_pos hs hq |
| 84 | have hle : SimilarityProfile.X F.data.h p ≤ SimilarityProfile.X F.data.h (p.1,(u,p.2.2)) := by |
| 85 | change p.2.1 / SimilarityProfile.q F.data.h p ≤ u / SimilarityProfile.q F.data.h p |
| 86 | exact div_le_div_of_nonneg_right hu hq.le |
| 87 | have hlog := Real.log_le_log (div_pos hX hK) (div_le_div_of_nonneg_right hle hK.le) |
| 88 | linarith |
| 89 | |
| 90 | /-- Exact physical canonical pressure, with its required `q^(-2A)` factor. |
| 91 | This is a change of variables in the actual improper integral. -/ |
| 92 | theorem physicalPressure_eq_terminal (F : Profile) {XR : ℝ} (hXR : 0 < XR) |
| 93 | (c : ℝ → Coeff) {p : SimilarityProfile.PhysicalPoint} |
| 94 | (ht : p.1 < 1) (hs : 0 < p.2.1) |
| 95 | (hfull : 1/2 ≤ Real.log (SimilarityProfile.X F.data.h p / |
| 96 | OutgoingDilation.switchRadius F XR) + 1/5) : |
| 97 | physicalPressure F XR c p = |
| 98 | TerminalPressure.outgoingPressure (normalization F XR) F.data (shift F XR) p := by |
| 99 | let q := SimilarityProfile.q F.data.h p |
| 100 | let η := SimilarityProfile.eta F.data.h p |
| 101 | let A := TerminalPressure.amplitudeExponent F.data.h |
| 102 | have hq : 0 < q := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht |
| 103 | have hpow : (q^(-A))^2 = q^(-2*A) := by |
| 104 | rw [pow_two,← Real.rpow_add hq] |
| 105 | congr 1 |
| 106 | ring |
| 107 | have heq : ∀ u ∈ Ioi p.2.1, |
| 108 | TerminalStress.swirlCoefficient (normalization F XR) F.data.h |
| 109 | (TerminalPressure.outgoingTaper F.data (shift F XR)) (p.1,(u,p.2.2)) ^ 2 = |
| 110 | (q^(-2*A)/(2*q)) * HeatedOutgoing.canonicalKernel F XR c η (u/q) := by |
| 111 | intro u hu |
| 112 | have hup : 0 < u := hs.trans hu |
| 113 | have ha := physicalAngular_eq_terminal F hXR c (p := (p.1,(u,p.2.2))) ht hup |
| 114 | (full_switch_radial hXR ht hs hfull (u := u) hu.le) |
| 115 | change q^(-A) * HeatedOutgoing.E F XR c (u/q,η) = _ at ha |
| 116 | change ((TerminalStress.physicalHeat (normalization F XR) (1+F.data.h) (p.1,(u,p.2.2)) * |
| 117 | TerminalPressure.outgoingTaper F.data (shift F XR) |
| 118 | (Real.log (SimilarityProfile.X F.data.h (p.1,(u,p.2.2))))) / Real.sqrt (2*u))^2 = _ |
| 119 | rw [← ha,div_pow,mul_pow,Real.sq_sqrt (by positivity : 0 ≤ 2*u),hpow] |
| 120 | unfold HeatedOutgoing.canonicalKernel |
| 121 | field_simp [hq.ne',hup.ne'] |
| 122 | have hi := setIntegral_congr_fun (μ := volume) measurableSet_Ioi heq |
| 123 | change q^(-2*A) * (-(1/2 : ℝ) * ∫ u in Ioi (p.2.1/q), |
| 124 | HeatedOutgoing.canonicalKernel F XR c η u) = |
| 125 | -(∫ u in Ioi p.2.1, TerminalStress.swirlCoefficient (normalization F XR) F.data.h |
| 126 | (TerminalPressure.outgoingTaper F.data (shift F XR)) (p.1,(u,p.2.2))^2) |
| 127 | rw [hi,integral_const_mul,OutgoingDilation.integral_dilate_Ioi |
| 128 | (HeatedOutgoing.canonicalKernel F XR c η) q p.2.1 hq] |
| 129 | field_simp [hq.ne'] |
| 130 | |
| 131 | /-! ## The actual forward stress on the switched tail -/ |
| 132 | |
| 133 | noncomputable def forwardTheta (F : Profile) (XR : ℝ) (c : ℝ → Coeff) |
| 134 | (p : ℝ × ℝ) : ℝ := |
| 135 | HeatSwitchCone.logE F XR c p / Real.sqrt (2 * XR * Real.exp p.1) * |
| 136 | (XR * Real.exp p.1 * HeatSwitchCone.Qs F XR c p / |
| 137 | CoordinateAlgebra.L F.data.h p.2 - HeatSwitchCone.radialA F XR c p) |
| 138 | |
| 139 | noncomputable def forwardAxial (F : Profile) (XR : ℝ) (c : ℝ → Coeff) |
| 140 | (p : ℝ × ℝ) : ℝ := |
| 141 | XR * Real.exp p.1 * HeatSwitchCone.Ns F XR c p / |
| 142 | (CoordinateAlgebra.L F.data.h p.2 * Real.sqrt (2 * XR * Real.exp p.1)) |
| 143 | |
| 144 | theorem terminalStart_after_endpoint (F : Profile) : |
| 145 | F.data.core.endpoint < TerminalCone.terminalStart F.data := by |
| 146 | have hr := OutgoingTail.releaseStart_gt_flattenEnd F.data |
| 147 | have ht := OutgoingTail.tailStart_gt_release F.data |
| 148 | dsimp only [TerminalCone.terminalStart] |
| 149 | have hf := OutgoingTail.flattenEnd_gt_core F.data |
| 150 | linarith |
| 151 | |
| 152 | theorem Qs_after_endpoint (F : Profile) (XR : ℝ) (c : ℝ → Coeff) |
| 153 | {p : ℝ × ℝ} (hp : F.data.core.endpoint ≤ p.1) : |
| 154 | HeatSwitchCone.Qs F XR c p = -1 + |
| 155 | ((1-F.data.h)*HeatSwitchCone.logI F XR c p - |
| 156 | StressAlgebra.axialExponent F.data.h * p.2 * |
| 157 | derivWithin (fun η => HeatSwitchCone.logI F XR c (p.1,η)) |
| 158 | HeatedOutgoing.parameterDomain p.2) / |
| 159 | (Real.exp (3*p.1/2)*HeatSwitchCone.logE F XR c p) := by |
| 160 | simp only [HeatSwitchCone.Qs, |
| 161 | OutgoingHistories.W_after_endpoint F.data F.amp_contDiff p.2 hp, |
| 162 | OutgoingHistories.J_after_endpoint F.reset F.amp p.2 hp, |
| 163 | OutgoingHistories.dEta_J_after_endpoint F.reset F.amp_contDiff p.2 hp, |
| 164 | mul_zero, sub_zero, add_zero] |
| 165 | |
| 166 | theorem Ns_after_endpoint (F : Profile) (XR : ℝ) (c : ℝ → Coeff) |
| 167 | {p : ℝ × ℝ} (hp : F.data.core.endpoint ≤ p.1) : |
| 168 | HeatSwitchCone.Ns F XR c p = |
| 169 | (4*F.data.h*p.2*HeatSwitchCone.logS F XR c p - |
| 170 | StressAlgebra.coordinateFactor p.2 * |
| 171 | derivWithin (fun η => HeatSwitchCone.logS F XR c (p.1,η)) |
| 172 | HeatedOutgoing.parameterDomain p.2) / Real.exp p.1 + |
| 173 | 4*StressAlgebra.velocityExponent F.data.h*p.2*HeatSwitchCone.logPi F XR c p - |
| 174 | StressAlgebra.coordinateFactor p.2 * |
| 175 | derivWithin (fun η => HeatSwitchCone.logPi F XR c (p.1,η)) |
| 176 | HeatedOutgoing.parameterDomain p.2 := by |
| 177 | simp only [HeatSwitchCone.Ns, OutgoingHistories.M_after_endpoint F.data F.amp p.2 hp, |
| 178 | OutgoingHistories.dEta_M_after_endpoint F.data F.amp_contDiff p.2 hp, |
| 179 | show F.logU p = 0 from F.logU_after p.2 hp, |
| 180 | mul_zero, sub_zero, zero_div, add_zero, zero_add] |
| 181 | |
| 182 | theorem radialB_after_endpoint (F : Profile) (XR : ℝ) (c : ℝ → Coeff) |
| 183 | {p : ℝ × ℝ} (hp : F.data.core.endpoint < p.1) : |
| 184 | HeatSwitchCone.radialB F XR c p = 0 := by |
| 185 | have he : (fun y => F.logU (y,p.2)) =ᶠ[𝓝 p.1] fun _ => 0 := by |
| 186 | filter_upwards [Ioi_mem_nhds hp] with y hy |
| 187 | exact F.logU_after p.2 hy.le |
| 188 | rw [HeatSwitchCone.radialB, OutgoingHistories.dY_eq_deriv F.logU_contDiff, |
| 189 | he.deriv_eq, deriv_const, mul_zero, zero_div] |
| 190 | |
| 191 | theorem radialA_eq_profileSpeed (F : Profile) {XR C : ℝ} |
| 192 | (w : CompensationWitness F XR C) {y η : ℝ} |
| 193 | (hy : TerminalCone.terminalStart F.data < y) |
| 194 | (hη : η ∈ HeatedOutgoing.parameterDomain) : |
| 195 | HeatSwitchCone.radialA F XR w.coefficients (y,η) = |
| 196 | TerminalEdgeFactor.profileSpeed (normalization F XR) F.data (shift F XR) |
| 197 | (TerminalCone.profilePoint F y η) := by |
| 198 | let g : ℝ → ℝ := fun v => TerminalEdgeFactor.profileAngularVelocity |
| 199 | (normalization F XR) F.data (shift F XR) (η,OutgoingTail.tailEnd F.data-v) |
| 200 | have he : (fun v => HeatSwitchCone.logE F XR w.coefficients (v,η)) =ᶠ[𝓝 y] g := by |
| 201 | filter_upwards [Ioi_mem_nhds hy] with v hv |
| 202 | exact TerminalCone.E_eq_profileAngularVelocity F w.coefficients w.radius_pos hv.le hη |
| 203 | have hd := ((TerminalEdgeFactor.profileAngularVelocity_hasDerivAt_edge |
| 204 | (normalization F XR) F.data (shift F XR) η (OutgoingTail.tailEnd F.data-y)).comp y |
| 205 | ((hasDerivAt_id y).const_sub (OutgoingTail.tailEnd F.data))) |
| 206 | have hC : 0 < normalization F XR := TerminalPressure.releasedNormalization_pos F.data |
| 207 | (OutgoingDilation.switchRadius_pos F XR w.radius_pos) |
| 208 | have hev : HeatSwitchCone.logE F XR w.coefficients (y,η) = g y := he.self_of_nhds |
| 209 | change HeatSwitchCone.radialA F XR w.coefficients (y,η) = |
| 210 | TerminalEdgeFactor.profileSpeed (normalization F XR) F.data (shift F XR) |
| 211 | (η,OutgoingTail.tailEnd F.data-y) |
| 212 | rw [HeatSwitchCone.radialA, he.deriv_eq, hev, |
| 213 | TerminalEdgeFactor.profileSpeed_eq_log_deriv hC F.data (shift F XR) η |
| 214 | (OutgoingTail.tailEnd F.data-y) hη, |
| 215 | (TerminalEdgeFactor.profileAngularVelocity_hasDerivAt_edge |
| 216 | (normalization F XR) F.data (shift F XR) η (OutgoingTail.tailEnd F.data-y)).deriv] |
| 217 | change 1-2*deriv g y/g y = _ |
| 218 | have hdg : deriv g y = _ := hd.deriv |
| 219 | rw [hdg] |
| 220 | dsimp only [g, Function.comp_def, TerminalCone.profilePoint, TerminalCone.edgeDistance] |
| 221 | ring |
| 222 | |
| 223 | theorem forward_normalization (F : Profile) {XR C : ℝ} |
| 224 | (w : CompensationWitness F XR C) {p : ℝ × ℝ} |
| 225 | (hp : F.data.core.endpoint < p.1) |
| 226 | (hη : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 227 | (hQ : HeatSwitchCone.Qs F XR w.coefficients p ≠ 0) : |
| 228 | HeatSwitchCone.normalP F XR w.coefficients p = |
| 229 | HeatSwitchCone.radialA F XR w.coefficients p + |
| 230 | forwardTheta F XR w.coefficients p / |
| 231 | (HeatSwitchCone.logE F XR w.coefficients p / Real.sqrt (2*XR*Real.exp p.1)) ∧ |
| 232 | HeatSwitchCone.normalJ F XR w.coefficients p = |
| 233 | forwardAxial F XR w.coefficients p / |
| 234 | (HeatSwitchCone.logE F XR w.coefficients p / Real.sqrt (2*XR*Real.exp p.1)) := by |
| 235 | have hE : HeatSwitchCone.logE F XR w.coefficients p ≠ 0 := |
| 236 | (w.positive p.2 (XR*Real.exp p.1) hη (mul_pos w.radius_pos (Real.exp_pos _))).ne' |
| 237 | have hR : Real.sqrt (2*XR*Real.exp p.1) ≠ 0 := |
| 238 | (Real.sqrt_pos.mpr (mul_pos (mul_pos (by norm_num) w.radius_pos) (Real.exp_pos _))).ne' |
| 239 | have hL : CoordinateAlgebra.L F.data.h p.2 ≠ 0 := |
| 240 | (CoordinateAlgebra.L_pos F.data.h_pos.le F.data.h_lt_half |
| 241 | (TerminalEdgeFactor.eta_sq_le_one hη)).ne' |
| 242 | simp only [HeatSwitchCone.normalP,HeatSwitchCone.normalJ,HeatSwitchCone.sourceC, |
| 243 | HeatSwitchCone.sourceJ, radialB_after_endpoint F XR w.coefficients hp, |
| 244 | zero_mul,zero_div,sub_zero,mul_one,add_zero] |
| 245 | unfold forwardTheta forwardAxial HeatSwitchCone.stressScale HeatSwitchCone.ratio |
| 246 | generalize Real.sqrt (2*XR*Real.exp p.1) = r at * |
| 247 | constructor <;> field_simp [hE,hR,hL,hQ] ; ring |
| 248 | |
| 249 | /-! ## Exact change from logarithmic to physical histories -/ |
| 250 | |
| 251 | theorem integral_log_radius (f : ℝ → ℝ) {XR : ℝ} (hXR : 0 < XR) (y : ℝ) : |
| 252 | (∫ u in Ioc 0 (XR*Real.exp y), f u) = |
| 253 | XR * ∫ t in Iic y, Real.exp t * f (XR*Real.exp t) := by |
| 254 | calc |
| 255 | _ = ∫ u in Ioc 0 (XR*Real.exp y), (fun v => f (XR*v)) (u/XR) := by |
| 256 | apply setIntegral_congr_fun measurableSet_Ioc |
| 257 | intro u hu |
| 258 | dsimp only |
| 259 | rw [mul_div_cancel₀ u hXR.ne'] |
| 260 | _ = XR * ∫ v in Ioc 0 (Real.exp y), f (XR*v) := by |
| 261 | simpa only [mul_div_cancel_left₀ _ hXR.ne'] using |
| 262 | OutgoingDilation.integral_dilate_Ioc (fun v => f (XR*v)) XR (XR*Real.exp y) hXR |
| 263 | _ = _ := by |
| 264 | rw [← ReleaseMoments.image_exp_Iic, |
| 265 | integral_image_eq_integral_abs_deriv_smul measurableSet_Iic |
| 266 | (fun t _ => (Real.hasDerivAt_exp t).hasDerivWithinAt) Real.exp_injective.injOn] |
| 267 | simp only [abs_of_pos (Real.exp_pos _), smul_eq_mul] |
| 268 | |
| 269 | theorem sqrt_radius_exp {XR : ℝ} (hXR : 0 < XR) (y : ℝ) : |
| 270 | Real.sqrt (2*(XR*Real.exp y)) = Real.sqrt (2*XR)*Real.exp (y/2) := by |
| 271 | rw [← mul_assoc,Real.sqrt_mul (by positivity : 0 ≤ 2*XR)] |
| 272 | congr 1 |
| 273 | exact (Real.exp_half y).symm |
| 274 | |
| 275 | theorem angularHistory_eq_logI (F : Profile) {XR : ℝ} (hXR : 0 < XR) |
| 276 | (c : ℝ → Coeff) {η : ℝ} (hη : η ∈ HeatedOutgoing.parameterDomain) (y : ℝ) : |
| 277 | angularHistory F XR c η (XR*Real.exp y) = |
| 278 | (XR*Real.sqrt (2*XR))*HeatSwitchCone.logI F XR c (y,η) := by |
| 279 | unfold angularHistory |
| 280 | rw [integral_log_radius _ hXR, (HeatSwitchCone.logI_eq_past_integral F hXR c hη y).2] |
| 281 | have he : (∫ t in Iic y, Real.exp t * HeatedOutgoing.H F XR c (XR*Real.exp t,η)) = |
| 282 | Real.sqrt (2*XR) * ∫ t in Iic y, |
| 283 | Real.exp (3*t/2)*HeatSwitchCone.logE F XR c (t,η) := by |
| 284 | rw [← integral_const_mul] |
| 285 | apply setIntegral_congr_fun measurableSet_Iic |
| 286 | intro t ht |
| 287 | dsimp only |
| 288 | rw [HeatedOutgoing.H,sqrt_radius_exp hXR] |
| 289 | unfold HeatSwitchCone.logE |
| 290 | rw [show 3*t/2=t+t/2 by ring,Real.exp_add] |
| 291 | ring |
| 292 | rw [he] |
| 293 | ring |
| 294 | |
| 295 | theorem energyHistory_eq_logS (F : Profile) {XR : ℝ} (hXR : 0 < XR) |
| 296 | (c : ℝ → Coeff) {η : ℝ} (hη : η ∈ HeatedOutgoing.parameterDomain) (y : ℝ) : |
| 297 | energyHistory F XR c η (XR*Real.exp y) = XR*HeatSwitchCone.logS F XR c (y,η) := by |
| 298 | unfold energyHistory |
| 299 | rw [integral_log_radius _ hXR, (HeatSwitchCone.logS_eq_past_integral F hXR c hη y).2] |
| 300 | congr 1 |
| 301 | apply setIntegral_congr_fun measurableSet_Iic |
| 302 | intro t ht |
| 303 | simp only [HeatedOutgoing.energyDensity,HeatSwitchCone.logE,HeatedOutgoing.U, |
| 304 | OutgoingDilation.U,OutgoingProfile.Profile.U,mul_div_cancel_left₀ _ hXR.ne',Real.log_exp] |
| 305 | |
| 306 | open HeatSwitchCone (logE logI logS logPi) |
| 307 | open ProfileHistories (radialPartial parameterPartial) |
| 308 | |
| 309 | noncomputable def etaDerivative (G : (ℝ × ℝ) → ℝ) (p : ℝ × ℝ) : ℝ := |
| 310 | derivWithin (fun η => G (p.1,η)) HeatedOutgoing.parameterDomain p.2 |
| 311 | |
| 312 | noncomputable def thetaStock (F : Profile) (XR : ℝ) (c : ℝ → Coeff) (p : ℝ × ℝ) : ℝ := |
| 313 | (1-F.data.h)*logI F XR c p - StressAlgebra.axialExponent F.data.h*p.2* |
| 314 | etaDerivative (logI F XR c) p - Real.exp (3*p.1/2)*logE F XR c p |
| 315 | |
| 316 | noncomputable def thetaWeight (F : Profile) (XR : ℝ) (c : ℝ → Coeff) (p : ℝ × ℝ) : ℝ := |
| 317 | (XR*Real.sqrt (2*XR))*thetaStock F XR c p / CoordinateAlgebra.L F.data.h p.2 + |
| 318 | Real.sqrt (2*XR)*Real.exp (p.1/2)* |
| 319 | (2*radialPartial (logE F XR c) p-logE F XR c p) |
| 320 | |
| 321 | noncomputable def axialWeight (F : Profile) (XR : ℝ) (c : ℝ → Coeff) (p : ℝ × ℝ) : ℝ := |
| 322 | (XR*(4*F.data.h*p.2*logS F XR c p - StressAlgebra.coordinateFactor p.2* |
| 323 | etaDerivative (logS F XR c) p) + XR*Real.exp p.1* |
| 324 | (4*StressAlgebra.velocityExponent F.data.h*p.2*logPi F XR c p - |
| 325 | StressAlgebra.coordinateFactor p.2*etaDerivative (logPi F XR c) p)) / |
| 326 | CoordinateAlgebra.L F.data.h p.2 |
| 327 | |
| 328 | noncomputable def angularResidual (F : Profile) (XR : ℝ) (c : ℝ → Coeff) (p : ℝ × ℝ) : ℝ := |
| 329 | (StressAlgebra.velocityExponent F.data.h*logE F XR c p + |
| 330 | StressAlgebra.axialExponent F.data.h*p.2*etaDerivative (logE F XR c) p + |
| 331 | radialPartial (logE F XR c) p) / CoordinateAlgebra.L F.data.h p.2 - |
| 332 | (2*radialPartial (radialPartial (logE F XR c)) p-logE F XR c p/2) / (XR*Real.exp p.1) |
| 333 | |
| 334 | noncomputable def axialResidual (F : Profile) (XR : ℝ) (c : ℝ → Coeff) (p : ℝ × ℝ) : ℝ := |
| 335 | (-4*StressAlgebra.velocityExponent F.data.h*p.2*logPi F XR c p + |
| 336 | StressAlgebra.coordinateFactor p.2*etaDerivative (logPi F XR c) p - |
| 337 | p.2*logE F XR c p^2) / CoordinateAlgebra.L F.data.h p.2 |
| 338 | |
| 339 | theorem thetaStock_hasDerivAt (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 340 | {p : ℝ × ℝ} (hp : p.2 ∈ Ioo (-1) 1) : |
| 341 | HasDerivAt (fun y => thetaStock F XR w.coefficients (y,p.2)) |
| 342 | (-Real.exp (3*p.1/2)*(StressAlgebra.velocityExponent F.data.h*logE F XR w.coefficients p + |
| 343 | StressAlgebra.axialExponent F.data.h*p.2*etaDerivative (logE F XR w.coefficients) p + |
| 344 | radialPartial (logE F XR w.coefficients) p)) p.1 := by |
| 345 | have hi := HeatSwitchHistoryDerivatives.logI_hasDerivAt F w p ⟨hp.1.le,hp.2.le⟩ |
| 346 | have him := HeatSwitchHistoryDerivatives.logI_eta_hasDerivAt F w p hp |
| 347 | have he := ProfileHistories.radialPartial_hasDerivAt |
| 348 | HeatSwitchHistoryDerivatives.interiorDomain (HeatSwitchHistoryDerivatives.logE_contDiffOn F w) |
| 349 | (show p ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from ⟨mem_univ _,hp⟩) |
| 350 | have hex := (((hasDerivAt_id p.1).const_mul (3 : ℝ)).div_const 2).exp |
| 351 | have hd := ((hi.const_mul (1-F.data.h)).sub |
| 352 | (him.const_mul (StressAlgebra.axialExponent F.data.h*p.2))).sub (hex.mul he) |
| 353 | convert! hd using 1 |
| 354 | dsimp only [thetaStock,etaDerivative,StressAlgebra.velocityExponent,id_eq] |
| 355 | ring |
| 356 | |
| 357 | theorem thetaWeight_hasDerivAt (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 358 | {p : ℝ × ℝ} (hp : p.2 ∈ Ioo (-1) 1) : |
| 359 | HasDerivAt (fun y => thetaWeight F XR w.coefficients (y,p.2)) |
| 360 | (-(XR*Real.exp p.1)*Real.sqrt (2*(XR*Real.exp p.1))*angularResidual F XR w.coefficients p) p.1 := by |
| 361 | have hm : p ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier := ⟨mem_univ _,hp⟩ |
| 362 | have hs := HeatSwitchHistoryDerivatives.logE_contDiffOn F w |
| 363 | have he := ProfileHistories.radialPartial_hasDerivAt HeatSwitchHistoryDerivatives.interiorDomain hs hm |
| 364 | have he' := ProfileHistories.radialPartial_hasDerivAt HeatSwitchHistoryDerivatives.interiorDomain |
| 365 | (ProfileHistories.radialPartial_smooth HeatSwitchHistoryDerivatives.interiorDomain hs) hm |
| 366 | have hx := ((hasDerivAt_id p.1).div_const 2).exp |
| 367 | have hd := (((thetaStock_hasDerivAt F w hp).const_mul (XR*Real.sqrt (2*XR))).div_const |
| 368 | (CoordinateAlgebra.L F.data.h p.2)).fun_add |
| 369 | ((hx.const_mul (Real.sqrt (2*XR))).fun_mul ((he'.const_mul 2).fun_sub he)) |
| 370 | convert! hd using 1 |
| 371 | dsimp only [thetaWeight,angularResidual,id_eq] |
| 372 | rw [sqrt_radius_exp w.radius_pos, |
| 373 | show 3*p.1/2=p.1+p.1/2 by ring,Real.exp_add] |
| 374 | have hX : XR*Real.exp p.1 ≠ 0 := mul_ne_zero w.radius_pos.ne' (Real.exp_ne_zero _) |
| 375 | have hL : CoordinateAlgebra.L F.data.h p.2 ≠ 0 := |
| 376 | (CoordinateAlgebra.L_pos F.data.h_pos.le F.data.h_lt_half |
| 377 | (TerminalEdgeFactor.eta_sq_le_one ⟨hp.1.le,hp.2.le⟩)).ne' |
| 378 | field_simp [hX,hL,w.radius_pos.ne',Real.exp_ne_zero] ; ring |
| 379 | |
| 380 | theorem axialWeight_hasDerivAt (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 381 | {p : ℝ × ℝ} (hp : p.2 ∈ Ioo (-1) 1) (hy : F.data.core.endpoint ≤ p.1) : |
| 382 | HasDerivAt (fun y => axialWeight F XR w.coefficients (y,p.2)) |
| 383 | (-(XR*Real.exp p.1)*axialResidual F XR w.coefficients p) p.1 := by |
| 384 | have hs := HeatSwitchHistoryDerivatives.logS_hasDerivAt F w p ⟨hp.1.le,hp.2.le⟩ |
| 385 | have hsm := HeatSwitchHistoryDerivatives.logS_eta_hasDerivAt F w p hp |
| 386 | have hP := HeatSwitchHistoryDerivatives.logPi_hasDerivAt F w p ⟨hp.1.le,hp.2.le⟩ |
| 387 | have hPm := HeatSwitchHistoryDerivatives.logPi_eta_hasDerivAt F w p hp |
| 388 | have hd := ((((hs.const_mul (4*F.data.h*p.2)).fun_sub |
| 389 | (hsm.const_mul (StressAlgebra.coordinateFactor p.2))).const_mul XR).fun_add |
| 390 | (((Real.hasDerivAt_exp p.1).const_mul XR).fun_mul |
| 391 | ((hP.const_mul (4*StressAlgebra.velocityExponent F.data.h*p.2)).fun_sub |
| 392 | (hPm.const_mul (StressAlgebra.coordinateFactor p.2))))).div_const |
| 393 | (CoordinateAlgebra.L F.data.h p.2) |
| 394 | convert! hd using 1 |
| 395 | dsimp only [axialWeight,axialResidual,etaDerivative] |
| 396 | rw [F.logU_after p.2 hy] |
| 397 | unfold StressAlgebra.velocityExponent |
| 398 | ring |
| 399 | |
| 400 | theorem thetaWeight_eq_forward (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 401 | {p : ℝ × ℝ} (hp : p.2 ∈ Ioo (-1) 1) (hy : F.data.core.endpoint ≤ p.1) : |
| 402 | thetaWeight F XR w.coefficients p = |
| 403 | 2*(XR*Real.exp p.1)*forwardTheta F XR w.coefficients p := by |
| 404 | have he := ProfileHistories.radialPartial_hasDerivAt |
| 405 | HeatSwitchHistoryDerivatives.interiorDomain (HeatSwitchHistoryDerivatives.logE_contDiffOn F w) |
| 406 | (show p ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from ⟨mem_univ _,hp⟩) |
| 407 | have hE : logE F XR w.coefficients p ≠ 0 := |
| 408 | (w.positive p.2 (XR*Real.exp p.1) ⟨hp.1.le,hp.2.le⟩ (mul_pos w.radius_pos (Real.exp_pos _))).ne' |
| 409 | have hL : CoordinateAlgebra.L F.data.h p.2 ≠ 0 := |
| 410 | (CoordinateAlgebra.L_pos F.data.h_pos.le F.data.h_lt_half |
| 411 | (TerminalEdgeFactor.eta_sq_le_one ⟨hp.1.le,hp.2.le⟩)).ne' |
| 412 | have hR : Real.sqrt (2*XR) ≠ 0 := (Real.sqrt_pos.mpr (mul_pos (by norm_num) w.radius_pos)).ne' |
| 413 | have hR2 := Real.sq_sqrt (mul_nonneg (by norm_num : (0:ℝ)≤2) w.radius_pos.le) |
| 414 | unfold thetaWeight forwardTheta HeatSwitchCone.radialA thetaStock etaDerivative |
| 415 | rw [Qs_after_endpoint F XR w.coefficients hy,he.deriv, |
| 416 | show 2*XR*Real.exp p.1=2*(XR*Real.exp p.1) by ring,sqrt_radius_exp w.radius_pos, |
| 417 | show 3*p.1/2=p.1+p.1/2 by ring,Real.exp_add] |
| 418 | generalize Real.sqrt (2*XR) = r at * |
| 419 | field_simp [hE,hL,hR,Real.exp_ne_zero] |
| 420 | have hx : XR=r^2/2 := by linarith [hR2] |
| 421 | have hex : Real.exp p.1 = Real.exp (p.1/2)^2 := by |
| 422 | rw [pow_two,← Real.exp_add,add_halves] |
| 423 | generalize logE F XR w.coefficients p = e |
| 424 | generalize radialPartial (logE F XR w.coefficients) p = ey |
| 425 | generalize logI F XR w.coefficients p = i |
| 426 | generalize derivWithin (fun η => logI F XR w.coefficients (p.1,η)) |
| 427 | HeatedOutgoing.parameterDomain p.2 = im |
| 428 | rw [hx,hex] |
| 429 | ring |
| 430 | |
| 431 | theorem axialWeight_eq_forward (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 432 | {p : ℝ × ℝ} (hy : F.data.core.endpoint ≤ p.1) : |
| 433 | axialWeight F XR w.coefficients p = |
| 434 | Real.sqrt (2*XR*Real.exp p.1)*forwardAxial F XR w.coefficients p := by |
| 435 | have hR : Real.sqrt (2*XR*Real.exp p.1) ≠ 0 := |
| 436 | (Real.sqrt_pos.mpr (mul_pos (mul_pos (by norm_num) w.radius_pos) (Real.exp_pos _))).ne' |
| 437 | unfold axialWeight forwardAxial etaDerivative |
| 438 | rw [Ns_after_endpoint F XR w.coefficients hy] |
| 439 | generalize Real.sqrt (2*XR*Real.exp p.1) = r at * |
| 440 | by_cases hL : CoordinateAlgebra.L F.data.h p.2 = 0 |
| 441 | · simp [hL] |
| 442 | field_simp [hR,hL,Real.exp_ne_zero] ; ring |
| 443 | |
| 444 | /-! ## Genuine physical derivatives of logarithmic profiles -/ |
| 445 | |
| 446 | noncomputable def logPoint (XR : ℝ) (p : ℝ × ℝ) : ℝ × ℝ := (Real.log (p.1/XR),p.2) |
| 447 | noncomputable def radialLift (XR : ℝ) (G : (ℝ × ℝ) → ℝ) (p : ℝ × ℝ) : ℝ := G (logPoint XR p) |
| 448 | |
| 449 | theorem logPoint_contDiffAt {XR : ℝ} (hXR : 0 < XR) {p : ℝ × ℝ} (hp : 0 < p.1) : |
| 450 | ContDiffAt ℝ ∞ (logPoint XR) p := |
| 451 | ((contDiffAt_fst.div_const XR).log (div_pos hp hXR).ne').prodMk contDiffAt_snd |
| 452 | |
| 453 | theorem radialLift_contDiffAt {XR : ℝ} (hXR : 0 < XR) {G : (ℝ × ℝ) → ℝ} |
| 454 | (hG : ContDiffOn ℝ ∞ G HeatSwitchHistoryDerivatives.interiorDomain.carrier) |
| 455 | {p : ℝ × ℝ} (hp : 0 < p.1) (hη : p.2 ∈ Ioo (-1) 1) : |
| 456 | ContDiffAt ℝ ∞ (radialLift XR G) p := |
| 457 | (hG.contDiffAt (HeatSwitchHistoryDerivatives.interiorDomain.isOpen.mem_nhds |
| 458 | (show logPoint XR p ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from |
| 459 | ⟨mem_univ _,hη⟩))).comp p (logPoint_contDiffAt hXR hp) |
| 460 | |
| 461 | theorem log_radius_hasDerivAt {XR X : ℝ} (hXR : 0 < XR) (hX : 0 < X) : |
| 462 | HasDerivAt (fun x => Real.log (x/XR)) (1/X) X := by |
| 463 | convert! ((hasDerivAt_id X).div_const XR).log (div_pos hX hXR).ne' using 1 |
| 464 | simp only [id_eq] |
| 465 | field_simp [hXR.ne',hX.ne'] |
| 466 | |
| 467 | theorem radialLift_partialX {XR : ℝ} (hXR : 0 < XR) {G : (ℝ × ℝ) → ℝ} |
| 468 | (hG : ContDiffOn ℝ ∞ G HeatSwitchHistoryDerivatives.interiorDomain.carrier) |
| 469 | {p : ℝ × ℝ} (hp : 0 < p.1) (hη : p.2 ∈ Ioo (-1) 1) : |
| 470 | SimilarityProfile.partialX (radialLift XR G) p = radialPartial G (logPoint XR p)/p.1 := by |
| 471 | have hg := (hG.contDiffAt (HeatSwitchHistoryDerivatives.interiorDomain.isOpen.mem_nhds |
| 472 | (show logPoint XR p ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from |
| 473 | ⟨mem_univ _,hη⟩))).differentiableAt (by simp) |
| 474 | have hd := hg.hasFDerivAt.comp_hasDerivAt p.1 |
| 475 | ((log_radius_hasDerivAt hXR hp).prodMk (hasDerivAt_const p.1 p.2)) |
| 476 | have hh := LeadingStress.partialX_hasDerivAt ((radialLift_contDiffAt hXR hG hp hη).differentiableAt (by simp)) |
| 477 | have he := hh.unique hd |
| 478 | rw [SimilarityProfile.fderiv_inner_apply] at he |
| 479 | simp only [mul_zero,add_zero,mul_one_div] at he |
| 480 | exact he |
| 481 | |
| 482 | theorem radialLift_partialEta {XR : ℝ} (hXR : 0 < XR) {G : (ℝ × ℝ) → ℝ} |
| 483 | (hG : ContDiffOn ℝ ∞ G HeatSwitchHistoryDerivatives.interiorDomain.carrier) |
| 484 | {p : ℝ × ℝ} (hp : 0 < p.1) (hη : p.2 ∈ Ioo (-1) 1) : |
| 485 | SimilarityProfile.partialEta (radialLift XR G) p = parameterPartial G (logPoint XR p) := by |
| 486 | have hg := (hG.contDiffAt (HeatSwitchHistoryDerivatives.interiorDomain.isOpen.mem_nhds |
| 487 | (show logPoint XR p ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from |
| 488 | ⟨mem_univ _,hη⟩))).differentiableAt (by simp) |
| 489 | have hd := hg.hasFDerivAt.comp_hasDerivAt p.2 |
| 490 | ((hasDerivAt_const p.2 (Real.log (p.1/XR))).prodMk (hasDerivAt_id p.2)) |
| 491 | have hh := ((radialLift_contDiffAt hXR hG hp hη).differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt p.2 |
| 492 | ((hasDerivAt_const p.2 p.1).prodMk (hasDerivAt_id p.2)) |
| 493 | have he := hh.unique hd |
| 494 | simpa only [SimilarityProfile.partialEta,parameterPartial] using he |
| 495 | |
| 496 | theorem radialLift_partialXX {XR : ℝ} (hXR : 0 < XR) {G : (ℝ × ℝ) → ℝ} |
| 497 | (hG : ContDiffOn ℝ ∞ G HeatSwitchHistoryDerivatives.interiorDomain.carrier) |
| 498 | {p : ℝ × ℝ} (hp : 0 < p.1) (hη : p.2 ∈ Ioo (-1) 1) : |
| 499 | SimilarityProfile.partialX (SimilarityProfile.partialX (radialLift XR G)) p = |
| 500 | (radialPartial (radialPartial G) (logPoint XR p)-radialPartial G (logPoint XR p))/p.1^2 := by |
| 501 | have hG' := ProfileHistories.radialPartial_smooth HeatSwitchHistoryDerivatives.interiorDomain hG |
| 502 | have hl := radialLift_contDiffAt hXR hG hp hη |
| 503 | have he : (fun x => SimilarityProfile.partialX (radialLift XR G) (x,p.2)) =ᶠ[𝓝 p.1] |
| 504 | fun x => radialLift XR (radialPartial G) (x,p.2)/x := by |
| 505 | filter_upwards [Ioi_mem_nhds hp] with x hx |
| 506 | exact radialLift_partialX hXR hG hx hη |
| 507 | have hd := ((LeadingStress.partialX_hasDerivAt |
| 508 | ((radialLift_contDiffAt hXR hG' hp hη).differentiableAt (by simp))).div |
| 509 | (hasDerivAt_id p.1) hp.ne').congr_of_eventuallyEq he |
| 510 | have hder := LeadingStress.partialX_hasDerivAt |
| 511 | ((SimilarityProfile.partialX_smoothAt hl (m := ∞) (by simp)).differentiableAt (by simp)) |
| 512 | rw [radialLift_partialX hXR hG' hp hη] at hd |
| 513 | have hh := hder.unique hd |
| 514 | exact hh.trans (by dsimp [radialLift]; field_simp [hp.ne']) |
| 515 | |
| 516 | theorem logE_radialLift (F : Profile) {XR : ℝ} (hXR : 0 < XR) (c : ℝ → Coeff) |
| 517 | {p : ℝ × ℝ} (hp : 0 < p.1) : radialLift XR (logE F XR c) p = HeatedOutgoing.E F XR c p := by |
| 518 | unfold radialLift logPoint logE |
| 519 | dsimp only |
| 520 | rw [Real.exp_log (div_pos hp hXR),mul_div_cancel₀ _ hXR.ne',Prod.mk.eta] |
| 521 | |
| 522 | theorem logPi_radialLift (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 523 | {p : ℝ × ℝ} (hp : 0 < p.1) (hη : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 524 | radialLift XR (logPi F XR w.coefficients) p = HeatedOutgoing.Pi F XR w.coefficients p := by |
| 525 | unfold radialLift |
| 526 | rw [HeatSwitchCone.logPi_eq_canonical F w (logPoint XR p) hη] |
| 527 | dsimp only [logPoint] |
| 528 | rw [Real.exp_log (div_pos hp w.radius_pos),mul_div_cancel₀ _ w.radius_pos.ne',Prod.mk.eta] |
| 529 | |
| 530 | noncomputable def physicalLog (h b XR : ℝ) (G : (ℝ × ℝ) → ℝ) : SimilarityProfile.PhysicalProfile := |
| 531 | SimilarityProfile.pullback h b (radialLift XR G) |
| 532 | |
| 533 | noncomputable def amplitudeOperator (V : SimilarityProfile.PhysicalProfile) |
| 534 | (p : SimilarityProfile.PhysicalPoint) : ℝ := |
| 535 | SimilarityProfile.partialT V p - 2*p.2.1*SimilarityProfile.partialS (SimilarityProfile.partialS V) p - |
| 536 | 2*SimilarityProfile.partialS V p + V p/(2*p.2.1) |
| 537 | |
| 538 | theorem physicalLog_amplitudeOperator {h b XR : ℝ} (hh : 0 < h) (hh' : h < 1/2) (hXR : 0 < XR) |
| 539 | {G : (ℝ × ℝ) → ℝ} (hG : ContDiffOn ℝ ∞ G HeatSwitchHistoryDerivatives.interiorDomain.carrier) |
| 540 | {p : SimilarityProfile.PhysicalPoint} (ht : p.1 < 1) (hs : 0 < p.2.1) : |
| 541 | amplitudeOperator (physicalLog h b XR G) p = |
| 542 | SimilarityProfile.q h p^(b-1) * |
| 543 | (((-b)*G (logPoint XR (SimilarityProfile.inner h p)) + |
| 544 | CoordinateAlgebra.D h*SimilarityProfile.eta h p*parameterPartial G (logPoint XR (SimilarityProfile.inner h p)) + |
| 545 | radialPartial G (logPoint XR (SimilarityProfile.inner h p))) / |
| 546 | CoordinateAlgebra.L h (SimilarityProfile.eta h p) - |
| 547 | (2*radialPartial (radialPartial G) (logPoint XR (SimilarityProfile.inner h p)) - |
| 548 | G (logPoint XR (SimilarityProfile.inner h p))/2)/SimilarityProfile.X h p) := by |
| 549 | have hq := SimilarityProfile.q_pos hh hh' ht |
| 550 | have hx : 0 < (SimilarityProfile.inner h p).1 := div_pos hs hq |
| 551 | have heta : (SimilarityProfile.inner h p).2 ∈ Ioo (-1) 1 := by |
| 552 | change SimilarityProfile.eta h p ∈ Ioo (-1) 1 |
| 553 | have he := SimilarityProfile.eta_sq_lt_one hh hh' ht |
| 554 | constructor <;> nlinarith [sq_nonneg (SimilarityProfile.eta h p+1),sq_nonneg (SimilarityProfile.eta h p-1)] |
| 555 | have hd := radialLift_contDiffAt hXR hG hx heta |
| 556 | have hL := SimilarityProfile.L_pos hh hh' ht |
| 557 | unfold amplitudeOperator physicalLog |
| 558 | rw [SimilarityProfile.partialT_pullback hh hh' ht (hd.differentiableAt (by simp)), |
| 559 | SimilarityProfile.partialS_partialS_pullback hh hh' ht (hd.of_le two_le_infty), |
| 560 | SimilarityProfile.partialS_pullback hh hh' ht (hd.differentiableAt (by simp))] |
| 561 | simp only [SimilarityProfile.pullback,SimilarityProfile.T,CoordinateAlgebra.timeCoeff] |
| 562 | rw [radialLift_partialX hXR hG hx heta,radialLift_partialEta hXR hG hx heta, |
| 563 | radialLift_partialXX hXR hG hx heta] |
| 564 | simp only [radialLift,SimilarityProfile.inner] |
| 565 | rw [show b-2=(b-1)-1 by ring] |
| 566 | simp only [Real.rpow_sub_one hq.ne'] |
| 567 | rw [← SlowExpansionResidual.q_mul_X hh hh' ht] |
| 568 | dsimp only [SimilarityProfile.inner] at hx ⊢ |
| 569 | field_simp [hq.ne',hx.ne',hL.ne'] ; ring |
| 570 | |
| 571 | theorem physicalLog_angularResidual (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 572 | {p : SimilarityProfile.PhysicalPoint} (ht : p.1 < 1) (hs : 0 < p.2.1) : |
| 573 | amplitudeOperator (physicalLog F.data.h (-TerminalPressure.amplitudeExponent F.data.h) |
| 574 | XR (logE F XR w.coefficients)) p = |
| 575 | SimilarityProfile.q F.data.h p^(-TerminalPressure.amplitudeExponent F.data.h-1) * |
| 576 | angularResidual F XR w.coefficients (logPoint XR (SimilarityProfile.inner F.data.h p)) := by |
| 577 | rw [physicalLog_amplitudeOperator F.data.h_pos F.data.h_lt_half w.radius_pos |
| 578 | (HeatSwitchHistoryDerivatives.logE_contDiffOn F w) ht hs] |
| 579 | have hx : 0 < SimilarityProfile.X F.data.h p := |
| 580 | div_pos hs (SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht) |
| 581 | have heta : SimilarityProfile.eta F.data.h p ∈ Ioo (-1) 1 := by |
| 582 | have he := SimilarityProfile.eta_sq_lt_one F.data.h_pos F.data.h_lt_half ht |
| 583 | constructor <;> nlinarith [sq_nonneg (SimilarityProfile.eta F.data.h p+1),sq_nonneg (SimilarityProfile.eta F.data.h p-1)] |
| 584 | have hp : logPoint XR (SimilarityProfile.inner F.data.h p) ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier := |
| 585 | ⟨mem_univ _,heta⟩ |
| 586 | unfold angularResidual etaDerivative |
| 587 | rw [HeatSwitchHistoryDerivatives.within_parameter_eq (HeatSwitchHistoryDerivatives.logE_contDiffOn F w) hp] |
| 588 | simp only [logPoint,SimilarityProfile.inner,Real.exp_log (div_pos hx w.radius_pos), |
| 589 | mul_div_cancel₀ _ w.radius_pos.ne',TerminalPressure.amplitudeExponent,StressAlgebra.velocityExponent, |
| 590 | StressAlgebra.axialExponent,CoordinateAlgebra.D,neg_neg] |
| 591 | |
| 592 | theorem physicalLog_axialResidual (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 593 | {p : SimilarityProfile.PhysicalPoint} (ht : p.1 < 1) (hs : 0 < p.2.1) : |
| 594 | SimilarityProfile.partialZ (physicalLog F.data.h (-2*TerminalPressure.amplitudeExponent F.data.h) |
| 595 | XR (logPi F XR w.coefficients)) p = |
| 596 | SimilarityProfile.q F.data.h p^(-TerminalPressure.amplitudeExponent F.data.h-1) * |
| 597 | axialResidual F XR w.coefficients (logPoint XR (SimilarityProfile.inner F.data.h p)) := by |
| 598 | have hq := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht |
| 599 | have hx : 0 < (SimilarityProfile.inner F.data.h p).1 := div_pos hs hq |
| 600 | have heta : (SimilarityProfile.inner F.data.h p).2 ∈ Ioo (-1) 1 := by |
| 601 | change SimilarityProfile.eta F.data.h p ∈ Ioo (-1) 1 |
| 602 | have he := SimilarityProfile.eta_sq_lt_one F.data.h_pos F.data.h_lt_half ht |
| 603 | constructor <;> nlinarith [sq_nonneg (SimilarityProfile.eta F.data.h p+1),sq_nonneg (SimilarityProfile.eta F.data.h p-1)] |
| 604 | have hm : logPoint XR (SimilarityProfile.inner F.data.h p) ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier := |
| 605 | ⟨mem_univ _,heta⟩ |
| 606 | have hg := HeatSwitchHistoryDerivatives.logPi_contDiffOn F w |
| 607 | have hd := radialLift_contDiffAt w.radius_pos hg hx heta |
| 608 | have hp := HeatSwitchHistoryDerivatives.logPi_hasDerivAt F w |
| 609 | (logPoint XR (SimilarityProfile.inner F.data.h p)) ⟨heta.1.le,heta.2.le⟩ |
| 610 | have hpd := ProfileHistories.radialPartial_hasDerivAt HeatSwitchHistoryDerivatives.interiorDomain hg hm |
| 611 | have hpy := hpd.unique hp |
| 612 | unfold physicalLog |
| 613 | rw [SimilarityProfile.partialZ_pullback F.data.h_pos F.data.h_lt_half ht (hd.differentiableAt (by simp))] |
| 614 | simp only [SimilarityProfile.pullback,SimilarityProfile.Z,CoordinateAlgebra.axialCoeff] |
| 615 | rw [radialLift_partialX w.radius_pos hg hx heta,radialLift_partialEta w.radius_pos hg hx heta,hpy] |
| 616 | unfold axialResidual etaDerivative |
| 617 | rw [HeatSwitchHistoryDerivatives.within_parameter_eq hg hm] |
| 618 | have hexp : -2*TerminalPressure.amplitudeExponent F.data.h-CoordinateAlgebra.D F.data.h = |
| 619 | -TerminalPressure.amplitudeExponent F.data.h-1 := by |
| 620 | unfold TerminalPressure.amplitudeExponent CoordinateAlgebra.D |
| 621 | ring |
| 622 | rw [hexp] |
| 623 | simp only [radialLift,logPoint,SimilarityProfile.inner,StressAlgebra.coordinateFactor, |
| 624 | StressAlgebra.velocityExponent,TerminalPressure.amplitudeExponent,CoordinateAlgebra.d] |
| 625 | dsimp only [SimilarityProfile.inner] at hx |
| 626 | have hL := SimilarityProfile.L_pos F.data.h_pos F.data.h_lt_half ht |
| 627 | field_simp [hx.ne',hL.ne'] ; ring |
| 628 | |
| 629 | theorem amplitudeOperator_congr {V W : SimilarityProfile.PhysicalProfile} |
| 630 | {p : SimilarityProfile.PhysicalPoint} (he : V =ᶠ[𝓝 p] W) : |
| 631 | amplitudeOperator V p = amplitudeOperator W p := by |
| 632 | have hS : SimilarityProfile.partialS V =ᶠ[𝓝 p] SimilarityProfile.partialS W := by |
| 633 | filter_upwards [he.fderiv (𝕜 := ℝ)] with z hz |
| 634 | exact congrArg (fun A : SimilarityProfile.PhysicalPoint →L[ℝ] ℝ => A (0,(1,0))) hz |
| 635 | have hSS : SimilarityProfile.partialS (SimilarityProfile.partialS V) p = |
| 636 | SimilarityProfile.partialS (SimilarityProfile.partialS W) p := |
| 637 | congrArg (fun A : SimilarityProfile.PhysicalPoint →L[ℝ] ℝ => A (0,(1,0))) hS.fderiv_eq |
| 638 | unfold amplitudeOperator |
| 639 | rw [hSS] |
| 640 | unfold SimilarityProfile.partialT SimilarityProfile.partialS |
| 641 | rw [he.fderiv_eq,he.self_of_nhds] |
| 642 | |
| 643 | noncomputable def terminalAmplitude (C : ℝ) (d : OutgoingTail.TailData) (y0 : ℝ) |
| 644 | (p : SimilarityProfile.PhysicalPoint) : ℝ := |
| 645 | TerminalStress.physicalHeat C (1+d.h) p * TerminalStress.flattening d.h |
| 646 | (TerminalPressure.outgoingTaper d y0) p |
| 647 | |
| 648 | theorem terminalAmplitude_operator (C : ℝ) (d : OutgoingTail.TailData) (y0 : ℝ) |
| 649 | {t r z : ℝ} (ht : t < 1) (hr : 0 < r) : |
| 650 | amplitudeOperator (terminalAmplitude C d y0) (TerminalStress.radiusPoint t r z) = |
| 651 | TerminalStress.leadingResidual C d.h (TerminalPressure.outgoingTaper d y0) t r z := by |
| 652 | have hp : (TerminalStress.radiusPoint t r z).1 < 1 := ht |
| 653 | have hs : 0 < (TerminalStress.radiusPoint t r z).2.1 := by |
| 654 | dsimp [TerminalStress.radiusPoint] |
| 655 | positivity |
| 656 | have hf : ContDiffAt ℝ 2 (TerminalPressure.outgoingTaper d y0) |
| 657 | (Real.log (SimilarityProfile.X d.h (TerminalStress.radiusPoint t r z))) := |
| 658 | (TerminalPressure.outgoingTaper_contDiff d y0).contDiffAt.of_le two_le_infty |
| 659 | have hA : ContDiffAt ℝ 2 (terminalAmplitude C d y0) (TerminalStress.radiusPoint t r z) := |
| 660 | ((TerminalStress.physicalHeat_contDiffAt C (by linarith [d.h_pos]) hp hs).of_le two_le_infty).mul |
| 661 | (TerminalStress.flattening_contDiffAt d.h_pos d.h_lt_half hp hs hf) |
| 662 | have he := TerminalStress.terminal_radial_residual C d.h_pos d.h_lt_half ht hr hf |
| 663 | change deriv (fun u => terminalAmplitude C d y0 (TerminalStress.radiusPoint u r z)) t - |
| 664 | (deriv (deriv (TerminalStress.radialSlice (terminalAmplitude C d y0) t z)) r + |
| 665 | deriv (TerminalStress.radialSlice (terminalAmplitude C d y0) t z) r/r - |
| 666 | terminalAmplitude C d y0 (TerminalStress.radiusPoint t r z)/r^2) = |
| 667 | TerminalStress.leadingResidual C d.h (TerminalPressure.outgoingTaper d y0) t r z at he |
| 668 | have htd : deriv (fun u => terminalAmplitude C d y0 (TerminalStress.radiusPoint u r z)) t = |
| 669 | SimilarityProfile.partialT (terminalAmplitude C d y0) (TerminalStress.radiusPoint t r z) := |
| 670 | (TerminalStress.timeSlice_hasDerivAt (hA.differentiableAt (by norm_num))).deriv |
| 671 | rw [htd, |
| 672 | TerminalStress.radialSlice_second hA, |
| 673 | (TerminalStress.radialSlice_hasDerivAt (hA.differentiableAt (by norm_num))).deriv] at he |
| 674 | apply Eq.trans _ he |
| 675 | unfold amplitudeOperator |
| 676 | dsimp only [TerminalStress.radiusPoint] |
| 677 | field_simp [hr.ne'] ; ring |
| 678 | |
| 679 | theorem terminal_germs (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 680 | {p : SimilarityProfile.PhysicalPoint} (ht : p.1 < 1) (hs : 0 < p.2.1) |
| 681 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h p / |
| 682 | OutgoingDilation.switchRadius F XR) + 1/5) : |
| 683 | physicalLog F.data.h (-TerminalPressure.amplitudeExponent F.data.h) XR (logE F XR w.coefficients) |
| 684 | =ᶠ[𝓝 p] terminalAmplitude (normalization F XR) F.data (shift F XR) ∧ |
| 685 | physicalLog F.data.h (-2*TerminalPressure.amplitudeExponent F.data.h) XR (logPi F XR w.coefficients) |
| 686 | =ᶠ[𝓝 p] TerminalPressure.outgoingPressure (normalization F XR) F.data (shift F XR) := by |
| 687 | have hX := div_pos hs (SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht) |
| 688 | have hK := OutgoingDilation.switchRadius_pos F XR w.radius_pos |
| 689 | have hc : ContinuousAt (fun q => Real.log (SimilarityProfile.X F.data.h q / |
| 690 | OutgoingDilation.switchRadius F XR) + 1/5) p := |
| 691 | ((((SimilarityProfile.inner_smoothAt F.data.h_pos F.data.h_lt_half ht).continuousAt.fst).div_const _).log |
| 692 | (div_pos hX hK).ne').add_const _ |
| 693 | have hev : ∀ᶠ q in 𝓝 p, q.1 < 1 ∧ 0 < q.2.1 ∧ |
| 694 | 1/2 < Real.log (SimilarityProfile.X F.data.h q / OutgoingDilation.switchRadius F XR)+1/5 := by |
| 695 | filter_upwards [continuousAt_fst.eventually (Iio_mem_nhds ht), |
| 696 | continuousAt_snd.fst.eventually (Ioi_mem_nhds hs),hc.eventually (Ioi_mem_nhds hfull)] with q hqt hqs hqf |
| 697 | exact ⟨hqt,hqs,hqf⟩ |
| 698 | constructor |
| 699 | · filter_upwards [hev] with q hq |
| 700 | have hx := div_pos hq.2.1 (SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half hq.1) |
| 701 | unfold physicalLog SimilarityProfile.pullback |
| 702 | rw [logE_radialLift F w.radius_pos w.coefficients hx] |
| 703 | exact physicalAngular_eq_terminal F w.radius_pos w.coefficients hq.1 hq.2.1 hq.2.2.le |
| 704 | · filter_upwards [hev] with q hq |
| 705 | have hx := div_pos hq.2.1 (SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half hq.1) |
| 706 | have heta : SimilarityProfile.eta F.data.h q ∈ HeatedOutgoing.parameterDomain := by |
| 707 | have he := SimilarityProfile.eta_sq_lt_one F.data.h_pos F.data.h_lt_half hq.1 |
| 708 | constructor <;> nlinarith [sq_nonneg (SimilarityProfile.eta F.data.h q+1),sq_nonneg (SimilarityProfile.eta F.data.h q-1)] |
| 709 | unfold physicalLog SimilarityProfile.pullback |
| 710 | rw [logPi_radialLift F w hx heta] |
| 711 | exact physicalPressure_eq_terminal F w.radius_pos w.coefficients hq.1 hq.2.1 hq.2.2.le |
| 712 | |
| 713 | theorem terminal_angularResidual (F : Profile) {XR C t r z : ℝ} |
| 714 | (w : CompensationWitness F XR C) (ht : t < 1) (hr : 0 < r) |
| 715 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h (TerminalStress.radiusPoint t r z) / |
| 716 | OutgoingDilation.switchRadius F XR) + 1/5) : |
| 717 | TerminalStress.leadingResidual (normalization F XR) F.data.h |
| 718 | (TerminalPressure.outgoingTaper F.data (shift F XR)) t r z = |
| 719 | SimilarityProfile.q F.data.h (TerminalStress.radiusPoint t r z)^(-TerminalPressure.amplitudeExponent F.data.h-1) * |
| 720 | angularResidual F XR w.coefficients |
| 721 | (logPoint XR (SimilarityProfile.inner F.data.h (TerminalStress.radiusPoint t r z))) := by |
| 722 | have hs : 0 < (TerminalStress.radiusPoint t r z).2.1 := by |
| 723 | dsimp [TerminalStress.radiusPoint] |
| 724 | positivity |
| 725 | rw [← terminalAmplitude_operator (normalization F XR) F.data (shift F XR) ht hr, |
| 726 | ← amplitudeOperator_congr (terminal_germs F w ht hs hfull).1] |
| 727 | exact physicalLog_angularResidual F w ht hs |
| 728 | |
| 729 | theorem terminal_axialResidual (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 730 | {p : SimilarityProfile.PhysicalPoint} (ht : p.1 < 1) (hs : 0 < p.2.1) |
| 731 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h p / |
| 732 | OutgoingDilation.switchRadius F XR) + 1/5) : |
| 733 | SimilarityProfile.partialZ (TerminalPressure.outgoingPressure (normalization F XR) F.data (shift F XR)) p = |
| 734 | SimilarityProfile.q F.data.h p^(-TerminalPressure.amplitudeExponent F.data.h-1) * |
| 735 | axialResidual F XR w.coefficients (logPoint XR (SimilarityProfile.inner F.data.h p)) := by |
| 736 | have he := (terminal_germs F w ht hs hfull).2 |
| 737 | unfold SimilarityProfile.partialZ |
| 738 | rw [← he.fderiv_eq] |
| 739 | exact physicalLog_axialResidual F w ht hs |
| 740 | |
| 741 | /-! ## Vanishing constants at infinity, obtained from the actual moments -/ |
| 742 | |
| 743 | theorem powerHistory_identity (F : Profile) {XR X : ℝ} (hXR : 0 < XR) (hX : 0 < X) : |
| 744 | (1-F.data.h)*powerHistory F XR X = X*OutgoingDilation.powerH F XR X := by |
| 745 | have he : powerHistory F XR X = HeatTailHistoryLimits.angularAmplitude F XR * |
| 746 | ∫ u in Ioc 0 X, u^(-F.data.h) := by |
| 747 | unfold powerHistory |
| 748 | rw [← integral_const_mul] |
| 749 | apply setIntegral_congr_fun measurableSet_Ioc |
| 750 | intro u hu |
| 751 | exact HeatTailHistoryLimits.powerH_eq F hXR hu.1 |
| 752 | rw [he,HeatTailHistoryLimits.powerH_eq F hXR hX, |
| 753 | ← intervalIntegral.integral_of_le hX.le, |
| 754 | integral_rpow (Or.inl (by linarith [F.data.h_lt_half] : -1 < -F.data.h)), |
| 755 | Real.zero_rpow (by linarith [F.data.h_lt_half] : -F.data.h+1 ≠ 0),sub_zero, |
| 756 | Real.rpow_add_one hX.ne'] |
| 757 | rw [show -F.data.h+1=1-F.data.h by ring] |
| 758 | field_simp [F.data.one_sub_h_pos.ne'] |
| 759 | |
| 760 | theorem logPoint_radius {XR : ℝ} (hXR : 0 < XR) (y η : ℝ) : |
| 761 | logPoint XR (XR*Real.exp y,η) = (y,η) := by |
| 762 | simp only [logPoint,mul_div_cancel_left₀ _ hXR.ne',Real.log_exp] |
| 763 | |
| 764 | theorem angularHistory_eta_eq_logI (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 765 | {η : ℝ} (hη : η ∈ Ioo (-1) 1) (y : ℝ) : |
| 766 | deriv (fun t => angularHistory F XR w.coefficients t (XR*Real.exp y)) η = |
| 767 | (XR*Real.sqrt (2*XR))*etaDerivative (logI F XR w.coefficients) (y,η) := by |
| 768 | have hg := HeatSwitchHistoryDerivatives.logI_contDiffOn F w |
| 769 | have hd := (ProfileHistories.parameterPartial_hasDerivAt HeatSwitchHistoryDerivatives.interiorDomain hg |
| 770 | (show (y,η) ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from ⟨mem_univ _,hη⟩)).const_mul |
| 771 | (XR*Real.sqrt (2*XR)) |
| 772 | have he : (fun t => angularHistory F XR w.coefficients t (XR*Real.exp y)) =ᶠ[𝓝 η] |
| 773 | fun t => (XR*Real.sqrt (2*XR))*logI F XR w.coefficients (y,t) := by |
| 774 | filter_upwards [isOpen_Ioo.mem_nhds hη] with t ht |
| 775 | exact angularHistory_eq_logI F w.radius_pos w.coefficients ⟨ht.1.le,ht.2.le⟩ y |
| 776 | rw [(hd.congr_of_eventuallyEq he).deriv] |
| 777 | rw [etaDerivative,HeatSwitchHistoryDerivatives.within_parameter_eq hg |
| 778 | (show (y,η) ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from ⟨mem_univ _,hη⟩)] |
| 779 | |
| 780 | theorem energyHistory_eta_eq_logS (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 781 | {η : ℝ} (hη : η ∈ Ioo (-1) 1) (y : ℝ) : |
| 782 | deriv (fun t => energyHistory F XR w.coefficients t (XR*Real.exp y)) η = |
| 783 | XR*etaDerivative (logS F XR w.coefficients) (y,η) := by |
| 784 | have hg := HeatSwitchHistoryDerivatives.logS_contDiffOn F w |
| 785 | have hd := (ProfileHistories.parameterPartial_hasDerivAt HeatSwitchHistoryDerivatives.interiorDomain hg |
| 786 | (show (y,η) ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from ⟨mem_univ _,hη⟩)).const_mul XR |
| 787 | have he : (fun t => energyHistory F XR w.coefficients t (XR*Real.exp y)) =ᶠ[𝓝 η] |
| 788 | fun t => XR*logS F XR w.coefficients (y,t) := by |
| 789 | filter_upwards [isOpen_Ioo.mem_nhds hη] with t ht |
| 790 | exact energyHistory_eq_logS F w.radius_pos w.coefficients ⟨ht.1.le,ht.2.le⟩ y |
| 791 | rw [(hd.congr_of_eventuallyEq he).deriv] |
| 792 | rw [etaDerivative,HeatSwitchHistoryDerivatives.within_parameter_eq hg |
| 793 | (show (y,η) ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from ⟨mem_univ _,hη⟩)] |
| 794 | |
| 795 | theorem pressure_eta_eq_logPi (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 796 | {η : ℝ} (hη : η ∈ Ioo (-1) 1) (y : ℝ) : |
| 797 | deriv (fun t => HeatedOutgoing.Pi F XR w.coefficients (XR*Real.exp y,t)) η = |
| 798 | etaDerivative (logPi F XR w.coefficients) (y,η) := by |
| 799 | have hg := HeatSwitchHistoryDerivatives.logPi_contDiffOn F w |
| 800 | have hd := ProfileHistories.parameterPartial_hasDerivAt HeatSwitchHistoryDerivatives.interiorDomain hg |
| 801 | (show (y,η) ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from ⟨mem_univ _,hη⟩) |
| 802 | have he : (fun t => HeatedOutgoing.Pi F XR w.coefficients (XR*Real.exp y,t)) =ᶠ[𝓝 η] |
| 803 | fun t => logPi F XR w.coefficients (y,t) := by |
| 804 | filter_upwards [isOpen_Ioo.mem_nhds hη] with t ht |
| 805 | exact (HeatSwitchCone.logPi_eq_canonical F w (y,t) ⟨ht.1.le,ht.2.le⟩).symm |
| 806 | rw [(hd.congr_of_eventuallyEq he).deriv] |
| 807 | rw [etaDerivative,HeatSwitchHistoryDerivatives.within_parameter_eq hg |
| 808 | (show (y,η) ∈ HeatSwitchHistoryDerivatives.interiorDomain.carrier from ⟨mem_univ _,hη⟩)] |
| 809 | |
| 810 | theorem H_log_derivative (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 811 | {η : ℝ} (hη : η ∈ Ioo (-1) 1) (y : ℝ) : |
| 812 | (XR*Real.exp y)*deriv (fun u => HeatedOutgoing.H F XR w.coefficients (u,η)) (XR*Real.exp y) = |
| 813 | Real.sqrt (2*XR)*Real.exp (y/2)* |
| 814 | (radialPartial (logE F XR w.coefficients) (y,η)+logE F XR w.coefficients (y,η)/2) := by |
| 815 | let X := XR*Real.exp y |
| 816 | have hX : 0 < X := mul_pos w.radius_pos (Real.exp_pos _) |
| 817 | have hg := HeatSwitchHistoryDerivatives.logE_contDiffOn F w |
| 818 | have he := LeadingStress.partialX_hasDerivAt |
| 819 | ((radialLift_contDiffAt w.radius_pos hg (p := (X,η)) hX hη).differentiableAt (by simp)) |
| 820 | rw [radialLift_partialX w.radius_pos hg hX hη] at he |
| 821 | have hd := ((Real.hasDerivAt_sqrt (show 2*X ≠ 0 by positivity)).comp X |
| 822 | ((hasDerivAt_id X).const_mul 2)).fun_mul he |
| 823 | have hev : (fun u => HeatedOutgoing.H F XR w.coefficients (u,η)) =ᶠ[𝓝 X] |
| 824 | fun u => Real.sqrt (2*u)*radialLift XR (logE F XR w.coefficients) (u,η) := by |
| 825 | filter_upwards [Ioi_mem_nhds hX] with u hu |
| 826 | rw [logE_radialLift F w.radius_pos w.coefficients (p := (u,η)) hu] |
| 827 | rfl |
| 828 | rw [(hd.congr_of_eventuallyEq hev).deriv] |
| 829 | change X*(_*radialLift XR (logE F XR w.coefficients) (X,η) + |
| 830 | Real.sqrt (2*X)*(radialPartial (logE F XR w.coefficients) (logPoint XR (X,η))/X)) = _ |
| 831 | rw [radialLift,logPoint_radius w.radius_pos y η] |
| 832 | have hr : Real.sqrt (2*X) ≠ 0 := (Real.sqrt_pos.mpr (by positivity)).ne' |
| 833 | have hr2 : Real.sqrt (2*X)^2 = 2*X := Real.sq_sqrt (by positivity) |
| 834 | rw [← sqrt_radius_exp w.radius_pos y] |
| 835 | change X*(_*logE F XR w.coefficients (y,η) + |
| 836 | Real.sqrt (2*X)*(radialPartial (logE F XR w.coefficients) (y,η)/X)) = |
| 837 | Real.sqrt (2*X)*(radialPartial (logE F XR w.coefficients) (y,η)+logE F XR w.coefficients (y,η)/2) |
| 838 | generalize Real.sqrt (2*X) = r at * |
| 839 | field_simp [hX.ne',hr] |
| 840 | linear_combination -logE F XR w.coefficients (y,η)*hr2 |
| 841 | |
| 842 | theorem thetaWeight_eq_moments (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 843 | {η : ℝ} (hη : η ∈ Ioo (-1) 1) (y : ℝ) : |
| 844 | thetaWeight F XR w.coefficients (y,η) = |
| 845 | ((1-F.data.h)*(angularHistory F XR w.coefficients η (XR*Real.exp y)-powerHistory F XR (XR*Real.exp y)) - |
| 846 | StressAlgebra.axialExponent F.data.h*η* |
| 847 | deriv (fun t => angularHistory F XR w.coefficients t (XR*Real.exp y)) η - |
| 848 | (XR*Real.exp y)*(HeatedOutgoing.H F XR w.coefficients (XR*Real.exp y,η)- |
| 849 | OutgoingDilation.powerH F XR (XR*Real.exp y))) / CoordinateAlgebra.L F.data.h η - |
| 850 | 2*HeatedOutgoing.H F XR w.coefficients (XR*Real.exp y,η) + |
| 851 | 2*((XR*Real.exp y)*deriv (fun u => HeatedOutgoing.H F XR w.coefficients (u,η)) (XR*Real.exp y)) := by |
| 852 | have hpower := powerHistory_identity F w.radius_pos (mul_pos w.radius_pos (Real.exp_pos y)) |
| 853 | rw [angularHistory_eq_logI F w.radius_pos w.coefficients ⟨hη.1.le,hη.2.le⟩, |
| 854 | angularHistory_eta_eq_logI F w hη,H_log_derivative F w hη] |
| 855 | simp only [HeatedOutgoing.H,sqrt_radius_exp w.radius_pos] |
| 856 | unfold thetaWeight thetaStock |
| 857 | simp only [show 3*y/2=y+y/2 by ring,Real.exp_add] |
| 858 | unfold logE |
| 859 | have hL : CoordinateAlgebra.L F.data.h η ≠ 0 := |
| 860 | (CoordinateAlgebra.L_pos F.data.h_pos.le F.data.h_lt_half |
| 861 | (TerminalEdgeFactor.eta_sq_le_one ⟨hη.1.le,hη.2.le⟩)).ne' |
| 862 | field_simp [hL] |
| 863 | linear_combination hpower |
| 864 | |
| 865 | theorem axialWeight_eq_moments (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 866 | {η : ℝ} (hη : η ∈ Ioo (-1) 1) (y : ℝ) : |
| 867 | axialWeight F XR w.coefficients (y,η) = |
| 868 | (4*F.data.h*η*energyHistory F XR w.coefficients η (XR*Real.exp y) - |
| 869 | StressAlgebra.coordinateFactor η*deriv (fun t => energyHistory F XR w.coefficients t (XR*Real.exp y)) η + |
| 870 | 4*StressAlgebra.velocityExponent F.data.h*η*((XR*Real.exp y)*HeatedOutgoing.Pi F XR w.coefficients (XR*Real.exp y,η)) - |
| 871 | StressAlgebra.coordinateFactor η*((XR*Real.exp y)*deriv (fun t => HeatedOutgoing.Pi F XR w.coefficients |
| 872 | (XR*Real.exp y,t)) η)) / CoordinateAlgebra.L F.data.h η := by |
| 873 | rw [energyHistory_eq_logS F w.radius_pos w.coefficients ⟨hη.1.le,hη.2.le⟩, |
| 874 | energyHistory_eta_eq_logS F w hη,pressure_eta_eq_logPi F w hη, |
| 875 | ← HeatSwitchCone.logPi_eq_canonical F w (y,η) ⟨hη.1.le,hη.2.le⟩] |
| 876 | unfold axialWeight |
| 877 | ring |
| 878 | |
| 879 | theorem thetaWeight_tendsto_zero (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) |
| 880 | {η : ℝ} (hη : η ∈ Ioo (-1) 1) : |
| 881 | Tendsto (fun y => thetaWeight F XR w.coefficients (y,η)) atTop (𝓝 0) := by |
| 882 | have hb : η ∈ HeatedOutgoing.parameterDomain := ⟨hη.1.le,hη.2.le⟩ |
| 883 | have hI := HeatTailHistoryLimits.angularHistory_sub_power_tendsto_zero w hb |
| 884 | have hIm := HeatTailHistoryLimits.angularHistory_eta_tendsto_zero w hη |
| 885 | have hH := HeatTailHistoryLimits.H_tendsto_zero F w.radius_pos w.coefficients hb |
| 886 | have hHx := HeatTailHistoryLimits.mul_H_deriv_tendsto_zero F w.radius_pos w.coefficients hb |
| 887 | have hHd := HeatTailHistoryLimits.mul_H_sub_powerH_tendsto_zero F w.radius_pos w.coefficients hb |
| 888 | have hh := (((((hI.const_mul (1-F.data.h)).sub (hIm.const_mul (StressAlgebra.axialExponent F.data.h*η))).sub hHd).div_const |
| 889 | (CoordinateAlgebra.L F.data.h η)).sub (hH.const_mul 2)).add (hHx.const_mul 2) |
| 890 | have hr : Tendsto (fun y => XR*Real.exp y) atTop atTop := |
| 891 | Real.tendsto_exp_atTop.const_mul_atTop w.radius_pos |
| 892 | have ht := hh.comp hr |
| 893 | simp only [mul_zero,sub_zero,zero_div,add_zero] at ht |
| 894 | apply ht.congr' |
| 895 | exact Eventually.of_forall fun y => (thetaWeight_eq_moments F w hη y).symm |
| 896 | |
| 897 | theorem axialWeight_tendsto_zero (F : Profile) {XR C B : ℝ} |
| 898 | (hF : OutgoingProfile.Specification F B) (w : CompensationWitness F XR C) |
| 899 | {η : ℝ} (hη : η ∈ Ioo (-1) 1) : |
| 900 | Tendsto (fun y => axialWeight F XR w.coefficients (y,η)) atTop (𝓝 0) := by |
| 901 | have hb : η ∈ HeatedOutgoing.parameterDomain := ⟨hη.1.le,hη.2.le⟩ |
| 902 | have hS := HeatTailHistoryLimits.energyHistory_tendsto_zero hF w hb |
| 903 | have hSm := HeatTailHistoryLimits.energyHistory_eta_tendsto_zero hF w hη |
| 904 | have hP := HeatTailHistoryLimits.mul_pressure_tendsto_zero F w.radius_pos w.coefficients hb |
| 905 | have hPm := HeatTailHistoryLimits.mul_pressure_eta_tendsto_zero F w.radius_pos w.coefficients hη |
| 906 | have hh := (((hS.const_mul (4*F.data.h*η)).sub (hSm.const_mul (StressAlgebra.coordinateFactor η))).add |
| 907 | (hP.const_mul (4*StressAlgebra.velocityExponent F.data.h*η))).sub (hPm.const_mul (StressAlgebra.coordinateFactor η)) |
| 908 | |>.div_const (CoordinateAlgebra.L F.data.h η) |
| 909 | have hr : Tendsto (fun y => XR*Real.exp y) atTop atTop := |
| 910 | Real.tendsto_exp_atTop.const_mul_atTop w.radius_pos |
| 911 | have ht := hh.comp hr |
| 912 | simp only [mul_zero,sub_zero,zero_div,add_zero] at ht |
| 913 | apply ht.congr' |
| 914 | exact Eventually.of_forall fun y => (axialWeight_eq_moments F w hη y).symm |
| 915 | |
| 916 | theorem eta_mem_interior {h : ℝ} (hh : 0 < h) (hh' : h < 1/2) |
| 917 | {p : SimilarityProfile.PhysicalPoint} (ht : p.1 < 1) : |
| 918 | SimilarityProfile.eta h p ∈ Ioo (-1) 1 := by |
| 919 | have he := SimilarityProfile.eta_sq_lt_one hh hh' ht |
| 920 | constructor <;> nlinarith [sq_nonneg (SimilarityProfile.eta h p+1),sq_nonneg (SimilarityProfile.eta h p-1)] |
| 921 | |
| 922 | theorem full_switch_late (F : Profile) {XR X : ℝ} (hXR : 0 < XR) (hX : 0 < X) |
| 923 | (hfull : 1/2 ≤ Real.log (X/OutgoingDilation.switchRadius F XR)+1/5) : |
| 924 | TerminalCone.terminalStart F.data ≤ Real.log (X/XR) := by |
| 925 | have he := TerminalCone.tailTime_clock F hXR (Real.log (X/XR)) |
| 926 | rw [Real.exp_log (div_pos hX hXR),mul_div_cancel₀ _ hXR.ne'] at he |
| 927 | unfold TerminalCone.terminalStart |
| 928 | linarith |
| 929 | |
| 930 | theorem full_switch_radial_strict {F : Profile} {XR : ℝ} (hXR : 0 < XR) |
| 931 | {p : SimilarityProfile.PhysicalPoint} (ht : p.1 < 1) (hs : 0 < p.2.1) |
| 932 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h p / |
| 933 | OutgoingDilation.switchRadius F XR)+1/5) {u : ℝ} (hu : p.2.1 ≤ u) : |
| 934 | 1/2 < Real.log (SimilarityProfile.X F.data.h (p.1,(u,p.2.2)) / |
| 935 | OutgoingDilation.switchRadius F XR)+1/5 := by |
| 936 | have hq := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht |
| 937 | have hK := OutgoingDilation.switchRadius_pos F XR hXR |
| 938 | have hx : 0 < SimilarityProfile.X F.data.h p := div_pos hs hq |
| 939 | have hle : SimilarityProfile.X F.data.h p ≤ SimilarityProfile.X F.data.h (p.1,(u,p.2.2)) := |
| 940 | div_le_div_of_nonneg_right hu hq.le |
| 941 | exact hfull.trans_le (add_le_add_left |
| 942 | (Real.log_le_log (div_pos hx hK) (div_le_div_of_nonneg_right hle hK.le)) _) |
| 943 | |
| 944 | noncomputable def regularClock (q XR s : ℝ) : ℝ := Real.log ((s/q)/XR) |
| 945 | noncomputable def radiusClock (q XR r : ℝ) : ℝ := regularClock q XR (r^2/2) |
| 946 | |
| 947 | theorem regularClock_hasDerivAt {q XR s : ℝ} (hq : 0 < q) (hXR : 0 < XR) (hs : 0 < s) : |
| 948 | HasDerivAt (regularClock q XR) (1/s) s := by |
| 949 | convert! (log_radius_hasDerivAt hXR (div_pos hs hq)).comp s ((hasDerivAt_id s).div_const q) using 1 |
| 950 | field_simp [hq.ne',hs.ne'] |
| 951 | |
| 952 | theorem radiusClock_hasDerivAt {q XR r : ℝ} (hq : 0 < q) (hXR : 0 < XR) (hr : 0 < r) : |
| 953 | HasDerivAt (radiusClock q XR) (2/r) r := by |
| 954 | convert! (regularClock_hasDerivAt hq hXR (by positivity : 0 < r^2/2)).comp r |
| 955 | (RadialHeatProfile.radiusSquared_hasDerivAt r) using 1 |
| 956 | field_simp [hr.ne'] |
| 957 | |
| 958 | theorem exp_regularClock {q XR s : ℝ} (hq : 0 < q) (hXR : 0 < XR) (hs : 0 < s) : |
| 959 | XR*Real.exp (regularClock q XR s) = s/q := by |
| 960 | rw [regularClock,Real.exp_log (div_pos (div_pos hs hq) hXR),mul_div_cancel₀ _ hXR.ne'] |
| 961 | |
| 962 | theorem regularClock_tendsto {q XR : ℝ} (hq : 0 < q) (hXR : 0 < XR) : |
| 963 | Tendsto (regularClock q XR) atTop atTop := |
| 964 | Real.tendsto_log_atTop.comp ((tendsto_id.atTop_div_const hq).atTop_div_const hXR) |
| 965 | |
| 966 | theorem radiusClock_tendsto {q XR : ℝ} (hq : 0 < q) (hXR : 0 < XR) : |
| 967 | Tendsto (radiusClock q XR) atTop atTop := |
| 968 | (regularClock_tendsto hq hXR).comp ((tendsto_pow_atTop (by decide : (2:ℕ) ≠ 0)).atTop_div_const (by norm_num)) |
| 969 | |
| 970 | theorem sqrt_radius_quotient {q r : ℝ} (_hq : 0 < q) (hr : 0 < r) : |
| 971 | Real.sqrt (2*(r^2/2/q)) = r/Real.sqrt q := by |
| 972 | rw [show 2*(r^2/2/q)=r^2/q by ring,Real.sqrt_div (sq_nonneg r),Real.sqrt_sq hr.le] |
| 973 | |
| 974 | theorem theta_power_identity {q : ℝ} (hq : 0 < q) (h : ℝ) : |
| 975 | q^(-h) = q^(-TerminalPressure.amplitudeExponent h-1)*q*Real.sqrt q := by |
| 976 | calc |
| 977 | _ = q^((-TerminalPressure.amplitudeExponent h-1)+1+1/2) := by |
| 978 | congr 1 |
| 979 | unfold TerminalPressure.amplitudeExponent |
| 980 | ring |
| 981 | _ = _ := by rw [Real.rpow_add hq,Real.rpow_add hq,Real.rpow_one,Real.sqrt_eq_rpow] |
| 982 | |
| 983 | noncomputable def physicalThetaWeight (F : Profile) (XR : ℝ) (c : ℝ → Coeff) (t z r : ℝ) : ℝ := |
| 984 | let q := SimilarityProfile.q F.data.h (t,(0,z)) |
| 985 | let η := SimilarityProfile.eta F.data.h (t,(0,z)) |
| 986 | q^(-F.data.h)*thetaWeight F XR c (radiusClock q XR r,η) |
| 987 | |
| 988 | noncomputable def physicalAxialWeight (F : Profile) (XR : ℝ) (c : ℝ → Coeff) (t z s : ℝ) : ℝ := |
| 989 | let q := SimilarityProfile.q F.data.h (t,(0,z)) |
| 990 | let η := SimilarityProfile.eta F.data.h (t,(0,z)) |
| 991 | q^(-TerminalPressure.amplitudeExponent F.data.h)*axialWeight F XR c (regularClock q XR s,η) |
| 992 | |
| 993 | theorem physicalThetaWeight_hasDerivAt (F : Profile) {XR C t r z : ℝ} |
| 994 | (w : CompensationWitness F XR C) (ht : t < 1) (hr : 0 < r) |
| 995 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h (TerminalStress.radiusPoint t r z) / |
| 996 | OutgoingDilation.switchRadius F XR)+1/5) : |
| 997 | HasDerivAt (physicalThetaWeight F XR w.coefficients t z) |
| 998 | (-(r^2*TerminalStress.leadingResidual (normalization F XR) F.data.h |
| 999 | (TerminalPressure.outgoingTaper F.data (shift F XR)) t r z)) r := by |
| 1000 | let q := SimilarityProfile.q F.data.h (t,(0,z)) |
| 1001 | let η := SimilarityProfile.eta F.data.h (t,(0,z)) |
| 1002 | have hq : 0 < q := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht |
| 1003 | have heta : η ∈ Ioo (-1) 1 := eta_mem_interior F.data.h_pos F.data.h_lt_half ht |
| 1004 | have hd := ((thetaWeight_hasDerivAt F w (p := (radiusClock q XR r,η)) heta).comp r |
| 1005 | (radiusClock_hasDerivAt hq w.radius_pos hr)).const_mul (q^(-F.data.h)) |
| 1006 | apply hd.congr_deriv |
| 1007 | rw [terminal_angularResidual F w ht hr hfull] |
| 1008 | change q^(-F.data.h) * |
| 1009 | ((-(XR*Real.exp (radiusClock q XR r))*Real.sqrt (2*(XR*Real.exp (radiusClock q XR r)))* |
| 1010 | angularResidual F XR w.coefficients (radiusClock q XR r,η))*(2/r)) = |
| 1011 | -(r^2*(q^(-TerminalPressure.amplitudeExponent F.data.h-1)* |
| 1012 | angularResidual F XR w.coefficients (radiusClock q XR r,η))) |
| 1013 | rw [radiusClock,exp_regularClock hq w.radius_pos (by positivity : 0 < r^2/2), |
| 1014 | sqrt_radius_quotient hq hr,theta_power_identity hq F.data.h] |
| 1015 | field_simp [hq.ne',hr.ne',(Real.sqrt_pos.mpr hq).ne'] |
| 1016 | |
| 1017 | theorem physicalAxialWeight_hasDerivAt (F : Profile) {XR C t s z : ℝ} |
| 1018 | (w : CompensationWitness F XR C) (ht : t < 1) (hs : 0 < s) |
| 1019 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h (t,(s,z)) / |
| 1020 | OutgoingDilation.switchRadius F XR)+1/5) : |
| 1021 | HasDerivAt (physicalAxialWeight F XR w.coefficients t z) |
| 1022 | (-SimilarityProfile.partialZ (TerminalPressure.outgoingPressure (normalization F XR) F.data (shift F XR)) (t,(s,z))) s := by |
| 1023 | let q := SimilarityProfile.q F.data.h (t,(0,z)) |
| 1024 | let η := SimilarityProfile.eta F.data.h (t,(0,z)) |
| 1025 | have hq : 0 < q := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht |
| 1026 | have heta : η ∈ Ioo (-1) 1 := eta_mem_interior F.data.h_pos F.data.h_lt_half ht |
| 1027 | have hx : 0 < s/q := div_pos hs hq |
| 1028 | have hy : F.data.core.endpoint ≤ regularClock q XR s := |
| 1029 | (terminalStart_after_endpoint F).le.trans (full_switch_late F w.radius_pos hx hfull.le) |
| 1030 | have hd := ((axialWeight_hasDerivAt F w (p := (regularClock q XR s,η)) heta hy).comp s |
| 1031 | (regularClock_hasDerivAt hq w.radius_pos hs)).const_mul (q^(-TerminalPressure.amplitudeExponent F.data.h)) |
| 1032 | apply hd.congr_deriv |
| 1033 | rw [terminal_axialResidual F w ht hs hfull] |
| 1034 | change q^(-TerminalPressure.amplitudeExponent F.data.h)* |
| 1035 | ((-(XR*Real.exp (regularClock q XR s))*axialResidual F XR w.coefficients (regularClock q XR s,η))*(1/s)) = |
| 1036 | -(q^(-TerminalPressure.amplitudeExponent F.data.h-1)*axialResidual F XR w.coefficients (regularClock q XR s,η)) |
| 1037 | rw [exp_regularClock hq w.radius_pos hs,Real.rpow_sub_one hq.ne'] |
| 1038 | field_simp [hq.ne',hs.ne'] |
| 1039 | |
| 1040 | theorem physicalThetaWeight_tendsto_zero (F : Profile) {XR C t z : ℝ} |
| 1041 | (w : CompensationWitness F XR C) (ht : t < 1) : |
| 1042 | Tendsto (physicalThetaWeight F XR w.coefficients t z) atTop (𝓝 0) := by |
| 1043 | have hq := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half (p := (t,(0,z))) ht |
| 1044 | have heta := eta_mem_interior F.data.h_pos F.data.h_lt_half (p := (t,(0,z))) ht |
| 1045 | have h := ((thetaWeight_tendsto_zero F w heta).comp (radiusClock_tendsto hq w.radius_pos)).const_mul |
| 1046 | (SimilarityProfile.q F.data.h (t,(0,z))^(-F.data.h)) |
| 1047 | simp only [mul_zero] at h |
| 1048 | exact h |
| 1049 | |
| 1050 | theorem physicalAxialWeight_tendsto_zero (F : Profile) {XR C B t z : ℝ} |
| 1051 | (hF : OutgoingProfile.Specification F B) (w : CompensationWitness F XR C) (ht : t < 1) : |
| 1052 | Tendsto (physicalAxialWeight F XR w.coefficients t z) atTop (𝓝 0) := by |
| 1053 | have hq := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half (p := (t,(0,z))) ht |
| 1054 | have heta := eta_mem_interior F.data.h_pos F.data.h_lt_half (p := (t,(0,z))) ht |
| 1055 | have h := ((axialWeight_tendsto_zero F hF w heta).comp (regularClock_tendsto hq w.radius_pos)).const_mul |
| 1056 | (SimilarityProfile.q F.data.h (t,(0,z))^(-TerminalPressure.amplitudeExponent F.data.h)) |
| 1057 | simp only [mul_zero] at h |
| 1058 | exact h |
| 1059 | |
| 1060 | theorem terminal_angular_integrable (C : ℝ) (d : OutgoingTail.TailData) (y0 : ℝ) |
| 1061 | {t r z : ℝ} (ht : t < 1) (hr : 0 < r) : |
| 1062 | IntegrableOn (fun u => u^2*TerminalStress.leadingResidual C d.h |
| 1063 | (TerminalPressure.outgoingTaper d y0) t u z) (Ioi r) := by |
| 1064 | have hi := TerminalPressure.terminal_forcing_integrable C (z := z) d.h_pos d.h_lt_half ht hr |
| 1065 | (TerminalPressure.outgoingTaper_contDiff d y0) (TerminalPressure.outgoingTaper_plateau d y0) |
| 1066 | apply IntegrableOn.congr_fun (hi.2.2.add hi.1) _ measurableSet_Ioi |
| 1067 | intro u hu |
| 1068 | dsimp only |
| 1069 | rw [TerminalStress.leadingResidual_eq_time_add,mul_add] |
| 1070 | rfl |
| 1071 | |
| 1072 | theorem terminal_axial_integrable {C : ℝ} (hC : 0 < C) (d : OutgoingTail.TailData) (y0 : ℝ) |
| 1073 | {t s z : ℝ} (ht : t < 1) (hs : 0 < s) : |
| 1074 | IntegrableOn (fun u => SimilarityProfile.partialZ |
| 1075 | (TerminalPressure.outgoingPressure C d y0) (t,(u,z))) (Ioi s) := by |
| 1076 | have hr : 0 < Real.sqrt (2*s) := Real.sqrt_pos.mpr (by positivity) |
| 1077 | have hev := (TerminalStress.logX_radial_tendsto (z := z) d.h_pos d.h_lt_half ht).eventually |
| 1078 | (eventually_ge_atTop (y0+3)) |
| 1079 | obtain ⟨R,hY,hR⟩ := (hev.and (eventually_ge_atTop (Real.sqrt (2*s)))).exists |
| 1080 | have hi := (TerminalPressure.axialBackwardStress_bound hC d.h_pos d.h_lt_half ht hr hR |
| 1081 | (TerminalPressure.outgoingTaper_contDiff d y0) (TerminalPressure.outgoingTaper_bounds d y0) |
| 1082 | (TerminalPressure.outgoingTaper_deriv_nonneg d y0) (TerminalPressure.outgoingTaper_plateau d y0) hY).1 |
| 1083 | simpa only [TerminalPressure.outgoingPressure,Real.sq_sqrt (by positivity : 0 ≤ 2*s), |
| 1084 | mul_div_cancel_left₀ s (by norm_num : (2:ℝ)≠0)] using hi |
| 1085 | |
| 1086 | theorem physicalThetaWeight_eq_tail (F : Profile) {XR C t r z : ℝ} |
| 1087 | (w : CompensationWitness F XR C) (ht : t < 1) (hr : 0 < r) |
| 1088 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h (TerminalStress.radiusPoint t r z) / |
| 1089 | OutgoingDilation.switchRadius F XR)+1/5) : |
| 1090 | physicalThetaWeight F XR w.coefficients t z r = |
| 1091 | ∫ u in Ioi r, u^2*TerminalStress.leadingResidual (normalization F XR) F.data.h |
| 1092 | (TerminalPressure.outgoingTaper F.data (shift F XR)) t u z := by |
| 1093 | have hd : ∀ u ∈ Ici r, HasDerivAt (physicalThetaWeight F XR w.coefficients t z) |
| 1094 | (-(u^2*TerminalStress.leadingResidual (normalization F XR) F.data.h |
| 1095 | (TerminalPressure.outgoingTaper F.data (shift F XR)) t u z)) u := by |
| 1096 | intro u hu |
| 1097 | change r ≤ u at hu |
| 1098 | apply physicalThetaWeight_hasDerivAt F w ht (hr.trans_le hu) |
| 1099 | have hh := full_switch_radial_strict w.radius_pos ht |
| 1100 | (show 0 < (TerminalStress.radiusPoint t r z).2.1 by dsimp [TerminalStress.radiusPoint]; positivity) |
| 1101 | hfull (u := u^2/2) (by dsimp [TerminalStress.radiusPoint]; nlinarith) |
| 1102 | exact hh |
| 1103 | have hi := terminal_angular_integrable (normalization F XR) F.data (shift F XR) (z := z) ht hr |
| 1104 | have hh := integral_Ioi_of_hasDerivAt_of_tendsto' hd hi.neg (physicalThetaWeight_tendsto_zero F w ht) |
| 1105 | rw [integral_neg] at hh |
| 1106 | linarith |
| 1107 | |
| 1108 | theorem physicalAxialWeight_eq_tail (F : Profile) {XR C B t s z : ℝ} |
| 1109 | (hF : OutgoingProfile.Specification F B) (w : CompensationWitness F XR C) |
| 1110 | (ht : t < 1) (hs : 0 < s) |
| 1111 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h (t,(s,z)) / |
| 1112 | OutgoingDilation.switchRadius F XR)+1/5) : |
| 1113 | physicalAxialWeight F XR w.coefficients t z s = |
| 1114 | ∫ u in Ioi s, SimilarityProfile.partialZ |
| 1115 | (TerminalPressure.outgoingPressure (normalization F XR) F.data (shift F XR)) (t,(u,z)) := by |
| 1116 | have hd : ∀ u ∈ Ici s, HasDerivAt (physicalAxialWeight F XR w.coefficients t z) |
| 1117 | (-SimilarityProfile.partialZ |
| 1118 | (TerminalPressure.outgoingPressure (normalization F XR) F.data (shift F XR)) (t,(u,z))) u := by |
| 1119 | intro u hu |
| 1120 | exact physicalAxialWeight_hasDerivAt F w ht (hs.trans_le hu) |
| 1121 | (full_switch_radial_strict w.radius_pos ht hs hfull hu) |
| 1122 | have hC : 0 < normalization F XR := TerminalCone.normalization_pos F w.radius_pos |
| 1123 | have hi := terminal_axial_integrable hC F.data (shift F XR) (z := z) ht hs |
| 1124 | have hh := integral_Ioi_of_hasDerivAt_of_tendsto' hd hi.neg (physicalAxialWeight_tendsto_zero F hF w ht) |
| 1125 | rw [integral_neg] at hh |
| 1126 | linarith |
| 1127 | |
| 1128 | /-- The actual forward angular stress equals the independently defined |
| 1129 | backward physical stress. Its similarity factor is `q^(-A-1/2)`. -/ |
| 1130 | theorem physical_forwardTheta_eq_terminal (F : Profile) {XR C t r z : ℝ} |
| 1131 | (w : CompensationWitness F XR C) (ht : t < 1) (hr : 0 < r) |
| 1132 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h (TerminalStress.radiusPoint t r z) / |
| 1133 | OutgoingDilation.switchRadius F XR)+1/5) : |
| 1134 | SimilarityProfile.q F.data.h (TerminalStress.radiusPoint t r z)^(-TerminalPressure.amplitudeExponent F.data.h-1/2) * |
| 1135 | forwardTheta F XR w.coefficients (logPoint XR (SimilarityProfile.inner F.data.h (TerminalStress.radiusPoint t r z))) = |
| 1136 | TerminalStress.terminalStress (normalization F XR) F.data.h |
| 1137 | (TerminalPressure.outgoingTaper F.data (shift F XR)) t z r := by |
| 1138 | let q := SimilarityProfile.q F.data.h (t,(0,z)) |
| 1139 | let η := SimilarityProfile.eta F.data.h (t,(0,z)) |
| 1140 | have hq : 0 < q := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht |
| 1141 | have heta : η ∈ Ioo (-1) 1 := eta_mem_interior F.data.h_pos F.data.h_lt_half ht |
| 1142 | have hx : 0 < r^2/2/q := div_pos (by positivity) hq |
| 1143 | have hy : F.data.core.endpoint ≤ radiusClock q XR r := |
| 1144 | (terminalStart_after_endpoint F).le.trans (full_switch_late F w.radius_pos hx hfull.le) |
| 1145 | have hw := thetaWeight_eq_forward F w (p := (radiusClock q XR r,η)) heta hy |
| 1146 | have he := physicalThetaWeight_eq_tail F w ht hr hfull |
| 1147 | change q^(-F.data.h)*thetaWeight F XR w.coefficients (radiusClock q XR r,η) = _ at he |
| 1148 | unfold TerminalStress.terminalStress TerminalStress.backwardStress |
| 1149 | rw [← he,hw] |
| 1150 | change q^(-TerminalPressure.amplitudeExponent F.data.h-1/2)* |
| 1151 | forwardTheta F XR w.coefficients (radiusClock q XR r,η) = |
| 1152 | q^(-F.data.h)*(2*(XR*Real.exp (radiusClock q XR r))*forwardTheta F XR w.coefficients (radiusClock q XR r,η))/r^2 |
| 1153 | rw [show -TerminalPressure.amplitudeExponent F.data.h-1/2=-F.data.h-1 by |
| 1154 | unfold TerminalPressure.amplitudeExponent |
| 1155 | ring,Real.rpow_sub_one hq.ne',radiusClock,exp_regularClock hq w.radius_pos (by positivity : 0 < r^2/2)] |
| 1156 | field_simp [hq.ne',hr.ne'] |
| 1157 | |
| 1158 | /-- The same witness and the original zero-energy identity also fix the |
| 1159 | axial integration constant; the pressure is the actual canonical pressure. -/ |
| 1160 | theorem physical_forwardAxial_eq_terminal (F : Profile) {XR C B t r z : ℝ} |
| 1161 | (hF : OutgoingProfile.Specification F B) (w : CompensationWitness F XR C) (ht : t < 1) (hr : 0 < r) |
| 1162 | (hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h (TerminalStress.radiusPoint t r z) / |
| 1163 | OutgoingDilation.switchRadius F XR)+1/5) : |
| 1164 | SimilarityProfile.q F.data.h (TerminalStress.radiusPoint t r z)^(-TerminalPressure.amplitudeExponent F.data.h-1/2) * |
| 1165 | forwardAxial F XR w.coefficients (logPoint XR (SimilarityProfile.inner F.data.h (TerminalStress.radiusPoint t r z))) = |
| 1166 | TerminalPressure.axialBackwardStress (normalization F XR) F.data.h |
| 1167 | (TerminalPressure.outgoingTaper F.data (shift F XR)) t z r := by |
| 1168 | let q := SimilarityProfile.q F.data.h (t,(0,z)) |
| 1169 | let η := SimilarityProfile.eta F.data.h (t,(0,z)) |
| 1170 | have hq : 0 < q := SimilarityProfile.q_pos F.data.h_pos F.data.h_lt_half ht |
| 1171 | have hx : 0 < r^2/2/q := div_pos (by positivity) hq |
| 1172 | have hy : F.data.core.endpoint ≤ radiusClock q XR r := |
| 1173 | (terminalStart_after_endpoint F).le.trans (full_switch_late F w.radius_pos hx hfull.le) |
| 1174 | have hw := axialWeight_eq_forward F w (p := (radiusClock q XR r,η)) hy |
| 1175 | have he := physicalAxialWeight_eq_tail F hF w ht (by positivity : 0 < r^2/2) hfull |
| 1176 | change q^(-TerminalPressure.amplitudeExponent F.data.h)*axialWeight F XR w.coefficients (radiusClock q XR r,η) = _ at he |
| 1177 | unfold TerminalPressure.axialBackwardStress |
| 1178 | change _ = (∫ u in Ioi (r^2/2), SimilarityProfile.partialZ |
| 1179 | (TerminalPressure.outgoingPressure (normalization F XR) F.data (shift F XR)) (t,(u,z)))/r |
| 1180 | rw [← he,hw] |
| 1181 | change q^(-TerminalPressure.amplitudeExponent F.data.h-1/2)* |
| 1182 | forwardAxial F XR w.coefficients (radiusClock q XR r,η) = |
| 1183 | q^(-TerminalPressure.amplitudeExponent F.data.h)* |
| 1184 | (Real.sqrt (2*XR*Real.exp (radiusClock q XR r))*forwardAxial F XR w.coefficients (radiusClock q XR r,η))/r |
| 1185 | rw [show 2*XR*Real.exp (radiusClock q XR r)=2*(XR*Real.exp (radiusClock q XR r)) by ring, |
| 1186 | radiusClock,exp_regularClock hq w.radius_pos (by positivity : 0 < r^2/2),sqrt_radius_quotient hq hr, |
| 1187 | Real.rpow_sub hq,← Real.sqrt_eq_rpow] |
| 1188 | field_simp [hr.ne',(Real.sqrt_pos.mpr hq).ne'] |
| 1189 | |
| 1190 | theorem normalized_inner (F : Profile) {XR : ℝ} (hXR : 0 < XR) (y : ℝ) |
| 1191 | {η : ℝ} (hη : η^2 < 1) : |
| 1192 | SimilarityProfile.q F.data.h (TerminalStress.radiusPoint (η^2) |
| 1193 | (TerminalEdgeFactor.profileRadius (shift F XR) (TerminalCone.edgeDistance F y)) η) = 1 ∧ |
| 1194 | SimilarityProfile.inner F.data.h (TerminalStress.radiusPoint (η^2) |
| 1195 | (TerminalEdgeFactor.profileRadius (shift F XR) (TerminalCone.edgeDistance F y)) η) = (XR*Real.exp y,η) := by |
| 1196 | let r := TerminalEdgeFactor.profileRadius (shift F XR) (TerminalCone.edgeDistance F y) |
| 1197 | have hq : SimilarityProfile.q F.data.h (TerminalStress.radiusPoint (η^2) r η) = 1 := |
| 1198 | PhysicalHeatCoordinates.q_normalizedSection F.data.h_pos F.data.h_lt_half hη (r^2/2) |
| 1199 | have he : SimilarityProfile.eta F.data.h (TerminalStress.radiusPoint (η^2) r η) = η := |
| 1200 | PhysicalHeatCoordinates.eta_normalizedSection F.data.h_pos F.data.h_lt_half hη (r^2/2) |
| 1201 | refine ⟨hq,?_⟩ |
| 1202 | change (SimilarityProfile.X F.data.h (TerminalStress.radiusPoint (η^2) r η), |
| 1203 | SimilarityProfile.eta F.data.h (TerminalStress.radiusPoint (η^2) r η)) = _ |
| 1204 | rw [he] |
| 1205 | unfold SimilarityProfile.X |
| 1206 | rw [hq,div_one] |
| 1207 | change (r^2/2,η) = _ |
| 1208 | have hr2 : r^2 = 2*(XR*Real.exp y) := by |
| 1209 | rw [TerminalEdgeFactor.profileRadius_square] |
| 1210 | change 2*TerminalEdgeFactor.profileS (TerminalCone.shift F XR) (TerminalCone.edgeDistance F y) = _ |
| 1211 | rw [TerminalCone.profileS_clock F hXR] |
| 1212 | rw [hr2] |
| 1213 | congr 1 |
| 1214 | ring |
| 1215 | |
| 1216 | /-- Exact profile stress agreement on the open parameter interval. The |
| 1217 | closed endpoints are handled below by the actual continuous representatives. -/ |
| 1218 | theorem forward_stresses_eq_profile_interior (F : Profile) {XR C B y η : ℝ} |
| 1219 | (hF : OutgoingProfile.Specification F B) (w : CompensationWitness F XR C) |
| 1220 | (hy : TerminalCone.terminalStart F.data < y) (hη : η ∈ Ioo (-1) 1) : |
| 1221 | forwardTheta F XR w.coefficients (y,η) = |
| 1222 | TerminalEdgeFactor.profileAngularStress (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) ∧ |
| 1223 | forwardAxial F XR w.coefficients (y,η) = |
| 1224 | TerminalEdgeFactor.profileAxialStress (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) := by |
| 1225 | have he2 : η^2 < 1 := TerminalCone.eta_sq_lt_one hη |
| 1226 | let r := TerminalEdgeFactor.profileRadius (shift F XR) (TerminalCone.edgeDistance F y) |
| 1227 | have hr : 0 < r := TerminalEdgeFactor.profileRadius_pos _ _ |
| 1228 | have hn := normalized_inner F w.radius_pos y he2 |
| 1229 | have hfull : 1/2 < Real.log (SimilarityProfile.X F.data.h (TerminalStress.radiusPoint (η^2) r η)/ |
| 1230 | OutgoingDilation.switchRadius F XR)+1/5 := by |
| 1231 | have hx := congrArg Prod.fst hn.2 |
| 1232 | change SimilarityProfile.X F.data.h (TerminalStress.radiusPoint (η^2) r η) = XR*Real.exp y at hx |
| 1233 | rw [hx,TerminalCone.tailTime_clock F w.radius_pos y] |
| 1234 | unfold TerminalCone.terminalStart at hy |
| 1235 | linarith |
| 1236 | have ht := physical_forwardTheta_eq_terminal F w he2 hr hfull |
| 1237 | have hz := physical_forwardAxial_eq_terminal F hF w he2 hr hfull |
| 1238 | rw [hn.1,hn.2,logPoint_radius w.radius_pos,Real.one_rpow,one_mul, |
| 1239 | TerminalCone.normalized_angularStress _ F.data _ _ he2] at ht |
| 1240 | rw [hn.1,hn.2,logPoint_radius w.radius_pos,Real.one_rpow,one_mul, |
| 1241 | TerminalCone.normalized_axialStress _ F.data _ _ he2] at hz |
| 1242 | exact ⟨ht,hz⟩ |
| 1243 | |
| 1244 | noncomputable def closedLogDomain : Set (ℝ × ℝ) := univ ×ˢ HeatedOutgoing.parameterDomain |
| 1245 | |
| 1246 | theorem controls_continuousOn (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) : |
| 1247 | ContinuousOn (HeatSwitchCone.controls F w) HeatedOutgoing.parameterDomain := by |
| 1248 | have hd := w.smooth.continuousOn_derivWithin (uniqueDiffOn_Icc (by norm_num : (-1:ℝ)<1)) |
| 1249 | (by exact WithTop.coe_le_coe.mpr le_top) |
| 1250 | exact continuousOn_const.prodMk (w.smooth.continuousOn.prodMk hd) |
| 1251 | |
| 1252 | theorem scalar_fields_continuousOn (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) : |
| 1253 | ContinuousOn (logE F XR w.coefficients) closedLogDomain ∧ |
| 1254 | ContinuousOn (HeatSwitchCone.Qs F XR w.coefficients) closedLogDomain ∧ |
| 1255 | ContinuousOn (HeatSwitchCone.Ns F XR w.coefficients) closedLogDomain ∧ |
| 1256 | ContinuousOn (HeatSwitchCone.radialA F XR w.coefficients) closedLogDomain := by |
| 1257 | let G : (ℝ × ℝ) → HeatSwitchCone.Control × (ℝ × ℝ) := fun p => (HeatSwitchCone.controls F w p.2,p) |
| 1258 | have hc : ContinuousOn G closedLogDomain := |
| 1259 | ((controls_continuousOn F w).comp continuousOn_snd (fun _ hp => hp.2)).prodMk continuousOn_id |
| 1260 | have he : ContinuousOn (fun p => HeatSwitchCone.value (HeatSwitchCone.freeE F) (G p)) closedLogDomain := |
| 1261 | (HeatSwitchCone.value_contDiff (HeatSwitchCone.freeE_contDiff F)).continuous.comp_continuousOn hc |
| 1262 | have heq (p : ℝ × ℝ) (hp : p ∈ closedLogDomain) : |
| 1263 | logE F XR w.coefficients p = HeatSwitchCone.value (HeatSwitchCone.freeE F) (G p) := |
| 1264 | HeatSwitchCone.logE_eq_realize F XR w.coefficients w.radius_pos p hp.2 |
| 1265 | have hen (p : ℝ × ℝ) (hp : p ∈ closedLogDomain) : |
| 1266 | HeatSwitchCone.value (HeatSwitchCone.freeE F) (G p) ≠ 0 := by |
| 1267 | rw [← heq p hp] |
| 1268 | exact (w.positive p.2 (XR*Real.exp p.1) hp.2 (mul_pos w.radius_pos (Real.exp_pos _))).ne' |
| 1269 | have hq : ContinuousOn (fun p => HeatSwitchCone.familyQ F (G p)) closedLogDomain := |
| 1270 | ((HeatSwitchCone.angularNumerator_contDiff F).continuous.comp_continuousOn hc).div |
| 1271 | (((continuousOn_const.mul continuousOn_fst).div_const 2).rexp.mul he) |
| 1272 | (fun p hp => mul_ne_zero (Real.exp_ne_zero _) (hen p hp)) |
| 1273 | have hn : ContinuousOn (fun p => HeatSwitchCone.familyN F (G p)) closedLogDomain := |
| 1274 | (HeatSwitchCone.familyN_contDiff F).continuous.comp_continuousOn hc |
| 1275 | have ha : ContinuousOn (fun p => HeatSwitchCone.familyA F (G p)) closedLogDomain := |
| 1276 | ((HeatSwitchCone.radialNumerator_contDiff F).continuous.comp_continuousOn hc).div he hen |
| 1277 | exact ⟨he.congr heq,hq.congr (fun p hp => HeatSwitchCone.Qs_eq_family F w hp.2), |
| 1278 | hn.congr (fun p hp => HeatSwitchCone.Ns_eq_family F w hp.2), |
| 1279 | ha.congr (fun p hp => HeatSwitchCone.radialA_eq_family F w hp.2)⟩ |
| 1280 | |
| 1281 | theorem forward_fields_continuousOn (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) : |
| 1282 | ContinuousOn (forwardTheta F XR w.coefficients) closedLogDomain ∧ |
| 1283 | ContinuousOn (forwardAxial F XR w.coefficients) closedLogDomain := by |
| 1284 | obtain ⟨he,hq,hn,ha⟩ := scalar_fields_continuousOn F w |
| 1285 | have hx : ContinuousOn (fun p : ℝ × ℝ => XR*Real.exp p.1) closedLogDomain := |
| 1286 | continuousOn_const.mul continuousOn_fst.rexp |
| 1287 | have hr : ContinuousOn (fun p : ℝ × ℝ => Real.sqrt (2*XR*Real.exp p.1)) closedLogDomain := |
| 1288 | ((continuousOn_const.mul continuousOn_const).mul continuousOn_fst.rexp).sqrt |
| 1289 | have hrn (p : ℝ × ℝ) : Real.sqrt (2*XR*Real.exp p.1) ≠ 0 := |
| 1290 | (Real.sqrt_pos.mpr (mul_pos (mul_pos (by norm_num) w.radius_pos) (Real.exp_pos _))).ne' |
| 1291 | have hl : ContinuousOn (fun p : ℝ × ℝ => CoordinateAlgebra.L F.data.h p.2) closedLogDomain := |
| 1292 | continuousOn_const.sub (continuousOn_const.mul (continuousOn_snd.pow 2)) |
| 1293 | have hln (p : ℝ × ℝ) (hp : p ∈ closedLogDomain) : CoordinateAlgebra.L F.data.h p.2 ≠ 0 := |
| 1294 | (CoordinateAlgebra.L_pos F.data.h_pos.le F.data.h_lt_half (TerminalEdgeFactor.eta_sq_le_one hp.2)).ne' |
| 1295 | exact ⟨(he.div hr (fun p _ => hrn p)).mul (((hx.mul hq).div hl hln).sub ha), |
| 1296 | (hx.mul hn).div (hl.mul hr) (fun p hp => mul_ne_zero (hln p hp) (hrn p))⟩ |
| 1297 | |
| 1298 | noncomputable def terminalMap (F : Profile) (p : ℝ × ℝ) : ℝ × ℝ := (p.2,OutgoingTail.tailEnd F.data-p.1) |
| 1299 | |
| 1300 | theorem terminalMap_continuous (F : Profile) : Continuous (terminalMap F) := |
| 1301 | continuous_snd.prodMk (continuous_const.sub continuous_fst) |
| 1302 | |
| 1303 | theorem terminal_speed_continuousOn (F : Profile) {XR C : ℝ} (w : CompensationWitness F XR C) : |
| 1304 | ContinuousOn (fun p => TerminalEdgeFactor.profileSpeed (normalization F XR) F.data (shift F XR) (terminalMap F p)) |
| 1305 | closedLogDomain := by |
| 1306 | apply (TerminalEdgeFactor.profileSpeed_contDiffOn (normalization F XR) F.data (shift F XR)).continuousOn.comp |
| 1307 | (terminalMap_continuous F).continuousOn |
| 1308 | intro p hp |
| 1309 | exact TerminalEdgeFactor.profileDomain_contains_closed (TerminalCone.normalization_pos F w.radius_pos) |
| 1310 | F.data (shift F XR) ⟨hp.2,mem_univ _⟩ |
| 1311 | |
| 1312 | /-- Joint closure in log radius and parameter includes the switch-attachment |
| 1313 | point and both parameter endpoints, without evaluating physical coordinates |
| 1314 | at the singular time `t=1`. -/ |
| 1315 | theorem forward_stresses_eq_profile (F : Profile) {XR C B y η : ℝ} |
| 1316 | (hF : OutgoingProfile.Specification F B) (w : CompensationWitness F XR C) |
| 1317 | (hy : TerminalCone.terminalStart F.data ≤ y) (hη : η ∈ HeatedOutgoing.parameterDomain) : |
| 1318 | forwardTheta F XR w.coefficients (y,η) = |
| 1319 | TerminalEdgeFactor.profileAngularStress (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) ∧ |
| 1320 | forwardAxial F XR w.coefficients (y,η) = |
| 1321 | TerminalEdgeFactor.profileAxialStress (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) ∧ |
| 1322 | HeatSwitchCone.radialA F XR w.coefficients (y,η) = |
| 1323 | TerminalEdgeFactor.profileSpeed (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) := by |
| 1324 | let S : Set (ℝ × ℝ) := Ioi (TerminalCone.terminalStart F.data) ×ˢ Ioo (-1) 1 |
| 1325 | let T : Set (ℝ × ℝ) := Ici (TerminalCone.terminalStart F.data) ×ˢ HeatedOutgoing.parameterDomain |
| 1326 | have hST : S ⊆ T := by |
| 1327 | intro p hp |
| 1328 | change TerminalCone.terminalStart F.data < p.1 ∧ -1 < p.2 ∧ p.2 < 1 at hp |
| 1329 | change TerminalCone.terminalStart F.data ≤ p.1 ∧ -1 ≤ p.2 ∧ p.2 ≤ 1 |
| 1330 | exact ⟨hp.1.le,hp.2.1.le,hp.2.2.le⟩ |
| 1331 | have hTc : T ⊆ closedLogDomain := fun p hp => ⟨mem_univ _,hp.2⟩ |
| 1332 | have hTS : T ⊆ closure S := by |
| 1333 | simp only [S,T,HeatedOutgoing.parameterDomain,closure_prod_eq,closure_Ioi, |
| 1334 | closure_Ioo (by norm_num : (-1:ℝ)≠1),subset_refl] |
| 1335 | have hs := (TerminalEdgeFactor.profileStress_contDiff (normalization F XR) F.data (shift F XR)).continuous.comp |
| 1336 | (terminalMap_continuous F) |
| 1337 | have heΘ : EqOn (forwardTheta F XR w.coefficients) |
| 1338 | (fun p => TerminalEdgeFactor.profileAngularStress (normalization F XR) F.data (shift F XR) (terminalMap F p)) S := by |
| 1339 | intro p hp |
| 1340 | exact (forward_stresses_eq_profile_interior F hF w hp.1 hp.2).1 |
| 1341 | have heZ : EqOn (forwardAxial F XR w.coefficients) |
| 1342 | (fun p => TerminalEdgeFactor.profileAxialStress (normalization F XR) F.data (shift F XR) (terminalMap F p)) S := by |
| 1343 | intro p hp |
| 1344 | exact (forward_stresses_eq_profile_interior F hF w hp.1 hp.2).2 |
| 1345 | have heA : EqOn (HeatSwitchCone.radialA F XR w.coefficients) |
| 1346 | (fun p => TerminalEdgeFactor.profileSpeed (normalization F XR) F.data (shift F XR) (terminalMap F p)) S := by |
| 1347 | intro p hp |
| 1348 | exact radialA_eq_profileSpeed F w hp.1 ⟨hp.2.1.le,hp.2.2.le⟩ |
| 1349 | have hΘ := heΘ.of_subset_closure ((forward_fields_continuousOn F w).1.mono hTc) hs.fst.continuousOn hST hTS |
| 1350 | have hZ := heZ.of_subset_closure ((forward_fields_continuousOn F w).2.mono hTc) hs.snd.continuousOn hST hTS |
| 1351 | have hA := heA.of_subset_closure ((scalar_fields_continuousOn F w).2.2.2.mono hTc) |
| 1352 | ((terminal_speed_continuousOn F w).mono hTc) hST hTS |
| 1353 | exact ⟨hΘ (show (y,η) ∈ T from ⟨hy,hη⟩), |
| 1354 | hZ (show (y,η) ∈ T from ⟨hy,hη⟩),hA (show (y,η) ∈ T from ⟨hy,hη⟩)⟩ |
| 1355 | |
| 1356 | theorem logSwirl_eq_profile (F : Profile) {XR C y η : ℝ} (w : CompensationWitness F XR C) |
| 1357 | (hy : TerminalCone.terminalStart F.data ≤ y) (hη : η ∈ HeatedOutgoing.parameterDomain) : |
| 1358 | logE F XR w.coefficients (y,η)/Real.sqrt (2*XR*Real.exp y) = |
| 1359 | TerminalEdgeFactor.profileSwirlCoefficient (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) := by |
| 1360 | have he := TerminalCone.E_eq_profileAngularVelocity F w.coefficients w.radius_pos hy hη |
| 1361 | have hr : Real.sqrt (2*XR*Real.exp y) = |
| 1362 | TerminalEdgeFactor.profileRadius (shift F XR) (TerminalCone.edgeDistance F y) := by |
| 1363 | have hs := TerminalEdgeFactor.profileRadius_square (shift F XR) (TerminalCone.edgeDistance F y) |
| 1364 | change TerminalEdgeFactor.profileRadius (TerminalCone.shift F XR) (TerminalCone.edgeDistance F y)^2 = |
| 1365 | 2*TerminalEdgeFactor.profileS (TerminalCone.shift F XR) (TerminalCone.edgeDistance F y) at hs |
| 1366 | rw [TerminalCone.profileS_clock F w.radius_pos] at hs |
| 1367 | rw [show 2*XR*Real.exp y=2*(XR*Real.exp y) by ring,← hs, |
| 1368 | Real.sqrt_sq (TerminalEdgeFactor.profileRadius_pos _ _).le] |
| 1369 | rfl |
| 1370 | rw [hr] |
| 1371 | exact congrArg (fun a => a/TerminalEdgeFactor.profileRadius (shift F XR) (TerminalCone.edgeDistance F y)) he |
| 1372 | |
| 1373 | theorem normalP_eq_profile (F : Profile) {XR C B y η : ℝ} |
| 1374 | (hF : OutgoingProfile.Specification F B) (w : CompensationWitness F XR C) |
| 1375 | (hy : TerminalCone.terminalStart F.data ≤ y) (hη : η ∈ HeatedOutgoing.parameterDomain) : |
| 1376 | HeatSwitchCone.normalP F XR w.coefficients (y,η) = |
| 1377 | TerminalEdgeFactor.profileP (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) := by |
| 1378 | have hafter := (terminalStart_after_endpoint F).trans_le hy |
| 1379 | have he := forward_stresses_eq_profile F hF w hy hη |
| 1380 | have hsw := logSwirl_eq_profile F w hy hη |
| 1381 | have hE : logE F XR w.coefficients (y,η)/Real.sqrt (2*XR*Real.exp y) ≠ 0 := by |
| 1382 | rw [hsw] |
| 1383 | exact (TerminalEdgeFactor.profileSwirlCoefficient_pos (TerminalCone.normalization_pos F w.radius_pos) |
| 1384 | F.data (shift F XR) (y := TerminalCone.profilePoint F y η) hη).ne' |
| 1385 | simp only [HeatSwitchCone.normalP,HeatSwitchCone.sourceC, |
| 1386 | radialB_after_endpoint F XR w.coefficients (p := (y,η)) hafter, |
| 1387 | zero_mul,zero_div,sub_zero,mul_one] |
| 1388 | rw [TerminalEdgeFactor.profileP,← he.2.2,← he.1,← hsw] |
| 1389 | change HeatSwitchCone.stressScale F XR w.coefficients (y,η) = _ |
| 1390 | unfold forwardTheta |
| 1391 | dsimp only |
| 1392 | rw [mul_div_cancel_left₀ _ hE] |
| 1393 | unfold HeatSwitchCone.stressScale |
| 1394 | ring |
| 1395 | |
| 1396 | theorem terminal_forward_cone (F : Profile) {XR C B y η : ℝ} |
| 1397 | (hF : OutgoingProfile.Specification F B) (w : CompensationWitness F XR C) |
| 1398 | (hsmall : TerminalCone.SmallTail F.data) (hXR : TerminalCone.radiusThreshold F ≤ XR) |
| 1399 | (hy : TerminalCone.terminalStart F.data ≤ y) (hy' : y < OutgoingTail.tailEnd F.data) |
| 1400 | (hη : η ∈ HeatedOutgoing.parameterDomain) : |
| 1401 | HeatSwitchCone.TrueAt F XR w.coefficients (y,η) ∧ |
| 1402 | HeatSwitchCone.normalP F XR w.coefficients (y,η) = |
| 1403 | TerminalEdgeFactor.profileP (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) ∧ |
| 1404 | HeatSwitchCone.normalJ F XR w.coefficients (y,η) = |
| 1405 | TerminalEdgeFactor.profileJ (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) := by |
| 1406 | have hafter := (terminalStart_after_endpoint F).trans_le hy |
| 1407 | have hB := radialB_after_endpoint F XR w.coefficients (p := (y,η)) hafter |
| 1408 | have he := forward_stresses_eq_profile F hF w hy hη |
| 1409 | have hP := normalP_eq_profile F hF w hy hη |
| 1410 | have htrue := TerminalCone.full_interval_true_cone F hsmall hXR hy hy' hη |
| 1411 | have hspeed := (TerminalCone.full_interval_direction_margin F hsmall hXR hy hy'.le hη).1 |
| 1412 | change 2+F.data.h < TerminalEdgeFactor.profileSpeed (normalization F XR) F.data (shift F XR) |
| 1413 | (TerminalCone.profilePoint F y η) at hspeed |
| 1414 | have hP2 : 2 < HeatSwitchCone.normalP F XR w.coefficients (y,η) := by rw [hP]; exact htrue.1 |
| 1415 | have hscale : HeatSwitchCone.normalP F XR w.coefficients (y,η) = |
| 1416 | XR*Real.exp y*HeatSwitchCone.Qs F XR w.coefficients (y,η)/CoordinateAlgebra.L F.data.h η := by |
| 1417 | simp only [HeatSwitchCone.normalP,HeatSwitchCone.sourceC,hB,zero_mul,zero_div,sub_zero,mul_one, |
| 1418 | HeatSwitchCone.stressScale] |
| 1419 | have hL : 0 < CoordinateAlgebra.L F.data.h η := |
| 1420 | CoordinateAlgebra.L_pos F.data.h_pos.le F.data.h_lt_half (TerminalEdgeFactor.eta_sq_le_one hη) |
| 1421 | have hQ : 0 < HeatSwitchCone.Qs F XR w.coefficients (y,η) := by |
| 1422 | have hp0 : 0 < XR*Real.exp y*HeatSwitchCone.Qs F XR w.coefficients (y,η)/CoordinateAlgebra.L F.data.h η := by |
| 1423 | rw [← hscale] |
| 1424 | linarith |
| 1425 | exact (mul_pos_iff_of_pos_left (mul_pos w.radius_pos (Real.exp_pos y))).mp |
| 1426 | ((div_pos_iff_of_pos_right hL).mp hp0) |
| 1427 | have hJ := (forward_normalization F w (p := (y,η)) hafter hη hQ.ne').2 |
| 1428 | rw [he.2.1,logSwirl_eq_profile F w hy hη] at hJ |
| 1429 | have hJ' : HeatSwitchCone.normalJ F XR w.coefficients (y,η) = |
| 1430 | TerminalEdgeFactor.profileJ (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) := hJ |
| 1431 | have hV : HeatSwitchCone.normalV F XR w.coefficients (y,η) = |
| 1432 | TerminalEdgeFactor.profileSpeed (normalization F XR) F.data (shift F XR) (TerminalCone.profilePoint F y η) := by |
| 1433 | simp only [HeatSwitchCone.normalV,hB,zero_div,zero_pow (by decide : (2:ℕ)≠0),add_zero,mul_one] |
| 1434 | exact he.2.2 |
| 1435 | have ha2 : 2 < HeatSwitchCone.radialA F XR w.coefficients (y,η) := by |
| 1436 | rw [he.2.2] |
| 1437 | linarith [F.data.h_pos] |
| 1438 | refine ⟨?_,hP,hJ'⟩ |
| 1439 | unfold HeatSwitchCone.TrueAt |
| 1440 | refine ⟨hQ,by linarith,?_,hP2,?_⟩ |
| 1441 | · rw [hV] |
| 1442 | linarith [F.data.h_pos] |
| 1443 | · rw [hV,hP,hJ'] |
| 1444 | exact htrue.2 |
| 1445 | |
| 1446 | |
| 1447 | end NavierStokes.TerminalHistoryBridge |
| 1448 | |
| 1449 | end |