The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V15. Real analysis in one variable

Mathlib.Analysis.SpecialFunctions.Log.Basic

118 declarations. Mathlib docs · Source

def Real.log E3 #

ℝ → ℝ

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.

theorem Real.log_of_ne_zero E1 #

∀ {x : ℝ} (hx : x ≠ 0), Real.log x = Real.expOrderIso.symm ⟨|x|, ⋯⟩

theorem Real.log_of_pos E1 #

∀ {x : ℝ} (hx : 0 < x), Real.log x = Real.expOrderIso.symm ⟨x, hx⟩

theorem Real.exp_log_eq_abs E1 #

∀ {x : ℝ}, x ≠ 0 → Real.exp (Real.log x) = |x|

theorem Real.exp_log E1 #

∀ {x : ℝ}, 0 < x → Real.exp (Real.log x) = x

theorem Real.exp_log_of_neg E1 #

∀ {x : ℝ}, x < 0 → Real.exp (Real.log x) = -x

theorem Real.le_exp_log E1 #

∀ (x : ℝ), x ≤ Real.exp (Real.log x)

theorem Real.log_exp E0 #

∀ (x : ℝ), Real.log (Real.exp x) = x

theorem Real.log_comp_exp E0 #

Real.log ∘ Real.exp = id

theorem Real.exp_one_mul_le_exp E1 #

∀ {x : ℝ}, Real.exp 1 * x ≤ Real.exp x

theorem Real.two_mul_le_exp E1 #

∀ {x : ℝ}, 2 * x ≤ Real.exp x

theorem Real.surjOn_log E1 #

Set.SurjOn Real.log (Set.Ioi 0) Set.univ

theorem Real.log_surjective E1 #

Function.Surjective Real.log

theorem Real.range_log E0 #

Set.range Real.log = Set.univ

theorem Real.log_zero E0 #

Real.log 0 = 0

theorem Real.log_one E0 #

Real.log 1 = 0

theorem Real.log_div_self E0 #

∀ (x : ℝ), Real.log (x / x) = 0

This holds true for all x : ℝ because of the junk values 0 / 0 = 0 and log 0 = 0.

theorem Real.log_abs E0 #

∀ (x : ℝ), Real.log |x| = Real.log x

theorem Real.log_neg_eq_log E0 #

∀ (x : ℝ), Real.log (-x) = Real.log x

theorem Real.sinh_log E1 #

∀ {x : ℝ}, 0 < x → Real.sinh (Real.log x) = (x - x⁻¹) / 2

theorem Real.cosh_log E1 #

∀ {x : ℝ}, 0 < x → Real.cosh (Real.log x) = (x + x⁻¹) / 2

theorem Real.surjOn_log' E1 #

Set.SurjOn Real.log (Set.Iio 0) Set.univ

theorem Real.log_mul E1 #

∀ {x y : ℝ}, x ≠ 0 → y ≠ 0 → Real.log (x * y) = Real.log x + Real.log y

theorem Real.log_div E1 #

∀ {x y : ℝ}, x ≠ 0 → y ≠ 0 → Real.log (x / y) = Real.log x - Real.log y

theorem Real.log_inv E0 #

∀ (x : ℝ), Real.log x⁻¹ = -Real.log x

theorem Real.log_le_log_iff E0 #

∀ {x y : ℝ}, 0 < x → 0 < y → (Real.log x ≤ Real.log y ↔ x ≤ y)

theorem Real.log_le_log E1 #

∀ {x y : ℝ}, 0 < x → x ≤ y → Real.log x ≤ Real.log y

theorem Real.log_lt_log E1 #

∀ {x y : ℝ}, 0 < x → x < y → Real.log x < Real.log y

theorem Real.log_lt_log_iff E0 #

∀ {x y : ℝ}, 0 < x → 0 < y → (Real.log x < Real.log y ↔ x < y)

theorem Real.log_le_iff_le_exp E1 #

∀ {x y : ℝ}, 0 < x → (Real.log x ≤ y ↔ x ≤ Real.exp y)

