author | paulson |
Tue, 03 Feb 2004 11:06:36 +0100 | |
changeset 14373 | 67a628beb981 |
parent 14371 | c78c7da09519 |
child 14374 | 61de62096768 |
permissions | -rw-r--r-- |
13957 | 1 |
(* Title: NSComplex.thy |
2 |
Author: Jacques D. Fleuriot |
|
3 |
Copyright: 2001 University of Edinburgh |
|
4 |
Description: Nonstandard Complex numbers |
|
5 |
*) |
|
6 |
||
14314 | 7 |
theory NSComplex = NSInduct: |
13957 | 8 |
|
9 |
constdefs |
|
10 |
hcomplexrel :: "((nat=>complex)*(nat=>complex)) set" |
|
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
11 |
"hcomplexrel == {p. \<exists>X Y. p = ((X::nat=>complex),Y) & |
13957 | 12 |
{n::nat. X(n) = Y(n)}: FreeUltrafilterNat}" |
13 |
||
14314 | 14 |
typedef hcomplex = "{x::nat=>complex. True}//hcomplexrel" |
15 |
by (auto simp add: quotient_def) |
|
13957 | 16 |
|
14314 | 17 |
instance hcomplex :: zero .. |
18 |
instance hcomplex :: one .. |
|
19 |
instance hcomplex :: plus .. |
|
20 |
instance hcomplex :: times .. |
|
21 |
instance hcomplex :: minus .. |
|
22 |
instance hcomplex :: inverse .. |
|
23 |
instance hcomplex :: power .. |
|
24 |
||
25 |
defs (overloaded) |
|
26 |
hcomplex_zero_def: |
|
13957 | 27 |
"0 == Abs_hcomplex(hcomplexrel `` {%n. (0::complex)})" |
14314 | 28 |
|
29 |
hcomplex_one_def: |
|
13957 | 30 |
"1 == Abs_hcomplex(hcomplexrel `` {%n. (1::complex)})" |
31 |
||
32 |
||
14314 | 33 |
hcomplex_minus_def: |
34 |
"- z == Abs_hcomplex(UN X: Rep_hcomplex(z). |
|
35 |
hcomplexrel `` {%n::nat. - (X n)})" |
|
13957 | 36 |
|
14314 | 37 |
hcomplex_diff_def: |
13957 | 38 |
"w - z == w + -(z::hcomplex)" |
14314 | 39 |
|
13957 | 40 |
constdefs |
41 |
||
14314 | 42 |
hcomplex_of_complex :: "complex => hcomplex" |
13957 | 43 |
"hcomplex_of_complex z == Abs_hcomplex(hcomplexrel `` {%n. z})" |
14314 | 44 |
|
45 |
hcinv :: "hcomplex => hcomplex" |
|
46 |
"inverse(P) == Abs_hcomplex(UN X: Rep_hcomplex(P). |
|
13957 | 47 |
hcomplexrel `` {%n. inverse(X n)})" |
48 |
||
49 |
(*--- real and Imaginary parts ---*) |
|
14314 | 50 |
|
51 |
hRe :: "hcomplex => hypreal" |
|
13957 | 52 |
"hRe(z) == Abs_hypreal(UN X:Rep_hcomplex(z). hyprel `` {%n. Re (X n)})" |
53 |
||
14314 | 54 |
hIm :: "hcomplex => hypreal" |
55 |
"hIm(z) == Abs_hypreal(UN X:Rep_hcomplex(z). hyprel `` {%n. Im (X n)})" |
|
13957 | 56 |
|
57 |
||
58 |
(*----------- modulus ------------*) |
|
59 |
||
14314 | 60 |
hcmod :: "hcomplex => hypreal" |
13957 | 61 |
"hcmod z == Abs_hypreal(UN X: Rep_hcomplex(z). |
62 |
hyprel `` {%n. cmod (X n)})" |
|
63 |
||
14314 | 64 |
(*------ imaginary unit ----------*) |
65 |
||
66 |
iii :: hcomplex |
|
13957 | 67 |
"iii == Abs_hcomplex(hcomplexrel `` {%n. ii})" |
68 |
||
69 |
(*------- complex conjugate ------*) |
|
70 |
||
14314 | 71 |
hcnj :: "hcomplex => hcomplex" |
13957 | 72 |
"hcnj z == Abs_hcomplex(UN X:Rep_hcomplex(z). hcomplexrel `` {%n. cnj (X n)})" |
73 |
||
14314 | 74 |
(*------------ Argand -------------*) |
13957 | 75 |
|
14314 | 76 |
hsgn :: "hcomplex => hcomplex" |
13957 | 77 |
"hsgn z == Abs_hcomplex(UN X:Rep_hcomplex(z). hcomplexrel `` {%n. sgn(X n)})" |
78 |
||
14314 | 79 |
harg :: "hcomplex => hypreal" |
13957 | 80 |
"harg z == Abs_hypreal(UN X:Rep_hcomplex(z). hyprel `` {%n. arg(X n)})" |
81 |
||
82 |
(* abbreviation for (cos a + i sin a) *) |
|
14314 | 83 |
hcis :: "hypreal => hcomplex" |
13957 | 84 |
"hcis a == Abs_hcomplex(UN X:Rep_hypreal(a). hcomplexrel `` {%n. cis (X n)})" |
85 |
||
86 |
(* abbreviation for r*(cos a + i sin a) *) |
|
14314 | 87 |
hrcis :: "[hypreal, hypreal] => hcomplex" |
13957 | 88 |
"hrcis r a == hcomplex_of_hypreal r * hcis a" |
89 |
||
14314 | 90 |
(*----- injection from hyperreals -----*) |
91 |
||
92 |
hcomplex_of_hypreal :: "hypreal => hcomplex" |
|
13957 | 93 |
"hcomplex_of_hypreal r == Abs_hcomplex(UN X:Rep_hypreal(r). |
94 |
hcomplexrel `` {%n. complex_of_real (X n)})" |
|
95 |
||
96 |
(*------------ e ^ (x + iy) ------------*) |
|
97 |
||
14314 | 98 |
hexpi :: "hcomplex => hcomplex" |
13957 | 99 |
"hexpi z == hcomplex_of_hypreal(( *f* exp) (hRe z)) * hcis (hIm z)" |
14314 | 100 |
|
13957 | 101 |
|
14314 | 102 |
defs (overloaded) |
13957 | 103 |
|
104 |
(*----------- division ----------*) |
|
105 |
||
14314 | 106 |
hcomplex_divide_def: |
13957 | 107 |
"w / (z::hcomplex) == w * inverse z" |
14314 | 108 |
|
109 |
hcomplex_add_def: |
|
13957 | 110 |
"w + z == Abs_hcomplex(UN X:Rep_hcomplex(w). UN Y:Rep_hcomplex(z). |
111 |
hcomplexrel `` {%n. X n + Y n})" |
|
112 |
||
14314 | 113 |
hcomplex_mult_def: |
13957 | 114 |
"w * z == Abs_hcomplex(UN X:Rep_hcomplex(w). UN Y:Rep_hcomplex(z). |
14314 | 115 |
hcomplexrel `` {%n. X n * Y n})" |
13957 | 116 |
|
117 |
||
118 |
||
119 |
consts |
|
14314 | 120 |
"hcpow" :: "[hcomplex,hypnat] => hcomplex" (infixr 80) |
13957 | 121 |
|
122 |
defs |
|
123 |
(* hypernatural powers of nonstandard complex numbers *) |
|
14314 | 124 |
hcpow_def: |
125 |
"(z::hcomplex) hcpow (n::hypnat) |
|
13957 | 126 |
== Abs_hcomplex(UN X:Rep_hcomplex(z). UN Y: Rep_hypnat(n). |
127 |
hcomplexrel `` {%n. (X n) ^ (Y n)})" |
|
128 |
||
14314 | 129 |
|
130 |
lemma hcomplexrel_iff: |
|
131 |
"((X,Y): hcomplexrel) = ({n. X n = Y n}: FreeUltrafilterNat)" |
|
132 |
apply (unfold hcomplexrel_def) |
|
133 |
apply fast |
|
134 |
done |
|
135 |
||
136 |
lemma hcomplexrel_refl: "(x,x): hcomplexrel" |
|
137 |
apply (simp add: hcomplexrel_iff) |
|
138 |
done |
|
139 |
||
140 |
lemma hcomplexrel_sym: "(x,y): hcomplexrel ==> (y,x):hcomplexrel" |
|
141 |
apply (auto simp add: hcomplexrel_iff eq_commute) |
|
142 |
done |
|
143 |
||
144 |
lemma hcomplexrel_trans: |
|
145 |
"[|(x,y): hcomplexrel; (y,z):hcomplexrel|] ==> (x,z):hcomplexrel" |
|
146 |
apply (simp add: hcomplexrel_iff) |
|
147 |
apply ultra |
|
148 |
done |
|
149 |
||
150 |
lemma equiv_hcomplexrel: "equiv UNIV hcomplexrel" |
|
151 |
apply (simp add: equiv_def refl_def sym_def trans_def hcomplexrel_refl) |
|
152 |
apply (blast intro: hcomplexrel_sym hcomplexrel_trans) |
|
153 |
done |
|
154 |
||
155 |
lemmas equiv_hcomplexrel_iff = |
|
156 |
eq_equiv_class_iff [OF equiv_hcomplexrel UNIV_I UNIV_I, simp] |
|
157 |
||
158 |
lemma hcomplexrel_in_hcomplex [simp]: "hcomplexrel``{x} : hcomplex" |
|
159 |
apply (unfold hcomplex_def hcomplexrel_def quotient_def) |
|
160 |
apply blast |
|
161 |
done |
|
162 |
||
163 |
lemma inj_on_Abs_hcomplex: "inj_on Abs_hcomplex hcomplex" |
|
164 |
apply (rule inj_on_inverseI) |
|
165 |
apply (erule Abs_hcomplex_inverse) |
|
166 |
done |
|
167 |
||
168 |
declare inj_on_Abs_hcomplex [THEN inj_on_iff, simp] |
|
169 |
Abs_hcomplex_inverse [simp] |
|
170 |
||
171 |
declare equiv_hcomplexrel [THEN eq_equiv_class_iff, simp] |
|
172 |
||
173 |
declare hcomplexrel_iff [iff] |
|
174 |
||
175 |
lemma inj_Rep_hcomplex: "inj(Rep_hcomplex)" |
|
176 |
apply (rule inj_on_inverseI) |
|
177 |
apply (rule Rep_hcomplex_inverse) |
|
178 |
done |
|
179 |
||
180 |
lemma lemma_hcomplexrel_refl: "x: hcomplexrel `` {x}" |
|
181 |
apply (unfold hcomplexrel_def) |
|
182 |
apply (safe) |
|
183 |
apply auto |
|
184 |
done |
|
185 |
declare lemma_hcomplexrel_refl [simp] |
|
186 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
187 |
lemma hcomplex_empty_not_mem: "{} \<notin> hcomplex" |
14314 | 188 |
apply (unfold hcomplex_def) |
189 |
apply (auto elim!: quotientE) |
|
190 |
done |
|
191 |
declare hcomplex_empty_not_mem [simp] |
|
192 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
193 |
lemma Rep_hcomplex_nonempty: "Rep_hcomplex x \<noteq> {}" |
14314 | 194 |
apply (cut_tac x = "x" in Rep_hcomplex) |
195 |
apply auto |
|
196 |
done |
|
197 |
declare Rep_hcomplex_nonempty [simp] |
|
198 |
||
199 |
lemma eq_Abs_hcomplex: |
|
200 |
"(!!x. z = Abs_hcomplex(hcomplexrel `` {x}) ==> P) ==> P" |
|
201 |
apply (rule_tac x1=z in Rep_hcomplex [unfolded hcomplex_def, THEN quotientE]) |
|
202 |
apply (drule_tac f = Abs_hcomplex in arg_cong) |
|
203 |
apply (force simp add: Rep_hcomplex_inverse) |
|
204 |
done |
|
205 |
||
206 |
||
207 |
subsection{*Properties of Nonstandard Real and Imaginary Parts*} |
|
208 |
||
209 |
lemma hRe: |
|
210 |
"hRe(Abs_hcomplex (hcomplexrel `` {X})) = |
|
211 |
Abs_hypreal(hyprel `` {%n. Re(X n)})" |
|
212 |
apply (unfold hRe_def) |
|
213 |
apply (rule_tac f = "Abs_hypreal" in arg_cong) |
|
214 |
apply (auto , ultra) |
|
215 |
done |
|
216 |
||
217 |
lemma hIm: |
|
218 |
"hIm(Abs_hcomplex (hcomplexrel `` {X})) = |
|
219 |
Abs_hypreal(hyprel `` {%n. Im(X n)})" |
|
220 |
apply (unfold hIm_def) |
|
221 |
apply (rule_tac f = "Abs_hypreal" in arg_cong) |
|
222 |
apply (auto , ultra) |
|
223 |
done |
|
224 |
||
14335 | 225 |
lemma hcomplex_hRe_hIm_cancel_iff: |
226 |
"(w=z) = (hRe(w) = hRe(z) & hIm(w) = hIm(z))" |
|
14314 | 227 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
228 |
apply (rule_tac z = "w" in eq_Abs_hcomplex) |
|
229 |
apply (auto simp add: hRe hIm complex_Re_Im_cancel_iff) |
|
230 |
apply (ultra+) |
|
231 |
done |
|
232 |
||
233 |
lemma hcomplex_hRe_zero: "hRe 0 = 0" |
|
234 |
apply (unfold hcomplex_zero_def) |
|
235 |
apply (simp (no_asm) add: hRe hypreal_zero_num) |
|
236 |
done |
|
237 |
declare hcomplex_hRe_zero [simp] |
|
238 |
||
239 |
lemma hcomplex_hIm_zero: "hIm 0 = 0" |
|
240 |
apply (unfold hcomplex_zero_def) |
|
241 |
apply (simp (no_asm) add: hIm hypreal_zero_num) |
|
242 |
done |
|
243 |
declare hcomplex_hIm_zero [simp] |
|
244 |
||
245 |
lemma hcomplex_hRe_one: "hRe 1 = 1" |
|
246 |
apply (unfold hcomplex_one_def) |
|
247 |
apply (simp (no_asm) add: hRe hypreal_one_num) |
|
248 |
done |
|
249 |
declare hcomplex_hRe_one [simp] |
|
250 |
||
251 |
lemma hcomplex_hIm_one: "hIm 1 = 0" |
|
252 |
apply (unfold hcomplex_one_def) |
|
253 |
apply (simp (no_asm) add: hIm hypreal_one_def hypreal_zero_num) |
|
254 |
done |
|
255 |
declare hcomplex_hIm_one [simp] |
|
256 |
||
257 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
258 |
subsection{*Addition for Nonstandard Complex Numbers*} |
14314 | 259 |
|
260 |
lemma hcomplex_add_congruent2: |
|
261 |
"congruent2 hcomplexrel (%X Y. hcomplexrel `` {%n. X n + Y n})" |
|
262 |
apply (unfold congruent2_def) |
|
263 |
apply safe |
|
264 |
apply (ultra+) |
|
265 |
done |
|
266 |
||
267 |
lemma hcomplex_add: |
|
268 |
"Abs_hcomplex(hcomplexrel``{%n. X n}) + Abs_hcomplex(hcomplexrel``{%n. Y n}) = |
|
269 |
Abs_hcomplex(hcomplexrel``{%n. X n + Y n})" |
|
270 |
apply (unfold hcomplex_add_def) |
|
271 |
apply (rule_tac f = "Abs_hcomplex" in arg_cong) |
|
14335 | 272 |
apply (auto, ultra) |
14314 | 273 |
done |
274 |
||
275 |
lemma hcomplex_add_commute: "(z::hcomplex) + w = w + z" |
|
276 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
277 |
apply (rule_tac z = "w" in eq_Abs_hcomplex) |
|
14335 | 278 |
apply (simp add: complex_add_commute hcomplex_add) |
14314 | 279 |
done |
280 |
||
281 |
lemma hcomplex_add_assoc: "((z1::hcomplex) + z2) + z3 = z1 + (z2 + z3)" |
|
282 |
apply (rule_tac z = "z1" in eq_Abs_hcomplex) |
|
283 |
apply (rule_tac z = "z2" in eq_Abs_hcomplex) |
|
284 |
apply (rule_tac z = "z3" in eq_Abs_hcomplex) |
|
14335 | 285 |
apply (simp add: hcomplex_add complex_add_assoc) |
14314 | 286 |
done |
287 |
||
288 |
lemma hcomplex_add_zero_left: "(0::hcomplex) + z = z" |
|
289 |
apply (unfold hcomplex_zero_def) |
|
290 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
291 |
apply (simp add: hcomplex_add) |
|
292 |
done |
|
293 |
||
294 |
lemma hcomplex_add_zero_right: "z + (0::hcomplex) = z" |
|
14335 | 295 |
apply (simp add: hcomplex_add_zero_left hcomplex_add_commute) |
14314 | 296 |
done |
297 |
||
298 |
lemma hRe_add: "hRe(x + y) = hRe(x) + hRe(y)" |
|
299 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
|
300 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
301 |
apply (auto simp add: hRe hcomplex_add hypreal_add complex_Re_add) |
|
302 |
done |
|
303 |
||
304 |
lemma hIm_add: "hIm(x + y) = hIm(x) + hIm(y)" |
|
305 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
|
306 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
307 |
apply (auto simp add: hIm hcomplex_add hypreal_add complex_Im_add) |
|
308 |
done |
|
309 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
310 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
311 |
subsection{*Additive Inverse on Nonstandard Complex Numbers*} |
14314 | 312 |
|
313 |
lemma hcomplex_minus_congruent: |
|
314 |
"congruent hcomplexrel (%X. hcomplexrel `` {%n. - (X n)})" |
|
315 |
apply (unfold congruent_def) |
|
316 |
apply safe |
|
317 |
apply (ultra+) |
|
318 |
done |
|
319 |
||
320 |
lemma hcomplex_minus: |
|
321 |
"- (Abs_hcomplex(hcomplexrel `` {%n. X n})) = |
|
322 |
Abs_hcomplex(hcomplexrel `` {%n. -(X n)})" |
|
323 |
apply (unfold hcomplex_minus_def) |
|
324 |
apply (rule_tac f = "Abs_hcomplex" in arg_cong) |
|
14335 | 325 |
apply (auto, ultra) |
14314 | 326 |
done |
327 |
||
328 |
lemma hcomplex_add_minus_left: "-z + z = (0::hcomplex)" |
|
329 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
330 |
apply (auto simp add: hcomplex_add hcomplex_minus hcomplex_zero_def) |
|
331 |
done |
|
14335 | 332 |
|
14314 | 333 |
|
334 |
subsection{*Multiplication for Nonstandard Complex Numbers*} |
|
335 |
||
336 |
lemma hcomplex_mult: |
|
14335 | 337 |
"Abs_hcomplex(hcomplexrel``{%n. X n}) * |
338 |
Abs_hcomplex(hcomplexrel``{%n. Y n}) = |
|
14314 | 339 |
Abs_hcomplex(hcomplexrel``{%n. X n * Y n})" |
340 |
apply (unfold hcomplex_mult_def) |
|
341 |
apply (rule_tac f = "Abs_hcomplex" in arg_cong) |
|
14335 | 342 |
apply (auto, ultra) |
14314 | 343 |
done |
344 |
||
345 |
lemma hcomplex_mult_commute: "(w::hcomplex) * z = z * w" |
|
346 |
apply (rule_tac z = "w" in eq_Abs_hcomplex) |
|
347 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
348 |
apply (auto simp add: hcomplex_mult complex_mult_commute) |
|
349 |
done |
|
350 |
||
351 |
lemma hcomplex_mult_assoc: "((u::hcomplex) * v) * w = u * (v * w)" |
|
352 |
apply (rule_tac z = "u" in eq_Abs_hcomplex) |
|
353 |
apply (rule_tac z = "v" in eq_Abs_hcomplex) |
|
354 |
apply (rule_tac z = "w" in eq_Abs_hcomplex) |
|
355 |
apply (auto simp add: hcomplex_mult complex_mult_assoc) |
|
356 |
done |
|
357 |
||
358 |
lemma hcomplex_mult_one_left: "(1::hcomplex) * z = z" |
|
359 |
apply (unfold hcomplex_one_def) |
|
360 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
361 |
apply (auto simp add: hcomplex_mult) |
|
362 |
done |
|
363 |
||
364 |
lemma hcomplex_mult_zero_left: "(0::hcomplex) * z = 0" |
|
365 |
apply (unfold hcomplex_zero_def) |
|
366 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
367 |
apply (auto simp add: hcomplex_mult) |
|
368 |
done |
|
369 |
||
14335 | 370 |
lemma hcomplex_add_mult_distrib: |
371 |
"((z1::hcomplex) + z2) * w = (z1 * w) + (z2 * w)" |
|
14314 | 372 |
apply (rule_tac z = "z1" in eq_Abs_hcomplex) |
373 |
apply (rule_tac z = "z2" in eq_Abs_hcomplex) |
|
374 |
apply (rule_tac z = "w" in eq_Abs_hcomplex) |
|
14373 | 375 |
apply (auto simp add: hcomplex_mult hcomplex_add left_distrib) |
14314 | 376 |
done |
377 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
378 |
lemma hcomplex_zero_not_eq_one: "(0::hcomplex) \<noteq> (1::hcomplex)" |
14314 | 379 |
apply (unfold hcomplex_zero_def hcomplex_one_def) |
380 |
apply auto |
|
381 |
done |
|
382 |
declare hcomplex_zero_not_eq_one [simp] |
|
383 |
declare hcomplex_zero_not_eq_one [THEN not_sym, simp] |
|
384 |
||
385 |
||
386 |
subsection{*Inverse of Nonstandard Complex Number*} |
|
387 |
||
388 |
lemma hcomplex_inverse: |
|
389 |
"inverse (Abs_hcomplex(hcomplexrel `` {%n. X n})) = |
|
390 |
Abs_hcomplex(hcomplexrel `` {%n. inverse (X n)})" |
|
391 |
apply (unfold hcinv_def) |
|
392 |
apply (rule_tac f = "Abs_hcomplex" in arg_cong) |
|
14335 | 393 |
apply (auto, ultra) |
14314 | 394 |
done |
395 |
||
396 |
lemma hcomplex_mult_inv_left: |
|
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
397 |
"z \<noteq> (0::hcomplex) ==> inverse(z) * z = (1::hcomplex)" |
14314 | 398 |
apply (unfold hcomplex_zero_def hcomplex_one_def) |
399 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
400 |
apply (auto simp add: hcomplex_inverse hcomplex_mult) |
|
401 |
apply (ultra) |
|
402 |
apply (rule ccontr) |
|
14373 | 403 |
apply (drule left_inverse) |
14314 | 404 |
apply auto |
405 |
done |
|
406 |
||
14318 | 407 |
subsection {* The Field of Nonstandard Complex Numbers *} |
408 |
||
409 |
instance hcomplex :: field |
|
410 |
proof |
|
411 |
fix z u v w :: hcomplex |
|
412 |
show "(u + v) + w = u + (v + w)" |
|
413 |
by (simp add: hcomplex_add_assoc) |
|
414 |
show "z + w = w + z" |
|
415 |
by (simp add: hcomplex_add_commute) |
|
416 |
show "0 + z = z" |
|
14335 | 417 |
by (simp add: hcomplex_add_zero_left) |
14318 | 418 |
show "-z + z = 0" |
14335 | 419 |
by (simp add: hcomplex_add_minus_left) |
14318 | 420 |
show "z - w = z + -w" |
421 |
by (simp add: hcomplex_diff_def) |
|
422 |
show "(u * v) * w = u * (v * w)" |
|
423 |
by (simp add: hcomplex_mult_assoc) |
|
424 |
show "z * w = w * z" |
|
425 |
by (simp add: hcomplex_mult_commute) |
|
426 |
show "1 * z = z" |
|
14335 | 427 |
by (simp add: hcomplex_mult_one_left) |
14318 | 428 |
show "0 \<noteq> (1::hcomplex)" |
429 |
by (rule hcomplex_zero_not_eq_one) |
|
430 |
show "(u + v) * w = u * w + v * w" |
|
431 |
by (simp add: hcomplex_add_mult_distrib) |
|
14341
a09441bd4f1e
Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents:
14336
diff
changeset
|
432 |
show "z+u = z+v ==> u=v" |
a09441bd4f1e
Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents:
14336
diff
changeset
|
433 |
proof - |
a09441bd4f1e
Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents:
14336
diff
changeset
|
434 |
assume eq: "z+u = z+v" |
a09441bd4f1e
Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents:
14336
diff
changeset
|
435 |
hence "(-z + z) + u = (-z + z) + v" by (simp only: eq hcomplex_add_assoc) |
a09441bd4f1e
Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents:
14336
diff
changeset
|
436 |
thus "u = v" |
a09441bd4f1e
Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents:
14336
diff
changeset
|
437 |
by (simp only: hcomplex_add_minus_left hcomplex_add_zero_left) |
a09441bd4f1e
Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents:
14336
diff
changeset
|
438 |
qed |
14318 | 439 |
assume neq: "w \<noteq> 0" |
440 |
thus "z / w = z * inverse w" |
|
441 |
by (simp add: hcomplex_divide_def) |
|
442 |
show "inverse w * w = 1" |
|
443 |
by (rule hcomplex_mult_inv_left) |
|
444 |
qed |
|
445 |
||
446 |
lemma HCOMPLEX_INVERSE_ZERO: "inverse (0::hcomplex) = 0" |
|
14335 | 447 |
apply (simp add: hcomplex_zero_def hcomplex_inverse) |
14314 | 448 |
done |
14318 | 449 |
|
450 |
lemma HCOMPLEX_DIVISION_BY_ZERO: "a / (0::hcomplex) = 0" |
|
14335 | 451 |
apply (simp add: hcomplex_divide_def HCOMPLEX_INVERSE_ZERO) |
14318 | 452 |
done |
453 |
||
454 |
instance hcomplex :: division_by_zero |
|
455 |
proof |
|
456 |
fix x :: hcomplex |
|
457 |
show "inverse 0 = (0::hcomplex)" by (rule HCOMPLEX_INVERSE_ZERO) |
|
458 |
show "x/0 = 0" by (rule HCOMPLEX_DIVISION_BY_ZERO) |
|
459 |
qed |
|
14314 | 460 |
|
14318 | 461 |
subsection{*More Minus Laws*} |
462 |
||
463 |
lemma inj_hcomplex_minus: "inj(%z::hcomplex. -z)" |
|
464 |
apply (rule inj_onI) |
|
465 |
apply (drule_tac f = "uminus" in arg_cong) |
|
466 |
apply simp |
|
467 |
done |
|
468 |
||
469 |
lemma hRe_minus: "hRe(-z) = - hRe(z)" |
|
470 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
471 |
apply (auto simp add: hRe hcomplex_minus hypreal_minus complex_Re_minus) |
|
472 |
done |
|
473 |
||
474 |
lemma hIm_minus: "hIm(-z) = - hIm(z)" |
|
475 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
476 |
apply (auto simp add: hIm hcomplex_minus hypreal_minus complex_Im_minus) |
|
477 |
done |
|
478 |
||
479 |
lemma hcomplex_add_minus_eq_minus: |
|
480 |
"x + y = (0::hcomplex) ==> x = -y" |
|
481 |
apply (drule Ring_and_Field.equals_zero_I) |
|
482 |
apply (simp add: minus_equation_iff [of x y]) |
|
483 |
done |
|
484 |
||
485 |
||
486 |
subsection{*More Multiplication Laws*} |
|
487 |
||
488 |
lemma hcomplex_mult_one_right: "z * (1::hcomplex) = z" |
|
489 |
apply (rule Ring_and_Field.mult_1_right) |
|
490 |
done |
|
491 |
||
492 |
lemma hcomplex_mult_minus_one: "- 1 * (z::hcomplex) = -z" |
|
493 |
apply (simp (no_asm)) |
|
494 |
done |
|
495 |
declare hcomplex_mult_minus_one [simp] |
|
496 |
||
497 |
lemma hcomplex_mult_minus_one_right: "(z::hcomplex) * - 1 = -z" |
|
498 |
apply (subst hcomplex_mult_commute) |
|
499 |
apply (simp (no_asm)) |
|
500 |
done |
|
501 |
declare hcomplex_mult_minus_one_right [simp] |
|
502 |
||
14335 | 503 |
lemma hcomplex_mult_left_cancel: |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
504 |
"(c::hcomplex) \<noteq> (0::hcomplex) ==> (c*a=c*b) = (a=b)" |
14335 | 505 |
by (simp add: field_mult_cancel_left) |
14314 | 506 |
|
14335 | 507 |
lemma hcomplex_mult_right_cancel: |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
508 |
"(c::hcomplex) \<noteq> (0::hcomplex) ==> (a*c=b*c) = (a=b)" |
14335 | 509 |
apply (simp add: Ring_and_Field.field_mult_cancel_right); |
14314 | 510 |
done |
511 |
||
512 |
||
14318 | 513 |
subsection{*Subraction and Division*} |
14314 | 514 |
|
14318 | 515 |
lemma hcomplex_diff: |
516 |
"Abs_hcomplex(hcomplexrel``{%n. X n}) - Abs_hcomplex(hcomplexrel``{%n. Y n}) = |
|
517 |
Abs_hcomplex(hcomplexrel``{%n. X n - Y n})" |
|
518 |
apply (unfold hcomplex_diff_def) |
|
519 |
apply (auto simp add: hcomplex_minus hcomplex_add complex_diff_def) |
|
14314 | 520 |
done |
521 |
||
14318 | 522 |
lemma hcomplex_diff_eq_eq: "((x::hcomplex) - y = z) = (x = z + y)" |
523 |
apply (rule Ring_and_Field.diff_eq_eq) |
|
14314 | 524 |
done |
525 |
||
526 |
lemma hcomplex_add_divide_distrib: "(x+y)/(z::hcomplex) = x/z + y/z" |
|
14318 | 527 |
apply (rule Ring_and_Field.add_divide_distrib) |
14314 | 528 |
done |
529 |
||
530 |
||
531 |
subsection{*Embedding Properties for @{term hcomplex_of_hypreal} Map*} |
|
532 |
||
533 |
lemma hcomplex_of_hypreal: |
|
534 |
"hcomplex_of_hypreal (Abs_hypreal(hyprel `` {%n. X n})) = |
|
535 |
Abs_hcomplex(hcomplexrel `` {%n. complex_of_real (X n)})" |
|
536 |
apply (unfold hcomplex_of_hypreal_def) |
|
537 |
apply (rule_tac f = "Abs_hcomplex" in arg_cong) |
|
538 |
apply auto |
|
539 |
apply (ultra) |
|
540 |
done |
|
541 |
||
542 |
lemma inj_hcomplex_of_hypreal: "inj hcomplex_of_hypreal" |
|
543 |
apply (rule inj_onI) |
|
544 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
|
545 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
546 |
apply (auto simp add: hcomplex_of_hypreal) |
|
547 |
done |
|
548 |
||
14335 | 549 |
lemma hcomplex_of_hypreal_cancel_iff: |
550 |
"(hcomplex_of_hypreal x = hcomplex_of_hypreal y) = (x = y)" |
|
14314 | 551 |
apply (auto dest: inj_hcomplex_of_hypreal [THEN injD]) |
552 |
done |
|
553 |
declare hcomplex_of_hypreal_cancel_iff [iff] |
|
554 |
||
14335 | 555 |
lemma hcomplex_of_hypreal_minus: |
556 |
"hcomplex_of_hypreal(-x) = - hcomplex_of_hypreal x" |
|
14314 | 557 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
558 |
apply (auto simp add: hcomplex_of_hypreal hcomplex_minus hypreal_minus complex_of_real_minus) |
|
559 |
done |
|
560 |
||
14335 | 561 |
lemma hcomplex_of_hypreal_inverse: |
562 |
"hcomplex_of_hypreal(inverse x) = inverse(hcomplex_of_hypreal x)" |
|
14314 | 563 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
564 |
apply (auto simp add: hcomplex_of_hypreal hypreal_inverse hcomplex_inverse complex_of_real_inverse) |
|
565 |
done |
|
566 |
||
14335 | 567 |
lemma hcomplex_of_hypreal_add: |
568 |
"hcomplex_of_hypreal x + hcomplex_of_hypreal y = |
|
14314 | 569 |
hcomplex_of_hypreal (x + y)" |
570 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
|
571 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
572 |
apply (auto simp add: hcomplex_of_hypreal hypreal_add hcomplex_add complex_of_real_add) |
|
573 |
done |
|
574 |
||
575 |
lemma hcomplex_of_hypreal_diff: |
|
576 |
"hcomplex_of_hypreal x - hcomplex_of_hypreal y = |
|
577 |
hcomplex_of_hypreal (x - y)" |
|
578 |
apply (unfold hcomplex_diff_def) |
|
579 |
apply (auto simp add: hcomplex_of_hypreal_minus [symmetric] hcomplex_of_hypreal_add hypreal_diff_def) |
|
580 |
done |
|
581 |
||
14335 | 582 |
lemma hcomplex_of_hypreal_mult: |
583 |
"hcomplex_of_hypreal x * hcomplex_of_hypreal y = |
|
14314 | 584 |
hcomplex_of_hypreal (x * y)" |
585 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
|
586 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
14335 | 587 |
apply (auto simp add: hcomplex_of_hypreal hypreal_mult hcomplex_mult |
588 |
complex_of_real_mult) |
|
14314 | 589 |
done |
590 |
||
591 |
lemma hcomplex_of_hypreal_divide: |
|
592 |
"hcomplex_of_hypreal x / hcomplex_of_hypreal y = hcomplex_of_hypreal(x/y)" |
|
593 |
apply (unfold hcomplex_divide_def) |
|
594 |
apply (case_tac "y=0") |
|
14335 | 595 |
apply (simp) |
14314 | 596 |
apply (auto simp add: hcomplex_of_hypreal_mult hcomplex_of_hypreal_inverse [symmetric]) |
597 |
apply (simp (no_asm) add: hypreal_divide_def) |
|
598 |
done |
|
599 |
||
600 |
lemma hcomplex_of_hypreal_one [simp]: |
|
601 |
"hcomplex_of_hypreal 1 = 1" |
|
602 |
apply (unfold hcomplex_one_def) |
|
603 |
apply (auto simp add: hcomplex_of_hypreal hypreal_one_num) |
|
604 |
done |
|
605 |
||
606 |
lemma hcomplex_of_hypreal_zero [simp]: |
|
607 |
"hcomplex_of_hypreal 0 = 0" |
|
608 |
apply (unfold hcomplex_zero_def hypreal_zero_def) |
|
609 |
apply (auto simp add: hcomplex_of_hypreal) |
|
610 |
done |
|
611 |
||
612 |
lemma hRe_hcomplex_of_hypreal: "hRe(hcomplex_of_hypreal z) = z" |
|
613 |
apply (rule_tac z = "z" in eq_Abs_hypreal) |
|
614 |
apply (auto simp add: hcomplex_of_hypreal hRe) |
|
615 |
done |
|
616 |
declare hRe_hcomplex_of_hypreal [simp] |
|
617 |
||
618 |
lemma hIm_hcomplex_of_hypreal: "hIm(hcomplex_of_hypreal z) = 0" |
|
619 |
apply (rule_tac z = "z" in eq_Abs_hypreal) |
|
620 |
apply (auto simp add: hcomplex_of_hypreal hIm hypreal_zero_num) |
|
621 |
done |
|
622 |
declare hIm_hcomplex_of_hypreal [simp] |
|
623 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
624 |
lemma hcomplex_of_hypreal_epsilon_not_zero: "hcomplex_of_hypreal epsilon \<noteq> 0" |
14314 | 625 |
apply (auto simp add: hcomplex_of_hypreal epsilon_def hcomplex_zero_def) |
626 |
done |
|
627 |
declare hcomplex_of_hypreal_epsilon_not_zero [simp] |
|
628 |
||
14318 | 629 |
|
630 |
subsection{*Modulus (Absolute Value) of Nonstandard Complex Number*} |
|
14314 | 631 |
|
632 |
lemma hcmod: |
|
633 |
"hcmod (Abs_hcomplex(hcomplexrel `` {%n. X n})) = |
|
634 |
Abs_hypreal(hyprel `` {%n. cmod (X n)})" |
|
635 |
||
636 |
apply (unfold hcmod_def) |
|
637 |
apply (rule_tac f = "Abs_hypreal" in arg_cong) |
|
14335 | 638 |
apply (auto, ultra) |
14314 | 639 |
done |
640 |
||
641 |
lemma hcmod_zero [simp]: |
|
642 |
"hcmod(0) = 0" |
|
643 |
apply (unfold hcomplex_zero_def hypreal_zero_def) |
|
644 |
apply (auto simp add: hcmod) |
|
645 |
done |
|
646 |
||
647 |
lemma hcmod_one: |
|
648 |
"hcmod(1) = 1" |
|
649 |
apply (unfold hcomplex_one_def) |
|
650 |
apply (auto simp add: hcmod hypreal_one_num) |
|
651 |
done |
|
652 |
declare hcmod_one [simp] |
|
653 |
||
654 |
lemma hcmod_hcomplex_of_hypreal: "hcmod(hcomplex_of_hypreal x) = abs x" |
|
655 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
|
656 |
apply (auto simp add: hcmod hcomplex_of_hypreal hypreal_hrabs) |
|
657 |
done |
|
658 |
declare hcmod_hcomplex_of_hypreal [simp] |
|
659 |
||
14335 | 660 |
lemma hcomplex_of_hypreal_abs: |
661 |
"hcomplex_of_hypreal (abs x) = |
|
14314 | 662 |
hcomplex_of_hypreal(hcmod(hcomplex_of_hypreal x))" |
663 |
apply (simp (no_asm)) |
|
664 |
done |
|
665 |
||
666 |
||
667 |
subsection{*Conjugation*} |
|
668 |
||
669 |
lemma hcnj: |
|
670 |
"hcnj (Abs_hcomplex(hcomplexrel `` {%n. X n})) = |
|
14318 | 671 |
Abs_hcomplex(hcomplexrel `` {%n. cnj(X n)})" |
14314 | 672 |
apply (unfold hcnj_def) |
673 |
apply (rule_tac f = "Abs_hcomplex" in arg_cong) |
|
14335 | 674 |
apply (auto, ultra) |
14314 | 675 |
done |
676 |
||
677 |
lemma inj_hcnj: "inj hcnj" |
|
678 |
apply (rule inj_onI) |
|
679 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
|
680 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
681 |
apply (auto simp add: hcnj) |
|
682 |
done |
|
683 |
||
684 |
lemma hcomplex_hcnj_cancel_iff: "(hcnj x = hcnj y) = (x = y)" |
|
685 |
apply (auto dest: inj_hcnj [THEN injD]) |
|
686 |
done |
|
687 |
declare hcomplex_hcnj_cancel_iff [simp] |
|
688 |
||
689 |
lemma hcomplex_hcnj_hcnj: "hcnj (hcnj z) = z" |
|
690 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
691 |
apply (auto simp add: hcnj) |
|
692 |
done |
|
693 |
declare hcomplex_hcnj_hcnj [simp] |
|
694 |
||
14335 | 695 |
lemma hcomplex_hcnj_hcomplex_of_hypreal: |
696 |
"hcnj (hcomplex_of_hypreal x) = hcomplex_of_hypreal x" |
|
14314 | 697 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
698 |
apply (auto simp add: hcnj hcomplex_of_hypreal) |
|
699 |
done |
|
700 |
declare hcomplex_hcnj_hcomplex_of_hypreal [simp] |
|
701 |
||
702 |
lemma hcomplex_hmod_hcnj: "hcmod (hcnj z) = hcmod z" |
|
703 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
704 |
apply (auto simp add: hcnj hcmod) |
|
705 |
done |
|
706 |
declare hcomplex_hmod_hcnj [simp] |
|
707 |
||
708 |
lemma hcomplex_hcnj_minus: "hcnj (-z) = - hcnj z" |
|
709 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
710 |
apply (auto simp add: hcnj hcomplex_minus complex_cnj_minus) |
|
711 |
done |
|
712 |
||
713 |
lemma hcomplex_hcnj_inverse: "hcnj(inverse z) = inverse(hcnj z)" |
|
714 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
715 |
apply (auto simp add: hcnj hcomplex_inverse complex_cnj_inverse) |
|
716 |
done |
|
717 |
||
718 |
lemma hcomplex_hcnj_add: "hcnj(w + z) = hcnj(w) + hcnj(z)" |
|
719 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
720 |
apply (rule_tac z = "w" in eq_Abs_hcomplex) |
|
721 |
apply (auto simp add: hcnj hcomplex_add complex_cnj_add) |
|
722 |
done |
|
723 |
||
724 |
lemma hcomplex_hcnj_diff: "hcnj(w - z) = hcnj(w) - hcnj(z)" |
|
725 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
726 |
apply (rule_tac z = "w" in eq_Abs_hcomplex) |
|
727 |
apply (auto simp add: hcnj hcomplex_diff complex_cnj_diff) |
|
728 |
done |
|
729 |
||
730 |
lemma hcomplex_hcnj_mult: "hcnj(w * z) = hcnj(w) * hcnj(z)" |
|
731 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
732 |
apply (rule_tac z = "w" in eq_Abs_hcomplex) |
|
733 |
apply (auto simp add: hcnj hcomplex_mult complex_cnj_mult) |
|
734 |
done |
|
735 |
||
736 |
lemma hcomplex_hcnj_divide: "hcnj(w / z) = (hcnj w)/(hcnj z)" |
|
737 |
apply (unfold hcomplex_divide_def) |
|
738 |
apply (simp (no_asm) add: hcomplex_hcnj_mult hcomplex_hcnj_inverse) |
|
739 |
done |
|
740 |
||
741 |
lemma hcnj_one: "hcnj 1 = 1" |
|
742 |
apply (unfold hcomplex_one_def) |
|
743 |
apply (simp (no_asm) add: hcnj) |
|
744 |
done |
|
745 |
declare hcnj_one [simp] |
|
746 |
||
747 |
lemma hcomplex_hcnj_zero: |
|
748 |
"hcnj 0 = 0" |
|
749 |
apply (unfold hcomplex_zero_def) |
|
750 |
apply (auto simp add: hcnj) |
|
751 |
done |
|
752 |
declare hcomplex_hcnj_zero [simp] |
|
753 |
||
754 |
lemma hcomplex_hcnj_zero_iff: "(hcnj z = 0) = (z = 0)" |
|
755 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
756 |
apply (auto simp add: hcomplex_zero_def hcnj) |
|
757 |
done |
|
758 |
declare hcomplex_hcnj_zero_iff [iff] |
|
759 |
||
14335 | 760 |
lemma hcomplex_mult_hcnj: |
761 |
"z * hcnj z = hcomplex_of_hypreal (hRe(z) ^ 2 + hIm(z) ^ 2)" |
|
14314 | 762 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
14323 | 763 |
apply (auto simp add: hcnj hcomplex_mult hcomplex_of_hypreal hRe hIm hypreal_add hypreal_mult complex_mult_cnj numeral_2_eq_2) |
14314 | 764 |
done |
765 |
||
766 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
767 |
subsection{*More Theorems about the Function @{term hcmod}*} |
14314 | 768 |
|
769 |
lemma hcomplex_hcmod_eq_zero_cancel: "(hcmod x = 0) = (x = 0)" |
|
770 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
|
771 |
apply (auto simp add: hcmod hcomplex_zero_def hypreal_zero_num) |
|
772 |
done |
|
773 |
declare hcomplex_hcmod_eq_zero_cancel [simp] |
|
774 |
||
14335 | 775 |
lemma hcmod_hcomplex_of_hypreal_of_nat: |
776 |
"hcmod (hcomplex_of_hypreal(hypreal_of_nat n)) = hypreal_of_nat n" |
|
14371
c78c7da09519
Conversion of HyperNat to Isar format and its declaration as a semiring
paulson
parents:
14370
diff
changeset
|
777 |
apply (simp add: abs_if linorder_not_less) |
14314 | 778 |
done |
779 |
declare hcmod_hcomplex_of_hypreal_of_nat [simp] |
|
780 |
||
14335 | 781 |
lemma hcmod_hcomplex_of_hypreal_of_hypnat: |
782 |
"hcmod (hcomplex_of_hypreal(hypreal_of_hypnat n)) = hypreal_of_hypnat n" |
|
14371
c78c7da09519
Conversion of HyperNat to Isar format and its declaration as a semiring
paulson
parents:
14370
diff
changeset
|
783 |
apply (simp add: abs_if linorder_not_less) |
14314 | 784 |
done |
785 |
declare hcmod_hcomplex_of_hypreal_of_hypnat [simp] |
|
786 |
||
787 |
lemma hcmod_minus: "hcmod (-x) = hcmod(x)" |
|
788 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
|
789 |
apply (auto simp add: hcmod hcomplex_minus) |
|
790 |
done |
|
791 |
declare hcmod_minus [simp] |
|
792 |
||
793 |
lemma hcmod_mult_hcnj: "hcmod(z * hcnj(z)) = hcmod(z) ^ 2" |
|
794 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
14323 | 795 |
apply (auto simp add: hcmod hcomplex_mult hcnj hypreal_mult complex_mod_mult_cnj numeral_2_eq_2) |
14314 | 796 |
done |
797 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
798 |
lemma hcmod_ge_zero: "(0::hypreal) \<le> hcmod x" |
14314 | 799 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
800 |
apply (auto simp add: hcmod hypreal_zero_num hypreal_le) |
|
801 |
done |
|
802 |
declare hcmod_ge_zero [simp] |
|
803 |
||
14371
c78c7da09519
Conversion of HyperNat to Isar format and its declaration as a semiring
paulson
parents:
14370
diff
changeset
|
804 |
lemma hrabs_hcmod_cancel: "abs(hcmod x) = hcmod x" |
c78c7da09519
Conversion of HyperNat to Isar format and its declaration as a semiring
paulson
parents:
14370
diff
changeset
|
805 |
apply (simp add: abs_if linorder_not_less) |
14314 | 806 |
done |
807 |
declare hrabs_hcmod_cancel [simp] |
|
808 |
||
809 |
lemma hcmod_mult: "hcmod(x*y) = hcmod(x) * hcmod(y)" |
|
810 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
|
811 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
812 |
apply (auto simp add: hcmod hcomplex_mult hypreal_mult complex_mod_mult) |
|
813 |
done |
|
814 |
||
815 |
lemma hcmod_add_squared_eq: |
|
816 |
"hcmod(x + y) ^ 2 = hcmod(x) ^ 2 + hcmod(y) ^ 2 + 2 * hRe(x * hcnj y)" |
|
817 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
|
818 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
819 |
apply (auto simp add: hcmod hcomplex_add hypreal_mult hRe hcnj hcomplex_mult |
|
14323 | 820 |
numeral_2_eq_2 realpow_two [symmetric] |
14314 | 821 |
simp del: realpow_Suc) |
14323 | 822 |
apply (auto simp add: numeral_2_eq_2 [symmetric] complex_mod_add_squared_eq |
14314 | 823 |
hypreal_add [symmetric] hypreal_mult [symmetric] |
824 |
hypreal_of_real_def [symmetric]) |
|
825 |
done |
|
826 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
827 |
lemma hcomplex_hRe_mult_hcnj_le_hcmod: "hRe(x * hcnj y) \<le> hcmod(x * hcnj y)" |
14314 | 828 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
829 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
830 |
apply (auto simp add: hcmod hcnj hcomplex_mult hRe hypreal_le) |
|
831 |
done |
|
832 |
declare hcomplex_hRe_mult_hcnj_le_hcmod [simp] |
|
833 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
834 |
lemma hcomplex_hRe_mult_hcnj_le_hcmod2: "hRe(x * hcnj y) \<le> hcmod(x * y)" |
14314 | 835 |
apply (cut_tac x = "x" and y = "y" in hcomplex_hRe_mult_hcnj_le_hcmod) |
836 |
apply (simp add: hcmod_mult) |
|
837 |
done |
|
838 |
declare hcomplex_hRe_mult_hcnj_le_hcmod2 [simp] |
|
839 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
840 |
lemma hcmod_triangle_squared: "hcmod (x + y) ^ 2 \<le> (hcmod(x) + hcmod(y)) ^ 2" |
14314 | 841 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
842 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
843 |
apply (auto simp add: hcmod hcnj hcomplex_add hypreal_mult hypreal_add |
|
14323 | 844 |
hypreal_le realpow_two [symmetric] numeral_2_eq_2 |
14314 | 845 |
simp del: realpow_Suc) |
14323 | 846 |
apply (simp (no_asm) add: numeral_2_eq_2 [symmetric]) |
14314 | 847 |
done |
848 |
declare hcmod_triangle_squared [simp] |
|
849 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
850 |
lemma hcmod_triangle_ineq: "hcmod (x + y) \<le> hcmod(x) + hcmod(y)" |
14314 | 851 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
852 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
853 |
apply (auto simp add: hcmod hcomplex_add hypreal_add hypreal_le) |
|
854 |
done |
|
855 |
declare hcmod_triangle_ineq [simp] |
|
856 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
857 |
lemma hcmod_triangle_ineq2: "hcmod(b + a) - hcmod b \<le> hcmod a" |
14314 | 858 |
apply (cut_tac x1 = "b" and y1 = "a" and c = "-hcmod b" in hcmod_triangle_ineq [THEN add_right_mono]) |
14331 | 859 |
apply (simp add: add_ac) |
14314 | 860 |
done |
861 |
declare hcmod_triangle_ineq2 [simp] |
|
862 |
||
863 |
lemma hcmod_diff_commute: "hcmod (x - y) = hcmod (y - x)" |
|
864 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
|
865 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
866 |
apply (auto simp add: hcmod hcomplex_diff complex_mod_diff_commute) |
|
867 |
done |
|
868 |
||
14335 | 869 |
lemma hcmod_add_less: |
870 |
"[| hcmod x < r; hcmod y < s |] ==> hcmod (x + y) < r + s" |
|
14314 | 871 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
872 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
873 |
apply (rule_tac z = "r" in eq_Abs_hypreal) |
|
874 |
apply (rule_tac z = "s" in eq_Abs_hypreal) |
|
875 |
apply (auto simp add: hcmod hcomplex_add hypreal_add hypreal_less) |
|
876 |
apply ultra |
|
877 |
apply (auto intro: complex_mod_add_less) |
|
878 |
done |
|
879 |
||
14335 | 880 |
lemma hcmod_mult_less: |
881 |
"[| hcmod x < r; hcmod y < s |] ==> hcmod (x * y) < r * s" |
|
14314 | 882 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
883 |
apply (rule_tac z = "y" in eq_Abs_hcomplex) |
|
884 |
apply (rule_tac z = "r" in eq_Abs_hypreal) |
|
885 |
apply (rule_tac z = "s" in eq_Abs_hypreal) |
|
886 |
apply (auto simp add: hcmod hypreal_mult hypreal_less hcomplex_mult) |
|
887 |
apply ultra |
|
888 |
apply (auto intro: complex_mod_mult_less) |
|
889 |
done |
|
890 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
891 |
lemma hcmod_diff_ineq: "hcmod(a) - hcmod(b) \<le> hcmod(a + b)" |
14314 | 892 |
apply (rule_tac z = "a" in eq_Abs_hcomplex) |
893 |
apply (rule_tac z = "b" in eq_Abs_hcomplex) |
|
894 |
apply (auto simp add: hcmod hcomplex_add hypreal_diff hypreal_le) |
|
895 |
done |
|
896 |
declare hcmod_diff_ineq [simp] |
|
897 |
||
898 |
||
899 |
||
900 |
subsection{*A Few Nonlinear Theorems*} |
|
901 |
||
902 |
lemma hcpow: |
|
903 |
"Abs_hcomplex(hcomplexrel``{%n. X n}) hcpow |
|
904 |
Abs_hypnat(hypnatrel``{%n. Y n}) = |
|
905 |
Abs_hcomplex(hcomplexrel``{%n. X n ^ Y n})" |
|
906 |
apply (unfold hcpow_def) |
|
907 |
apply (rule_tac f = "Abs_hcomplex" in arg_cong) |
|
14335 | 908 |
apply (auto, ultra) |
14314 | 909 |
done |
910 |
||
14335 | 911 |
lemma hcomplex_of_hypreal_hyperpow: |
912 |
"hcomplex_of_hypreal (x pow n) = (hcomplex_of_hypreal x) hcpow n" |
|
14314 | 913 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
914 |
apply (rule_tac z = "n" in eq_Abs_hypnat) |
|
915 |
apply (auto simp add: hcomplex_of_hypreal hyperpow hcpow complex_of_real_pow) |
|
916 |
done |
|
917 |
||
918 |
lemma hcmod_hcpow: "hcmod(x hcpow n) = hcmod(x) pow n" |
|
919 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
|
920 |
apply (rule_tac z = "n" in eq_Abs_hypnat) |
|
921 |
apply (auto simp add: hcpow hyperpow hcmod complex_mod_complexpow) |
|
922 |
done |
|
923 |
||
924 |
lemma hcmod_hcomplex_inverse: "hcmod(inverse x) = inverse(hcmod x)" |
|
925 |
apply (case_tac "x = 0", simp add: HCOMPLEX_INVERSE_ZERO) |
|
926 |
apply (rule_tac c1 = "hcmod x" in hypreal_mult_left_cancel [THEN iffD1]) |
|
927 |
apply (auto simp add: hcmod_mult [symmetric]) |
|
928 |
done |
|
929 |
||
930 |
lemma hcmod_divide: |
|
931 |
"hcmod(x/y) = hcmod(x)/(hcmod y)" |
|
932 |
apply (unfold hcomplex_divide_def hypreal_divide_def) |
|
933 |
apply (auto simp add: hcmod_mult hcmod_hcomplex_inverse) |
|
934 |
done |
|
935 |
||
936 |
lemma hcomplex_inverse_divide: |
|
937 |
"inverse(x/y) = y/(x::hcomplex)" |
|
938 |
apply (unfold hcomplex_divide_def) |
|
14318 | 939 |
apply (auto simp add: inverse_mult_distrib hcomplex_mult_commute) |
14314 | 940 |
done |
941 |
declare hcomplex_inverse_divide [simp] |
|
942 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
943 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
944 |
subsection{*Exponentiation*} |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
945 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
946 |
primrec |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
947 |
hcomplexpow_0: "z ^ 0 = 1" |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
948 |
hcomplexpow_Suc: "z ^ (Suc n) = (z::hcomplex) * (z ^ n)" |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
949 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
950 |
instance hcomplex :: ringpower |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
951 |
proof |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
952 |
fix z :: hcomplex |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
953 |
fix n :: nat |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
954 |
show "z^0 = 1" by simp |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
955 |
show "z^(Suc n) = z * (z^n)" by simp |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
956 |
qed |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
957 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
958 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
959 |
lemma hcomplex_of_hypreal_pow: |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
960 |
"hcomplex_of_hypreal (x ^ n) = (hcomplex_of_hypreal x) ^ n" |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
961 |
apply (induct_tac "n") |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
962 |
apply (auto simp add: hcomplex_of_hypreal_mult [symmetric]) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
963 |
done |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
964 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
965 |
lemma hcomplex_hcnj_pow: "hcnj(z ^ n) = hcnj(z) ^ n" |
14314 | 966 |
apply (induct_tac "n") |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
967 |
apply (auto simp add: hcomplex_hcnj_mult) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
968 |
done |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
969 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
970 |
lemma hcmod_hcomplexpow: "hcmod(x ^ n) = hcmod(x) ^ n" |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
971 |
apply (induct_tac "n") |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
972 |
apply (auto simp add: hcmod_mult) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
973 |
done |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
974 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
975 |
lemma hcomplexpow_minus: |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
976 |
"(-x::hcomplex) ^ n = (if even n then (x ^ n) else -(x ^ n))" |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
977 |
apply (induct_tac "n") |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
978 |
apply auto |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
979 |
done |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
980 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
981 |
lemma hcpow_minus: |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
982 |
"(-x::hcomplex) hcpow n = |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
983 |
(if ( *pNat* even) n then (x hcpow n) else -(x hcpow n))" |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
984 |
apply (rule_tac z = "x" in eq_Abs_hcomplex) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
985 |
apply (rule_tac z = "n" in eq_Abs_hypnat) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
986 |
apply (auto simp add: hcpow hyperpow starPNat hcomplex_minus) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
987 |
apply ultra |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
988 |
apply (auto simp add: complexpow_minus) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
989 |
apply ultra |
14314 | 990 |
done |
991 |
||
992 |
lemma hcpow_mult: "((r::hcomplex) * s) hcpow n = (r hcpow n) * (s hcpow n)" |
|
993 |
apply (rule_tac z = "r" in eq_Abs_hcomplex) |
|
994 |
apply (rule_tac z = "s" in eq_Abs_hcomplex) |
|
995 |
apply (rule_tac z = "n" in eq_Abs_hypnat) |
|
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
996 |
apply (auto simp add: hcpow hypreal_mult hcomplex_mult power_mult_distrib) |
14314 | 997 |
done |
998 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
999 |
lemma hcpow_zero [simp]: "0 hcpow (n + 1) = 0" |
14314 | 1000 |
apply (unfold hcomplex_zero_def hypnat_one_def) |
1001 |
apply (rule_tac z = "n" in eq_Abs_hypnat) |
|
1002 |
apply (auto simp add: hcpow hypnat_add) |
|
1003 |
done |
|
1004 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1005 |
lemma hcpow_zero2 [simp]: "0 hcpow (hSuc n) = 0" |
14314 | 1006 |
apply (unfold hSuc_def) |
1007 |
apply (simp (no_asm)) |
|
1008 |
done |
|
1009 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1010 |
lemma hcpow_not_zero [simp,intro]: "r \<noteq> 0 ==> r hcpow n \<noteq> (0::hcomplex)" |
14314 | 1011 |
apply (rule_tac z = "r" in eq_Abs_hcomplex) |
1012 |
apply (rule_tac z = "n" in eq_Abs_hypnat) |
|
1013 |
apply (auto simp add: hcpow hcomplex_zero_def) |
|
1014 |
apply ultra |
|
1015 |
done |
|
1016 |
||
1017 |
lemma hcpow_zero_zero: "r hcpow n = (0::hcomplex) ==> r = 0" |
|
1018 |
apply (blast intro: ccontr dest: hcpow_not_zero) |
|
1019 |
done |
|
1020 |
||
1021 |
lemma hcomplex_i_mult_eq: "iii * iii = - 1" |
|
1022 |
apply (unfold iii_def) |
|
1023 |
apply (auto simp add: hcomplex_mult hcomplex_one_def hcomplex_minus) |
|
1024 |
done |
|
1025 |
declare hcomplex_i_mult_eq [simp] |
|
1026 |
||
1027 |
lemma hcomplexpow_i_squared: "iii ^ 2 = - 1" |
|
14323 | 1028 |
apply (simp (no_asm) add: numeral_2_eq_2) |
14314 | 1029 |
done |
1030 |
declare hcomplexpow_i_squared [simp] |
|
1031 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1032 |
lemma hcomplex_i_not_zero: "iii \<noteq> 0" |
14314 | 1033 |
apply (unfold iii_def hcomplex_zero_def) |
1034 |
apply auto |
|
1035 |
done |
|
1036 |
declare hcomplex_i_not_zero [simp] |
|
1037 |
||
1038 |
lemma hcomplex_divide: |
|
1039 |
"Abs_hcomplex(hcomplexrel``{%n. X n}) / Abs_hcomplex(hcomplexrel``{%n. Y n}) = |
|
1040 |
Abs_hcomplex(hcomplexrel``{%n. X n / Y n})" |
|
1041 |
apply (unfold hcomplex_divide_def complex_divide_def) |
|
1042 |
apply (auto simp add: hcomplex_inverse hcomplex_mult) |
|
1043 |
done |
|
1044 |
||
1045 |
||
1046 |
subsection{*The Function @{term hsgn}*} |
|
1047 |
||
1048 |
lemma hsgn: |
|
1049 |
"hsgn (Abs_hcomplex(hcomplexrel `` {%n. X n})) = |
|
1050 |
Abs_hcomplex(hcomplexrel `` {%n. sgn (X n)})" |
|
1051 |
apply (unfold hsgn_def) |
|
1052 |
apply (rule_tac f = "Abs_hcomplex" in arg_cong) |
|
14335 | 1053 |
apply (auto, ultra) |
14314 | 1054 |
done |
1055 |
||
1056 |
lemma hsgn_zero: "hsgn 0 = 0" |
|
1057 |
apply (unfold hcomplex_zero_def) |
|
1058 |
apply (simp (no_asm) add: hsgn) |
|
1059 |
done |
|
1060 |
declare hsgn_zero [simp] |
|
1061 |
||
1062 |
||
1063 |
lemma hsgn_one: "hsgn 1 = 1" |
|
1064 |
apply (unfold hcomplex_one_def) |
|
1065 |
apply (simp (no_asm) add: hsgn) |
|
1066 |
done |
|
1067 |
declare hsgn_one [simp] |
|
1068 |
||
1069 |
lemma hsgn_minus: "hsgn (-z) = - hsgn(z)" |
|
1070 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
1071 |
apply (auto simp add: hsgn hcomplex_minus sgn_minus) |
|
1072 |
done |
|
1073 |
||
1074 |
lemma hsgn_eq: "hsgn z = z / hcomplex_of_hypreal (hcmod z)" |
|
1075 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
1076 |
apply (auto simp add: hsgn hcomplex_divide hcomplex_of_hypreal hcmod sgn_eq) |
|
1077 |
done |
|
1078 |
||
14335 | 1079 |
lemma lemma_hypreal_P_EX2: |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1080 |
"(\<exists>(x::hypreal) y. P x y) = |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1081 |
(\<exists>f g. P (Abs_hypreal(hyprel `` {f})) (Abs_hypreal(hyprel `` {g})))" |
14314 | 1082 |
apply auto |
1083 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
|
1084 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
1085 |
apply auto |
|
1086 |
done |
|
1087 |
||
14335 | 1088 |
lemma complex_split2: |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1089 |
"\<forall>(n::nat). \<exists>x y. (z n) = complex_of_real(x) + ii * complex_of_real(y)" |
14314 | 1090 |
apply (blast intro: complex_split) |
1091 |
done |
|
1092 |
||
1093 |
(* Interesting proof! *) |
|
14335 | 1094 |
lemma hcomplex_split: |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1095 |
"\<exists>x y. z = hcomplex_of_hypreal(x) + iii * hcomplex_of_hypreal(y)" |
14314 | 1096 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
1097 |
apply (auto simp add: lemma_hypreal_P_EX2 hcomplex_of_hypreal iii_def hcomplex_add hcomplex_mult) |
|
1098 |
apply (cut_tac z = "x" in complex_split2) |
|
14335 | 1099 |
apply (drule choice, safe)+ |
14314 | 1100 |
apply (rule_tac x = "f" in exI) |
1101 |
apply (rule_tac x = "fa" in exI) |
|
1102 |
apply auto |
|
1103 |
done |
|
1104 |
||
14335 | 1105 |
lemma hRe_hcomplex_i: |
1106 |
"hRe(hcomplex_of_hypreal(x) + iii * hcomplex_of_hypreal(y)) = x" |
|
14314 | 1107 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
1108 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
1109 |
apply (auto simp add: hRe iii_def hcomplex_add hcomplex_mult hcomplex_of_hypreal) |
|
1110 |
done |
|
1111 |
declare hRe_hcomplex_i [simp] |
|
1112 |
||
14335 | 1113 |
lemma hIm_hcomplex_i: |
1114 |
"hIm(hcomplex_of_hypreal(x) + iii * hcomplex_of_hypreal(y)) = y" |
|
14314 | 1115 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
1116 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
1117 |
apply (auto simp add: hIm iii_def hcomplex_add hcomplex_mult hcomplex_of_hypreal) |
|
1118 |
done |
|
1119 |
declare hIm_hcomplex_i [simp] |
|
1120 |
||
14335 | 1121 |
lemma hcmod_i: |
1122 |
"hcmod (hcomplex_of_hypreal(x) + iii * hcomplex_of_hypreal(y)) = |
|
14314 | 1123 |
( *f* sqrt) (x ^ 2 + y ^ 2)" |
1124 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
|
1125 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
14323 | 1126 |
apply (auto simp add: hcomplex_of_hypreal iii_def hcomplex_add hcomplex_mult starfun hypreal_mult hypreal_add hcmod cmod_i numeral_2_eq_2) |
14314 | 1127 |
done |
1128 |
||
1129 |
lemma hcomplex_eq_hRe_eq: |
|
1130 |
"hcomplex_of_hypreal xa + iii * hcomplex_of_hypreal ya = |
|
1131 |
hcomplex_of_hypreal xb + iii * hcomplex_of_hypreal yb |
|
1132 |
==> xa = xb" |
|
1133 |
apply (unfold iii_def) |
|
1134 |
apply (rule_tac z = "xa" in eq_Abs_hypreal) |
|
1135 |
apply (rule_tac z = "ya" in eq_Abs_hypreal) |
|
1136 |
apply (rule_tac z = "xb" in eq_Abs_hypreal) |
|
1137 |
apply (rule_tac z = "yb" in eq_Abs_hypreal) |
|
1138 |
apply (auto simp add: hcomplex_mult hcomplex_add hcomplex_of_hypreal) |
|
1139 |
apply (ultra) |
|
1140 |
done |
|
1141 |
||
1142 |
lemma hcomplex_eq_hIm_eq: |
|
1143 |
"hcomplex_of_hypreal xa + iii * hcomplex_of_hypreal ya = |
|
1144 |
hcomplex_of_hypreal xb + iii * hcomplex_of_hypreal yb |
|
1145 |
==> ya = yb" |
|
1146 |
apply (unfold iii_def) |
|
1147 |
apply (rule_tac z = "xa" in eq_Abs_hypreal) |
|
1148 |
apply (rule_tac z = "ya" in eq_Abs_hypreal) |
|
1149 |
apply (rule_tac z = "xb" in eq_Abs_hypreal) |
|
1150 |
apply (rule_tac z = "yb" in eq_Abs_hypreal) |
|
1151 |
apply (auto simp add: hcomplex_mult hcomplex_add hcomplex_of_hypreal) |
|
1152 |
apply (ultra) |
|
1153 |
done |
|
1154 |
||
14335 | 1155 |
lemma hcomplex_eq_cancel_iff: |
1156 |
"(hcomplex_of_hypreal xa + iii * hcomplex_of_hypreal ya = |
|
14314 | 1157 |
hcomplex_of_hypreal xb + iii * hcomplex_of_hypreal yb) = |
1158 |
((xa = xb) & (ya = yb))" |
|
1159 |
apply (auto intro: hcomplex_eq_hIm_eq hcomplex_eq_hRe_eq) |
|
1160 |
done |
|
1161 |
declare hcomplex_eq_cancel_iff [simp] |
|
1162 |
||
14335 | 1163 |
lemma hcomplex_eq_cancel_iffA: |
1164 |
"(hcomplex_of_hypreal xa + hcomplex_of_hypreal ya * iii = |
|
14314 | 1165 |
hcomplex_of_hypreal xb + hcomplex_of_hypreal yb * iii ) = ((xa = xb) & (ya = yb))" |
1166 |
apply (auto simp add: hcomplex_mult_commute) |
|
1167 |
done |
|
1168 |
declare hcomplex_eq_cancel_iffA [iff] |
|
1169 |
||
14335 | 1170 |
lemma hcomplex_eq_cancel_iffB: |
1171 |
"(hcomplex_of_hypreal xa + hcomplex_of_hypreal ya * iii = |
|
14314 | 1172 |
hcomplex_of_hypreal xb + iii * hcomplex_of_hypreal yb) = ((xa = xb) & (ya = yb))" |
1173 |
apply (auto simp add: hcomplex_mult_commute) |
|
1174 |
done |
|
1175 |
declare hcomplex_eq_cancel_iffB [iff] |
|
1176 |
||
14335 | 1177 |
lemma hcomplex_eq_cancel_iffC: |
1178 |
"(hcomplex_of_hypreal xa + iii * hcomplex_of_hypreal ya = |
|
14314 | 1179 |
hcomplex_of_hypreal xb + hcomplex_of_hypreal yb * iii) = ((xa = xb) & (ya = yb))" |
1180 |
apply (auto simp add: hcomplex_mult_commute) |
|
1181 |
done |
|
1182 |
declare hcomplex_eq_cancel_iffC [iff] |
|
1183 |
||
14335 | 1184 |
lemma hcomplex_eq_cancel_iff2: |
1185 |
"(hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y = |
|
14314 | 1186 |
hcomplex_of_hypreal xa) = (x = xa & y = 0)" |
1187 |
apply (cut_tac xa = "x" and ya = "y" and xb = "xa" and yb = "0" in hcomplex_eq_cancel_iff) |
|
1188 |
apply (simp del: hcomplex_eq_cancel_iff) |
|
1189 |
done |
|
1190 |
declare hcomplex_eq_cancel_iff2 [simp] |
|
1191 |
||
14335 | 1192 |
lemma hcomplex_eq_cancel_iff2a: |
1193 |
"(hcomplex_of_hypreal x + hcomplex_of_hypreal y * iii = |
|
14314 | 1194 |
hcomplex_of_hypreal xa) = (x = xa & y = 0)" |
1195 |
apply (auto simp add: hcomplex_mult_commute) |
|
1196 |
done |
|
1197 |
declare hcomplex_eq_cancel_iff2a [simp] |
|
1198 |
||
14335 | 1199 |
lemma hcomplex_eq_cancel_iff3: |
1200 |
"(hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y = |
|
14314 | 1201 |
iii * hcomplex_of_hypreal ya) = (x = 0 & y = ya)" |
1202 |
apply (cut_tac xa = "x" and ya = "y" and xb = "0" and yb = "ya" in hcomplex_eq_cancel_iff) |
|
1203 |
apply (simp del: hcomplex_eq_cancel_iff) |
|
1204 |
done |
|
1205 |
declare hcomplex_eq_cancel_iff3 [simp] |
|
1206 |
||
14335 | 1207 |
lemma hcomplex_eq_cancel_iff3a: |
1208 |
"(hcomplex_of_hypreal x + hcomplex_of_hypreal y * iii = |
|
14314 | 1209 |
iii * hcomplex_of_hypreal ya) = (x = 0 & y = ya)" |
1210 |
apply (auto simp add: hcomplex_mult_commute) |
|
1211 |
done |
|
1212 |
declare hcomplex_eq_cancel_iff3a [simp] |
|
1213 |
||
1214 |
lemma hcomplex_split_hRe_zero: |
|
1215 |
"hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y = 0 |
|
1216 |
==> x = 0" |
|
1217 |
apply (unfold iii_def) |
|
1218 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
|
1219 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
1220 |
apply (auto simp add: hcomplex_of_hypreal hcomplex_add hcomplex_mult hcomplex_zero_def hypreal_zero_num) |
|
1221 |
apply ultra |
|
1222 |
apply (auto simp add: complex_split_Re_zero) |
|
1223 |
done |
|
1224 |
||
1225 |
lemma hcomplex_split_hIm_zero: |
|
1226 |
"hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y = 0 |
|
1227 |
==> y = 0" |
|
1228 |
apply (unfold iii_def) |
|
1229 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
|
1230 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
1231 |
apply (auto simp add: hcomplex_of_hypreal hcomplex_add hcomplex_mult hcomplex_zero_def hypreal_zero_num) |
|
1232 |
apply ultra |
|
1233 |
apply (auto simp add: complex_split_Im_zero) |
|
1234 |
done |
|
1235 |
||
1236 |
lemma hRe_hsgn: "hRe(hsgn z) = hRe(z)/hcmod z" |
|
1237 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
1238 |
apply (auto simp add: hsgn hcmod hRe hypreal_divide) |
|
1239 |
done |
|
1240 |
declare hRe_hsgn [simp] |
|
1241 |
||
1242 |
lemma hIm_hsgn: "hIm(hsgn z) = hIm(z)/hcmod z" |
|
1243 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
1244 |
apply (auto simp add: hsgn hcmod hIm hypreal_divide) |
|
1245 |
done |
|
1246 |
declare hIm_hsgn [simp] |
|
1247 |
||
14335 | 1248 |
lemma real_two_squares_add_zero_iff: |
1249 |
"(x*x + y*y = 0) = ((x::real) = 0 & y = 0)" |
|
14314 | 1250 |
apply (auto intro: real_sum_squares_cancel) |
1251 |
done |
|
1252 |
declare real_two_squares_add_zero_iff [simp] |
|
1253 |
||
14335 | 1254 |
lemma hcomplex_inverse_complex_split: |
1255 |
"inverse(hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y) = |
|
14314 | 1256 |
hcomplex_of_hypreal(x/(x ^ 2 + y ^ 2)) - |
1257 |
iii * hcomplex_of_hypreal(y/(x ^ 2 + y ^ 2))" |
|
1258 |
apply (rule_tac z = "x" in eq_Abs_hypreal) |
|
1259 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
14323 | 1260 |
apply (auto simp add: hcomplex_of_hypreal hcomplex_mult hcomplex_add iii_def starfun hypreal_mult hypreal_add hcomplex_inverse hypreal_divide hcomplex_diff complex_inverse_complex_split numeral_2_eq_2) |
14314 | 1261 |
done |
1262 |
||
1263 |
lemma hRe_mult_i_eq: |
|
1264 |
"hRe (iii * hcomplex_of_hypreal y) = 0" |
|
1265 |
apply (unfold iii_def) |
|
1266 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
1267 |
apply (auto simp add: hcomplex_of_hypreal hcomplex_mult hRe hypreal_zero_num) |
|
1268 |
done |
|
1269 |
declare hRe_mult_i_eq [simp] |
|
1270 |
||
1271 |
lemma hIm_mult_i_eq: |
|
1272 |
"hIm (iii * hcomplex_of_hypreal y) = y" |
|
1273 |
apply (unfold iii_def) |
|
1274 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
1275 |
apply (auto simp add: hcomplex_of_hypreal hcomplex_mult hIm hypreal_zero_num) |
|
1276 |
done |
|
1277 |
declare hIm_mult_i_eq [simp] |
|
1278 |
||
1279 |
lemma hcmod_mult_i: "hcmod (iii * hcomplex_of_hypreal y) = abs y" |
|
1280 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
|
1281 |
apply (auto simp add: hcomplex_of_hypreal hcmod hypreal_hrabs iii_def hcomplex_mult) |
|
1282 |
done |
|
1283 |
declare hcmod_mult_i [simp] |
|
1284 |
||
1285 |
lemma hcmod_mult_i2: "hcmod (hcomplex_of_hypreal y * iii) = abs y" |
|
1286 |
apply (auto simp add: hcomplex_mult_commute) |
|
1287 |
done |
|
1288 |
declare hcmod_mult_i2 [simp] |
|
1289 |
||
1290 |
(*---------------------------------------------------------------------------*) |
|
1291 |
(* harg *) |
|
1292 |
(*---------------------------------------------------------------------------*) |
|
1293 |
||
1294 |
lemma harg: |
|
1295 |
"harg (Abs_hcomplex(hcomplexrel `` {%n. X n})) = |
|
1296 |
Abs_hypreal(hyprel `` {%n. arg (X n)})" |
|
1297 |
||
1298 |
apply (unfold harg_def) |
|
1299 |
apply (rule_tac f = "Abs_hypreal" in arg_cong) |
|
14335 | 1300 |
apply (auto, ultra) |
14314 | 1301 |
done |
1302 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1303 |
lemma cos_harg_i_mult_zero_pos: |
14335 | 1304 |
"0 < y ==> ( *f* cos) (harg(iii * hcomplex_of_hypreal y)) = 0" |
14314 | 1305 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1306 |
apply (auto simp add: hcomplex_of_hypreal iii_def hcomplex_mult |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1307 |
hypreal_zero_num hypreal_less starfun harg) |
14314 | 1308 |
apply (ultra) |
1309 |
done |
|
1310 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1311 |
lemma cos_harg_i_mult_zero_neg: |
14335 | 1312 |
"y < 0 ==> ( *f* cos) (harg(iii * hcomplex_of_hypreal y)) = 0" |
14314 | 1313 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1314 |
apply (auto simp add: hcomplex_of_hypreal iii_def hcomplex_mult |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1315 |
hypreal_zero_num hypreal_less starfun harg) |
14314 | 1316 |
apply (ultra) |
1317 |
done |
|
1318 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1319 |
lemma cos_harg_i_mult_zero [simp]: |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1320 |
"y \<noteq> 0 ==> ( *f* cos) (harg(iii * hcomplex_of_hypreal y)) = 0" |
14370 | 1321 |
apply (cut_tac x = "y" and y = "0" in linorder_less_linear) |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1322 |
apply (auto simp add: cos_harg_i_mult_zero_pos cos_harg_i_mult_zero_neg) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1323 |
done |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1324 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1325 |
lemma hcomplex_of_hypreal_zero_iff [simp]: |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1326 |
"(hcomplex_of_hypreal y = 0) = (y = 0)" |
14314 | 1327 |
apply (rule_tac z = "y" in eq_Abs_hypreal) |
1328 |
apply (auto simp add: hcomplex_of_hypreal hypreal_zero_num hcomplex_zero_def) |
|
1329 |
done |
|
1330 |
||
1331 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1332 |
subsection{*Polar Form for Nonstandard Complex Numbers*} |
14314 | 1333 |
|
14335 | 1334 |
lemma complex_split_polar2: |
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1335 |
"\<forall>n. \<exists>r a. (z n) = complex_of_real r * |
14314 | 1336 |
(complex_of_real(cos a) + ii * complex_of_real(sin a))" |
1337 |
apply (blast intro: complex_split_polar) |
|
1338 |
done |
|
1339 |
||
1340 |
lemma hcomplex_split_polar: |
|
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1341 |
"\<exists>r a. z = hcomplex_of_hypreal r * |
14314 | 1342 |
(hcomplex_of_hypreal(( *f* cos) a) + iii * hcomplex_of_hypreal(( *f* sin) a))" |
1343 |
apply (rule_tac z = "z" in eq_Abs_hcomplex) |
|
1344 |
apply (auto simp add: lemma_hypreal_P_EX2 hcomplex_of_hypreal iii_def starfun hcomplex_add hcomplex_mult) |
|
1345 |
apply (cut_tac z = "x" in complex_split_polar2) |
|
14335 | 1346 |
apply (drule choice, safe)+ |
14314 | 1347 |
apply (rule_tac x = "f" in exI) |
1348 |
apply (rule_tac x = "fa" in exI) |
|
1349 |
apply auto |
|
1350 |
done |
|
1351 |
||
1352 |
lemma hcis: |
|
1353 |
"hcis (Abs_hypreal(hyprel `` {%n. X n})) = |
|
1354 |
Abs_hcomplex(hcomplexrel `` {%n. cis (X n)})" |
|
1355 |
apply (unfold hcis_def) |
|
1356 |
apply (rule_tac f = "Abs_hcomplex" in arg_cong) |
|
1357 |
apply auto |
|
1358 |
apply (ultra) |
|
1359 |
done |
|
1360 |
||
1361 |
lemma hcis_eq: |
|
1362 |
"hcis a = |
|
1363 |
(hcomplex_of_hypreal(( *f* cos) a) + |
|
1364 |
iii * hcomplex_of_hypreal(( *f* sin) a))" |
|
1365 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1366 |
apply (auto simp add: starfun hcis hcomplex_of_hypreal iii_def hcomplex_mult hcomplex_add cis_def) |
|
1367 |
done |
|
1368 |
||
1369 |
lemma hrcis: |
|
1370 |
"hrcis (Abs_hypreal(hyprel `` {%n. X n})) (Abs_hypreal(hyprel `` {%n. Y n})) = |
|
1371 |
Abs_hcomplex(hcomplexrel `` {%n. rcis (X n) (Y n)})" |
|
1372 |
apply (unfold hrcis_def) |
|
1373 |
apply (auto simp add: hcomplex_of_hypreal hcomplex_mult hcis rcis_def) |
|
1374 |
done |
|
1375 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1376 |
lemma hrcis_Ex: "\<exists>r a. z = hrcis r a" |
14314 | 1377 |
apply (simp (no_asm) add: hrcis_def hcis_eq) |
1378 |
apply (rule hcomplex_split_polar) |
|
1379 |
done |
|
1380 |
||
14335 | 1381 |
lemma hRe_hcomplex_polar: |
1382 |
"hRe(hcomplex_of_hypreal r * |
|
14314 | 1383 |
(hcomplex_of_hypreal(( *f* cos) a) + |
1384 |
iii * hcomplex_of_hypreal(( *f* sin) a))) = r * ( *f* cos) a" |
|
14335 | 1385 |
apply (auto simp add: right_distrib hcomplex_of_hypreal_mult mult_ac) |
14314 | 1386 |
done |
1387 |
declare hRe_hcomplex_polar [simp] |
|
1388 |
||
1389 |
lemma hRe_hrcis: "hRe(hrcis r a) = r * ( *f* cos) a" |
|
1390 |
apply (unfold hrcis_def) |
|
1391 |
apply (auto simp add: hcis_eq) |
|
1392 |
done |
|
1393 |
declare hRe_hrcis [simp] |
|
1394 |
||
14335 | 1395 |
lemma hIm_hcomplex_polar: |
1396 |
"hIm(hcomplex_of_hypreal r * |
|
14314 | 1397 |
(hcomplex_of_hypreal(( *f* cos) a) + |
1398 |
iii * hcomplex_of_hypreal(( *f* sin) a))) = r * ( *f* sin) a" |
|
14335 | 1399 |
apply (auto simp add: right_distrib hcomplex_of_hypreal_mult mult_ac) |
14314 | 1400 |
done |
1401 |
declare hIm_hcomplex_polar [simp] |
|
1402 |
||
1403 |
lemma hIm_hrcis: "hIm(hrcis r a) = r * ( *f* sin) a" |
|
1404 |
apply (unfold hrcis_def) |
|
1405 |
apply (auto simp add: hcis_eq) |
|
1406 |
done |
|
1407 |
declare hIm_hrcis [simp] |
|
1408 |
||
14335 | 1409 |
lemma hcmod_complex_polar: |
1410 |
"hcmod (hcomplex_of_hypreal r * |
|
14314 | 1411 |
(hcomplex_of_hypreal(( *f* cos) a) + |
1412 |
iii * hcomplex_of_hypreal(( *f* sin) a))) = abs r" |
|
1413 |
apply (rule_tac z = "r" in eq_Abs_hypreal) |
|
1414 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1415 |
apply (auto simp add: iii_def starfun hcomplex_of_hypreal hcomplex_mult hcmod hcomplex_add hypreal_hrabs) |
|
1416 |
done |
|
1417 |
declare hcmod_complex_polar [simp] |
|
1418 |
||
1419 |
lemma hcmod_hrcis: "hcmod(hrcis r a) = abs r" |
|
1420 |
apply (unfold hrcis_def) |
|
1421 |
apply (auto simp add: hcis_eq) |
|
1422 |
done |
|
1423 |
declare hcmod_hrcis [simp] |
|
1424 |
||
1425 |
(*---------------------------------------------------------------------------*) |
|
1426 |
(* (r1 * hrcis a) * (r2 * hrcis b) = r1 * r2 * hrcis (a + b) *) |
|
1427 |
(*---------------------------------------------------------------------------*) |
|
1428 |
||
1429 |
lemma hcis_hrcis_eq: "hcis a = hrcis 1 a" |
|
1430 |
apply (unfold hrcis_def) |
|
1431 |
apply (simp (no_asm)) |
|
1432 |
done |
|
1433 |
declare hcis_hrcis_eq [symmetric, simp] |
|
1434 |
||
1435 |
lemma hrcis_mult: |
|
1436 |
"hrcis r1 a * hrcis r2 b = hrcis (r1*r2) (a + b)" |
|
1437 |
apply (unfold hrcis_def) |
|
1438 |
apply (rule_tac z = "r1" in eq_Abs_hypreal) |
|
1439 |
apply (rule_tac z = "r2" in eq_Abs_hypreal) |
|
1440 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1441 |
apply (rule_tac z = "b" in eq_Abs_hypreal) |
|
1442 |
apply (auto simp add: hrcis hcis hypreal_add hypreal_mult hcomplex_of_hypreal |
|
1443 |
hcomplex_mult cis_mult [symmetric] |
|
1444 |
complex_of_real_mult [symmetric]) |
|
1445 |
done |
|
1446 |
||
1447 |
lemma hcis_mult: "hcis a * hcis b = hcis (a + b)" |
|
1448 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1449 |
apply (rule_tac z = "b" in eq_Abs_hypreal) |
|
1450 |
apply (auto simp add: hcis hcomplex_mult hypreal_add cis_mult) |
|
1451 |
done |
|
1452 |
||
1453 |
lemma hcis_zero: |
|
1454 |
"hcis 0 = 1" |
|
1455 |
apply (unfold hcomplex_one_def) |
|
1456 |
apply (auto simp add: hcis hypreal_zero_num) |
|
1457 |
done |
|
1458 |
declare hcis_zero [simp] |
|
1459 |
||
1460 |
lemma hrcis_zero_mod: |
|
1461 |
"hrcis 0 a = 0" |
|
1462 |
apply (unfold hcomplex_zero_def) |
|
1463 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1464 |
apply (auto simp add: hrcis hypreal_zero_num) |
|
1465 |
done |
|
1466 |
declare hrcis_zero_mod [simp] |
|
1467 |
||
1468 |
lemma hrcis_zero_arg: "hrcis r 0 = hcomplex_of_hypreal r" |
|
1469 |
apply (rule_tac z = "r" in eq_Abs_hypreal) |
|
1470 |
apply (auto simp add: hrcis hypreal_zero_num hcomplex_of_hypreal) |
|
1471 |
done |
|
1472 |
declare hrcis_zero_arg [simp] |
|
1473 |
||
1474 |
lemma hcomplex_i_mult_minus: "iii * (iii * x) = - x" |
|
1475 |
apply (simp (no_asm) add: hcomplex_mult_assoc [symmetric]) |
|
1476 |
done |
|
1477 |
declare hcomplex_i_mult_minus [simp] |
|
1478 |
||
1479 |
lemma hcomplex_i_mult_minus2: "iii * iii * x = - x" |
|
1480 |
apply (simp (no_asm)) |
|
1481 |
done |
|
1482 |
declare hcomplex_i_mult_minus2 [simp] |
|
1483 |
||
1484 |
lemma hcis_hypreal_of_nat_Suc_mult: |
|
1485 |
"hcis (hypreal_of_nat (Suc n) * a) = hcis a * hcis (hypreal_of_nat n * a)" |
|
1486 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1487 |
apply (auto simp add: hypreal_of_nat hcis hypreal_mult hcomplex_mult cis_real_of_nat_Suc_mult) |
|
1488 |
done |
|
1489 |
||
1490 |
lemma NSDeMoivre: "(hcis a) ^ n = hcis (hypreal_of_nat n * a)" |
|
1491 |
apply (induct_tac "n") |
|
1492 |
apply (auto simp add: hcis_hypreal_of_nat_Suc_mult) |
|
1493 |
done |
|
1494 |
||
14335 | 1495 |
lemma hcis_hypreal_of_hypnat_Suc_mult: |
1496 |
"hcis (hypreal_of_hypnat (n + 1) * a) = |
|
14314 | 1497 |
hcis a * hcis (hypreal_of_hypnat n * a)" |
1498 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1499 |
apply (rule_tac z = "n" in eq_Abs_hypnat) |
|
1500 |
apply (auto simp add: hcis hypreal_of_hypnat hypnat_add hypnat_one_def hypreal_mult hcomplex_mult cis_real_of_nat_Suc_mult) |
|
1501 |
done |
|
1502 |
||
1503 |
lemma NSDeMoivre_ext: "(hcis a) hcpow n = hcis (hypreal_of_hypnat n * a)" |
|
1504 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1505 |
apply (rule_tac z = "n" in eq_Abs_hypnat) |
|
1506 |
apply (auto simp add: hcis hypreal_of_hypnat hypreal_mult hcpow DeMoivre) |
|
1507 |
done |
|
1508 |
||
1509 |
lemma DeMoivre2: |
|
1510 |
"(hrcis r a) ^ n = hrcis (r ^ n) (hypreal_of_nat n * a)" |
|
1511 |
apply (unfold hrcis_def) |
|
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1512 |
apply (auto simp add: power_mult_distrib NSDeMoivre hcomplex_of_hypreal_pow) |
14314 | 1513 |
done |
1514 |
||
1515 |
lemma DeMoivre2_ext: |
|
1516 |
"(hrcis r a) hcpow n = hrcis (r pow n) (hypreal_of_hypnat n * a)" |
|
1517 |
apply (unfold hrcis_def) |
|
1518 |
apply (auto simp add: hcpow_mult NSDeMoivre_ext hcomplex_of_hypreal_hyperpow) |
|
1519 |
done |
|
1520 |
||
1521 |
lemma hcis_inverse: "inverse(hcis a) = hcis (-a)" |
|
1522 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1523 |
apply (auto simp add: hcomplex_inverse hcis hypreal_minus) |
|
1524 |
done |
|
1525 |
declare hcis_inverse [simp] |
|
1526 |
||
1527 |
lemma hrcis_inverse: "inverse(hrcis r a) = hrcis (inverse r) (-a)" |
|
1528 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1529 |
apply (rule_tac z = "r" in eq_Abs_hypreal) |
|
1530 |
apply (auto simp add: hcomplex_inverse hrcis hypreal_minus hypreal_inverse rcis_inverse) |
|
1531 |
apply (ultra) |
|
1532 |
apply (unfold real_divide_def) |
|
1533 |
apply (auto simp add: INVERSE_ZERO) |
|
1534 |
done |
|
1535 |
||
1536 |
lemma hRe_hcis: "hRe(hcis a) = ( *f* cos) a" |
|
1537 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1538 |
apply (auto simp add: hcis starfun hRe) |
|
1539 |
done |
|
1540 |
declare hRe_hcis [simp] |
|
1541 |
||
1542 |
lemma hIm_hcis: "hIm(hcis a) = ( *f* sin) a" |
|
1543 |
apply (rule_tac z = "a" in eq_Abs_hypreal) |
|
1544 |
apply (auto simp add: hcis starfun hIm) |
|
1545 |
done |
|
1546 |
declare hIm_hcis [simp] |
|
1547 |
||
14335 | 1548 |
lemma cos_n_hRe_hcis_pow_n: |
1549 |
"( *f* cos) (hypreal_of_nat n * a) = hRe(hcis a ^ n)" |
|
14314 | 1550 |
apply (auto simp add: NSDeMoivre) |
1551 |
done |
|
1552 |
||
14335 | 1553 |
lemma sin_n_hIm_hcis_pow_n: |
1554 |
"( *f* sin) (hypreal_of_nat n * a) = hIm(hcis a ^ n)" |
|
14314 | 1555 |
apply (auto simp add: NSDeMoivre) |
1556 |
done |
|
1557 |
||
14335 | 1558 |
lemma cos_n_hRe_hcis_hcpow_n: |
1559 |
"( *f* cos) (hypreal_of_hypnat n * a) = hRe(hcis a hcpow n)" |
|
14314 | 1560 |
apply (auto simp add: NSDeMoivre_ext) |
1561 |
done |
|
1562 |
||
14335 | 1563 |
lemma sin_n_hIm_hcis_hcpow_n: |
1564 |
"( *f* sin) (hypreal_of_hypnat n * a) = hIm(hcis a hcpow n)" |
|
14314 | 1565 |
apply (auto simp add: NSDeMoivre_ext) |
1566 |
done |
|
1567 |
||
1568 |
lemma hexpi_add: "hexpi(a + b) = hexpi(a) * hexpi(b)" |
|
1569 |
apply (unfold hexpi_def) |
|
1570 |
apply (rule_tac z = "a" in eq_Abs_hcomplex) |
|
1571 |
apply (rule_tac z = "b" in eq_Abs_hcomplex) |
|
1572 |
apply (auto simp add: hcis hRe hIm hcomplex_add hcomplex_mult hypreal_mult starfun hcomplex_of_hypreal cis_mult [symmetric] complex_Im_add complex_Re_add exp_add complex_of_real_mult) |
|
1573 |
done |
|
1574 |
||
1575 |
||
14354
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1576 |
subsection{*@{term hcomplex_of_complex}: the Injection from |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1577 |
type @{typ complex} to to @{typ hcomplex}*} |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1578 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1579 |
lemma inj_hcomplex_of_complex: "inj(hcomplex_of_complex)" |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1580 |
apply (rule inj_onI , rule ccontr) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1581 |
apply (auto simp add: hcomplex_of_complex_def) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1582 |
done |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1583 |
|
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1584 |
lemma hcomplex_of_complex_i: "iii = hcomplex_of_complex ii" |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1585 |
apply (unfold iii_def hcomplex_of_complex_def) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1586 |
apply (simp (no_asm)) |
988aa4648597
types complex and hcomplex are now instances of class ringpower:
paulson
parents:
14341
diff
changeset
|
1587 |
done |
14314 | 1588 |
|
1589 |
lemma hcomplex_of_complex_add: |
|
1590 |
"hcomplex_of_complex (z1 + z2) = hcomplex_of_complex z1 + hcomplex_of_complex z2" |
|
1591 |
apply (unfold hcomplex_of_complex_def) |
|
1592 |
apply (simp (no_asm) add: hcomplex_add) |
|
1593 |
done |
|
1594 |
declare hcomplex_of_complex_add [simp] |
|
1595 |
||
1596 |
lemma hcomplex_of_complex_mult: |
|
1597 |
"hcomplex_of_complex (z1 * z2) = hcomplex_of_complex z1 * hcomplex_of_complex z2" |
|
1598 |
apply (unfold hcomplex_of_complex_def) |
|
1599 |
apply (simp (no_asm) add: hcomplex_mult) |
|
1600 |
done |
|
1601 |
declare hcomplex_of_complex_mult [simp] |
|
1602 |
||
1603 |
lemma hcomplex_of_complex_eq_iff: |
|
1604 |
"(hcomplex_of_complex z1 = hcomplex_of_complex z2) = (z1 = z2)" |
|
1605 |
apply (unfold hcomplex_of_complex_def) |
|
1606 |
apply auto |
|
1607 |
done |
|
1608 |
declare hcomplex_of_complex_eq_iff [simp] |
|
1609 |
||
14335 | 1610 |
lemma hcomplex_of_complex_minus: |
1611 |
"hcomplex_of_complex (-r) = - hcomplex_of_complex r" |
|
14314 | 1612 |
apply (unfold hcomplex_of_complex_def) |
1613 |
apply (auto simp add: hcomplex_minus) |
|
1614 |
done |
|
1615 |
declare hcomplex_of_complex_minus [simp] |
|
1616 |
||
14320 | 1617 |
lemma hcomplex_of_complex_one [simp]: |
14314 | 1618 |
"hcomplex_of_complex 1 = 1" |
1619 |
apply (unfold hcomplex_of_complex_def hcomplex_one_def) |
|
1620 |
apply auto |
|
1621 |
done |
|
1622 |
||
14320 | 1623 |
lemma hcomplex_of_complex_zero [simp]: |
14314 | 1624 |
"hcomplex_of_complex 0 = 0" |
1625 |
apply (unfold hcomplex_of_complex_def hcomplex_zero_def) |
|
1626 |
apply (simp (no_asm)) |
|
1627 |
done |
|
1628 |
||
1629 |
lemma hcomplex_of_complex_zero_iff: "(hcomplex_of_complex r = 0) = (r = 0)" |
|
1630 |
apply (auto intro: FreeUltrafilterNat_P simp add: hcomplex_of_complex_def hcomplex_zero_def) |
|
1631 |
done |
|
1632 |
||
14335 | 1633 |
lemma hcomplex_of_complex_inverse: |
1634 |
"hcomplex_of_complex (inverse r) = inverse (hcomplex_of_complex r)" |
|
14314 | 1635 |
apply (case_tac "r=0") |
14336 | 1636 |
apply (simp add: hcomplex_of_complex_zero) |
1637 |
apply (rule_tac c1 = "hcomplex_of_complex r" |
|
1638 |
in hcomplex_mult_left_cancel [THEN iffD1]) |
|
14314 | 1639 |
apply (force simp add: hcomplex_of_complex_zero_iff) |
1640 |
apply (subst hcomplex_of_complex_mult [symmetric]) |
|
14336 | 1641 |
apply (auto simp add: hcomplex_of_complex_one hcomplex_of_complex_zero_iff) |
14314 | 1642 |
done |
1643 |
declare hcomplex_of_complex_inverse [simp] |
|
1644 |
||
14335 | 1645 |
lemma hcomplex_of_complex_divide: |
1646 |
"hcomplex_of_complex (z1 / z2) = hcomplex_of_complex z1 / hcomplex_of_complex z2" |
|
14314 | 1647 |
apply (simp (no_asm) add: hcomplex_divide_def complex_divide_def) |
1648 |
done |
|
1649 |
declare hcomplex_of_complex_divide [simp] |
|
1650 |
||
1651 |
lemma hRe_hcomplex_of_complex: |
|
1652 |
"hRe (hcomplex_of_complex z) = hypreal_of_real (Re z)" |
|
1653 |
apply (unfold hcomplex_of_complex_def hypreal_of_real_def) |
|
1654 |
apply (auto simp add: hRe) |
|
1655 |
done |
|
1656 |
||
1657 |
lemma hIm_hcomplex_of_complex: |
|
1658 |
"hIm (hcomplex_of_complex z) = hypreal_of_real (Im z)" |
|
1659 |
apply (unfold hcomplex_of_complex_def hypreal_of_real_def) |
|
1660 |
apply (auto simp add: hIm) |
|
1661 |
done |
|
1662 |
||
1663 |
lemma hcmod_hcomplex_of_complex: |
|
1664 |
"hcmod (hcomplex_of_complex x) = hypreal_of_real (cmod x)" |
|
1665 |
apply (unfold hypreal_of_real_def hcomplex_of_complex_def) |
|
1666 |
apply (auto simp add: hcmod) |
|
1667 |
done |
|
1668 |
||
1669 |
ML |
|
1670 |
{* |
|
1671 |
val hcomplex_zero_def = thm"hcomplex_zero_def"; |
|
1672 |
val hcomplex_one_def = thm"hcomplex_one_def"; |
|
1673 |
val hcomplex_minus_def = thm"hcomplex_minus_def"; |
|
1674 |
val hcomplex_diff_def = thm"hcomplex_diff_def"; |
|
1675 |
val hcomplex_divide_def = thm"hcomplex_divide_def"; |
|
1676 |
val hcomplex_mult_def = thm"hcomplex_mult_def"; |
|
1677 |
val hcomplex_add_def = thm"hcomplex_add_def"; |
|
1678 |
val hcomplex_of_complex_def = thm"hcomplex_of_complex_def"; |
|
1679 |
val iii_def = thm"iii_def"; |
|
1680 |
||
1681 |
val hcomplexrel_iff = thm"hcomplexrel_iff"; |
|
1682 |
val hcomplexrel_refl = thm"hcomplexrel_refl"; |
|
1683 |
val hcomplexrel_sym = thm"hcomplexrel_sym"; |
|
1684 |
val hcomplexrel_trans = thm"hcomplexrel_trans"; |
|
1685 |
val equiv_hcomplexrel = thm"equiv_hcomplexrel"; |
|
1686 |
val equiv_hcomplexrel_iff = thm"equiv_hcomplexrel_iff"; |
|
1687 |
val hcomplexrel_in_hcomplex = thm"hcomplexrel_in_hcomplex"; |
|
1688 |
val inj_on_Abs_hcomplex = thm"inj_on_Abs_hcomplex"; |
|
1689 |
val inj_Rep_hcomplex = thm"inj_Rep_hcomplex"; |
|
1690 |
val lemma_hcomplexrel_refl = thm"lemma_hcomplexrel_refl"; |
|
1691 |
val hcomplex_empty_not_mem = thm"hcomplex_empty_not_mem"; |
|
1692 |
val Rep_hcomplex_nonempty = thm"Rep_hcomplex_nonempty"; |
|
1693 |
val eq_Abs_hcomplex = thm"eq_Abs_hcomplex"; |
|
1694 |
val hRe = thm"hRe"; |
|
1695 |
val hIm = thm"hIm"; |
|
1696 |
val hcomplex_hRe_hIm_cancel_iff = thm"hcomplex_hRe_hIm_cancel_iff"; |
|
1697 |
val hcomplex_hRe_zero = thm"hcomplex_hRe_zero"; |
|
1698 |
val hcomplex_hIm_zero = thm"hcomplex_hIm_zero"; |
|
1699 |
val hcomplex_hRe_one = thm"hcomplex_hRe_one"; |
|
1700 |
val hcomplex_hIm_one = thm"hcomplex_hIm_one"; |
|
1701 |
val inj_hcomplex_of_complex = thm"inj_hcomplex_of_complex"; |
|
1702 |
val hcomplex_of_complex_i = thm"hcomplex_of_complex_i"; |
|
1703 |
val hcomplex_add_congruent2 = thm"hcomplex_add_congruent2"; |
|
1704 |
val hcomplex_add = thm"hcomplex_add"; |
|
1705 |
val hcomplex_add_commute = thm"hcomplex_add_commute"; |
|
1706 |
val hcomplex_add_assoc = thm"hcomplex_add_assoc"; |
|
1707 |
val hcomplex_add_zero_left = thm"hcomplex_add_zero_left"; |
|
1708 |
val hcomplex_add_zero_right = thm"hcomplex_add_zero_right"; |
|
1709 |
val hRe_add = thm"hRe_add"; |
|
1710 |
val hIm_add = thm"hIm_add"; |
|
1711 |
val hcomplex_minus_congruent = thm"hcomplex_minus_congruent"; |
|
1712 |
val hcomplex_minus = thm"hcomplex_minus"; |
|
1713 |
val inj_hcomplex_minus = thm"inj_hcomplex_minus"; |
|
1714 |
val hcomplex_add_minus_left = thm"hcomplex_add_minus_left"; |
|
1715 |
val hRe_minus = thm"hRe_minus"; |
|
1716 |
val hIm_minus = thm"hIm_minus"; |
|
1717 |
val hcomplex_add_minus_eq_minus = thm"hcomplex_add_minus_eq_minus"; |
|
1718 |
val hcomplex_diff = thm"hcomplex_diff"; |
|
1719 |
val hcomplex_diff_eq_eq = thm"hcomplex_diff_eq_eq"; |
|
1720 |
val hcomplex_mult = thm"hcomplex_mult"; |
|
1721 |
val hcomplex_mult_commute = thm"hcomplex_mult_commute"; |
|
1722 |
val hcomplex_mult_assoc = thm"hcomplex_mult_assoc"; |
|
1723 |
val hcomplex_mult_one_left = thm"hcomplex_mult_one_left"; |
|
1724 |
val hcomplex_mult_one_right = thm"hcomplex_mult_one_right"; |
|
1725 |
val hcomplex_mult_zero_left = thm"hcomplex_mult_zero_left"; |
|
1726 |
val hcomplex_mult_minus_one = thm"hcomplex_mult_minus_one"; |
|
1727 |
val hcomplex_mult_minus_one_right = thm"hcomplex_mult_minus_one_right"; |
|
1728 |
val hcomplex_add_mult_distrib = thm"hcomplex_add_mult_distrib"; |
|
1729 |
val hcomplex_zero_not_eq_one = thm"hcomplex_zero_not_eq_one"; |
|
1730 |
val hcomplex_inverse = thm"hcomplex_inverse"; |
|
1731 |
val HCOMPLEX_INVERSE_ZERO = thm"HCOMPLEX_INVERSE_ZERO"; |
|
1732 |
val HCOMPLEX_DIVISION_BY_ZERO = thm"HCOMPLEX_DIVISION_BY_ZERO"; |
|
1733 |
val hcomplex_mult_inv_left = thm"hcomplex_mult_inv_left"; |
|
1734 |
val hcomplex_mult_left_cancel = thm"hcomplex_mult_left_cancel"; |
|
1735 |
val hcomplex_mult_right_cancel = thm"hcomplex_mult_right_cancel"; |
|
1736 |
val hcomplex_add_divide_distrib = thm"hcomplex_add_divide_distrib"; |
|
1737 |
val hcomplex_of_hypreal = thm"hcomplex_of_hypreal"; |
|
1738 |
val inj_hcomplex_of_hypreal = thm"inj_hcomplex_of_hypreal"; |
|
1739 |
val hcomplex_of_hypreal_cancel_iff = thm"hcomplex_of_hypreal_cancel_iff"; |
|
1740 |
val hcomplex_of_hypreal_minus = thm"hcomplex_of_hypreal_minus"; |
|
1741 |
val hcomplex_of_hypreal_inverse = thm"hcomplex_of_hypreal_inverse"; |
|
1742 |
val hcomplex_of_hypreal_add = thm"hcomplex_of_hypreal_add"; |
|
1743 |
val hcomplex_of_hypreal_diff = thm"hcomplex_of_hypreal_diff"; |
|
1744 |
val hcomplex_of_hypreal_mult = thm"hcomplex_of_hypreal_mult"; |
|
1745 |
val hcomplex_of_hypreal_divide = thm"hcomplex_of_hypreal_divide"; |
|
1746 |
val hcomplex_of_hypreal_one = thm"hcomplex_of_hypreal_one"; |
|
1747 |
val hcomplex_of_hypreal_zero = thm"hcomplex_of_hypreal_zero"; |
|
1748 |
val hcomplex_of_hypreal_pow = thm"hcomplex_of_hypreal_pow"; |
|
1749 |
val hRe_hcomplex_of_hypreal = thm"hRe_hcomplex_of_hypreal"; |
|
1750 |
val hIm_hcomplex_of_hypreal = thm"hIm_hcomplex_of_hypreal"; |
|
1751 |
val hcomplex_of_hypreal_epsilon_not_zero = thm"hcomplex_of_hypreal_epsilon_not_zero"; |
|
1752 |
val hcmod = thm"hcmod"; |
|
1753 |
val hcmod_zero = thm"hcmod_zero"; |
|
1754 |
val hcmod_one = thm"hcmod_one"; |
|
1755 |
val hcmod_hcomplex_of_hypreal = thm"hcmod_hcomplex_of_hypreal"; |
|
1756 |
val hcomplex_of_hypreal_abs = thm"hcomplex_of_hypreal_abs"; |
|
1757 |
val hcnj = thm"hcnj"; |
|
1758 |
val inj_hcnj = thm"inj_hcnj"; |
|
1759 |
val hcomplex_hcnj_cancel_iff = thm"hcomplex_hcnj_cancel_iff"; |
|
1760 |
val hcomplex_hcnj_hcnj = thm"hcomplex_hcnj_hcnj"; |
|
1761 |
val hcomplex_hcnj_hcomplex_of_hypreal = thm"hcomplex_hcnj_hcomplex_of_hypreal"; |
|
1762 |
val hcomplex_hmod_hcnj = thm"hcomplex_hmod_hcnj"; |
|
1763 |
val hcomplex_hcnj_minus = thm"hcomplex_hcnj_minus"; |
|
1764 |
val hcomplex_hcnj_inverse = thm"hcomplex_hcnj_inverse"; |
|
1765 |
val hcomplex_hcnj_add = thm"hcomplex_hcnj_add"; |
|
1766 |
val hcomplex_hcnj_diff = thm"hcomplex_hcnj_diff"; |
|
1767 |
val hcomplex_hcnj_mult = thm"hcomplex_hcnj_mult"; |
|
1768 |
val hcomplex_hcnj_divide = thm"hcomplex_hcnj_divide"; |
|
1769 |
val hcnj_one = thm"hcnj_one"; |
|
1770 |
val hcomplex_hcnj_pow = thm"hcomplex_hcnj_pow"; |
|
1771 |
val hcomplex_hcnj_zero = thm"hcomplex_hcnj_zero"; |
|
1772 |
val hcomplex_hcnj_zero_iff = thm"hcomplex_hcnj_zero_iff"; |
|
1773 |
val hcomplex_mult_hcnj = thm"hcomplex_mult_hcnj"; |
|
1774 |
val hcomplex_hcmod_eq_zero_cancel = thm"hcomplex_hcmod_eq_zero_cancel"; |
|
14371
c78c7da09519
Conversion of HyperNat to Isar format and its declaration as a semiring
paulson
parents:
14370
diff
changeset
|
1775 |
|
14314 | 1776 |
val hcmod_hcomplex_of_hypreal_of_nat = thm"hcmod_hcomplex_of_hypreal_of_nat"; |
1777 |
val hcmod_hcomplex_of_hypreal_of_hypnat = thm"hcmod_hcomplex_of_hypreal_of_hypnat"; |
|
1778 |
val hcmod_minus = thm"hcmod_minus"; |
|
1779 |
val hcmod_mult_hcnj = thm"hcmod_mult_hcnj"; |
|
1780 |
val hcmod_ge_zero = thm"hcmod_ge_zero"; |
|
1781 |
val hrabs_hcmod_cancel = thm"hrabs_hcmod_cancel"; |
|
1782 |
val hcmod_mult = thm"hcmod_mult"; |
|
1783 |
val hcmod_add_squared_eq = thm"hcmod_add_squared_eq"; |
|
1784 |
val hcomplex_hRe_mult_hcnj_le_hcmod = thm"hcomplex_hRe_mult_hcnj_le_hcmod"; |
|
1785 |
val hcomplex_hRe_mult_hcnj_le_hcmod2 = thm"hcomplex_hRe_mult_hcnj_le_hcmod2"; |
|
1786 |
val hcmod_triangle_squared = thm"hcmod_triangle_squared"; |
|
1787 |
val hcmod_triangle_ineq = thm"hcmod_triangle_ineq"; |
|
1788 |
val hcmod_triangle_ineq2 = thm"hcmod_triangle_ineq2"; |
|
1789 |
val hcmod_diff_commute = thm"hcmod_diff_commute"; |
|
1790 |
val hcmod_add_less = thm"hcmod_add_less"; |
|
1791 |
val hcmod_mult_less = thm"hcmod_mult_less"; |
|
1792 |
val hcmod_diff_ineq = thm"hcmod_diff_ineq"; |
|
1793 |
val hcpow = thm"hcpow"; |
|
1794 |
val hcomplex_of_hypreal_hyperpow = thm"hcomplex_of_hypreal_hyperpow"; |
|
1795 |
val hcmod_hcomplexpow = thm"hcmod_hcomplexpow"; |
|
1796 |
val hcmod_hcpow = thm"hcmod_hcpow"; |
|
1797 |
val hcomplexpow_minus = thm"hcomplexpow_minus"; |
|
1798 |
val hcpow_minus = thm"hcpow_minus"; |
|
1799 |
val hcmod_hcomplex_inverse = thm"hcmod_hcomplex_inverse"; |
|
1800 |
val hcmod_divide = thm"hcmod_divide"; |
|
1801 |
val hcomplex_inverse_divide = thm"hcomplex_inverse_divide"; |
|
1802 |
val hcpow_mult = thm"hcpow_mult"; |
|
1803 |
val hcpow_zero = thm"hcpow_zero"; |
|
1804 |
val hcpow_zero2 = thm"hcpow_zero2"; |
|
1805 |
val hcpow_not_zero = thm"hcpow_not_zero"; |
|
1806 |
val hcpow_zero_zero = thm"hcpow_zero_zero"; |
|
1807 |
val hcomplex_i_mult_eq = thm"hcomplex_i_mult_eq"; |
|
1808 |
val hcomplexpow_i_squared = thm"hcomplexpow_i_squared"; |
|
1809 |
val hcomplex_i_not_zero = thm"hcomplex_i_not_zero"; |
|
1810 |
val hcomplex_divide = thm"hcomplex_divide"; |
|
1811 |
val hsgn = thm"hsgn"; |
|
1812 |
val hsgn_zero = thm"hsgn_zero"; |
|
1813 |
val hsgn_one = thm"hsgn_one"; |
|
1814 |
val hsgn_minus = thm"hsgn_minus"; |
|
1815 |
val hsgn_eq = thm"hsgn_eq"; |
|
1816 |
val lemma_hypreal_P_EX2 = thm"lemma_hypreal_P_EX2"; |
|
1817 |
val complex_split2 = thm"complex_split2"; |
|
1818 |
val hcomplex_split = thm"hcomplex_split"; |
|
1819 |
val hRe_hcomplex_i = thm"hRe_hcomplex_i"; |
|
1820 |
val hIm_hcomplex_i = thm"hIm_hcomplex_i"; |
|
1821 |
val hcmod_i = thm"hcmod_i"; |
|
1822 |
val hcomplex_eq_hRe_eq = thm"hcomplex_eq_hRe_eq"; |
|
1823 |
val hcomplex_eq_hIm_eq = thm"hcomplex_eq_hIm_eq"; |
|
1824 |
val hcomplex_eq_cancel_iff = thm"hcomplex_eq_cancel_iff"; |
|
1825 |
val hcomplex_eq_cancel_iffA = thm"hcomplex_eq_cancel_iffA"; |
|
1826 |
val hcomplex_eq_cancel_iffB = thm"hcomplex_eq_cancel_iffB"; |
|
1827 |
val hcomplex_eq_cancel_iffC = thm"hcomplex_eq_cancel_iffC"; |
|
1828 |
val hcomplex_eq_cancel_iff2 = thm"hcomplex_eq_cancel_iff2"; |
|
1829 |
val hcomplex_eq_cancel_iff2a = thm"hcomplex_eq_cancel_iff2a"; |
|
1830 |
val hcomplex_eq_cancel_iff3 = thm"hcomplex_eq_cancel_iff3"; |
|
1831 |
val hcomplex_eq_cancel_iff3a = thm"hcomplex_eq_cancel_iff3a"; |
|
1832 |
val hcomplex_split_hRe_zero = thm"hcomplex_split_hRe_zero"; |
|
1833 |
val hcomplex_split_hIm_zero = thm"hcomplex_split_hIm_zero"; |
|
1834 |
val hRe_hsgn = thm"hRe_hsgn"; |
|
1835 |
val hIm_hsgn = thm"hIm_hsgn"; |
|
1836 |
val real_two_squares_add_zero_iff = thm"real_two_squares_add_zero_iff"; |
|
1837 |
val hcomplex_inverse_complex_split = thm"hcomplex_inverse_complex_split"; |
|
1838 |
val hRe_mult_i_eq = thm"hRe_mult_i_eq"; |
|
1839 |
val hIm_mult_i_eq = thm"hIm_mult_i_eq"; |
|
1840 |
val hcmod_mult_i = thm"hcmod_mult_i"; |
|
1841 |
val hcmod_mult_i2 = thm"hcmod_mult_i2"; |
|
1842 |
val harg = thm"harg"; |
|
1843 |
val cos_harg_i_mult_zero = thm"cos_harg_i_mult_zero"; |
|
1844 |
val hcomplex_of_hypreal_zero_iff = thm"hcomplex_of_hypreal_zero_iff"; |
|
1845 |
val complex_split_polar2 = thm"complex_split_polar2"; |
|
1846 |
val hcomplex_split_polar = thm"hcomplex_split_polar"; |
|
1847 |
val hcis = thm"hcis"; |
|
1848 |
val hcis_eq = thm"hcis_eq"; |
|
1849 |
val hrcis = thm"hrcis"; |
|
1850 |
val hrcis_Ex = thm"hrcis_Ex"; |
|
1851 |
val hRe_hcomplex_polar = thm"hRe_hcomplex_polar"; |
|
1852 |
val hRe_hrcis = thm"hRe_hrcis"; |
|
1853 |
val hIm_hcomplex_polar = thm"hIm_hcomplex_polar"; |
|
1854 |
val hIm_hrcis = thm"hIm_hrcis"; |
|
1855 |
val hcmod_complex_polar = thm"hcmod_complex_polar"; |
|
1856 |
val hcmod_hrcis = thm"hcmod_hrcis"; |
|
1857 |
val hcis_hrcis_eq = thm"hcis_hrcis_eq"; |
|
1858 |
val hrcis_mult = thm"hrcis_mult"; |
|
1859 |
val hcis_mult = thm"hcis_mult"; |
|
1860 |
val hcis_zero = thm"hcis_zero"; |
|
1861 |
val hrcis_zero_mod = thm"hrcis_zero_mod"; |
|
1862 |
val hrcis_zero_arg = thm"hrcis_zero_arg"; |
|
1863 |
val hcomplex_i_mult_minus = thm"hcomplex_i_mult_minus"; |
|
1864 |
val hcomplex_i_mult_minus2 = thm"hcomplex_i_mult_minus2"; |
|
1865 |
val hcis_hypreal_of_nat_Suc_mult = thm"hcis_hypreal_of_nat_Suc_mult"; |
|
1866 |
val NSDeMoivre = thm"NSDeMoivre"; |
|
1867 |
val hcis_hypreal_of_hypnat_Suc_mult = thm"hcis_hypreal_of_hypnat_Suc_mult"; |
|
1868 |
val NSDeMoivre_ext = thm"NSDeMoivre_ext"; |
|
1869 |
val DeMoivre2 = thm"DeMoivre2"; |
|
1870 |
val DeMoivre2_ext = thm"DeMoivre2_ext"; |
|
1871 |
val hcis_inverse = thm"hcis_inverse"; |
|
1872 |
val hrcis_inverse = thm"hrcis_inverse"; |
|
1873 |
val hRe_hcis = thm"hRe_hcis"; |
|
1874 |
val hIm_hcis = thm"hIm_hcis"; |
|
1875 |
val cos_n_hRe_hcis_pow_n = thm"cos_n_hRe_hcis_pow_n"; |
|
1876 |
val sin_n_hIm_hcis_pow_n = thm"sin_n_hIm_hcis_pow_n"; |
|
1877 |
val cos_n_hRe_hcis_hcpow_n = thm"cos_n_hRe_hcis_hcpow_n"; |
|
1878 |
val sin_n_hIm_hcis_hcpow_n = thm"sin_n_hIm_hcis_hcpow_n"; |
|
1879 |
val hexpi_add = thm"hexpi_add"; |
|
1880 |
val hcomplex_of_complex_add = thm"hcomplex_of_complex_add"; |
|
1881 |
val hcomplex_of_complex_mult = thm"hcomplex_of_complex_mult"; |
|
1882 |
val hcomplex_of_complex_eq_iff = thm"hcomplex_of_complex_eq_iff"; |
|
1883 |
val hcomplex_of_complex_minus = thm"hcomplex_of_complex_minus"; |
|
1884 |
val hcomplex_of_complex_one = thm"hcomplex_of_complex_one"; |
|
1885 |
val hcomplex_of_complex_zero = thm"hcomplex_of_complex_zero"; |
|
1886 |
val hcomplex_of_complex_zero_iff = thm"hcomplex_of_complex_zero_iff"; |
|
1887 |
val hcomplex_of_complex_inverse = thm"hcomplex_of_complex_inverse"; |
|
1888 |
val hcomplex_of_complex_divide = thm"hcomplex_of_complex_divide"; |
|
1889 |
val hRe_hcomplex_of_complex = thm"hRe_hcomplex_of_complex"; |
|
1890 |
val hIm_hcomplex_of_complex = thm"hIm_hcomplex_of_complex"; |
|
1891 |
val hcmod_hcomplex_of_complex = thm"hcmod_hcomplex_of_complex"; |
|
1892 |
*} |
|
1893 |
||
13957 | 1894 |
end |