equal
deleted
inserted
replaced
7 |
7 |
8 header{*Exponentiation and Binomial Coefficients*} |
8 header{*Exponentiation and Binomial Coefficients*} |
9 |
9 |
10 theory Power = Divides: |
10 theory Power = Divides: |
11 |
11 |
12 subsection{*Powers for Arbitrary (Semi)Rings*} |
12 subsection{*Powers for Arbitrary Semirings*} |
13 |
13 |
14 axclass recpower \<subseteq> comm_semiring_1_cancel, power |
14 axclass recpower \<subseteq> comm_semiring_1_cancel, power |
15 power_0 [simp]: "a ^ 0 = 1" |
15 power_0 [simp]: "a ^ 0 = 1" |
16 power_Suc: "a ^ (Suc n) = a * (a ^ n)" |
16 power_Suc: "a ^ (Suc n) = a * (a ^ n)" |
17 |
17 |
267 apply (subgoal_tac "1 * a^n < a * a^m", simp) |
267 apply (subgoal_tac "1 * a^n < a * a^m", simp) |
268 apply (rule mult_strict_mono) |
268 apply (rule mult_strict_mono) |
269 apply (auto simp add: order_less_trans [OF zero_less_one] zero_le_power |
269 apply (auto simp add: order_less_trans [OF zero_less_one] zero_le_power |
270 order_less_imp_le) |
270 order_less_imp_le) |
271 done |
271 done |
|
272 |
|
273 lemma power_increasing_iff [simp]: |
|
274 "1 < (b::'a::{ordered_semidom,recpower}) ==> (b ^ x \<le> b ^ y) = (x \<le> y)" |
|
275 by (blast intro: power_le_imp_le_exp power_increasing order_less_imp_le) |
|
276 |
|
277 lemma power_strict_increasing_iff [simp]: |
|
278 "1 < (b::'a::{ordered_semidom,recpower}) ==> (b ^ x < b ^ y) = (x < y)" |
|
279 by (blast intro: power_less_imp_less_exp power_strict_increasing) |
272 |
280 |
273 lemma power_le_imp_le_base: |
281 lemma power_le_imp_le_base: |
274 assumes le: "a ^ Suc n \<le> b ^ Suc n" |
282 assumes le: "a ^ Suc n \<le> b ^ Suc n" |
275 and xnonneg: "(0::'a::{ordered_semidom,recpower}) \<le> a" |
283 and xnonneg: "(0::'a::{ordered_semidom,recpower}) \<le> a" |
276 and ynonneg: "0 \<le> b" |
284 and ynonneg: "0 \<le> b" |