Skip to content

Commit

Permalink
feat(Analysis/Calculus/LogDeriv): add division lemma (#16541)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Birkbeck <[email protected]>
  • Loading branch information
CBirkbeck and CBirkbeck committed Oct 13, 2024
1 parent 67556a0 commit 30a1060
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Mathlib/Analysis/Calculus/LogDeriv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ theorem logDeriv_mul {f g : π•œ β†’ π•œ'} (x : π•œ) (hf : f x β‰  0) (hg : g
simp only [logDeriv_apply, deriv_mul hdf hdg]
field_simp [mul_comm]

theorem logDeriv_div {f g : π•œ β†’ π•œ'} (x : π•œ) (hf : f x β‰  0) (hg : g x β‰  0)
(hdf : DifferentiableAt π•œ f x) (hdg : DifferentiableAt π•œ g x) :
logDeriv (fun z => f z / g z) x = logDeriv f x - logDeriv g x := by
simp only [logDeriv_apply, deriv_div hdf hdg]
field_simp [mul_comm]
ring

theorem logDeriv_mul_const {f : π•œ β†’ π•œ'} (x : π•œ) (a : π•œ') (ha : a β‰  0):
logDeriv (fun z => f z * a) x = logDeriv f x := by
simp only [logDeriv_apply, deriv_mul_const_field, mul_div_mul_right _ _ ha]
Expand Down Expand Up @@ -102,4 +109,3 @@ theorem logDeriv_comp {f : π•œ' β†’ π•œ'} {g : π•œ β†’ π•œ'} {x : π•œ} (hf
(hg : DifferentiableAt π•œ g x) : logDeriv (f ∘ g) x = logDeriv f (g x) * deriv g x := by
simp only [logDeriv, Pi.div_apply, deriv.comp _ hf hg, comp_apply]
ring

0 comments on commit 30a1060

Please sign in to comment.