theorem Real.log_lt_iff_lt_exp E1 #

∀ {x y : ℝ}, 0 < x → (Real.log x < y ↔ x < Real.exp y)

theorem Real.le_log_iff_exp_le E1 #

∀ {x y : ℝ}, 0 < y → (x ≤ Real.log y ↔ Real.exp x ≤ y)

theorem Real.lt_log_iff_exp_lt E1 #

∀ {x y : ℝ}, 0 < y → (x < Real.log y ↔ Real.exp x < y)

theorem Real.le_exp_of_log_le E1 #

∀ {x y : ℝ}, Real.log x ≤ y → x ≤ Real.exp y

One direction of Real.log_le_iff_le_exp without positivity assumption.

theorem Real.lt_exp_of_log_lt E1 #

∀ {x y : ℝ}, Real.log x < y → x < Real.exp y

One direction of Real.log_lt_iff_lt_exp without positivity assumption.

theorem Real.log_pos_iff E0 #

∀ {x : ℝ}, 0 ≤ x → (0 < Real.log x ↔ 1 < x)

theorem Real.log_pos E1 #

∀ {x : ℝ}, 1 < x → 0 < Real.log x

theorem Real.log_pos_of_lt_neg_one E1 #

∀ {x : ℝ}, x < -1 → 0 < Real.log x

theorem Real.log_neg_iff E0 #

∀ {x : ℝ}, 0 < x → (Real.log x < 0 ↔ x < 1)

theorem Real.log_neg E1 #

∀ {x : ℝ}, 0 < x → x < 1 → Real.log x < 0

theorem Real.log_neg_of_lt_zero E1 #

∀ {x : ℝ}, x < 0 → -1 < x → Real.log x < 0

theorem Real.log_nonneg_iff E0 #

∀ {x : ℝ}, 0 < x → (0 ≤ Real.log x ↔ 1 ≤ x)

theorem Real.log_nonneg E1 #

∀ {x : ℝ}, 1 ≤ x → 0 ≤ Real.log x

theorem Real.log_nonpos_iff E0 #

∀ {x : ℝ}, 0 ≤ x → (Real.log x ≤ 0 ↔ x ≤ 1)

theorem Real.log_nonpos E1 #

∀ {x : ℝ}, 0 ≤ x → x ≤ 1 → Real.log x ≤ 0

theorem Real.log_natCast_nonneg E1 #

∀ (n : ℕ), 0 ≤ Real.log ↑n

theorem Real.log_neg_natCast_nonneg E1 #

∀ (n : ℕ), 0 ≤ Real.log (-↑n)

theorem Real.log_intCast_nonneg E1 #

∀ (n : ℤ), 0 ≤ Real.log ↑n

theorem Real.strictMonoOn_log E1 #

StrictMonoOn Real.log (Set.Ioi 0)

theorem Real.strictAntiOn_log E1 #

StrictAntiOn Real.log (Set.Iio 0)

theorem Real.log_injOn_pos E1 #

Set.InjOn Real.log (Set.Ioi 0)

theorem Real.log_lt_sub_one_of_pos E1 #

∀ {x : ℝ}, 0 < x → x ≠ 1 → Real.log x < x - 1

theorem Real.log_ne_zero_of_pos_of_ne_one E1 #

∀ {x : ℝ}, 0 < x → x ≠ 1 → Real.log x ≠ 0

theorem Real.log_eq_zero E0 #

∀ {x : ℝ}, Real.log x = 0 ↔ x = 0 ∨ x = 1 ∨ x = -1

theorem Real.log_ne_zero E1 #

∀ {x : ℝ}, Real.log x ≠ 0 ↔ x ≠ 0 ∧ x ≠ 1 ∧ x ≠ -1

theorem Real.log_pow E0 #

∀ (x : ℝ) (n : ℕ), Real.log (x ^ n) = ↑n * Real.log x

theorem Real.log_zpow E0 #

∀ (x : ℝ) (n : ℤ), Real.log (x ^ n) = ↑n * Real.log x

theorem Real.log_sqrt E1 #

