equal
deleted
inserted
replaced
85 by (simp add: linorder_not_less [symmetric]) |
85 by (simp add: linorder_not_less [symmetric]) |
86 |
86 |
87 lemma log_ln: "ln x = log (exp(1)) x" |
87 lemma log_ln: "ln x = log (exp(1)) x" |
88 by (simp add: log_def) |
88 by (simp add: log_def) |
89 |
89 |
|
90 lemma DERIV_log: "x > 0 ==> DERIV (%y. log b y) x :> 1 / (ln b * x)" |
|
91 apply (subst log_def) |
|
92 apply (subgoal_tac "(%y. ln y / ln b) = (%y. (1 / ln b) * ln y)") |
|
93 apply (erule ssubst) |
|
94 apply (subgoal_tac "1 / (ln b * x) = (1 / ln b) * (1 / x)") |
|
95 apply (erule ssubst) |
|
96 apply (rule DERIV_cmult) |
|
97 apply (erule DERIV_ln_divide) |
|
98 apply auto |
|
99 done |
|
100 |
90 lemma powr_log_cancel [simp]: |
101 lemma powr_log_cancel [simp]: |
91 "[| 0 < a; a \<noteq> 1; 0 < x |] ==> a powr (log a x) = x" |
102 "[| 0 < a; a \<noteq> 1; 0 < x |] ==> a powr (log a x) = x" |
92 by (simp add: powr_def log_def) |
103 by (simp add: powr_def log_def) |
93 |
104 |
94 lemma log_powr_cancel [simp]: "[| 0 < a; a \<noteq> 1 |] ==> log a (a powr y) = y" |
105 lemma log_powr_cancel [simp]: "[| 0 < a; a \<noteq> 1 |] ==> log a (a powr y) = y" |
150 else x powr (real n))" |
161 else x powr (real n))" |
151 apply (case_tac "x = 0", simp, simp) |
162 apply (case_tac "x = 0", simp, simp) |
152 apply (rule powr_realpow [THEN sym], simp) |
163 apply (rule powr_realpow [THEN sym], simp) |
153 done |
164 done |
154 |
165 |
155 lemma ln_pwr: "0 < x ==> 0 < y ==> ln(x powr y) = y * ln x" |
166 lemma ln_powr: "0 < x ==> 0 < y ==> ln(x powr y) = y * ln x" |
156 by (unfold powr_def, simp) |
167 by (unfold powr_def, simp) |
|
168 |
|
169 lemma log_powr: "0 < x ==> 0 \<le> y ==> log b (x powr y) = y * log b x" |
|
170 apply (case_tac "y = 0") |
|
171 apply force |
|
172 apply (auto simp add: log_def ln_powr field_simps) |
|
173 done |
|
174 |
|
175 lemma log_nat_power: "0 < x ==> log b (x^n) = real n * log b x" |
|
176 apply (subst powr_realpow [symmetric]) |
|
177 apply (auto simp add: log_powr) |
|
178 done |
157 |
179 |
158 lemma ln_bound: "1 <= x ==> ln x <= x" |
180 lemma ln_bound: "1 <= x ==> ln x <= x" |
159 apply (subgoal_tac "ln(1 + (x - 1)) <= x - 1") |
181 apply (subgoal_tac "ln(1 + (x - 1)) <= x - 1") |
160 apply simp |
182 apply simp |
161 apply (rule ln_add_one_self_le_self, simp) |
183 apply (rule ln_add_one_self_le_self, simp) |
205 |
227 |
206 lemma ln_powr_bound: "1 <= x ==> 0 < a ==> ln x <= (x powr a) / a" |
228 lemma ln_powr_bound: "1 <= x ==> 0 < a ==> ln x <= (x powr a) / a" |
207 apply (rule mult_imp_le_div_pos) |
229 apply (rule mult_imp_le_div_pos) |
208 apply (assumption) |
230 apply (assumption) |
209 apply (subst mult_commute) |
231 apply (subst mult_commute) |
210 apply (subst ln_pwr [THEN sym]) |
232 apply (subst ln_powr [THEN sym]) |
211 apply auto |
233 apply auto |
212 apply (rule ln_bound) |
234 apply (rule ln_bound) |
213 apply (erule ge_one_powr_ge_zero) |
235 apply (erule ge_one_powr_ge_zero) |
214 apply (erule order_less_imp_le) |
236 apply (erule order_less_imp_le) |
215 done |
237 done |