mathlib documentation

analysis.special_functions.log.basic

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

noncomputable def real.log (x : ) :

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
theorem real.log_of_ne_zero {x : } (hx : x 0) :
theorem real.log_of_pos {x : } (hx : 0 < x) :
theorem real.exp_log_eq_abs {x : } (hx : x 0) :
theorem real.exp_log {x : } (hx : 0 < x) :
theorem real.exp_log_of_neg {x : } (hx : x < 0) :
theorem real.le_exp_log (x : ) :
@[simp]
theorem real.log_exp (x : ) :
@[simp]
theorem real.log_zero  :
@[simp]
theorem real.log_one  :
@[simp]
theorem real.log_abs (x : ) :
@[simp]
theorem real.log_neg_eq_log (x : ) :
theorem real.sinh_log {x : } (hx : 0 < x) :
theorem real.cosh_log {x : } (hx : 0 < x) :
theorem real.log_mul {x y : } (hx : x 0) (hy : y 0) :
theorem real.log_div {x y : } (hx : x 0) (hy : y 0) :
@[simp]
theorem real.log_inv (x : ) :
theorem real.log_le_log {x y : } (h : 0 < x) (h₁ : 0 < y) :
theorem real.log_lt_log {x y : } (hx : 0 < x) :
x < yreal.log x < real.log y
theorem real.log_lt_log_iff {x y : } (hx : 0 < x) (hy : 0 < y) :
theorem real.log_le_iff_le_exp {x y : } (hx : 0 < x) :
theorem real.log_lt_iff_lt_exp {x y : } (hx : 0 < x) :
theorem real.le_log_iff_exp_le {x y : } (hy : 0 < y) :
theorem real.lt_log_iff_exp_lt {x y : } (hy : 0 < y) :
theorem real.log_pos_iff {x : } (hx : 0 < x) :
0 < real.log x 1 < x
theorem real.log_pos {x : } (hx : 1 < x) :
theorem real.log_neg_iff {x : } (h : 0 < x) :
real.log x < 0 x < 1
theorem real.log_neg {x : } (h0 : 0 < x) (h1 : x < 1) :
theorem real.log_nonneg_iff {x : } (hx : 0 < x) :
theorem real.log_nonneg {x : } (hx : 1 x) :
theorem real.log_nonpos_iff {x : } (hx : 0 < x) :
theorem real.log_nonpos_iff' {x : } (hx : 0 x) :
theorem real.log_nonpos {x : } (hx : 0 x) (h'x : x 1) :
theorem real.eq_one_of_pos_of_log_eq_zero {x : } (h₁ : 0 < x) (h₂ : real.log x = 0) :
x = 1
theorem real.log_ne_zero_of_pos_of_ne_one {x : } (hx_pos : 0 < x) (hx : x 1) :
@[simp]
theorem real.log_eq_zero {x : } :
real.log x = 0 x = 0 x = 1 x = -1
@[simp]
theorem real.log_pow (x : ) (n : ) :
@[simp]
theorem real.log_zpow (x : ) (n : ) :
theorem real.log_sqrt {x : } (hx : 0 x) :
theorem real.log_le_sub_one_of_pos {x : } (hx : 0 < x) :
real.log x x - 1
theorem real.abs_log_mul_self_lt (x : ) (h1 : 0 < x) (h2 : x 1) :
|real.log x * x| < 1

Bound for |log x * x| in the interval (0, 1].

The real logarithm function tends to +∞ at +∞.

@[continuity]
theorem real.continuous_log  :
continuous (λ (x : {x // x 0}), real.log x)
@[continuity]
theorem real.continuous_log'  :
continuous (λ (x : {x // 0 < x}), real.log x)
theorem real.continuous_at_log {x : } (hx : x 0) :
theorem real.log_prod {α : Type u_1} (s : finset α) (f : α → ) (hf : ∀ (x : α), x sf x 0) :
real.log (s.prod (λ (i : α), f i)) = s.sum (λ (i : α), real.log (f i))
theorem real.tendsto_pow_log_div_mul_add_at_top (a b : ) (n : ) (ha : a 0) :
filter.tendsto (λ (x : ), real.log x ^ n / (a * x + b)) filter.at_top (nhds 0)
theorem filter.tendsto.log {α : Type u_1} {f : α → } {l : filter α} {x : } (h : filter.tendsto f l (nhds x)) (hx : x 0) :
filter.tendsto (λ (x : α), real.log (f x)) l (nhds (real.log x))
theorem continuous.log {α : Type u_1} [topological_space α] {f : α → } (hf : continuous f) (h₀ : ∀ (x : α), f x 0) :
continuous (λ (x : α), real.log (f x))
theorem continuous_at.log {α : Type u_1} [topological_space α] {f : α → } {a : α} (hf : continuous_at f a) (h₀ : f a 0) :
continuous_at (λ (x : α), real.log (f x)) a
theorem continuous_within_at.log {α : Type u_1} [topological_space α] {f : α → } {s : set α} {a : α} (hf : continuous_within_at f s a) (h₀ : f a 0) :
continuous_within_at (λ (x : α), real.log (f x)) s a
theorem continuous_on.log {α : Type u_1} [topological_space α] {f : α → } {s : set α} (hf : continuous_on f s) (h₀ : ∀ (x : α), x sf x 0) :
continuous_on (λ (x : α), real.log (f x)) s