Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 72c20fa

Browse files
committed
feat(analysis/special_functions/exp_log): Classify when log is zero (#9815)
Classify when the real `log` function is zero.
1 parent d23b833 commit 72c20fa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/analysis/special_functions/exp_log.lean

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,19 @@ log_inj_on_pos (set.mem_Ioi.2 h₁) (set.mem_Ioi.2 zero_lt_one) (h₂.trans real
572572
lemma log_ne_zero_of_pos_of_ne_one {x : ℝ} (hx_pos : 0 < x) (hx : x ≠ 1) : log x ≠ 0 :=
573573
mt (eq_one_of_pos_of_log_eq_zero hx_pos) hx
574574

575+
@[simp] lemma log_eq_zero {x : ℝ} : log x = 0 ↔ x = 0 ∨ x = 1 ∨ x = -1 :=
576+
begin
577+
split,
578+
{ intros h,
579+
rcases lt_trichotomy x 0 with x_lt_zero | rfl | x_gt_zero,
580+
{ refine or.inr (or.inr (eq_neg_iff_eq_neg.mp _)),
581+
rw [←log_neg_eq_log x] at h,
582+
exact (eq_one_of_pos_of_log_eq_zero (neg_pos.mpr x_lt_zero) h).symm, },
583+
{ exact or.inl rfl },
584+
{ exact or.inr (or.inl (eq_one_of_pos_of_log_eq_zero x_gt_zero h)), }, },
585+
{ rintro (rfl|rfl|rfl); simp only [log_one, log_zero, log_neg_eq_log], }
586+
end
587+
575588
/-- The real logarithm function tends to `+∞` at `+∞`. -/
576589
lemma tendsto_log_at_top : tendsto log at_top at_top :=
577590
tendsto_comp_exp_at_top.1 $ by simpa only [log_exp] using tendsto_id

0 commit comments

Comments
 (0)