equal
deleted
inserted
replaced
2352 by (induct n) (simp_all add: ac_simps powr_add of_nat_Suc) |
2352 by (induct n) (simp_all add: ac_simps powr_add of_nat_Suc) |
2353 |
2353 |
2354 lemma powr_numeral: "0 < x \<Longrightarrow> x powr (numeral n :: real) = x ^ (numeral n)" |
2354 lemma powr_numeral: "0 < x \<Longrightarrow> x powr (numeral n :: real) = x ^ (numeral n)" |
2355 by (metis of_nat_numeral powr_realpow) |
2355 by (metis of_nat_numeral powr_realpow) |
2356 |
2356 |
|
2357 lemma powr_real_of_int: |
|
2358 "x > 0 \<Longrightarrow> x powr real_of_int n = (if n \<ge> 0 then x ^ nat n else inverse (x ^ nat (-n)))" |
|
2359 using powr_realpow[of x "nat n"] powr_realpow[of x "nat (-n)"] |
|
2360 by (auto simp: field_simps powr_minus) |
|
2361 |
2357 lemma powr2_sqrt[simp]: "0 < x \<Longrightarrow> sqrt x powr 2 = x" |
2362 lemma powr2_sqrt[simp]: "0 < x \<Longrightarrow> sqrt x powr 2 = x" |
2358 by(simp add: powr_numeral) |
2363 by(simp add: powr_numeral) |
2359 |
2364 |
2360 lemma powr_realpow2: "0 <= x ==> 0 < n ==> x^n = (if (x = 0) then 0 else x powr (real n))" |
2365 lemma powr_realpow2: "0 <= x ==> 0 < n ==> x^n = (if (x = 0) then 0 else x powr (real n))" |
2361 apply (case_tac "x = 0", simp, simp) |
2366 apply (case_tac "x = 0", simp, simp) |