forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMonotone.lean
More file actions
77 lines (61 loc) · 2.59 KB
/
Monotone.lean
File metadata and controls
77 lines (61 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/-
Copyright (c) 2021 Bolton Bailey. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bolton Bailey
-/
module
public import Mathlib.Analysis.SpecialFunctions.Pow.Real
/-!
# Logarithm Tonality
In this file we describe the tonality of the logarithm function when multiplied by functions of the
form `x ^ a`.
## Tags
logarithm, tonality
-/
public section
open Set Filter Function
open Topology
noncomputable section
namespace Real
theorem log_mul_self_monotoneOn : MonotoneOn (fun x : ℝ => log x * x) { x | 1 ≤ x } := by
-- TODO: can be strengthened to exp (-1) ≤ x
simp only [MonotoneOn, mem_setOf_eq]
intro x hex y hey hxy
have y_pos : 0 < y := lt_of_lt_of_le zero_lt_one hey
gcongr
rwa [le_log_iff_exp_le y_pos, Real.exp_zero]
theorem log_div_self_antitoneOn : AntitoneOn (fun x : ℝ => log x / x) { x | exp 1 ≤ x } := by
simp only [AntitoneOn, mem_setOf_eq]
intro x hex y hey hxy
have x_pos : 0 < x := (exp_pos 1).trans_le hex
have y_pos : 0 < y := (exp_pos 1).trans_le hey
have hlogx : 1 ≤ log x := by rwa [le_log_iff_exp_le x_pos]
have hyx : 0 ≤ y / x - 1 := by rwa [le_sub_iff_add_le, le_div_iff₀ x_pos, zero_add, one_mul]
rw [div_le_iff₀ y_pos, ← sub_le_sub_iff_right (log x)]
calc
log y - log x = log (y / x) := by rw [log_div y_pos.ne' x_pos.ne']
_ ≤ y / x - 1 := log_le_sub_one_of_pos (div_pos y_pos x_pos)
_ ≤ log x * (y / x - 1) := le_mul_of_one_le_left hyx hlogx
_ = log x / x * y - log x := by ring
theorem log_div_self_rpow_antitoneOn {a : ℝ} (ha : 0 < a) :
AntitoneOn (fun x : ℝ => log x / x ^ a) { x | exp (1 / a) ≤ x } := by
simp only [AntitoneOn, mem_setOf_eq]
intro x hex y _ hxy
have x_pos : 0 < x := lt_of_lt_of_le (exp_pos (1 / a)) hex
have y_pos : 0 < y := by linarith
nth_rw 1 [← rpow_one y, ← rpow_one x]
rw [← div_self (ne_of_lt ha).symm, div_eq_mul_one_div a a, rpow_mul y_pos.le, rpow_mul x_pos.le,
log_rpow (rpow_pos_of_pos y_pos a), log_rpow (rpow_pos_of_pos x_pos a), mul_div_assoc,
mul_div_assoc, mul_le_mul_iff_right₀ (one_div_pos.mpr ha)]
have hbound {z : ℝ} (hz : rexp (1 / a) ≤ z) : z ^ a ∈ {b | rexp 1 ≤ b} := by
rw [mem_setOf_eq]
convert rpow_le_rpow _ hz (le_of_lt ha) using 1
· simp only [← exp_mul, Real.exp_eq_exp, field]
positivity
refine log_div_self_antitoneOn (hbound hex) (hbound (hex.trans hxy)) ?_
gcongr
theorem log_div_sqrt_antitoneOn : AntitoneOn (fun x : ℝ => log x / √x) { x | exp 2 ≤ x } := by
simp_rw [sqrt_eq_rpow]
convert log_div_self_rpow_antitoneOn one_half_pos
norm_num
end Real