src/HOL/Complex/NSCA.thy
changeset 17300 5798fbf42a6a
parent 17298 ad73fb6144cf
child 17318 bc1c75855f3d
equal deleted inserted replaced
17299:c6eecde058e4 17300:5798fbf42a6a
   132 done
   132 done
   133 
   133 
   134 lemma SComplex_hcmod_SReal: 
   134 lemma SComplex_hcmod_SReal: 
   135       "z \<in> SComplex ==> hcmod z \<in> Reals"
   135       "z \<in> SComplex ==> hcmod z \<in> Reals"
   136 apply (simp add: SComplex_def SReal_def)
   136 apply (simp add: SComplex_def SReal_def)
   137 apply (rule_tac z = z in eq_Abs_hcomplex)
   137 apply (rule_tac z = z in eq_Abs_star)
   138 apply (auto simp add: hcmod hypreal_of_real_def star_of_def star_n_def hcomplex_of_complex_def cmod_def)
   138 apply (auto simp add: hcmod hypreal_of_real_def star_of_def star_n_def hcomplex_of_complex_def cmod_def)
   139 apply (rule_tac x = "cmod r" in exI)
   139 apply (rule_tac x = "cmod r" in exI)
   140 apply (simp add: cmod_def, ultra)
   140 apply (simp add: cmod_def, ultra)
   141 done
   141 done
   142 
   142 
   143 lemma SComplex_zero [simp]: "0 \<in> SComplex"
   143 lemma SComplex_zero [simp]: "0 \<in> SComplex"
   144 by (simp add: SComplex_def hcomplex_of_complex_zero_iff)
   144 by (simp add: SComplex_def hcomplex_of_complex_zero_iff)
   145 
   145 
   146 lemma SComplex_one [simp]: "1 \<in> SComplex"
   146 lemma SComplex_one [simp]: "1 \<in> SComplex"
   147 by (simp add: SComplex_def hcomplex_of_complex_def hcomplex_one_def)
   147 by (simp add: SComplex_def hcomplex_of_complex_def star_of_def star_n_def hypreal_one_def)
   148 
   148 
   149 (*
   149 (*
   150 Goalw [SComplex_def,SReal_def] "hcmod z \<in> Reals ==> z \<in> SComplex"
   150 Goalw [SComplex_def,SReal_def] "hcmod z \<in> Reals ==> z \<in> SComplex"
   151 by (res_inst_tac [("z","z")] eq_Abs_hcomplex 1);
   151 by (res_inst_tac [("z","z")] eq_Abs_hcomplex 1);
   152 by (auto_tac (claset(),simpset() addsimps [hcmod,hypreal_of_real_def,
   152 by (auto_tac (claset(),simpset() addsimps [hcmod,hypreal_of_real_def,
   657 lemma capprox_unique_complex:
   657 lemma capprox_unique_complex:
   658      "[| r \<in> SComplex; s \<in> SComplex; r @c= x; s @c= x|] ==> r = s"
   658      "[| r \<in> SComplex; s \<in> SComplex; r @c= x; s @c= x|] ==> r = s"
   659 by (blast intro: SComplex_capprox_iff [THEN iffD1] capprox_trans2)
   659 by (blast intro: SComplex_capprox_iff [THEN iffD1] capprox_trans2)
   660 
   660 
   661 lemma hcomplex_capproxD1:
   661 lemma hcomplex_capproxD1:
   662      "Abs_hcomplex(hcomplexrel ``{%n. X n}) @c= Abs_hcomplex(hcomplexrel``{%n. Y n})  
   662      "Abs_star(starrel ``{%n. X n}) @c= Abs_star(starrel``{%n. Y n})  
   663       ==> Abs_star(starrel `` {%n. Re(X n)}) @=  
   663       ==> Abs_star(starrel `` {%n. Re(X n)}) @=  
   664           Abs_star(starrel `` {%n. Re(Y n)})"
   664           Abs_star(starrel `` {%n. Re(Y n)})"
   665 apply (auto simp add: approx_FreeUltrafilterNat_iff)
   665 apply (auto simp add: approx_FreeUltrafilterNat_iff)
   666 apply (drule capprox_minus_iff [THEN iffD1])
   666 apply (drule capprox_minus_iff [THEN iffD1])
   667 apply (auto simp add: hcomplex_minus hcomplex_add mem_cinfmal_iff [symmetric] CInfinitesimal_hcmod_iff hcmod Infinitesimal_FreeUltrafilterNat_iff2)
   667 apply (auto simp add: hcomplex_minus hcomplex_add mem_cinfmal_iff [symmetric] CInfinitesimal_hcmod_iff hcmod Infinitesimal_FreeUltrafilterNat_iff2)
   676 apply (auto simp del: realpow_Suc)
   676 apply (auto simp del: realpow_Suc)
   677 done
   677 done
   678 
   678 
   679 (* same proof *)
   679 (* same proof *)
   680 lemma hcomplex_capproxD2:
   680 lemma hcomplex_capproxD2:
   681      "Abs_hcomplex(hcomplexrel ``{%n. X n}) @c= Abs_hcomplex(hcomplexrel``{%n. Y n})  
   681      "Abs_star(starrel ``{%n. X n}) @c= Abs_star(starrel``{%n. Y n})  
   682       ==> Abs_star(starrel `` {%n. Im(X n)}) @=  
   682       ==> Abs_star(starrel `` {%n. Im(X n)}) @=  
   683           Abs_star(starrel `` {%n. Im(Y n)})"
   683           Abs_star(starrel `` {%n. Im(Y n)})"
   684 apply (auto simp add: approx_FreeUltrafilterNat_iff)
   684 apply (auto simp add: approx_FreeUltrafilterNat_iff)
   685 apply (drule capprox_minus_iff [THEN iffD1])
   685 apply (drule capprox_minus_iff [THEN iffD1])
   686 apply (auto simp add: hcomplex_minus hcomplex_add mem_cinfmal_iff [symmetric] CInfinitesimal_hcmod_iff hcmod Infinitesimal_FreeUltrafilterNat_iff2)
   686 apply (auto simp add: hcomplex_minus hcomplex_add mem_cinfmal_iff [symmetric] CInfinitesimal_hcmod_iff hcmod Infinitesimal_FreeUltrafilterNat_iff2)
   697 lemma hcomplex_capproxI:
   697 lemma hcomplex_capproxI:
   698      "[| Abs_star(starrel `` {%n. Re(X n)}) @=  
   698      "[| Abs_star(starrel `` {%n. Re(X n)}) @=  
   699          Abs_star(starrel `` {%n. Re(Y n)});  
   699          Abs_star(starrel `` {%n. Re(Y n)});  
   700          Abs_star(starrel `` {%n. Im(X n)}) @=  
   700          Abs_star(starrel `` {%n. Im(X n)}) @=  
   701          Abs_star(starrel `` {%n. Im(Y n)})  
   701          Abs_star(starrel `` {%n. Im(Y n)})  
   702       |] ==> Abs_hcomplex(hcomplexrel ``{%n. X n}) @c= Abs_hcomplex(hcomplexrel``{%n. Y n})"
   702       |] ==> Abs_star(starrel ``{%n. X n}) @c= Abs_star(starrel``{%n. Y n})"
   703 apply (drule approx_minus_iff [THEN iffD1])
   703 apply (drule approx_minus_iff [THEN iffD1])
   704 apply (drule approx_minus_iff [THEN iffD1])
   704 apply (drule approx_minus_iff [THEN iffD1])
   705 apply (rule capprox_minus_iff [THEN iffD2])
   705 apply (rule capprox_minus_iff [THEN iffD2])
   706 apply (auto simp add: mem_cinfmal_iff [symmetric] mem_infmal_iff [symmetric] hypreal_minus hypreal_add hcomplex_minus hcomplex_add CInfinitesimal_hcmod_iff hcmod Infinitesimal_FreeUltrafilterNat_iff)
   706 apply (auto simp add: mem_cinfmal_iff [symmetric] mem_infmal_iff [symmetric] hypreal_minus hypreal_add hcomplex_minus hcomplex_add CInfinitesimal_hcmod_iff hcmod Infinitesimal_FreeUltrafilterNat_iff)
   707 apply (rule bexI, rule_tac [2] lemma_starrel_refl, auto)
   707 apply (rule bexI, rule_tac [2] lemma_starrel_refl, auto)
   716 apply (rule_tac [2] lemma_sqrt_hcomplex_capprox, auto)
   716 apply (rule_tac [2] lemma_sqrt_hcomplex_capprox, auto)
   717 apply (simp add: power2_eq_square)
   717 apply (simp add: power2_eq_square)
   718 done
   718 done
   719 
   719 
   720 lemma capprox_approx_iff:
   720 lemma capprox_approx_iff:
   721      "(Abs_hcomplex(hcomplexrel ``{%n. X n}) @c= Abs_hcomplex(hcomplexrel``{%n. Y n})) = 
   721      "(Abs_star(starrel ``{%n. X n}) @c= Abs_star(starrel``{%n. Y n})) = 
   722        (Abs_star(starrel `` {%n. Re(X n)}) @= Abs_star(starrel `` {%n. Re(Y n)}) &  
   722        (Abs_star(starrel `` {%n. Re(X n)}) @= Abs_star(starrel `` {%n. Re(Y n)}) &  
   723         Abs_star(starrel `` {%n. Im(X n)}) @= Abs_star(starrel `` {%n. Im(Y n)}))"
   723         Abs_star(starrel `` {%n. Im(X n)}) @= Abs_star(starrel `` {%n. Im(Y n)}))"
   724 apply (blast intro: hcomplex_capproxI hcomplex_capproxD1 hcomplex_capproxD2)
   724 apply (blast intro: hcomplex_capproxI hcomplex_capproxD1 hcomplex_capproxD2)
   725 done
   725 done
   726 
   726 
   729 apply (rule_tac z=x in eq_Abs_star, rule_tac z=z in eq_Abs_star)
   729 apply (rule_tac z=x in eq_Abs_star, rule_tac z=z in eq_Abs_star)
   730 apply (simp add: hcomplex_of_hypreal capprox_approx_iff)
   730 apply (simp add: hcomplex_of_hypreal capprox_approx_iff)
   731 done
   731 done
   732 
   732 
   733 lemma CFinite_HFinite_Re:
   733 lemma CFinite_HFinite_Re:
   734      "Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> CFinite  
   734      "Abs_star(starrel ``{%n. X n}) \<in> CFinite  
   735       ==> Abs_star(starrel `` {%n. Re(X n)}) \<in> HFinite"
   735       ==> Abs_star(starrel `` {%n. Re(X n)}) \<in> HFinite"
   736 apply (auto simp add: CFinite_hcmod_iff hcmod HFinite_FreeUltrafilterNat_iff)
   736 apply (auto simp add: CFinite_hcmod_iff hcmod HFinite_FreeUltrafilterNat_iff)
   737 apply (rule bexI, rule_tac [2] lemma_starrel_refl)
   737 apply (rule bexI, rule_tac [2] lemma_starrel_refl)
   738 apply (rule_tac x = u in exI, ultra)
   738 apply (rule_tac x = u in exI, ultra)
   739 apply (drule sym, case_tac "X x")
   739 apply (drule sym, case_tac "X x")
   743 apply (drule real_sqrt_ge_abs1 [THEN [2] order_less_le_trans]) 
   743 apply (drule real_sqrt_ge_abs1 [THEN [2] order_less_le_trans]) 
   744 apply (auto simp add: numeral_2_eq_2 [symmetric]) 
   744 apply (auto simp add: numeral_2_eq_2 [symmetric]) 
   745 done
   745 done
   746 
   746 
   747 lemma CFinite_HFinite_Im:
   747 lemma CFinite_HFinite_Im:
   748      "Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> CFinite  
   748      "Abs_star(starrel ``{%n. X n}) \<in> CFinite  
   749       ==> Abs_star(starrel `` {%n. Im(X n)}) \<in> HFinite"
   749       ==> Abs_star(starrel `` {%n. Im(X n)}) \<in> HFinite"
   750 apply (auto simp add: CFinite_hcmod_iff hcmod HFinite_FreeUltrafilterNat_iff)
   750 apply (auto simp add: CFinite_hcmod_iff hcmod HFinite_FreeUltrafilterNat_iff)
   751 apply (rule bexI, rule_tac [2] lemma_starrel_refl)
   751 apply (rule bexI, rule_tac [2] lemma_starrel_refl)
   752 apply (rule_tac x = u in exI, ultra)
   752 apply (rule_tac x = u in exI, ultra)
   753 apply (drule sym, case_tac "X x")
   753 apply (drule sym, case_tac "X x")
   758 done
   758 done
   759 
   759 
   760 lemma HFinite_Re_Im_CFinite:
   760 lemma HFinite_Re_Im_CFinite:
   761      "[| Abs_star(starrel `` {%n. Re(X n)}) \<in> HFinite;  
   761      "[| Abs_star(starrel `` {%n. Re(X n)}) \<in> HFinite;  
   762          Abs_star(starrel `` {%n. Im(X n)}) \<in> HFinite  
   762          Abs_star(starrel `` {%n. Im(X n)}) \<in> HFinite  
   763       |] ==> Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> CFinite"
   763       |] ==> Abs_star(starrel ``{%n. X n}) \<in> CFinite"
   764 apply (auto simp add: CFinite_hcmod_iff hcmod HFinite_FreeUltrafilterNat_iff)
   764 apply (auto simp add: CFinite_hcmod_iff hcmod HFinite_FreeUltrafilterNat_iff)
   765 apply (rename_tac Y Z u v)
   765 apply (rename_tac Y Z u v)
   766 apply (rule bexI, rule_tac [2] lemma_starrel_refl)
   766 apply (rule bexI, rule_tac [2] lemma_starrel_refl)
   767 apply (rule_tac x = "2* (u + v) " in exI)
   767 apply (rule_tac x = "2* (u + v) " in exI)
   768 apply ultra
   768 apply ultra
   776 apply (rule_tac [2] lemma_sqrt_hcomplex_capprox, auto)
   776 apply (rule_tac [2] lemma_sqrt_hcomplex_capprox, auto)
   777 apply (simp add: power2_eq_square)
   777 apply (simp add: power2_eq_square)
   778 done
   778 done
   779 
   779 
   780 lemma CFinite_HFinite_iff:
   780 lemma CFinite_HFinite_iff:
   781      "(Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> CFinite) =  
   781      "(Abs_star(starrel ``{%n. X n}) \<in> CFinite) =  
   782       (Abs_star(starrel `` {%n. Re(X n)}) \<in> HFinite &  
   782       (Abs_star(starrel `` {%n. Re(X n)}) \<in> HFinite &  
   783        Abs_star(starrel `` {%n. Im(X n)}) \<in> HFinite)"
   783        Abs_star(starrel `` {%n. Im(X n)}) \<in> HFinite)"
   784 by (blast intro: HFinite_Re_Im_CFinite CFinite_HFinite_Im CFinite_HFinite_Re)
   784 by (blast intro: HFinite_Re_Im_CFinite CFinite_HFinite_Im CFinite_HFinite_Re)
   785 
   785 
   786 lemma SComplex_Re_SReal:
   786 lemma SComplex_Re_SReal:
   787      "Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> SComplex  
   787      "Abs_star(starrel ``{%n. X n}) \<in> SComplex  
   788       ==> Abs_star(starrel `` {%n. Re(X n)}) \<in> Reals"
   788       ==> Abs_star(starrel `` {%n. Re(X n)}) \<in> Reals"
   789 apply (auto simp add: SComplex_def hcomplex_of_complex_def SReal_def hypreal_of_real_def star_of_def star_n_def)
   789 apply (auto simp add: SComplex_def hcomplex_of_complex_def SReal_def hypreal_of_real_def star_of_def star_n_def)
   790 apply (rule_tac x = "Re r" in exI, ultra)
   790 apply (rule_tac x = "Re r" in exI, ultra)
   791 done
   791 done
   792 
   792 
   793 lemma SComplex_Im_SReal:
   793 lemma SComplex_Im_SReal:
   794      "Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> SComplex  
   794      "Abs_star(starrel ``{%n. X n}) \<in> SComplex  
   795       ==> Abs_star(starrel `` {%n. Im(X n)}) \<in> Reals"
   795       ==> Abs_star(starrel `` {%n. Im(X n)}) \<in> Reals"
   796 apply (auto simp add: SComplex_def hcomplex_of_complex_def SReal_def hypreal_of_real_def star_of_def star_n_def)
   796 apply (auto simp add: SComplex_def hcomplex_of_complex_def SReal_def hypreal_of_real_def star_of_def star_n_def)
   797 apply (rule_tac x = "Im r" in exI, ultra)
   797 apply (rule_tac x = "Im r" in exI, ultra)
   798 done
   798 done
   799 
   799 
   800 lemma Reals_Re_Im_SComplex:
   800 lemma Reals_Re_Im_SComplex:
   801      "[| Abs_star(starrel `` {%n. Re(X n)}) \<in> Reals;  
   801      "[| Abs_star(starrel `` {%n. Re(X n)}) \<in> Reals;  
   802          Abs_star(starrel `` {%n. Im(X n)}) \<in> Reals  
   802          Abs_star(starrel `` {%n. Im(X n)}) \<in> Reals  
   803       |] ==> Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> SComplex"
   803       |] ==> Abs_star(starrel ``{%n. X n}) \<in> SComplex"
   804 apply (auto simp add: SComplex_def hcomplex_of_complex_def SReal_def hypreal_of_real_def star_of_def star_n_def)
   804 apply (auto simp add: SComplex_def hcomplex_of_complex_def SReal_def hypreal_of_real_def star_of_def star_n_def)
   805 apply (rule_tac x = "Complex r ra" in exI, ultra)
   805 apply (rule_tac x = "Complex r ra" in exI, ultra)
   806 done
   806 done
   807 
   807 
   808 lemma SComplex_SReal_iff:
   808 lemma SComplex_SReal_iff:
   809      "(Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> SComplex) =  
   809      "(Abs_star(starrel ``{%n. X n}) \<in> SComplex) =  
   810       (Abs_star(starrel `` {%n. Re(X n)}) \<in> Reals &  
   810       (Abs_star(starrel `` {%n. Re(X n)}) \<in> Reals &  
   811        Abs_star(starrel `` {%n. Im(X n)}) \<in> Reals)"
   811        Abs_star(starrel `` {%n. Im(X n)}) \<in> Reals)"
   812 by (blast intro: SComplex_Re_SReal SComplex_Im_SReal Reals_Re_Im_SComplex)
   812 by (blast intro: SComplex_Re_SReal SComplex_Im_SReal Reals_Re_Im_SComplex)
   813 
   813 
   814 lemma CInfinitesimal_Infinitesimal_iff:
   814 lemma CInfinitesimal_Infinitesimal_iff:
   815      "(Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> CInfinitesimal) =  
   815      "(Abs_star(starrel ``{%n. X n}) \<in> CInfinitesimal) =  
   816       (Abs_star(starrel `` {%n. Re(X n)}) \<in> Infinitesimal &  
   816       (Abs_star(starrel `` {%n. Re(X n)}) \<in> Infinitesimal &  
   817        Abs_star(starrel `` {%n. Im(X n)}) \<in> Infinitesimal)"
   817        Abs_star(starrel `` {%n. Im(X n)}) \<in> Infinitesimal)"
   818 by (simp add: mem_cinfmal_iff mem_infmal_iff hcomplex_zero_num hypreal_zero_num capprox_approx_iff)
   818 by (simp add: mem_cinfmal_iff mem_infmal_iff hcomplex_zero_num hypreal_zero_num capprox_approx_iff)
   819 
   819 
   820 lemma eq_Abs_hcomplex_EX:
   820 lemma eq_Abs_star_EX:
   821      "(\<exists>t. P t) = (\<exists>X. P (Abs_hcomplex(hcomplexrel `` {X})))"
   821      "(\<exists>t. P t) = (\<exists>X. P (Abs_star(starrel `` {X})))"
   822 apply auto
   822 apply auto
   823 apply (rule_tac z = t in eq_Abs_hcomplex, auto)
   823 apply (rule_tac z = t in eq_Abs_star, auto)
   824 done
   824 done
   825 
   825 
   826 lemma eq_Abs_hcomplex_Bex:
   826 lemma eq_Abs_star_Bex:
   827      "(\<exists>t \<in> A. P t) = (\<exists>X. (Abs_hcomplex(hcomplexrel `` {X})) \<in> A &  
   827      "(\<exists>t \<in> A. P t) = (\<exists>X. (Abs_star(starrel `` {X})) \<in> A &  
   828                          P (Abs_hcomplex(hcomplexrel `` {X})))"
   828                          P (Abs_star(starrel `` {X})))"
   829 apply auto
   829 apply auto
   830 apply (rule_tac z = t in eq_Abs_hcomplex, auto)
   830 apply (rule_tac z = t in eq_Abs_star, auto)
   831 done
   831 done
   832 
   832 
   833 (* Here we go - easy proof now!! *)
   833 (* Here we go - easy proof now!! *)
   834 lemma stc_part_Ex: "x:CFinite ==> \<exists>t \<in> SComplex. x @c= t"
   834 lemma stc_part_Ex: "x:CFinite ==> \<exists>t \<in> SComplex. x @c= t"
   835 apply (rule_tac z = x in eq_Abs_hcomplex)
   835 apply (rule_tac z = x in eq_Abs_star)
   836 apply (auto simp add: CFinite_HFinite_iff eq_Abs_hcomplex_Bex SComplex_SReal_iff capprox_approx_iff)
   836 apply (auto simp add: CFinite_HFinite_iff eq_Abs_star_Bex SComplex_SReal_iff capprox_approx_iff)
   837 apply (drule st_part_Ex, safe)+
   837 apply (drule st_part_Ex, safe)+
   838 apply (rule_tac z = t in eq_Abs_star)
   838 apply (rule_tac z = t in eq_Abs_star)
   839 apply (rule_tac z = ta in eq_Abs_star, auto)
   839 apply (rule_tac z = ta in eq_Abs_star, auto)
   840 apply (rule_tac x = "%n. Complex (xa n) (xb n) " in exI)
   840 apply (rule_tac x = "%n. Complex (xa n) (xb n) " in exI)
   841 apply auto
   841 apply auto
  1169 lemma CInfinitesimal_hcnj_iff [simp]:
  1169 lemma CInfinitesimal_hcnj_iff [simp]:
  1170      "(hcnj z \<in> CInfinitesimal) = (z \<in> CInfinitesimal)"
  1170      "(hcnj z \<in> CInfinitesimal) = (z \<in> CInfinitesimal)"
  1171 by (simp add: CInfinitesimal_hcmod_iff)
  1171 by (simp add: CInfinitesimal_hcmod_iff)
  1172 
  1172 
  1173 lemma CInfinite_HInfinite_iff:
  1173 lemma CInfinite_HInfinite_iff:
  1174      "(Abs_hcomplex(hcomplexrel ``{%n. X n}) \<in> CInfinite) =  
  1174      "(Abs_star(starrel ``{%n. X n}) \<in> CInfinite) =  
  1175       (Abs_star(starrel `` {%n. Re(X n)}) \<in> HInfinite |  
  1175       (Abs_star(starrel `` {%n. Re(X n)}) \<in> HInfinite |  
  1176        Abs_star(starrel `` {%n. Im(X n)}) \<in> HInfinite)"
  1176        Abs_star(starrel `` {%n. Im(X n)}) \<in> HInfinite)"
  1177 by (simp add: CInfinite_CFinite_iff HInfinite_HFinite_iff CFinite_HFinite_iff)
  1177 by (simp add: CInfinite_CFinite_iff HInfinite_HFinite_iff CFinite_HFinite_iff)
  1178 
  1178 
  1179 text{*These theorems should probably be deleted*}
  1179 text{*These theorems should probably be deleted*}
  1214 apply (simp add: iii_def hcomplex_add hcomplex_mult hcomplex_of_hypreal capprox_approx_iff)
  1214 apply (simp add: iii_def hcomplex_add hcomplex_mult hcomplex_of_hypreal capprox_approx_iff)
  1215 done
  1215 done
  1216 
  1216 
  1217 lemma complex_seq_to_hcomplex_CInfinitesimal:
  1217 lemma complex_seq_to_hcomplex_CInfinitesimal:
  1218      "\<forall>n. cmod (X n - x) < inverse (real (Suc n)) ==>  
  1218      "\<forall>n. cmod (X n - x) < inverse (real (Suc n)) ==>  
  1219       Abs_hcomplex(hcomplexrel``{X}) - hcomplex_of_complex x \<in> CInfinitesimal"
  1219       Abs_star(starrel``{X}) - hcomplex_of_complex x \<in> CInfinitesimal"
  1220 apply (simp add: hcomplex_diff CInfinitesimal_hcmod_iff hcomplex_of_complex_def Infinitesimal_FreeUltrafilterNat_iff hcmod)
  1220 apply (simp add: hcomplex_diff CInfinitesimal_hcmod_iff hcomplex_of_complex_def star_of_def star_n_def Infinitesimal_FreeUltrafilterNat_iff hcmod)
  1221 apply (rule bexI, auto)
  1221 apply (rule bexI, auto)
  1222 apply (auto dest: FreeUltrafilterNat_inverse_real_of_posnat FreeUltrafilterNat_all FreeUltrafilterNat_Int intro: order_less_trans FreeUltrafilterNat_subset)
  1222 apply (auto dest: FreeUltrafilterNat_inverse_real_of_posnat FreeUltrafilterNat_all FreeUltrafilterNat_Int intro: order_less_trans FreeUltrafilterNat_subset)
  1223 done
  1223 done
  1224 
  1224 
  1225 lemma CInfinitesimal_hcomplex_of_hypreal_epsilon [simp]:
  1225 lemma CInfinitesimal_hcomplex_of_hypreal_epsilon [simp]:
  1382 val SComplex_Re_SReal = thm "SComplex_Re_SReal";
  1382 val SComplex_Re_SReal = thm "SComplex_Re_SReal";
  1383 val SComplex_Im_SReal = thm "SComplex_Im_SReal";
  1383 val SComplex_Im_SReal = thm "SComplex_Im_SReal";
  1384 val Reals_Re_Im_SComplex = thm "Reals_Re_Im_SComplex";
  1384 val Reals_Re_Im_SComplex = thm "Reals_Re_Im_SComplex";
  1385 val SComplex_SReal_iff = thm "SComplex_SReal_iff";
  1385 val SComplex_SReal_iff = thm "SComplex_SReal_iff";
  1386 val CInfinitesimal_Infinitesimal_iff = thm "CInfinitesimal_Infinitesimal_iff";
  1386 val CInfinitesimal_Infinitesimal_iff = thm "CInfinitesimal_Infinitesimal_iff";
  1387 val eq_Abs_hcomplex_Bex = thm "eq_Abs_hcomplex_Bex";
  1387 val eq_Abs_star_Bex = thm "eq_Abs_star_Bex";
  1388 val stc_part_Ex = thm "stc_part_Ex";
  1388 val stc_part_Ex = thm "stc_part_Ex";
  1389 val stc_part_Ex1 = thm "stc_part_Ex1";
  1389 val stc_part_Ex1 = thm "stc_part_Ex1";
  1390 val CFinite_Int_CInfinite_empty = thm "CFinite_Int_CInfinite_empty";
  1390 val CFinite_Int_CInfinite_empty = thm "CFinite_Int_CInfinite_empty";
  1391 val CFinite_not_CInfinite = thm "CFinite_not_CInfinite";
  1391 val CFinite_not_CInfinite = thm "CFinite_not_CInfinite";
  1392 val not_CFinite_CInfinite = thm "not_CFinite_CInfinite";
  1392 val not_CFinite_CInfinite = thm "not_CFinite_CInfinite";