author | paulson |
Fri, 16 Nov 2001 18:24:11 +0100 | |
changeset 12224 | 02df7cbe7d25 |
parent 12018 | ec054019c910 |
child 12330 | c69bee072501 |
permissions | -rw-r--r-- |
10751 | 1 |
(* Title : HyperPow.ML |
2 |
Author : Jacques D. Fleuriot |
|
3 |
Copyright : 1998 University of Cambridge |
|
4 |
Description : Natural Powers of hyperreals theory |
|
5 |
||
10778
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
6 |
Exponentials on the hyperreals |
10751 | 7 |
*) |
8 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
9 |
Goal "(0::hypreal) ^ (Suc n) = 0"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
10 |
by Auto_tac; |
10751 | 11 |
qed "hrealpow_zero"; |
12 |
Addsimps [hrealpow_zero]; |
|
13 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
14 |
Goal "r ~= (0::hypreal) --> r ^ n ~= 0"; |
10751 | 15 |
by (induct_tac "n" 1); |
16 |
by Auto_tac; |
|
17 |
qed_spec_mp "hrealpow_not_zero"; |
|
18 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
19 |
Goal "r ~= (0::hypreal) --> inverse(r ^ n) = (inverse r) ^ n"; |
10751 | 20 |
by (induct_tac "n" 1); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
21 |
by Auto_tac; |
10751 | 22 |
by (forw_inst_tac [("n","n")] hrealpow_not_zero 1); |
23 |
by (auto_tac (claset(), simpset() addsimps [hypreal_inverse_distrib])); |
|
24 |
qed_spec_mp "hrealpow_inverse"; |
|
25 |
||
26 |
Goal "abs (r::hypreal) ^ n = abs (r ^ n)"; |
|
27 |
by (induct_tac "n" 1); |
|
28 |
by (auto_tac (claset(), simpset() addsimps [hrabs_mult])); |
|
29 |
qed "hrealpow_hrabs"; |
|
30 |
||
31 |
Goal "(r::hypreal) ^ (n + m) = (r ^ n) * (r ^ m)"; |
|
32 |
by (induct_tac "n" 1); |
|
33 |
by (auto_tac (claset(), simpset() addsimps hypreal_mult_ac)); |
|
34 |
qed "hrealpow_add"; |
|
35 |
||
11701
3d51fbf81c17
sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents:
11468
diff
changeset
|
36 |
Goal "(r::hypreal) ^ Suc 0 = r"; |
10751 | 37 |
by (Simp_tac 1); |
38 |
qed "hrealpow_one"; |
|
39 |
Addsimps [hrealpow_one]; |
|
40 |
||
11701
3d51fbf81c17
sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents:
11468
diff
changeset
|
41 |
Goal "(r::hypreal) ^ Suc (Suc 0) = r * r"; |
10751 | 42 |
by (Simp_tac 1); |
43 |
qed "hrealpow_two"; |
|
44 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
45 |
Goal "(0::hypreal) <= r --> 0 <= r ^ n"; |
10751 | 46 |
by (induct_tac "n" 1); |
47 |
by (auto_tac (claset(), simpset() addsimps [hypreal_0_le_mult_iff])); |
|
48 |
qed_spec_mp "hrealpow_ge_zero"; |
|
49 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
50 |
Goal "(0::hypreal) < r --> 0 < r ^ n"; |
10751 | 51 |
by (induct_tac "n" 1); |
52 |
by (auto_tac (claset(), simpset() addsimps [hypreal_0_less_mult_iff])); |
|
53 |
qed_spec_mp "hrealpow_gt_zero"; |
|
54 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
55 |
Goal "x <= y & (0::hypreal) < x --> x ^ n <= y ^ n"; |
10751 | 56 |
by (induct_tac "n" 1); |
57 |
by (auto_tac (claset() addSIs [hypreal_mult_le_mono], simpset())); |
|
58 |
by (asm_simp_tac (simpset() addsimps [hrealpow_ge_zero]) 1); |
|
59 |
qed_spec_mp "hrealpow_le"; |
|
60 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
61 |
Goal "x < y & (0::hypreal) < x & 0 < n --> x ^ n < y ^ n"; |
10751 | 62 |
by (induct_tac "n" 1); |
63 |
by (auto_tac (claset() addIs [hypreal_mult_less_mono,gr0I], |
|
64 |
simpset() addsimps [hrealpow_gt_zero])); |
|
65 |
qed "hrealpow_less"; |
|
66 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
67 |
Goal "1 ^ n = (1::hypreal)"; |
10751 | 68 |
by (induct_tac "n" 1); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
69 |
by Auto_tac; |
10751 | 70 |
qed "hrealpow_eq_one"; |
71 |
Addsimps [hrealpow_eq_one]; |
|
72 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
73 |
Goal "abs(-(1 ^ n)) = (1::hypreal)"; |
10751 | 74 |
by Auto_tac; |
75 |
qed "hrabs_minus_hrealpow_one"; |
|
76 |
Addsimps [hrabs_minus_hrealpow_one]; |
|
77 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
78 |
Goal "abs(-1 ^ n) = (1::hypreal)"; |
10751 | 79 |
by (induct_tac "n" 1); |
80 |
by Auto_tac; |
|
81 |
qed "hrabs_hrealpow_minus_one"; |
|
82 |
Addsimps [hrabs_hrealpow_minus_one]; |
|
83 |
||
84 |
Goal "((r::hypreal) * s) ^ n = (r ^ n) * (s ^ n)"; |
|
85 |
by (induct_tac "n" 1); |
|
86 |
by (auto_tac (claset(), simpset() addsimps hypreal_mult_ac)); |
|
87 |
qed "hrealpow_mult"; |
|
88 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
89 |
Goal "(0::hypreal) <= r ^ Suc (Suc 0)"; |
10751 | 90 |
by (auto_tac (claset(), simpset() addsimps [hypreal_0_le_mult_iff])); |
91 |
qed "hrealpow_two_le"; |
|
92 |
Addsimps [hrealpow_two_le]; |
|
93 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
94 |
Goal "(0::hypreal) <= u ^ Suc (Suc 0) + v ^ Suc (Suc 0)"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
95 |
by (simp_tac (HOL_ss addsimps [hrealpow_two_le, hypreal_le_add_order]) 1); |
10751 | 96 |
qed "hrealpow_two_le_add_order"; |
97 |
Addsimps [hrealpow_two_le_add_order]; |
|
98 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
99 |
Goal "(0::hypreal) <= u ^ Suc (Suc 0) + v ^ Suc (Suc 0) + w ^ Suc (Suc 0)"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
100 |
by (simp_tac (HOL_ss addsimps [hrealpow_two_le, hypreal_le_add_order]) 1); |
10751 | 101 |
qed "hrealpow_two_le_add_order2"; |
102 |
Addsimps [hrealpow_two_le_add_order2]; |
|
103 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
104 |
Goal "[| 0 <= x; 0 <= y |] ==> (x+y = 0) = (x = 0 & y = (0::hypreal))"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
105 |
by (auto_tac (claset() addIs [order_antisym], simpset())); |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
106 |
qed "hypreal_add_nonneg_eq_0_iff"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
107 |
|
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
108 |
Goal "(x*y = 0) = (x = 0 | y = (0::hypreal))"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
109 |
by Auto_tac; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
110 |
qed "hypreal_mult_is_0"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
111 |
|
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
112 |
Goal "(x*x + y*y + z*z = 0) = (x = 0 & y = 0 & z = (0::hypreal))"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
113 |
by (simp_tac (HOL_ss addsimps [hypreal_le_square, hypreal_le_add_order, |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
114 |
hypreal_add_nonneg_eq_0_iff, hypreal_mult_is_0]) 1); |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
115 |
qed "hypreal_three_squares_add_zero_iff"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
116 |
|
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
117 |
Goal "(x ^ Suc (Suc 0) + y ^ Suc (Suc 0) + z ^ Suc (Suc 0) = (0::hypreal)) = (x = 0 & y = 0 & z = 0)"; |
10751 | 118 |
by (simp_tac (HOL_ss addsimps |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
119 |
[hypreal_three_squares_add_zero_iff, hrealpow_two]) 1); |
10751 | 120 |
qed "hrealpow_three_squares_add_zero_iff"; |
121 |
Addsimps [hrealpow_three_squares_add_zero_iff]; |
|
122 |
||
11701
3d51fbf81c17
sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents:
11468
diff
changeset
|
123 |
Goal "abs(x ^ Suc (Suc 0)) = (x::hypreal) ^ Suc (Suc 0)"; |
10751 | 124 |
by (auto_tac (claset(), |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
125 |
simpset() addsimps [hrabs_def, hypreal_0_le_mult_iff])); |
10751 | 126 |
qed "hrabs_hrealpow_two"; |
127 |
Addsimps [hrabs_hrealpow_two]; |
|
128 |
||
11701
3d51fbf81c17
sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents:
11468
diff
changeset
|
129 |
Goal "abs(x) ^ Suc (Suc 0) = (x::hypreal) ^ Suc (Suc 0)"; |
10751 | 130 |
by (simp_tac (simpset() addsimps [hrealpow_hrabs, hrabs_eqI1] |
131 |
delsimps [hpowr_Suc]) 1); |
|
132 |
qed "hrealpow_two_hrabs"; |
|
133 |
Addsimps [hrealpow_two_hrabs]; |
|
134 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
135 |
Goal "(1::hypreal) < r ==> 1 < r ^ Suc (Suc 0)"; |
10751 | 136 |
by (auto_tac (claset(), simpset() addsimps [hrealpow_two])); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
137 |
by (res_inst_tac [("y","1*1")] order_le_less_trans 1); |
10751 | 138 |
by (rtac hypreal_mult_less_mono 2); |
139 |
by Auto_tac; |
|
140 |
qed "hrealpow_two_gt_one"; |
|
141 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
142 |
Goal "(1::hypreal) <= r ==> 1 <= r ^ Suc (Suc 0)"; |
10751 | 143 |
by (etac (order_le_imp_less_or_eq RS disjE) 1); |
144 |
by (etac (hrealpow_two_gt_one RS order_less_imp_le) 1); |
|
145 |
by Auto_tac; |
|
146 |
qed "hrealpow_two_ge_one"; |
|
147 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
148 |
Goal "(1::hypreal) <= 2 ^ n"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
149 |
by (res_inst_tac [("y","1 ^ n")] order_trans 1); |
10751 | 150 |
by (rtac hrealpow_le 2); |
10778
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
151 |
by Auto_tac; |
10751 | 152 |
qed "two_hrealpow_ge_one"; |
153 |
||
11704
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
wenzelm
parents:
11701
diff
changeset
|
154 |
Goal "hypreal_of_nat n < 2 ^ n"; |
10751 | 155 |
by (induct_tac "n" 1); |
156 |
by (auto_tac (claset(), |
|
10778
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
157 |
simpset() addsimps [hypreal_of_nat_Suc, hypreal_add_mult_distrib])); |
10751 | 158 |
by (cut_inst_tac [("n","n")] two_hrealpow_ge_one 1); |
159 |
by (arith_tac 1); |
|
160 |
qed "two_hrealpow_gt"; |
|
161 |
Addsimps [two_hrealpow_gt,two_hrealpow_ge_one]; |
|
162 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
163 |
Goal "-1 ^ (2*n) = (1::hypreal)"; |
10751 | 164 |
by (induct_tac "n" 1); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
165 |
by Auto_tac; |
10751 | 166 |
qed "hrealpow_minus_one"; |
167 |
||
11704
3c50a2cd6f00
* sane numerals (stage 2): plain "num" syntax (removed "#");
wenzelm
parents:
11701
diff
changeset
|
168 |
Goal "n+n = (2*n::nat)"; |
11377
0f16ad464c62
Simprocs for type "nat" no longer introduce numerals unless they are already
paulson
parents:
10919
diff
changeset
|
169 |
by Auto_tac; |
0f16ad464c62
Simprocs for type "nat" no longer introduce numerals unless they are already
paulson
parents:
10919
diff
changeset
|
170 |
qed "double_lemma"; |
0f16ad464c62
Simprocs for type "nat" no longer introduce numerals unless they are already
paulson
parents:
10919
diff
changeset
|
171 |
|
0f16ad464c62
Simprocs for type "nat" no longer introduce numerals unless they are already
paulson
parents:
10919
diff
changeset
|
172 |
(*ugh: need to get rid fo the n+n*) |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
173 |
Goal "-1 ^ (n + n) = (1::hypreal)"; |
11377
0f16ad464c62
Simprocs for type "nat" no longer introduce numerals unless they are already
paulson
parents:
10919
diff
changeset
|
174 |
by (auto_tac (claset(), |
0f16ad464c62
Simprocs for type "nat" no longer introduce numerals unless they are already
paulson
parents:
10919
diff
changeset
|
175 |
simpset() addsimps [double_lemma, hrealpow_minus_one])); |
10751 | 176 |
qed "hrealpow_minus_one2"; |
177 |
Addsimps [hrealpow_minus_one2]; |
|
178 |
||
11701
3d51fbf81c17
sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents:
11468
diff
changeset
|
179 |
Goal "(-(x::hypreal)) ^ Suc (Suc 0) = x ^ Suc (Suc 0)"; |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
180 |
by Auto_tac; |
10751 | 181 |
qed "hrealpow_minus_two"; |
182 |
Addsimps [hrealpow_minus_two]; |
|
183 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
184 |
Goal "(0::hypreal) < r & r < 1 --> r ^ Suc n < r ^ n"; |
10751 | 185 |
by (induct_tac "n" 1); |
186 |
by (auto_tac (claset(), |
|
187 |
simpset() addsimps [hypreal_mult_less_mono2])); |
|
188 |
qed_spec_mp "hrealpow_Suc_less"; |
|
189 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
190 |
Goal "(0::hypreal) <= r & r < 1 --> r ^ Suc n <= r ^ n"; |
10751 | 191 |
by (induct_tac "n" 1); |
192 |
by (auto_tac (claset() addIs [order_less_imp_le] |
|
193 |
addSDs [order_le_imp_less_or_eq,hrealpow_Suc_less], |
|
194 |
simpset() addsimps [hypreal_mult_less_mono2])); |
|
195 |
qed_spec_mp "hrealpow_Suc_le"; |
|
196 |
||
10834 | 197 |
Goal "Abs_hypreal(hyprel``{%n. X n}) ^ m = Abs_hypreal(hyprel``{%n. (X n) ^ m})"; |
10751 | 198 |
by (induct_tac "m" 1); |
199 |
by (auto_tac (claset(), |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
200 |
simpset() addsimps [hypreal_one_def, hypreal_mult])); |
10751 | 201 |
qed "hrealpow"; |
202 |
||
11701
3d51fbf81c17
sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents:
11468
diff
changeset
|
203 |
Goal "(x + (y::hypreal)) ^ Suc (Suc 0) = \ |
3d51fbf81c17
sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents:
11468
diff
changeset
|
204 |
\ x ^ Suc (Suc 0) + y ^ Suc (Suc 0) + (hypreal_of_nat (Suc (Suc 0)))*x*y"; |
10778
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
205 |
by (simp_tac (simpset() addsimps |
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
206 |
[hypreal_add_mult_distrib2, hypreal_add_mult_distrib, |
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
207 |
hypreal_of_nat_zero, hypreal_of_nat_Suc]) 1); |
10751 | 208 |
qed "hrealpow_sum_square_expand"; |
209 |
||
210 |
(*--------------------------------------------------------------- |
|
211 |
we'll prove the following theorem by going down to the |
|
212 |
level of the ultrafilter and relying on the analogous |
|
213 |
property for the real rather than prove it directly |
|
214 |
using induction: proof is much simpler this way! |
|
215 |
---------------------------------------------------------------*) |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
216 |
Goal "[|(0::hypreal) <= x; 0 <= y;x ^ Suc n <= y ^ Suc n |] ==> x <= y"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
217 |
by (full_simp_tac (simpset() addsimps [hypreal_zero_def]) 1); |
10751 | 218 |
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
219 |
by (res_inst_tac [("z","y")] eq_Abs_hypreal 1); |
|
220 |
by (auto_tac (claset(), |
|
221 |
simpset() addsimps [hrealpow,hypreal_le,hypreal_mult])); |
|
222 |
by (ultra_tac (claset() addIs [realpow_increasing], simpset()) 1); |
|
223 |
qed "hrealpow_increasing"; |
|
224 |
||
225 |
(*By antisymmetry with the above we conclude x=y, replacing the deleted |
|
226 |
theorem hrealpow_Suc_cancel_eq*) |
|
227 |
||
228 |
Goal "x : HFinite --> x ^ n : HFinite"; |
|
229 |
by (induct_tac "n" 1); |
|
230 |
by (auto_tac (claset() addIs [HFinite_mult], simpset())); |
|
231 |
qed_spec_mp "hrealpow_HFinite"; |
|
232 |
||
233 |
(*--------------------------------------------------------------- |
|
234 |
Hypernaturals Powers |
|
235 |
--------------------------------------------------------------*) |
|
236 |
Goalw [congruent_def] |
|
237 |
"congruent hyprel \ |
|
10834 | 238 |
\ (%X Y. hyprel``{%n. ((X::nat=>real) n ^ (Y::nat=>nat) n)})"; |
10751 | 239 |
by (safe_tac (claset() addSIs [ext])); |
240 |
by (ALLGOALS(Fuf_tac)); |
|
241 |
qed "hyperpow_congruent"; |
|
242 |
||
243 |
Goalw [hyperpow_def] |
|
10834 | 244 |
"Abs_hypreal(hyprel``{%n. X n}) pow Abs_hypnat(hypnatrel``{%n. Y n}) = \ |
245 |
\ Abs_hypreal(hyprel``{%n. X n ^ Y n})"; |
|
10751 | 246 |
by (res_inst_tac [("f","Abs_hypreal")] arg_cong 1); |
247 |
by (auto_tac (claset() addSIs [lemma_hyprel_refl,bexI], |
|
248 |
simpset() addsimps [hyprel_in_hypreal RS |
|
249 |
Abs_hypreal_inverse,equiv_hyprel,hyperpow_congruent])); |
|
250 |
by (Fuf_tac 1); |
|
251 |
qed "hyperpow"; |
|
252 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
253 |
Goalw [hypnat_one_def] "(0::hypreal) pow (n + (1::hypnat)) = 0"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
254 |
by (simp_tac (simpset() addsimps [hypreal_zero_def]) 1); |
10751 | 255 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
256 |
by (auto_tac (claset(), simpset() addsimps [hyperpow,hypnat_add])); |
|
257 |
qed "hyperpow_zero"; |
|
258 |
Addsimps [hyperpow_zero]; |
|
259 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
260 |
Goal "r ~= (0::hypreal) --> r pow n ~= 0"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
261 |
by (simp_tac (simpset() addsimps [hypreal_zero_def]) 1); |
10751 | 262 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
263 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
264 |
by (auto_tac (claset(), simpset() addsimps [hyperpow])); |
|
265 |
by (dtac FreeUltrafilterNat_Compl_mem 1); |
|
266 |
by (fuf_empty_tac (claset() addIs [realpow_not_zero RS notE], |
|
267 |
simpset()) 1); |
|
268 |
qed_spec_mp "hyperpow_not_zero"; |
|
269 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
270 |
Goal "r ~= (0::hypreal) --> inverse(r pow n) = (inverse r) pow n"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
271 |
by (simp_tac (simpset() addsimps [hypreal_zero_def]) 1); |
10751 | 272 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
273 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
274 |
by (auto_tac (claset() addSDs [FreeUltrafilterNat_Compl_mem], |
|
275 |
simpset() addsimps [hypreal_inverse,hyperpow])); |
|
276 |
by (rtac FreeUltrafilterNat_subset 1); |
|
277 |
by (auto_tac (claset() addDs [realpow_not_zero] |
|
278 |
addIs [realpow_inverse], |
|
279 |
simpset())); |
|
280 |
qed "hyperpow_inverse"; |
|
281 |
||
282 |
Goal "abs r pow n = abs (r pow n)"; |
|
283 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
|
284 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
285 |
by (auto_tac (claset(), |
|
286 |
simpset() addsimps [hypreal_hrabs, hyperpow,realpow_abs])); |
|
287 |
qed "hyperpow_hrabs"; |
|
288 |
||
289 |
Goal "r pow (n + m) = (r pow n) * (r pow m)"; |
|
290 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
|
291 |
by (res_inst_tac [("z","m")] eq_Abs_hypnat 1); |
|
292 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
293 |
by (auto_tac (claset(), |
|
294 |
simpset() addsimps [hyperpow,hypnat_add, hypreal_mult,realpow_add])); |
|
295 |
qed "hyperpow_add"; |
|
296 |
||
11713
883d559b0b8c
sane numerals (stage 3): provide generic "1" on all number types;
wenzelm
parents:
11704
diff
changeset
|
297 |
Goalw [hypnat_one_def] "r pow (1::hypnat) = r"; |
10751 | 298 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
299 |
by (auto_tac (claset(), simpset() addsimps [hyperpow])); |
|
300 |
qed "hyperpow_one"; |
|
301 |
Addsimps [hyperpow_one]; |
|
302 |
||
303 |
Goalw [hypnat_one_def] |
|
11713
883d559b0b8c
sane numerals (stage 3): provide generic "1" on all number types;
wenzelm
parents:
11704
diff
changeset
|
304 |
"r pow ((1::hypnat) + (1::hypnat)) = r * r"; |
10751 | 305 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
306 |
by (auto_tac (claset(), |
|
10784 | 307 |
simpset() addsimps [hyperpow,hypnat_add, hypreal_mult])); |
10751 | 308 |
qed "hyperpow_two"; |
309 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
310 |
Goal "(0::hypreal) < r --> 0 < r pow n"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
311 |
by (simp_tac (simpset() addsimps [hypreal_zero_def]) 1); |
10751 | 312 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
313 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
314 |
by (auto_tac (claset() addSEs [FreeUltrafilterNat_subset, realpow_gt_zero], |
|
315 |
simpset() addsimps [hyperpow,hypreal_less, hypreal_le])); |
|
316 |
qed_spec_mp "hyperpow_gt_zero"; |
|
317 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
318 |
Goal "(0::hypreal) <= r --> 0 <= r pow n"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
319 |
by (simp_tac (simpset() addsimps [hypreal_zero_def]) 1); |
10751 | 320 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
321 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
10784 | 322 |
by (auto_tac (claset() addSEs [FreeUltrafilterNat_subset, realpow_ge_zero], |
10751 | 323 |
simpset() addsimps [hyperpow,hypreal_le])); |
10784 | 324 |
qed "hyperpow_ge_zero"; |
10751 | 325 |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
326 |
Goal "(0::hypreal) < x & x <= y --> x pow n <= y pow n"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
327 |
by (full_simp_tac (simpset() addsimps [hypreal_zero_def]) 1); |
10751 | 328 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
329 |
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
|
330 |
by (res_inst_tac [("z","y")] eq_Abs_hypreal 1); |
|
10784 | 331 |
by (auto_tac (claset(), |
332 |
simpset() addsimps [hyperpow,hypreal_le,hypreal_less])); |
|
333 |
by (etac (FreeUltrafilterNat_Int RS FreeUltrafilterNat_subset) 1 |
|
334 |
THEN assume_tac 1); |
|
335 |
by (auto_tac (claset() addIs [realpow_le], simpset())); |
|
10751 | 336 |
qed_spec_mp "hyperpow_le"; |
337 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
338 |
Goal "1 pow n = (1::hypreal)"; |
10751 | 339 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
340 |
by (auto_tac (claset(), simpset() addsimps [hypreal_one_def, hyperpow])); |
10751 | 341 |
qed "hyperpow_eq_one"; |
342 |
Addsimps [hyperpow_eq_one]; |
|
343 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
344 |
Goal "abs(-(1 pow n)) = (1::hypreal)"; |
10751 | 345 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
346 |
by (auto_tac (claset(), |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
347 |
simpset() addsimps [hyperpow, hypreal_hrabs, hypreal_one_def])); |
10751 | 348 |
qed "hrabs_minus_hyperpow_one"; |
349 |
Addsimps [hrabs_minus_hyperpow_one]; |
|
350 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
351 |
Goal "abs(-1 pow n) = (1::hypreal)"; |
11713
883d559b0b8c
sane numerals (stage 3): provide generic "1" on all number types;
wenzelm
parents:
11704
diff
changeset
|
352 |
by (subgoal_tac "abs((- (1::hypreal)) pow n) = (1::hypreal)" 1); |
10751 | 353 |
by (Asm_full_simp_tac 1); |
354 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
|
355 |
by (auto_tac (claset(), |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
356 |
simpset() addsimps [hypreal_one_def, hyperpow,hypreal_minus, |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
357 |
hypreal_hrabs])); |
10751 | 358 |
qed "hrabs_hyperpow_minus_one"; |
359 |
Addsimps [hrabs_hyperpow_minus_one]; |
|
360 |
||
361 |
Goal "(r * s) pow n = (r pow n) * (s pow n)"; |
|
362 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
|
363 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
364 |
by (res_inst_tac [("z","s")] eq_Abs_hypreal 1); |
|
365 |
by (auto_tac (claset(), |
|
366 |
simpset() addsimps [hyperpow, hypreal_mult,realpow_mult])); |
|
367 |
qed "hyperpow_mult"; |
|
368 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
369 |
Goal "(0::hypreal) <= r pow ((1::hypnat) + (1::hypnat))"; |
10751 | 370 |
by (auto_tac (claset(), |
371 |
simpset() addsimps [hyperpow_two, hypreal_0_le_mult_iff])); |
|
372 |
qed "hyperpow_two_le"; |
|
373 |
Addsimps [hyperpow_two_le]; |
|
374 |
||
11713
883d559b0b8c
sane numerals (stage 3): provide generic "1" on all number types;
wenzelm
parents:
11704
diff
changeset
|
375 |
Goal "abs(x pow ((1::hypnat) + (1::hypnat))) = x pow ((1::hypnat) + (1::hypnat))"; |
10751 | 376 |
by (simp_tac (simpset() addsimps [hrabs_eqI1]) 1); |
377 |
qed "hrabs_hyperpow_two"; |
|
378 |
Addsimps [hrabs_hyperpow_two]; |
|
379 |
||
11713
883d559b0b8c
sane numerals (stage 3): provide generic "1" on all number types;
wenzelm
parents:
11704
diff
changeset
|
380 |
Goal "abs(x) pow ((1::hypnat) + (1::hypnat)) = x pow ((1::hypnat) + (1::hypnat))"; |
10751 | 381 |
by (simp_tac (simpset() addsimps [hyperpow_hrabs,hrabs_eqI1]) 1); |
382 |
qed "hyperpow_two_hrabs"; |
|
383 |
Addsimps [hyperpow_two_hrabs]; |
|
384 |
||
385 |
(*? very similar to hrealpow_two_gt_one *) |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
386 |
Goal "(1::hypreal) < r ==> 1 < r pow ((1::hypnat) + (1::hypnat))"; |
10751 | 387 |
by (auto_tac (claset(), simpset() addsimps [hyperpow_two])); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
388 |
by (res_inst_tac [("y","1*1")] order_le_less_trans 1); |
10751 | 389 |
by (rtac hypreal_mult_less_mono 2); |
390 |
by Auto_tac; |
|
391 |
qed "hyperpow_two_gt_one"; |
|
392 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
393 |
Goal "(1::hypreal) <= r ==> 1 <= r pow ((1::hypnat) + (1::hypnat))"; |
10751 | 394 |
by (auto_tac (claset() addSDs [order_le_imp_less_or_eq] |
395 |
addIs [hyperpow_two_gt_one,order_less_imp_le], |
|
396 |
simpset())); |
|
397 |
qed "hyperpow_two_ge_one"; |
|
398 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
399 |
Goal "(1::hypreal) <= 2 pow n"; |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
400 |
by (res_inst_tac [("y","1 pow n")] order_trans 1); |
10751 | 401 |
by (rtac hyperpow_le 2); |
10778
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
402 |
by Auto_tac; |
10751 | 403 |
qed "two_hyperpow_ge_one"; |
404 |
Addsimps [two_hyperpow_ge_one]; |
|
405 |
||
406 |
Addsimps [simplify (simpset()) realpow_minus_one]; |
|
407 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
408 |
Goal "-1 pow (((1::hypnat) + (1::hypnat))*n) = (1::hypreal)"; |
11713
883d559b0b8c
sane numerals (stage 3): provide generic "1" on all number types;
wenzelm
parents:
11704
diff
changeset
|
409 |
by (subgoal_tac "(-((1::hypreal))) pow (((1::hypnat) + (1::hypnat))*n) = (1::hypreal)" 1); |
10751 | 410 |
by (Asm_full_simp_tac 1); |
411 |
by (simp_tac (HOL_ss addsimps [hypreal_one_def]) 1); |
|
412 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
|
413 |
by (auto_tac (claset(), |
|
11377
0f16ad464c62
Simprocs for type "nat" no longer introduce numerals unless they are already
paulson
parents:
10919
diff
changeset
|
414 |
simpset() addsimps [double_lemma, hyperpow, hypnat_add, |
0f16ad464c62
Simprocs for type "nat" no longer introduce numerals unless they are already
paulson
parents:
10919
diff
changeset
|
415 |
hypreal_minus])); |
10751 | 416 |
qed "hyperpow_minus_one2"; |
417 |
Addsimps [hyperpow_minus_one2]; |
|
418 |
||
419 |
Goalw [hypnat_one_def] |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
420 |
"(0::hypreal) < r & r < 1 --> r pow (n + (1::hypnat)) < r pow n"; |
10751 | 421 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
422 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
423 |
by (auto_tac (claset() addSDs [conjI RS realpow_Suc_less] |
|
424 |
addEs [FreeUltrafilterNat_Int RS FreeUltrafilterNat_subset], |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
425 |
simpset() addsimps [hypreal_zero_def, hypreal_one_def, |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
426 |
hyperpow, hypreal_less, hypnat_add])); |
10751 | 427 |
qed_spec_mp "hyperpow_Suc_less"; |
428 |
||
429 |
Goalw [hypnat_one_def] |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
430 |
"0 <= r & r < (1::hypreal) --> r pow (n + (1::hypnat)) <= r pow n"; |
10751 | 431 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
432 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
433 |
by (auto_tac (claset() addSDs [conjI RS realpow_Suc_le] |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
434 |
addEs [FreeUltrafilterNat_Int RS FreeUltrafilterNat_subset], |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
435 |
simpset() addsimps [hypreal_zero_def, hypreal_one_def, hyperpow, |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
436 |
hypreal_le,hypnat_add, hypreal_less])); |
10751 | 437 |
qed_spec_mp "hyperpow_Suc_le"; |
438 |
||
439 |
Goalw [hypnat_one_def] |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
440 |
"(0::hypreal) <= r & r < 1 & n < N --> r pow N <= r pow n"; |
10751 | 441 |
by (res_inst_tac [("z","n")] eq_Abs_hypnat 1); |
442 |
by (res_inst_tac [("z","N")] eq_Abs_hypnat 1); |
|
443 |
by (res_inst_tac [("z","r")] eq_Abs_hypreal 1); |
|
444 |
by (auto_tac (claset(), |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
445 |
simpset() addsimps [hyperpow, hypreal_le,hypreal_less, |
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
446 |
hypnat_less, hypreal_zero_def, hypreal_one_def])); |
10751 | 447 |
by (etac (FreeUltrafilterNat_Int RS FreeUltrafilterNat_subset) 1); |
448 |
by (etac FreeUltrafilterNat_Int 1); |
|
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
449 |
by (auto_tac (claset() addSDs [conjI RS realpow_less_le], simpset())); |
10751 | 450 |
qed_spec_mp "hyperpow_less_le"; |
451 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
452 |
Goal "[| (0::hypreal) <= r; r < 1 |] \ |
10751 | 453 |
\ ==> ALL N n. n < N --> r pow N <= r pow n"; |
454 |
by (blast_tac (claset() addSIs [hyperpow_less_le]) 1); |
|
455 |
qed "hyperpow_less_le2"; |
|
456 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
457 |
Goal "[| 0 <= r; r < (1::hypreal); N : HNatInfinite |] \ |
10919
144ede948e58
renamings: real_of_nat, real_of_int -> (overloaded) real
paulson
parents:
10834
diff
changeset
|
458 |
\ ==> ALL n: Nats. r pow N <= r pow n"; |
10751 | 459 |
by (auto_tac (claset() addSIs [hyperpow_less_le], |
460 |
simpset() addsimps [HNatInfinite_iff])); |
|
461 |
qed "hyperpow_SHNat_le"; |
|
462 |
||
463 |
Goalw [hypreal_of_real_def,hypnat_of_nat_def] |
|
464 |
"(hypreal_of_real r) pow (hypnat_of_nat n) = hypreal_of_real (r ^ n)"; |
|
465 |
by (auto_tac (claset(), simpset() addsimps [hyperpow])); |
|
466 |
qed "hyperpow_realpow"; |
|
467 |
||
468 |
Goalw [SReal_def] |
|
10919
144ede948e58
renamings: real_of_nat, real_of_int -> (overloaded) real
paulson
parents:
10834
diff
changeset
|
469 |
"(hypreal_of_real r) pow (hypnat_of_nat n) : Reals"; |
10751 | 470 |
by (auto_tac (claset(), simpset() addsimps [hyperpow_realpow])); |
471 |
qed "hyperpow_SReal"; |
|
472 |
Addsimps [hyperpow_SReal]; |
|
473 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
474 |
Goal "N : HNatInfinite ==> (0::hypreal) pow N = 0"; |
10751 | 475 |
by (dtac HNatInfinite_is_Suc 1); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
476 |
by Auto_tac; |
10751 | 477 |
qed "hyperpow_zero_HNatInfinite"; |
478 |
Addsimps [hyperpow_zero_HNatInfinite]; |
|
479 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
480 |
Goal "[| (0::hypreal) <= r; r < 1; n <= N |] ==> r pow N <= r pow n"; |
10751 | 481 |
by (dres_inst_tac [("y","N")] hypnat_le_imp_less_or_eq 1); |
482 |
by (auto_tac (claset() addIs [hyperpow_less_le], simpset())); |
|
483 |
qed "hyperpow_le_le"; |
|
484 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
485 |
Goal "[| (0::hypreal) < r; r < 1 |] ==> r pow (n + (1::hypnat)) <= r"; |
11713
883d559b0b8c
sane numerals (stage 3): provide generic "1" on all number types;
wenzelm
parents:
11704
diff
changeset
|
486 |
by (dres_inst_tac [("n","(1::hypnat)")] (order_less_imp_le RS hyperpow_le_le) 1); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
487 |
by Auto_tac; |
10751 | 488 |
qed "hyperpow_Suc_le_self"; |
489 |
||
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
490 |
Goal "[| (0::hypreal) <= r; r < 1 |] ==> r pow (n + (1::hypnat)) <= r"; |
11713
883d559b0b8c
sane numerals (stage 3): provide generic "1" on all number types;
wenzelm
parents:
11704
diff
changeset
|
491 |
by (dres_inst_tac [("n","(1::hypnat)")] hyperpow_le_le 1); |
12018
ec054019c910
Numerals and simprocs for types real and hypreal. The abstract
paulson
parents:
11713
diff
changeset
|
492 |
by Auto_tac; |
10751 | 493 |
qed "hyperpow_Suc_le_self2"; |
494 |
||
495 |
Goalw [Infinitesimal_def] |
|
10778
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
496 |
"[| x : Infinitesimal; 0 < N |] ==> abs (x pow N) <= abs x"; |
10751 | 497 |
by (auto_tac (claset() addSIs [hyperpow_Suc_le_self2], |
10778
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
498 |
simpset() addsimps [hyperpow_hrabs RS sym, |
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
499 |
hypnat_gt_zero_iff2, hrabs_ge_zero])); |
10751 | 500 |
qed "lemma_Infinitesimal_hyperpow"; |
501 |
||
502 |
Goal "[| x : Infinitesimal; 0 < N |] ==> x pow N : Infinitesimal"; |
|
503 |
by (rtac hrabs_le_Infinitesimal 1); |
|
10778
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
504 |
by (rtac lemma_Infinitesimal_hyperpow 2); |
2c6605049646
more tidying, especially to remove real_of_posnat
paulson
parents:
10751
diff
changeset
|
505 |
by Auto_tac; |
10751 | 506 |
qed "Infinitesimal_hyperpow"; |
507 |
||
508 |
Goalw [hypnat_of_nat_def] |
|
509 |
"(x ^ n : Infinitesimal) = (x pow (hypnat_of_nat n) : Infinitesimal)"; |
|
510 |
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
|
511 |
by (auto_tac (claset(), simpset() addsimps [hrealpow, hyperpow])); |
|
512 |
qed "hrealpow_hyperpow_Infinitesimal_iff"; |
|
513 |
||
514 |
Goal "[| x : Infinitesimal; 0 < n |] ==> x ^ n : Infinitesimal"; |
|
515 |
by (auto_tac (claset() addSIs [Infinitesimal_hyperpow], |
|
516 |
simpset() addsimps [hrealpow_hyperpow_Infinitesimal_iff, |
|
517 |
hypnat_of_nat_less_iff,hypnat_of_nat_zero] |
|
518 |
delsimps [hypnat_of_nat_less_iff RS sym])); |
|
519 |
qed "Infinitesimal_hrealpow"; |