Real logarithm #
In this file we define Real.log
to be the logarithm of a real number. As usual, we extend it from
its domain (0, +∞)
to a globally defined function. We choose to do it so that log 0 = 0
and
log (-x) = log x
.
We prove some basic properties of this function and show that it is continuous.
Tags #
logarithm, continuity
The real logarithm function, equal to the inverse of the exponential for x > 0
,
to log |x|
for x < 0
, and to 0
for 0
. We use this unconventional extension to
(-∞, 0]
as it gives the formula log (x * y) = log x + log y
for all nonzero x
and y
, and
the derivative of log
is 1/x
away from 0
.
Equations
- Real.log x = if hx : x = 0 then 0 else ↑(OrderIso.symm Real.expOrderIso) { val := |x|, property := (_ : 0 < |x|) }
Instances For
The real logarithm function tends to +∞
at +∞
.
Extension for the positivity
tactic: Real.log
of a natural number is always nonnegative.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Extension for the positivity
tactic: Real.log
of an integer is always nonnegative.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Extension for the positivity
tactic: Real.log
of a numeric literal.
Equations
- One or more equations did not get rendered due to their size.