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