EndpointCurvatureFactors.lean
1module23public import SubentropyCertificates.UniformEndpoint45/-! Second-order expansion of the product of reciprocal factors in the determinant formula. -/6@[expose] public section7noncomputable section8open Set Filter9open scoped BigOperators Topology10namespace SubentropyCertificates.EndpointCurvature1112private theorem product_expansion {I : Type*} (s : Finset I) (v : I → ℝ) :13 ∃ R : ℝ → ℝ, Continuous R ∧ ∀ z : ℝ,14 (∏ i ∈ s, (1 + v i*z)) = 1 + (∑ i ∈ s, v i)*z +15 ((∑ i ∈ s, v i)^2 - ∑ i ∈ s, v i^2)/2*z^2 + z^3*R z := by16 classical17 induction s using Finset.induction_on with18 | empty => exact ⟨fun _ ↦ 0,continuous_const,by simp⟩19 | @insert i s hi ih =>20 obtain ⟨R,hR,he⟩ := ih21 refine ⟨fun z ↦ (1+v i*z)*R z + v i*((∑ j ∈ s, v j)^2-∑ j ∈ s, v j^2)/2,by fun_prop,?_⟩22 intro z23 rw [Finset.prod_insert hi, Finset.sum_insert hi, Finset.sum_insert hi, he]24 ring2526/-- For any tangent vector with coordinate sum zero the reciprocal product has quadratic27coefficient equal to half the sum of squared coordinates and a uniform cubic remainder. -/28theorem reciprocal_product_remainder {I : Type*} [Fintype I] (v : I → ℝ) (hv : ∑ i, v i = 0) :29 ∃ C δ : ℝ, 0 < C ∧ 0 < δ ∧ ∀ z : ℝ, |z| < δ →30 |(∏ i, (1+v i*z))⁻¹ - 1 - (∑ i, v i^2)/2*z^2| ≤ C*|z|^3 := by31 let a := (∑ i, v i^2)/232 let P := fun z : ℝ ↦ ∏ i, (1+v i*z)33 have hP : Continuous P := by dsimp [P]; fun_prop34 have h0 : P 0 = 1 := by simp [P]35 obtain ⟨R,hR,he⟩ := product_expansion Finset.univ v36 have hp (z : ℝ) : P z = 1-a*z^2+z^3*R z := by37 dsimp only [P]38 rw [he, hv]; dsimp only [a]; ring39 let B := fun z : ℝ ↦ (-R z + a^2*z-a*z^2*R z)/P z40 have hB : ContinuousAt B 0 := by41 unfold B42 exact (by fun_prop : Continuous (fun z : ℝ ↦ -R z + a^2*z-a*z^2*R z)).continuousAt.div43 hP.continuousAt (by rw [h0]; norm_num)44 have hbound : ∀ᶠ z in 𝓝 (0:ℝ), |B z| < |B 0|+1 :=45 hB.abs.eventually_lt_const (by linarith)46 have hpos : ∀ᶠ z in 𝓝 (0:ℝ), 0 < P z :=47 hP.continuousAt.eventually_const_lt (by rw [h0]; norm_num)48 obtain ⟨δ,hd,hh⟩ := Metric.eventually_nhds_iff.mp (hbound.and hpos)49 refine ⟨|B 0|+1,δ,by positivity,hd,?_⟩50 intro z hz51 obtain ⟨hb,hn⟩ := hh (by simpa only [Real.dist_eq,sub_zero] using hz)52 have id : (P z)⁻¹ - 1 - a*z^2 = z^3 * B z := by53 dsimp only [B]54 apply (mul_left_inj' hn.ne').mp55 calc56 _ = 1 - (1+a*z^2)*P z := by field_simp; ring57 _ = z^3*(-R z+a^2*z-a*z^2*R z) := by rw [hp]; ring58 _ = _ := by field_simp59 change |(P z)⁻¹ - 1 - a*z^2| ≤ _60 rw [id, abs_mul, abs_pow, mul_comm]61 exact mul_le_mul_of_nonneg_right hb.le (pow_nonneg (abs_nonneg z) _)6263end SubentropyCertificates.EndpointCurvature
Axioms used
Choose a statement to see which axioms its proof uses.