author | paulson |
Mon, 22 Dec 2003 14:12:54 +0100 | |
changeset 14310 | 1dd7439477dd |
parent 14309 | f508492af9b4 |
child 14312 | 2f048db93d08 |
permissions | -rw-r--r-- |
10751 | 1 |
(* Title: Real/Hyperreal/HyperOrd.thy |
2 |
Author: Jacques D. Fleuriot |
|
3 |
Copyright: 2000 University of Edinburgh |
|
4 |
Description: Type "hypreal" is a linear order and also |
|
5 |
satisfies plus_ac0: + is an AC-operator with zero |
|
6 |
*) |
|
7 |
||
14297 | 8 |
theory HyperOrd = HyperDef: |
9 |
||
14305
f17ca9f6dc8c
tidying first part of HyperArith0.ML, using generic lemmas
paulson
parents:
14303
diff
changeset
|
10 |
instance hypreal :: division_by_zero |
f17ca9f6dc8c
tidying first part of HyperArith0.ML, using generic lemmas
paulson
parents:
14303
diff
changeset
|
11 |
proof |
f17ca9f6dc8c
tidying first part of HyperArith0.ML, using generic lemmas
paulson
parents:
14303
diff
changeset
|
12 |
fix x :: hypreal |
f17ca9f6dc8c
tidying first part of HyperArith0.ML, using generic lemmas
paulson
parents:
14303
diff
changeset
|
13 |
show "inverse 0 = (0::hypreal)" by (rule HYPREAL_INVERSE_ZERO) |
f17ca9f6dc8c
tidying first part of HyperArith0.ML, using generic lemmas
paulson
parents:
14303
diff
changeset
|
14 |
show "x/0 = 0" by (rule HYPREAL_DIVISION_BY_ZERO) |
f17ca9f6dc8c
tidying first part of HyperArith0.ML, using generic lemmas
paulson
parents:
14303
diff
changeset
|
15 |
qed |
f17ca9f6dc8c
tidying first part of HyperArith0.ML, using generic lemmas
paulson
parents:
14303
diff
changeset
|
16 |
|
f17ca9f6dc8c
tidying first part of HyperArith0.ML, using generic lemmas
paulson
parents:
14303
diff
changeset
|
17 |
|
14299 | 18 |
defs (overloaded) |
19 |
hrabs_def: "abs (r::hypreal) == (if 0 \<le> r then r else -r)" |
|
14297 | 20 |
|
21 |
||
14299 | 22 |
lemma hypreal_hrabs: |
23 |
"abs (Abs_hypreal (hyprel `` {X})) = |
|
24 |
Abs_hypreal(hyprel `` {%n. abs (X n)})" |
|
25 |
apply (auto simp add: hrabs_def hypreal_zero_def hypreal_le hypreal_minus) |
|
26 |
apply (ultra, arith)+ |
|
27 |
done |
|
14297 | 28 |
|
29 |
instance hypreal :: order |
|
30 |
by (intro_classes, |
|
31 |
(assumption | |
|
32 |
rule hypreal_le_refl hypreal_le_trans hypreal_le_anti_sym |
|
33 |
hypreal_less_le)+) |
|
34 |
||
35 |
instance hypreal :: linorder |
|
36 |
by (intro_classes, rule hypreal_le_linear) |
|
37 |
||
38 |
instance hypreal :: plus_ac0 |
|
39 |
by (intro_classes, |
|
40 |
(assumption | |
|
41 |
rule hypreal_add_commute hypreal_add_assoc hypreal_add_zero_left)+) |
|
42 |
||
14310 | 43 |
lemma hypreal_add_less_mono1: "(A::hypreal) < B ==> A + C < B + C" |
44 |
apply (rule_tac z = A in eq_Abs_hypreal) |
|
45 |
apply (rule_tac z = B in eq_Abs_hypreal) |
|
46 |
apply (rule_tac z = C in eq_Abs_hypreal) |
|
47 |
apply (auto intro!: exI simp add: hypreal_less_def hypreal_add, ultra) |
|
48 |
done |
|
49 |
||
50 |
lemma hypreal_mult_order: "[| 0 < x; 0 < y |] ==> (0::hypreal) < x * y" |
|
51 |
apply (unfold hypreal_zero_def) |
|
52 |
apply (rule_tac z = x in eq_Abs_hypreal) |
|
53 |
apply (rule_tac z = y in eq_Abs_hypreal) |
|
54 |
apply (auto intro!: exI simp add: hypreal_less_def hypreal_mult, ultra) |
|
55 |
apply (auto intro: real_mult_order) |
|
56 |
done |
|
57 |
||
58 |
lemma hypreal_add_left_le_mono1: "(q1::hypreal) \<le> q2 ==> x + q1 \<le> x + q2" |
|
59 |
apply (drule order_le_imp_less_or_eq) |
|
60 |
apply (auto intro: order_less_imp_le hypreal_add_less_mono1 simp add: hypreal_add_commute) |
|
61 |
done |
|
62 |
||
63 |
lemma hypreal_mult_less_mono1: "[| (0::hypreal) < z; x < y |] ==> x*z < y*z" |
|
64 |
apply (rotate_tac 1) |
|
65 |
apply (drule hypreal_less_minus_iff [THEN iffD1]) |
|
66 |
apply (rule hypreal_less_minus_iff [THEN iffD2]) |
|
67 |
apply (drule hypreal_mult_order, assumption) |
|
68 |
apply (simp add: hypreal_add_mult_distrib2 hypreal_mult_commute) |
|
69 |
done |
|
70 |
||
71 |
lemma hypreal_mult_less_mono2: "[| (0::hypreal)<z; x<y |] ==> z*x<z*y" |
|
72 |
apply (simp (no_asm_simp) add: hypreal_mult_commute hypreal_mult_less_mono1) |
|
73 |
done |
|
74 |
||
75 |
subsection{*The Hyperreals Form an Ordered Field*} |
|
76 |
||
77 |
instance hypreal :: inverse .. |
|
78 |
||
79 |
instance hypreal :: ordered_field |
|
80 |
proof |
|
81 |
fix x y z :: hypreal |
|
82 |
show "(x + y) + z = x + (y + z)" by (rule hypreal_add_assoc) |
|
83 |
show "x + y = y + x" by (rule hypreal_add_commute) |
|
84 |
show "0 + x = x" by simp |
|
85 |
show "- x + x = 0" by simp |
|
86 |
show "x - y = x + (-y)" by (simp add: hypreal_diff_def) |
|
87 |
show "(x * y) * z = x * (y * z)" by (rule hypreal_mult_assoc) |
|
88 |
show "x * y = y * x" by (rule hypreal_mult_commute) |
|
89 |
show "1 * x = x" by simp |
|
90 |
show "(x + y) * z = x * z + y * z" by (simp add: hypreal_add_mult_distrib) |
|
91 |
show "0 \<noteq> (1::hypreal)" by (rule hypreal_zero_not_eq_one) |
|
92 |
show "x \<le> y ==> z + x \<le> z + y" by (rule hypreal_add_left_le_mono1) |
|
93 |
show "x < y ==> 0 < z ==> z * x < z * y" by (simp add: hypreal_mult_less_mono2) |
|
94 |
show "\<bar>x\<bar> = (if x < 0 then -x else x)" |
|
95 |
by (auto dest: order_le_less_trans simp add: hrabs_def linorder_not_le) |
|
96 |
show "x \<noteq> 0 ==> inverse x * x = 1" by simp |
|
97 |
show "y \<noteq> 0 ==> x / y = x * inverse y" by (simp add: hypreal_divide_def) |
|
98 |
qed |
|
99 |
||
100 |
(*** Monotonicity results ***) |
|
101 |
||
102 |
lemma hypreal_add_right_cancel_less: "(v+z < w+z) = (v < (w::hypreal))" |
|
103 |
by (rule Ring_and_Field.add_less_cancel_right) |
|
104 |
||
105 |
lemma hypreal_add_left_cancel_less: "(z+v < z+w) = (v < (w::hypreal))" |
|
106 |
by (rule Ring_and_Field.add_less_cancel_left) |
|
107 |
||
108 |
lemma hypreal_add_right_cancel_le: "(v+z \<le> w+z) = (v \<le> (w::hypreal))" |
|
109 |
by (rule Ring_and_Field.add_le_cancel_right) |
|
110 |
||
111 |
lemma hypreal_add_left_cancel_le: "(z+v \<le> z+w) = (v \<le> (w::hypreal))" |
|
112 |
by (rule Ring_and_Field.add_le_cancel_left) |
|
113 |
||
114 |
lemma hypreal_add_less_mono: "[| (z1::hypreal) < y1; z2 < y2 |] ==> z1 + z2 < y1 + y2" |
|
115 |
by (rule Ring_and_Field.add_strict_mono) |
|
116 |
||
117 |
lemma hypreal_add_le_mono1: "(q1::hypreal) \<le> q2 ==> q1 + x \<le> q2 + x" |
|
118 |
by (rule Ring_and_Field.add_right_mono) |
|
119 |
||
120 |
lemma hypreal_add_le_mono: "[|(i::hypreal)\<le>j; k\<le>l |] ==> i + k \<le> j + l" |
|
121 |
by (rule Ring_and_Field.add_mono) |
|
122 |
||
123 |
lemma hypreal_add_less_le_mono: "[|(i::hypreal)<j; k\<le>l |] ==> i + k < j + l" |
|
124 |
by (auto dest!: order_le_imp_less_or_eq intro: hypreal_add_less_mono1 hypreal_add_less_mono) |
|
125 |
||
126 |
lemma hypreal_add_less_mono2: "!!(A::hypreal). A < B ==> C + A < C + B" |
|
127 |
by (auto intro: hypreal_add_less_mono1 simp add: hypreal_add_commute) |
|
128 |
||
129 |
lemma hypreal_add_le_less_mono: "[|(i::hypreal)\<le>j; k<l |] ==> i + k < j + l" |
|
130 |
apply (erule add_right_mono [THEN order_le_less_trans]) |
|
131 |
apply (erule add_strict_left_mono) |
|
132 |
done |
|
133 |
||
134 |
lemma hypreal_less_add_right_cancel: "(A::hypreal) + C < B + C ==> A < B" |
|
135 |
apply (simp (no_asm_use)) |
|
136 |
done |
|
137 |
||
138 |
lemma hypreal_less_add_left_cancel: "(C::hypreal) + A < C + B ==> A < B" |
|
139 |
apply (simp (no_asm_use)) |
|
140 |
done |
|
141 |
||
142 |
lemma hypreal_add_zero_less_le_mono: "[|r < x; (0::hypreal) \<le> y|] ==> r < x + y" |
|
143 |
by (auto dest: hypreal_add_less_le_mono) |
|
144 |
||
145 |
||
14297 | 146 |
(**** The simproc abel_cancel ****) |
147 |
||
148 |
(*** Two lemmas needed for the simprocs ***) |
|
149 |
||
150 |
(*Deletion of other terms in the formula, seeking the -x at the front of z*) |
|
151 |
lemma hypreal_add_cancel_21: "((x::hypreal) + (y + z) = y + u) = ((x + z) = u)" |
|
152 |
apply (subst hypreal_add_left_commute) |
|
153 |
apply (rule hypreal_add_left_cancel) |
|
154 |
done |
|
155 |
||
156 |
(*A further rule to deal with the case that |
|
157 |
everything gets cancelled on the right.*) |
|
158 |
lemma hypreal_add_cancel_end: "((x::hypreal) + (y + z) = y) = (x = -z)" |
|
159 |
apply (subst hypreal_add_left_commute) |
|
160 |
apply (rule_tac t = y in hypreal_add_zero_right [THEN subst], subst hypreal_add_left_cancel) |
|
161 |
apply (simp (no_asm) add: hypreal_eq_diff_eq [symmetric]) |
|
162 |
done |
|
163 |
||
164 |
ML{* |
|
165 |
val hypreal_add_cancel_21 = thm "hypreal_add_cancel_21"; |
|
166 |
val hypreal_add_cancel_end = thm "hypreal_add_cancel_end"; |
|
167 |
||
168 |
structure Hyperreal_Cancel_Data = |
|
169 |
struct |
|
170 |
val ss = HOL_ss |
|
171 |
val eq_reflection = eq_reflection |
|
172 |
||
173 |
val sg_ref = Sign.self_ref (Theory.sign_of (the_context ())) |
|
174 |
val T = Type("HyperDef.hypreal",[]) |
|
175 |
val zero = Const ("0", T) |
|
176 |
val restrict_to_left = restrict_to_left |
|
177 |
val add_cancel_21 = hypreal_add_cancel_21 |
|
178 |
val add_cancel_end = hypreal_add_cancel_end |
|
179 |
val add_left_cancel = hypreal_add_left_cancel |
|
180 |
val add_assoc = hypreal_add_assoc |
|
181 |
val add_commute = hypreal_add_commute |
|
182 |
val add_left_commute = hypreal_add_left_commute |
|
183 |
val add_0 = hypreal_add_zero_left |
|
184 |
val add_0_right = hypreal_add_zero_right |
|
185 |
||
186 |
val eq_diff_eq = hypreal_eq_diff_eq |
|
187 |
val eqI_rules = [hypreal_less_eqI, hypreal_eq_eqI, hypreal_le_eqI] |
|
188 |
fun dest_eqI th = |
|
189 |
#1 (HOLogic.dest_bin "op =" HOLogic.boolT |
|
190 |
(HOLogic.dest_Trueprop (concl_of th))) |
|
191 |
||
192 |
val diff_def = hypreal_diff_def |
|
193 |
val minus_add_distrib = hypreal_minus_add_distrib |
|
194 |
val minus_minus = hypreal_minus_minus |
|
195 |
val minus_0 = hypreal_minus_zero |
|
196 |
val add_inverses = [hypreal_add_minus, hypreal_add_minus_left] |
|
197 |
val cancel_simps = [hypreal_add_minus_cancelA, hypreal_minus_add_cancelA] |
|
198 |
end; |
|
199 |
||
200 |
structure Hyperreal_Cancel = Abel_Cancel (Hyperreal_Cancel_Data); |
|
201 |
||
202 |
Addsimprocs [Hyperreal_Cancel.sum_conv, Hyperreal_Cancel.rel_conv]; |
|
203 |
*} |
|
204 |
||
14310 | 205 |
lemma hypreal_le_add_right_cancel: "!!(A::hypreal). A + C \<le> B + C ==> A \<le> B" |
206 |
apply (drule_tac x = "-C" in hypreal_add_le_mono1) |
|
207 |
apply (simp add: hypreal_add_assoc) |
|
208 |
done |
|
209 |
||
210 |
lemma hypreal_le_add_left_cancel: "!!(A::hypreal). C + A \<le> C + B ==> A \<le> B" |
|
211 |
apply (drule_tac x = "-C" in hypreal_add_left_le_mono1) |
|
212 |
apply (simp add: hypreal_add_assoc [symmetric]) |
|
213 |
done |
|
214 |
||
215 |
lemma hypreal_mult_less_zero: "[| 0 < x; y < 0 |] ==> x*y < (0::hypreal)" |
|
216 |
apply (drule hypreal_minus_zero_less_iff [THEN iffD2]) |
|
217 |
apply (drule hypreal_mult_order, assumption) |
|
218 |
apply (rule hypreal_minus_zero_less_iff [THEN iffD1], simp) |
|
219 |
done |
|
220 |
||
221 |
lemma hypreal_mult_less_zero1: "[| x < 0; y < 0 |] ==> (0::hypreal) < x * y" |
|
222 |
apply (drule hypreal_minus_zero_less_iff [THEN iffD2])+ |
|
223 |
apply (drule hypreal_mult_order, assumption, simp) |
|
14297 | 224 |
done |
14310 | 225 |
|
226 |
lemma hypreal_le_square: "(0::hypreal) \<le> x*x" |
|
227 |
apply (rule_tac x = 0 and y = x in hypreal_linear_less2) |
|
228 |
apply (auto intro: hypreal_mult_order hypreal_mult_less_zero1 order_less_imp_le) |
|
229 |
done |
|
230 |
declare hypreal_le_square [simp] |
|
231 |
||
232 |
lemma hypreal_add_order: "[| 0 < x; 0 < y |] ==> (0::hypreal) < x + y" |
|
233 |
apply (erule order_less_trans) |
|
234 |
apply (drule hypreal_add_less_mono2, simp) |
|
235 |
done |
|
14297 | 236 |
|
14310 | 237 |
lemma hypreal_le_add_order: "[| 0 \<le> x; 0 \<le> y |] ==> (0::hypreal) \<le> x + y" |
238 |
apply (drule order_le_imp_less_or_eq)+ |
|
239 |
apply (auto intro: hypreal_add_order order_less_imp_le) |
|
240 |
done |
|
241 |
||
242 |
text{*The precondition could be weakened to @{term "0\<le>x"}*} |
|
243 |
lemma hypreal_mult_less_mono: |
|
244 |
"[| u<v; x<y; (0::hypreal) < v; 0 < x |] ==> u*x < v* y" |
|
245 |
by (simp add: Ring_and_Field.mult_strict_mono order_less_imp_le) |
|
246 |
||
247 |
lemma hypreal_inverse_gt_0: "0 < x ==> 0 < inverse (x::hypreal)" |
|
248 |
by (rule Ring_and_Field.positive_imp_inverse_positive) |
|
249 |
||
250 |
lemma hypreal_inverse_less_0: "x < 0 ==> inverse (x::hypreal) < 0" |
|
251 |
by (rule Ring_and_Field.negative_imp_inverse_negative) |
|
14297 | 252 |
|
253 |
lemma hypreal_less_swap_iff: "((x::hypreal) < y) = (-y < -x)" |
|
254 |
apply (subst hypreal_less_minus_iff) |
|
255 |
apply (rule_tac x1 = x in hypreal_less_minus_iff [THEN ssubst]) |
|
256 |
apply (simp (no_asm) add: hypreal_add_commute) |
|
257 |
done |
|
258 |
||
259 |
lemma hypreal_gt_zero_iff: |
|
260 |
"((0::hypreal) < x) = (-x < x)" |
|
261 |
apply (unfold hypreal_zero_def) |
|
262 |
apply (rule_tac z = x in eq_Abs_hypreal) |
|
263 |
apply (auto simp add: hypreal_less hypreal_minus, ultra+) |
|
264 |
done |
|
265 |
||
266 |
lemma hypreal_lt_zero_iff: "(x < (0::hypreal)) = (x < -x)" |
|
267 |
apply (rule hypreal_minus_zero_less_iff [THEN subst]) |
|
268 |
apply (subst hypreal_gt_zero_iff) |
|
269 |
apply (simp (no_asm_use)) |
|
270 |
done |
|
271 |
||
272 |
||
273 |
(*---------------------------------------------------------------------------- |
|
274 |
Existence of infinite hyperreal number |
|
275 |
----------------------------------------------------------------------------*) |
|
276 |
||
14299 | 277 |
lemma Rep_hypreal_omega: "Rep_hypreal(omega) \<in> hypreal" |
14297 | 278 |
apply (unfold omega_def) |
279 |
apply (rule Rep_hypreal) |
|
280 |
done |
|
281 |
||
282 |
(* existence of infinite number not corresponding to any real number *) |
|
283 |
(* use assumption that member FreeUltrafilterNat is not finite *) |
|
284 |
(* a few lemmas first *) |
|
285 |
||
286 |
lemma lemma_omega_empty_singleton_disj: "{n::nat. x = real n} = {} | |
|
14299 | 287 |
(\<exists>y. {n::nat. x = real n} = {y})" |
14297 | 288 |
by (force dest: inj_real_of_nat [THEN injD]) |
289 |
||
290 |
lemma lemma_finite_omega_set: "finite {n::nat. x = real n}" |
|
291 |
by (cut_tac x = x in lemma_omega_empty_singleton_disj, auto) |
|
292 |
||
293 |
lemma not_ex_hypreal_of_real_eq_omega: |
|
14299 | 294 |
"~ (\<exists>x. hypreal_of_real x = omega)" |
14297 | 295 |
apply (unfold omega_def hypreal_of_real_def) |
296 |
apply (auto simp add: real_of_nat_Suc diff_eq_eq [symmetric] lemma_finite_omega_set [THEN FreeUltrafilterNat_finite]) |
|
297 |
done |
|
298 |
||
14299 | 299 |
lemma hypreal_of_real_not_eq_omega: "hypreal_of_real x \<noteq> omega" |
14297 | 300 |
by (cut_tac not_ex_hypreal_of_real_eq_omega, auto) |
301 |
||
302 |
(* existence of infinitesimal number also not *) |
|
303 |
(* corresponding to any real number *) |
|
304 |
||
305 |
lemma real_of_nat_inverse_inj: "inverse (real (x::nat)) = inverse (real y) ==> x = y" |
|
306 |
by (rule inj_real_of_nat [THEN injD], simp) |
|
307 |
||
308 |
lemma lemma_epsilon_empty_singleton_disj: "{n::nat. x = inverse(real(Suc n))} = {} | |
|
14299 | 309 |
(\<exists>y. {n::nat. x = inverse(real(Suc n))} = {y})" |
14297 | 310 |
apply (auto simp add: inj_real_of_nat [THEN inj_eq]) |
311 |
done |
|
312 |
||
313 |
lemma lemma_finite_epsilon_set: "finite {n. x = inverse(real(Suc n))}" |
|
314 |
by (cut_tac x = x in lemma_epsilon_empty_singleton_disj, auto) |
|
315 |
||
316 |
lemma not_ex_hypreal_of_real_eq_epsilon: |
|
14299 | 317 |
"~ (\<exists>x. hypreal_of_real x = epsilon)" |
14297 | 318 |
apply (unfold epsilon_def hypreal_of_real_def) |
319 |
apply (auto simp add: lemma_finite_epsilon_set [THEN FreeUltrafilterNat_finite]) |
|
320 |
done |
|
321 |
||
14299 | 322 |
lemma hypreal_of_real_not_eq_epsilon: "hypreal_of_real x \<noteq> epsilon" |
14297 | 323 |
by (cut_tac not_ex_hypreal_of_real_eq_epsilon, auto) |
324 |
||
14299 | 325 |
lemma hypreal_epsilon_not_zero: "epsilon \<noteq> 0" |
14297 | 326 |
by (unfold epsilon_def hypreal_zero_def, auto) |
327 |
||
328 |
lemma hypreal_epsilon_inverse_omega: "epsilon = inverse(omega)" |
|
329 |
by (simp add: hypreal_inverse omega_def epsilon_def) |
|
330 |
||
331 |
||
14303 | 332 |
subsection{*Routine Properties*} |
10751 | 333 |
|
14303 | 334 |
(* this proof is so much simpler than one for reals!! *) |
335 |
lemma hypreal_inverse_less_swap: |
|
336 |
"[| 0 < r; r < x |] ==> inverse x < inverse (r::hypreal)" |
|
337 |
by (rule Ring_and_Field.less_imp_inverse_less) |
|
14297 | 338 |
|
14303 | 339 |
lemma hypreal_inverse_less_iff: |
340 |
"[| 0 < r; 0 < x|] ==> (inverse x < inverse (r::hypreal)) = (r < x)" |
|
341 |
by (rule Ring_and_Field.inverse_less_iff_less) |
|
14297 | 342 |
|
14303 | 343 |
lemma hypreal_inverse_le_iff: |
344 |
"[| 0 < r; 0 < x|] ==> (inverse x \<le> inverse r) = (r \<le> (x::hypreal))" |
|
345 |
by (rule Ring_and_Field.inverse_le_iff_le) |
|
14297 | 346 |
|
347 |
||
14303 | 348 |
subsection{*Convenient Biconditionals for Products of Signs*} |
14297 | 349 |
|
14303 | 350 |
lemma hypreal_0_less_mult_iff: |
351 |
"((0::hypreal) < x*y) = (0 < x & 0 < y | x < 0 & y < 0)" |
|
352 |
by (rule Ring_and_Field.zero_less_mult_iff) |
|
14297 | 353 |
|
14303 | 354 |
lemma hypreal_0_le_mult_iff: "((0::hypreal) \<le> x*y) = (0 \<le> x & 0 \<le> y | x \<le> 0 & y \<le> 0)" |
355 |
by (rule Ring_and_Field.zero_le_mult_iff) |
|
14297 | 356 |
|
357 |
lemma hypreal_mult_less_0_iff: "(x*y < (0::hypreal)) = (0 < x & y < 0 | x < 0 & 0 < y)" |
|
14303 | 358 |
by (rule Ring_and_Field.mult_less_0_iff) |
359 |
||
360 |
lemma hypreal_mult_le_0_iff: "(x*y \<le> (0::hypreal)) = (0 \<le> x & y \<le> 0 | x \<le> 0 & 0 \<le> y)" |
|
361 |
by (rule Ring_and_Field.mult_le_0_iff) |
|
362 |
||
14297 | 363 |
|
14303 | 364 |
lemma hypreal_mult_self_sum_ge_zero: "(0::hypreal) \<le> x*x + y*y" |
365 |
proof - |
|
366 |
have "0 + 0 \<le> x*x + y*y" by (blast intro: add_mono zero_le_square) |
|
367 |
thus ?thesis by simp |
|
368 |
qed |
|
14297 | 369 |
|
14299 | 370 |
(*TO BE DELETED*) |
371 |
ML |
|
372 |
{* |
|
373 |
val hypreal_add_ac = thms"hypreal_add_ac"; |
|
374 |
val hypreal_mult_ac = thms"hypreal_mult_ac"; |
|
375 |
||
376 |
val hypreal_less_irrefl = thm"hypreal_less_irrefl"; |
|
377 |
*} |
|
14297 | 378 |
|
379 |
ML |
|
380 |
{* |
|
14299 | 381 |
val hrabs_def = thm "hrabs_def"; |
382 |
val hypreal_hrabs = thm "hypreal_hrabs"; |
|
383 |
||
14297 | 384 |
val hypreal_less_swap_iff = thm"hypreal_less_swap_iff"; |
385 |
val hypreal_gt_zero_iff = thm"hypreal_gt_zero_iff"; |
|
386 |
val hypreal_add_less_mono1 = thm"hypreal_add_less_mono1"; |
|
387 |
val hypreal_add_less_mono2 = thm"hypreal_add_less_mono2"; |
|
388 |
val hypreal_lt_zero_iff = thm"hypreal_lt_zero_iff"; |
|
389 |
val hypreal_mult_order = thm"hypreal_mult_order"; |
|
390 |
val hypreal_mult_less_zero1 = thm"hypreal_mult_less_zero1"; |
|
391 |
val hypreal_mult_less_zero = thm"hypreal_mult_less_zero"; |
|
392 |
val hypreal_le_add_order = thm"hypreal_le_add_order"; |
|
393 |
val hypreal_add_right_cancel_less = thm"hypreal_add_right_cancel_less"; |
|
394 |
val hypreal_add_left_cancel_less = thm"hypreal_add_left_cancel_less"; |
|
395 |
val hypreal_add_right_cancel_le = thm"hypreal_add_right_cancel_le"; |
|
396 |
val hypreal_add_left_cancel_le = thm"hypreal_add_left_cancel_le"; |
|
397 |
val hypreal_add_less_mono = thm"hypreal_add_less_mono"; |
|
398 |
val hypreal_add_left_le_mono1 = thm"hypreal_add_left_le_mono1"; |
|
399 |
val hypreal_add_le_mono1 = thm"hypreal_add_le_mono1"; |
|
400 |
val hypreal_add_le_mono = thm"hypreal_add_le_mono"; |
|
401 |
val hypreal_add_less_le_mono = thm"hypreal_add_less_le_mono"; |
|
402 |
val hypreal_add_le_less_mono = thm"hypreal_add_le_less_mono"; |
|
403 |
val hypreal_less_add_right_cancel = thm"hypreal_less_add_right_cancel"; |
|
404 |
val hypreal_less_add_left_cancel = thm"hypreal_less_add_left_cancel"; |
|
405 |
val hypreal_add_zero_less_le_mono = thm"hypreal_add_zero_less_le_mono"; |
|
406 |
val hypreal_le_add_right_cancel = thm"hypreal_le_add_right_cancel"; |
|
407 |
val hypreal_le_add_left_cancel = thm"hypreal_le_add_left_cancel"; |
|
408 |
val hypreal_le_square = thm"hypreal_le_square"; |
|
409 |
val hypreal_mult_less_mono1 = thm"hypreal_mult_less_mono1"; |
|
410 |
val hypreal_mult_less_mono2 = thm"hypreal_mult_less_mono2"; |
|
411 |
val hypreal_mult_less_mono = thm"hypreal_mult_less_mono"; |
|
412 |
val hypreal_inverse_gt_0 = thm"hypreal_inverse_gt_0"; |
|
413 |
val hypreal_inverse_less_0 = thm"hypreal_inverse_less_0"; |
|
414 |
val Rep_hypreal_omega = thm"Rep_hypreal_omega"; |
|
415 |
val lemma_omega_empty_singleton_disj = thm"lemma_omega_empty_singleton_disj"; |
|
416 |
val lemma_finite_omega_set = thm"lemma_finite_omega_set"; |
|
417 |
val not_ex_hypreal_of_real_eq_omega = thm"not_ex_hypreal_of_real_eq_omega"; |
|
418 |
val hypreal_of_real_not_eq_omega = thm"hypreal_of_real_not_eq_omega"; |
|
419 |
val real_of_nat_inverse_inj = thm"real_of_nat_inverse_inj"; |
|
420 |
val lemma_epsilon_empty_singleton_disj = thm"lemma_epsilon_empty_singleton_disj"; |
|
421 |
val lemma_finite_epsilon_set = thm"lemma_finite_epsilon_set"; |
|
422 |
val not_ex_hypreal_of_real_eq_epsilon = thm"not_ex_hypreal_of_real_eq_epsilon"; |
|
423 |
val hypreal_of_real_not_eq_epsilon = thm"hypreal_of_real_not_eq_epsilon"; |
|
424 |
val hypreal_epsilon_not_zero = thm"hypreal_epsilon_not_zero"; |
|
425 |
val hypreal_epsilon_inverse_omega = thm"hypreal_epsilon_inverse_omega"; |
|
426 |
val hypreal_inverse_less_swap = thm"hypreal_inverse_less_swap"; |
|
427 |
val hypreal_inverse_less_iff = thm"hypreal_inverse_less_iff"; |
|
14303 | 428 |
val hypreal_inverse_le_iff = thm"hypreal_inverse_le_iff"; |
14297 | 429 |
val hypreal_0_less_mult_iff = thm"hypreal_0_less_mult_iff"; |
430 |
val hypreal_0_le_mult_iff = thm"hypreal_0_le_mult_iff"; |
|
431 |
val hypreal_mult_less_0_iff = thm"hypreal_mult_less_0_iff"; |
|
432 |
val hypreal_mult_le_0_iff = thm"hypreal_mult_le_0_iff"; |
|
14303 | 433 |
val hypreal_mult_self_sum_ge_zero = thm "hypreal_mult_self_sum_ge_zero"; |
14297 | 434 |
*} |
10751 | 435 |
|
436 |
end |