∀ {x : ℝ}, 0 ≤ x → Real.log √x = Real.log x / 2

theorem Real.log_le_sub_one_of_pos E1 #

∀ {x : ℝ}, 0 < x → Real.log x ≤ x - 1

theorem Real.one_sub_inv_le_log_of_pos E1 #

∀ {x : ℝ}, 0 < x → 1 - x⁻¹ ≤ Real.log x

theorem Real.log_le_self E1 #

∀ {x : ℝ}, 0 ≤ x → Real.log x ≤ x

See Real.log_le_sub_one_of_pos for the stronger version when x ≠ 0.

theorem Real.neg_inv_le_log E1 #

∀ {x : ℝ}, 0 ≤ x → -x⁻¹ ≤ Real.log x

See Real.one_sub_inv_le_log_of_pos for the stronger version when x ≠ 0.

theorem Real.abs_log_mul_self_lt E1 #

∀ (x : ℝ), 0 < x → x ≤ 1 → |Real.log x * x| < 1

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

theorem Real.le_log_one_add_of_nonneg E1 #

∀ {x : ℝ}, 0 ≤ x → 2 * x / (x + 2) ≤ Real.log (1 + x)

theorem Real.lt_log_one_add_of_pos E1 #

∀ {x : ℝ}, 0 < x → 2 * x / (x + 2) < Real.log (1 + x)

theorem Real.tendsto_log_atTop E1 #

Filter.Tendsto Real.log Filter.atTop Filter.atTop

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

theorem Real.tendsto_log_nhdsGT_zero E1 #

Filter.Tendsto Real.log (nhdsWithin 0 (Set.Ioi 0)) Filter.atBot

theorem Real.tendsto_log_nhdsNE_zero E1 #

Filter.Tendsto Real.log (nhdsWithin 0 {0}ᶜ) Filter.atBot

theorem Real.tendsto_log_nhdsLT_zero E1 #

Filter.Tendsto Real.log (nhdsWithin 0 (Set.Iio 0)) Filter.atBot

theorem Real.continuousOn_log E1 #

ContinuousOn Real.log {0}ᶜ

theorem Real.continuous_log E1 #

Continuous fun x ↦ Real.log ↑x

The real logarithm is continuous as a function from nonzero reals.

theorem Real.continuous_log' E1 #

Continuous fun x ↦ Real.log ↑x

The real logarithm is continuous as a function from positive reals.

theorem Real.continuousAt_log E1 #

∀ {x : ℝ}, x ≠ 0 → ContinuousAt Real.log x

theorem Real.continuousAt_log_iff E0 #

∀ {x : ℝ}, ContinuousAt Real.log x ↔ x ≠ 0

theorem Real.log_list_prod E1 #

∀ {l : List ℝ}, (∀ x ∈ l, x ≠ 0) → Real.log l.prod = (List.map (fun x ↦ Real.log x) l).sum

theorem Real.log_multiset_prod E1 #

∀ {s : Multiset ℝ}, (∀ x ∈ s, x ≠ 0) → Real.log s.prod = (Multiset.map (fun x ↦ Real.log x) s).sum

theorem Real.log_prod E1 #

∀ {α : Type u_1} {s : Finset α} {f : α → ℝ}, (∀ x ∈ s, f x ≠ 0) → Real.log (∏ i ∈ s, f i) = ∑ i ∈ s, Real.log (f i)

theorem Finsupp.log_prod E1 #

∀ {α : Type u_1} {β : Type u_2} [inst : Zero β] (f : α →₀ β) (g : α → β → ℝ),
  (∀ (a : α), g a (f a) = 0 → f a = 0) → Real.log (f.prod g) = f.sum fun a b ↦ Real.log (g a b)

theorem Real.log_finprod E1 #

∀ {α : Type u_1} {f : α → ℝ}, (∀ (a : α), 0 < f a) → Real.log (∏ᶠ (a : α), f a) = ∑ᶠ (a : α), Real.log (f a)

theorem Real.log_nat_eq_sum_factorization E1 #

