1 (* Title : NSA/NSCA.thy |
1 (* Title : NSA/NSCA.thy |
2 Author : Jacques D. Fleuriot |
2 Author : Jacques D. Fleuriot |
3 Copyright : 2001,2002 University of Edinburgh |
3 Copyright : 2001,2002 University of Edinburgh |
4 *) |
4 *) |
5 |
5 |
6 section{*Non-Standard Complex Analysis*} |
6 section\<open>Non-Standard Complex Analysis\<close> |
7 |
7 |
8 theory NSCA |
8 theory NSCA |
9 imports NSComplex HTranscendental |
9 imports NSComplex HTranscendental |
10 begin |
10 begin |
11 |
11 |
12 abbreviation |
12 abbreviation |
13 (* standard complex numbers reagarded as an embedded subset of NS complex *) |
13 (* standard complex numbers reagarded as an embedded subset of NS complex *) |
14 SComplex :: "hcomplex set" where |
14 SComplex :: "hcomplex set" where |
15 "SComplex \<equiv> Standard" |
15 "SComplex \<equiv> Standard" |
16 |
16 |
17 definition --{* standard part map*} |
17 definition \<comment>\<open>standard part map\<close> |
18 stc :: "hcomplex => hcomplex" where |
18 stc :: "hcomplex => hcomplex" where |
19 "stc x = (SOME r. x \<in> HFinite & r:SComplex & r @= x)" |
19 "stc x = (SOME r. x \<in> HFinite & r:SComplex & r @= x)" |
20 |
20 |
21 |
21 |
22 subsection{*Closure Laws for SComplex, the Standard Complex Numbers*} |
22 subsection\<open>Closure Laws for SComplex, the Standard Complex Numbers\<close> |
23 |
23 |
24 lemma SComplex_minus_iff [simp]: "(-x \<in> SComplex) = (x \<in> SComplex)" |
24 lemma SComplex_minus_iff [simp]: "(-x \<in> SComplex) = (x \<in> SComplex)" |
25 by (auto, drule Standard_minus, auto) |
25 by (auto, drule Standard_minus, auto) |
26 |
26 |
27 lemma SComplex_add_cancel: |
27 lemma SComplex_add_cancel: |
66 |] ==> \<exists>r \<in> Reals. hcmod x< r & r < hcmod y" |
66 |] ==> \<exists>r \<in> Reals. hcmod x< r & r < hcmod y" |
67 apply (auto intro: SReal_dense simp add: SReal_hcmod_SComplex) |
67 apply (auto intro: SReal_dense simp add: SReal_hcmod_SComplex) |
68 done |
68 done |
69 |
69 |
70 |
70 |
71 subsection{*The Finite Elements form a Subring*} |
71 subsection\<open>The Finite Elements form a Subring\<close> |
72 |
72 |
73 lemma HFinite_hcmod_hcomplex_of_complex [simp]: |
73 lemma HFinite_hcmod_hcomplex_of_complex [simp]: |
74 "hcmod (hcomplex_of_complex r) \<in> HFinite" |
74 "hcmod (hcomplex_of_complex r) \<in> HFinite" |
75 by (auto intro!: SReal_subset_HFinite [THEN subsetD]) |
75 by (auto intro!: SReal_subset_HFinite [THEN subsetD]) |
76 |
76 |
80 lemma HFinite_bounded_hcmod: |
80 lemma HFinite_bounded_hcmod: |
81 "[|x \<in> HFinite; y \<le> hcmod x; 0 \<le> y |] ==> y: HFinite" |
81 "[|x \<in> HFinite; y \<le> hcmod x; 0 \<le> y |] ==> y: HFinite" |
82 by (auto intro: HFinite_bounded simp add: HFinite_hcmod_iff) |
82 by (auto intro: HFinite_bounded simp add: HFinite_hcmod_iff) |
83 |
83 |
84 |
84 |
85 subsection{*The Complex Infinitesimals form a Subring*} |
85 subsection\<open>The Complex Infinitesimals form a Subring\<close> |
86 |
86 |
87 lemma hcomplex_sum_of_halves: "x/(2::hcomplex) + x/(2::hcomplex) = x" |
87 lemma hcomplex_sum_of_halves: "x/(2::hcomplex) + x/(2::hcomplex) = x" |
88 by auto |
88 by auto |
89 |
89 |
90 lemma Infinitesimal_hcmod_iff: |
90 lemma Infinitesimal_hcmod_iff: |
119 hcmod e' \<le> hcmod x ; hcmod x \<le> hcmod e |
119 hcmod e' \<le> hcmod x ; hcmod x \<le> hcmod e |
120 |] ==> x \<in> Infinitesimal" |
120 |] ==> x \<in> Infinitesimal" |
121 by (auto intro: Infinitesimal_interval2 simp add: Infinitesimal_hcmod_iff) |
121 by (auto intro: Infinitesimal_interval2 simp add: Infinitesimal_hcmod_iff) |
122 |
122 |
123 |
123 |
124 subsection{*The ``Infinitely Close'' Relation*} |
124 subsection\<open>The ``Infinitely Close'' Relation\<close> |
125 |
125 |
126 (* |
126 (* |
127 Goalw [capprox_def,approx_def] "(z @c= w) = (hcmod z @= hcmod w)" |
127 Goalw [capprox_def,approx_def] "(z @c= w) = (hcmod z @= hcmod w)" |
128 by (auto_tac (claset(),simpset() addsimps [Infinitesimal_hcmod_iff])); |
128 by (auto_tac (claset(),simpset() addsimps [Infinitesimal_hcmod_iff])); |
129 *) |
129 *) |
181 apply (rule approx_minus_iff [THEN iffD2]) |
181 apply (rule approx_minus_iff [THEN iffD2]) |
182 apply (auto intro: Infinitesimal_hcmod_add_diff simp add: mem_infmal_iff [symmetric]) |
182 apply (auto intro: Infinitesimal_hcmod_add_diff simp add: mem_infmal_iff [symmetric]) |
183 done |
183 done |
184 |
184 |
185 |
185 |
186 subsection{*Zero is the Only Infinitesimal Complex Number*} |
186 subsection\<open>Zero is the Only Infinitesimal Complex Number\<close> |
187 |
187 |
188 lemma Infinitesimal_less_SComplex: |
188 lemma Infinitesimal_less_SComplex: |
189 "[| x \<in> SComplex; y \<in> Infinitesimal; 0 < hcmod x |] ==> hcmod y < hcmod x" |
189 "[| x \<in> SComplex; y \<in> Infinitesimal; 0 < hcmod x |] ==> hcmod y < hcmod x" |
190 by (auto intro: Infinitesimal_less_SReal SReal_hcmod_SComplex simp add: Infinitesimal_hcmod_iff) |
190 by (auto intro: Infinitesimal_less_SReal SReal_hcmod_SComplex simp add: Infinitesimal_hcmod_iff) |
191 |
191 |
227 |
227 |
228 lemma approx_unique_complex: |
228 lemma approx_unique_complex: |
229 "[| r \<in> SComplex; s \<in> SComplex; r @= x; s @= x|] ==> r = s" |
229 "[| r \<in> SComplex; s \<in> SComplex; r @= x; s @= x|] ==> r = s" |
230 by (blast intro: SComplex_approx_iff [THEN iffD1] approx_trans2) |
230 by (blast intro: SComplex_approx_iff [THEN iffD1] approx_trans2) |
231 |
231 |
232 subsection {* Properties of @{term hRe}, @{term hIm} and @{term HComplex} *} |
232 subsection \<open>Properties of @{term hRe}, @{term hIm} and @{term HComplex}\<close> |
233 |
233 |
234 |
234 |
235 lemma abs_hRe_le_hcmod: "\<And>x. \<bar>hRe x\<bar> \<le> hcmod x" |
235 lemma abs_hRe_le_hcmod: "\<And>x. \<bar>hRe x\<bar> \<le> hcmod x" |
236 by transfer (rule abs_Re_le_cmod) |
236 by transfer (rule abs_Re_le_cmod) |
237 |
237 |
358 |
358 |
359 lemmas hcomplex_of_complex_approx_inverse = |
359 lemmas hcomplex_of_complex_approx_inverse = |
360 hcomplex_of_complex_HFinite_diff_Infinitesimal [THEN [2] approx_inverse] |
360 hcomplex_of_complex_HFinite_diff_Infinitesimal [THEN [2] approx_inverse] |
361 |
361 |
362 |
362 |
363 subsection{*Theorems About Monads*} |
363 subsection\<open>Theorems About Monads\<close> |
364 |
364 |
365 lemma monad_zero_hcmod_iff: "(x \<in> monad 0) = (hcmod x:monad 0)" |
365 lemma monad_zero_hcmod_iff: "(x \<in> monad 0) = (hcmod x:monad 0)" |
366 by (simp add: Infinitesimal_monad_zero_iff [symmetric] Infinitesimal_hcmod_iff) |
366 by (simp add: Infinitesimal_monad_zero_iff [symmetric] Infinitesimal_hcmod_iff) |
367 |
367 |
368 |
368 |
369 subsection{*Theorems About Standard Part*} |
369 subsection\<open>Theorems About Standard Part\<close> |
370 |
370 |
371 lemma stc_approx_self: "x \<in> HFinite ==> stc x @= x" |
371 lemma stc_approx_self: "x \<in> HFinite ==> stc x @= x" |
372 apply (simp add: stc_def) |
372 apply (simp add: stc_def) |
373 apply (frule stc_part_Ex, safe) |
373 apply (frule stc_part_Ex, safe) |
374 apply (rule someI2) |
374 apply (rule someI2) |