author | haftmann |
Tue, 25 Jul 2006 16:51:26 +0200 | |
changeset 20192 | 956cd30ef3be |
parent 19931 | fb32b43e7f80 |
child 20245 | 54db3583354f |
permissions | -rw-r--r-- |
10751 | 1 |
(* Title : HOL/Real/Hyperreal/HyperDef.thy |
2 |
ID : $Id$ |
|
3 |
Author : Jacques D. Fleuriot |
|
4 |
Copyright : 1998 University of Cambridge |
|
14468 | 5 |
Conversion to Isar and new proofs by Lawrence C Paulson, 2004 |
13487 | 6 |
*) |
10751 | 7 |
|
14468 | 8 |
header{*Construction of Hyperreals Using Ultrafilters*} |
9 |
||
15131 | 10 |
theory HyperDef |
17298 | 11 |
imports StarClasses "../Real/Real" |
16417 | 12 |
uses ("fuf.ML") (*Warning: file fuf.ML refers to the name Hyperdef!*) |
15131 | 13 |
begin |
10751 | 14 |
|
17298 | 15 |
types hypreal = "real star" |
14299 | 16 |
|
19380 | 17 |
abbreviation |
18 |
hypreal_of_real :: "real => real star" |
|
19 |
"hypreal_of_real == star_of" |
|
10751 | 20 |
|
19765 | 21 |
definition |
14691 | 22 |
omega :: hypreal -- {*an infinite number @{text "= [<1,2,3,...>]"} *} |
19765 | 23 |
"omega = star_n (%n. real (Suc n))" |
13487 | 24 |
|
14691 | 25 |
epsilon :: hypreal -- {*an infinitesimal number @{text "= [<1,1/2,1/3,...>]"} *} |
19765 | 26 |
"epsilon = star_n (%n. inverse (real (Suc n)))" |
10919
144ede948e58
renamings: real_of_nat, real_of_int -> (overloaded) real
paulson
parents:
10834
diff
changeset
|
27 |
|
19765 | 28 |
const_syntax (xsymbols) |
29 |
omega ("\<omega>") |
|
30 |
epsilon ("\<epsilon>") |
|
10919
144ede948e58
renamings: real_of_nat, real_of_int -> (overloaded) real
paulson
parents:
10834
diff
changeset
|
31 |
|
19765 | 32 |
const_syntax (HTML output) |
33 |
omega ("\<omega>") |
|
34 |
epsilon ("\<epsilon>") |
|
14565 | 35 |
|
14329 | 36 |
|
37 |
subsection{*Existence of Free Ultrafilter over the Naturals*} |
|
38 |
||
39 |
text{*Also, proof of various properties of @{term FreeUltrafilterNat}: |
|
40 |
an arbitrary free ultrafilter*} |
|
14299 | 41 |
|
17290 | 42 |
lemma FreeUltrafilterNat_Ex: "\<exists>U::nat set set. freeultrafilter U" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
43 |
by (rule nat_infinite [THEN freeultrafilter_Ex]) |
14299 | 44 |
|
17298 | 45 |
lemma FreeUltrafilterNat_mem: "freeultrafilter FreeUltrafilterNat" |
14299 | 46 |
apply (unfold FreeUltrafilterNat_def) |
17290 | 47 |
apply (rule someI_ex) |
48 |
apply (rule FreeUltrafilterNat_Ex) |
|
14299 | 49 |
done |
50 |
||
17290 | 51 |
lemma UltrafilterNat_mem: "ultrafilter FreeUltrafilterNat" |
52 |
by (rule FreeUltrafilterNat_mem [THEN freeultrafilter.ultrafilter]) |
|
53 |
||
54 |
lemma FilterNat_mem: "filter FreeUltrafilterNat" |
|
55 |
by (rule FreeUltrafilterNat_mem [THEN freeultrafilter.filter]) |
|
56 |
||
14299 | 57 |
lemma FreeUltrafilterNat_finite: "finite x ==> x \<notin> FreeUltrafilterNat" |
17290 | 58 |
by (rule FreeUltrafilterNat_mem [THEN freeultrafilter.finite]) |
14299 | 59 |
|
14705 | 60 |
lemma FreeUltrafilterNat_not_finite: "x \<in> FreeUltrafilterNat ==> ~ finite x" |
19931
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
ballarin
parents:
19765
diff
changeset
|
61 |
thm FreeUltrafilterNat_mem |
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
ballarin
parents:
19765
diff
changeset
|
62 |
thm freeultrafilter.infinite |
fb32b43e7f80
Restructured locales with predicates: import is now an interpretation.
ballarin
parents:
19765
diff
changeset
|
63 |
thm FreeUltrafilterNat_mem [THEN freeultrafilter.infinite] |
17290 | 64 |
by (rule FreeUltrafilterNat_mem [THEN freeultrafilter.infinite]) |
14299 | 65 |
|
14301 | 66 |
lemma FreeUltrafilterNat_empty [simp]: "{} \<notin> FreeUltrafilterNat" |
17290 | 67 |
by (rule FilterNat_mem [THEN filter.empty]) |
14299 | 68 |
|
14329 | 69 |
lemma FreeUltrafilterNat_Int: |
14705 | 70 |
"[| X \<in> FreeUltrafilterNat; Y \<in> FreeUltrafilterNat |] |
14299 | 71 |
==> X Int Y \<in> FreeUltrafilterNat" |
17290 | 72 |
by (rule FilterNat_mem [THEN filter.Int]) |
14299 | 73 |
|
14329 | 74 |
lemma FreeUltrafilterNat_subset: |
14705 | 75 |
"[| X \<in> FreeUltrafilterNat; X \<subseteq> Y |] |
14299 | 76 |
==> Y \<in> FreeUltrafilterNat" |
17290 | 77 |
by (rule FilterNat_mem [THEN filter.subset]) |
14299 | 78 |
|
14329 | 79 |
lemma FreeUltrafilterNat_Compl: |
14705 | 80 |
"X \<in> FreeUltrafilterNat ==> -X \<notin> FreeUltrafilterNat" |
17290 | 81 |
apply (erule contrapos_pn) |
82 |
apply (erule UltrafilterNat_mem [THEN ultrafilter.not_mem_iff, THEN iffD2]) |
|
83 |
done |
|
14299 | 84 |
|
14329 | 85 |
lemma FreeUltrafilterNat_Compl_mem: |
86 |
"X\<notin> FreeUltrafilterNat ==> -X \<in> FreeUltrafilterNat" |
|
17290 | 87 |
by (rule UltrafilterNat_mem [THEN ultrafilter.not_mem_iff, THEN iffD1]) |
14299 | 88 |
|
14329 | 89 |
lemma FreeUltrafilterNat_Compl_iff1: |
14705 | 90 |
"(X \<notin> FreeUltrafilterNat) = (-X \<in> FreeUltrafilterNat)" |
17290 | 91 |
by (rule UltrafilterNat_mem [THEN ultrafilter.not_mem_iff]) |
14299 | 92 |
|
14329 | 93 |
lemma FreeUltrafilterNat_Compl_iff2: |
14705 | 94 |
"(X \<in> FreeUltrafilterNat) = (-X \<notin> FreeUltrafilterNat)" |
14301 | 95 |
by (auto simp add: FreeUltrafilterNat_Compl_iff1 [symmetric]) |
14299 | 96 |
|
14378
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
97 |
lemma cofinite_mem_FreeUltrafilterNat: "finite (-X) ==> X \<in> FreeUltrafilterNat" |
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
98 |
apply (drule FreeUltrafilterNat_finite) |
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
99 |
apply (simp add: FreeUltrafilterNat_Compl_iff2 [symmetric]) |
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
100 |
done |
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
101 |
|
15539 | 102 |
lemma FreeUltrafilterNat_UNIV [iff]: "UNIV \<in> FreeUltrafilterNat" |
17290 | 103 |
by (rule FilterNat_mem [THEN filter.UNIV]) |
14299 | 104 |
|
14329 | 105 |
lemma FreeUltrafilterNat_Nat_set_refl [intro]: |
106 |
"{n. P(n) = P(n)} \<in> FreeUltrafilterNat" |
|
14301 | 107 |
by simp |
14299 | 108 |
|
109 |
lemma FreeUltrafilterNat_P: "{n::nat. P} \<in> FreeUltrafilterNat ==> P" |
|
14301 | 110 |
by (rule ccontr, simp) |
14299 | 111 |
|
112 |
lemma FreeUltrafilterNat_Ex_P: "{n. P(n)} \<in> FreeUltrafilterNat ==> \<exists>n. P(n)" |
|
14301 | 113 |
by (rule ccontr, simp) |
14299 | 114 |
|
115 |
lemma FreeUltrafilterNat_all: "\<forall>n. P(n) ==> {n. P(n)} \<in> FreeUltrafilterNat" |
|
15539 | 116 |
by (auto) |
14299 | 117 |
|
14329 | 118 |
|
119 |
text{*Define and use Ultrafilter tactics*} |
|
14299 | 120 |
use "fuf.ML" |
121 |
||
122 |
method_setup fuf = {* |
|
123 |
Method.ctxt_args (fn ctxt => |
|
124 |
Method.METHOD (fn facts => |
|
15032 | 125 |
fuf_tac (local_clasimpset_of ctxt) 1)) *} |
14299 | 126 |
"free ultrafilter tactic" |
127 |
||
128 |
method_setup ultra = {* |
|
129 |
Method.ctxt_args (fn ctxt => |
|
130 |
Method.METHOD (fn facts => |
|
15032 | 131 |
ultra_tac (local_clasimpset_of ctxt) 1)) *} |
14299 | 132 |
"ultrafilter tactic" |
133 |
||
134 |
||
14329 | 135 |
text{*One further property of our free ultrafilter*} |
136 |
lemma FreeUltrafilterNat_Un: |
|
14705 | 137 |
"X Un Y \<in> FreeUltrafilterNat |
138 |
==> X \<in> FreeUltrafilterNat | Y \<in> FreeUltrafilterNat" |
|
139 |
by (auto, ultra) |
|
14299 | 140 |
|
141 |
||
17298 | 142 |
subsection{*Properties of @{term starrel}*} |
14329 | 143 |
|
17298 | 144 |
text{*Proving that @{term starrel} is an equivalence relation*} |
14299 | 145 |
|
17298 | 146 |
lemma starrel_iff: "((X,Y) \<in> starrel) = ({n. X n = Y n} \<in> FreeUltrafilterNat)" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
147 |
by (rule StarDef.starrel_iff) |
14299 | 148 |
|
17298 | 149 |
lemma starrel_refl: "(x,x) \<in> starrel" |
150 |
by (simp add: starrel_def) |
|
14299 | 151 |
|
17298 | 152 |
lemma starrel_sym [rule_format (no_asm)]: "(x,y) \<in> starrel --> (y,x) \<in> starrel" |
153 |
by (simp add: starrel_def eq_commute) |
|
14299 | 154 |
|
17298 | 155 |
lemma starrel_trans: |
156 |
"[|(x,y) \<in> starrel; (y,z) \<in> starrel|] ==> (x,z) \<in> starrel" |
|
157 |
by (simp add: starrel_def, ultra) |
|
14299 | 158 |
|
17298 | 159 |
lemma equiv_starrel: "equiv UNIV starrel" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
160 |
by (rule StarDef.equiv_starrel) |
14299 | 161 |
|
17298 | 162 |
(* (starrel `` {x} = starrel `` {y}) = ((x,y) \<in> starrel) *) |
163 |
lemmas equiv_starrel_iff = |
|
164 |
eq_equiv_class_iff [OF equiv_starrel UNIV_I UNIV_I, simp] |
|
14299 | 165 |
|
17298 | 166 |
lemma starrel_in_hypreal [simp]: "starrel``{x}:star" |
167 |
by (simp add: star_def starrel_def quotient_def, blast) |
|
14299 | 168 |
|
17298 | 169 |
declare Abs_star_inject [simp] Abs_star_inverse [simp] |
170 |
declare equiv_starrel [THEN eq_equiv_class_iff, simp] |
|
14299 | 171 |
|
17298 | 172 |
lemmas eq_starrelD = eq_equiv_class [OF _ equiv_starrel] |
14299 | 173 |
|
17298 | 174 |
lemma lemma_starrel_refl [simp]: "x \<in> starrel `` {x}" |
175 |
by (simp add: starrel_def) |
|
14299 | 176 |
|
17298 | 177 |
lemma hypreal_empty_not_mem [simp]: "{} \<notin> star" |
178 |
apply (simp add: star_def) |
|
14299 | 179 |
apply (auto elim!: quotientE equalityCE) |
180 |
done |
|
181 |
||
17298 | 182 |
lemma Rep_hypreal_nonempty [simp]: "Rep_star x \<noteq> {}" |
183 |
by (insert Rep_star [of x], auto) |
|
14299 | 184 |
|
14329 | 185 |
subsection{*@{term hypreal_of_real}: |
186 |
the Injection from @{typ real} to @{typ hypreal}*} |
|
14299 | 187 |
|
188 |
lemma inj_hypreal_of_real: "inj(hypreal_of_real)" |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
189 |
by (rule inj_onI, simp) |
14299 | 190 |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
191 |
lemma Rep_star_star_n_iff [simp]: |
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
192 |
"(X \<in> Rep_star (star_n Y)) = ({n. Y n = X n} \<in> \<U>)" |
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
193 |
by (simp add: star_n_def) |
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
194 |
|
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
195 |
lemma Rep_star_star_n: "X \<in> Rep_star (star_n X)" |
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
196 |
by simp |
14329 | 197 |
|
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
198 |
subsection{* Properties of @{term star_n} *} |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
199 |
|
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
200 |
lemma star_n_add: |
17298 | 201 |
"star_n X + star_n Y = star_n (%n. X n + Y n)" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
202 |
by (simp only: star_add_def starfun2_star_n) |
14329 | 203 |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
204 |
lemma star_n_minus: |
17298 | 205 |
"- star_n X = star_n (%n. -(X n))" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
206 |
by (simp only: star_minus_def starfun_star_n) |
14299 | 207 |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
208 |
lemma star_n_diff: |
17298 | 209 |
"star_n X - star_n Y = star_n (%n. X n - Y n)" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
210 |
by (simp only: star_diff_def starfun2_star_n) |
14299 | 211 |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
212 |
lemma star_n_mult: |
17298 | 213 |
"star_n X * star_n Y = star_n (%n. X n * Y n)" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
214 |
by (simp only: star_mult_def starfun2_star_n) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
215 |
|
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
216 |
lemma star_n_inverse: |
17301 | 217 |
"inverse (star_n X) = star_n (%n. inverse(X n))" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
218 |
by (simp only: star_inverse_def starfun_star_n) |
14299 | 219 |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
220 |
lemma star_n_le: |
17298 | 221 |
"star_n X \<le> star_n Y = |
14365
3d4df8c166ae
replacing HOL/Real/PRat, PNat by the rational number development
paulson
parents:
14361
diff
changeset
|
222 |
({n. X n \<le> Y n} \<in> FreeUltrafilterNat)" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
223 |
by (simp only: star_le_def starP2_star_n) |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
224 |
|
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
225 |
lemma star_n_less: |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
226 |
"star_n X < star_n Y = ({n. X n < Y n} \<in> FreeUltrafilterNat)" |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
227 |
by (simp only: star_less_def starP2_star_n) |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
228 |
|
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
229 |
lemma star_n_zero_num: "0 = star_n (%n. 0)" |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
230 |
by (simp only: star_zero_def star_of_def) |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
231 |
|
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
232 |
lemma star_n_one_num: "1 = star_n (%n. 1)" |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
233 |
by (simp only: star_one_def star_of_def) |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
234 |
|
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
235 |
lemma star_n_abs: |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
236 |
"abs (star_n X) = star_n (%n. abs (X n))" |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
237 |
by (simp only: star_abs_def starfun_star_n) |
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
238 |
|
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
239 |
subsection{*Misc Others*} |
14299 | 240 |
|
14370 | 241 |
lemma hypreal_not_refl2: "!!(x::hypreal). x < y ==> x \<noteq> y" |
15539 | 242 |
by (auto) |
14329 | 243 |
|
14331 | 244 |
lemma hypreal_eq_minus_iff: "((x::hypreal) = y) = (x + - y = 0)" |
15234
ec91a90c604e
simplification tweaks for better arithmetic reasoning
paulson
parents:
15229
diff
changeset
|
245 |
by auto |
14331 | 246 |
|
14329 | 247 |
lemma hypreal_mult_left_cancel: "(c::hypreal) \<noteq> 0 ==> (c*a=c*b) = (a=b)" |
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
248 |
by auto |
14329 | 249 |
|
250 |
lemma hypreal_mult_right_cancel: "(c::hypreal) \<noteq> 0 ==> (a*c=b*c) = (a=b)" |
|
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
251 |
by auto |
14329 | 252 |
|
14301 | 253 |
lemma hypreal_omega_gt_zero [simp]: "0 < omega" |
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
254 |
by (simp add: omega_def star_n_zero_num star_n_less) |
14370 | 255 |
|
256 |
subsection{*Existence of Infinite Hyperreal Number*} |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
257 |
|
14370 | 258 |
text{*Existence of infinite number not corresponding to any real number. |
259 |
Use assumption that member @{term FreeUltrafilterNat} is not finite.*} |
|
260 |
||
261 |
||
262 |
text{*A few lemmas first*} |
|
263 |
||
264 |
lemma lemma_omega_empty_singleton_disj: "{n::nat. x = real n} = {} | |
|
265 |
(\<exists>y. {n::nat. x = real n} = {y})" |
|
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
266 |
by force |
14370 | 267 |
|
268 |
lemma lemma_finite_omega_set: "finite {n::nat. x = real n}" |
|
269 |
by (cut_tac x = x in lemma_omega_empty_singleton_disj, auto) |
|
270 |
||
271 |
lemma not_ex_hypreal_of_real_eq_omega: |
|
272 |
"~ (\<exists>x. hypreal_of_real x = omega)" |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
273 |
apply (simp add: omega_def) |
17298 | 274 |
apply (simp add: star_of_def star_n_eq_iff) |
14370 | 275 |
apply (auto simp add: real_of_nat_Suc diff_eq_eq [symmetric] |
276 |
lemma_finite_omega_set [THEN FreeUltrafilterNat_finite]) |
|
277 |
done |
|
278 |
||
279 |
lemma hypreal_of_real_not_eq_omega: "hypreal_of_real x \<noteq> omega" |
|
14705 | 280 |
by (insert not_ex_hypreal_of_real_eq_omega, auto) |
14370 | 281 |
|
282 |
text{*Existence of infinitesimal number also not corresponding to any |
|
283 |
real number*} |
|
284 |
||
285 |
lemma lemma_epsilon_empty_singleton_disj: |
|
286 |
"{n::nat. x = inverse(real(Suc n))} = {} | |
|
287 |
(\<exists>y. {n::nat. x = inverse(real(Suc n))} = {y})" |
|
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
288 |
by auto |
14370 | 289 |
|
290 |
lemma lemma_finite_epsilon_set: "finite {n. x = inverse(real(Suc n))}" |
|
291 |
by (cut_tac x = x in lemma_epsilon_empty_singleton_disj, auto) |
|
292 |
||
14705 | 293 |
lemma not_ex_hypreal_of_real_eq_epsilon: "~ (\<exists>x. hypreal_of_real x = epsilon)" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17301
diff
changeset
|
294 |
by (auto simp add: epsilon_def star_of_def star_n_eq_iff |
14705 | 295 |
lemma_finite_epsilon_set [THEN FreeUltrafilterNat_finite]) |
14370 | 296 |
|
297 |
lemma hypreal_of_real_not_eq_epsilon: "hypreal_of_real x \<noteq> epsilon" |
|
14705 | 298 |
by (insert not_ex_hypreal_of_real_eq_epsilon, auto) |
14370 | 299 |
|
300 |
lemma hypreal_epsilon_not_zero: "epsilon \<noteq> 0" |
|
17298 | 301 |
by (simp add: epsilon_def star_zero_def star_of_def star_n_eq_iff |
302 |
del: star_of_zero) |
|
14370 | 303 |
|
304 |
lemma hypreal_epsilon_inverse_omega: "epsilon = inverse(omega)" |
|
17429
e8d6ed3aacfe
merged Transfer.thy and StarType.thy into StarDef.thy; renamed Ifun2_of to starfun2; cleaned up
huffman
parents:
17318
diff
changeset
|
305 |
by (simp add: epsilon_def omega_def star_n_inverse) |
14370 | 306 |
|
10751 | 307 |
end |