Skip to content

Commit ea11ccc

Browse files
feat(Analysis/SpecialFunctions/Log/Basic): two lemmas (leanprover-community#39010)
This adds two lemmas `Real.le_exp_of_log_le {x y : ℝ} (h : log x ≤ y) : x ≤ exp y` and its `lt` counterpart. They are convenient since they do not require `x` to be positive.
1 parent c315f04 commit ea11ccc

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,18 @@ theorem le_log_iff_exp_le (hy : 0 < y) : x ≤ log y ↔ exp x ≤ y := by rw [
165165

166166
theorem lt_log_iff_exp_lt (hy : 0 < y) : x < log y ↔ exp x < y := by rw [← exp_lt_exp, exp_log hy]
167167

168+
/-- One direction of `Real.log_le_iff_le_exp` without positivity assumption. -/
169+
lemma le_exp_of_log_le (h : log x ≤ y) : x ≤ exp y := by
170+
rcases le_or_gt x 0 with hx | hx
171+
· exact hx.trans <| exp_nonneg y
172+
· exact (log_le_iff_le_exp hx).mp h
173+
174+
/-- One direction of `Real.log_lt_iff_lt_exp` without positivity assumption. -/
175+
lemma lt_exp_of_log_lt (h : log x < y) : x < exp y := by
176+
rcases le_or_gt x 0 with hx | hx
177+
· exact hx.trans_lt <| exp_pos y
178+
· exact (log_lt_iff_lt_exp hx).mp h
179+
168180
theorem log_pos_iff (hx : 0 ≤ x) : 0 < log x ↔ 1 < x := by
169181
rcases hx.eq_or_lt with (rfl | hx)
170182
· simp [zero_le_one]

0 commit comments

Comments
 (0)