∀ (n : ℕ), Real.log ↑n = n.factorization.sum fun p t ↦ ↑t * Real.log ↑p

theorem Real.tendsto_pow_log_div_mul_add_atTop E1 #

∀ (a b : ℝ) (n : ℕ), a ≠ 0 → Filter.Tendsto (fun x ↦ Real.log x ^ n / (a * x + b)) Filter.atTop (nhds 0)

theorem Real.isLittleO_pow_log_id_atTop E1 #

∀ {n : ℕ}, (fun x ↦ Real.log x ^ n) =o[Filter.atTop] id

theorem Real.isLittleO_log_id_atTop E1 #

Real.log =o[Filter.atTop] id

theorem Real.isLittleO_const_log_atTop E1 #

∀ {c : ℝ}, (fun x ↦ c) =o[Filter.atTop] Real.log

def Real.expPartialHomeomorph E1 #

OpenPartialHomeomorph ℝ ℝ

Real.exp as an OpenPartialHomeomorph with source = univ and target = {z | 0 < z}.

theorem Real.expPartialHomeomorph_apply E0 #

∀ (x : ℝ), ↑Real.expPartialHomeomorph x = Real.exp x

theorem Real.expPartialHomeomorph_symm_apply E0 #

∀ (x : ℝ), ↑Real.expPartialHomeomorph.symm x = Real.log x

theorem Real.expPartialHomeomorph_source E0 #

Real.expPartialHomeomorph.source = Set.univ

theorem Real.expPartialHomeomorph_target E0 #

Real.expPartialHomeomorph.target = Set.Ioi 0

theorem Real.image_log_Ioi E0 #

∀ {a : ℝ}, 0 < a → Real.log '' Set.Ioi a = Set.Ioi (Real.log a)

theorem Real.image_log_Ici E0 #

∀ {a : ℝ}, 0 < a → Real.log '' Set.Ici a = Set.Ici (Real.log a)

theorem Real.image_log_Icc E0 #

∀ {a b : ℝ}, 0 < a → a ≤ b → Real.log '' Set.Icc a b = Set.Icc (Real.log a) (Real.log b)

theorem Real.image_log_Ico E0 #

∀ {a b : ℝ}, 0 < a → a ≤ b → Real.log '' Set.Ico a b = Set.Ico (Real.log a) (Real.log b)

theorem Real.image_log_Ioc E0 #

∀ {a b : ℝ}, 0 < a → a ≤ b → Real.log '' Set.Ioc a b = Set.Ioc (Real.log a) (Real.log b)

theorem Real.image_log_Ioo E0 #

∀ {a b : ℝ}, 0 < a → a ≤ b → Real.log '' Set.Ioo a b = Set.Ioo (Real.log a) (Real.log b)

theorem Real.image_log_uIcc E0 #

∀ {a b : ℝ}, 0 < a → 0 < b → Real.log '' Set.uIcc a b = Set.uIcc (Real.log a) (Real.log b)

theorem Real.image_log_Ioo_zero E0 #

∀ {a : ℝ}, 0 < a → Real.log '' Set.Ioo 0 a = Set.Iio (Real.log a)

theorem Real.image_log_Ioc_zero E0 #

∀ {a : ℝ}, 0 < a → Real.log '' Set.Ioc 0 a = Set.Iic (Real.log a)

theorem Nat.Prime.log_pos E1 #

∀ {p : ℕ}, Nat.Prime p → 0 < Real.log ↑p

theorem Nat.Prime.log_ne_zero E1 #

∀ {p : ℕ}, Nat.Prime p → Real.log ↑p ≠ 0

theorem Filter.Tendsto.log E1 #

∀ {α : Type u_1} {f : α → ℝ} {l : Filter α} {x : ℝ},
  Filter.Tendsto f l (nhds x) → x ≠ 0 → Filter.Tendsto (fun x ↦ Real.log (f x)) l (nhds (Real.log x))

theorem Continuous.log E1 #

