Commit 2020-04-29 16:12 8490c545
View on Github →refactor(analysis/complex/exponential): define log x = log |x|  for x < 0 (#2564)
Previously we had log  x = 0 for x < 0. This PR changes it to log x = log (-x), to make sure that the formulas log (xy) = log x + log y and log' = 1/x are true for all nonzero variables.
Also, add a few simp lemmas on the differentiability properties of log to make sure that the following works:
example (x : ℝ) (h : x ≠ 0) : deriv (λ x, x * (log x - 1)) x = log x :=
by simp [h]
Related Zulip discussion: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/definition.20of.20real.20log