src/HOL/Real/RealPow.thy
author paulson
Thu Nov 27 10:47:55 2003 +0100 (2003-11-27)
changeset 14268 5cf13e80be0e
parent 14265 95b42e69436c
child 14269 502a7c95de73
permissions -rw-r--r--
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
New theorems for Ring_and_Field. Fixing affected proofs.
     1 (*  Title       : HOL/Real/RealPow.thy
     2     ID          : $Id$
     3     Author      : Jacques D. Fleuriot  
     4     Copyright   : 1998  University of Cambridge
     5     Description : Natural powers theory
     6 
     7 *)
     8 
     9 theory RealPow = RealAbs:
    10 
    11 (*belongs to theory RealAbs*)
    12 lemmas [arith_split] = abs_split
    13 
    14 instance real :: power ..
    15 
    16 primrec (realpow)
    17      realpow_0:   "r ^ 0       = 1"
    18      realpow_Suc: "r ^ (Suc n) = (r::real) * (r ^ n)"
    19 
    20 
    21 lemma realpow_zero [simp]: "(0::real) ^ (Suc n) = 0"
    22 by auto
    23 
    24 lemma realpow_not_zero [rule_format]: "r \<noteq> (0::real) --> r ^ n \<noteq> 0"
    25 by (induct_tac "n", auto)
    26 
    27 lemma realpow_zero_zero: "r ^ n = (0::real) ==> r = 0"
    28 apply (rule ccontr)
    29 apply (auto dest: realpow_not_zero)
    30 done
    31 
    32 lemma realpow_inverse: "inverse ((r::real) ^ n) = (inverse r) ^ n"
    33 apply (induct_tac "n")
    34 apply (auto simp add: real_inverse_distrib)
    35 done
    36 
    37 lemma realpow_abs: "abs(r ^ n) = abs(r::real) ^ n"
    38 apply (induct_tac "n")
    39 apply (auto simp add: abs_mult)
    40 done
    41 
    42 lemma realpow_add: "(r::real) ^ (n + m) = (r ^ n) * (r ^ m)"
    43 apply (induct_tac "n")
    44 apply (auto simp add: real_mult_ac)
    45 done
    46 
    47 lemma realpow_one [simp]: "(r::real) ^ 1 = r"
    48 by simp
    49 
    50 lemma realpow_two: "(r::real)^ (Suc (Suc 0)) = r * r"
    51 by simp
    52 
    53 lemma realpow_gt_zero [rule_format]: "(0::real) < r --> 0 < r ^ n"
    54 apply (induct_tac "n")
    55 apply (auto intro: real_mult_order simp add: real_zero_less_one)
    56 done
    57 
    58 lemma realpow_ge_zero [rule_format]: "(0::real) \<le> r --> 0 \<le> r ^ n"
    59 apply (induct_tac "n")
    60 apply (auto simp add: real_0_le_mult_iff)
    61 done
    62 
    63 lemma realpow_le [rule_format]: "(0::real) \<le> x & x \<le> y --> x ^ n \<le> y ^ n"
    64 apply (induct_tac "n")
    65 apply (auto intro!: real_mult_le_mono)
    66 apply (simp (no_asm_simp) add: realpow_ge_zero)
    67 done
    68 
    69 lemma realpow_0_left [rule_format, simp]:
    70      "0 < n --> 0 ^ n = (0::real)"
    71 apply (induct_tac "n", auto) 
    72 done
    73 
    74 lemma realpow_less' [rule_format]:
    75      "[|(0::real) \<le> x; x < y |] ==> 0 < n --> x ^ n < y ^ n"
    76 apply (induct n) 
    77 apply (auto simp add: real_mult_less_mono' realpow_ge_zero) 
    78 done
    79 
    80 text{*Legacy: weaker version of the theorem above*}
    81 lemma realpow_less:
    82      "[|(0::real) < x; x < y; 0 < n|] ==> x ^ n < y ^ n"
    83 apply (rule realpow_less', auto) 
    84 done
    85 
    86 lemma realpow_eq_one [simp]: "1 ^ n = (1::real)"
    87 by (induct_tac "n", auto)
    88 
    89 lemma abs_realpow_minus_one [simp]: "abs((-1) ^ n) = (1::real)"
    90 apply (induct_tac "n")
    91 apply (auto simp add: abs_mult)
    92 done
    93 
    94 lemma realpow_mult: "((r::real) * s) ^ n = (r ^ n) * (s ^ n)"
    95 apply (induct_tac "n")
    96 apply (auto simp add: real_mult_ac)
    97 done
    98 
    99 lemma realpow_two_le [simp]: "(0::real) \<le> r^ Suc (Suc 0)"
   100 by (simp add: real_le_square)
   101 
   102 lemma abs_realpow_two [simp]: "abs((x::real)^Suc (Suc 0)) = x^Suc (Suc 0)"
   103 by (simp add: abs_eqI1 real_le_square)
   104 
   105 lemma realpow_two_abs [simp]: "abs(x::real)^Suc (Suc 0) = x^Suc (Suc 0)"
   106 by (simp add: realpow_abs [symmetric] abs_eqI1 del: realpow_Suc)
   107 
   108 lemma realpow_two_gt_one: "(1::real) < r ==> 1 < r^ (Suc (Suc 0))"
   109 apply auto
   110 apply (cut_tac real_zero_less_one)
   111 apply (frule_tac x = 0 in order_less_trans, assumption)
   112 apply (drule_tac  z = r and x = 1 in real_mult_less_mono1)
   113 apply (auto intro: order_less_trans)
   114 done
   115 
   116 lemma realpow_ge_one [rule_format]: "(1::real) < r --> 1 \<le> r ^ n"
   117 apply (induct_tac "n", auto)
   118 apply (subgoal_tac "1*1 \<le> r * r^n")
   119 apply (rule_tac [2] real_mult_le_mono, auto)
   120 done
   121 
   122 lemma realpow_ge_one2: "(1::real) \<le> r ==> 1 \<le> r ^ n"
   123 apply (drule order_le_imp_less_or_eq)
   124 apply (auto dest: realpow_ge_one)
   125 done
   126 
   127 lemma two_realpow_ge_one [simp]: "(1::real) \<le> 2 ^ n"
   128 apply (rule_tac y = "1 ^ n" in order_trans)
   129 apply (rule_tac [2] realpow_le)
   130 apply (auto intro: order_less_imp_le)
   131 done
   132 
   133 lemma two_realpow_gt [simp]: "real (n::nat) < 2 ^ n"
   134 apply (induct_tac "n")
   135 apply (auto simp add: real_of_nat_Suc)
   136 apply (subst real_mult_2)
   137 apply (rule real_add_less_le_mono)
   138 apply (auto simp add: two_realpow_ge_one)
   139 done
   140 
   141 lemma realpow_minus_one [simp]: "(-1) ^ (2*n) = (1::real)"
   142 by (induct_tac "n", auto)
   143 
   144 lemma realpow_minus_one_odd [simp]: "(-1) ^ Suc (2*n) = -(1::real)"
   145 by auto
   146 
   147 lemma realpow_minus_one_even [simp]: "(-1) ^ Suc (Suc (2*n)) = (1::real)"
   148 by auto
   149 
   150 lemma realpow_Suc_less [rule_format]:
   151      "(0::real) < r & r < (1::real) --> r ^ Suc n < r ^ n"
   152   by (induct_tac "n", auto)
   153 
   154 lemma realpow_Suc_le [rule_format]: "0 \<le> r & r < (1::real) --> r ^ Suc n \<le> r ^ n"
   155 apply (induct_tac "n")
   156 apply (auto intro: order_less_imp_le dest!: order_le_imp_less_or_eq)
   157 done
   158 
   159 lemma realpow_zero_le [simp]: "(0::real) \<le> 0 ^ n"
   160 by (case_tac "n", auto)
   161 
   162 lemma realpow_Suc_le2 [rule_format]: "0 < r & r < (1::real) --> r ^ Suc n \<le> r ^ n"
   163 by (blast intro!: order_less_imp_le realpow_Suc_less)
   164 
   165 lemma realpow_Suc_le3: "[| 0 \<le> r; r < (1::real) |] ==> r ^ Suc n \<le> r ^ n"
   166 apply (erule order_le_imp_less_or_eq [THEN disjE])
   167 apply (rule realpow_Suc_le2, auto)
   168 done
   169 
   170 lemma realpow_less_le [rule_format]: "0 \<le> r & r < (1::real) & n < N --> r ^ N \<le> r ^ n"
   171 apply (induct_tac "N")
   172 apply (simp_all (no_asm_simp))
   173 apply clarify
   174 apply (subgoal_tac "r * r ^ na \<le> 1 * r ^ n", simp)
   175 apply (rule real_mult_le_mono)
   176 apply (auto simp add: realpow_ge_zero less_Suc_eq)
   177 done
   178 
   179 lemma realpow_le_le: "[| 0 \<le> r; r < (1::real); n \<le> N |] ==> r ^ N \<le> r ^ n"
   180 apply (drule_tac n = N in le_imp_less_or_eq)
   181 apply (auto intro: realpow_less_le)
   182 done
   183 
   184 lemma realpow_Suc_le_self: "[| 0 < r; r < (1::real) |] ==> r ^ Suc n \<le> r"
   185 by (drule_tac n = 1 and N = "Suc n" in order_less_imp_le [THEN realpow_le_le], auto)
   186 
   187 lemma realpow_Suc_less_one: "[| 0 < r; r < (1::real) |] ==> r ^ Suc n < 1"
   188 by (blast intro: realpow_Suc_le_self order_le_less_trans)
   189 
   190 lemma realpow_le_Suc [rule_format]: "(1::real) \<le> r --> r ^ n \<le> r ^ Suc n"
   191 by (induct_tac "n", auto)
   192 
   193 lemma realpow_less_Suc [rule_format]: "(1::real) < r --> r ^ n < r ^ Suc n"
   194 by (induct_tac "n", auto)
   195 
   196 lemma realpow_le_Suc2 [rule_format]: "(1::real) < r --> r ^ n \<le> r ^ Suc n"
   197 by (blast intro!: order_less_imp_le realpow_less_Suc)
   198 
   199 (*One use in RealPow.thy*)
   200 lemma real_mult_self_le2: "[| (1::real) \<le> r; (1::real) \<le> x |]  ==> x \<le> r * x"
   201 apply (subgoal_tac "1 * x \<le> r * x", simp) 
   202 apply (rule mult_right_mono, auto) 
   203 done
   204 
   205 lemma realpow_gt_ge2 [rule_format]: "(1::real) \<le> r & n < N --> r ^ n \<le> r ^ N"
   206 apply (induct_tac "N", auto)
   207 apply (frule_tac [!] n = na in realpow_ge_one2)
   208 apply (drule_tac [!] real_mult_self_le2, assumption)
   209 prefer 2 apply assumption
   210 apply (auto intro: order_trans simp add: less_Suc_eq)
   211 done
   212 
   213 lemma realpow_ge_ge2: "[| (1::real) \<le> r; n \<le> N |] ==> r ^ n \<le> r ^ N"
   214 apply (drule_tac n = N in le_imp_less_or_eq)
   215 apply (auto intro: realpow_gt_ge2)
   216 done
   217 
   218 lemma realpow_Suc_ge_self2: "(1::real) \<le> r ==> r \<le> r ^ Suc n"
   219 by (drule_tac n = 1 and N = "Suc n" in realpow_ge_ge2, auto)
   220 
   221 (*Used ONCE in Hyperreal/NthRoot.ML*)
   222 lemma realpow_ge_self2: "[| (1::real) \<le> r; 0 < n |] ==> r \<le> r ^ n"
   223 apply (drule less_not_refl2 [THEN not0_implies_Suc])
   224 apply (auto intro!: realpow_Suc_ge_self2)
   225 done
   226 
   227 lemma realpow_minus_mult [rule_format, simp]:
   228      "0 < n --> (x::real) ^ (n - 1) * x = x ^ n"
   229 apply (induct_tac "n")
   230 apply (auto simp add: real_mult_commute)
   231 done
   232 
   233 lemma realpow_two_mult_inverse [simp]: "r \<noteq> 0 ==> r * inverse r ^Suc (Suc 0) = inverse (r::real)"
   234 by (simp add: realpow_two real_mult_assoc [symmetric])
   235 
   236 (* 05/00 *)
   237 lemma realpow_two_minus [simp]: "(-x)^Suc (Suc 0) = (x::real)^Suc (Suc 0)"
   238 by simp
   239 
   240 lemma realpow_two_diff: "(x::real)^Suc (Suc 0) - y^Suc (Suc 0) = (x - y) * (x + y)"
   241 apply (unfold real_diff_def)
   242 apply (simp add: real_add_mult_distrib2 real_add_mult_distrib real_mult_ac)
   243 done
   244 
   245 lemma realpow_two_disj: "((x::real)^Suc (Suc 0) = y^Suc (Suc 0)) = (x = y | x = -y)"
   246 apply (cut_tac x = x and y = y in realpow_two_diff)
   247 apply (auto simp del: realpow_Suc)
   248 done
   249 
   250 (* used in Transc *)
   251 lemma realpow_diff: "[|(x::real) \<noteq> 0; m \<le> n |] ==> x ^ (n - m) = x ^ n * inverse (x ^ m)"
   252 by (auto simp add: le_eq_less_or_eq less_iff_Suc_add realpow_add realpow_not_zero real_mult_ac)
   253 
   254 lemma realpow_real_of_nat: "real (m::nat) ^ n = real (m ^ n)"
   255 apply (induct_tac "n")
   256 apply (auto simp add: real_of_nat_one real_of_nat_mult)
   257 done
   258 
   259 lemma realpow_real_of_nat_two_pos [simp] : "0 < real (Suc (Suc 0) ^ n)"
   260 apply (induct_tac "n")
   261 apply (auto simp add: real_of_nat_mult real_0_less_mult_iff)
   262 done
   263 
   264 lemma realpow_increasing:
   265   assumes xnonneg: "(0::real) \<le> x"
   266       and ynonneg: "0 \<le> y"
   267       and le: "x ^ Suc n \<le> y ^ Suc n"
   268   shows "x \<le> y"
   269  proof (rule ccontr)
   270    assume "~ x \<le> y"
   271    then have "y<x" by simp
   272    then have "y ^ Suc n < x ^ Suc n"
   273      by (simp only: prems realpow_less') 
   274    from le and this show "False"
   275      by simp
   276  qed
   277   
   278 lemma realpow_Suc_cancel_eq: "[| (0::real) \<le> x; 0 \<le> y; x ^ Suc n = y ^ Suc n |] ==> x = y"
   279 by (blast intro: realpow_increasing order_antisym order_eq_refl sym)
   280 
   281 
   282 (*** Logical equivalences for inequalities ***)
   283 
   284 lemma realpow_eq_0_iff [simp]: "(x^n = 0) = (x = (0::real) & 0<n)"
   285 by (induct_tac "n", auto)
   286 
   287 lemma zero_less_realpow_abs_iff [simp]: "(0 < (abs x)^n) = (x \<noteq> (0::real) | n=0)"
   288 apply (induct_tac "n")
   289 apply (auto simp add: real_0_less_mult_iff)
   290 done
   291 
   292 lemma zero_le_realpow_abs [simp]: "(0::real) \<le> (abs x)^n"
   293 apply (induct_tac "n")
   294 apply (auto simp add: real_0_le_mult_iff)
   295 done
   296 
   297 
   298 (*** Literal arithmetic involving powers, type real ***)
   299 
   300 lemma real_of_int_power: "real (x::int) ^ n = real (x ^ n)"
   301 apply (induct_tac "n")
   302 apply (simp_all (no_asm_simp) add: nat_mult_distrib)
   303 done
   304 declare real_of_int_power [symmetric, simp]
   305 
   306 lemma power_real_number_of: "(number_of v :: real) ^ n = real ((number_of v :: int) ^ n)"
   307 by (simp only: real_number_of_def real_of_int_power)
   308 
   309 declare power_real_number_of [of _ "number_of w", standard, simp]
   310 
   311 
   312 lemma real_power_two: "(r::real)\<twosuperior> = r * r"
   313   by (simp add: numeral_2_eq_2)
   314 
   315 lemma real_sqr_ge_zero [iff]: "0 \<le> (r::real)\<twosuperior>"
   316   by (simp add: real_power_two)
   317 
   318 lemma real_sqr_gt_zero: "(r::real) \<noteq> 0 ==> 0 < r\<twosuperior>"
   319 proof -
   320   assume "r \<noteq> 0"
   321   hence "0 \<noteq> r\<twosuperior>" by simp
   322   also have "0 \<le> r\<twosuperior>" by (simp add: real_sqr_ge_zero)
   323   finally show ?thesis .
   324 qed
   325 
   326 lemma real_sqr_not_zero: "r \<noteq> 0 ==> (r::real)\<twosuperior> \<noteq> 0"
   327   by simp
   328 
   329 
   330 subsection{*Various Other Theorems*}
   331 
   332 text{*Used several times in Hyperreal/Transcendental.ML*}
   333 lemma real_sum_squares_cancel_a: "x * x = -(y * y) ==> x = (0::real) & y=0"
   334   by (auto intro: real_sum_squares_cancel)
   335 
   336 lemma real_squared_diff_one_factored: "x*x - (1::real) = (x + 1)*(x - 1)"
   337 apply (auto simp add: real_add_mult_distrib real_add_mult_distrib2 real_diff_def)
   338 done
   339 
   340 lemma real_mult_is_one: "(x*x = (1::real)) = (x = 1 | x = - 1)"
   341 apply auto
   342 apply (drule right_minus_eq [THEN iffD2]) 
   343 apply (auto simp add: real_squared_diff_one_factored)
   344 done
   345 declare real_mult_is_one [iff]
   346 
   347 lemma real_le_add_half_cancel: "(x + y/2 <= (y::real)) = (x <= y /2)"
   348 apply auto
   349 done
   350 declare real_le_add_half_cancel [simp]
   351 
   352 lemma real_minus_half_eq: "(x::real) - x/2 = x/2"
   353 apply auto
   354 done
   355 declare real_minus_half_eq [simp]
   356 
   357 lemma real_mult_inverse_cancel:
   358      "[|(0::real) < x; 0 < x1; x1 * y < x * u |] 
   359       ==> inverse x * y < inverse x1 * u"
   360 apply (rule_tac c=x in mult_less_imp_less_left) 
   361 apply (auto simp add: real_mult_assoc [symmetric])
   362 apply (simp (no_asm) add: real_mult_ac)
   363 apply (rule_tac c=x1 in mult_less_imp_less_right) 
   364 apply (auto simp add: real_mult_ac)
   365 done
   366 
   367 text{*Used once: in Hyperreal/Transcendental.ML*}
   368 lemma real_mult_inverse_cancel2: "[|(0::real) < x;0 < x1; x1 * y < x * u |] ==> y * inverse x < u * inverse x1"
   369 apply (auto dest: real_mult_inverse_cancel simp add: real_mult_ac)
   370 done
   371 
   372 lemma inverse_real_of_nat_gt_zero: "0 < inverse (real (Suc n))"
   373 apply auto
   374 done
   375 declare inverse_real_of_nat_gt_zero [simp]
   376 
   377 lemma inverse_real_of_nat_ge_zero: "0 <= inverse (real (Suc n))"
   378 apply auto
   379 done
   380 declare inverse_real_of_nat_ge_zero [simp]
   381 
   382 lemma real_sum_squares_not_zero: "x ~= 0 ==> x * x + y * y ~= (0::real)"
   383 apply (blast dest!: real_sum_squares_cancel) 
   384 done
   385 
   386 lemma real_sum_squares_not_zero2: "y ~= 0 ==> x * x + y * y ~= (0::real)"
   387 apply (blast dest!: real_sum_squares_cancel2) 
   388 done
   389 
   390 (* nice theorem *)
   391 lemma abs_mult_abs: "abs x * abs x = x * (x::real)"
   392 apply (insert linorder_less_linear [of x 0]) 
   393 apply (auto simp add: abs_eqI2 abs_minus_eqI2)
   394 done
   395 declare abs_mult_abs [simp]
   396 
   397 
   398 subsection {*Various Other Theorems*}
   399 
   400 lemma realpow_divide: 
   401     "(x/y) ^ n = ((x::real) ^ n/ y ^ n)"
   402 apply (unfold real_divide_def)
   403 apply (auto simp add: realpow_mult realpow_inverse)
   404 done
   405 
   406 lemma realpow_ge_zero2 [rule_format (no_asm)]: "(0::real) <= r --> 0 <= r ^ n"
   407 apply (induct_tac "n")
   408 apply (auto simp add: real_0_le_mult_iff)
   409 done
   410 
   411 lemma realpow_le2 [rule_format (no_asm)]: "(0::real) <= x & x <= y --> x ^ n <= y ^ n"
   412 apply (induct_tac "n")
   413 apply (auto intro!: real_mult_le_mono simp add: realpow_ge_zero2)
   414 done
   415 
   416 lemma realpow_Suc_gt_one: "(1::real) < r ==> 1 < r ^ (Suc n)"
   417 apply (frule_tac n = "n" in realpow_ge_one)
   418 apply (drule real_le_imp_less_or_eq, safe)
   419 apply (frule real_zero_less_one [THEN real_less_trans])
   420 apply (drule_tac y = "r ^ n" in real_mult_less_mono2)
   421 apply assumption
   422 apply (auto dest: real_less_trans)
   423 done
   424 
   425 lemma realpow_two_sum_zero_iff: "(x ^ 2 + y ^ 2 = (0::real)) = (x = 0 & y = 0)"
   426 apply (auto intro: real_sum_squares_cancel real_sum_squares_cancel2 simp add: numeral_2_eq_2)
   427 done
   428 declare realpow_two_sum_zero_iff [simp]
   429 
   430 lemma realpow_two_le_add_order: "(0::real) <= u ^ 2 + v ^ 2"
   431 apply (rule real_le_add_order)
   432 apply (auto simp add: numeral_2_eq_2)
   433 done
   434 declare realpow_two_le_add_order [simp]
   435 
   436 lemma realpow_two_le_add_order2: "(0::real) <= u ^ 2 + v ^ 2 + w ^ 2"
   437 apply (rule real_le_add_order)+
   438 apply (auto simp add: numeral_2_eq_2)
   439 done
   440 declare realpow_two_le_add_order2 [simp]
   441 
   442 lemma real_mult_self_sum_ge_zero: "(0::real) <= x*x + y*y"
   443 apply (cut_tac u = "x" and v = "y" in realpow_two_le_add_order)
   444 apply (auto simp add: numeral_2_eq_2)
   445 done
   446 declare real_mult_self_sum_ge_zero [simp]
   447 declare real_mult_self_sum_ge_zero [THEN abs_eqI1, simp]
   448 
   449 lemma real_sum_square_gt_zero: "x ~= 0 ==> (0::real) < x * x + y * y"
   450 apply (cut_tac x = "x" and y = "y" in real_mult_self_sum_ge_zero)
   451 apply (drule real_le_imp_less_or_eq)
   452 apply (drule_tac y = "y" in real_sum_squares_not_zero)
   453 apply auto
   454 done
   455 
   456 lemma real_sum_square_gt_zero2: "y ~= 0 ==> (0::real) < x * x + y * y"
   457 apply (rule real_add_commute [THEN subst])
   458 apply (erule real_sum_square_gt_zero)
   459 done
   460 
   461 lemma real_minus_mult_self_le: "-(u * u) <= (x * (x::real))"
   462 apply (rule_tac j = "0" in real_le_trans)
   463 apply auto
   464 done
   465 declare real_minus_mult_self_le [simp]
   466 
   467 lemma realpow_square_minus_le: "-(u ^ 2) <= (x::real) ^ 2"
   468 apply (auto simp add: numeral_2_eq_2)
   469 done
   470 declare realpow_square_minus_le [simp]
   471 
   472 lemma realpow_num_eq_if: "(m::real) ^ n = (if n=0 then 1 else m * m ^ (n - 1))"
   473 apply (case_tac "n")
   474 apply auto
   475 done
   476 
   477 lemma real_num_zero_less_two_pow: "0 < (2::real) ^ (4*d)"
   478 apply (induct_tac "d")
   479 apply (auto simp add: realpow_num_eq_if)
   480 done
   481 declare real_num_zero_less_two_pow [simp]
   482 
   483 lemma lemma_realpow_num_two_mono: "x * (4::real)   < y ==> x * (2 ^ 8) < y * (2 ^ 6)"
   484 apply (subgoal_tac " (2::real) ^ 8 = 4 * (2 ^ 6) ")
   485 apply (simp (no_asm_simp) add: real_mult_assoc [symmetric])
   486 apply (auto simp add: realpow_num_eq_if)
   487 done
   488 
   489 lemma lemma_realpow_4: "2 ^ 2 = (4::real)"
   490 apply (simp (no_asm) add: realpow_num_eq_if)
   491 done
   492 declare lemma_realpow_4 [simp]
   493 
   494 lemma lemma_realpow_16: "2 ^ 4 = (16::real)"
   495 apply (simp (no_asm) add: realpow_num_eq_if)
   496 done
   497 declare lemma_realpow_16 [simp]
   498 
   499 lemma zero_le_x_squared: "(0::real) <= x^2"
   500 apply (simp add: numeral_2_eq_2)
   501 done
   502 declare zero_le_x_squared [simp]
   503 
   504 
   505 
   506 ML
   507 {*
   508 val realpow_0 = thm "realpow_0";
   509 val realpow_Suc = thm "realpow_Suc";
   510 
   511 val realpow_zero = thm "realpow_zero";
   512 val realpow_not_zero = thm "realpow_not_zero";
   513 val realpow_zero_zero = thm "realpow_zero_zero";
   514 val realpow_inverse = thm "realpow_inverse";
   515 val realpow_abs = thm "realpow_abs";
   516 val realpow_add = thm "realpow_add";
   517 val realpow_one = thm "realpow_one";
   518 val realpow_two = thm "realpow_two";
   519 val realpow_gt_zero = thm "realpow_gt_zero";
   520 val realpow_ge_zero = thm "realpow_ge_zero";
   521 val realpow_le = thm "realpow_le";
   522 val realpow_0_left = thm "realpow_0_left";
   523 val realpow_less = thm "realpow_less";
   524 val realpow_eq_one = thm "realpow_eq_one";
   525 val abs_realpow_minus_one = thm "abs_realpow_minus_one";
   526 val realpow_mult = thm "realpow_mult";
   527 val realpow_two_le = thm "realpow_two_le";
   528 val abs_realpow_two = thm "abs_realpow_two";
   529 val realpow_two_abs = thm "realpow_two_abs";
   530 val realpow_two_gt_one = thm "realpow_two_gt_one";
   531 val realpow_ge_one = thm "realpow_ge_one";
   532 val realpow_ge_one2 = thm "realpow_ge_one2";
   533 val two_realpow_ge_one = thm "two_realpow_ge_one";
   534 val two_realpow_gt = thm "two_realpow_gt";
   535 val realpow_minus_one = thm "realpow_minus_one";
   536 val realpow_minus_one_odd = thm "realpow_minus_one_odd";
   537 val realpow_minus_one_even = thm "realpow_minus_one_even";
   538 val realpow_Suc_less = thm "realpow_Suc_less";
   539 val realpow_Suc_le = thm "realpow_Suc_le";
   540 val realpow_zero_le = thm "realpow_zero_le";
   541 val realpow_Suc_le2 = thm "realpow_Suc_le2";
   542 val realpow_Suc_le3 = thm "realpow_Suc_le3";
   543 val realpow_less_le = thm "realpow_less_le";
   544 val realpow_le_le = thm "realpow_le_le";
   545 val realpow_Suc_le_self = thm "realpow_Suc_le_self";
   546 val realpow_Suc_less_one = thm "realpow_Suc_less_one";
   547 val realpow_le_Suc = thm "realpow_le_Suc";
   548 val realpow_less_Suc = thm "realpow_less_Suc";
   549 val realpow_le_Suc2 = thm "realpow_le_Suc2";
   550 val realpow_gt_ge2 = thm "realpow_gt_ge2";
   551 val realpow_ge_ge2 = thm "realpow_ge_ge2";
   552 val realpow_Suc_ge_self2 = thm "realpow_Suc_ge_self2";
   553 val realpow_ge_self2 = thm "realpow_ge_self2";
   554 val realpow_minus_mult = thm "realpow_minus_mult";
   555 val realpow_two_mult_inverse = thm "realpow_two_mult_inverse";
   556 val realpow_two_minus = thm "realpow_two_minus";
   557 val realpow_two_disj = thm "realpow_two_disj";
   558 val realpow_diff = thm "realpow_diff";
   559 val realpow_real_of_nat = thm "realpow_real_of_nat";
   560 val realpow_real_of_nat_two_pos = thm "realpow_real_of_nat_two_pos";
   561 val realpow_increasing = thm "realpow_increasing";
   562 val realpow_Suc_cancel_eq = thm "realpow_Suc_cancel_eq";
   563 val realpow_eq_0_iff = thm "realpow_eq_0_iff";
   564 val zero_less_realpow_abs_iff = thm "zero_less_realpow_abs_iff";
   565 val zero_le_realpow_abs = thm "zero_le_realpow_abs";
   566 val real_of_int_power = thm "real_of_int_power";
   567 val power_real_number_of = thm "power_real_number_of";
   568 val real_power_two = thm "real_power_two";
   569 val real_sqr_ge_zero = thm "real_sqr_ge_zero";
   570 val real_sqr_gt_zero = thm "real_sqr_gt_zero";
   571 val real_sqr_not_zero = thm "real_sqr_not_zero";
   572 val real_sum_squares_cancel_a = thm "real_sum_squares_cancel_a";
   573 val real_mult_inverse_cancel2 = thm "real_mult_inverse_cancel2";
   574 val real_squared_diff_one_factored = thm "real_squared_diff_one_factored";
   575 val real_mult_is_one = thm "real_mult_is_one";
   576 val real_le_add_half_cancel = thm "real_le_add_half_cancel";
   577 val real_minus_half_eq = thm "real_minus_half_eq";
   578 val real_mult_inverse_cancel = thm "real_mult_inverse_cancel";
   579 val real_mult_inverse_cancel2 = thm "real_mult_inverse_cancel2";
   580 val inverse_real_of_nat_gt_zero = thm "inverse_real_of_nat_gt_zero";
   581 val inverse_real_of_nat_ge_zero = thm "inverse_real_of_nat_ge_zero";
   582 val real_sum_squares_not_zero = thm "real_sum_squares_not_zero";
   583 val real_sum_squares_not_zero2 = thm "real_sum_squares_not_zero2";
   584 val abs_mult_abs = thm "abs_mult_abs";
   585 
   586 val realpow_divide = thm "realpow_divide";
   587 val realpow_ge_zero2 = thm "realpow_ge_zero2";
   588 val realpow_le2 = thm "realpow_le2";
   589 val realpow_Suc_gt_one = thm "realpow_Suc_gt_one";
   590 val realpow_two_sum_zero_iff = thm "realpow_two_sum_zero_iff";
   591 val realpow_two_le_add_order = thm "realpow_two_le_add_order";
   592 val realpow_two_le_add_order2 = thm "realpow_two_le_add_order2";
   593 val real_mult_self_sum_ge_zero = thm "real_mult_self_sum_ge_zero";
   594 val real_sum_square_gt_zero = thm "real_sum_square_gt_zero";
   595 val real_sum_square_gt_zero2 = thm "real_sum_square_gt_zero2";
   596 val real_minus_mult_self_le = thm "real_minus_mult_self_le";
   597 val realpow_square_minus_le = thm "realpow_square_minus_le";
   598 val realpow_num_eq_if = thm "realpow_num_eq_if";
   599 val real_num_zero_less_two_pow = thm "real_num_zero_less_two_pow";
   600 val lemma_realpow_num_two_mono = thm "lemma_realpow_num_two_mono";
   601 val lemma_realpow_4 = thm "lemma_realpow_4";
   602 val lemma_realpow_16 = thm "lemma_realpow_16";
   603 val zero_le_x_squared = thm "zero_le_x_squared";
   604 *}
   605 
   606 
   607 end