File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

full_name: Real.log
code: /-- 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`. -/
@[pp_nodot]
noncomputable def log (x : ℝ) : ℝ 
goal: ℝ

full_name: Real.log_of_ne_zero
code: theorem log_of_ne_zero (hx : x ≠ 0) : log x = expOrderIso.symm ⟨|x|, abs_pos.2 hx⟩ 
goal: Real.log x = Real.expOrderIso.symm ⟨|x|, ⋯⟩

full_name: Real.log_of_pos
code: theorem log_of_pos (hx : 0 < x) : log x = expOrderIso.symm ⟨x, hx⟩ 
goal: Real.log x = Real.expOrderIso.symm ⟨x, hx⟩

full_name: Real.exp_log_eq_abs
code: theorem exp_log_eq_abs (hx : x ≠ 0) : exp (log x) = |x| 
goal: Real.exp (Real.log x) = |x|

full_name: Real.exp_log
code: theorem exp_log (hx : 0 < x) : exp (log x) = x 
goal: Real.exp (Real.log x) = x

full_name: Real.exp_log_of_neg
code: theorem exp_log_of_neg (hx : x < 0) : exp (log x) = -x 
goal: Real.exp (Real.log x) = -x

full_name: Real.le_exp_log
code: theorem le_exp_log (x : ℝ) : x ≤ exp (log x) 
goal: x ≤ Real.exp (Real.log x)

full_name: Real.log_exp
code: @[simp]
theorem log_exp (x : ℝ) : log (exp x) = x 
goal: Real.log (Real.exp x) = x

full_name: Real.surjOn_log
code: theorem surjOn_log : SurjOn log (Ioi 0) univ 
goal: Set.SurjOn Real.log (Set.Ioi 0) Set.univ

full_name: Real.log_surjective
code: theorem log_surjective : Surjective log 
goal: Function.Surjective Real.log

full_name: Real.range_log
code: @[simp]
theorem range_log : range log = univ 
goal: Set.range Real.log = Set.univ

full_name: Real.log_zero
code: @[simp]
theorem log_zero : log 0 = 0 
goal: Real.log 0 = 0

full_name: Real.log_one
code: @[simp]
theorem log_one : log 1 = 0 
goal: Real.log 1 = 0

full_name: Real.log_abs
code: @[simp]
theorem log_abs (x : ℝ) : log |x| = log x 
goal: Real.log |x| = Real.log x

full_name: Real.log_neg_eq_log
code: @[simp]
theorem log_neg_eq_log (x : ℝ) : log (-x) = log x 
goal: Real.log (-x) = Real.log x

full_name: Real.sinh_log
code: theorem sinh_log {x : ℝ} (hx : 0 < x) : sinh (log x) = (x - x⁻¹) / 2 
goal: Real.sinh (Real.log x) = (x - x⁻¹) / 2

full_name: Real.cosh_log
code: theorem cosh_log {x : ℝ} (hx : 0 < x) : cosh (log x) = (x + x⁻¹) / 2 
goal: Real.cosh (Real.log x) = (x + x⁻¹) / 2

full_name: Real.surjOn_log'
code: theorem surjOn_log' : SurjOn log (Iio 0) univ 
goal: Set.SurjOn Real.log (Set.Iio 0) Set.univ

full_name: Real.log_mul
code: theorem log_mul (hx : x ≠ 0) (hy : y ≠ 0) : log (x * y) = log x + log y 
goal: Real.log (x * y) = Real.log x + Real.log y

full_name: Real.log_div
code: theorem log_div (hx : x ≠ 0) (hy : y ≠ 0) : log (x / y) = log x - log y 
goal: Real.log (x / y) = Real.log x - Real.log y

full_name: Real.log_inv
code: @[simp]
theorem log_inv (x : ℝ) : log x⁻¹ = -log x 
goal: Real.log x⁻¹ = -Real.log x

full_name: Real.log_le_log_iff
code: theorem log_le_log_iff (h : 0 < x) (h₁ : 0 < y) : log x ≤ log y ↔ x ≤ y 
goal: Real.log x ≤ Real.log y ↔ x ≤ y

full_name: Real.log_le_log
code: @[gcongr]
lemma log_le_log (hx : 0 < x) (hxy : x ≤ y) : log x ≤ log y 
goal: Real.log x ≤ Real.log y

full_name: Real.log_lt_log
code: @[gcongr]
theorem log_lt_log (hx : 0 < x) (h : x < y) : log x < log y 
goal: Real.log x < Real.log y

full_name: Real.log_lt_log_iff
code: theorem log_lt_log_iff (hx : 0 < x) (hy : 0 < y) : log x < log y ↔ x < y 
goal: Real.log x < Real.log y ↔ x < y

full_name: Real.log_le_iff_le_exp
code: theorem log_le_iff_le_exp (hx : 0 < x) : log x ≤ y ↔ x ≤ exp y 
goal: Real.log x ≤ y ↔ x ≤ Real.exp y

full_name: Real.log_lt_iff_lt_exp
code: theorem log_lt_iff_lt_exp (hx : 0 < x) : log x < y ↔ x < exp y 
goal: Real.log x < y ↔ x < Real.exp y

full_name: Real.le_log_iff_exp_le
code: theorem le_log_iff_exp_le (hy : 0 < y) : x ≤ log y ↔ exp x ≤ y 
goal: x ≤ Real.log y ↔ Real.exp x ≤ y

full_name: Real.lt_log_iff_exp_lt
code: theorem lt_log_iff_exp_lt (hy : 0 < y) : x < log y ↔ exp x < y 
goal: x < Real.log y ↔ Real.exp x < y

full_name: Real.log_pos_iff
code: theorem log_pos_iff (hx : 0 < x) : 0 < log x ↔ 1 < x 
goal: 0 < Real.log x ↔ 1 < x

full_name: Real.log_pos
code: theorem log_pos (hx : 1 < x) : 0 < log x 
goal: 0 < Real.log x

full_name: Real.log_pos_of_lt_neg_one
code: theorem log_pos_of_lt_neg_one (hx : x < -1) : 0 < log x 
goal: 0 < Real.log x

full_name: Real.log_neg_iff
code: theorem log_neg_iff (h : 0 < x) : log x < 0 ↔ x < 1 
goal: Real.log x < 0 ↔ x < 1

full_name: Real.log_neg
code: theorem log_neg (h0 : 0 < x) (h1 : x < 1) : log x < 0 
goal: Real.log x < 0

full_name: Real.log_neg_of_lt_zero
code: theorem log_neg_of_lt_zero (h0 : x < 0) (h1 : -1 < x) : log x < 0 
goal: Real.log x < 0

full_name: Real.log_nonneg_iff
code: theorem log_nonneg_iff (hx : 0 < x) : 0 ≤ log x ↔ 1 ≤ x 
goal: 0 ≤ Real.log x ↔ 1 ≤ x

full_name: Real.log_nonneg
code: theorem log_nonneg (hx : 1 ≤ x) : 0 ≤ log x 
goal: 0 ≤ Real.log x

full_name: Real.log_nonpos_iff
code: theorem log_nonpos_iff (hx : 0 < x) : log x ≤ 0 ↔ x ≤ 1 
goal: Real.log x ≤ 0 ↔ x ≤ 1

full_name: Real.log_nonpos_iff'
code: theorem log_nonpos_iff' (hx : 0 ≤ x) : log x ≤ 0 ↔ x ≤ 1 
goal: Real.log x ≤ 0 ↔ x ≤ 1

full_name: Real.log_nonpos
code: theorem log_nonpos (hx : 0 ≤ x) (h'x : x ≤ 1) : log x ≤ 0 
goal: Real.log x ≤ 0

full_name: Real.log_natCast_nonneg
code: theorem log_natCast_nonneg (n : ℕ) : 0 ≤ log n 
goal: 0 ≤ Real.log ↑n

full_name: Real.log_neg_natCast_nonneg
code: theorem log_neg_natCast_nonneg (n : ℕ) : 0 ≤ log (-n) 
goal: 0 ≤ Real.log (-↑n)

full_name: Real.log_intCast_nonneg
code: theorem log_intCast_nonneg (n : ℤ) : 0 ≤ log n 
goal: 0 ≤ Real.log ↑n

full_name: Real.strictMonoOn_log
code: theorem strictMonoOn_log : StrictMonoOn log (Set.Ioi 0) 
goal: StrictMonoOn Real.log (Set.Ioi 0)

full_name: Real.strictAntiOn_log
code: theorem strictAntiOn_log : StrictAntiOn log (Set.Iio 0) 
goal: StrictAntiOn Real.log (Set.Iio 0)

full_name: Real.log_injOn_pos
code: theorem log_injOn_pos : Set.InjOn log (Set.Ioi 0) 
goal: Set.InjOn Real.log (Set.Ioi 0)

full_name: Real.log_lt_sub_one_of_pos
code: theorem log_lt_sub_one_of_pos (hx1 : 0 < x) (hx2 : x ≠ 1) : log x < x - 1 
goal: Real.log x < x - 1

full_name: Real.eq_one_of_pos_of_log_eq_zero
code: theorem eq_one_of_pos_of_log_eq_zero {x : ℝ} (h₁ : 0 < x) (h₂ : log x = 0) : x = 1 
goal: x = 1

full_name: Real.log_ne_zero_of_pos_of_ne_one
code: theorem log_ne_zero_of_pos_of_ne_one {x : ℝ} (hx_pos : 0 < x) (hx : x ≠ 1) : log x ≠ 0 
goal: Real.log x ≠ 0

full_name: Real.log_eq_zero
code: @[simp]
theorem log_eq_zero {x : ℝ} : log x = 0 ↔ x = 0 ∨ x = 1 ∨ x = -1 
goal: Real.log x = 0 ↔ x = 0 ∨ x = 1 ∨ x = -1

full_name: Real.log_ne_zero
code: theorem log_ne_zero {x : ℝ} : log x ≠ 0 ↔ x ≠ 0 ∧ x ≠ 1 ∧ x ≠ -1 
goal: Real.log x ≠ 0 ↔ x ≠ 0 ∧ x ≠ 1 ∧ x ≠ -1

full_name: Real.log_pow
code: @[simp]
theorem log_pow (x : ℝ) (n : ℕ) : log (x ^ n) = n * log x 
goal: Real.log (x ^ n) = ↑n * Real.log x

full_name: Real.log_zpow
code: @[simp]
theorem log_zpow (x : ℝ) (n : ℤ) : log (x ^ n) = n * log x 
goal: Real.log (x ^ n) = ↑n * Real.log x

full_name: Real.log_sqrt
code: theorem log_sqrt {x : ℝ} (hx : 0 ≤ x) : log (√x) = log x / 2 
goal: Real.log √x = Real.log x / 2

full_name: Real.log_le_sub_one_of_pos
code: theorem log_le_sub_one_of_pos {x : ℝ} (hx : 0 < x) : log x ≤ x - 1 
goal: Real.log x ≤ x - 1

full_name: Real.abs_log_mul_self_lt
code: /-- Bound for `|log x * x|` in the interval `(0, 1]`. -/
theorem abs_log_mul_self_lt (x : ℝ) (h1 : 0 < x) (h2 : x ≤ 1) : |log x * x| < 1 
goal: |Real.log x * x| < 1

full_name: Real.tendsto_log_atTop
code: /-- The real logarithm function tends to `+∞` at `+∞`. -/
theorem tendsto_log_atTop : Tendsto log atTop atTop 
goal: Filter.Tendsto Real.log Filter.atTop Filter.atTop

full_name: Real.tendsto_log_nhdsWithin_zero
code: theorem tendsto_log_nhdsWithin_zero : Tendsto log (𝓝[≠] 0) atBot 
goal: Filter.Tendsto Real.log (𝓝[≠] 0) Filter.atBot

full_name: Real.tendsto_log_nhdsWithin_zero_right
code: lemma tendsto_log_nhdsWithin_zero_right : Tendsto log (𝓝[>] 0) atBot 
goal: Filter.Tendsto Real.log (𝓝[>] 0) Filter.atBot

full_name: Real.continuousOn_log
code: theorem continuousOn_log : ContinuousOn log {0}ᶜ 
goal: ContinuousOn Real.log {0}ᶜ

full_name: Real.continuous_log
code: @[continuity]
theorem continuous_log : Continuous fun x : { x : ℝ // x ≠ 0 } => log x 
goal: Continuous fun x => Real.log ↑x

full_name: Real.continuous_log'
code: @[continuity]
theorem continuous_log' : Continuous fun x : { x : ℝ // 0 < x } => log x 
goal: Continuous fun x => Real.log ↑x

full_name: Real.continuousAt_log
code: theorem continuousAt_log (hx : x ≠ 0) : ContinuousAt log x 
goal: ContinuousAt Real.log x

full_name: Real.continuousAt_log_iff
code: @[simp]
theorem continuousAt_log_iff : ContinuousAt log x ↔ x ≠ 0 
goal: ContinuousAt Real.log x ↔ x ≠ 0

full_name: Real.log_prod
code: theorem log_prod {α : Type*} (s : Finset α) (f : α → ℝ) (hf : ∀ x ∈ s, f x ≠ 0) :
    log (∏ i ∈ s, f i) = ∑ i ∈ s, log (f i) 
goal: Real.log (∏ i ∈ s, f i) = ∑ i ∈ s, Real.log (f i)

full_name: Finsupp.log_prod
code: protected theorem _root_.Finsupp.log_prod {α β : Type*} [Zero β] (f : α →₀ β) (g : α → β → ℝ)
    (hg : ∀ a, g a (f a) = 0 → f a = 0) : log (f.prod g) = f.sum fun a b ↦ log (g a b) 
goal: Real.log (f.prod g) = f.sum fun a b => Real.log (g a b)

full_name: Real.log_nat_eq_sum_factorization
code: theorem log_nat_eq_sum_factorization (n : ℕ) :
    log n = n.factorization.sum fun p t => t * log p 
goal: Real.log ↑n = n.factorization.sum fun p t => ↑t * Real.log ↑p

full_name: Real.tendsto_pow_log_div_mul_add_atTop
code: theorem tendsto_pow_log_div_mul_add_atTop (a b : ℝ) (n : ℕ) (ha : a ≠ 0) :
    Tendsto (fun x => log x ^ n / (a * x + b)) atTop (𝓝 0) 
goal: Filter.Tendsto (fun x => Real.log x ^ n / (a * x + b)) Filter.atTop (𝓝 0)

full_name: Real.isLittleO_pow_log_id_atTop
code: theorem isLittleO_pow_log_id_atTop {n : ℕ} : (fun x => log x ^ n) =o[atTop] id 
goal: (fun x => Real.log x ^ n) =o[Filter.atTop] id

full_name: Real.isLittleO_log_id_atTop
code: theorem isLittleO_log_id_atTop : log =o[atTop] id 
goal: Real.log =o[Filter.atTop] id

full_name: Real.isLittleO_const_log_atTop
code: theorem isLittleO_const_log_atTop {c : ℝ} : (fun _ => c) =o[atTop] log 
goal: (fun x => c) =o[Filter.atTop] Real.log

full_name: Filter.Tendsto.log
code: theorem Filter.Tendsto.log {f : α → ℝ} {l : Filter α} {x : ℝ} (h : Tendsto f l (𝓝 x)) (hx : x ≠ 0) :
    Tendsto (fun x => log (f x)) l (𝓝 (log x)) 
goal: Filter.Tendsto (fun x => Real.log (f x)) l (𝓝 (Real.log x))

full_name: Continuous.log
code: @[fun_prop]
theorem Continuous.log (hf : Continuous f) (h₀ : ∀ x, f x ≠ 0) : Continuous fun x => log (f x) 
goal: Continuous fun x => Real.log (f x)

full_name: ContinuousAt.log
code: @[fun_prop]
nonrec theorem ContinuousAt.log (hf : ContinuousAt f a) (h₀ : f a ≠ 0) :
    ContinuousAt (fun x => log (f x)) a 
goal: ContinuousAt (fun x => Real.log (f x)) a

full_name: ContinuousWithinAt.log
code: nonrec theorem ContinuousWithinAt.log (hf : ContinuousWithinAt f s a) (h₀ : f a ≠ 0) :
    ContinuousWithinAt (fun x => log (f x)) s a 
goal: ContinuousWithinAt (fun x => Real.log (f x)) s a

full_name: ContinuousOn.log
code: @[fun_prop]
theorem ContinuousOn.log (hf : ContinuousOn f s) (h₀ : ∀ x ∈ s, f x ≠ 0) :
    ContinuousOn (fun x => log (f x)) s 
goal: ContinuousOn (fun x => Real.log (f x)) s

full_name: Real.tendsto_log_comp_add_sub_log
code: theorem tendsto_log_comp_add_sub_log (y : ℝ) :
    Tendsto (fun x : ℝ => log (x + y) - log x) atTop (𝓝 0) 
goal: Filter.Tendsto (fun x => Real.log (x + y) - Real.log x) Filter.atTop (𝓝 0)

full_name: Real.tendsto_log_nat_add_one_sub_log
code: theorem tendsto_log_nat_add_one_sub_log : Tendsto (fun k : ℕ => log (k + 1) - log k) atTop (𝓝 0) 
goal: Filter.Tendsto (fun k => Real.log (↑k + 1) - Real.log ↑k) Filter.atTop (𝓝 0)

full_name: Mathlib.Meta.Positivity.log_nonneg_of_isNat
code: lemma log_nonneg_of_isNat {n : ℕ} (h : NormNum.IsNat e n) : 0 ≤ Real.log (e : ℝ) 
goal: 0 ≤ Real.log e

full_name: Mathlib.Meta.Positivity.log_pos_of_isNat
code: lemma log_pos_of_isNat {n : ℕ} (h : NormNum.IsNat e n) (w : Nat.blt 1 n = true) :
    0 < Real.log (e : ℝ) 
goal: 0 < Real.log e

full_name: Mathlib.Meta.Positivity.log_nonneg_of_isNegNat
code: lemma log_nonneg_of_isNegNat {n : ℕ} (h : NormNum.IsInt e (.negOfNat n)) :
    0 ≤ Real.log (e : ℝ) 
goal: 0 ≤ Real.log e

full_name: Mathlib.Meta.Positivity.log_pos_of_isNegNat
code: lemma log_pos_of_isNegNat {n : ℕ} (h : NormNum.IsInt e (.negOfNat n)) (w : Nat.blt 1 n = true) :
    0 < Real.log (e : ℝ) 
goal: 0 < Real.log e

full_name: Mathlib.Meta.Positivity.log_pos_of_isRat
code: lemma log_pos_of_isRat {n : ℤ} :
    (NormNum.IsRat e n d) → (decide ((1 : ℚ) < n / d)) → (0 < Real.log (e : ℝ))
  
goal: Mathlib.Meta.NormNum.IsRat e n d → decide (1 < ↑n / ↑d) = true → 0 < Real.log e

full_name: Mathlib.Meta.Positivity.log_pos_of_isRat_neg
code: lemma log_pos_of_isRat_neg {n : ℤ} :
    (NormNum.IsRat e n d) → (decide (n / d < (-1 : ℚ))) → (0 < Real.log (e : ℝ))
  
goal: Mathlib.Meta.NormNum.IsRat e n d → decide (↑n / ↑d < -1) = true → 0 < Real.log e

full_name: Mathlib.Meta.Positivity.log_nz_of_isRat
code: lemma log_nz_of_isRat {n : ℤ} : (NormNum.IsRat e n d) → (decide ((0 : ℚ) < n / d))
    → (decide (n / d < (1 : ℚ))) → (Real.log (e : ℝ) ≠ 0)
  
goal: Mathlib.Meta.NormNum.IsRat e n d → decide (0 < ↑n / ↑d) = true → decide (↑n / ↑d < 1) = true → Real.log e ≠ 0

full_name: Mathlib.Meta.Positivity.log_nz_of_isRat_neg
code: lemma log_nz_of_isRat_neg {n : ℤ} : (NormNum.IsRat e n d) → (decide (n / d < (0 : ℚ)))
    → (decide ((-1 : ℚ) < n / d)) → (Real.log (e : ℝ) ≠ 0)
  
goal: Mathlib.Meta.NormNum.IsRat e n d → decide (↑n / ↑d < 0) = true → decide (-1 < ↑n / ↑d) = true → Real.log e ≠ 0

full_name: Mathlib.Meta.Positivity.evalLogNatCast
code: /-- Extension for the `positivity` tactic: `Real.log` of a natural number is always nonnegative. -/
@[positivity Real.log (Nat.cast _)]
def evalLogNatCast : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt

full_name: Mathlib.Meta.Positivity.evalLogIntCast
code: /-- Extension for the `positivity` tactic: `Real.log` of an integer is always nonnegative. -/
@[positivity Real.log (Int.cast _)]
def evalLogIntCast : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt

full_name: Mathlib.Meta.Positivity.evalLogNatLit
code: /-- Extension for the `positivity` tactic: `Real.log` of a numeric literal. -/
@[positivity Real.log _]
def evalLogNatLit : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt