import OAI.MathematicalPhysics.Transonic.Profile.SourceParameters import OAI.MathematicalPhysics.Transonic.Profile.PhysicalProfile import OAI.MathematicalPhysics.Transonic.Shooting.FiniteProfile namespace OAI section noncomputable section namespace SepticProfile.SonicShooting open Set Filter SourceFamily AxisBarriers open scoped Topology ContDiff def MatchedPair.beta (M : MatchedPair) : ℝ := ShootingParameters.beta M.parameter.val def MatchedPair.radius (M : MatchedPair) : ℝ := sonicRadius M.beta def MatchedPair.sonicU (M : MatchedPair) (y : ℝ) : ℝ := sonicSpeed*M.localProfile (y/M.radius) def MatchedPair.velocity (M : MatchedPair) (y : ℝ) : ℝ := velocityToU y (M.sonicU y) lemma MatchedPair.beta_bounds (M : MatchedPair) : 1 x/M.radius) y ((hasDerivAt_id y).div_const M.radius)).const_mul sonicSpeed apply h.congr_deriv have hr : M.radius=3*sonicSpeed/SepticProfile.q M.beta := sonicRadius_eq M.beta have hq : SepticProfile.q M.beta≠0 := ne_of_gt (source_q_pos M.parameter) have hc : sonicSpeed≠0 := ne_of_gt sonicSpeed_bounds.1 rw [hr] field_simp lemma MatchedPair.sonicU_equation (M : MatchedPair) {y : ℝ} (hy : y/M.radius ∈ Icc (0:ℝ) (1+M.sonic.width)) : sonicDenom ell y (M.sonicU y)*deriv M.sonicU y=sonicNumer ell M.beta y (M.sonicU y) := by have he := M.local_equation hy have hp : normalizedDenom M.beta (y/M.radius) (M.localProfile (y/M.radius))*deriv M.localProfile (y/M.radius)= normalizedNumer M.beta (y/M.radius) (M.localProfile (y/M.radius)) := by simpa only [normalizedDenom,normalizedNumer,MatchedPair.beta,source_sigma,source_kappa,AxisBarriers.D,AxisBarriers.N] using he have ht := (normalized_equation_iff (ne_of_gt (source_q_pos M.parameter)) (y/M.radius) (M.localProfile (y/M.radius)) (deriv M.localProfile (y/M.radius))).mpr hp have hr : sonicRadius M.beta*(y/M.radius)=y := by change M.radius*(y/M.radius)=y exact mul_div_cancel₀ y (ne_of_gt M.radius_bounds.1) change sonicDenom ell (sonicRadius M.beta*(y/M.radius)) (M.sonicU y)* (SepticProfile.q M.beta/3*deriv M.localProfile (y/M.radius))= sonicNumer ell M.beta (sonicRadius M.beta*(y/M.radius)) (M.sonicU y) at ht rw [hr,← (M.sonicU_derivative hy).deriv] at ht exact ht lemma MatchedPair.sonicU_zero (M : MatchedPair) : M.sonicU 0=0 := by simp only [MatchedPair.sonicU,zero_div,M.local_zero,mul_zero] lemma MatchedPair.sonicU_at_radius (M : MatchedPair) : M.sonicU M.radius=sonicSpeed := by simp only [MatchedPair.sonicU,div_self (ne_of_gt M.radius_bounds.1),M.local_value,mul_one] lemma MatchedPair.exists_physical_width (M : MatchedPair) : ∃ w : ℝ, 0 |sonicSpeed*M.localProfile z|) 1 := (continuousAt_const.mul hs).abs have hn : ∀ᶠ z in 𝓝 (1:ℝ), |sonicSpeed*M.localProfile z|<1 := by apply hc.eventually (Iio_mem_nhds _) simpa only [M.local_value,mul_one,abs_of_pos sonicSpeed_bounds.1] using sonicSpeed_bounds.2 obtain ⟨ε,hε,hball⟩ := Metric.mem_nhds_iff.mp hn let w := min M.sonic.width (min (ε/2) ((1/M.radius-1)/2)) have hw : 0 velocityToU y (M.velocity y)) M.radius := by have he : (fun y => velocityToU y (M.velocity y)) =ᶠ[𝓝 M.radius] M.sonicU := by filter_upwards [Ioo_mem_nhds M.radius_bounds.1 W.endpoint_bounds.1] with y hy exact W.recover_U ⟨hy.1.le,hy.2.le⟩ rw [he.deriv_eq,(M.sonicU_derivative (W.rescale_full ⟨M.radius_bounds.1.le,W.endpoint_bounds.1.le⟩)).deriv] rw [div_self (ne_of_gt M.radius_bounds.1)] exact mul_pos (div_pos (source_q_pos M.parameter) (by norm_num)) M.local_slope end SepticProfile.SonicShooting end end end OAI