EndpointCurvatureSensitivity.lean
1module23public import SubentropyCertificates.CalibratedInverse4public import SubentropyCertificates.CurveInverse56/-! Square-root sensitivity of an increasing curve with a quadratic endpoint. -/7@[expose] public section8noncomputable section9open Set Filter Asymptotics10open scoped Topology11namespace SubentropyCertificates.EndpointCurvature1213private theorem square_root_ratio (g : ℝ → ℝ) {a : ℝ} (ha : 0<a)14 (hg : (fun h : ℝ ↦ g h-a*h^2) =O[𝓝 0] (fun h ↦ h^3)) :15 Tendsto (fun h : ℝ ↦ h/Real.sqrt (g h)) (𝓝[>] 0) (𝓝 (1/Real.sqrt a)) := by16 obtain ⟨C,hC⟩ := isBigO_iff.mp hg17 have h0 : Tendsto (fun h : ℝ ↦ h) (𝓝[>] 0) (𝓝 0) := nhdsWithin_le_nhds18 have hl : Tendsto (fun h : ℝ ↦ a-C*h) (𝓝[>] 0) (𝓝 a) := by19 simpa using (tendsto_const_nhds (x:=a)).sub ((tendsto_const_nhds (x:=C)).mul h0)20 have hu : Tendsto (fun h : ℝ ↦ a+C*h) (𝓝[>] 0) (𝓝 a) := by21 simpa using (tendsto_const_nhds (x:=a)).add ((tendsto_const_nhds (x:=C)).mul h0)22 have hb : ∀ᶠ h : ℝ in 𝓝[>] 0, a-C*h ≤ g h/h^2 ∧ g h/h^2 ≤ a+C*h := by23 filter_upwards [hC.filter_mono nhdsWithin_le_nhds,self_mem_nhdsWithin] with h he (hp : 0<h)24 simp only [Real.norm_eq_abs,abs_pow,abs_of_pos hp] at he25 obtain ⟨h₁,h₂⟩ := abs_le.mp he26 exact ⟨(le_div_iff₀ (sq_pos_of_pos hp)).mpr (by nlinarith),27 (div_le_iff₀ (sq_pos_of_pos hp)).mpr (by nlinarith)⟩28 have hrat := tendsto_of_tendsto_of_tendsto_of_le_of_le' hl hu29 (hb.mono fun _ hh ↦ hh.1) (hb.mono fun _ hh ↦ hh.2)30 have hs := (tendsto_const_nhds (x:=(1:ℝ))).div31 ((Real.continuous_sqrt.tendsto a).comp hrat) (Real.sqrt_pos.mpr ha).ne'32 apply hs.congr'33 filter_upwards [self_mem_nhdsWithin,hrat.eventually_const_lt ha] with h (hp : 0<h) hg'34 have hgpos : 0 < g h := (div_pos_iff_of_pos_right (sq_pos_of_pos hp)).1 hg'35 change 1/Real.sqrt (g h/h^2) = h/Real.sqrt (g h)36 rw [Real.sqrt_div hgpos.le,Real.sqrt_sq hp.le,one_div_div]3738/-- Along any approach to the upper endpoint through the range, the inverse displacement39divided by the square root of the range displacement tends to the inverse square root40of the quadratic coefficient. -/41theorem inverse_endpoint_sensitivity {α : Type*} {l : Filter α} (f : ℝ → ℝ)42 (b a : ℝ) (hb : 0<b) (ha : 0<a) (hf : StrictMonoOn f (Icc 0 b))43 (hquad : (fun h : ℝ ↦ f b-f (b-h)-a*h^2) =O[𝓝 0] (fun h ↦ h^3))44 (q e : α → ℝ) (he : ∀ i, e i ∈ Icc 0 b) (hval : ∀ i, f (e i) = q i)45 (hq : Tendsto q l (𝓝[<] (f b))) :46 Tendsto (fun i ↦ (b-e i)/Real.sqrt (f b-q i)) l (𝓝 (1/Real.sqrt a)) := by47 have hend : b ∈ Icc (0:ℝ) b := ⟨hb.le,le_rfl⟩48 obtain ⟨hq',hq_lt⟩ := tendsto_nhdsWithin_iff.mp hq49 have hgap : Tendsto (fun i ↦ b-e i) l (𝓝[>] 0) := by50 refine tendsto_nhdsWithin_iff.mpr ⟨tendsto_order.mpr ⟨?_,?_⟩,?_⟩51 · intro x hx52 exact .of_forall fun i ↦ hx.trans_le (sub_nonneg.mpr (he i).2)53 · intro r hr54 let s := max 0 (b-r/2)55 have hs : s < b := max_lt hb (by linarith)56 have hs' : s ∈ Icc 0 b := ⟨le_max_left _ _,hs.le⟩57 have hlt := hq'.eventually_const_lt (hf hs' hend hs)58 filter_upwards [hlt] with i hi59 rw [← hval i] at hi60 have hh := (hf.lt_iff_lt hs' (he i)).mp hi61 have hslo : b-r/2 ≤ s := le_max_right _ _62 change b-e i < r63 linarith64 · filter_upwards [hq_lt] with i hi65 have hi' : f (e i)<f b := by rw [hval]; exact hi66 exact sub_pos.mpr ((hf.lt_iff_lt (he i) hend).mp hi')67 have hs := (square_root_ratio (fun h ↦ f b-f (b-h)) ha hquad).comp hgap68 simpa only [Function.comp_def,sub_sub_cancel,hval] using hs6970end SubentropyCertificates.EndpointCurvature
Axioms used
Choose a statement to see which axioms its proof uses.