author | huffman |
Wed, 13 Dec 2006 21:25:56 +0100 | |
changeset 21839 | 54018ed3b99d |
parent 21830 | e38f0226e956 |
child 22655 | 83878e551c8c |
permissions | -rw-r--r-- |
13957 | 1 |
(* Title : NSCA.thy |
2 |
Author : Jacques D. Fleuriot |
|
3 |
Copyright : 2001,2002 University of Edinburgh |
|
4 |
*) |
|
5 |
||
14408 | 6 |
header{*Non-Standard Complex Analysis*} |
13957 | 7 |
|
15131 | 8 |
theory NSCA |
15140 | 9 |
imports NSComplex |
15131 | 10 |
begin |
13957 | 11 |
|
21830 | 12 |
abbreviation |
13957 | 13 |
(* standard complex numbers reagarded as an embedded subset of NS complex *) |
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
20724
diff
changeset
|
14 |
SComplex :: "hcomplex set" where |
21830 | 15 |
"SComplex \<equiv> Standard" |
13957 | 16 |
|
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
20724
diff
changeset
|
17 |
definition |
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
20724
diff
changeset
|
18 |
stc :: "hcomplex => hcomplex" where |
14408 | 19 |
--{* standard part map*} |
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
20 |
"stc x = (SOME r. x \<in> HFinite & r:SComplex & r @= x)" |
14408 | 21 |
|
22 |
||
23 |
subsection{*Closure Laws for SComplex, the Standard Complex Numbers*} |
|
24 |
||
25 |
lemma SComplex_add: "[| x \<in> SComplex; y \<in> SComplex |] ==> x + y \<in> SComplex" |
|
21830 | 26 |
by (rule Standard_add) |
14408 | 27 |
|
28 |
lemma SComplex_mult: "[| x \<in> SComplex; y \<in> SComplex |] ==> x * y \<in> SComplex" |
|
21830 | 29 |
by (rule Standard_mult) |
14408 | 30 |
|
31 |
lemma SComplex_inverse: "x \<in> SComplex ==> inverse x \<in> SComplex" |
|
21830 | 32 |
by (rule Standard_inverse) |
14408 | 33 |
|
34 |
lemma SComplex_divide: "[| x \<in> SComplex; y \<in> SComplex |] ==> x/y \<in> SComplex" |
|
21830 | 35 |
by (rule Standard_divide) |
14408 | 36 |
|
37 |
lemma SComplex_minus: "x \<in> SComplex ==> -x \<in> SComplex" |
|
21830 | 38 |
by (rule Standard_minus) |
14408 | 39 |
|
40 |
lemma SComplex_minus_iff [simp]: "(-x \<in> SComplex) = (x \<in> SComplex)" |
|
41 |
apply auto |
|
42 |
apply (drule SComplex_minus, auto) |
|
43 |
done |
|
44 |
||
45 |
lemma SComplex_diff: "[| x \<in> SComplex; y \<in> SComplex |] ==> x - y \<in> SComplex" |
|
21830 | 46 |
by (rule Standard_diff) |
14408 | 47 |
|
48 |
lemma SComplex_add_cancel: |
|
49 |
"[| x + y \<in> SComplex; y \<in> SComplex |] ==> x \<in> SComplex" |
|
50 |
by (drule SComplex_diff, assumption, simp) |
|
51 |
||
52 |
lemma SReal_hcmod_hcomplex_of_complex [simp]: |
|
53 |
"hcmod (hcomplex_of_complex r) \<in> Reals" |
|
21830 | 54 |
by (simp add: Reals_eq_Standard) |
14408 | 55 |
|
56 |
lemma SReal_hcmod_number_of [simp]: "hcmod (number_of w ::hcomplex) \<in> Reals" |
|
17373
27509e72f29e
removed duplicated lemmas; convert more proofs to transfer principle
huffman
parents:
17318
diff
changeset
|
57 |
apply (subst star_of_number_of [symmetric]) |
14408 | 58 |
apply (rule SReal_hcmod_hcomplex_of_complex) |
59 |
done |
|
60 |
||
61 |
lemma SReal_hcmod_SComplex: "x \<in> SComplex ==> hcmod x \<in> Reals" |
|
21830 | 62 |
by (simp add: Reals_eq_Standard) |
14408 | 63 |
|
21830 | 64 |
lemma SComplex_hcomplex_of_complex: "hcomplex_of_complex x \<in> SComplex" |
65 |
by (rule Standard_star_of) |
|
66 |
||
67 |
lemma SComplex_number_of: "(number_of w ::hcomplex) \<in> SComplex" |
|
68 |
by (rule Standard_number_of) |
|
14408 | 69 |
|
70 |
lemma SComplex_divide_number_of: |
|
71 |
"r \<in> SComplex ==> r/(number_of w::hcomplex) \<in> SComplex" |
|
21830 | 72 |
by simp |
14408 | 73 |
|
74 |
lemma SComplex_UNIV_complex: |
|
75 |
"{x. hcomplex_of_complex x \<in> SComplex} = (UNIV::complex set)" |
|
21830 | 76 |
by simp |
14408 | 77 |
|
78 |
lemma SComplex_iff: "(x \<in> SComplex) = (\<exists>y. x = hcomplex_of_complex y)" |
|
21830 | 79 |
by (simp add: Standard_def image_def) |
14408 | 80 |
|
81 |
lemma hcomplex_of_complex_image: |
|
82 |
"hcomplex_of_complex `(UNIV::complex set) = SComplex" |
|
21830 | 83 |
by (simp add: Standard_def) |
14408 | 84 |
|
85 |
lemma inv_hcomplex_of_complex_image: "inv hcomplex_of_complex `SComplex = UNIV" |
|
21830 | 86 |
apply (auto simp add: Standard_def image_def) |
14408 | 87 |
apply (rule inj_hcomplex_of_complex [THEN inv_f_f, THEN subst], blast) |
88 |
done |
|
89 |
||
90 |
lemma SComplex_hcomplex_of_complex_image: |
|
91 |
"[| \<exists>x. x: P; P \<le> SComplex |] ==> \<exists>Q. P = hcomplex_of_complex ` Q" |
|
21830 | 92 |
apply (simp add: Standard_def, blast) |
14408 | 93 |
done |
94 |
||
95 |
lemma SComplex_SReal_dense: |
|
96 |
"[| x \<in> SComplex; y \<in> SComplex; hcmod x < hcmod y |
|
97 |
|] ==> \<exists>r \<in> Reals. hcmod x< r & r < hcmod y" |
|
98 |
apply (auto intro: SReal_dense simp add: SReal_hcmod_SComplex) |
|
99 |
done |
|
100 |
||
101 |
lemma SComplex_hcmod_SReal: |
|
102 |
"z \<in> SComplex ==> hcmod z \<in> Reals" |
|
21830 | 103 |
by (simp add: Reals_eq_Standard) |
14408 | 104 |
|
21830 | 105 |
lemma SComplex_zero: "0 \<in> SComplex" |
106 |
by (rule Standard_zero) |
|
14408 | 107 |
|
21830 | 108 |
lemma SComplex_one: "1 \<in> SComplex" |
109 |
by (rule Standard_one) |
|
14408 | 110 |
|
111 |
(* |
|
112 |
Goalw [SComplex_def,SReal_def] "hcmod z \<in> Reals ==> z \<in> SComplex" |
|
113 |
by (res_inst_tac [("z","z")] eq_Abs_hcomplex 1); |
|
114 |
by (auto_tac (claset(),simpset() addsimps [hcmod,hypreal_of_real_def, |
|
115 |
hcomplex_of_complex_def,cmod_def])); |
|
116 |
*) |
|
117 |
||
118 |
||
119 |
subsection{*The Finite Elements form a Subring*} |
|
120 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
121 |
lemma SComplex_subset_HFinite [simp]: "SComplex \<le> HFinite" |
21830 | 122 |
by (auto simp add: Standard_def) |
14408 | 123 |
|
124 |
lemma HFinite_hcmod_hcomplex_of_complex [simp]: |
|
125 |
"hcmod (hcomplex_of_complex r) \<in> HFinite" |
|
126 |
by (auto intro!: SReal_subset_HFinite [THEN subsetD]) |
|
127 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
128 |
lemma HFinite_hcomplex_of_complex: "hcomplex_of_complex x \<in> HFinite" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
129 |
by (rule HFinite_star_of) |
14408 | 130 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
131 |
lemma HFinite_hcmod_iff: "(x \<in> HFinite) = (hcmod x \<in> HFinite)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
132 |
by (simp add: HFinite_def) |
14408 | 133 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
134 |
lemma HFinite_bounded_hcmod: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
135 |
"[|x \<in> HFinite; y \<le> hcmod x; 0 \<le> y |] ==> y: HFinite" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
136 |
by (auto intro: HFinite_bounded simp add: HFinite_hcmod_iff) |
14408 | 137 |
|
138 |
||
139 |
subsection{*The Complex Infinitesimals form a Subring*} |
|
140 |
||
141 |
lemma hcomplex_sum_of_halves: "x/(2::hcomplex) + x/(2::hcomplex) = x" |
|
142 |
by auto |
|
143 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
144 |
lemma Infinitesimal_hcmod_iff: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
145 |
"(z \<in> Infinitesimal) = (hcmod z \<in> Infinitesimal)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
146 |
by (simp add: Infinitesimal_def) |
14408 | 147 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
148 |
lemma HInfinite_hcmod_iff: "(z \<in> HInfinite) = (hcmod z \<in> HInfinite)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
149 |
by (simp add: HInfinite_def) |
14408 | 150 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
151 |
lemma HFinite_diff_Infinitesimal_hcmod: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
152 |
"x \<in> HFinite - Infinitesimal ==> hcmod x \<in> HFinite - Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
153 |
by (simp add: HFinite_hcmod_iff Infinitesimal_hcmod_iff) |
14408 | 154 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
155 |
lemma hcmod_less_Infinitesimal: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
156 |
"[| e \<in> Infinitesimal; hcmod x < hcmod e |] ==> x \<in> Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
157 |
by (auto elim: hrabs_less_Infinitesimal simp add: Infinitesimal_hcmod_iff) |
14408 | 158 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
159 |
lemma hcmod_le_Infinitesimal: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
160 |
"[| e \<in> Infinitesimal; hcmod x \<le> hcmod e |] ==> x \<in> Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
161 |
by (auto elim: hrabs_le_Infinitesimal simp add: Infinitesimal_hcmod_iff) |
14408 | 162 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
163 |
lemma Infinitesimal_interval_hcmod: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
164 |
"[| e \<in> Infinitesimal; |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
165 |
e' \<in> Infinitesimal; |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
166 |
hcmod e' < hcmod x ; hcmod x < hcmod e |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
167 |
|] ==> x \<in> Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
168 |
by (auto intro: Infinitesimal_interval simp add: Infinitesimal_hcmod_iff) |
14408 | 169 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
170 |
lemma Infinitesimal_interval2_hcmod: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
171 |
"[| e \<in> Infinitesimal; |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
172 |
e' \<in> Infinitesimal; |
14408 | 173 |
hcmod e' \<le> hcmod x ; hcmod x \<le> hcmod e |
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
174 |
|] ==> x \<in> Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
175 |
by (auto intro: Infinitesimal_interval2 simp add: Infinitesimal_hcmod_iff) |
14408 | 176 |
|
177 |
||
178 |
subsection{*The ``Infinitely Close'' Relation*} |
|
179 |
||
180 |
(* |
|
181 |
Goalw [capprox_def,approx_def] "(z @c= w) = (hcmod z @= hcmod w)" |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
182 |
by (auto_tac (claset(),simpset() addsimps [Infinitesimal_hcmod_iff])); |
14408 | 183 |
*) |
184 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
185 |
lemma approx_mult_subst_SComplex: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
186 |
"[| u @= x*hcomplex_of_complex v; x @= y |] |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
187 |
==> u @= y*hcomplex_of_complex v" |
21810
b2d23672b003
generalized some lemmas; removed redundant lemmas; cleaned up some proofs
huffman
parents:
21404
diff
changeset
|
188 |
by (rule approx_mult_subst_star_of) |
14408 | 189 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
190 |
lemma approx_hcomplex_of_complex_HFinite: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
191 |
"x @= hcomplex_of_complex D ==> x \<in> HFinite" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
192 |
by (rule approx_star_of_HFinite) |
14408 | 193 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
194 |
lemma approx_mult_hcomplex_of_complex: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
195 |
"[|a @= hcomplex_of_complex b; c @= hcomplex_of_complex d |] |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
196 |
==> a*c @= hcomplex_of_complex b * hcomplex_of_complex d" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
197 |
by (rule approx_mult_star_of) |
14408 | 198 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
199 |
lemma approx_SComplex_mult_cancel_zero: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
200 |
"[| a \<in> SComplex; a \<noteq> 0; a*x @= 0 |] ==> x @= 0" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
201 |
apply (drule SComplex_inverse [THEN SComplex_subset_HFinite [THEN subsetD]]) |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
202 |
apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric]) |
14408 | 203 |
done |
204 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
205 |
lemma approx_mult_SComplex1: "[| a \<in> SComplex; x @= 0 |] ==> x*a @= 0" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
206 |
by (auto dest: SComplex_subset_HFinite [THEN subsetD] approx_mult1) |
14408 | 207 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
208 |
lemma approx_mult_SComplex2: "[| a \<in> SComplex; x @= 0 |] ==> a*x @= 0" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
209 |
by (auto dest: SComplex_subset_HFinite [THEN subsetD] approx_mult2) |
14408 | 210 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
211 |
lemma approx_mult_SComplex_zero_cancel_iff [simp]: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
212 |
"[|a \<in> SComplex; a \<noteq> 0 |] ==> (a*x @= 0) = (x @= 0)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
213 |
by (blast intro: approx_SComplex_mult_cancel_zero approx_mult_SComplex2) |
14408 | 214 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
215 |
lemma approx_SComplex_mult_cancel: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
216 |
"[| a \<in> SComplex; a \<noteq> 0; a* w @= a*z |] ==> w @= z" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
217 |
apply (drule SComplex_inverse [THEN SComplex_subset_HFinite [THEN subsetD]]) |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
218 |
apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric]) |
14408 | 219 |
done |
220 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
221 |
lemma approx_SComplex_mult_cancel_iff1 [simp]: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
222 |
"[| a \<in> SComplex; a \<noteq> 0|] ==> (a* w @= a*z) = (w @= z)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
223 |
by (auto intro!: approx_mult2 SComplex_subset_HFinite [THEN subsetD] |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
224 |
intro: approx_SComplex_mult_cancel) |
14408 | 225 |
|
21810
b2d23672b003
generalized some lemmas; removed redundant lemmas; cleaned up some proofs
huffman
parents:
21404
diff
changeset
|
226 |
(* TODO: generalize following theorems: hcmod -> hnorm *) |
b2d23672b003
generalized some lemmas; removed redundant lemmas; cleaned up some proofs
huffman
parents:
21404
diff
changeset
|
227 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
228 |
lemma approx_hcmod_approx_zero: "(x @= y) = (hcmod (y - x) @= 0)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
229 |
apply (subst hcmod_diff_commute) |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
230 |
apply (simp add: approx_def Infinitesimal_hcmod_iff diff_minus) |
14408 | 231 |
done |
232 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
233 |
lemma approx_approx_zero_iff: "(x @= 0) = (hcmod x @= 0)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
234 |
by (simp add: approx_hcmod_approx_zero) |
14408 | 235 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
236 |
lemma approx_minus_zero_cancel_iff [simp]: "(-x @= 0) = (x @= 0)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
237 |
by (simp add: approx_def) |
14408 | 238 |
|
239 |
lemma Infinitesimal_hcmod_add_diff: |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
240 |
"u @= 0 ==> hcmod(x + u) - hcmod x \<in> Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
241 |
apply (drule approx_approx_zero_iff [THEN iffD1]) |
14408 | 242 |
apply (rule_tac e = "hcmod u" and e' = "- hcmod u" in Infinitesimal_interval2) |
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
243 |
apply (auto simp add: mem_infmal_iff [symmetric] diff_def) |
14408 | 244 |
apply (rule_tac c1 = "hcmod x" in add_le_cancel_left [THEN iffD1]) |
245 |
apply (auto simp add: diff_minus [symmetric]) |
|
246 |
done |
|
247 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
248 |
lemma approx_hcmod_add_hcmod: "u @= 0 ==> hcmod(x + u) @= hcmod x" |
14408 | 249 |
apply (rule approx_minus_iff [THEN iffD2]) |
250 |
apply (auto intro: Infinitesimal_hcmod_add_diff simp add: mem_infmal_iff [symmetric] diff_minus [symmetric]) |
|
251 |
done |
|
252 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
253 |
lemma approx_hcmod_approx: "x @= y ==> hcmod x @= hcmod y" |
21810
b2d23672b003
generalized some lemmas; removed redundant lemmas; cleaned up some proofs
huffman
parents:
21404
diff
changeset
|
254 |
by (rule approx_hnorm) |
13957 | 255 |
|
256 |
||
14408 | 257 |
subsection{*Zero is the Only Infinitesimal Complex Number*} |
258 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
259 |
lemma Infinitesimal_less_SComplex: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
260 |
"[| x \<in> SComplex; y \<in> Infinitesimal; 0 < hcmod x |] ==> hcmod y < hcmod x" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
261 |
by (auto intro: Infinitesimal_less_SReal SComplex_hcmod_SReal simp add: Infinitesimal_hcmod_iff) |
14408 | 262 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
263 |
lemma SComplex_Int_Infinitesimal_zero: "SComplex Int Infinitesimal = {0}" |
21830 | 264 |
by (auto simp add: Standard_def Infinitesimal_hcmod_iff) |
14408 | 265 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
266 |
lemma SComplex_Infinitesimal_zero: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
267 |
"[| x \<in> SComplex; x \<in> Infinitesimal|] ==> x = 0" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
268 |
by (cut_tac SComplex_Int_Infinitesimal_zero, blast) |
14408 | 269 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
270 |
lemma SComplex_HFinite_diff_Infinitesimal: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
271 |
"[| x \<in> SComplex; x \<noteq> 0 |] ==> x \<in> HFinite - Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
272 |
by (auto dest: SComplex_Infinitesimal_zero SComplex_subset_HFinite [THEN subsetD]) |
14408 | 273 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
274 |
lemma hcomplex_of_complex_HFinite_diff_Infinitesimal: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
275 |
"hcomplex_of_complex x \<noteq> 0 |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
276 |
==> hcomplex_of_complex x \<in> HFinite - Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
277 |
by (rule SComplex_HFinite_diff_Infinitesimal, auto) |
14408 | 278 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
279 |
lemma hcomplex_of_complex_Infinitesimal_iff_0: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
280 |
"(hcomplex_of_complex x \<in> Infinitesimal) = (x=0)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
281 |
by (rule star_of_Infinitesimal_iff_0) |
14408 | 282 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
283 |
lemma number_of_not_Infinitesimal [simp]: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
284 |
"number_of w \<noteq> (0::hcomplex) ==> (number_of w::hcomplex) \<notin> Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
285 |
by (fast dest: SComplex_number_of [THEN SComplex_Infinitesimal_zero]) |
14408 | 286 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
287 |
lemma approx_SComplex_not_zero: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
288 |
"[| y \<in> SComplex; x @= y; y\<noteq> 0 |] ==> x \<noteq> 0" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
289 |
by (auto dest: SComplex_Infinitesimal_zero approx_sym [THEN mem_infmal_iff [THEN iffD2]]) |
14408 | 290 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
291 |
lemma SComplex_approx_iff: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
292 |
"[|x \<in> SComplex; y \<in> SComplex|] ==> (x @= y) = (x = y)" |
21830 | 293 |
by (auto simp add: Standard_def) |
14408 | 294 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
295 |
lemma number_of_Infinitesimal_iff [simp]: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
296 |
"((number_of w :: hcomplex) \<in> Infinitesimal) = |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
297 |
(number_of w = (0::hcomplex))" |
14408 | 298 |
apply (rule iffI) |
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
299 |
apply (fast dest: SComplex_number_of [THEN SComplex_Infinitesimal_zero]) |
14408 | 300 |
apply (simp (no_asm_simp)) |
301 |
done |
|
302 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
303 |
lemma hcomplex_of_complex_approx_iff: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
304 |
"(hcomplex_of_complex k @= hcomplex_of_complex m) = (k = m)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
305 |
by (rule star_of_approx_iff) |
14408 | 306 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
307 |
lemma hcomplex_of_complex_approx_number_of_iff [simp]: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
308 |
"(hcomplex_of_complex k @= number_of w) = (k = number_of w)" |
14408 | 309 |
by (subst hcomplex_of_complex_approx_iff [symmetric], auto) |
310 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
311 |
lemma approx_unique_complex: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
312 |
"[| r \<in> SComplex; s \<in> SComplex; r @= x; s @= x|] ==> r = s" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
313 |
by (blast intro: SComplex_approx_iff [THEN iffD1] approx_trans2) |
14408 | 314 |
|
21839
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
315 |
subsection {* Properties of @{term hRe}, @{term hIm} and @{term HComplex} *} |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
316 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
317 |
lemma abs_Re_le_cmod: "\<bar>Re x\<bar> \<le> cmod x" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
318 |
by (induct x) simp |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
319 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
320 |
lemma abs_Im_le_cmod: "\<bar>Im x\<bar> \<le> cmod x" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
321 |
by (induct x) simp |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
322 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
323 |
lemma abs_hRe_le_hcmod: "\<And>x. \<bar>hRe x\<bar> \<le> hcmod x" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
324 |
by transfer (rule abs_Re_le_cmod) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
325 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
326 |
lemma abs_hIm_le_hcmod: "\<And>x. \<bar>hIm x\<bar> \<le> hcmod x" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
327 |
by transfer (rule abs_Im_le_cmod) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
328 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
329 |
lemma Infinitesimal_hRe: "x \<in> Infinitesimal \<Longrightarrow> hRe x \<in> Infinitesimal" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
330 |
apply (rule InfinitesimalI2, simp) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
331 |
apply (rule order_le_less_trans [OF abs_hRe_le_hcmod]) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
332 |
apply (erule (1) InfinitesimalD2) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
333 |
done |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
334 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
335 |
lemma Infinitesimal_hIm: "x \<in> Infinitesimal \<Longrightarrow> hIm x \<in> Infinitesimal" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
336 |
apply (rule InfinitesimalI2, simp) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
337 |
apply (rule order_le_less_trans [OF abs_hIm_le_hcmod]) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
338 |
apply (erule (1) InfinitesimalD2) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
339 |
done |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
340 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
341 |
lemma real_sqrt_lessI: "\<lbrakk>0 \<le> x; 0 < u; x < u\<twosuperior>\<rbrakk> \<Longrightarrow> sqrt x < u" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
342 |
by (frule (1) real_sqrt_less_mono) simp |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
343 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
344 |
lemma hypreal_sqrt_lessI: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
345 |
"\<And>x u. \<lbrakk>0 \<le> x; 0 < u; x < u\<twosuperior>\<rbrakk> \<Longrightarrow> ( *f* sqrt) x < u" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
346 |
by transfer (rule real_sqrt_lessI) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
347 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
348 |
lemma hypreal_sqrt_ge_zero: "\<And>x. 0 \<le> x \<Longrightarrow> 0 \<le> ( *f* sqrt) x" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
349 |
by transfer (rule real_sqrt_ge_zero) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
350 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
351 |
lemma Infinitesimal_sqrt: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
352 |
"\<lbrakk>x \<in> Infinitesimal; 0 \<le> x\<rbrakk> \<Longrightarrow> ( *f* sqrt) x \<in> Infinitesimal" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
353 |
apply (rule InfinitesimalI2) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
354 |
apply (drule_tac r="r\<twosuperior>" in InfinitesimalD2, simp) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
355 |
apply (simp add: hypreal_sqrt_ge_zero) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
356 |
apply (rule hypreal_sqrt_lessI, simp_all) |
14408 | 357 |
done |
358 |
||
21839
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
359 |
lemma Infinitesimal_HComplex: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
360 |
"\<lbrakk>x \<in> Infinitesimal; y \<in> Infinitesimal\<rbrakk> \<Longrightarrow> HComplex x y \<in> Infinitesimal" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
361 |
apply (rule Infinitesimal_hcmod_iff [THEN iffD2]) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
362 |
apply (simp add: hcmod_i) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
363 |
apply (rule Infinitesimal_sqrt) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
364 |
apply (rule Infinitesimal_add) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
365 |
apply (erule Infinitesimal_hrealpow, simp) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
366 |
apply (erule Infinitesimal_hrealpow, simp) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
367 |
apply (rule add_nonneg_nonneg) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
368 |
apply (rule zero_le_power2) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
369 |
apply (rule zero_le_power2) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
370 |
done |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
371 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
372 |
lemma hcomplex_Infinitesimal_iff: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
373 |
"(x \<in> Infinitesimal) = (hRe x \<in> Infinitesimal \<and> hIm x \<in> Infinitesimal)" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
374 |
apply (safe intro!: Infinitesimal_hRe Infinitesimal_hIm) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
375 |
apply (drule (1) Infinitesimal_HComplex, simp) |
14408 | 376 |
done |
377 |
||
21839
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
378 |
lemma hRe_diff [simp]: "\<And>x y. hRe (x - y) = hRe x - hRe y" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
379 |
by transfer (rule complex_Re_diff) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
380 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
381 |
lemma hIm_diff [simp]: "\<And>x y. hIm (x - y) = hIm x - hIm y" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
382 |
by transfer (rule complex_Im_diff) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
383 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
384 |
lemma approx_hRe: "x \<approx> y \<Longrightarrow> hRe x \<approx> hRe y" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
385 |
unfolding approx_def by (drule Infinitesimal_hRe) simp |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
386 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
387 |
lemma approx_hIm: "x \<approx> y \<Longrightarrow> hIm x \<approx> hIm y" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
388 |
unfolding approx_def by (drule Infinitesimal_hIm) simp |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
389 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
390 |
lemma approx_HComplex: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
391 |
"\<lbrakk>a \<approx> b; c \<approx> d\<rbrakk> \<Longrightarrow> HComplex a c \<approx> HComplex b d" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
392 |
unfolding approx_def by (simp add: Infinitesimal_HComplex) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
393 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
394 |
lemma hcomplex_approx_iff: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
395 |
"(x \<approx> y) = (hRe x \<approx> hRe y \<and> hIm x \<approx> hIm y)" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
396 |
unfolding approx_def by (simp add: hcomplex_Infinitesimal_iff) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
397 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
398 |
lemma HFinite_hRe: "x \<in> HFinite \<Longrightarrow> hRe x \<in> HFinite" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
399 |
apply (auto simp add: HFinite_def SReal_def) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
400 |
apply (rule_tac x="star_of r" in exI, simp) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
401 |
apply (erule order_le_less_trans [OF abs_hRe_le_hcmod]) |
14408 | 402 |
done |
403 |
||
21839
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
404 |
lemma HFinite_hIm: "x \<in> HFinite \<Longrightarrow> hIm x \<in> HFinite" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
405 |
apply (auto simp add: HFinite_def SReal_def) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
406 |
apply (rule_tac x="star_of r" in exI, simp) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
407 |
apply (erule order_le_less_trans [OF abs_hIm_le_hcmod]) |
14408 | 408 |
done |
409 |
||
21839
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
410 |
lemma HFinite_HComplex: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
411 |
"\<lbrakk>x \<in> HFinite; y \<in> HFinite\<rbrakk> \<Longrightarrow> HComplex x y \<in> HFinite" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
412 |
apply (subgoal_tac "HComplex x 0 + HComplex 0 y \<in> HFinite", simp) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
413 |
apply (rule HFinite_add) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
414 |
apply (simp add: HFinite_hcmod_iff hcmod_i) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
415 |
apply (simp add: HFinite_hcmod_iff hcmod_i) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
416 |
done |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
417 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
418 |
lemma hcomplex_HFinite_iff: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
419 |
"(x \<in> HFinite) = (hRe x \<in> HFinite \<and> hIm x \<in> HFinite)" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
420 |
apply (safe intro!: HFinite_hRe HFinite_hIm) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
421 |
apply (drule (1) HFinite_HComplex, simp) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
422 |
done |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
423 |
|
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
424 |
lemma hcomplex_HInfinite_iff: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
425 |
"(x \<in> HInfinite) = (hRe x \<in> HInfinite \<or> hIm x \<in> HInfinite)" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
426 |
by (simp add: HInfinite_HFinite_iff hcomplex_HFinite_iff) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
427 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
428 |
lemma hcomplex_of_hypreal_approx_iff [simp]: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
429 |
"(hcomplex_of_hypreal x @= hcomplex_of_hypreal z) = (x @= z)" |
21839
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
430 |
by (simp add: hcomplex_approx_iff) |
14408 | 431 |
|
21839
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
432 |
lemma Standard_HComplex: |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
433 |
"\<lbrakk>x \<in> Standard; y \<in> Standard\<rbrakk> \<Longrightarrow> HComplex x y \<in> Standard" |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
434 |
by (simp add: HComplex_def) |
14408 | 435 |
|
436 |
(* Here we go - easy proof now!! *) |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
437 |
lemma stc_part_Ex: "x:HFinite ==> \<exists>t \<in> SComplex. x @= t" |
21839
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
438 |
apply (simp add: hcomplex_HFinite_iff hcomplex_approx_iff) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
439 |
apply (rule_tac x="HComplex (st (hRe x)) (st (hIm x))" in bexI) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
440 |
apply (simp add: st_approx_self [THEN approx_sym]) |
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
441 |
apply (simp add: Standard_HComplex st_SReal [unfolded Reals_eq_Standard]) |
14408 | 442 |
done |
443 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
444 |
lemma stc_part_Ex1: "x:HFinite ==> EX! t. t \<in> SComplex & x @= t" |
14408 | 445 |
apply (drule stc_part_Ex, safe) |
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
446 |
apply (drule_tac [2] approx_sym, drule_tac [2] approx_sym, drule_tac [2] approx_sym) |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
447 |
apply (auto intro!: approx_unique_complex) |
14408 | 448 |
done |
449 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
450 |
lemmas hcomplex_of_complex_approx_inverse = |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
451 |
hcomplex_of_complex_HFinite_diff_Infinitesimal [THEN [2] approx_inverse] |
14408 | 452 |
|
453 |
||
454 |
subsection{*Theorems About Monads*} |
|
455 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
456 |
lemma monad_zero_hcmod_iff: "(x \<in> monad 0) = (hcmod x:monad 0)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
457 |
by (simp add: Infinitesimal_monad_zero_iff [symmetric] Infinitesimal_hcmod_iff) |
14408 | 458 |
|
459 |
||
460 |
subsection{*Theorems About Standard Part*} |
|
461 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
462 |
lemma stc_approx_self: "x \<in> HFinite ==> stc x @= x" |
14408 | 463 |
apply (simp add: stc_def) |
464 |
apply (frule stc_part_Ex, safe) |
|
465 |
apply (rule someI2) |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
466 |
apply (auto intro: approx_sym) |
14408 | 467 |
done |
468 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
469 |
lemma stc_SComplex: "x \<in> HFinite ==> stc x \<in> SComplex" |
14408 | 470 |
apply (simp add: stc_def) |
471 |
apply (frule stc_part_Ex, safe) |
|
472 |
apply (rule someI2) |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
473 |
apply (auto intro: approx_sym) |
14408 | 474 |
done |
475 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
476 |
lemma stc_HFinite: "x \<in> HFinite ==> stc x \<in> HFinite" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
477 |
by (erule stc_SComplex [THEN SComplex_subset_HFinite [THEN subsetD]]) |
14408 | 478 |
|
20724 | 479 |
lemma stc_unique: "\<lbrakk>y \<in> SComplex; y \<approx> x\<rbrakk> \<Longrightarrow> stc x = y" |
480 |
apply (frule SComplex_subset_HFinite [THEN subsetD]) |
|
481 |
apply (drule (1) approx_HFinite) |
|
482 |
apply (unfold stc_def) |
|
14408 | 483 |
apply (rule some_equality) |
20724 | 484 |
apply (auto intro: approx_unique_complex) |
485 |
done |
|
486 |
||
487 |
lemma stc_SComplex_eq [simp]: "x \<in> SComplex ==> stc x = x" |
|
488 |
apply (erule stc_unique) |
|
489 |
apply (rule approx_refl) |
|
14408 | 490 |
done |
491 |
||
492 |
lemma stc_hcomplex_of_complex: |
|
493 |
"stc (hcomplex_of_complex x) = hcomplex_of_complex x" |
|
494 |
by auto |
|
495 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
496 |
lemma stc_eq_approx: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
497 |
"[| x \<in> HFinite; y \<in> HFinite; stc x = stc y |] ==> x @= y" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
498 |
by (auto dest!: stc_approx_self elim!: approx_trans3) |
14408 | 499 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
500 |
lemma approx_stc_eq: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
501 |
"[| x \<in> HFinite; y \<in> HFinite; x @= y |] ==> stc x = stc y" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
502 |
by (blast intro: approx_trans approx_trans2 SComplex_approx_iff [THEN iffD1] |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
503 |
dest: stc_approx_self stc_SComplex) |
13957 | 504 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
505 |
lemma stc_eq_approx_iff: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
506 |
"[| x \<in> HFinite; y \<in> HFinite|] ==> (x @= y) = (stc x = stc y)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
507 |
by (blast intro: approx_stc_eq stc_eq_approx) |
14408 | 508 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
509 |
lemma stc_Infinitesimal_add_SComplex: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
510 |
"[| x \<in> SComplex; e \<in> Infinitesimal |] ==> stc(x + e) = x" |
20724 | 511 |
apply (erule stc_unique) |
512 |
apply (erule Infinitesimal_add_approx_self) |
|
14408 | 513 |
done |
514 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
515 |
lemma stc_Infinitesimal_add_SComplex2: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
516 |
"[| x \<in> SComplex; e \<in> Infinitesimal |] ==> stc(e + x) = x" |
20724 | 517 |
apply (erule stc_unique) |
518 |
apply (erule Infinitesimal_add_approx_self2) |
|
14408 | 519 |
done |
520 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
521 |
lemma HFinite_stc_Infinitesimal_add: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
522 |
"x \<in> HFinite ==> \<exists>e \<in> Infinitesimal. x = stc(x) + e" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
523 |
by (blast dest!: stc_approx_self [THEN approx_sym] bex_Infinitesimal_iff2 [THEN iffD2]) |
14408 | 524 |
|
525 |
lemma stc_add: |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
526 |
"[| x \<in> HFinite; y \<in> HFinite |] ==> stc (x + y) = stc(x) + stc(y)" |
20724 | 527 |
by (simp add: stc_unique stc_SComplex stc_approx_self approx_add SComplex_add) |
14408 | 528 |
|
529 |
lemma stc_number_of [simp]: "stc (number_of w) = number_of w" |
|
530 |
by (rule SComplex_number_of [THEN stc_SComplex_eq]) |
|
531 |
||
532 |
lemma stc_zero [simp]: "stc 0 = 0" |
|
533 |
by simp |
|
534 |
||
535 |
lemma stc_one [simp]: "stc 1 = 1" |
|
536 |
by simp |
|
537 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
538 |
lemma stc_minus: "y \<in> HFinite ==> stc(-y) = -stc(y)" |
20724 | 539 |
by (simp add: stc_unique stc_SComplex stc_approx_self approx_minus) |
14408 | 540 |
|
541 |
lemma stc_diff: |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
542 |
"[| x \<in> HFinite; y \<in> HFinite |] ==> stc (x-y) = stc(x) - stc(y)" |
20724 | 543 |
by (simp add: stc_unique stc_SComplex stc_approx_self approx_diff SComplex_diff) |
14408 | 544 |
|
545 |
lemma stc_mult: |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
546 |
"[| x \<in> HFinite; y \<in> HFinite |] |
14408 | 547 |
==> stc (x * y) = stc(x) * stc(y)" |
20724 | 548 |
by (simp add: stc_unique stc_SComplex stc_approx_self approx_mult_HFinite SComplex_mult) |
14408 | 549 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
550 |
lemma stc_Infinitesimal: "x \<in> Infinitesimal ==> stc x = 0" |
20724 | 551 |
by (simp add: stc_unique mem_infmal_iff) |
14408 | 552 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
553 |
lemma stc_not_Infinitesimal: "stc(x) \<noteq> 0 ==> x \<notin> Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
554 |
by (fast intro: stc_Infinitesimal) |
14408 | 555 |
|
556 |
lemma stc_inverse: |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
557 |
"[| x \<in> HFinite; stc x \<noteq> 0 |] |
14408 | 558 |
==> stc(inverse x) = inverse (stc x)" |
20724 | 559 |
apply (drule stc_not_Infinitesimal) |
560 |
apply (simp add: stc_unique stc_SComplex stc_approx_self approx_inverse SComplex_inverse) |
|
14408 | 561 |
done |
562 |
||
563 |
lemma stc_divide [simp]: |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
564 |
"[| x \<in> HFinite; y \<in> HFinite; stc y \<noteq> 0 |] |
14408 | 565 |
==> stc(x/y) = (stc x) / (stc y)" |
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
566 |
by (simp add: divide_inverse stc_mult stc_not_Infinitesimal HFinite_inverse stc_inverse) |
14408 | 567 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
568 |
lemma stc_idempotent [simp]: "x \<in> HFinite ==> stc(stc(x)) = stc(x)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
569 |
by (blast intro: stc_HFinite stc_approx_self approx_stc_eq) |
14408 | 570 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
571 |
lemma HFinite_HFinite_hcomplex_of_hypreal: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
572 |
"z \<in> HFinite ==> hcomplex_of_hypreal z \<in> HFinite" |
21839
54018ed3b99d
added lemmas about hRe, hIm, HComplex; removed all uses of star_n
huffman
parents:
21830
diff
changeset
|
573 |
by (simp add: hcomplex_HFinite_iff) |
14408 | 574 |
|
575 |
lemma SComplex_SReal_hcomplex_of_hypreal: |
|
576 |
"x \<in> Reals ==> hcomplex_of_hypreal x \<in> SComplex" |
|
20724 | 577 |
by (auto simp add: SReal_def Standard_def hcomplex_of_hypreal_def |
20557
81dd3679f92c
complex_of_real abbreviates of_real::real=>complex;
huffman
parents:
20552
diff
changeset
|
578 |
simp del: star_of_of_real) |
14408 | 579 |
|
580 |
lemma stc_hcomplex_of_hypreal: |
|
581 |
"z \<in> HFinite ==> stc(hcomplex_of_hypreal z) = hcomplex_of_hypreal (st z)" |
|
20724 | 582 |
apply (rule stc_unique) |
583 |
apply (rule SComplex_SReal_hcomplex_of_hypreal) |
|
584 |
apply (erule st_SReal) |
|
585 |
apply (simp add: hcomplex_of_hypreal_approx_iff st_approx_self) |
|
14408 | 586 |
done |
587 |
||
588 |
(* |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
589 |
Goal "x \<in> HFinite ==> hcmod(stc x) = st(hcmod x)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
590 |
by (dtac stc_approx_self 1) |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
591 |
by (auto_tac (claset(),simpset() addsimps [bex_Infinitesimal_iff2 RS sym])); |
14408 | 592 |
|
593 |
||
594 |
approx_hcmod_add_hcmod |
|
595 |
*) |
|
596 |
||
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
597 |
lemma Infinitesimal_hcnj_iff [simp]: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
598 |
"(hcnj z \<in> Infinitesimal) = (z \<in> Infinitesimal)" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
599 |
by (simp add: Infinitesimal_hcmod_iff) |
14408 | 600 |
|
20559
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
601 |
lemma Infinitesimal_hcomplex_of_hypreal_epsilon [simp]: |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
602 |
"hcomplex_of_hypreal epsilon \<in> Infinitesimal" |
2116b7a371c7
removed capprox, CFinite, CInfinite, CInfinitesimal, cmonad, and cgalaxy in favor of polymorphic constants
huffman
parents:
20557
diff
changeset
|
603 |
by (simp add: Infinitesimal_hcmod_iff) |
14408 | 604 |
|
13957 | 605 |
end |