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.NominalProfile |
| 2 | import NavierStokes.MatchingDebtBounds |
| 3 | import NavierStokes.OutgoingCone |
| 4 | import NavierStokes.HeatSwitchCone |
| 5 | import NavierStokes.TerminalHistoryBridge |
| 6 | import NavierStokes.TrueConeLoop |
| 7 | import NavierStokes.ModulatedCone |
| 8 | import NavierStokes.MatchingConeBounds |
| 9 | import NavierStokes.PreparedOutgoing |
| 10 | import NavierStokes.RepairConeBounds |
| 11 | |
| 12 | /-! |
| 13 | # Cone coordinates of one actual nominal profile |
| 14 | |
| 15 | The physical coordinates below are computed from the genuine smooth profile |
| 16 | and its axis-integrated histories. The outgoing convention for axial shear |
| 17 | has the opposite sign to the signed shear used by the modulation theorem. |
| 18 | -/ |
| 19 | |
| 20 | noncomputable section |
| 21 | |
| 22 | open Set Filter Function MeasureTheory |
| 23 | open scoped Topology ContDiff |
| 24 | open NavierStokes.ProfileHistories |
| 25 | open NavierStokes.OutgoingProfile |
| 26 | open NavierStokes.NominalProfile (AxisStage Controls SmallDebt) |
| 27 | open NavierStokes.StressActivation |
| 28 | |
| 29 | namespace NavierStokes.NominalConeAssembly |
| 30 | |
| 31 | noncomputable def IsTrue {D : RadialDomain} (P : Profiles D) (h : ℝ) (p : Point) : Prop := |
| 32 | ActivationContinuation.IsRelaxed P h p ∧ |
| 33 | 2 < ActivationContinuation.shearSize |
| 34 | (ActivationContinuation.shearA P p) (ActivationContinuation.shearB P p) |
| 35 | |
| 36 | theorem isTrue_iff_loop {D : RadialDomain} (P : Profiles D) (h : ℝ) (p : Point) : |
| 37 | IsTrue P h p ↔ TrueConeLoop.InTrueCone (ReferenceBounds.p1 P h p) |
| 38 | (ReferenceBounds.p2 P h p) (ActivationContinuation.shearA P p) |
| 39 | (ActivationContinuation.shearB P p) := by |
| 40 | constructor |
| 41 | · rintro ⟨hc, hv⟩ |
| 42 | exact ⟨hc.first_positive, hv, hc.projection_positive, hc.cone⟩ |
| 43 | · rintro ⟨ha, hv, hp, hc⟩ |
| 44 | exact ⟨⟨ha, hp, hc⟩, hv⟩ |
| 45 | |
| 46 | theorem p1_eq_stock {D : RadialDomain} (P : Profiles D) (h : ℝ) (p : Point) : |
| 47 | ReferenceBounds.p1 P h p = ActivationStocks.profileStockOne P h p := rfl |
| 48 | |
| 49 | theorem p2_eq_stock {D : RadialDomain} (P : Profiles D) (h : ℝ) (p : Point) : |
| 50 | ReferenceBounds.p2 P h p = ActivationStocks.profileStockTwo P h p := by |
| 51 | unfold ReferenceBounds.p2 ReferenceBounds.ns ActivationStocks.profileStockTwo |
| 52 | ring |
| 53 | |
| 54 | /-! ## Local smooth coordinates for the modulation annulus -/ |
| 55 | |
| 56 | noncomputable def tilt {D : RadialDomain} (P : Profiles D) (p : Point) : ℝ := |
| 57 | ActivationContinuation.shearB P p / ActivationContinuation.shearA P p |
| 58 | |
| 59 | theorem physicalE_smoothAt {D : RadialDomain} (P : Profiles D) {p : Point} |
| 60 | (hp : p ∈ D.carrier) (hX : 0 < p.1) : ContDiffAt ℝ ∞ P.E p := |
| 61 | ((contDiffAt_const.mul contDiffAt_fst).sqrt (by positivity)).mul |
| 62 | (P.f_smooth.contDiffAt (D.isOpen.mem_nhds hp)) |
| 63 | |
| 64 | theorem shears_smoothAt {D : RadialDomain} (P : Profiles D) {p : Point} |
| 65 | (hp : p ∈ D.carrier) (hX : 0 < p.1) (hf : P.f p ≠ 0) : |
| 66 | ContDiffAt ℝ ∞ (ActivationContinuation.shearA P) p ∧ |
| 67 | ContDiffAt ℝ ∞ (ActivationContinuation.shearB P) p := by |
| 68 | have hpf := P.f_smooth.contDiffAt (D.isOpen.mem_nhds hp) |
| 69 | have hdf := (radialPartial_smooth D P.f_smooth).contDiffAt (D.isOpen.mem_nhds hp) |
| 70 | have hdu := (radialPartial_smooth D P.U_smooth).contDiffAt (D.isOpen.mem_nhds hp) |
| 71 | exact ⟨((contDiffAt_const.mul contDiffAt_fst).mul hdf).div hpf hf, |
| 72 | ((contDiffAt_const.mul contDiffAt_fst).mul hdu).div |
| 73 | (physicalE_smoothAt P hp hX) (P.E_ne_zero hX hf)⟩ |
| 74 | |
| 75 | theorem stocks_smoothAt {D : RadialDomain} (P : Profiles D) (h : ℝ) {p : Point} |
| 76 | (hp : p ∈ D.carrier) (hX : 0 < p.1) (hf : P.f p ≠ 0) |
| 77 | (hL : NaturalAxisData.L h p.2 ≠ 0) : |
| 78 | ContDiffAt ℝ ∞ (ReferenceBounds.p1 P h) p ∧ |
| 79 | ContDiffAt ℝ ∞ (ReferenceBounds.p2 P h) p := by |
| 80 | have hLc : ContDiffAt ℝ ∞ (fun q : Point => NaturalAxisData.L h q.2) p := |
| 81 | contDiffAt_const.sub ((contDiffAt_const.mul contDiffAt_const).mul (contDiffAt_snd.pow 2)) |
| 82 | exact ⟨(contDiffAt_fst.mul (P.angularLag_smoothAt h hp hX.ne' (P.H_ne_zero hX.ne' hf))).div hLc hL, |
| 83 | (contDiffAt_fst.mul ((P.axialLag_smoothAt h hp hX.ne').div hLc hL)).div |
| 84 | (physicalE_smoothAt P hp hX) (P.E_ne_zero hX hf)⟩ |
| 85 | |
| 86 | theorem cone_coordinates_smoothAt {D : RadialDomain} (P : Profiles D) (h : ℝ) {p : Point} |
| 87 | (hp : p ∈ D.carrier) (hX : 0 < p.1) (hf : P.f p ≠ 0) |
| 88 | (ha : ActivationContinuation.shearA P p ≠ 0) (hL : NaturalAxisData.L h p.2 ≠ 0) : |
| 89 | ContDiffAt ℝ ∞ (ActivationContinuation.shearA P) p ∧ |
| 90 | ContDiffAt ℝ ∞ (tilt P) p ∧ |
| 91 | ContDiffAt ℝ ∞ (ReferenceBounds.p1 P h) p ∧ |
| 92 | ContDiffAt ℝ ∞ (ReferenceBounds.p2 P h) p := by |
| 93 | have hs := shears_smoothAt P hp hX hf |
| 94 | exact ⟨hs.1, hs.2.div hs.1 ha, stocks_smoothAt P h hp hX hf hL⟩ |
| 95 | |
| 96 | /-- Equality of an actual prefix propagates to every history, before any |
| 97 | derivative or stock comparison is made. -/ |
| 98 | theorem history_of_prefix {D D' : RadialDomain} (P : Profiles D) (Q : Profiles D') |
| 99 | {J : Set ℝ} {R : ℝ} (h0 : P.pressure0 = Q.pressure0) |
| 100 | (hf : ∀ p : Point, p.2 ∈ J → p.1 ≤ R → P.f p = Q.f p) |
| 101 | (hu : ∀ p : Point, p.2 ∈ J → p.1 ≤ R → P.U p = Q.U p) |
| 102 | (r : HistoryRow) {X eta : ℝ} (hX : 0 ≤ X) (hR : X ≤ R) (heta : eta ∈ J) : |
| 103 | profileHistory P r (X, eta) = profileHistory Q r (X, eta) := by |
| 104 | apply ActivationStocks.profileHistory_congr_across P Q r hX |
| 105 | · cases r <;> simp only [profileInitial, h0] |
| 106 | · intro x hx |
| 107 | exact hf (x, eta) heta (hx.2.trans hR) |
| 108 | · intro x hx |
| 109 | exact hu (x, eta) heta (hx.2.trans hR) |
| 110 | |
| 111 | /-- The endpoint is included: equality on the left determines the radial |
| 112 | derivative because both fields are genuinely differentiable there. -/ |
| 113 | theorem radialPartial_of_left {D D' : RadialDomain} {F G : Field} |
| 114 | (hF : ContDiffOn ℝ ∞ F D.carrier) (hG : ContDiffOn ℝ ∞ G D'.carrier) |
| 115 | {R : ℝ} {p : Point} (hp : p ∈ D.carrier) (hq : p ∈ D'.carrier) |
| 116 | (hR : p.1 ≤ R) (he : ∀ x ≤ R, F (x, p.2) = G (x, p.2)) : |
| 117 | radialPartial F p = radialPartial G p := by |
| 118 | exact (uniqueDiffOn_Iic R p.1 hR).eq_deriv _ |
| 119 | (radialPartial_hasDerivAt D hF hp).hasDerivWithinAt |
| 120 | ((radialPartial_hasDerivAt D' hG hq).hasDerivWithinAt.congr_of_mem he hR) |
| 121 | |
| 122 | theorem coordinates_of_prefix {D D' : RadialDomain} (P : Profiles D) (Q : Profiles D') |
| 123 | (h : ℝ) {J : Set ℝ} (hJ : IsOpen J) {R : ℝ} |
| 124 | (h0 : P.pressure0 = Q.pressure0) |
| 125 | (hf : ∀ p : Point, p.2 ∈ J → p.1 ≤ R → P.f p = Q.f p) |
| 126 | (hu : ∀ p : Point, p.2 ∈ J → p.1 ≤ R → P.U p = Q.U p) |
| 127 | {p : Point} (hp : p ∈ D.carrier) (hq : p ∈ D'.carrier) |
| 128 | (hX : 0 < p.1) (hR : p.1 ≤ R) (heta : p.2 ∈ J) (hfne : Q.f p ≠ 0) : |
| 129 | ActivationContinuation.shearA P p = ActivationContinuation.shearA Q p ∧ |
| 130 | ActivationContinuation.shearB P p = ActivationContinuation.shearB Q p ∧ |
| 131 | ReferenceBounds.p1 P h p = ReferenceBounds.p1 Q h p ∧ |
| 132 | ReferenceBounds.p2 P h p = ReferenceBounds.p2 Q h p := by |
| 133 | have hfv := hf p heta hR |
| 134 | have huv := hu p heta hR |
| 135 | have hfd := radialPartial_of_left P.f_smooth Q.f_smooth hp hq hR |
| 136 | (fun x hx => hf (x, p.2) heta hx) |
| 137 | have hud := radialPartial_of_left P.U_smooth Q.U_smooth hp hq hR |
| 138 | (fun x hx => hu (x, p.2) heta hx) |
| 139 | have hE : P.E p = Q.E p := by simp only [Profiles.E, hfv] |
| 140 | have hs := ActivationStocks.profiles_stocks_congr P Q h hJ heta hp hq hX hfv hfne huv |
| 141 | (fun r eta he => history_of_prefix P Q h0 hf hu r hX.le hR he) |
| 142 | refine ⟨?_, ?_, hs.1, ?_⟩ |
| 143 | · simp only [ActivationContinuation.shearA, hfd, hfv] |
| 144 | · simp only [ActivationContinuation.shearB, hud, hE] |
| 145 | · simpa only [p2_eq_stock] using hs.2 |
| 146 | |
| 147 | theorem relaxed_of_coordinates {D D' : RadialDomain} (P : Profiles D) (Q : Profiles D') |
| 148 | {h : ℝ} {p : Point} |
| 149 | (he : ActivationContinuation.shearA P p = ActivationContinuation.shearA Q p ∧ |
| 150 | ActivationContinuation.shearB P p = ActivationContinuation.shearB Q p ∧ |
| 151 | ReferenceBounds.p1 P h p = ReferenceBounds.p1 Q h p ∧ |
| 152 | ReferenceBounds.p2 P h p = ReferenceBounds.p2 Q h p) |
| 153 | (hc : ActivationContinuation.IsRelaxed Q h p) : ActivationContinuation.IsRelaxed P h p := by |
| 154 | unfold ActivationContinuation.IsRelaxed at * |
| 155 | rwa [he.1, he.2.1, he.2.2.1, he.2.2.2] |
| 156 | |
| 157 | theorem controls_seed_coordinates {F : Profile} {A : AxisStage F} (c : Controls A) |
| 158 | (hsep : c.separation ≤ Real.exp (-8)) {p : Point} |
| 159 | (hsmall : SmallDebt F c.debt p.2) (hX : 0 < p.1) (hXi : p.1 ≤ NominalProfile.Xi) |
| 160 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 161 | ActivationContinuation.shearA (c.profiles hsep) p = ActivationContinuation.shearA c.seedProfiles p ∧ |
| 162 | ActivationContinuation.shearB (c.profiles hsep) p = ActivationContinuation.shearB c.seedProfiles p ∧ |
| 163 | ReferenceBounds.p1 (c.profiles hsep) F.data.h p = ReferenceBounds.p1 c.seedProfiles F.data.h p ∧ |
| 164 | ReferenceBounds.p2 (c.profiles hsep) F.data.h p = ReferenceBounds.p2 c.seedProfiles F.data.h p := by |
| 165 | apply coordinates_of_prefix (c.profiles hsep) c.seedProfiles F.data.h isOpen_univ rfl |
| 166 | (fun q _ hq => c.f_before_Xi hq) (fun q _ hq => (c.physical_before_Xi hsep hq).1) |
| 167 | (c.admissible_nonnegative hX.le (NominalProfile.physical_band_in_parameterInterval heta) hsmall) |
| 168 | _ hX hXi (mem_univ _) |
| 169 | · exact (c.seedF_positive (NominalProfile.physical_band_in_parameterInterval heta) hX.le).ne' |
| 170 | · exact ⟨lt_of_lt_of_le (by norm_num) (mul_nonneg A.scale_pos.le hX.le), |
| 171 | NominalProfile.physical_band_in_parameterInterval heta⟩ |
| 172 | |
| 173 | theorem continuation_first_at_Xi {F : Profile} {A : AxisStage F} {N : ℕ} {eps T : ℝ} |
| 174 | (w : ActivationContinuation.ContinuationWitness A.natural A.scale_pos A.small |
| 175 | F.axisDatum_contDiff N eps) (hT : 0 < T) |
| 176 | (hsep : (Controls.ofContinuation A w T hT).separation ≤ Real.exp (-8)) {eta : ℝ} |
| 177 | (hsmall : SmallDebt F (Controls.ofContinuation A w T hT).debt eta) |
| 178 | (heta : eta ∈ HeatedOutgoing.parameterDomain) : |
| 179 | 2 < ReferenceBounds.p1 ((Controls.ofContinuation A w T hT).profiles hsep) |
| 180 | F.data.h (NominalProfile.Xi, eta) := by |
| 181 | rw [(controls_seed_coordinates (Controls.ofContinuation A w T hT) hsep (p := (NominalProfile.Xi, eta)) hsmall |
| 182 | NominalProfile.Xi_pos le_rfl heta).2.2.1] |
| 183 | exact w.final_first 110 ⟨w.parameters.hold_lt_final.le, le_rfl⟩ eta heta |
| 184 | |
| 185 | noncomputable def historyIndex (r : HistoryRow) : Fin 5 := by |
| 186 | classical |
| 187 | exact if r = .mass then 0 else if r = .angular then 1 else |
| 188 | if r = .transport then 2 else if r = .energy then 3 else 4 |
| 189 | |
| 190 | @[simp] theorem historyIndex_mass : historyIndex .mass = 0 := by simp [historyIndex] |
| 191 | @[simp] theorem historyIndex_angular : historyIndex .angular = 1 := by simp [historyIndex] |
| 192 | @[simp] theorem historyIndex_transport : historyIndex .transport = 2 := by simp [historyIndex] |
| 193 | @[simp] theorem historyIndex_energy : historyIndex .energy = 3 := by simp [historyIndex] |
| 194 | @[simp] theorem historyIndex_pressure : historyIndex .pressure = 4 := by simp [historyIndex] |
| 195 | |
| 196 | theorem profileDensity_eq_regular {D : RadialDomain} (P : Profiles D) (r : HistoryRow) (p : Point) : |
| 197 | profileDensity P r p = NominalProfile.regularDensity P p (historyIndex r) := by |
| 198 | cases r <;> simp only [historyIndex_mass, historyIndex_angular, historyIndex_transport, |
| 199 | historyIndex_energy, historyIndex_pressure] <;> rfl |
| 200 | |
| 201 | theorem history_eq_moment {D : RadialDomain} (P : Profiles D) (r : HistoryRow) |
| 202 | {X eta : ℝ} (hX : 0 ≤ X) : |
| 203 | profileHistory P r (X, eta) = profileInitial P r eta + |
| 204 | NominalProfile.moments P.U P.E X eta (historyIndex r) := by |
| 205 | rw [profileHistory_eq_initial_add_primitive] |
| 206 | congr 1 |
| 207 | rw [primitive, intervalIntegral.integral_of_le hX] |
| 208 | apply setIntegral_congr_fun measurableSet_Ioc |
| 209 | intro x hx |
| 210 | change profileDensity P r (x, eta) = |
| 211 | NominalProfile.density (fun t => P.U (t, eta)) (fun t => P.E (t, eta)) x (historyIndex r) |
| 212 | rw [profileDensity_eq_regular] |
| 213 | exact congrArg (fun q : NominalProfile.Debt => q (historyIndex r)) |
| 214 | (NominalProfile.regularDensity_eq P hx.1 eta).symm |
| 215 | |
| 216 | namespace Witness |
| 217 | |
| 218 | variable {F : Profile} (W : NominalProfile.Witness F) |
| 219 | |
| 220 | theorem f_positive {p : Point} (hX : 0 < p.1) (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 221 | 0 < W.profiles.f p := by |
| 222 | have he := W.E_positive hX heta |
| 223 | rw [W.E_eq_sqrt_f hX] at he |
| 224 | exact pos_of_mul_pos_right he (Real.sqrt_nonneg _) |
| 225 | |
| 226 | theorem prefix_f {p : Point} (hp : p.1 ≤ W.controls.heatJoin) : |
| 227 | W.profiles.f p = (W.controls.profiles W.separated).f p := by |
| 228 | change W.controls.extendedf W.heat.coefficients p = W.controls.f p |
| 229 | by_cases hXi : p.1 ≤ NominalProfile.Xi |
| 230 | · simp only [Controls.extendedf, ite_eq_left hXi] |
| 231 | · rw [Controls.extendedf, ite_eq_right hXi, |
| 232 | W.controls.extendedE_before W.heat.coefficients hp, Controls.f, ite_eq_right hXi] |
| 233 | |
| 234 | theorem prefix_histories (r : HistoryRow) {X eta : ℝ} (hX : 0 ≤ X) |
| 235 | (hR : X ≤ W.controls.heatJoin) : |
| 236 | profileHistory W.profiles r (X, eta) = |
| 237 | profileHistory (W.controls.profiles W.separated) r (X, eta) := |
| 238 | history_of_prefix W.profiles (W.controls.profiles W.separated) (J := univ) rfl |
| 239 | (fun _ _ hq => prefix_f W hq) (fun _ _ _ => rfl) r hX hR (mem_univ _) |
| 240 | |
| 241 | theorem prefix_coordinates {p : Point} (hp : p ∈ W.domain.carrier) |
| 242 | (hX : 0 < p.1) (hR : p.1 ≤ W.controls.heatJoin) |
| 243 | (hf : W.controls.f p ≠ 0) : |
| 244 | ActivationContinuation.shearA W.profiles p = |
| 245 | ActivationContinuation.shearA (W.controls.profiles W.separated) p ∧ |
| 246 | ActivationContinuation.shearB W.profiles p = |
| 247 | ActivationContinuation.shearB (W.controls.profiles W.separated) p ∧ |
| 248 | ReferenceBounds.p1 W.profiles F.data.h p = |
| 249 | ReferenceBounds.p1 (W.controls.profiles W.separated) F.data.h p ∧ |
| 250 | ReferenceBounds.p2 W.profiles F.data.h p = |
| 251 | ReferenceBounds.p2 (W.controls.profiles W.separated) F.data.h p := |
| 252 | coordinates_of_prefix W.profiles (W.controls.profiles W.separated) F.data.h isOpen_univ rfl |
| 253 | (fun _ _ hq => prefix_f W hq) (fun _ _ _ => rfl) hp hp.1 hX hR (mem_univ _) hf |
| 254 | |
| 255 | theorem prefix_relaxed {p : Point} (hX : 0 < p.1) (hR : p.1 ≤ W.controls.heatJoin) |
| 256 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 257 | (hc : ActivationContinuation.IsRelaxed (W.controls.profiles W.separated) F.data.h p) : |
| 258 | ActivationContinuation.IsRelaxed W.profiles F.data.h p := by |
| 259 | have hf : W.controls.f p ≠ 0 := by |
| 260 | change (W.controls.profiles W.separated).f p ≠ 0 |
| 261 | rw [← prefix_f W hR] |
| 262 | exact (f_positive W hX heta).ne' |
| 263 | exact relaxed_of_coordinates W.profiles (W.controls.profiles W.separated) |
| 264 | (prefix_coordinates W (W.domain_contains hX.le heta) hX hR hf) hc |
| 265 | |
| 266 | theorem seed_coordinates {p : Point} (hX : 0 < p.1) (hXi : p.1 ≤ NominalProfile.Xi) |
| 267 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 268 | ActivationContinuation.shearA W.profiles p = ActivationContinuation.shearA W.controls.seedProfiles p ∧ |
| 269 | ActivationContinuation.shearB W.profiles p = ActivationContinuation.shearB W.controls.seedProfiles p ∧ |
| 270 | ReferenceBounds.p1 W.profiles F.data.h p = ReferenceBounds.p1 W.controls.seedProfiles F.data.h p ∧ |
| 271 | ReferenceBounds.p2 W.profiles F.data.h p = ReferenceBounds.p2 W.controls.seedProfiles F.data.h p := by |
| 272 | apply coordinates_of_prefix W.profiles W.controls.seedProfiles F.data.h isOpen_univ rfl |
| 273 | (fun q _ hq => (W.controls.extended_seed_fields W.heat.coefficients W.separated hq).1) |
| 274 | (fun q _ hq => (W.controls.extended_seed_fields W.heat.coefficients W.separated hq).2) |
| 275 | (W.domain_contains hX.le heta) _ hX hXi (mem_univ _) |
| 276 | · exact (W.controls.seedF_positive (NominalProfile.physical_band_in_parameterInterval heta) hX.le).ne' |
| 277 | · exact ⟨lt_of_lt_of_le (by norm_num) (mul_nonneg W.axis.scale_pos.le hX.le), |
| 278 | NominalProfile.physical_band_in_parameterInterval heta⟩ |
| 279 | |
| 280 | theorem seed_relaxed {p : Point} (hX : 0 < p.1) (hXi : p.1 ≤ NominalProfile.Xi) |
| 281 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 282 | (hc : ActivationContinuation.IsRelaxed W.controls.seedProfiles F.data.h p) : |
| 283 | ActivationContinuation.IsRelaxed W.profiles F.data.h p := |
| 284 | relaxed_of_coordinates W.profiles W.controls.seedProfiles (seed_coordinates W hX hXi heta) hc |
| 285 | |
| 286 | theorem seed_true {p : Point} (hX : 0 < p.1) (hXi : p.1 ≤ NominalProfile.Xi) |
| 287 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 288 | (hc : IsTrue W.controls.seedProfiles F.data.h p) : IsTrue W.profiles F.data.h p := by |
| 289 | refine ⟨seed_relaxed W hX hXi heta hc.1, ?_⟩ |
| 290 | rw [(seed_coordinates W hX hXi heta).1, (seed_coordinates W hX hXi heta).2.1] |
| 291 | exact hc.2 |
| 292 | |
| 293 | theorem continuation_relaxed {N : ℕ} {eps T : ℝ} |
| 294 | (w : ActivationContinuation.ContinuationWitness W.axis.natural W.axis.scale_pos W.axis.small |
| 295 | F.axisDatum_contDiff N eps) (hT : 0 < T) |
| 296 | (hc : W.controls = Controls.ofContinuation W.axis w T hT) |
| 297 | {p : Point} (heta : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 298 | (hX : p.1 ∈ Icc w.parameters.startRadius (110 : ℝ)) : |
| 299 | ActivationContinuation.IsRelaxed W.profiles F.data.h p := by |
| 300 | apply seed_relaxed W (w.parameters.startRadius_pos.trans_le hX.1) hX.2 heta |
| 301 | have he : W.controls.seedProfiles = w.parameters.profiles := by rw [hc]; rfl |
| 302 | rw [he] |
| 303 | exact w.relaxed p heta hX |
| 304 | |
| 305 | theorem moments_eq_profile_moments (X eta : ℝ) : |
| 306 | NominalProfile.moments W.profiles.U W.profiles.E X eta = |
| 307 | NominalProfile.moments W.U W.E X eta := by |
| 308 | ext i |
| 309 | apply setIntegral_congr_fun measurableSet_Ioc |
| 310 | intro x hx |
| 311 | have he : W.profiles.E (x, eta) = W.E (x, eta) := (W.E_eq_sqrt_f hx.1).symm |
| 312 | simp only [NominalProfile.density, he] |
| 313 | rfl |
| 314 | |
| 315 | theorem history_after (r : HistoryRow) {X eta : ℝ} |
| 316 | (hX : W.controls.heatJoin ≤ X) (heta : eta ∈ HeatedOutgoing.parameterDomain) : |
| 317 | profileHistory W.profiles r (X, eta) = profileInitial W.profiles r eta + |
| 318 | NominalProfile.moments (HeatedOutgoing.U F W.controls.radius) |
| 319 | (HeatedOutgoing.E F W.controls.radius W.heat.physical.coefficients) X eta (historyIndex r) := by |
| 320 | rw [history_eq_moment W.profiles r (W.controls.heatJoin_pos.le.trans hX), |
| 321 | moments_eq_profile_moments W, W.moments_after hX heta] |
| 322 | |
| 323 | end Witness |
| 324 | |
| 325 | /-! ## Literal physical moments in the logarithmic chart -/ |
| 326 | |
| 327 | noncomputable def chart (XR : ℝ) (p : Point) : Point := (XR * Real.exp p.1, p.2) |
| 328 | |
| 329 | theorem chart_positive {XR : ℝ} (hXR : 0 < XR) (p : Point) : 0 < (chart XR p).1 := |
| 330 | mul_pos hXR (Real.exp_pos _) |
| 331 | |
| 332 | theorem integral_log_chart (f : ℝ → ℝ) {XR : ℝ} (hXR : 0 < XR) (y : ℝ) : |
| 333 | (∫ x in Ioc 0 (XR * Real.exp y), f x) = |
| 334 | XR * ∫ t in Iic y, Real.exp t * f (XR * Real.exp t) := by |
| 335 | calc |
| 336 | _ = ∫ x in Ioc 0 (XR * Real.exp y), (fun v => f (XR * v)) (x / XR) := by |
| 337 | apply setIntegral_congr_fun measurableSet_Ioc |
| 338 | intro x _ |
| 339 | dsimp only |
| 340 | rw [mul_div_cancel₀ x hXR.ne'] |
| 341 | _ = XR * ∫ v in Ioc 0 (Real.exp y), f (XR * v) := by |
| 342 | simpa only [mul_div_cancel_left₀ _ hXR.ne'] using |
| 343 | OutgoingDilation.integral_dilate_Ioc (fun v => f (XR * v)) XR (XR * Real.exp y) hXR |
| 344 | _ = _ := by |
| 345 | rw [← ReleaseMoments.image_exp_Iic, |
| 346 | integral_image_eq_integral_abs_deriv_smul measurableSet_Iic |
| 347 | (fun t _ => (Real.hasDerivAt_exp t).hasDerivWithinAt) Real.exp_injective.injOn] |
| 348 | simp only [abs_of_pos (Real.exp_pos _), smul_eq_mul] |
| 349 | |
| 350 | theorem sqrt_chart {XR : ℝ} (hXR : 0 < XR) (y : ℝ) : |
| 351 | Real.sqrt (2 * (XR * Real.exp y)) = Real.sqrt (2 * XR) * Real.exp (y / 2) := by |
| 352 | rw [← mul_assoc, Real.sqrt_mul (by positivity : 0 ≤ 2 * XR)] |
| 353 | congr 1 |
| 354 | exact (Real.exp_half y).symm |
| 355 | |
| 356 | theorem outgoing_U_chart (F : Profile) {XR : ℝ} (hXR : 0 < XR) (p : Point) : |
| 357 | OutgoingDilation.U F XR (chart XR p) = F.logU p := by |
| 358 | simp only [chart, OutgoingDilation.U, OutgoingProfile.Profile.U, |
| 359 | mul_div_cancel_left₀ _ hXR.ne', Real.log_exp, Prod.eta] |
| 360 | |
| 361 | theorem outgoing_E_chart (F : Profile) {XR : ℝ} (hXR : 0 < XR) (p : Point) : |
| 362 | OutgoingDilation.E F XR (chart XR p) = F.logE p := by |
| 363 | simp only [chart, OutgoingDilation.E, OutgoingProfile.Profile.E, |
| 364 | mul_div_cancel_left₀ _ hXR.ne', Real.log_exp, Prod.eta] |
| 365 | |
| 366 | theorem outgoing_M_chart (F : Profile) {XR : ℝ} (hXR : 0 < XR) (y eta : ℝ) : |
| 367 | OutgoingDilation.M F XR eta (XR * Real.exp y) = |
| 368 | XR * OutgoingHistories.M F.data F.amp (y, eta) := by |
| 369 | unfold OutgoingDilation.M |
| 370 | rw [integral_log_chart _ hXR, OutgoingHistories.M_eq_integral F.data F.amp_contDiff] |
| 371 | congr 1 |
| 372 | apply setIntegral_congr_fun measurableSet_Iic |
| 373 | intro t _ |
| 374 | change Real.exp t * OutgoingDilation.U F XR (chart XR (t, eta)) = _ |
| 375 | rw [outgoing_U_chart F hXR] |
| 376 | rfl |
| 377 | |
| 378 | theorem outgoing_J_chart (F : Profile) {XR : ℝ} (hXR : 0 < XR) (y eta : ℝ) : |
| 379 | OutgoingDilation.J F XR eta (XR * Real.exp y) = |
| 380 | (XR * Real.sqrt (2 * XR)) * OutgoingHistories.J F.reset F.amp (y, eta) := by |
| 381 | unfold OutgoingDilation.J |
| 382 | rw [integral_log_chart _ hXR, OutgoingHistories.J_eq_integral F.reset F.amp_contDiff] |
| 383 | rw [mul_assoc] |
| 384 | congr 1 |
| 385 | rw [← integral_const_mul] |
| 386 | apply setIntegral_congr_fun measurableSet_Iic |
| 387 | intro t _ |
| 388 | change Real.exp t * (OutgoingDilation.H F XR (chart XR (t, eta)) * |
| 389 | OutgoingDilation.U F XR (chart XR (t, eta))) = _ |
| 390 | rw [outgoing_U_chart F hXR] |
| 391 | unfold OutgoingDilation.H |
| 392 | rw [outgoing_E_chart F hXR] |
| 393 | change Real.exp t * ((Real.sqrt (2 * (XR * Real.exp t)) * F.logE (t, eta)) * F.logU (t, eta)) = _ |
| 394 | dsimp only |
| 395 | rw [sqrt_chart hXR, show 3 * t / 2 = t + t / 2 by ring, Real.exp_add] |
| 396 | dsimp only [OutgoingProfile.Profile.logE, OutgoingProfile.Profile.logU, |
| 397 | OutgoingHistories.E, OutgoingHistories.U] |
| 398 | ring |
| 399 | |
| 400 | theorem heated_I_chart (F : Profile) {XR : ℝ} (hXR : 0 < XR) |
| 401 | (coef : ℝ → HeatedOutgoing.Coeff) {eta : ℝ} (heta : eta ∈ HeatedOutgoing.parameterDomain) |
| 402 | (y : ℝ) : |
| 403 | NominalProfile.moments (HeatedOutgoing.U F XR) (HeatedOutgoing.E F XR coef) |
| 404 | (XR * Real.exp y) eta 1 = |
| 405 | (XR * Real.sqrt (2 * XR)) * HeatSwitchCone.logI F XR coef (y, eta) := by |
| 406 | change (∫ x in Ioc 0 (XR * Real.exp y), Real.sqrt (2 * x) * HeatedOutgoing.E F XR coef (x, eta)) = _ |
| 407 | rw [integral_log_chart _ hXR, (HeatSwitchCone.logI_eq_past_integral F hXR coef heta y).2, |
| 408 | mul_assoc] |
| 409 | congr 1 |
| 410 | rw [← integral_const_mul] |
| 411 | apply setIntegral_congr_fun measurableSet_Iic |
| 412 | intro t _ |
| 413 | change Real.exp t * (Real.sqrt (2 * (XR * Real.exp t)) * HeatedOutgoing.E F XR coef (XR * Real.exp t, eta)) = _ |
| 414 | dsimp only |
| 415 | rw [sqrt_chart hXR, show 3 * t / 2 = t + t / 2 by ring, Real.exp_add] |
| 416 | unfold HeatSwitchCone.logE |
| 417 | ring |
| 418 | |
| 419 | theorem heated_S_chart (F : Profile) {XR : ℝ} (hXR : 0 < XR) |
| 420 | (coef : ℝ → HeatedOutgoing.Coeff) {eta : ℝ} (heta : eta ∈ HeatedOutgoing.parameterDomain) |
| 421 | (y : ℝ) : |
| 422 | NominalProfile.moments (HeatedOutgoing.U F XR) (HeatedOutgoing.E F XR coef) |
| 423 | (XR * Real.exp y) eta 3 = XR * HeatSwitchCone.logS F XR coef (y, eta) := by |
| 424 | change (∫ x in Ioc 0 (XR * Real.exp y), HeatedOutgoing.U F XR (x, eta) ^ 2 - |
| 425 | HeatedOutgoing.E F XR coef (x, eta) ^ 2 / 2) = _ |
| 426 | rw [integral_log_chart _ hXR, (HeatSwitchCone.logS_eq_past_integral F hXR coef heta y).2] |
| 427 | congr 1 |
| 428 | apply setIntegral_congr_fun measurableSet_Iic |
| 429 | intro t _ |
| 430 | change Real.exp t * (OutgoingDilation.U F XR (chart XR (t, eta)) ^ 2 - |
| 431 | HeatSwitchCone.logE F XR coef (t, eta) ^ 2 / 2) = _ |
| 432 | rw [outgoing_U_chart F hXR] |
| 433 | |
| 434 | theorem heated_J_chart (F : Profile) {XR : ℝ} (hXR : 0 < XR) |
| 435 | (coef : ℝ → HeatedOutgoing.Coeff) (y eta : ℝ) : |
| 436 | NominalProfile.moments (HeatedOutgoing.U F XR) (HeatedOutgoing.E F XR coef) |
| 437 | (XR * Real.exp y) eta 2 = |
| 438 | (XR * Real.sqrt (2 * XR)) * OutgoingHistories.J F.reset F.amp (y, eta) := by |
| 439 | have he : NominalProfile.moments (HeatedOutgoing.U F XR) (HeatedOutgoing.E F XR coef) |
| 440 | (XR * Real.exp y) eta 2 = HeatedOutgoing.J F XR coef eta (XR * Real.exp y) := by |
| 441 | apply setIntegral_congr_fun measurableSet_Ioc |
| 442 | intro x _ |
| 443 | change HeatedOutgoing.U F XR (x, eta) * Real.sqrt (2 * x) * HeatedOutgoing.E F XR coef (x, eta) = _ |
| 444 | unfold HeatedOutgoing.H |
| 445 | ring |
| 446 | rw [he, HeatedOutgoing.J_unchanged F XR coef eta _ hXR, outgoing_J_chart F hXR] |
| 447 | |
| 448 | namespace Witness |
| 449 | |
| 450 | variable {F : Profile} (W : NominalProfile.Witness F) |
| 451 | |
| 452 | theorem log_histories {p : Point} (hp : W.controls.heatJoin ≤ (chart W.controls.radius p).1) |
| 453 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 454 | W.profiles.M (chart W.controls.radius p) = W.controls.radius * OutgoingHistories.M F.data F.amp p ∧ |
| 455 | W.profiles.I (chart W.controls.radius p) = (W.controls.radius * Real.sqrt (2 * W.controls.radius)) * |
| 456 | HeatSwitchCone.logI F W.controls.radius W.heat.coefficients p ∧ |
| 457 | W.profiles.J (chart W.controls.radius p) = (W.controls.radius * Real.sqrt (2 * W.controls.radius)) * |
| 458 | OutgoingHistories.J F.reset F.amp p ∧ |
| 459 | W.profiles.S (chart W.controls.radius p) = W.controls.radius * |
| 460 | HeatSwitchCone.logS F W.controls.radius W.heat.coefficients p := by |
| 461 | have hm := history_after W .mass hp heta |
| 462 | have hi := history_after W .angular hp heta |
| 463 | have hj := history_after W .transport hp heta |
| 464 | have hs := history_after W .energy hp heta |
| 465 | simp only [profileHistory, profileInitial, historyIndex_mass, historyIndex_angular, |
| 466 | historyIndex_transport, historyIndex_energy, zero_add] at hm hi hj hs |
| 467 | refine ⟨?_, ?_, ?_, ?_⟩ |
| 468 | · exact hm.trans (outgoing_M_chart F W.controls.radius_pos p.1 p.2) |
| 469 | · exact hi.trans (heated_I_chart F W.controls.radius_pos W.heat.coefficients heta p.1) |
| 470 | · exact hj.trans (heated_J_chart F W.controls.radius_pos W.heat.coefficients p.1 p.2) |
| 471 | · exact hs.trans (heated_S_chart F W.controls.radius_pos W.heat.coefficients heta p.1) |
| 472 | |
| 473 | theorem log_pressure {p : Point} (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 474 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 475 | W.profiles.pressure (chart W.controls.radius p) = |
| 476 | HeatSwitchCone.logPi F W.controls.radius W.heat.coefficients p := by |
| 477 | exact (W.heat_agreement hp heta).2.2.trans |
| 478 | (HeatSwitchCone.logPi_eq_canonical F W.heat.physical p heta).symm |
| 479 | |
| 480 | end Witness |
| 481 | |
| 482 | theorem parameterPartial_eq_scaled_within {D : RadialDomain} {f g : Field} |
| 483 | (hf : ContDiffOn ℝ ∞ f D.carrier) {X y eta k : ℝ} (hp : (X, eta) ∈ D.carrier) |
| 484 | (heta : eta ∈ HeatedOutgoing.parameterDomain) (hk : k ≠ 0) |
| 485 | (he : ∀ xi ∈ HeatedOutgoing.parameterDomain, f (X, xi) = k * g (y, xi)) : |
| 486 | parameterPartial f (X, eta) = k * |
| 487 | derivWithin (fun xi => g (y, xi)) HeatedOutgoing.parameterDomain eta := by |
| 488 | have hd := (parameterPartial_hasDerivAt D hf hp).div_const k |
| 489 | have hg : HasDerivWithinAt (fun xi => g (y, xi)) (parameterPartial f (X, eta) / k) |
| 490 | HeatedOutgoing.parameterDomain eta := by |
| 491 | apply hd.hasDerivWithinAt.congr_of_mem _ heta |
| 492 | intro xi hxi |
| 493 | apply (eq_div_iff hk).mpr |
| 494 | calc |
| 495 | g (y, xi) * k = k * g (y, xi) := mul_comm _ _ |
| 496 | _ = f (X, xi) := (he xi hxi).symm |
| 497 | rw [hg.derivWithin (uniqueDiffOn_Icc (by norm_num) eta heta)] |
| 498 | field_simp |
| 499 | |
| 500 | theorem smooth_parameterWithin_eq_dEta {g : Field} (hg : ContDiff ℝ ∞ g) |
| 501 | {p : Point} (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 502 | derivWithin (fun xi => g (p.1, xi)) HeatedOutgoing.parameterDomain p.2 = |
| 503 | OutgoingHistories.dEta g p := |
| 504 | (OutgoingHistories.dEta_hasDerivAt hg p).hasDerivWithinAt.derivWithin |
| 505 | (uniqueDiffOn_Icc (by norm_num) p.2 heta) |
| 506 | |
| 507 | theorem angular_scaled_quotient {R r : ℝ} (hR : R ≠ 0) (hr : r ≠ 0) |
| 508 | (a b c k I Ieta J Jeta x z e : ℝ) : |
| 509 | (a * (R * r * I) - b * (R * r * Ieta) - c * (R * r * Jeta) + k * (R * r * J)) / |
| 510 | (R * x * (r * z * e)) = |
| 511 | (a * I - b * Ieta - c * Jeta + k * J) / (x * z * e) := by |
| 512 | rw [show a * (R * r * I) - b * (R * r * Ieta) - c * (R * r * Jeta) + k * (R * r * J) = |
| 513 | (R * r) * (a * I - b * Ieta - c * Jeta + k * J) by ring, |
| 514 | show R * x * (r * z * e) = (R * r) * (x * z * e) by ring, |
| 515 | mul_div_mul_left _ _ (mul_ne_zero hR hr)] |
| 516 | |
| 517 | theorem scaled_difference_quotient {R : ℝ} (hR : R ≠ 0) (a eta u v x : ℝ) : |
| 518 | a * (R * u - eta * (R * v)) / (R * x) = a * (u - eta * v) / x := by |
| 519 | rw [show a * (R * u - eta * (R * v)) = R * (a * (u - eta * v)) by ring, |
| 520 | mul_div_mul_left _ _ hR] |
| 521 | |
| 522 | theorem scaled_affine_quotient {R : ℝ} (hR : R ≠ 0) (a b u v x : ℝ) : |
| 523 | (a * (R * u) - b * (R * v)) / (R * x) = (a * u - b * v) / x := by |
| 524 | rw [show a * (R * u) - b * (R * v) = R * (a * u - b * v) by ring, |
| 525 | mul_div_mul_left _ _ hR] |
| 526 | |
| 527 | theorem shear_dilation_cancel {r z f : ℝ} (hr : r ≠ 0) (hz : z ≠ 0) (hf : f ≠ 0) |
| 528 | (X df : ℝ) : |
| 529 | -2 * X * df / f = 1 - 2 * (r * (z * (1 / 2)) * f + r * z * (df * X)) / (r * z * f) := by |
| 530 | rw [show (2 : ℝ) * (r * (z * (1 / 2)) * f + r * z * (df * X)) = |
| 531 | (r * z) * (f + 2 * df * X) by ring, |
| 532 | mul_div_mul_left _ _ (mul_ne_zero hr hz)] |
| 533 | field_simp [hf] ; ring |
| 534 | |
| 535 | /-- The logarithmic radial chart changes actual derivatives, not independent |
| 536 | formal jets. This statement is also valid for the matching profile before |
| 537 | the heat splice. -/ |
| 538 | theorem physical_log_shears {D : RadialDomain} (P : Profiles D) {R : ℝ} |
| 539 | (hR : 0 < R) (p : Point) (hp : chart R p ∈ D.carrier) |
| 540 | (hf : P.f (chart R p) ≠ 0) : |
| 541 | ActivationContinuation.shearA P (chart R p) = |
| 542 | 1 - 2 * deriv (fun y => P.E (R * Real.exp y, p.2)) p.1 / P.E (chart R p) ∧ |
| 543 | ActivationContinuation.shearB P (chart R p) = |
| 544 | -2 * deriv (fun y => P.U (R * Real.exp y, p.2)) p.1 / P.E (chart R p) := by |
| 545 | have hc := (Real.hasDerivAt_exp p.1).const_mul R |
| 546 | have hfd := (radialPartial_hasDerivAt D P.f_smooth hp).comp p.1 hc |
| 547 | have hud := (radialPartial_hasDerivAt D P.U_smooth hp).comp p.1 hc |
| 548 | have hr := (((hasDerivAt_id p.1).div_const 2).exp).const_mul (Real.sqrt (2 * R)) |
| 549 | dsimp only [chart, Function.comp_def, id_eq] at hfd hud hr |
| 550 | have he : (fun y => P.E (R * Real.exp y, p.2)) = |
| 551 | (fun y => (Real.sqrt (2 * R) * Real.exp (y / 2)) * P.f (R * Real.exp y, p.2)) := by |
| 552 | funext y |
| 553 | exact congrArg (fun t => t * P.f (R * Real.exp y, p.2)) (sqrt_chart hR y) |
| 554 | constructor |
| 555 | · rw [he, (hr.fun_mul hfd).deriv] |
| 556 | change -2 * (R * Real.exp p.1) * radialPartial P.f (chart R p) / P.f (chart R p) = _ |
| 557 | rw [show P.E (chart R p) = (Real.sqrt (2 * R) * Real.exp (p.1 / 2)) * P.f (chart R p) from |
| 558 | congrArg (fun t => t * P.f (chart R p)) (sqrt_chart hR p.1)] |
| 559 | exact shear_dilation_cancel (Real.sqrt_pos.2 (by positivity)).ne' |
| 560 | (Real.exp_ne_zero _) hf _ _ |
| 561 | · rw [hud.deriv] |
| 562 | unfold ActivationContinuation.shearB |
| 563 | dsimp only [chart] |
| 564 | ring |
| 565 | |
| 566 | theorem physical_shear_cancel {r f X : ℝ} (hr : r ≠ 0) (hf : f ≠ 0) |
| 567 | (hsq : r ^ 2 = 2 * X) (df : ℝ) : |
| 568 | 1 - 2 * X * (1 / (2 * r) * (2 * 1) * f + r * df) / (r * f) = -2 * X * df / f := by |
| 569 | have hx : X = r ^ 2 / 2 := by linarith |
| 570 | rw [hx] |
| 571 | field_simp ; ring |
| 572 | |
| 573 | theorem modulated_shears_eq {D : RadialDomain} (P : Profiles D) {p : Point} |
| 574 | (hp : p ∈ D.carrier) (hX : 0 < p.1) (hf : P.f p ≠ 0) : |
| 575 | ModulatedCone.angularShear P.E p = ActivationContinuation.shearA P p ∧ |
| 576 | ModulatedCone.signedAxialShear P.E P.U p = ActivationContinuation.shearB P p := by |
| 577 | have hr : Real.sqrt (2 * p.1) ≠ 0 := (Real.sqrt_pos.2 (by positivity)).ne' |
| 578 | have hr2 := Real.sq_sqrt (show 0 ≤ 2 * p.1 by positivity) |
| 579 | have hd := ((Real.hasDerivAt_sqrt (show 2 * p.1 ≠ 0 by positivity)).comp p.1 |
| 580 | ((hasDerivAt_id p.1).const_mul 2)).fun_mul (radialPartial_hasDerivAt D P.f_smooth hp) |
| 581 | dsimp only [Function.comp_def, id_eq] at hd |
| 582 | constructor |
| 583 | · unfold ModulatedCone.angularShear ActivationContinuation.shearA |
| 584 | change 1 - 2 * p.1 * deriv (fun x => Real.sqrt (2 * x) * P.f (x, p.2)) p.1 / |
| 585 | (Real.sqrt (2 * p.1) * P.f p) = _ |
| 586 | rw [hd.deriv] |
| 587 | exact physical_shear_cancel hr hf hr2 _ |
| 588 | · unfold ModulatedCone.signedAxialShear ActivationContinuation.shearB |
| 589 | rw [(radialPartial_hasDerivAt D P.U_smooth hp).deriv] |
| 590 | ring |
| 591 | |
| 592 | namespace Witness |
| 593 | |
| 594 | variable {F : Profile} (W : NominalProfile.Witness F) |
| 595 | |
| 596 | theorem log_history_parameters {p : Point} |
| 597 | (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 598 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 599 | parameterPartial W.profiles.M (chart W.controls.radius p) = W.controls.radius * |
| 600 | OutgoingHistories.dEta (OutgoingHistories.M F.data F.amp) p ∧ |
| 601 | parameterPartial W.profiles.I (chart W.controls.radius p) = |
| 602 | (W.controls.radius * Real.sqrt (2 * W.controls.radius)) * |
| 603 | derivWithin (fun eta => HeatSwitchCone.logI F W.controls.radius W.heat.coefficients (p.1, eta)) |
| 604 | HeatedOutgoing.parameterDomain p.2 ∧ |
| 605 | parameterPartial W.profiles.J (chart W.controls.radius p) = |
| 606 | (W.controls.radius * Real.sqrt (2 * W.controls.radius)) * |
| 607 | OutgoingHistories.dEta (OutgoingHistories.J F.reset F.amp) p ∧ |
| 608 | parameterPartial W.profiles.S (chart W.controls.radius p) = W.controls.radius * |
| 609 | derivWithin (fun eta => HeatSwitchCone.logS F W.controls.radius W.heat.coefficients (p.1, eta)) |
| 610 | HeatedOutgoing.parameterDomain p.2 ∧ |
| 611 | parameterPartial W.profiles.pressure (chart W.controls.radius p) = |
| 612 | derivWithin (fun eta => HeatSwitchCone.logPi F W.controls.radius W.heat.coefficients (p.1, eta)) |
| 613 | HeatedOutgoing.parameterDomain p.2 := by |
| 614 | have hmem := W.domain_contains (chart_positive W.controls.radius_pos p).le heta |
| 615 | have hroot : W.controls.radius * Real.sqrt (2 * W.controls.radius) ≠ 0 := |
| 616 | mul_ne_zero W.controls.radius_pos.ne' |
| 617 | (Real.sqrt_pos.2 (mul_pos (by norm_num) W.controls.radius_pos)).ne' |
| 618 | have hm := parameterPartial_eq_scaled_within W.profiles.M_smooth hmem heta W.controls.radius_pos.ne' |
| 619 | (fun eta he => (log_histories W (p := (p.1, eta)) hp.le he).1) |
| 620 | have hi := parameterPartial_eq_scaled_within W.profiles.I_smooth hmem heta hroot |
| 621 | (fun eta he => (log_histories W (p := (p.1, eta)) hp.le he).2.1) |
| 622 | have hj := parameterPartial_eq_scaled_within W.profiles.J_smooth hmem heta hroot |
| 623 | (fun eta he => (log_histories W (p := (p.1, eta)) hp.le he).2.2.1) |
| 624 | have hs := parameterPartial_eq_scaled_within W.profiles.S_smooth hmem heta W.controls.radius_pos.ne' |
| 625 | (fun eta he => (log_histories W (p := (p.1, eta)) hp.le he).2.2.2) |
| 626 | have hP := parameterPartial_eq_scaled_within W.profiles.pressure_smooth hmem heta |
| 627 | (show (1 : ℝ) ≠ 0 by norm_num) (fun eta he => by |
| 628 | simp only [one_mul] |
| 629 | exact log_pressure W (p := (p.1, eta)) hp he) |
| 630 | rw [smooth_parameterWithin_eq_dEta (OutgoingHistories.M_smooth F.data F.amp_contDiff) heta] at hm |
| 631 | rw [smooth_parameterWithin_eq_dEta (OutgoingHistories.J_smooth F.reset F.amp_contDiff) heta] at hj |
| 632 | simp only [one_mul] at hP |
| 633 | exact ⟨hm, hi, hj, hs, hP⟩ |
| 634 | |
| 635 | theorem log_fields {p : Point} (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 636 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 637 | W.profiles.U (chart W.controls.radius p) = F.logU p ∧ |
| 638 | W.profiles.E (chart W.controls.radius p) = HeatSwitchCone.logE F W.controls.radius W.heat.coefficients p ∧ |
| 639 | W.profiles.H (chart W.controls.radius p) = Real.sqrt (2 * W.controls.radius) * Real.exp (p.1 / 2) * |
| 640 | HeatSwitchCone.logE F W.controls.radius W.heat.coefficients p := by |
| 641 | have hx := chart_positive W.controls.radius_pos p |
| 642 | have he : W.profiles.E (chart W.controls.radius p) = |
| 643 | HeatSwitchCone.logE F W.controls.radius W.heat.coefficients p := |
| 644 | (W.E_eq_sqrt_f hx).symm.trans (W.heat_agreement hp heta).2.1 |
| 645 | refine ⟨(W.U_outgoing hp).trans (outgoing_U_chart F W.controls.radius_pos p), he, ?_⟩ |
| 646 | have hH : W.profiles.H (chart W.controls.radius p) = |
| 647 | Real.sqrt (2 * (chart W.controls.radius p).1) * W.profiles.E (chart W.controls.radius p) := by |
| 648 | dsimp only [Profiles.H, Profiles.E] |
| 649 | rw [← mul_assoc, Real.mul_self_sqrt (mul_nonneg (by norm_num) hx.le)] |
| 650 | rw [hH, he] |
| 651 | exact congrArg (fun z => z * HeatSwitchCone.logE F W.controls.radius W.heat.coefficients p) |
| 652 | (sqrt_chart W.controls.radius_pos p.1) |
| 653 | |
| 654 | theorem log_transport {p : Point} (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 655 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 656 | W.profiles.W F.data.h (chart W.controls.radius p) = OutgoingHistories.W F.data F.amp p := by |
| 657 | have hmem := W.domain_contains (chart_positive W.controls.radius_pos p).le heta |
| 658 | have hv := (log_histories W hp.le heta).1 |
| 659 | have hd := (log_history_parameters W hp heta).1 |
| 660 | have hf := ActivationStocks.profile_massFlux W.profiles F.data.h hmem |
| 661 | rw [hv, hd] at hf |
| 662 | unfold OutgoingHistories.W OutgoingHistories.X |
| 663 | apply (eq_div_iff (Real.exp_ne_zero p.1)).mpr |
| 664 | apply mul_left_cancel₀ W.controls.radius_pos.ne' |
| 665 | convert! hf using 1 <;> |
| 666 | dsimp only [chart, ActivationStocks.massFlux, OutgoingHistories.XW, OutgoingHistories.X, |
| 667 | NaturalAxisData.D, NaturalAxisData.d, StressAlgebra.axialExponent, StressAlgebra.coordinateFactor] <;> ring |
| 668 | |
| 669 | theorem log_lags {p : Point} (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 670 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 671 | W.profiles.angularLag F.data.h (chart W.controls.radius p) = |
| 672 | HeatSwitchCone.Qs F W.controls.radius W.heat.coefficients p ∧ |
| 673 | W.profiles.axialLag F.data.h (chart W.controls.radius p) = |
| 674 | HeatSwitchCone.Ns F W.controls.radius W.heat.coefficients p := by |
| 675 | have hx := chart_positive W.controls.radius_pos p |
| 676 | have hmem := W.domain_contains hx.le heta |
| 677 | have hf := f_positive W hx heta |
| 678 | have hv := log_histories W hp.le heta |
| 679 | have hd := log_history_parameters W hp heta |
| 680 | have he := log_fields W hp heta |
| 681 | have hroot : Real.sqrt (2 * W.controls.radius) ≠ 0 := |
| 682 | (Real.sqrt_pos.2 (mul_pos (by norm_num) W.controls.radius_pos)).ne' |
| 683 | have hE : HeatSwitchCone.logE F W.controls.radius W.heat.coefficients p ≠ 0 := by |
| 684 | rw [← he.2.1] |
| 685 | exact W.profiles.E_ne_zero hx hf.ne' |
| 686 | constructor |
| 687 | · rw [W.profiles.angularLag_integrated F.data.h hmem hx.ne' (W.profiles.H_ne_zero hx.ne' hf.ne'), |
| 688 | log_transport W hp heta, hv.2.1, hv.2.2.1, hd.2.1, hd.2.2.1, he.2.2] |
| 689 | unfold HeatSwitchCone.Qs |
| 690 | simp only [chart] |
| 691 | rw [show 3 * p.1 / 2 = p.1 + p.1 / 2 by ring, Real.exp_add] |
| 692 | congr 1 |
| 693 | exact angular_scaled_quotient W.controls.radius_pos.ne' hroot _ _ _ _ _ _ _ _ _ _ _ |
| 694 | · rw [W.profiles.axialLag_integrated F.data.h hmem hx, log_transport W hp heta, |
| 695 | he.1, hv.1, hv.2.2.2, hd.1, hd.2.2.2.1, hd.2.2.2.2, log_pressure W hp heta] |
| 696 | unfold HeatSwitchCone.Ns |
| 697 | simp only [chart] |
| 698 | rw [scaled_difference_quotient W.controls.radius_pos.ne', |
| 699 | scaled_affine_quotient W.controls.radius_pos.ne'] |
| 700 | |
| 701 | theorem log_stocks {p : Point} (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 702 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 703 | ReferenceBounds.p1 W.profiles F.data.h (chart W.controls.radius p) = |
| 704 | HeatSwitchCone.stressScale F W.controls.radius W.heat.coefficients p ∧ |
| 705 | ReferenceBounds.p2 W.profiles F.data.h (chart W.controls.radius p) = |
| 706 | W.controls.radius * Real.exp p.1 * HeatSwitchCone.Ns F W.controls.radius W.heat.coefficients p / |
| 707 | (NaturalAxisData.L F.data.h p.2 * HeatSwitchCone.logE F W.controls.radius W.heat.coefficients p) := by |
| 708 | have hh := log_lags W hp heta |
| 709 | constructor |
| 710 | · rw [ReferenceBounds.p1, hh.1] |
| 711 | rfl |
| 712 | · rw [ReferenceBounds.p2, ReferenceBounds.ns, hh.2, (log_fields W hp heta).2.1] |
| 713 | simp only [chart] |
| 714 | ring |
| 715 | |
| 716 | /-- Both radial shears are derivatives of the actual fields. The signed |
| 717 | axial convention is explicitly the negative of the outgoing convention. -/ |
| 718 | theorem log_shears {p : Point} (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 719 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 720 | ActivationContinuation.shearA W.profiles (chart W.controls.radius p) = |
| 721 | HeatSwitchCone.radialA F W.controls.radius W.heat.coefficients p ∧ |
| 722 | ActivationContinuation.shearB W.profiles (chart W.controls.radius p) = |
| 723 | -HeatSwitchCone.radialB F W.controls.radius W.heat.coefficients p := by |
| 724 | have hx := chart_positive W.controls.radius_pos p |
| 725 | have hmem := W.domain_contains hx.le heta |
| 726 | have hf := f_positive W hx heta |
| 727 | have hr : Real.sqrt (2 * W.controls.radius) ≠ 0 := |
| 728 | (Real.sqrt_pos.2 (mul_pos (by norm_num) W.controls.radius_pos)).ne' |
| 729 | have hnear : ∀ᶠ y in 𝓝 p.1, W.controls.heatJoin < W.controls.radius * Real.exp y := |
| 730 | (continuous_const.mul Real.continuous_exp).continuousAt.eventually (Ioi_mem_nhds hp) |
| 731 | have hchart := (Real.hasDerivAt_exp p.1).const_mul W.controls.radius |
| 732 | have hfp := (radialPartial_hasDerivAt W.domain W.profiles.f_smooth hmem).comp p.1 hchart |
| 733 | have hup := (radialPartial_hasDerivAt W.domain W.profiles.U_smooth hmem).comp p.1 hchart |
| 734 | have hroot := (((hasDerivAt_id p.1).div_const 2).exp).const_mul (Real.sqrt (2 * W.controls.radius)) |
| 735 | have heq : (fun y => HeatSwitchCone.logE F W.controls.radius W.heat.coefficients (y, p.2)) =ᶠ[𝓝 p.1] |
| 736 | (fun y => (Real.sqrt (2 * W.controls.radius) * Real.exp (y / 2)) * |
| 737 | W.profiles.f (W.controls.radius * Real.exp y, p.2)) := by |
| 738 | filter_upwards [hnear] with y hy |
| 739 | rw [← (log_fields W (p := (y, p.2)) hy heta).2.1] |
| 740 | change Real.sqrt (2 * (W.controls.radius * Real.exp y)) * |
| 741 | W.profiles.f (W.controls.radius * Real.exp y, p.2) = _ |
| 742 | rw [sqrt_chart W.controls.radius_pos] |
| 743 | have hEder := (hroot.mul hfp).congr_of_eventuallyEq heq |
| 744 | have hueq : (fun y => F.logU (y, p.2)) =ᶠ[𝓝 p.1] |
| 745 | (fun y => W.profiles.U (W.controls.radius * Real.exp y, p.2)) := by |
| 746 | filter_upwards [hnear] with y hy |
| 747 | exact (log_fields W (p := (y, p.2)) hy heta).1.symm |
| 748 | have hUder := hup.congr_of_eventuallyEq hueq |
| 749 | constructor |
| 750 | · rw [HeatSwitchCone.radialA, hEder.deriv, heq.eq_of_nhds] |
| 751 | unfold ActivationContinuation.shearA |
| 752 | simp only [chart, id_eq, Function.comp_apply] |
| 753 | exact shear_dilation_cancel hr (Real.exp_ne_zero _) hf.ne' _ _ |
| 754 | · rw [HeatSwitchCone.radialB, OutgoingHistories.dY_eq_deriv F.logU_contDiff, hUder.deriv] |
| 755 | unfold ActivationContinuation.shearB |
| 756 | rw [(log_fields W hp heta).2.1] |
| 757 | simp only [chart] |
| 758 | ring |
| 759 | |
| 760 | end Witness |
| 761 | |
| 762 | theorem stock_ratio_identity (x q n L e : ℝ) (hq : q ≠ 0) : |
| 763 | x * n / (L * e) = (x * q / L) * (n / (e * q)) := by |
| 764 | by_cases hL : L = 0 |
| 765 | · simp [hL] |
| 766 | by_cases he : e = 0 |
| 767 | · simp [he] |
| 768 | field_simp |
| 769 | |
| 770 | theorem relaxed_scaled_coordinates {a b s r : ℝ} (ha : 0 < a) |
| 771 | (hp : 2 < s * (1 - b * r / a)) |
| 772 | (hc : a * (1 + (b / a) ^ 2) < |
| 773 | ConeAlgebra.coneBound (s * (1 - b * r / a)) (s * (r + b / a))) : |
| 774 | ActivationContinuation.Relaxed a (-b) s (s * r) := by |
| 775 | have hP : ActivationContinuation.projection s (s * r) a (-b) = s * (1 - b * r / a) := by |
| 776 | unfold ActivationContinuation.projection |
| 777 | ring |
| 778 | have hJ : ActivationContinuation.transverse s (s * r) a (-b) = s * (r + b / a) := by |
| 779 | unfold ActivationContinuation.transverse |
| 780 | ring |
| 781 | have hV : ActivationContinuation.shearSize a (-b) = a * (1 + (b / a) ^ 2) := by |
| 782 | simp only [ActivationContinuation.shearSize, neg_div, neg_sq] |
| 783 | exact ⟨ha, hP ▸ hp, by rwa [hV, hP, hJ]⟩ |
| 784 | |
| 785 | noncomputable def HeatRelaxedAt (F : Profile) (XR : ℝ) (coef : ℝ → HeatedOutgoing.Coeff) |
| 786 | (p : Point) : Prop := |
| 787 | 0 < HeatSwitchCone.Qs F XR coef p ∧ 0 < HeatSwitchCone.radialA F XR coef p ∧ |
| 788 | 2 < HeatSwitchCone.normalP F XR coef p ∧ |
| 789 | HeatSwitchCone.normalV F XR coef p < |
| 790 | ConeAlgebra.coneBound (HeatSwitchCone.normalP F XR coef p) (HeatSwitchCone.normalJ F XR coef p) |
| 791 | |
| 792 | /-- The pressure cancellation and all preceding histories are retained |
| 793 | before the first compensation patch, for every parameter. -/ |
| 794 | theorem heated_histories_before_patch (F : Profile) {R : ℝ} (hR : 0 < R) |
| 795 | (coef : ℝ → HeatedOutgoing.Coeff) {p : Point} (hp : p.1 ≤ OutgoingDilation.patchClock F) : |
| 796 | HeatSwitchCone.logI F R coef p = OutgoingHistories.I F.reset p ∧ |
| 797 | HeatSwitchCone.logS F R coef p = OutgoingHistories.S F.reset F.amp p ∧ |
| 798 | HeatSwitchCone.logPi F R coef p = OutgoingHistories.Pi F.reset p := by |
| 799 | have hdiff (t : ℝ) (ht : t ∈ uIcc (OutgoingDilation.patchClock F) p.1) : |
| 800 | HeatSwitchCone.logE F R coef (t, p.2) = F.logE (t, p.2) := |
| 801 | HeatSwitchCone.logE_before_patch F hR coef (ht.2.trans (max_le le_rfl hp)) |
| 802 | have hi : (∫ t in OutgoingDilation.patchClock F..p.1, |
| 803 | Real.exp (3 * t / 2) * (HeatSwitchCone.logE F R coef (t, p.2) - F.logE (t, p.2))) = 0 := by |
| 804 | calc |
| 805 | _ = ∫ _t in OutgoingDilation.patchClock F..p.1, (0 : ℝ) := by |
| 806 | apply intervalIntegral.integral_congr |
| 807 | intro t ht |
| 808 | dsimp only |
| 809 | rw [hdiff t ht, sub_self, mul_zero] |
| 810 | _ = 0 := by simp |
| 811 | have hs : (∫ t in OutgoingDilation.patchClock F..p.1, |
| 812 | Real.exp t * (HeatSwitchCone.logE F R coef (t, p.2) ^ 2 - F.logE (t, p.2) ^ 2)) = 0 := by |
| 813 | calc |
| 814 | _ = ∫ _t in OutgoingDilation.patchClock F..p.1, (0 : ℝ) := by |
| 815 | apply intervalIntegral.integral_congr |
| 816 | intro t ht |
| 817 | dsimp only |
| 818 | rw [hdiff t ht, sub_self, mul_zero] |
| 819 | _ = 0 := by simp |
| 820 | have hpi : (∫ t in OutgoingDilation.patchClock F..p.1, |
| 821 | HeatSwitchCone.logE F R coef (t, p.2) ^ 2 - F.logE (t, p.2) ^ 2) = 0 := by |
| 822 | calc |
| 823 | _ = ∫ _t in OutgoingDilation.patchClock F..p.1, (0 : ℝ) := by |
| 824 | apply intervalIntegral.integral_congr |
| 825 | intro t ht |
| 826 | dsimp only |
| 827 | rw [hdiff t ht, sub_self] |
| 828 | _ = 0 := by simp |
| 829 | simp only [HeatSwitchCone.logI, HeatSwitchCone.logS, HeatSwitchCone.logPi, hi, hs, hpi, |
| 830 | mul_zero, add_zero, sub_zero, and_self] |
| 831 | |
| 832 | theorem heated_lags_before_patch (F : Profile) {R : ℝ} (hR : 0 < R) |
| 833 | (coef : ℝ → HeatedOutgoing.Coeff) {p : Point} (hp : p.1 ≤ OutgoingDilation.patchClock F) |
| 834 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 835 | HeatSwitchCone.Qs F R coef p = OutgoingHistories.Qs F.reset F.amp p ∧ |
| 836 | HeatSwitchCone.Ns F R coef p = OutgoingHistories.Ns F.reset F.amp p := by |
| 837 | have hi : (fun eta => HeatSwitchCone.logI F R coef (p.1, eta)) = |
| 838 | (fun eta => OutgoingHistories.I F.reset (p.1, eta)) := |
| 839 | funext (fun eta => (heated_histories_before_patch F hR coef (p := (p.1, eta)) hp).1) |
| 840 | have hs : (fun eta => HeatSwitchCone.logS F R coef (p.1, eta)) = |
| 841 | (fun eta => OutgoingHistories.S F.reset F.amp (p.1, eta)) := |
| 842 | funext (fun eta => (heated_histories_before_patch F hR coef (p := (p.1, eta)) hp).2.1) |
| 843 | have hpi : (fun eta => HeatSwitchCone.logPi F R coef (p.1, eta)) = |
| 844 | (fun eta => OutgoingHistories.Pi F.reset (p.1, eta)) := |
| 845 | funext (fun eta => (heated_histories_before_patch F hR coef (p := (p.1, eta)) hp).2.2) |
| 846 | have hv := heated_histories_before_patch F hR coef hp |
| 847 | constructor |
| 848 | · rw [HeatSwitchCone.Qs, OutgoingHistories.Qs_integrated, hv.1, hi, |
| 849 | smooth_parameterWithin_eq_dEta (OutgoingHistories.I_smooth F.reset) heta, |
| 850 | HeatSwitchCone.logE_before_patch F hR coef hp, |
| 851 | show OutgoingHistories.X p * OutgoingHistories.H F.reset p = |
| 852 | Real.exp (3 * p.1 / 2) * F.logE p from OutgoingHistories.angularWeight_eq F.reset p] |
| 853 | · rw [HeatSwitchCone.Ns, OutgoingHistories.Ns_integrated, hv.2.1, hv.2.2, hs, hpi, |
| 854 | smooth_parameterWithin_eq_dEta (OutgoingHistories.S_smooth F.reset F.amp_contDiff) heta, |
| 855 | smooth_parameterWithin_eq_dEta (OutgoingHistories.Pi_smooth F.reset) heta] |
| 856 | rfl |
| 857 | |
| 858 | theorem heated_shears_before_patch (F : Profile) {R : ℝ} (hR : 0 < R) |
| 859 | (coef : ℝ → HeatedOutgoing.Coeff) {p : Point} (hp : p.1 < OutgoingDilation.patchClock F) : |
| 860 | HeatSwitchCone.radialA F R coef p = OutgoingEntranceCone.coneA F.reset p ∧ |
| 861 | HeatSwitchCone.radialB F R coef p = OutgoingEntranceCone.coneB F.reset F.amp p := by |
| 862 | have he : (fun y => HeatSwitchCone.logE F R coef (y, p.2)) =ᶠ[𝓝 p.1] |
| 863 | (fun y => F.logE (y, p.2)) := by |
| 864 | filter_upwards [Iio_mem_nhds hp] with y hy |
| 865 | exact HeatSwitchCone.logE_before_patch F hR coef hy.le |
| 866 | constructor |
| 867 | · rw [HeatSwitchCone.radialA, he.deriv_eq, HeatSwitchCone.logE_before_patch F hR coef hp.le, |
| 868 | OutgoingEntranceCone.coneA_eq_E_derivative, |
| 869 | OutgoingHistories.dY_eq_deriv (OutgoingHistories.E_smooth F.reset)] |
| 870 | rfl |
| 871 | · rw [HeatSwitchCone.radialB, HeatSwitchCone.logE_before_patch F hR coef hp.le] |
| 872 | rfl |
| 873 | |
| 874 | theorem heated_relaxed_before_patch (F : Profile) {R : ℝ} (hR : 0 < R) |
| 875 | (coef : ℝ → HeatedOutgoing.Coeff) {p : Point} (hp : p.1 < OutgoingDilation.patchClock F) |
| 876 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 877 | (hc : OutgoingCone.RelaxedAt F.reset F.amp R p) : HeatRelaxedAt F R coef p := by |
| 878 | have hl := heated_lags_before_patch F hR coef hp.le heta |
| 879 | have ha := heated_shears_before_patch F hR coef hp |
| 880 | have hr : HeatSwitchCone.ratio F R coef p = OutgoingEntranceCone.coneRatio F.reset F.amp p := by |
| 881 | simp only [HeatSwitchCone.ratio, hl.1, hl.2, HeatSwitchCone.logE_before_patch F hR coef hp.le] |
| 882 | rfl |
| 883 | have hs : HeatSwitchCone.stressScale F R coef p = OutgoingHistories.p1 R F.reset F.amp p := by |
| 884 | rw [HeatSwitchCone.stressScale, hl.1] |
| 885 | rfl |
| 886 | refine ⟨hl.1 ▸ hc.angular_positive, ha.1 ▸ hc.radial_positive, ?_, ?_⟩ |
| 887 | · simp only [HeatSwitchCone.normalP, HeatSwitchCone.sourceC, hs, ha.1, ha.2, hr] |
| 888 | exact hc.stress_gt_two |
| 889 | · simp only [HeatSwitchCone.normalP, HeatSwitchCone.normalJ, HeatSwitchCone.normalV, |
| 890 | HeatSwitchCone.sourceC, HeatSwitchCone.sourceJ, hs, ha.1, ha.2, hr] |
| 891 | exact hc.root_strict |
| 892 | |
| 893 | namespace Witness |
| 894 | |
| 895 | variable {F : Profile} (W : NominalProfile.Witness F) |
| 896 | |
| 897 | theorem log_second_stock {p : Point} (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 898 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 899 | (hq : HeatSwitchCone.Qs F W.controls.radius W.heat.coefficients p ≠ 0) : |
| 900 | ReferenceBounds.p2 W.profiles F.data.h (chart W.controls.radius p) = |
| 901 | HeatSwitchCone.stressScale F W.controls.radius W.heat.coefficients p * |
| 902 | HeatSwitchCone.ratio F W.controls.radius W.heat.coefficients p := by |
| 903 | rw [(log_stocks W hp heta).2] |
| 904 | exact stock_ratio_identity _ _ _ _ _ hq |
| 905 | |
| 906 | theorem heat_relaxed {p : Point} (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 907 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 908 | (hc : HeatRelaxedAt F W.controls.radius W.heat.coefficients p) : |
| 909 | ActivationContinuation.IsRelaxed W.profiles F.data.h (chart W.controls.radius p) := by |
| 910 | have hs := log_shears W hp heta |
| 911 | unfold ActivationContinuation.IsRelaxed |
| 912 | rw [hs.1, hs.2, (log_stocks W hp heta).1, log_second_stock W hp heta hc.1.ne'] |
| 913 | exact relaxed_scaled_coordinates hc.2.1 hc.2.2.1 hc.2.2.2 |
| 914 | |
| 915 | theorem heat_true {p : Point} (hp : W.controls.heatJoin < (chart W.controls.radius p).1) |
| 916 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 917 | (hc : HeatSwitchCone.TrueAt F W.controls.radius W.heat.coefficients p) : |
| 918 | IsTrue W.profiles F.data.h (chart W.controls.radius p) := by |
| 919 | refine ⟨heat_relaxed W hp heta ⟨hc.1, hc.2.1, hc.2.2.2.1, hc.2.2.2.2⟩, ?_⟩ |
| 920 | rw [(log_shears W hp heta).1, (log_shears W hp heta).2] |
| 921 | simp only [ActivationContinuation.shearSize, neg_div, neg_sq] |
| 922 | exact hc.2.2.1 |
| 923 | |
| 924 | theorem chart_after_match {p : Point} (hp : 0 ≤ p.1) : |
| 925 | W.controls.heatJoin < (chart W.controls.radius p).1 := by |
| 926 | exact W.controls.heatJoin_lt_radius.trans_le |
| 927 | (le_mul_of_one_le_right W.controls.radius_pos.le (Real.one_le_exp hp)) |
| 928 | |
| 929 | theorem chart_after_matching {p : Point} (hp : (-5 : ℝ) < p.1) : |
| 930 | W.controls.heatJoin < (chart W.controls.radius p).1 := |
| 931 | mul_lt_mul_of_pos_left (Real.exp_lt_exp.mpr hp) W.controls.radius_pos |
| 932 | |
| 933 | theorem clean_relaxed_before_hold |
| 934 | (hc : OutgoingCone.ProfileCleanCone F W.controls.radius (-5)) {p : Point} |
| 935 | (hy : (-5 : ℝ) < p.1) (hhold : p.1 ≤ F.data.core.holdStart) |
| 936 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 937 | ActivationContinuation.IsRelaxed W.profiles F.data.h (chart W.controls.radius p) := by |
| 938 | have hend : F.data.core.holdStart ≤ OutgoingCone.cleanEnd F.data := |
| 939 | (OutgoingTail.coreEndpoint_ge_hold F.data).trans |
| 940 | (TerminalHistoryBridge.terminalStart_after_endpoint F).le |
| 941 | exact heat_relaxed W (chart_after_matching W hy) heta |
| 942 | (heated_relaxed_before_patch F W.controls.radius_pos W.heat.coefficients |
| 943 | (hhold.trans_lt (OutgoingDilation.patchClock_after_hold F)) heta |
| 944 | (hc.relaxed p ⟨⟨hy.le, hhold.trans hend⟩, heta⟩)) |
| 945 | |
| 946 | theorem terminal_true {y eta : ℝ} (hsmall : TerminalCone.SmallTail F.data) |
| 947 | (hXR : TerminalCone.radiusThreshold F ≤ W.controls.radius) |
| 948 | (hy : TerminalCone.terminalStart F.data ≤ y) (hy' : y < OutgoingTail.tailEnd F.data) |
| 949 | (heta : eta ∈ HeatedOutgoing.parameterDomain) : |
| 950 | IsTrue W.profiles F.data.h (chart W.controls.radius (y, eta)) := by |
| 951 | have hy0 : 0 ≤ y := (SchedulePressure.endpoint_pos F.data).le.trans |
| 952 | ((TerminalHistoryBridge.terminalStart_after_endpoint F).le.trans hy) |
| 953 | exact heat_true W (chart_after_match W hy0) heta |
| 954 | (TerminalHistoryBridge.terminal_forward_cone F W.outgoing_specification W.heat.physical |
| 955 | hsmall hXR hy hy' heta).1 |
| 956 | |
| 957 | end Witness |
| 958 | |
| 959 | /-! ## A compensation bound chosen before the entrance radius -/ |
| 960 | |
| 961 | structure CompensatedFamily (F : Profile) where |
| 962 | bound : ℝ |
| 963 | bound_pos : 0 < bound |
| 964 | radiusFloor : ℝ |
| 965 | radiusFloor_pos : 0 < radiusFloor |
| 966 | branches : ∀ XR : ℝ, radiusFloor ≤ XR → Nonempty (ExtendedHeatedOutgoing.Witness F XR bound) |
| 967 | true_from_hold : ∀ XR : ℝ, radiusFloor ≤ XR → |
| 968 | ∀ w : ExtendedHeatedOutgoing.Witness F XR bound, |
| 969 | ∀ p ∈ OutgoingCone.trueWindow F.data, HeatSwitchCone.TrueAt F XR w.coefficients p |
| 970 | |
| 971 | theorem exists_compensatedFamily (F : Profile) {anchor left : ℝ} |
| 972 | (hc : OutgoingCone.CleanOutgoingCone F.reset anchor left) (ha : 0 < anchor) : |
| 973 | Nonempty (CompensatedFamily F) := by |
| 974 | obtain ⟨R0, B, hR0, hB, hbranches⟩ := ExtendedHeatedOutgoing.exists_witness F |
| 975 | obtain ⟨R1, _hR1, hcone⟩ := HeatSwitchCone.preserves_true_cone F hc ha B |
| 976 | exact ⟨⟨B, hB, max R0 R1, hR0.trans_le (le_max_left _ _), |
| 977 | fun XR hXR => hbranches XR ((le_max_left _ _).trans hXR), |
| 978 | fun XR hXR w p hp => hcone XR ((le_max_right _ _).trans hXR) w.physical p hp⟩⟩ |
| 979 | |
| 980 | namespace CompensatedFamily |
| 981 | |
| 982 | variable {F : Profile} (G : CompensatedFamily F) |
| 983 | |
| 984 | /-- The actual heat witness and the nominal fields are constructed only after |
| 985 | the same physical radius has met the previously fixed bound. -/ |
| 986 | noncomputable def assemble {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 987 | (A : AxisStage F) (c : Controls A) (hr : G.radiusFloor ≤ c.radius) |
| 988 | (hsep : c.separation ≤ Real.exp (-8)) |
| 989 | (hs : ∀ eta ∈ HeatedOutgoing.parameterDomain, SmallDebt F c.debt eta) : NominalProfile.Witness F := |
| 990 | ⟨A, c, D, hF, G.bound, Classical.choice (G.branches c.radius hr), hsep, hs⟩ |
| 991 | |
| 992 | theorem assemble_axis {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 993 | (A : AxisStage F) (c : Controls A) (hr : G.radiusFloor ≤ c.radius) |
| 994 | (hsep : c.separation ≤ Real.exp (-8)) |
| 995 | (hs : ∀ eta ∈ HeatedOutgoing.parameterDomain, SmallDebt F c.debt eta) : |
| 996 | (G.assemble hF A c hr hsep hs).axis = A := rfl |
| 997 | |
| 998 | theorem assemble_controls {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 999 | (A : AxisStage F) (c : Controls A) (hr : G.radiusFloor ≤ c.radius) |
| 1000 | (hsep : c.separation ≤ Real.exp (-8)) |
| 1001 | (hs : ∀ eta ∈ HeatedOutgoing.parameterDomain, SmallDebt F c.debt eta) : |
| 1002 | (G.assemble hF A c hr hsep hs).controls = c := rfl |
| 1003 | |
| 1004 | theorem assemble_bound {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 1005 | (A : AxisStage F) (c : Controls A) (hr : G.radiusFloor ≤ c.radius) |
| 1006 | (hsep : c.separation ≤ Real.exp (-8)) |
| 1007 | (hs : ∀ eta ∈ HeatedOutgoing.parameterDomain, SmallDebt F c.debt eta) : |
| 1008 | (G.assemble hF A c hr hsep hs).heatBound = G.bound := rfl |
| 1009 | |
| 1010 | theorem assemble_true_from_hold {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 1011 | (A : AxisStage F) (c : Controls A) (hr : G.radiusFloor ≤ c.radius) |
| 1012 | (hsep : c.separation ≤ Real.exp (-8)) |
| 1013 | (hs : ∀ eta ∈ HeatedOutgoing.parameterDomain, SmallDebt F c.debt eta) |
| 1014 | (p : Point) (hp : p ∈ OutgoingCone.trueWindow F.data) : |
| 1015 | HeatSwitchCone.TrueAt F c.radius (G.assemble hF A c hr hsep hs).heat.coefficients p := |
| 1016 | G.true_from_hold c.radius hr _ p hp |
| 1017 | |
| 1018 | theorem assemble_profile_true {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 1019 | (A : AxisStage F) (c : Controls A) (hr : G.radiusFloor ≤ c.radius) |
| 1020 | (hsep : c.separation ≤ Real.exp (-8)) |
| 1021 | (hs : ∀ eta ∈ HeatedOutgoing.parameterDomain, SmallDebt F c.debt eta) |
| 1022 | (p : Point) (hp : p ∈ OutgoingCone.trueWindow F.data) : |
| 1023 | IsTrue (G.assemble hF A c hr hsep hs).profiles F.data.h (chart c.radius p) := by |
| 1024 | let W := G.assemble hF A c hr hsep hs |
| 1025 | have hy0 : 0 ≤ p.1 := F.data.core.holdStart_pos.le.trans hp.1.1 |
| 1026 | exact Witness.heat_true W (Witness.chart_after_match W hy0) hp.2 |
| 1027 | (G.assemble_true_from_hold hF A c hr hsep hs p hp) |
| 1028 | |
| 1029 | theorem assemble_profile_true_late {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 1030 | (A : AxisStage F) (c : Controls A) (hr : G.radiusFloor ≤ c.radius) |
| 1031 | (hsep : c.separation ≤ Real.exp (-8)) |
| 1032 | (hs : ∀ eta ∈ HeatedOutgoing.parameterDomain, SmallDebt F c.debt eta) |
| 1033 | (hsmall : TerminalCone.SmallTail F.data) (hXR : TerminalCone.radiusThreshold F ≤ c.radius) |
| 1034 | {p : Point} (hp : F.data.core.holdStart ≤ p.1) (hend : p.1 < OutgoingTail.tailEnd F.data) |
| 1035 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 1036 | IsTrue (G.assemble hF A c hr hsep hs).profiles F.data.h (chart c.radius p) := by |
| 1037 | by_cases hy : p.1 ≤ OutgoingCone.cleanEnd F.data |
| 1038 | · exact G.assemble_profile_true hF A c hr hsep hs p ⟨⟨hp, hy⟩, heta⟩ |
| 1039 | · exact Witness.terminal_true (G.assemble hF A c hr hsep hs) hsmall hXR |
| 1040 | (le_of_not_ge hy) hend heta |
| 1041 | |
| 1042 | theorem assemble_profile_relaxed_outer {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 1043 | (A : AxisStage F) (c : Controls A) (hr : G.radiusFloor ≤ c.radius) |
| 1044 | (hsep : c.separation ≤ Real.exp (-8)) |
| 1045 | (hs : ∀ eta ∈ HeatedOutgoing.parameterDomain, SmallDebt F c.debt eta) |
| 1046 | (hsmall : TerminalCone.SmallTail F.data) (hXR : TerminalCone.radiusThreshold F ≤ c.radius) |
| 1047 | (hclean : OutgoingCone.ProfileCleanCone F c.radius (-5)) |
| 1048 | {p : Point} (hp : (-5 : ℝ) < p.1) (hend : p.1 < OutgoingTail.tailEnd F.data) |
| 1049 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 1050 | ActivationContinuation.IsRelaxed (G.assemble hF A c hr hsep hs).profiles F.data.h |
| 1051 | (chart c.radius p) := by |
| 1052 | by_cases hy : p.1 ≤ F.data.core.holdStart |
| 1053 | · exact Witness.clean_relaxed_before_hold (G.assemble hF A c hr hsep hs) hclean hp hy heta |
| 1054 | · exact (G.assemble_profile_true_late hF A c hr hsep hs hsmall hXR (le_of_not_ge hy) hend heta).1 |
| 1055 | |
| 1056 | /-- The already selected axis stage and continuation are used literally in |
| 1057 | the final fields; only the compensation branch is selected here. -/ |
| 1058 | noncomputable def assemblePrepared {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 1059 | {N : ℕ} {delta radiusFloor : ℝ} |
| 1060 | (M : MatchingConeBounds.PreparedWitness F N delta radiusFloor) |
| 1061 | (hr : G.radiusFloor ≤ radiusFloor) : NominalProfile.Witness F := |
| 1062 | G.assemble hF M.axis M.controls (hr.trans M.bounds.radius_large) |
| 1063 | M.bounds.matching.separation.le (fun _eta heta => M.bounds.matching.smallDebt M.bounds.debt_radius heta) |
| 1064 | |
| 1065 | theorem prepared_continuation_relaxed {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 1066 | {N : ℕ} {delta radiusFloor : ℝ} |
| 1067 | (M : MatchingConeBounds.PreparedWitness F N delta radiusFloor) |
| 1068 | (hr : G.radiusFloor ≤ radiusFloor) {p : Point} |
| 1069 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) |
| 1070 | (hp : p.1 ∈ Icc M.continuation.parameters.startRadius (110 : ℝ)) : |
| 1071 | ActivationContinuation.IsRelaxed (G.assemblePrepared hF M hr).profiles F.data.h p := |
| 1072 | Witness.continuation_relaxed (G.assemblePrepared hF M hr) M.continuation M.shapeTime_pos rfl heta hp |
| 1073 | |
| 1074 | theorem prepared_shape_relaxed {D : ℝ} (hF : OutgoingProfile.Specification F D) |
| 1075 | {N : ℕ} {delta radiusFloor : ℝ} |
| 1076 | (M : MatchingConeBounds.PreparedWitness F N delta radiusFloor) |
| 1077 | (hr : G.radiusFloor ≤ radiusFloor) {X eta : ℝ} |
| 1078 | (hX : NominalProfile.Xi ≤ X) (hR : X ≤ M.controls.radius * Real.exp (-8)) |
| 1079 | (heta : eta ∈ HeatedOutgoing.parameterDomain) : |
| 1080 | ActivationContinuation.IsRelaxed (G.assemblePrepared hF M hr).profiles F.data.h (X, eta) := by |
| 1081 | let W := G.assemblePrepared hF M hr |
| 1082 | have hsmall := M.bounds.matching.smallDebt M.bounds.debt_radius heta |
| 1083 | have hinit := continuation_first_at_Xi M.continuation M.shapeTime_pos |
| 1084 | M.bounds.matching.separation.le hsmall heta |
| 1085 | have hc := M.bounds.shape_relaxed hX hR heta hinit |
| 1086 | apply Witness.prefix_relaxed W (NominalProfile.Xi_pos.trans_le hX) _ heta hc |
| 1087 | exact hR.trans (mul_le_mul_of_nonneg_left |
| 1088 | (Real.exp_le_exp.mpr (by norm_num : (-8 : ℝ) ≤ -5)) M.controls.radius_pos.le) |
| 1089 | |
| 1090 | end CompensatedFamily |
| 1091 | |
| 1092 | namespace Initial |
| 1093 | |
| 1094 | open NaturalAxisCoefficients |
| 1095 | |
| 1096 | /-- Exact physical shears on the initial natural collar. -/ |
| 1097 | theorem physical_initial_shears {h j σ Λ C : ℝ} {P0 : ℝ → ℝ} {d : AnalyticInputs h j σ P0} |
| 1098 | (E : NaturalEntrance.EntranceProfile d Λ C) {hΛ : 0 < Λ} |
| 1099 | {hsmall : NaturalAxisData.SmallParameters h j} {hP0 : ContDiff ℝ ∞ P0} |
| 1100 | (r : ActivationContinuation.RampParameters E.profile.family hΛ hsmall hP0) |
| 1101 | {y η : ℝ} (hy : y ≤ r.refTime) (hη : η ∈ ReferencePath.parameterInterval) : |
| 1102 | let N := ReferencePath.Input.ofNatural hΛ E.profile.family |
| 1103 | let L := StressActivation.FromReference.refLog N r.refTime |
| 1104 | let U := StressActivation.FromReference.refAxial N r.refTime |
| 1105 | let z : Point := (radius N.endpoint y, η) |
| 1106 | ActivationContinuation.shearA r.profiles z = actualP1 r.actTime r.kappa L (y, η) ∧ |
| 1107 | ActivationContinuation.shearB r.profiles z = actualP2 r.actTime r.kappa N.endpoint L U (y, η) := by |
| 1108 | let N := ReferencePath.Input.ofNatural hΛ E.profile.family |
| 1109 | let L := StressActivation.FromReference.refLog N r.refTime |
| 1110 | let U := StressActivation.FromReference.refAxial N r.refTime |
| 1111 | let z : Point := (radius N.endpoint y, η) |
| 1112 | let R := r.reference |
| 1113 | let P := r.profiles |
| 1114 | have hx : 0 < z.1 := mul_pos N.endpoint_pos (Real.exp_pos y) |
| 1115 | have hlog : R.logPoint z = (y, η) := by |
| 1116 | change (R.logTime (radius R.radius0 y), η) = (y, η) |
| 1117 | rw [R.logTime_chart] |
| 1118 | have hd := TransitionRamp.physical_radial_equations E.profile.family hΛ hsmall |
| 1119 | r.refTime_pos r.refTime_bound hP0 (κ := r.kappa) r.actTime_pos r.before_big |
| 1120 | r.widthU_pos r.widthA_pos hη hx |
| 1121 | change (z.1 * radialPartial P.f z / P.f z = |
| 1122 | TransitionRamp.angularSlope r.actTime r.kappa R.bigTime r.widthU r.widthA R.angularStock (R.logPoint z)) ∧ |
| 1123 | (z.1 * radialPartial P.U z = |
| 1124 | TransitionRamp.axialSlope r.actTime r.kappa R.bigTime r.widthU R.axialStock (R.logPoint z)) at hd |
| 1125 | rw [hlog] at hd |
| 1126 | have hs := TransitionRamp.ofNatural_stock_slopes E.profile.family hΛ hsmall |
| 1127 | r.refTime_pos r.refTime_bound hP0 y hy hη |
| 1128 | change R.angularStock (y, η) = -2 * radialPartial L (y, η) ∧ |
| 1129 | R.axialStock (y, η) = -2 * radialPartial U (y, η) at hs |
| 1130 | have hb : y ≤ R.bigTime := hy.trans r.before_big |
| 1131 | have hb' : y ≤ R.bigTime + r.widthU := by linarith [r.widthU_pos] |
| 1132 | have hR : z.1 ≤ N.endpoint * Real.exp r.refTime := |
| 1133 | mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hy) N.endpoint_pos.le |
| 1134 | have hf : P.f z = activatedAngular r.actTime r.kappa L (y, η) := |
| 1135 | (r.initial_fields hη hR).1.trans |
| 1136 | (StressActivation.FromReference.f_logPullback N r.actTime_pos r.refTime_pos r.refTime_bound r.kappa y hη) |
| 1137 | have hE : P.E z = velocity N.endpoint (activatedAngular r.actTime r.kappa L) (y, η) := by |
| 1138 | change Real.sqrt (2 * z.1) * P.f z = _ |
| 1139 | rw [hf] |
| 1140 | rfl |
| 1141 | have hL := StressActivation.FromReference.refLog_smooth N r.refTime_pos r.refTime_bound |
| 1142 | have hU := StressActivation.FromReference.refAxial_smooth N r.refTime_pos r.refTime_bound |
| 1143 | constructor |
| 1144 | · change ActivationContinuation.shearA P z = _ |
| 1145 | calc |
| 1146 | _ = -2 * (z.1 * radialPartial P.f z / P.f z) := by unfold ActivationContinuation.shearA; ring |
| 1147 | _ = -2 * TransitionRamp.baseSlope r.actTime r.kappa R.angularStock (y, η) := by |
| 1148 | rw [hd.1, TransitionRamp.angularSlope_before r.widthA_pos R.angularStock hb'] |
| 1149 | _ = damping r.actTime r.kappa y * referenceP1 L (y, η) := by |
| 1150 | unfold TransitionRamp.baseSlope |
| 1151 | rw [hs.1] |
| 1152 | unfold referenceP1 |
| 1153 | ring |
| 1154 | _ = _ := (actualP1_eq r.actTime r.kappa ReferencePath.parameterInterval_open hL y hη).symm |
| 1155 | · change ActivationContinuation.shearB P z = _ |
| 1156 | calc |
| 1157 | _ = -2 * (z.1 * radialPartial P.U z) / P.E z := by unfold ActivationContinuation.shearB; ring |
| 1158 | _ = -2 * TransitionRamp.baseSlope r.actTime r.kappa R.axialStock (y, η) / |
| 1159 | velocity N.endpoint (activatedAngular r.actTime r.kappa L) (y, η) := by |
| 1160 | rw [hd.2, TransitionRamp.axialSlope_before r.widthU_pos R.axialStock hb, hE] |
| 1161 | _ = -2 * (damping r.actTime r.kappa y * radialPartial U (y, η)) / |
| 1162 | velocity N.endpoint (activatedAngular r.actTime r.kappa L) (y, η) := by |
| 1163 | unfold TransitionRamp.baseSlope |
| 1164 | rw [hs.2] |
| 1165 | ring |
| 1166 | _ = _ := by |
| 1167 | unfold actualP2 |
| 1168 | rw [(controlled_hasDerivAt r.actTime r.kappa ReferencePath.parameterInterval_open hU y hη).deriv] |
| 1169 | |
| 1170 | /-- Positivity from this same constructed entrance profile. -/ |
| 1171 | theorem referenceP1_positive_initial {h j σ Λ C : ℝ} {P0 : ℝ → ℝ} {d : AnalyticInputs h j σ P0} |
| 1172 | (E : NaturalEntrance.EntranceProfile d Λ C) {hΛ : 0 < Λ} |
| 1173 | {hsmall : NaturalAxisData.SmallParameters h j} {hP0 : ContDiff ℝ ∞ P0} |
| 1174 | (r : ActivationContinuation.RampParameters E.profile.family hΛ hsmall hP0) |
| 1175 | {y η : ℝ} (hy : y ≤ r.refTime) (hη : η ∈ Icc (-1 : ℝ) 1) : |
| 1176 | 0 < referenceP1 (StressActivation.FromReference.refLog |
| 1177 | (ReferencePath.Input.ofNatural hΛ E.profile.family) r.refTime) (y, η) := by |
| 1178 | let N := ReferencePath.Input.ofNatural hΛ E.profile.family |
| 1179 | rw [ActivationCone.referenceP1_natural N r.refTime_pos r.refTime_bound hy (original_interval_interior hη)] |
| 1180 | apply E.slope_positive |
| 1181 | · change (Λ * (N.fromLog (y, η)).1, η) ∈ NaturalEntrance.entranceSet |
| 1182 | have hyT : y < ReferencePath.rampLimit := by linarith [r.refTime_pos, r.refTime_bound] |
| 1183 | have he : Real.exp y < 41 / 40 := by |
| 1184 | simpa only [ReferencePath.rampLimit, Real.exp_log (by norm_num : (0 : ℝ) < 41 / 40)] |
| 1185 | using Real.exp_lt_exp.mpr hyT |
| 1186 | have hid : Λ * (N.fromLog (y, η)).1 = 4 * Real.exp y := N.fromLog_scaled (y, η) |
| 1187 | exact ⟨⟨by rw [hid]; positivity, by rw [hid]; linarith⟩, hη⟩ |
| 1188 | · exact mul_pos N.endpoint_pos (Real.exp_pos y) |
| 1189 | |
| 1190 | theorem shearSize_eq_initial (a b : ℝ) (ha : a ≠ 0) : |
| 1191 | ActivationContinuation.shearSize a b = a + b ^ 2 / a := by |
| 1192 | unfold ActivationContinuation.shearSize |
| 1193 | field_simp |
| 1194 | |
| 1195 | theorem projection_eq_initial (h X0 T κ : ℝ) (I : HistoryRow → ℝ → ℝ) |
| 1196 | (L U : ProfileHistories.Field) (p : Point) : |
| 1197 | ActivationContinuation.projection (ActivationCone.activatedStockOne h X0 I L U T κ p) |
| 1198 | (ActivationCone.activatedStockTwo h X0 I L U T κ p) |
| 1199 | (actualP1 T κ L p) (actualP2 T κ X0 L U p) = |
| 1200 | ActivationCone.activatedProjection h X0 I L U T κ p := rfl |
| 1201 | |
| 1202 | theorem transverse_eq_initial (h X0 T κ : ℝ) (I : HistoryRow → ℝ → ℝ) |
| 1203 | (L U : ProfileHistories.Field) (p : Point) : |
| 1204 | ActivationContinuation.transverse (ActivationCone.activatedStockOne h X0 I L U T κ p) |
| 1205 | (ActivationCone.activatedStockTwo h X0 I L U T κ p) |
| 1206 | (actualP1 T κ L p) (actualP2 T κ X0 L U p) = |
| 1207 | ActivationCone.activatedCross h X0 I L U T κ p := rfl |
| 1208 | |
| 1209 | |
| 1210 | /-- The actual ACT histories of the same continuation witness give the |
| 1211 | logarithmic stock coordinates in its initial activation certificate. -/ |
| 1212 | theorem physical_initial_stocks {h j σ Λ C : ℝ} {P0 : ℝ → ℝ} |
| 1213 | {d : AnalyticInputs h j σ P0} (E : NaturalEntrance.EntranceProfile d Λ C) |
| 1214 | {hΛ : 0 < Λ} {hsmall : NaturalAxisData.SmallParameters h j} |
| 1215 | {hP0 : ContDiff ℝ ∞ P0} |
| 1216 | (r : ActivationContinuation.RampParameters E.profile.family hΛ hsmall hP0) |
| 1217 | {y η : ℝ} (hy : y ≤ r.refTime) (hη : η ∈ ReferencePath.parameterInterval) : |
| 1218 | let N := ReferencePath.Input.ofNatural hΛ E.profile.family |
| 1219 | let L := StressActivation.FromReference.refLog N r.refTime |
| 1220 | let U := StressActivation.FromReference.refAxial N r.refTime |
| 1221 | let I := ActivationStocks.FromReference.initial N r.refTime_pos r.refTime_bound P0 hP0 |
| 1222 | let z : Point := (radius N.endpoint y, η) |
| 1223 | ReferenceBounds.p1 r.profiles h z = |
| 1224 | ActivationCone.activatedStockOne h N.endpoint I L U r.actTime r.kappa (y, η) ∧ |
| 1225 | ReferenceBounds.p2 r.profiles h z = |
| 1226 | ActivationCone.activatedStockTwo h N.endpoint I L U r.actTime r.kappa (y, η) := by |
| 1227 | let N := ReferencePath.Input.ofNatural hΛ E.profile.family |
| 1228 | let z : Point := (radius N.endpoint y, η) |
| 1229 | let Q := StressActivation.FromReference.histories N r.actTime_pos r.refTime_pos |
| 1230 | r.refTime_bound r.kappa P0 hP0 |
| 1231 | have hz : z ∈ N.radialDomain.carrier := StressActivation.FromReference.log_radius_mem N y hη |
| 1232 | have hX : 0 < z.1 := mul_pos N.endpoint_pos (Real.exp_pos y) |
| 1233 | have hR : z.1 ≤ N.endpoint * Real.exp r.refTime := |
| 1234 | mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hy) N.endpoint_pos.le |
| 1235 | have hf : Q.f z ≠ 0 := |
| 1236 | (StressActivation.FromReference.f_pos N r.actTime r.kappa r.refTime hz hX.le).ne' |
| 1237 | have hc := NominalConeAssembly.coordinates_of_prefix r.profiles Q h |
| 1238 | ReferencePath.parameterInterval_open (R := N.endpoint * Real.exp r.refTime) rfl |
| 1239 | (fun p hp hpR => (r.initial_fields hp hpR).1) |
| 1240 | (fun p hp hpR => (r.initial_fields hp hpR).2) |
| 1241 | (p := z) hz hz hX hR hη hf |
| 1242 | have h1 := ActivationStocks.FromReference.actual_stockOne_logView N r.actTime_pos |
| 1243 | r.refTime_pos r.refTime_bound r.kappa h P0 hP0 y hη |
| 1244 | have h2 := ActivationStocks.FromReference.actual_stockTwo_logView N r.actTime_pos |
| 1245 | r.refTime_pos r.refTime_bound r.kappa h P0 hP0 y hη |
| 1246 | refine ⟨hc.2.2.1.trans ?_, hc.2.2.2.trans ?_⟩ |
| 1247 | · exact (NominalConeAssembly.p1_eq_stock Q h z).trans h1 |
| 1248 | · exact (NominalConeAssembly.p2_eq_stock Q h z).trans h2 |
| 1249 | |
| 1250 | |
| 1251 | theorem activation_cone {h j σ Λ C : ℝ} {P0 : ℝ → ℝ} |
| 1252 | {d : AnalyticInputs h j σ P0} (E : NaturalEntrance.EntranceProfile d Λ C) |
| 1253 | {hΛ : 0 < Λ} {hsmall : NaturalAxisData.SmallParameters h j} |
| 1254 | {hP0 : ContDiff ℝ ∞ P0} {order : ℕ} {eps : ℝ} |
| 1255 | (w : ActivationContinuation.ContinuationWitness E hΛ hsmall hP0 order eps) : |
| 1256 | let N := ReferencePath.Input.ofNatural hΛ E.profile.family |
| 1257 | (∀ y eta : ℝ, 0 < y → y ≤ w.parameters.actTime → eta ∈ Icc (-1 : ℝ) 1 → |
| 1258 | ActivationContinuation.IsRelaxed w.parameters.profiles h (radius N.endpoint y, eta)) ∧ |
| 1259 | ∃ t : ℝ, 0 < t ∧ t ≤ w.parameters.actTime ∧ |
| 1260 | ∀ y eta : ℝ, 0 < y → y ≤ t → eta ∈ Icc (-1 : ℝ) 1 → |
| 1261 | IsTrue w.parameters.profiles h (radius N.endpoint y, eta) := by |
| 1262 | let r := w.parameters |
| 1263 | let N := ReferencePath.Input.ofNatural hΛ E.profile.family |
| 1264 | let L := StressActivation.FromReference.refLog N r.refTime |
| 1265 | let U := StressActivation.FromReference.refAxial N r.refTime |
| 1266 | let I := ActivationStocks.FromReference.initial N r.refTime_pos r.refTime_bound P0 hP0 |
| 1267 | obtain ⟨theta, htheta, htheta1, hcert⟩ := w.initial_activation |
| 1268 | have hpositive (y eta : ℝ) (hy : y ≤ r.actTime) (heta : eta ∈ Icc (-1 : ℝ) 1) : |
| 1269 | 0 < actualP1 r.actTime r.kappa L (y, eta) := by |
| 1270 | exact actualP1_pos r.actTime ⟨r.kappa_pos, r.kappa_lt_one.le⟩ |
| 1271 | ReferencePath.parameterInterval_open |
| 1272 | (StressActivation.FromReference.refLog_smooth N r.refTime_pos r.refTime_bound) y |
| 1273 | (original_interval_interior heta) (referenceP1_positive_initial E r (hy.trans r.actTime_le) heta) |
| 1274 | have hsize (y eta : ℝ) (hy : y ≤ r.actTime) (heta : eta ∈ Icc (-1 : ℝ) 1) : |
| 1275 | ActivationContinuation.shearSize |
| 1276 | (ActivationContinuation.shearA r.profiles (radius N.endpoint y, eta)) |
| 1277 | (ActivationContinuation.shearB r.profiles (radius N.endpoint y, eta)) = |
| 1278 | StressActivation.shearSize r.actTime r.kappa N.endpoint L U (y, eta) := by |
| 1279 | have hs := physical_initial_shears E r (hy.trans r.actTime_le) (original_interval_interior heta) |
| 1280 | rw [hs.1, hs.2, shearSize_eq_initial _ _ (hpositive y eta hy heta).ne'] |
| 1281 | rfl |
| 1282 | have hproj (y eta : ℝ) (hy : y ≤ r.actTime) (heta : eta ∈ Icc (-1 : ℝ) 1) : |
| 1283 | ActivationContinuation.projection |
| 1284 | (ReferenceBounds.p1 r.profiles h (radius N.endpoint y, eta)) |
| 1285 | (ReferenceBounds.p2 r.profiles h (radius N.endpoint y, eta)) |
| 1286 | (ActivationContinuation.shearA r.profiles (radius N.endpoint y, eta)) |
| 1287 | (ActivationContinuation.shearB r.profiles (radius N.endpoint y, eta)) = |
| 1288 | ActivationCone.activatedProjection h N.endpoint I L U r.actTime r.kappa (y, eta) := by |
| 1289 | have hs := physical_initial_shears E r (hy.trans r.actTime_le) (original_interval_interior heta) |
| 1290 | have hp := physical_initial_stocks E r (hy.trans r.actTime_le) (original_interval_interior heta) |
| 1291 | rw [hs.1, hs.2, hp.1, hp.2] |
| 1292 | rfl |
| 1293 | have hcross (y eta : ℝ) (hy : y ≤ r.actTime) (heta : eta ∈ Icc (-1 : ℝ) 1) : |
| 1294 | ActivationContinuation.transverse |
| 1295 | (ReferenceBounds.p1 r.profiles h (radius N.endpoint y, eta)) |
| 1296 | (ReferenceBounds.p2 r.profiles h (radius N.endpoint y, eta)) |
| 1297 | (ActivationContinuation.shearA r.profiles (radius N.endpoint y, eta)) |
| 1298 | (ActivationContinuation.shearB r.profiles (radius N.endpoint y, eta)) = |
| 1299 | ActivationCone.activatedCross h N.endpoint I L U r.actTime r.kappa (y, eta) := by |
| 1300 | have hs := physical_initial_shears E r (hy.trans r.actTime_le) (original_interval_interior heta) |
| 1301 | have hp := physical_initial_stocks E r (hy.trans r.actTime_le) (original_interval_interior heta) |
| 1302 | rw [hs.1, hs.2, hp.1, hp.2] |
| 1303 | rfl |
| 1304 | have hrelaxed (y eta : ℝ) (hy0 : 0 < y) (hy : y ≤ r.actTime) (heta : eta ∈ Icc (-1 : ℝ) 1) : |
| 1305 | ActivationContinuation.IsRelaxed r.profiles h (radius N.endpoint y, eta) := by |
| 1306 | have hc := hcert y ⟨hy0, hy⟩ eta heta |
| 1307 | have hs := physical_initial_shears E r (hy.trans r.actTime_le) (original_interval_interior heta) |
| 1308 | refine ⟨?_, ?_, ?_⟩ |
| 1309 | · rw [hs.1] |
| 1310 | exact hpositive y eta hy heta |
| 1311 | · rw [hproj y eta hy heta] |
| 1312 | exact lt_trans (by norm_num : (2 : ℝ) < 2 + 1 / 32) hc.2.1 |
| 1313 | · rw [hsize y eta hy heta, hproj y eta hy heta, hcross y eta hy heta] |
| 1314 | exact hc.2.2.2.1 |
| 1315 | refine ⟨hrelaxed, theta * r.actTime, mul_pos htheta r.actTime_pos, ?_, ?_⟩ |
| 1316 | · nlinarith [r.actTime_pos] |
| 1317 | · intro y eta hy0 hy heta |
| 1318 | have hyT : y ≤ r.actTime := hy.trans (by nlinarith [r.actTime_pos]) |
| 1319 | refine ⟨hrelaxed y eta hy0 hyT heta, ?_⟩ |
| 1320 | rw [hsize y eta hyT heta] |
| 1321 | exact lt_trans (by norm_num : (2 : ℝ) < 2 + 1 / 16) ((hcert y ⟨hy0, hyT⟩ eta heta).2.2.2.2 hy) |
| 1322 | |
| 1323 | end Initial |
| 1324 | |
| 1325 | /-! ## The active annulus and one common ordered choice -/ |
| 1326 | |
| 1327 | noncomputable def activeLeft {F : Profile} (W : NominalProfile.Witness F) : ℝ := 4 / W.axis.scale |
| 1328 | |
| 1329 | noncomputable def activeRight {F : Profile} (W : NominalProfile.Witness F) : ℝ := |
| 1330 | W.controls.radius * Real.exp (OutgoingTail.tailEnd F.data) |
| 1331 | |
| 1332 | theorem activeLeft_pos {F : Profile} (W : NominalProfile.Witness F) : 0 < activeLeft W := |
| 1333 | div_pos (by norm_num) W.axis.scale_pos |
| 1334 | |
| 1335 | theorem activeLeft_lt_Xi {F : Profile} (W : NominalProfile.Witness F) : |
| 1336 | activeLeft W < NominalProfile.Xi := by |
| 1337 | have he := Real.one_lt_exp_iff.mpr W.controls.referenceWidth_pos |
| 1338 | have hmul : activeLeft W < activeLeft W * Real.exp W.controls.referenceWidth := by |
| 1339 | nlinarith [activeLeft_pos W] |
| 1340 | exact hmul.trans_le W.controls.activation_collar_le_Xi |
| 1341 | |
| 1342 | theorem chart_log {R : ℝ} (hR : 0 < R) {p : Point} (hp : 0 < p.1) : |
| 1343 | chart R (Real.log (p.1 / R), p.2) = p := by |
| 1344 | apply Prod.ext |
| 1345 | · dsimp only [chart] |
| 1346 | rw [Real.exp_log (div_pos hp hR), mul_div_cancel₀ _ hR.ne'] |
| 1347 | · rfl |
| 1348 | |
| 1349 | theorem log_chart_lt {R X y : ℝ} (hR : 0 < R) (hX : 0 < X) |
| 1350 | (hy : X < R * Real.exp y) : Real.log (X / R) < y := by |
| 1351 | have hh : X / R < Real.exp y := (div_lt_iff₀ hR).mpr (by simpa only [mul_comm] using hy) |
| 1352 | simpa only [Real.log_exp] using Real.log_lt_log (div_pos hX hR) hh |
| 1353 | |
| 1354 | theorem lt_log_chart {R X y : ℝ} (hR : 0 < R) |
| 1355 | (hy : R * Real.exp y < X) : y < Real.log (X / R) := by |
| 1356 | have hh : Real.exp y < X / R := (lt_div_iff₀ hR).mpr (by simpa only [mul_comm] using hy) |
| 1357 | simpa only [Real.log_exp] using Real.log_lt_log (Real.exp_pos y) hh |
| 1358 | |
| 1359 | /-- Every assertion concerns the same physical fields and absolute |
| 1360 | histories. The extra lower speed condition is asserted only on the two |
| 1361 | regions where the pre-modulation construction proves it. -/ |
| 1362 | structure Certificate {F : Profile} (W : NominalProfile.Witness F) : Prop where |
| 1363 | relaxed : ∀ p : Point, activeLeft W < p.1 → p.1 < activeRight W → |
| 1364 | p.2 ∈ HeatedOutgoing.parameterDomain → ActivationContinuation.IsRelaxed W.profiles F.data.h p |
| 1365 | initial : ∃ t : ℝ, 0 < t ∧ t ≤ W.controls.activationTime ∧ |
| 1366 | ∀ y eta : ℝ, 0 < y → y ≤ t → eta ∈ HeatedOutgoing.parameterDomain → |
| 1367 | IsTrue W.profiles F.data.h (chart (activeLeft W) (y, eta)) |
| 1368 | outgoing : ∀ y eta : ℝ, F.data.core.holdStart ≤ y → y < OutgoingTail.tailEnd F.data → |
| 1369 | eta ∈ HeatedOutgoing.parameterDomain → IsTrue W.profiles F.data.h (chart W.controls.radius (y, eta)) |
| 1370 | |
| 1371 | theorem Certificate.coordinates_smoothAt {F : Profile} {W : NominalProfile.Witness F} |
| 1372 | (hW : Certificate W) {p : Point} (hl : activeLeft W < p.1) (hr : p.1 < activeRight W) |
| 1373 | (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 1374 | ContDiffAt ℝ ∞ (ActivationContinuation.shearA W.profiles) p ∧ |
| 1375 | ContDiffAt ℝ ∞ (tilt W.profiles) p ∧ |
| 1376 | ContDiffAt ℝ ∞ (ReferenceBounds.p1 W.profiles F.data.h) p ∧ |
| 1377 | ContDiffAt ℝ ∞ (ReferenceBounds.p2 W.profiles F.data.h) p := by |
| 1378 | have hx := (activeLeft_pos W).trans hl |
| 1379 | exact cone_coordinates_smoothAt W.profiles F.data.h (W.domain_contains hx.le heta) hx |
| 1380 | (Witness.f_positive W hx heta).ne' (hW.relaxed p hl hr heta).first_positive.ne' |
| 1381 | (NaturalAxisData.L_pos W.axis.small heta).ne' |
| 1382 | |
| 1383 | /-- Intermediate data retain the actual continuation and its repair |
| 1384 | coefficients. The existence theorem below constructs every cone field in |
| 1385 | this record from the already proved estimates. -/ |
| 1386 | structure Assembly (d : PreparedOutgoing.PreparedProfile) where |
| 1387 | family : CompensatedFamily d.profile |
| 1388 | delta : ℝ |
| 1389 | radiusFloor : ℝ |
| 1390 | matching : MatchingConeBounds.PreparedWitness d.profile 1 delta radiusFloor |
| 1391 | family_floor : family.radiusFloor ≤ radiusFloor |
| 1392 | terminal_floor : TerminalCone.radiusThreshold d.profile ≤ matching.controls.radius |
| 1393 | clean : OutgoingCone.ProfileCleanCone d.profile matching.controls.radius (-5) |
| 1394 | repair : ∀ p : Point, |
| 1395 | p.1 ∈ Icc (matching.controls.radius * Real.exp (-8)) (matching.controls.radius * Real.exp (-5)) → |
| 1396 | p.2 ∈ HeatedOutgoing.parameterDomain → |
| 1397 | ActivationContinuation.IsRelaxed |
| 1398 | (matching.controls.profiles matching.bounds.matching.separation.le) d.profile.data.h p |
| 1399 | |
| 1400 | namespace Assembly |
| 1401 | |
| 1402 | variable {d : PreparedOutgoing.PreparedProfile} (A : Assembly d) |
| 1403 | |
| 1404 | noncomputable def witness : NominalProfile.Witness d.profile := |
| 1405 | A.family.assemblePrepared d.specification A.matching A.family_floor |
| 1406 | |
| 1407 | theorem outgoing {y eta : ℝ} (hy : d.profile.data.core.holdStart ≤ y) |
| 1408 | (hend : y < OutgoingTail.tailEnd d.profile.data) (heta : eta ∈ HeatedOutgoing.parameterDomain) : |
| 1409 | IsTrue A.witness.profiles d.profile.data.h (chart A.witness.controls.radius (y, eta)) := |
| 1410 | A.family.assemble_profile_true_late d.specification A.matching.axis A.matching.controls |
| 1411 | (A.family_floor.trans A.matching.bounds.radius_large) A.matching.bounds.matching.separation.le |
| 1412 | _ d.terminal A.terminal_floor hy hend heta |
| 1413 | |
| 1414 | theorem outer_relaxed {p : Point} (hXi : NominalProfile.Xi ≤ p.1) |
| 1415 | (hend : p.1 < activeRight A.witness) (heta : p.2 ∈ HeatedOutgoing.parameterDomain) : |
| 1416 | ActivationContinuation.IsRelaxed A.witness.profiles d.profile.data.h p := by |
| 1417 | have hx := NominalProfile.Xi_pos.trans_le hXi |
| 1418 | by_cases hshape : p.1 ≤ A.matching.controls.radius * Real.exp (-8) |
| 1419 | · exact A.family.prepared_shape_relaxed d.specification A.matching A.family_floor hXi hshape heta |
| 1420 | by_cases hrepair : p.1 ≤ A.matching.controls.radius * Real.exp (-5) |
| 1421 | · exact Witness.prefix_relaxed A.witness hx hrepair heta |
| 1422 | (A.repair p ⟨(lt_of_not_ge hshape).le, hrepair⟩ heta) |
| 1423 | have hlo := lt_log_chart A.matching.controls.radius_pos (lt_of_not_ge hrepair) |
| 1424 | have hhi := log_chart_lt A.matching.controls.radius_pos hx hend |
| 1425 | have hc := A.family.assemble_profile_relaxed_outer d.specification A.matching.axis A.matching.controls |
| 1426 | (A.family_floor.trans A.matching.bounds.radius_large) A.matching.bounds.matching.separation.le |
| 1427 | (fun _eta hη => A.matching.bounds.matching.smallDebt A.matching.bounds.debt_radius hη) |
| 1428 | d.terminal A.terminal_floor A.clean (p := (Real.log (p.1 / A.matching.controls.radius), p.2)) hlo hhi heta |
| 1429 | rwa [chart_log A.matching.controls.radius_pos hx] at hc |
| 1430 | |
| 1431 | theorem initial_cones : |
| 1432 | (∀ y eta : ℝ, 0 < y → y ≤ A.witness.controls.activationTime → |
| 1433 | eta ∈ HeatedOutgoing.parameterDomain → |
| 1434 | ActivationContinuation.IsRelaxed A.witness.profiles d.profile.data.h |
| 1435 | (chart (activeLeft A.witness) (y, eta))) ∧ |
| 1436 | ∃ t : ℝ, 0 < t ∧ t ≤ A.witness.controls.activationTime ∧ |
| 1437 | ∀ y eta : ℝ, 0 < y → y ≤ t → eta ∈ HeatedOutgoing.parameterDomain → |
| 1438 | IsTrue A.witness.profiles d.profile.data.h (chart (activeLeft A.witness) (y, eta)) := by |
| 1439 | have hb := Initial.activation_cone A.matching.axis.natural A.matching.continuation |
| 1440 | have hXi (y eta : ℝ) (hy : y ≤ A.witness.controls.activationTime) : |
| 1441 | (chart (activeLeft A.witness) (y, eta)).1 ≤ NominalProfile.Xi := by |
| 1442 | exact (mul_le_mul_of_nonneg_left |
| 1443 | (Real.exp_le_exp.mpr (hy.trans A.witness.controls.activationTime_le)) |
| 1444 | (activeLeft_pos A.witness).le).trans A.witness.controls.activation_collar_le_Xi |
| 1445 | constructor |
| 1446 | · intro y eta hy0 hy heta |
| 1447 | exact Witness.seed_relaxed A.witness (chart_positive (activeLeft_pos A.witness) (y, eta)) |
| 1448 | (hXi y eta hy) heta (hb.1 y eta hy0 hy heta) |
| 1449 | · obtain ⟨t, ht, htT, htrue⟩ := hb.2 |
| 1450 | refine ⟨t, ht, htT, ?_⟩ |
| 1451 | intro y eta hy0 hy heta |
| 1452 | exact Witness.seed_true A.witness (chart_positive (activeLeft_pos A.witness) (y, eta)) |
| 1453 | (hXi y eta (hy.trans htT)) heta (htrue y eta hy0 hy heta) |
| 1454 | |
| 1455 | /-- The nominal profile has the relaxed cone throughout its active |
| 1456 | annulus and the true cone in its initial collar and from the shaped hold |
| 1457 | through the terminal region. Every component uses the stored witness. -/ |
| 1458 | theorem certificate : Certificate A.witness := by |
| 1459 | have hi := A.initial_cones |
| 1460 | refine ⟨?_, hi.2, ?_⟩ |
| 1461 | · intro p hl hr heta |
| 1462 | have hx := (activeLeft_pos A.witness).trans hl |
| 1463 | by_cases hXi : p.1 ≤ NominalProfile.Xi |
| 1464 | · have hy0 : 0 < Real.log (p.1 / activeLeft A.witness) := by |
| 1465 | apply lt_log_chart (activeLeft_pos A.witness) |
| 1466 | simpa only [Real.exp_zero, mul_one] using hl |
| 1467 | by_cases hy : Real.log (p.1 / activeLeft A.witness) ≤ A.witness.controls.activationTime |
| 1468 | · have hc := hi.1 (Real.log (p.1 / activeLeft A.witness)) p.2 hy0 hy heta |
| 1469 | rwa [chart_log (activeLeft_pos A.witness) hx] at hc |
| 1470 | · have hstart : A.matching.continuation.parameters.startRadius ≤ p.1 := by |
| 1471 | change activeLeft A.witness * Real.exp A.witness.controls.activationTime ≤ p.1 |
| 1472 | by_contra hn |
| 1473 | exact hy (log_chart_lt (activeLeft_pos A.witness) hx (lt_of_not_ge hn)).le |
| 1474 | exact A.family.prepared_continuation_relaxed d.specification A.matching A.family_floor |
| 1475 | heta ⟨hstart, hXi⟩ |
| 1476 | · exact A.outer_relaxed (le_of_not_ge hXi) hr heta |
| 1477 | · intro y eta hy hend heta |
| 1478 | exact A.outgoing hy hend heta |
| 1479 | |
| 1480 | end Assembly |
| 1481 | |
| 1482 | theorem assembly_exists (d : PreparedOutgoing.PreparedProfile) : Nonempty (Assembly d) := by |
| 1483 | obtain ⟨cleanFloor, hcleanFloor, hclean⟩ := d.clean (-5) (by norm_num) |
| 1484 | have hanchor : 0 < cleanFloor + 1 := by linarith |
| 1485 | obtain ⟨G⟩ := exists_compensatedFamily d.profile (hclean (cleanFloor + 1) (by linarith)) hanchor |
| 1486 | obtain ⟨delta, repairFloor, hdelta, _hrepairFloor, hrepair⟩ := RepairConeBounds.exists_repair_cone d.profile |
| 1487 | let floor := max G.radiusFloor (max (cleanFloor + 1) (max repairFloor (TerminalCone.radiusThreshold d.profile))) |
| 1488 | obtain ⟨M⟩ := MatchingConeBounds.preparedWitness_exists d.profile d.amplitude_lower d.height_upper |
| 1489 | 1 le_rfl hdelta floor |
| 1490 | have hG : G.radiusFloor ≤ floor := le_max_left _ _ |
| 1491 | have hC : cleanFloor + 1 ≤ floor := (le_max_left _ _).trans (le_max_right _ _) |
| 1492 | have hR : repairFloor ≤ floor := (le_max_left _ _).trans |
| 1493 | ((le_max_right _ _).trans (le_max_right _ _)) |
| 1494 | have hT : TerminalCone.radiusThreshold d.profile ≤ floor := (le_max_right _ _).trans |
| 1495 | ((le_max_right _ _).trans (le_max_right _ _)) |
| 1496 | have hendpoint : JetBounds.FiniteJetBound 1 (RepairConeBounds.endpointError M.controls) |
| 1497 | (Icc (-1 : ℝ) 1) delta := by |
| 1498 | intro n hn eta heta |
| 1499 | rw [norm_iteratedFDeriv_eq_norm_iteratedDeriv, Real.norm_eq_abs] |
| 1500 | exact M.bounds.endpoint eta heta n hn |
| 1501 | refine ⟨⟨G, delta, floor, M, hG, hT.trans M.bounds.radius_large, |
| 1502 | hclean M.controls.radius ?_, ?_⟩⟩ |
| 1503 | · have hh := hC.trans M.bounds.radius_large |
| 1504 | exact lt_of_lt_of_le (by linarith : cleanFloor < cleanFloor + 1) hh |
| 1505 | · intro p hp heta |
| 1506 | exact hrepair M.axis M.controls M.bounds.matching.separation.le hendpoint M.bounds.coefficients |
| 1507 | (hR.trans M.bounds.radius_large) p hp heta (M.bounds.matching.smallDebt M.bounds.debt_radius heta) |
| 1508 | |
| 1509 | /-- Any one prepared outgoing profile has a nominal witness with the |
| 1510 | complete actual cone certificate. No cone or matching-debt assumption is |
| 1511 | added to the prepared profile. -/ |
| 1512 | theorem exists_certificate (d : PreparedOutgoing.PreparedProfile) : |
| 1513 | ∃ W : NominalProfile.Witness d.profile, Certificate W := by |
| 1514 | obtain ⟨A⟩ := assembly_exists d |
| 1515 | exact ⟨A.witness, A.certificate⟩ |
| 1516 | |
| 1517 | theorem exists_nominal_cone : |
| 1518 | ∃ (F : Profile) (W : NominalProfile.Witness F), Certificate W := by |
| 1519 | obtain ⟨d⟩ := PreparedOutgoing.exists_prepared |
| 1520 | obtain ⟨W, hW⟩ := exists_certificate d |
| 1521 | exact ⟨d.profile, W, hW⟩ |
| 1522 | |
| 1523 | end NavierStokes.NominalConeAssembly |