author | paulson |
Thu, 11 Dec 2003 10:52:41 +0100 | |
changeset 14290 | 84fda1b39947 |
parent 14288 | d149e3cbdb39 |
child 14293 | 22542982bffd |
permissions | -rw-r--r-- |
9013
9dd0274f76af
Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents:
8838
diff
changeset
|
1 |
(* Title: Real/RealOrd.thy |
9dd0274f76af
Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents:
8838
diff
changeset
|
2 |
ID: $Id$ |
9dd0274f76af
Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents:
8838
diff
changeset
|
3 |
Author: Jacques D. Fleuriot and Lawrence C. Paulson |
7334 | 4 |
Copyright: 1998 University of Cambridge |
5 |
*) |
|
6 |
||
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
7 |
header{*The Reals Form an Ordered Field, etc.*} |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
8 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
9 |
theory RealOrd = RealDef: |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
10 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
11 |
defs (overloaded) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
12 |
real_abs_def: "abs (r::real) == (if 0 \<le> r then r else -r)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
13 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
14 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
15 |
|
14270 | 16 |
subsection{*Properties of Less-Than Or Equals*} |
17 |
||
18 |
lemma real_leI: "~(w < z) ==> z \<le> (w::real)" |
|
19 |
apply (unfold real_le_def, assumption) |
|
20 |
done |
|
21 |
||
22 |
lemma real_leD: "z\<le>w ==> ~(w<(z::real))" |
|
23 |
by (unfold real_le_def, assumption) |
|
24 |
||
25 |
lemmas real_leE = real_leD [elim_format] |
|
26 |
||
27 |
lemma real_less_le_iff: "(~(w < z)) = (z \<le> (w::real))" |
|
28 |
by (blast intro!: real_leI real_leD) |
|
29 |
||
30 |
lemma not_real_leE: "~ z \<le> w ==> w<(z::real)" |
|
31 |
by (unfold real_le_def, blast) |
|
32 |
||
33 |
lemma real_le_imp_less_or_eq: "!!(x::real). x \<le> y ==> x < y | x = y" |
|
34 |
apply (unfold real_le_def) |
|
35 |
apply (cut_tac real_linear) |
|
36 |
apply (blast elim: real_less_irrefl real_less_asym) |
|
37 |
done |
|
38 |
||
39 |
lemma real_less_or_eq_imp_le: "z<w | z=w ==> z \<le>(w::real)" |
|
40 |
apply (unfold real_le_def) |
|
41 |
apply (cut_tac real_linear) |
|
42 |
apply (fast elim: real_less_irrefl real_less_asym) |
|
43 |
done |
|
44 |
||
45 |
lemma real_le_less: "(x \<le> (y::real)) = (x < y | x=y)" |
|
46 |
by (blast intro!: real_less_or_eq_imp_le dest!: real_le_imp_less_or_eq) |
|
47 |
||
48 |
lemma real_le_refl: "w \<le> (w::real)" |
|
49 |
by (simp add: real_le_less) |
|
50 |
||
51 |
lemma real_le_trans: "[| i \<le> j; j \<le> k |] ==> i \<le> (k::real)" |
|
52 |
apply (drule real_le_imp_less_or_eq) |
|
53 |
apply (drule real_le_imp_less_or_eq) |
|
54 |
apply (rule real_less_or_eq_imp_le) |
|
55 |
apply (blast intro: real_less_trans) |
|
56 |
done |
|
57 |
||
58 |
lemma real_le_anti_sym: "[| z \<le> w; w \<le> z |] ==> z = (w::real)" |
|
59 |
apply (drule real_le_imp_less_or_eq) |
|
60 |
apply (drule real_le_imp_less_or_eq) |
|
61 |
apply (fast elim: real_less_irrefl real_less_asym) |
|
62 |
done |
|
63 |
||
64 |
(* Axiom 'order_less_le' of class 'order': *) |
|
65 |
lemma real_less_le: "((w::real) < z) = (w \<le> z & w ~= z)" |
|
66 |
apply (simp add: real_le_def real_neq_iff) |
|
67 |
apply (blast elim!: real_less_asym) |
|
68 |
done |
|
69 |
||
70 |
instance real :: order |
|
71 |
by (intro_classes, |
|
72 |
(assumption | |
|
73 |
rule real_le_refl real_le_trans real_le_anti_sym real_less_le)+) |
|
74 |
||
75 |
(* Axiom 'linorder_linear' of class 'linorder': *) |
|
76 |
lemma real_le_linear: "(z::real) \<le> w | w \<le> z" |
|
77 |
apply (simp add: real_le_less) |
|
78 |
apply (cut_tac real_linear, blast) |
|
79 |
done |
|
80 |
||
81 |
instance real :: linorder |
|
82 |
by (intro_classes, rule real_le_linear) |
|
83 |
||
84 |
||
85 |
subsection{*Theorems About the Ordering*} |
|
86 |
||
87 |
lemma real_gt_zero_preal_Ex: "(0 < x) = (\<exists>y. x = real_of_preal y)" |
|
88 |
apply (auto simp add: real_of_preal_zero_less) |
|
89 |
apply (cut_tac x = x in real_of_preal_trichotomy) |
|
90 |
apply (blast elim!: real_less_irrefl real_of_preal_not_minus_gt_zero [THEN notE]) |
|
91 |
done |
|
92 |
||
93 |
lemma real_gt_preal_preal_Ex: "real_of_preal z < x ==> \<exists>y. x = real_of_preal y" |
|
94 |
by (blast dest!: real_of_preal_zero_less [THEN real_less_trans] |
|
95 |
intro: real_gt_zero_preal_Ex [THEN iffD1]) |
|
96 |
||
97 |
lemma real_ge_preal_preal_Ex: "real_of_preal z \<le> x ==> \<exists>y. x = real_of_preal y" |
|
98 |
by (blast dest: order_le_imp_less_or_eq real_gt_preal_preal_Ex) |
|
99 |
||
100 |
lemma real_less_all_preal: "y \<le> 0 ==> \<forall>x. y < real_of_preal x" |
|
101 |
by (auto elim: order_le_imp_less_or_eq [THEN disjE] |
|
102 |
intro: real_of_preal_zero_less [THEN [2] real_less_trans] |
|
103 |
simp add: real_of_preal_zero_less) |
|
104 |
||
105 |
lemma real_less_all_real2: "~ 0 < y ==> \<forall>x. y < real_of_preal x" |
|
106 |
by (blast intro!: real_less_all_preal real_leI) |
|
107 |
||
108 |
lemma real_of_preal_le_iff: "(real_of_preal m1 \<le> real_of_preal m2) = (m1 \<le> m2)" |
|
109 |
apply (auto intro!: preal_leI simp add: real_less_le_iff [symmetric]) |
|
110 |
apply (drule order_le_less_trans, assumption) |
|
111 |
apply (erule preal_less_irrefl) |
|
112 |
done |
|
113 |
||
114 |
||
115 |
subsection{*Monotonicity of Addition*} |
|
116 |
||
117 |
lemma real_add_left_cancel: "((x::real) + y = x + z) = (y = z)" |
|
118 |
apply safe |
|
119 |
apply (drule_tac f = "%t. (-x) + t" in arg_cong) |
|
120 |
apply (simp add: real_add_assoc [symmetric]) |
|
121 |
done |
|
122 |
||
123 |
||
124 |
lemma real_mult_order: "[| 0 < x; 0 < y |] ==> (0::real) < x * y" |
|
125 |
apply (auto simp add: real_gt_zero_preal_Ex) |
|
126 |
apply (rule_tac x = "y*ya" in exI) |
|
127 |
apply (simp (no_asm_use) add: real_of_preal_mult) |
|
128 |
done |
|
129 |
||
130 |
lemma real_minus_add_distrib [simp]: "-(x + y) = (-x) + (- y :: real)" |
|
131 |
apply (rule_tac z = x in eq_Abs_REAL) |
|
132 |
apply (rule_tac z = y in eq_Abs_REAL) |
|
133 |
apply (auto simp add: real_minus real_add) |
|
134 |
done |
|
135 |
||
136 |
(*Alternative definition for real_less*) |
|
137 |
lemma real_less_add_positive_left_Ex: "R < S ==> \<exists>T::real. 0 < T & R + T = S" |
|
138 |
apply (rule_tac x = R in real_of_preal_trichotomyE) |
|
139 |
apply (rule_tac [!] x = S in real_of_preal_trichotomyE) |
|
140 |
apply (auto dest!: preal_less_add_left_Ex simp add: real_of_preal_not_minus_gt_all real_of_preal_add real_of_preal_not_less_zero real_less_not_refl real_of_preal_not_minus_gt_zero) |
|
141 |
apply (rule_tac x = "real_of_preal D" in exI) |
|
142 |
apply (rule_tac [2] x = "real_of_preal m+real_of_preal ma" in exI) |
|
143 |
apply (rule_tac [3] x = "real_of_preal D" in exI) |
|
144 |
apply (auto simp add: real_of_preal_zero_less real_of_preal_sum_zero_less real_add_assoc) |
|
145 |
apply (simp add: real_add_assoc [symmetric]) |
|
146 |
done |
|
147 |
||
148 |
lemma real_less_sum_gt_zero: "(W < S) ==> (0 < S + (-W::real))" |
|
149 |
apply (drule real_less_add_positive_left_Ex) |
|
150 |
apply (auto simp add: real_add_minus real_add_zero_right real_add_ac) |
|
151 |
done |
|
152 |
||
153 |
lemma real_lemma_change_eq_subj: "!!S::real. T = S + W ==> S = T + (-W)" |
|
154 |
by (simp add: real_add_ac) |
|
155 |
||
156 |
(* FIXME: long! *) |
|
157 |
lemma real_sum_gt_zero_less: "(0 < S + (-W::real)) ==> (W < S)" |
|
158 |
apply (rule ccontr) |
|
159 |
apply (drule real_leI [THEN real_le_imp_less_or_eq]) |
|
160 |
apply (auto simp add: real_less_not_refl) |
|
161 |
apply (drule real_less_add_positive_left_Ex, clarify, simp) |
|
162 |
apply (drule real_lemma_change_eq_subj, auto) |
|
163 |
apply (drule real_less_sum_gt_zero) |
|
164 |
apply (auto elim: real_less_asym simp add: real_add_left_commute [of W] real_add_ac) |
|
165 |
done |
|
166 |
||
167 |
lemma real_mult_less_mono2: "[| (0::real) < z; x < y |] ==> z * x < z * y" |
|
168 |
apply (rule real_sum_gt_zero_less) |
|
169 |
apply (drule real_less_sum_gt_zero [of x y]) |
|
170 |
apply (drule real_mult_order, assumption) |
|
171 |
apply (simp add: real_add_mult_distrib2) |
|
172 |
done |
|
173 |
||
174 |
(** For the cancellation simproc. |
|
175 |
The idea is to cancel like terms on opposite sides by subtraction **) |
|
176 |
||
177 |
lemma real_less_sum_gt_0_iff: "(0 < S + (-W::real)) = (W < S)" |
|
178 |
by (blast intro: real_less_sum_gt_zero real_sum_gt_zero_less) |
|
179 |
||
180 |
lemma real_less_eq_diff: "(x<y) = (x-y < (0::real))" |
|
181 |
apply (unfold real_diff_def) |
|
182 |
apply (subst real_minus_zero_less_iff [symmetric]) |
|
183 |
apply (simp add: real_add_commute real_less_sum_gt_0_iff) |
|
184 |
done |
|
185 |
||
186 |
lemma real_less_eqI: "(x::real) - y = x' - y' ==> (x<y) = (x'<y')" |
|
187 |
apply (subst real_less_eq_diff) |
|
188 |
apply (rule_tac y1 = y in real_less_eq_diff [THEN ssubst], simp) |
|
189 |
done |
|
190 |
||
191 |
lemma real_le_eqI: "(x::real) - y = x' - y' ==> (y\<le>x) = (y'\<le>x')" |
|
192 |
apply (drule real_less_eqI) |
|
193 |
apply (simp add: real_le_def) |
|
194 |
done |
|
195 |
||
196 |
lemma real_add_left_mono: "x \<le> y ==> z + x \<le> z + (y::real)" |
|
197 |
apply (rule real_le_eqI [THEN iffD1]) |
|
198 |
prefer 2 apply assumption; |
|
199 |
apply (simp add: real_diff_def real_add_ac); |
|
200 |
done |
|
201 |
||
202 |
||
203 |
subsection{*The Reals Form an Ordered Field*} |
|
204 |
||
205 |
instance real :: inverse .. |
|
206 |
||
207 |
instance real :: ordered_field |
|
208 |
proof |
|
209 |
fix x y z :: real |
|
210 |
show "(x + y) + z = x + (y + z)" by (rule real_add_assoc) |
|
211 |
show "x + y = y + x" by (rule real_add_commute) |
|
212 |
show "0 + x = x" by simp |
|
213 |
show "- x + x = 0" by simp |
|
214 |
show "x - y = x + (-y)" by (simp add: real_diff_def) |
|
215 |
show "(x * y) * z = x * (y * z)" by (rule real_mult_assoc) |
|
216 |
show "x * y = y * x" by (rule real_mult_commute) |
|
217 |
show "1 * x = x" by simp |
|
218 |
show "(x + y) * z = x * z + y * z" by (simp add: real_add_mult_distrib) |
|
219 |
show "0 \<noteq> (1::real)" by (rule real_zero_not_eq_one) |
|
220 |
show "x \<le> y ==> z + x \<le> z + y" by (rule real_add_left_mono) |
|
221 |
show "x < y ==> 0 < z ==> z * x < z * y" by (simp add: real_mult_less_mono2) |
|
222 |
show "\<bar>x\<bar> = (if x < 0 then -x else x)" |
|
223 |
by (auto dest: order_le_less_trans simp add: real_abs_def linorder_not_le) |
|
224 |
show "x \<noteq> 0 ==> inverse x * x = 1" by simp |
|
225 |
show "y \<noteq> 0 ==> x / y = x * inverse y" by (simp add: real_divide_def) |
|
226 |
qed |
|
227 |
||
228 |
||
229 |
lemma real_zero_less_one: "0 < (1::real)" |
|
230 |
by (rule Ring_and_Field.zero_less_one) |
|
231 |
||
232 |
lemma real_add_less_mono: "[| R1 < S1; R2 < S2 |] ==> R1+R2 < S1+(S2::real)" |
|
233 |
by (rule Ring_and_Field.add_strict_mono) |
|
234 |
||
235 |
lemma real_add_le_mono: "[|i\<le>j; k\<le>l |] ==> i + k \<le> j + (l::real)" |
|
236 |
by (rule Ring_and_Field.add_mono) |
|
237 |
||
238 |
lemma real_le_minus_iff: "(-s \<le> -r) = ((r::real) \<le> s)" |
|
239 |
by (rule Ring_and_Field.neg_le_iff_le) |
|
240 |
||
241 |
lemma real_le_square [simp]: "(0::real) \<le> x*x" |
|
242 |
by (rule Ring_and_Field.zero_le_square) |
|
243 |
||
244 |
||
245 |
subsection{*Division Lemmas*} |
|
246 |
||
247 |
(** Inverse of zero! Useful to simplify certain equations **) |
|
248 |
||
249 |
lemma INVERSE_ZERO: "inverse 0 = (0::real)" |
|
250 |
apply (unfold real_inverse_def) |
|
251 |
apply (rule someI2) |
|
252 |
apply (auto simp add: real_zero_not_eq_one) |
|
253 |
done |
|
254 |
||
255 |
lemma DIVISION_BY_ZERO [simp]: "a / (0::real) = 0" |
|
256 |
by (simp add: real_divide_def INVERSE_ZERO) |
|
257 |
||
258 |
instance real :: division_by_zero |
|
259 |
proof |
|
260 |
fix x :: real |
|
261 |
show "inverse 0 = (0::real)" by (rule INVERSE_ZERO) |
|
262 |
show "x/0 = 0" by (rule DIVISION_BY_ZERO) |
|
263 |
qed |
|
264 |
||
265 |
lemma real_mult_left_cancel: "(c::real) ~= 0 ==> (c*a=c*b) = (a=b)" |
|
266 |
by auto |
|
267 |
||
268 |
lemma real_mult_right_cancel: "(c::real) ~= 0 ==> (a*c=b*c) = (a=b)" |
|
269 |
by auto |
|
270 |
||
271 |
lemma real_mult_left_cancel_ccontr: "c*a ~= c*b ==> a ~= b" |
|
272 |
by auto |
|
273 |
||
274 |
lemma real_mult_right_cancel_ccontr: "a*c ~= b*c ==> a ~= b" |
|
275 |
by auto |
|
276 |
||
277 |
lemma real_inverse_not_zero: "x ~= 0 ==> inverse(x::real) ~= 0" |
|
278 |
by (rule Ring_and_Field.nonzero_imp_inverse_nonzero) |
|
279 |
||
280 |
lemma real_mult_not_zero: "[| x ~= 0; y ~= 0 |] ==> x * y ~= (0::real)" |
|
281 |
by simp |
|
282 |
||
14288 | 283 |
lemma real_inverse_eq_divide: "inverse (x::real) = 1/x" |
284 |
by (rule Ring_and_Field.inverse_eq_divide) |
|
285 |
||
14270 | 286 |
lemma real_inverse_inverse: "inverse(inverse (x::real)) = x" |
287 |
by (rule Ring_and_Field.inverse_inverse_eq) |
|
288 |
||
289 |
lemma real_inverse_1: "inverse((1::real)) = (1::real)" |
|
290 |
by (rule Ring_and_Field.inverse_1) |
|
291 |
||
292 |
lemma real_minus_inverse: "inverse(-x) = -inverse(x::real)" |
|
293 |
by (rule Ring_and_Field.inverse_minus_eq) |
|
294 |
||
295 |
lemma real_inverse_distrib: "inverse(x*y) = inverse(x)*inverse(y::real)" |
|
296 |
by (rule Ring_and_Field.inverse_mult_distrib) |
|
297 |
||
298 |
(** As with multiplication, pull minus signs OUT of the / operator **) |
|
299 |
||
300 |
lemma real_minus_divide_eq: "(-x) / (y::real) = - (x/y)" |
|
301 |
by (simp add: real_divide_def) |
|
302 |
declare real_minus_divide_eq [simp] |
|
303 |
||
304 |
lemma real_divide_minus_eq: "(x / -(y::real)) = - (x/y)" |
|
305 |
by (simp add: real_divide_def real_minus_inverse) |
|
306 |
declare real_divide_minus_eq [simp] |
|
307 |
||
308 |
lemma real_add_divide_distrib: "(x+y)/(z::real) = x/z + y/z" |
|
309 |
by (simp add: real_divide_def real_add_mult_distrib) |
|
310 |
||
311 |
(*The following would e.g. convert (x+y)/2 to x/2 + y/2. Sometimes that |
|
312 |
leads to cancellations in x or y, but is also prevents "multiplying out" |
|
313 |
the 2 in e.g. (x+y)/2 = 5. |
|
314 |
||
315 |
Addsimps [inst "z" "number_of ?w" real_add_divide_distrib] |
|
316 |
**) |
|
317 |
||
318 |
||
319 |
||
320 |
subsection{*More Lemmas*} |
|
321 |
||
322 |
lemma real_add_right_cancel: "(y + (x::real)= z + x) = (y = z)" |
|
323 |
by (rule Ring_and_Field.add_right_cancel) |
|
324 |
||
325 |
lemma real_add_less_mono1: "v < (w::real) ==> v + z < w + z" |
|
326 |
by (rule Ring_and_Field.add_strict_right_mono) |
|
327 |
||
328 |
lemma real_add_le_mono1: "v \<le> (w::real) ==> v + z \<le> w + z" |
|
329 |
by (rule Ring_and_Field.add_right_mono) |
|
330 |
||
331 |
lemma real_add_less_le_mono: "[| w'<w; z'\<le>z |] ==> w' + z' < w + (z::real)" |
|
332 |
apply (erule add_strict_right_mono [THEN order_less_le_trans]) |
|
333 |
apply (erule add_left_mono) |
|
334 |
done |
|
335 |
||
336 |
lemma real_add_le_less_mono: "!!z z'::real. [| w'\<le>w; z'<z |] ==> w' + z' < w + z" |
|
337 |
apply (erule add_right_mono [THEN order_le_less_trans]) |
|
338 |
apply (erule add_strict_left_mono) |
|
339 |
done |
|
340 |
||
341 |
lemma real_less_add_right_cancel: "!!(A::real). A + C < B + C ==> A < B" |
|
342 |
by (rule Ring_and_Field.add_less_imp_less_right) |
|
343 |
||
344 |
lemma real_less_add_left_cancel: "!!(A::real). C + A < C + B ==> A < B" |
|
345 |
by (rule Ring_and_Field.add_less_imp_less_left) |
|
346 |
||
347 |
lemma real_le_add_right_cancel: "!!(A::real). A + C \<le> B + C ==> A \<le> B" |
|
348 |
by (rule Ring_and_Field.add_le_imp_le_right) |
|
349 |
||
350 |
lemma real_le_add_left_cancel: "!!(A::real). C + A \<le> C + B ==> A \<le> B" |
|
351 |
by (rule (*Ring_and_Field.*)add_le_imp_le_left) |
|
352 |
||
353 |
lemma real_add_right_cancel_less [simp]: "(v+z < w+z) = (v < (w::real))" |
|
354 |
by (rule Ring_and_Field.add_less_cancel_right) |
|
355 |
||
356 |
lemma real_add_left_cancel_less [simp]: "(z+v < z+w) = (v < (w::real))" |
|
357 |
by (rule Ring_and_Field.add_less_cancel_left) |
|
358 |
||
359 |
lemma real_add_right_cancel_le [simp]: "(v+z \<le> w+z) = (v \<le> (w::real))" |
|
360 |
by (rule Ring_and_Field.add_le_cancel_right) |
|
361 |
||
362 |
lemma real_add_left_cancel_le [simp]: "(z+v \<le> z+w) = (v \<le> (w::real))" |
|
363 |
by (rule Ring_and_Field.add_le_cancel_left) |
|
364 |
||
365 |
||
14288 | 366 |
subsection{*Factor Cancellation Theorems for Type @{text real}*} |
367 |
||
368 |
lemma real_mult_less_cancel2: |
|
369 |
"(m*k < n*k) = (((0::real) < k & m<n) | (k < 0 & n<m))" |
|
370 |
by (rule Ring_and_Field.mult_less_cancel_right) |
|
371 |
||
372 |
lemma real_mult_le_cancel2: |
|
373 |
"(m*k <= n*k) = (((0::real) < k --> m<=n) & (k < 0 --> n<=m))" |
|
374 |
by (rule Ring_and_Field.mult_le_cancel_right) |
|
375 |
||
376 |
lemma real_mult_less_cancel1: |
|
377 |
"(k*m < k*n) = (((0::real) < k & m<n) | (k < 0 & n<m))" |
|
378 |
by (rule Ring_and_Field.mult_less_cancel_left) |
|
379 |
||
380 |
lemma real_mult_le_cancel1: |
|
381 |
"!!k::real. (k*m <= k*n) = ((0 < k --> m<=n) & (k < 0 --> n<=m))" |
|
382 |
by (rule Ring_and_Field.mult_le_cancel_left) |
|
383 |
||
384 |
lemma real_mult_eq_cancel1: "!!k::real. (k*m = k*n) = (k = 0 | m=n)" |
|
385 |
by (rule Ring_and_Field.mult_cancel_left) |
|
386 |
||
387 |
lemma real_mult_eq_cancel2: "!!k::real. (m*k = n*k) = (k = 0 | m=n)" |
|
388 |
by (rule Ring_and_Field.mult_cancel_right) |
|
389 |
||
390 |
lemma real_mult_div_cancel1: "!!k::real. k~=0 ==> (k*m) / (k*n) = (m/n)" |
|
391 |
by (rule Ring_and_Field.mult_divide_cancel_left) |
|
392 |
||
393 |
lemma real_mult_div_cancel_disj: |
|
394 |
"(k*m) / (k*n) = (if k = (0::real) then 0 else m/n)" |
|
395 |
by (rule Ring_and_Field.mult_divide_cancel_eq_if) |
|
396 |
||
397 |
||
14270 | 398 |
subsection{*For the @{text abel_cancel} Simproc (DELETE)*} |
399 |
||
400 |
lemma real_eq_eqI: "(x::real) - y = x' - y' ==> (x=y) = (x'=y')" |
|
401 |
apply safe |
|
402 |
apply (simp_all add: eq_diff_eq diff_eq_eq) |
|
403 |
done |
|
404 |
||
405 |
lemma real_add_minus_cancel: "z + ((- z) + w) = (w::real)" |
|
406 |
by (simp add: real_add_assoc [symmetric]) |
|
407 |
||
408 |
lemma real_minus_add_cancel: "(-z) + (z + w) = (w::real)" |
|
409 |
by (simp add: real_add_assoc [symmetric]) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
410 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
411 |
(*Deletion of other terms in the formula, seeking the -x at the front of z*) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
412 |
lemma real_add_cancel_21: "((x::real) + (y + z) = y + u) = ((x + z) = u)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
413 |
apply (subst real_add_left_commute) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
414 |
apply (rule real_add_left_cancel) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
415 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
416 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
417 |
(*A further rule to deal with the case that |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
418 |
everything gets cancelled on the right.*) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
419 |
lemma real_add_cancel_end: "((x::real) + (y + z) = y) = (x = -z)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
420 |
apply (subst real_add_left_commute) |
14266 | 421 |
apply (rule_tac t = y in real_add_zero_right [THEN subst], subst real_add_left_cancel) |
14270 | 422 |
apply (simp add: real_diff_def eq_diff_eq [symmetric]) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
423 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
424 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
425 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
426 |
subsection{*Inverse and Division*} |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
427 |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
428 |
lemma real_inverse_gt_0: "0 < x ==> 0 < inverse (x::real)" |
14277
ad66687ece6e
more field division lemmas transferred from Real to Ring_and_Field
paulson
parents:
14271
diff
changeset
|
429 |
by (rule Ring_and_Field.positive_imp_inverse_positive) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
430 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
431 |
lemma real_inverse_less_0: "x < 0 ==> inverse (x::real) < 0" |
14277
ad66687ece6e
more field division lemmas transferred from Real to Ring_and_Field
paulson
parents:
14271
diff
changeset
|
432 |
by (rule Ring_and_Field.negative_imp_inverse_negative) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
433 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
434 |
lemma real_mult_less_mono1: "[| (0::real) < z; x < y |] ==> x*z < y*z" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
435 |
by (rule Ring_and_Field.mult_strict_right_mono) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
436 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
437 |
lemma real_mult_less_mono: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
438 |
"[| u<v; x<y; (0::real) < v; 0 < x |] ==> u*x < v* y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
439 |
by (simp add: Ring_and_Field.mult_strict_mono order_less_imp_le) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
440 |
|
14266 | 441 |
lemma real_mult_less_iff1 [simp]: "(0::real) < z ==> (x*z < y*z) = (x < y)" |
14288 | 442 |
by (force elim: order_less_asym |
443 |
simp add: Ring_and_Field.mult_less_cancel_right) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
444 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
445 |
lemma real_mult_le_cancel_iff1 [simp]: "(0::real) < z ==> (x*z \<le> y*z) = (x\<le>y)" |
14266 | 446 |
by (auto simp add: real_le_def) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
447 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
448 |
lemma real_mult_le_cancel_iff2 [simp]: "(0::real) < z ==> (z*x \<le> z*y) = (x\<le>y)" |
14288 | 449 |
by (force elim: order_less_asym |
450 |
simp add: Ring_and_Field.mult_le_cancel_left) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
451 |
|
14266 | 452 |
lemma real_mult_less_mono': |
453 |
"[| x < y; r1 < r2; (0::real) \<le> r1; 0 \<le> x|] ==> r1 * x < r2 * y" |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
454 |
apply (subgoal_tac "0<r2") |
14266 | 455 |
prefer 2 apply (blast intro: order_le_less_trans) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
456 |
apply (case_tac "x=0") |
14266 | 457 |
apply (auto dest!: order_le_imp_less_or_eq |
458 |
intro: real_mult_less_mono real_mult_order) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
459 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
460 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
461 |
lemma real_inverse_less_swap: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
462 |
"[| 0 < r; r < x |] ==> inverse x < inverse (r::real)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
463 |
by (rule Ring_and_Field.less_imp_inverse_less) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
464 |
|
14288 | 465 |
lemma real_inverse_less_iff: |
466 |
"[| 0 < r; 0 < x|] ==> (inverse x < inverse (r::real)) = (r < x)" |
|
467 |
by (rule Ring_and_Field.inverse_less_iff_less) |
|
468 |
||
469 |
lemma real_inverse_le_iff: |
|
470 |
"[| 0 < r; 0 < x|] ==> (inverse x \<le> inverse r) = (r \<le> (x::real))" |
|
471 |
by (rule Ring_and_Field.inverse_le_iff_le) |
|
472 |
||
473 |
(*FIXME: remove the [iff], since the general theorem is already [simp]*) |
|
14266 | 474 |
lemma real_mult_is_0 [iff]: "(x*y = 0) = (x = 0 | y = (0::real))" |
14288 | 475 |
by (rule Ring_and_Field.mult_eq_0_iff) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
476 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
477 |
lemma real_inverse_add: "[| x \<noteq> 0; y \<noteq> 0 |] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
478 |
==> inverse x + inverse y = (x + y) * inverse (x * (y::real))" |
14288 | 479 |
by (simp add: Ring_and_Field.inverse_add mult_assoc) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
480 |
|
14288 | 481 |
text{*FIXME: delete or at least combine the next two lemmas*} |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
482 |
lemma real_sum_squares_cancel: "x * x + y * y = 0 ==> x = (0::real)" |
14270 | 483 |
apply (drule Ring_and_Field.equals_zero_I [THEN sym]) |
484 |
apply (cut_tac x = y in real_le_square) |
|
14266 | 485 |
apply (auto, drule real_le_anti_sym, auto) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
486 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
487 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
488 |
lemma real_sum_squares_cancel2: "x * x + y * y = 0 ==> y = (0::real)" |
14266 | 489 |
apply (rule_tac y = x in real_sum_squares_cancel) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
490 |
apply (simp add: real_add_commute) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
491 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
492 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
493 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
494 |
subsection{*Convenient Biconditionals for Products of Signs*} |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
495 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
496 |
lemma real_0_less_mult_iff: "((0::real) < x*y) = (0<x & 0<y | x<0 & y<0)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
497 |
by (rule Ring_and_Field.zero_less_mult_iff) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
498 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
499 |
lemma real_0_le_mult_iff: "((0::real)\<le>x*y) = (0\<le>x & 0\<le>y | x\<le>0 & y\<le>0)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
500 |
by (rule zero_le_mult_iff) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
501 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
502 |
lemma real_mult_less_0_iff: "(x*y < (0::real)) = (0<x & y<0 | x<0 & 0<y)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
503 |
by (rule mult_less_0_iff) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
504 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
505 |
lemma real_mult_le_0_iff: "(x*y \<le> (0::real)) = (0\<le>x & y\<le>0 | x\<le>0 & 0\<le>y)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
506 |
by (rule mult_le_0_iff) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
507 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
508 |
subsection{*Hardly Used Theorems to be Deleted*} |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
509 |
|
14270 | 510 |
lemma real_add_less_mono2: "!!(A::real). A < B ==> C + A < C + B" |
511 |
by simp |
|
512 |
||
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
513 |
lemma real_add_order: "[| 0 < x; 0 < y |] ==> (0::real) < x + y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
514 |
apply (erule order_less_trans) |
14270 | 515 |
apply (drule real_add_less_mono2, simp) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
516 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
517 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
518 |
lemma real_le_add_order: "[| 0 \<le> x; 0 \<le> y |] ==> (0::real) \<le> x + y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
519 |
apply (drule order_le_imp_less_or_eq)+ |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
520 |
apply (auto intro: real_add_order order_less_imp_le) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
521 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
522 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
523 |
|
14290 | 524 |
subsection{*An Embedding of the Naturals in the Reals*} |
525 |
||
526 |
lemma real_of_posnat_one: "real_of_posnat 0 = (1::real)" |
|
527 |
by (simp add: real_of_posnat_def pnat_one_iff [symmetric] |
|
528 |
real_of_preal_def symmetric real_one_def) |
|
529 |
||
530 |
lemma real_of_posnat_two: "real_of_posnat (Suc 0) = (1::real) + (1::real)" |
|
531 |
by (simp add: real_of_posnat_def real_of_preal_def real_one_def pnat_two_eq |
|
532 |
real_add |
|
533 |
prat_of_pnat_add [symmetric] preal_of_prat_add [symmetric] |
|
534 |
pnat_add_ac) |
|
535 |
||
536 |
lemma real_of_posnat_add: |
|
537 |
"real_of_posnat n1 + real_of_posnat n2 = real_of_posnat (n1 + n2) + (1::real)" |
|
538 |
apply (unfold real_of_posnat_def) |
|
539 |
apply (simp (no_asm_use) add: real_of_posnat_one [symmetric] real_of_posnat_def real_of_preal_add [symmetric] preal_of_prat_add [symmetric] prat_of_pnat_add [symmetric] pnat_of_nat_add) |
|
540 |
done |
|
541 |
||
542 |
lemma real_of_posnat_add_one: "real_of_posnat (n + 1) = real_of_posnat n + (1::real)" |
|
543 |
apply (rule_tac x1 = " (1::real) " in real_add_right_cancel [THEN iffD1]) |
|
544 |
apply (rule real_of_posnat_add [THEN subst]) |
|
545 |
apply (simp (no_asm_use) add: real_of_posnat_two real_add_assoc) |
|
546 |
done |
|
547 |
||
548 |
lemma real_of_posnat_Suc: "real_of_posnat (Suc n) = real_of_posnat n + (1::real)" |
|
549 |
by (subst real_of_posnat_add_one [symmetric], simp) |
|
550 |
||
551 |
lemma inj_real_of_posnat: "inj(real_of_posnat)" |
|
552 |
apply (rule inj_onI) |
|
553 |
apply (unfold real_of_posnat_def) |
|
554 |
apply (drule inj_real_of_preal [THEN injD]) |
|
555 |
apply (drule inj_preal_of_prat [THEN injD]) |
|
556 |
apply (drule inj_prat_of_pnat [THEN injD]) |
|
557 |
apply (erule inj_pnat_of_nat [THEN injD]) |
|
558 |
done |
|
559 |
||
560 |
lemma real_of_nat_zero [simp]: "real (0::nat) = 0" |
|
561 |
by (simp add: real_of_nat_def real_of_posnat_one) |
|
562 |
||
563 |
lemma real_of_nat_one [simp]: "real (Suc 0) = (1::real)" |
|
564 |
by (simp add: real_of_nat_def real_of_posnat_two real_add_assoc) |
|
565 |
||
566 |
lemma real_of_nat_add [simp]: |
|
567 |
"real (m + n) = real (m::nat) + real n" |
|
568 |
apply (simp add: real_of_nat_def add_ac) |
|
569 |
apply (simp add: real_of_posnat_add add_assoc [symmetric]) |
|
570 |
apply (simp add: add_commute) |
|
571 |
apply (simp add: add_assoc [symmetric]) |
|
572 |
done |
|
573 |
||
574 |
(*Not for addsimps: often the LHS is used to represent a positive natural*) |
|
575 |
lemma real_of_nat_Suc: "real (Suc n) = real n + (1::real)" |
|
576 |
by (simp add: real_of_nat_def real_of_posnat_Suc real_add_ac) |
|
577 |
||
578 |
lemma real_of_nat_less_iff [iff]: |
|
579 |
"(real (n::nat) < real m) = (n < m)" |
|
580 |
by (auto simp add: real_of_nat_def real_of_posnat_def) |
|
581 |
||
582 |
lemma real_of_nat_le_iff [iff]: "(real (n::nat) \<le> real m) = (n \<le> m)" |
|
583 |
by (simp add: linorder_not_less [symmetric]) |
|
584 |
||
585 |
lemma inj_real_of_nat: "inj (real :: nat => real)" |
|
586 |
apply (rule inj_onI) |
|
587 |
apply (auto intro!: inj_real_of_posnat [THEN injD] |
|
588 |
simp add: real_of_nat_def real_add_right_cancel) |
|
589 |
done |
|
590 |
||
591 |
lemma real_of_nat_ge_zero [iff]: "0 \<le> real (n::nat)" |
|
592 |
apply (induct_tac "n") |
|
593 |
apply (auto simp add: real_of_nat_Suc) |
|
594 |
apply (drule real_add_le_less_mono) |
|
595 |
apply (rule real_zero_less_one) |
|
596 |
apply (simp add: order_less_imp_le) |
|
597 |
done |
|
598 |
||
599 |
lemma real_of_nat_mult [simp]: "real (m * n) = real (m::nat) * real n" |
|
600 |
apply (induct_tac "m") |
|
601 |
apply (auto simp add: real_of_nat_Suc real_add_mult_distrib real_add_commute) |
|
602 |
done |
|
603 |
||
604 |
lemma real_of_nat_inject [iff]: "(real (n::nat) = real m) = (n = m)" |
|
605 |
by (auto dest: inj_real_of_nat [THEN injD]) |
|
606 |
||
607 |
lemma real_of_nat_diff [rule_format]: |
|
608 |
"n \<le> m --> real (m - n) = real (m::nat) - real n" |
|
609 |
apply (induct_tac "m") |
|
610 |
apply (simp add: ); |
|
611 |
apply (simp add: real_diff_def Suc_diff_le le_Suc_eq real_of_nat_Suc add_ac) |
|
612 |
apply (simp add: add_left_commute [of _ "- 1"]) |
|
613 |
done |
|
614 |
||
615 |
lemma real_of_nat_zero_iff: "(real (n::nat) = 0) = (n = 0)" |
|
616 |
proof |
|
617 |
assume "real n = 0" |
|
618 |
have "real n = real (0::nat)" by simp |
|
619 |
then show "n = 0" by (simp only: real_of_nat_inject) |
|
620 |
next |
|
621 |
show "n = 0 \<Longrightarrow> real n = 0" by simp |
|
622 |
qed |
|
623 |
||
624 |
lemma real_of_nat_neg_int [simp]: "neg z ==> real (nat z) = 0" |
|
625 |
by (simp add: neg_nat real_of_nat_zero) |
|
626 |
||
627 |
||
14288 | 628 |
subsection{*Results About @{term real_of_posnat}: to be Deleted*} |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
629 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
630 |
lemma real_of_posnat_gt_zero: "0 < real_of_posnat n" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
631 |
apply (unfold real_of_posnat_def) |
14270 | 632 |
apply (rule real_gt_zero_preal_Ex [THEN iffD2], blast) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
633 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
634 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
635 |
declare real_of_posnat_gt_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
636 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
637 |
lemmas real_inv_real_of_posnat_gt_zero = real_of_posnat_gt_zero [THEN real_inverse_gt_0, standard] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
638 |
declare real_inv_real_of_posnat_gt_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
639 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
640 |
lemmas real_of_posnat_ge_zero = real_of_posnat_gt_zero [THEN order_less_imp_le, standard] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
641 |
declare real_of_posnat_ge_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
642 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
643 |
lemma real_of_posnat_not_eq_zero: "real_of_posnat n ~= 0" |
14270 | 644 |
by (rule real_of_posnat_gt_zero [THEN real_not_refl2, THEN not_sym]) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
645 |
declare real_of_posnat_not_eq_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
646 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
647 |
declare real_of_posnat_not_eq_zero [THEN real_mult_inv_left, simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
648 |
declare real_of_posnat_not_eq_zero [THEN real_mult_inv_right, simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
649 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
650 |
lemma real_of_posnat_ge_one: "1 <= real_of_posnat n" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
651 |
apply (simp (no_asm) add: real_of_posnat_one [symmetric]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
652 |
apply (induct_tac "n") |
14290 | 653 |
apply (simp add: ); |
654 |
apply (simp add: real_of_posnat_Suc real_of_posnat_one order_less_imp_le) |
|
655 |
apply (rule add_le_cancel_right [THEN iffD1, of _ "- 1"]) |
|
656 |
apply (simp add: add_assoc); |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
657 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
658 |
declare real_of_posnat_ge_one [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
659 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
660 |
lemma real_of_posnat_real_inv_not_zero: "inverse(real_of_posnat n) ~= 0" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
661 |
apply (rule real_inverse_not_zero) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
662 |
apply (rule real_of_posnat_gt_zero [THEN real_not_refl2, THEN not_sym]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
663 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
664 |
declare real_of_posnat_real_inv_not_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
665 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
666 |
lemma real_of_posnat_real_inv_inj: "inverse(real_of_posnat x) = inverse(real_of_posnat y) ==> x = y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
667 |
apply (rule inj_real_of_posnat [THEN injD]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
668 |
apply (rule real_of_posnat_real_inv_not_zero |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
669 |
[THEN real_mult_left_cancel, THEN iffD1, of x]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
670 |
apply (simp add: real_mult_inv_left |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
671 |
real_of_posnat_gt_zero [THEN real_not_refl2, THEN not_sym]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
672 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
673 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
674 |
lemma real_mult_less_self: "0 < r ==> r*(1 + -inverse(real_of_posnat n)) < r" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
675 |
apply (simp (no_asm) add: real_add_mult_distrib2) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
676 |
apply (rule_tac C = "-r" in real_less_add_left_cancel) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
677 |
apply (auto intro: real_mult_order simp add: real_add_assoc [symmetric] real_minus_zero_less_iff2) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
678 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
679 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
680 |
lemma real_of_posnat_inv_Ex_iff: "(EX n. inverse(real_of_posnat n) < r) = (EX n. 1 < r * real_of_posnat n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
681 |
apply safe |
14270 | 682 |
apply (drule_tac n1 = n in real_of_posnat_gt_zero [THEN real_mult_less_mono1]) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
683 |
apply (drule_tac [2] n2=n in real_of_posnat_gt_zero [THEN real_inverse_gt_0, THEN real_mult_less_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
684 |
apply (auto simp add: real_of_posnat_gt_zero [THEN real_not_refl2, THEN not_sym] real_mult_assoc) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
685 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
686 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
687 |
lemma real_of_posnat_inv_iff: "(inverse(real_of_posnat n) < r) = (1 < r * real_of_posnat n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
688 |
apply safe |
14270 | 689 |
apply (drule_tac n1 = n in real_of_posnat_gt_zero [THEN real_mult_less_mono1]) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
690 |
apply (drule_tac [2] n2=n in real_of_posnat_gt_zero [THEN real_inverse_gt_0, THEN real_mult_less_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
691 |
apply (auto simp add: real_mult_assoc) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
692 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
693 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
694 |
lemma real_mult_le_le_mono1: "[| (0::real) <=z; x<=y |] ==> z*x<=z*y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
695 |
by (rule Ring_and_Field.mult_left_mono) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
696 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
697 |
lemma real_mult_le_le_mono2: "[| (0::real)<=z; x<=y |] ==> x*z<=y*z" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
698 |
by (rule Ring_and_Field.mult_right_mono) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
699 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
700 |
lemma real_of_posnat_inv_le_iff: "(inverse(real_of_posnat n) <= r) = (1 <= r * real_of_posnat n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
701 |
apply safe |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
702 |
apply (drule_tac n2=n in real_of_posnat_gt_zero [THEN order_less_imp_le, THEN real_mult_le_le_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
703 |
apply (drule_tac [2] n3=n in real_of_posnat_gt_zero [THEN real_inverse_gt_0, THEN order_less_imp_le, THEN real_mult_le_le_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
704 |
apply (auto simp add: real_mult_ac) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
705 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
706 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
707 |
lemma real_of_posnat_less_iff: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
708 |
"(real_of_posnat n < real_of_posnat m) = (n < m)" |
14270 | 709 |
apply (unfold real_of_posnat_def, auto) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
710 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
711 |
declare real_of_posnat_less_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
712 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
713 |
lemma real_of_posnat_le_iff: "(real_of_posnat n <= real_of_posnat m) = (n <= m)" |
14270 | 714 |
by (auto dest: inj_real_of_posnat [THEN injD] simp add: real_le_less le_eq_less_or_eq) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
715 |
declare real_of_posnat_le_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
716 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
717 |
lemma real_mult_less_cancel3: "[| (0::real)<z; x*z<y*z |] ==> x<y" |
14270 | 718 |
by auto |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
719 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
720 |
lemma real_mult_less_cancel4: "[| (0::real)<z; z*x<z*y |] ==> x<y" |
14288 | 721 |
by (force elim: order_less_asym |
722 |
simp add: Ring_and_Field.mult_less_cancel_left) |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
723 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
724 |
lemma real_of_posnat_less_inv_iff: "0 < u ==> (u < inverse (real_of_posnat n)) = (real_of_posnat n < inverse(u))" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
725 |
apply safe |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
726 |
apply (rule_tac n2=n in real_of_posnat_gt_zero [THEN real_inverse_gt_0, THEN real_mult_less_cancel3]) |
14270 | 727 |
apply (rule_tac [2] x1 = u in real_inverse_gt_0 [THEN real_mult_less_cancel3]) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
728 |
apply (auto simp add: real_not_refl2 [THEN not_sym]) |
14270 | 729 |
apply (rule_tac z = u in real_mult_less_cancel4) |
730 |
apply (rule_tac [3] n1 = n in real_of_posnat_gt_zero [THEN real_mult_less_cancel4]) |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
731 |
apply (auto simp add: real_not_refl2 [THEN not_sym] real_mult_assoc [symmetric]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
732 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
733 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
734 |
lemma real_of_posnat_inv_eq_iff: "0 < u ==> (u = inverse(real_of_posnat n)) = (real_of_posnat n = inverse u)" |
14270 | 735 |
by auto |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
736 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
737 |
lemma real_add_one_minus_inv_ge_zero: "0 <= 1 + -inverse(real_of_posnat n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
738 |
apply (rule_tac C = "inverse (real_of_posnat n) " in real_le_add_right_cancel) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
739 |
apply (simp (no_asm) add: real_add_assoc real_of_posnat_inv_le_iff) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
740 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
741 |
|
14288 | 742 |
(*Used just below and in HahnBanach/Aux.thy*) |
743 |
lemma real_mult_le_less_mono1: "[| (0::real) \<le> z; x < y |] ==> x*z \<le> y*z" |
|
744 |
apply (rule real_less_or_eq_imp_le) |
|
745 |
apply (drule order_le_imp_less_or_eq) |
|
746 |
apply (auto intro: real_mult_less_mono1) |
|
747 |
done |
|
748 |
||
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
749 |
lemma real_mult_add_one_minus_ge_zero: "0 < r ==> 0 <= r*(1 + -inverse(real_of_posnat n))" |
14270 | 750 |
by (drule real_add_one_minus_inv_ge_zero [THEN real_mult_le_less_mono1], auto) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
751 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
752 |
lemma real_inverse_unique: "x*y = (1::real) ==> y = inverse x" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
753 |
apply (case_tac "x ~= 0") |
14270 | 754 |
apply (rule_tac c1 = x in real_mult_left_cancel [THEN iffD1], auto) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
755 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
756 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
757 |
lemma real_inverse_gt_one: "[| (0::real) < x; x < 1 |] ==> 1 < inverse x" |
14270 | 758 |
by (auto dest: real_inverse_less_swap) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
759 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
760 |
lemma real_of_nat_gt_zero_cancel_iff: "(0 < real (n::nat)) = (0 < n)" |
14270 | 761 |
by (rule real_of_nat_less_iff [THEN subst], auto) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
762 |
declare real_of_nat_gt_zero_cancel_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
763 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
764 |
lemma real_of_nat_le_zero_cancel_iff: "(real (n::nat) <= 0) = (n = 0)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
765 |
apply (rule real_of_nat_zero [THEN subst]) |
14270 | 766 |
apply (subst real_of_nat_le_iff, auto) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
767 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
768 |
declare real_of_nat_le_zero_cancel_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
769 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
770 |
lemma not_real_of_nat_less_zero: "~ real (n::nat) < 0" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
771 |
apply (simp (no_asm) add: real_le_def [symmetric] real_of_nat_ge_zero) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
772 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
773 |
declare not_real_of_nat_less_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
774 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
775 |
lemma real_of_nat_ge_zero_cancel_iff: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
776 |
"(0 <= real (n::nat)) = (0 <= n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
777 |
apply (unfold real_le_def le_def) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
778 |
apply (simp (no_asm)) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
779 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
780 |
declare real_of_nat_ge_zero_cancel_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
781 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
782 |
lemma real_of_nat_num_if: "real n = (if n=0 then 0 else 1 + real ((n::nat) - 1))" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
783 |
apply (case_tac "n") |
14290 | 784 |
apply (simp add: ); |
785 |
apply (simp add: real_of_nat_Suc add_commute) |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
786 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
787 |
|
14290 | 788 |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
789 |
ML |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
790 |
{* |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
791 |
val real_abs_def = thm "real_abs_def"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
792 |
|
14270 | 793 |
val real_less_eq_diff = thm "real_less_eq_diff"; |
794 |
||
795 |
val real_add_right_cancel = thm"real_add_right_cancel"; |
|
796 |
val real_mult_congruent2_lemma = thm"real_mult_congruent2_lemma"; |
|
797 |
val real_mult_congruent2 = thm"real_mult_congruent2"; |
|
798 |
val real_mult = thm"real_mult"; |
|
799 |
val real_mult_commute = thm"real_mult_commute"; |
|
800 |
val real_mult_assoc = thm"real_mult_assoc"; |
|
801 |
val real_mult_left_commute = thm"real_mult_left_commute"; |
|
802 |
val real_mult_1 = thm"real_mult_1"; |
|
803 |
val real_mult_1_right = thm"real_mult_1_right"; |
|
804 |
val real_mult_0 = thm"real_mult_0"; |
|
805 |
val real_mult_0_right = thm"real_mult_0_right"; |
|
806 |
val real_mult_minus_eq1 = thm"real_mult_minus_eq1"; |
|
807 |
val real_minus_mult_eq1 = thm"real_minus_mult_eq1"; |
|
808 |
val real_mult_minus_eq2 = thm"real_mult_minus_eq2"; |
|
809 |
val real_minus_mult_eq2 = thm"real_minus_mult_eq2"; |
|
810 |
val real_mult_minus_1 = thm"real_mult_minus_1"; |
|
811 |
val real_mult_minus_1_right = thm"real_mult_minus_1_right"; |
|
812 |
val real_minus_mult_cancel = thm"real_minus_mult_cancel"; |
|
813 |
val real_minus_mult_commute = thm"real_minus_mult_commute"; |
|
814 |
val real_add_assoc_cong = thm"real_add_assoc_cong"; |
|
815 |
val real_add_mult_distrib = thm"real_add_mult_distrib"; |
|
816 |
val real_add_mult_distrib2 = thm"real_add_mult_distrib2"; |
|
817 |
val real_diff_mult_distrib = thm"real_diff_mult_distrib"; |
|
818 |
val real_diff_mult_distrib2 = thm"real_diff_mult_distrib2"; |
|
819 |
val real_zero_not_eq_one = thm"real_zero_not_eq_one"; |
|
820 |
val real_zero_iff = thm"real_zero_iff"; |
|
821 |
val preal_le_linear = thm"preal_le_linear"; |
|
822 |
val real_mult_inv_right_ex = thm"real_mult_inv_right_ex"; |
|
823 |
val real_mult_inv_left_ex = thm"real_mult_inv_left_ex"; |
|
824 |
val real_mult_inv_left = thm"real_mult_inv_left"; |
|
825 |
val real_mult_inv_right = thm"real_mult_inv_right"; |
|
826 |
val preal_lemma_eq_rev_sum = thm"preal_lemma_eq_rev_sum"; |
|
827 |
val preal_add_left_commute_cancel = thm"preal_add_left_commute_cancel"; |
|
828 |
val preal_lemma_for_not_refl = thm"preal_lemma_for_not_refl"; |
|
829 |
val real_less_not_refl = thm"real_less_not_refl"; |
|
830 |
val real_less_irrefl = thm"real_less_irrefl"; |
|
831 |
val real_not_refl2 = thm"real_not_refl2"; |
|
832 |
val preal_lemma_trans = thm"preal_lemma_trans"; |
|
833 |
val real_less_trans = thm"real_less_trans"; |
|
834 |
val real_less_not_sym = thm"real_less_not_sym"; |
|
835 |
val real_less_asym = thm"real_less_asym"; |
|
836 |
val real_of_preal_add = thm"real_of_preal_add"; |
|
837 |
val real_of_preal_mult = thm"real_of_preal_mult"; |
|
838 |
val real_of_preal_ExI = thm"real_of_preal_ExI"; |
|
839 |
val real_of_preal_ExD = thm"real_of_preal_ExD"; |
|
840 |
val real_of_preal_iff = thm"real_of_preal_iff"; |
|
841 |
val real_of_preal_trichotomy = thm"real_of_preal_trichotomy"; |
|
842 |
val real_of_preal_trichotomyE = thm"real_of_preal_trichotomyE"; |
|
843 |
val real_of_preal_lessD = thm"real_of_preal_lessD"; |
|
844 |
val real_of_preal_lessI = thm"real_of_preal_lessI"; |
|
845 |
val real_of_preal_less_iff1 = thm"real_of_preal_less_iff1"; |
|
846 |
val real_of_preal_minus_less_self = thm"real_of_preal_minus_less_self"; |
|
847 |
val real_of_preal_minus_less_zero = thm"real_of_preal_minus_less_zero"; |
|
848 |
val real_of_preal_not_minus_gt_zero = thm"real_of_preal_not_minus_gt_zero"; |
|
849 |
val real_of_preal_zero_less = thm"real_of_preal_zero_less"; |
|
850 |
val real_of_preal_not_less_zero = thm"real_of_preal_not_less_zero"; |
|
851 |
val real_minus_minus_zero_less = thm"real_minus_minus_zero_less"; |
|
852 |
val real_of_preal_sum_zero_less = thm"real_of_preal_sum_zero_less"; |
|
853 |
val real_of_preal_minus_less_all = thm"real_of_preal_minus_less_all"; |
|
854 |
val real_of_preal_not_minus_gt_all = thm"real_of_preal_not_minus_gt_all"; |
|
855 |
val real_of_preal_minus_less_rev1 = thm"real_of_preal_minus_less_rev1"; |
|
856 |
val real_of_preal_minus_less_rev2 = thm"real_of_preal_minus_less_rev2"; |
|
857 |
val real_of_preal_minus_less_rev_iff = thm"real_of_preal_minus_less_rev_iff"; |
|
858 |
val real_linear = thm"real_linear"; |
|
859 |
val real_neq_iff = thm"real_neq_iff"; |
|
860 |
val real_linear_less2 = thm"real_linear_less2"; |
|
861 |
val real_leI = thm"real_leI"; |
|
862 |
val real_leD = thm"real_leD"; |
|
863 |
val real_leE = thm"real_leE"; |
|
864 |
val real_less_le_iff = thm"real_less_le_iff"; |
|
865 |
val not_real_leE = thm"not_real_leE"; |
|
866 |
val real_le_imp_less_or_eq = thm"real_le_imp_less_or_eq"; |
|
867 |
val real_less_or_eq_imp_le = thm"real_less_or_eq_imp_le"; |
|
868 |
val real_le_less = thm"real_le_less"; |
|
869 |
val real_le_refl = thm"real_le_refl"; |
|
870 |
val real_le_linear = thm"real_le_linear"; |
|
871 |
val real_le_trans = thm"real_le_trans"; |
|
872 |
val real_le_anti_sym = thm"real_le_anti_sym"; |
|
873 |
val real_less_le = thm"real_less_le"; |
|
874 |
val real_minus_zero_less_iff = thm"real_minus_zero_less_iff"; |
|
875 |
val real_minus_zero_less_iff2 = thm"real_minus_zero_less_iff2"; |
|
876 |
val real_less_add_positive_left_Ex = thm"real_less_add_positive_left_Ex"; |
|
877 |
val real_less_sum_gt_zero = thm"real_less_sum_gt_zero"; |
|
878 |
val real_sum_gt_zero_less = thm"real_sum_gt_zero_less"; |
|
879 |
val real_less_sum_gt_0_iff = thm"real_less_sum_gt_0_iff"; |
|
880 |
||
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
881 |
val real_gt_zero_preal_Ex = thm "real_gt_zero_preal_Ex"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
882 |
val real_gt_preal_preal_Ex = thm "real_gt_preal_preal_Ex"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
883 |
val real_ge_preal_preal_Ex = thm "real_ge_preal_preal_Ex"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
884 |
val real_less_all_preal = thm "real_less_all_preal"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
885 |
val real_less_all_real2 = thm "real_less_all_real2"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
886 |
val real_of_preal_le_iff = thm "real_of_preal_le_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
887 |
val real_mult_order = thm "real_mult_order"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
888 |
val real_zero_less_one = thm "real_zero_less_one"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
889 |
val real_add_right_cancel_less = thm "real_add_right_cancel_less"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
890 |
val real_add_left_cancel_less = thm "real_add_left_cancel_less"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
891 |
val real_add_right_cancel_le = thm "real_add_right_cancel_le"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
892 |
val real_add_left_cancel_le = thm "real_add_left_cancel_le"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
893 |
val real_add_less_mono1 = thm "real_add_less_mono1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
894 |
val real_add_le_mono1 = thm "real_add_le_mono1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
895 |
val real_add_less_le_mono = thm "real_add_less_le_mono"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
896 |
val real_add_le_less_mono = thm "real_add_le_less_mono"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
897 |
val real_add_less_mono2 = thm "real_add_less_mono2"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
898 |
val real_less_add_right_cancel = thm "real_less_add_right_cancel"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
899 |
val real_less_add_left_cancel = thm "real_less_add_left_cancel"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
900 |
val real_le_add_right_cancel = thm "real_le_add_right_cancel"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
901 |
val real_le_add_left_cancel = thm "real_le_add_left_cancel"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
902 |
val real_add_order = thm "real_add_order"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
903 |
val real_le_add_order = thm "real_le_add_order"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
904 |
val real_add_less_mono = thm "real_add_less_mono"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
905 |
val real_add_le_mono = thm "real_add_le_mono"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
906 |
val real_le_minus_iff = thm "real_le_minus_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
907 |
val real_le_square = thm "real_le_square"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
908 |
val real_mult_less_mono1 = thm "real_mult_less_mono1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
909 |
val real_mult_less_mono2 = thm "real_mult_less_mono2"; |
14290 | 910 |
|
911 |
val real_inverse_gt_0 = thm "real_inverse_gt_0"; |
|
912 |
val real_inverse_less_0 = thm "real_inverse_less_0"; |
|
913 |
val real_mult_less_iff1 = thm "real_mult_less_iff1"; |
|
914 |
val real_mult_le_cancel_iff1 = thm "real_mult_le_cancel_iff1"; |
|
915 |
val real_mult_le_cancel_iff2 = thm "real_mult_le_cancel_iff2"; |
|
916 |
val real_mult_less_mono = thm "real_mult_less_mono"; |
|
917 |
val real_mult_less_mono' = thm "real_mult_less_mono'"; |
|
918 |
val real_inverse_less_swap = thm "real_inverse_less_swap"; |
|
919 |
val real_mult_is_0 = thm "real_mult_is_0"; |
|
920 |
val real_inverse_add = thm "real_inverse_add"; |
|
921 |
val real_sum_squares_cancel = thm "real_sum_squares_cancel"; |
|
922 |
val real_sum_squares_cancel2 = thm "real_sum_squares_cancel2"; |
|
923 |
val real_0_less_mult_iff = thm "real_0_less_mult_iff"; |
|
924 |
val real_0_le_mult_iff = thm "real_0_le_mult_iff"; |
|
925 |
val real_mult_less_0_iff = thm "real_mult_less_0_iff"; |
|
926 |
val real_mult_le_0_iff = thm "real_mult_le_0_iff"; |
|
927 |
||
928 |
val INVERSE_ZERO = thm"INVERSE_ZERO"; |
|
929 |
val DIVISION_BY_ZERO = thm"DIVISION_BY_ZERO"; |
|
930 |
val real_mult_left_cancel = thm"real_mult_left_cancel"; |
|
931 |
val real_mult_right_cancel = thm"real_mult_right_cancel"; |
|
932 |
val real_mult_left_cancel_ccontr = thm"real_mult_left_cancel_ccontr"; |
|
933 |
val real_mult_right_cancel_ccontr = thm"real_mult_right_cancel_ccontr"; |
|
934 |
val real_inverse_not_zero = thm"real_inverse_not_zero"; |
|
935 |
val real_mult_not_zero = thm"real_mult_not_zero"; |
|
936 |
val real_inverse_inverse = thm"real_inverse_inverse"; |
|
937 |
val real_inverse_1 = thm"real_inverse_1"; |
|
938 |
val real_minus_inverse = thm"real_minus_inverse"; |
|
939 |
val real_inverse_distrib = thm"real_inverse_distrib"; |
|
940 |
val real_minus_divide_eq = thm"real_minus_divide_eq"; |
|
941 |
val real_divide_minus_eq = thm"real_divide_minus_eq"; |
|
942 |
val real_add_divide_distrib = thm"real_add_divide_distrib"; |
|
943 |
||
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
944 |
val real_of_posnat_one = thm "real_of_posnat_one"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
945 |
val real_of_posnat_two = thm "real_of_posnat_two"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
946 |
val real_of_posnat_add = thm "real_of_posnat_add"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
947 |
val real_of_posnat_add_one = thm "real_of_posnat_add_one"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
948 |
val real_of_posnat_Suc = thm "real_of_posnat_Suc"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
949 |
val inj_real_of_posnat = thm "inj_real_of_posnat"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
950 |
val real_of_nat_zero = thm "real_of_nat_zero"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
951 |
val real_of_nat_one = thm "real_of_nat_one"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
952 |
val real_of_nat_add = thm "real_of_nat_add"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
953 |
val real_of_nat_Suc = thm "real_of_nat_Suc"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
954 |
val real_of_nat_less_iff = thm "real_of_nat_less_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
955 |
val real_of_nat_le_iff = thm "real_of_nat_le_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
956 |
val inj_real_of_nat = thm "inj_real_of_nat"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
957 |
val real_of_nat_ge_zero = thm "real_of_nat_ge_zero"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
958 |
val real_of_nat_mult = thm "real_of_nat_mult"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
959 |
val real_of_nat_inject = thm "real_of_nat_inject"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
960 |
val real_of_nat_diff = thm "real_of_nat_diff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
961 |
val real_of_nat_zero_iff = thm "real_of_nat_zero_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
962 |
val real_of_nat_neg_int = thm "real_of_nat_neg_int"; |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
963 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
964 |
val real_of_posnat_gt_zero = thm "real_of_posnat_gt_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
965 |
val real_inv_real_of_posnat_gt_zero = thm "real_inv_real_of_posnat_gt_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
966 |
val real_of_posnat_ge_zero = thm "real_of_posnat_ge_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
967 |
val real_of_posnat_not_eq_zero = thm "real_of_posnat_not_eq_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
968 |
val real_of_posnat_ge_one = thm "real_of_posnat_ge_one"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
969 |
val real_of_posnat_real_inv_not_zero = thm "real_of_posnat_real_inv_not_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
970 |
val real_of_posnat_real_inv_inj = thm "real_of_posnat_real_inv_inj"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
971 |
val real_mult_less_self = thm "real_mult_less_self"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
972 |
val real_of_posnat_inv_Ex_iff = thm "real_of_posnat_inv_Ex_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
973 |
val real_of_posnat_inv_iff = thm "real_of_posnat_inv_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
974 |
val real_mult_le_le_mono1 = thm "real_mult_le_le_mono1"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
975 |
val real_mult_le_le_mono2 = thm "real_mult_le_le_mono2"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
976 |
val real_of_posnat_inv_le_iff = thm "real_of_posnat_inv_le_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
977 |
val real_of_posnat_less_iff = thm "real_of_posnat_less_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
978 |
val real_of_posnat_le_iff = thm "real_of_posnat_le_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
979 |
val real_of_posnat_less_inv_iff = thm "real_of_posnat_less_inv_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
980 |
val real_of_posnat_inv_eq_iff = thm "real_of_posnat_inv_eq_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
981 |
val real_add_one_minus_inv_ge_zero = thm "real_add_one_minus_inv_ge_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
982 |
val real_mult_add_one_minus_ge_zero = thm "real_mult_add_one_minus_ge_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
983 |
val real_inverse_unique = thm "real_inverse_unique"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
984 |
val real_inverse_gt_one = thm "real_inverse_gt_one"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
985 |
val real_of_nat_gt_zero_cancel_iff = thm "real_of_nat_gt_zero_cancel_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
986 |
val real_of_nat_le_zero_cancel_iff = thm "real_of_nat_le_zero_cancel_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
987 |
val not_real_of_nat_less_zero = thm "not_real_of_nat_less_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
988 |
val real_of_nat_ge_zero_cancel_iff = thm "real_of_nat_ge_zero_cancel_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
989 |
val real_of_nat_num_if = thm "real_of_nat_num_if"; |
14269 | 990 |
|
14290 | 991 |
val real_minus_add_distrib = thm"real_minus_add_distrib"; |
992 |
val real_add_left_cancel = thm"real_add_left_cancel"; |
|
993 |
val real_add_minus_cancel = thm"real_add_minus_cancel"; |
|
994 |
val real_minus_add_cancel = thm"real_minus_add_cancel"; |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
995 |
*} |
9043
ca761fe227d8
First round of changes, towards installation of simprocs
paulson
parents:
9013
diff
changeset
|
996 |
|
7334 | 997 |
end |