author | paulson |
Tue, 12 Jan 2010 16:55:59 +0000 | |
changeset 34883 | 77f0d11dec76 |
parent 31021 | 53642251a04f |
child 35123 | e286d5df187a |
permissions | -rw-r--r-- |
28952
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
haftmann
parents:
28906
diff
changeset
|
1 |
(* Title : HOL/RealPow.thy |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff
changeset
|
2 |
Author : Jacques D. Fleuriot |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff
changeset
|
3 |
Copyright : 1998 University of Cambridge |
20634 | 4 |
*) |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff
changeset
|
5 |
|
20634 | 6 |
header {* Natural powers theory *} |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff
changeset
|
7 |
|
15131 | 8 |
theory RealPow |
15140 | 9 |
imports RealDef |
28952
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
haftmann
parents:
28906
diff
changeset
|
10 |
uses ("Tools/float_syntax.ML") |
15131 | 11 |
begin |
9435
c3a13a7d4424
lemmas [arith_split] = abs_split (*belongs to theory RealAbs*);
wenzelm
parents:
9013
diff
changeset
|
12 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
13 |
declare abs_mult_self [simp] |
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
14 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
15 |
lemma two_realpow_ge_one [simp]: "(1::real) \<le> 2 ^ n" |
25875 | 16 |
by simp |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
17 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
18 |
lemma two_realpow_gt [simp]: "real (n::nat) < 2 ^ n" |
15251 | 19 |
apply (induct "n") |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
20 |
apply (auto simp add: real_of_nat_Suc) |
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14352
diff
changeset
|
21 |
apply (subst mult_2) |
22962 | 22 |
apply (rule add_less_le_mono) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
23 |
apply (auto simp add: two_realpow_ge_one) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
24 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
25 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
26 |
lemma realpow_Suc_le_self: "[| 0 \<le> r; r \<le> (1::real) |] ==> r ^ Suc n \<le> r" |
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
27 |
by (insert power_decreasing [of 1 "Suc n" r], simp) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
28 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
29 |
lemma realpow_minus_mult [rule_format]: |
30082
43c5b7bfc791
make more proofs work whether or not One_nat_def is a simp rule
huffman
parents:
29667
diff
changeset
|
30 |
"0 < n --> (x::real) ^ (n - 1) * x = x ^ n" |
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
31 |
apply (simp split add: nat_diff_split) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
32 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
33 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
34 |
lemma realpow_two_mult_inverse [simp]: |
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
35 |
"r \<noteq> 0 ==> r * inverse r ^Suc (Suc 0) = inverse (r::real)" |
23292 | 36 |
by (simp add: real_mult_assoc [symmetric]) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
37 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
38 |
lemma realpow_two_minus [simp]: "(-x)^Suc (Suc 0) = (x::real)^Suc (Suc 0)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
39 |
by simp |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
40 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
41 |
lemma realpow_two_diff: |
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
42 |
"(x::real)^Suc (Suc 0) - y^Suc (Suc 0) = (x - y) * (x + y)" |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
43 |
apply (unfold real_diff_def) |
29667 | 44 |
apply (simp add: algebra_simps) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
45 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
46 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
47 |
lemma realpow_two_disj: |
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
48 |
"((x::real)^Suc (Suc 0) = y^Suc (Suc 0)) = (x = y | x = -y)" |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
49 |
apply (cut_tac x = x and y = y in realpow_two_diff) |
30273
ecd6f0ca62ea
declare power_Suc [simp]; remove redundant type-specific versions of power_Suc
huffman
parents:
30082
diff
changeset
|
50 |
apply auto |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
51 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
52 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
53 |
lemma realpow_real_of_nat: "real (m::nat) ^ n = real (m ^ n)" |
15251 | 54 |
apply (induct "n") |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
55 |
apply (auto simp add: real_of_nat_one real_of_nat_mult) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
56 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
57 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
58 |
lemma realpow_real_of_nat_two_pos [simp] : "0 < real (Suc (Suc 0) ^ n)" |
15251 | 59 |
apply (induct "n") |
14334 | 60 |
apply (auto simp add: real_of_nat_mult zero_less_mult_iff) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
61 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
62 |
|
22962 | 63 |
(* used by AFP Integration theory *) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
64 |
lemma realpow_increasing: |
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
65 |
"[|(0::real) \<le> x; 0 \<le> y; x ^ Suc n \<le> y ^ Suc n|] ==> x \<le> y" |
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
66 |
by (rule power_le_imp_le_base) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
67 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
68 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
69 |
subsection{*Literal Arithmetic Involving Powers, Type @{typ real}*} |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
70 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
71 |
lemma real_of_int_power: "real (x::int) ^ n = real (x ^ n)" |
15251 | 72 |
apply (induct "n") |
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14352
diff
changeset
|
73 |
apply (simp_all add: nat_mult_distrib) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
74 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
75 |
declare real_of_int_power [symmetric, simp] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
76 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
77 |
lemma power_real_number_of: |
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
78 |
"(number_of v :: real) ^ n = real ((number_of v :: int) ^ n)" |
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14352
diff
changeset
|
79 |
by (simp only: real_number_of [symmetric] real_of_int_power) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
80 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
81 |
declare power_real_number_of [of _ "number_of w", standard, simp] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
82 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
12018
diff
changeset
|
83 |
|
22970 | 84 |
subsection{* Squares of Reals *} |
85 |
||
86 |
lemma real_two_squares_add_zero_iff [simp]: |
|
87 |
"(x * x + y * y = 0) = ((x::real) = 0 \<and> y = 0)" |
|
88 |
by (rule sum_squares_eq_zero_iff) |
|
89 |
||
90 |
lemma real_sum_squares_cancel: "x * x + y * y = 0 ==> x = (0::real)" |
|
91 |
by simp |
|
92 |
||
93 |
lemma real_sum_squares_cancel2: "x * x + y * y = 0 ==> y = (0::real)" |
|
94 |
by simp |
|
95 |
||
96 |
lemma real_mult_self_sum_ge_zero: "(0::real) \<le> x*x + y*y" |
|
97 |
by (rule sum_squares_ge_zero) |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
98 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
99 |
lemma real_sum_squares_cancel_a: "x * x = -(y * y) ==> x = (0::real) & y=0" |
22970 | 100 |
by (simp add: real_add_eq_0_iff [symmetric]) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
101 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
102 |
lemma real_squared_diff_one_factored: "x*x - (1::real) = (x + 1)*(x - 1)" |
22970 | 103 |
by (simp add: left_distrib right_diff_distrib) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
104 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
105 |
lemma real_mult_is_one [simp]: "(x*x = (1::real)) = (x = 1 | x = - 1)" |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
106 |
apply auto |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
107 |
apply (drule right_minus_eq [THEN iffD2]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
108 |
apply (auto simp add: real_squared_diff_one_factored) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
109 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
110 |
|
22970 | 111 |
lemma real_sum_squares_not_zero: "x ~= 0 ==> x * x + y * y ~= (0::real)" |
112 |
by simp |
|
113 |
||
114 |
lemma real_sum_squares_not_zero2: "y ~= 0 ==> x * x + y * y ~= (0::real)" |
|
115 |
by simp |
|
116 |
||
117 |
lemma realpow_two_sum_zero_iff [simp]: |
|
118 |
"(x ^ 2 + y ^ 2 = (0::real)) = (x = 0 & y = 0)" |
|
119 |
by (rule sum_power2_eq_zero_iff) |
|
120 |
||
121 |
lemma realpow_two_le_add_order [simp]: "(0::real) \<le> u ^ 2 + v ^ 2" |
|
122 |
by (rule sum_power2_ge_zero) |
|
123 |
||
124 |
lemma realpow_two_le_add_order2 [simp]: "(0::real) \<le> u ^ 2 + v ^ 2 + w ^ 2" |
|
125 |
by (intro add_nonneg_nonneg zero_le_power2) |
|
126 |
||
127 |
lemma real_sum_square_gt_zero: "x ~= 0 ==> (0::real) < x * x + y * y" |
|
128 |
by (simp add: sum_squares_gt_zero_iff) |
|
129 |
||
130 |
lemma real_sum_square_gt_zero2: "y ~= 0 ==> (0::real) < x * x + y * y" |
|
131 |
by (simp add: sum_squares_gt_zero_iff) |
|
132 |
||
133 |
lemma real_minus_mult_self_le [simp]: "-(u * u) \<le> (x * (x::real))" |
|
134 |
by (rule_tac j = 0 in real_le_trans, auto) |
|
135 |
||
136 |
lemma realpow_square_minus_le [simp]: "-(u ^ 2) \<le> (x::real) ^ 2" |
|
137 |
by (auto simp add: power2_eq_square) |
|
138 |
||
139 |
(* The following theorem is by Benjamin Porter *) |
|
140 |
lemma real_sq_order: |
|
141 |
fixes x::real |
|
142 |
assumes xgt0: "0 \<le> x" and ygt0: "0 \<le> y" and sq: "x^2 \<le> y^2" |
|
143 |
shows "x \<le> y" |
|
144 |
proof - |
|
145 |
from sq have "x ^ Suc (Suc 0) \<le> y ^ Suc (Suc 0)" |
|
146 |
by (simp only: numeral_2_eq_2) |
|
147 |
thus "x \<le> y" using ygt0 |
|
148 |
by (rule power_le_imp_le_base) |
|
149 |
qed |
|
150 |
||
151 |
||
152 |
subsection {*Various Other Theorems*} |
|
153 |
||
14304 | 154 |
lemma real_le_add_half_cancel: "(x + y/2 \<le> (y::real)) = (x \<le> y /2)" |
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
155 |
by auto |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
156 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
157 |
lemma real_minus_half_eq [simp]: "(x::real) - x/2 = x/2" |
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
158 |
by auto |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
159 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
160 |
lemma real_mult_inverse_cancel: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
161 |
"[|(0::real) < x; 0 < x1; x1 * y < x * u |] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
162 |
==> inverse x * y < inverse x1 * u" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
163 |
apply (rule_tac c=x in mult_less_imp_less_left) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
164 |
apply (auto simp add: real_mult_assoc [symmetric]) |
14334 | 165 |
apply (simp (no_asm) add: mult_ac) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
166 |
apply (rule_tac c=x1 in mult_less_imp_less_right) |
14334 | 167 |
apply (auto simp add: mult_ac) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
168 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
169 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
170 |
lemma real_mult_inverse_cancel2: |
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
171 |
"[|(0::real) < x;0 < x1; x1 * y < x * u |] ==> y * inverse x < u * inverse x1" |
14334 | 172 |
apply (auto dest: real_mult_inverse_cancel simp add: mult_ac) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
173 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
174 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
175 |
lemma inverse_real_of_nat_gt_zero [simp]: "0 < inverse (real (Suc n))" |
20517
86343f2386a8
simplify some proofs, remove obsolete realpow_divide
huffman
parents:
19765
diff
changeset
|
176 |
by simp |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
177 |
|
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
178 |
lemma inverse_real_of_nat_ge_zero [simp]: "0 \<le> inverse (real (Suc n))" |
20517
86343f2386a8
simplify some proofs, remove obsolete realpow_divide
huffman
parents:
19765
diff
changeset
|
179 |
by simp |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
180 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
181 |
lemma realpow_num_eq_if: "(m::real) ^ n = (if n=0 then 1 else m * m ^ (n - 1))" |
14348
744c868ee0b7
Defining the type class "ringpower" and deleting superseded theorems for
paulson
parents:
14334
diff
changeset
|
182 |
by (case_tac "n", auto) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14265
diff
changeset
|
183 |
|
28906 | 184 |
subsection{* Float syntax *} |
185 |
||
186 |
syntax "_Float" :: "float_const \<Rightarrow> 'a" ("_") |
|
187 |
||
28952
15a4b2cf8c34
made repository layout more coherent with logical distribution structure; stripped some $Id$s
haftmann
parents:
28906
diff
changeset
|
188 |
use "Tools/float_syntax.ML" |
28906 | 189 |
setup FloatSyntax.setup |
190 |
||
191 |
text{* Test: *} |
|
192 |
lemma "123.456 = -111.111 + 200 + 30 + 4 + 5/10 + 6/100 + (7/1000::real)" |
|
193 |
by simp |
|
194 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff
changeset
|
195 |
end |