∀ {α : Type u_1} [inst : TopologicalSpace α] {f : α → ℝ},
  Continuous f → (∀ (x : α), f x ≠ 0) → Continuous fun x ↦ Real.log (f x)

theorem ContinuousAt.log E1 #

∀ {α : Type u_1} [inst : TopologicalSpace α] {f : α → ℝ} {a : α},
  ContinuousAt f a → f a ≠ 0 → ContinuousAt (fun x ↦ Real.log (f x)) a

theorem ContinuousWithinAt.log E1 #

∀ {α : Type u_1} [inst : TopologicalSpace α] {f : α → ℝ} {s : Set α} {a : α},
  ContinuousWithinAt f s a → f a ≠ 0 → ContinuousWithinAt (fun x ↦ Real.log (f x)) s a

theorem ContinuousOn.log E1 #

∀ {α : Type u_1} [inst : TopologicalSpace α] {f : α → ℝ} {s : Set α},
  ContinuousOn f s → (∀ x ∈ s, f x ≠ 0) → ContinuousOn (fun x ↦ Real.log (f x)) s

theorem Real.tendsto_log_comp_add_sub_log E1 #

∀ (y : ℝ), Filter.Tendsto (fun x ↦ Real.log (x + y) - Real.log x) Filter.atTop (nhds 0)

theorem Real.tendsto_log_nat_add_one_sub_log E1 #

Filter.Tendsto (fun k ↦ Real.log (↑k + 1) - Real.log ↑k) Filter.atTop (nhds 0)

theorem Mathlib.Meta.Positivity.log_nonneg_of_isNat E1 #

∀ {e : ℝ} {n : ℕ}, Mathlib.Meta.NormNum.IsNat e n → 0 ≤ Real.log e

theorem Mathlib.Meta.Positivity.log_pos_of_isNat E1 #

∀ {e : ℝ} {n : ℕ}, Mathlib.Meta.NormNum.IsNat e n → Nat.blt 1 n = true → 0 < Real.log e

theorem Mathlib.Meta.Positivity.log_nonneg_of_isNegNat E1 #

∀ {e : ℝ} {n : ℕ}, Mathlib.Meta.NormNum.IsInt e (Int.negOfNat n) → 0 ≤ Real.log e

theorem Mathlib.Meta.Positivity.log_pos_of_isNegNat E1 #

∀ {e : ℝ} {n : ℕ}, Mathlib.Meta.NormNum.IsInt e (Int.negOfNat n) → Nat.blt 1 n = true → 0 < Real.log e

theorem Mathlib.Meta.Positivity.log_pos_of_isNNRat E1 #

∀ {e : ℝ} {d n : ℕ}, Mathlib.Meta.NormNum.IsNNRat e n d → decide (1 < ↑n / ↑d) = true → 0 < Real.log e

theorem Mathlib.Meta.Positivity.log_pos_of_isRat_neg E1 #

∀ {e : ℝ} {d : ℕ} {n : ℤ}, Mathlib.Meta.NormNum.IsRat e n d → decide (↑n / ↑d < -1) = true → 0 < Real.log e

theorem Mathlib.Meta.Positivity.log_nz_of_isNNRat E1 #

∀ {e : ℝ} {d n : ℕ},
  Mathlib.Meta.NormNum.IsNNRat e n d → decide (0 < ↑n / ↑d) = true → decide (↑n / ↑d < 1) = true → Real.log e ≠ 0

theorem Mathlib.Meta.Positivity.log_nz_of_isRat_neg E1 #

∀ {e : ℝ} {d : ℕ} {n : ℤ},
  Mathlib.Meta.NormNum.IsRat e n d → decide (↑n / ↑d < 0) = true → decide (-1 < ↑n / ↑d) = true → Real.log e ≠ 0

def Mathlib.Meta.Positivity.evalLogNatCast E1 #

Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: Real.log of a natural number is always nonnegative.

def Mathlib.Meta.Positivity.evalLogIntCast E1 #

Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: Real.log of an integer is always nonnegative.

def Mathlib.Meta.Positivity.evalLogNatLit E1 #

Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: Real.log of a numeric literal.