125 |
125 |
126 defs |
126 defs |
127 (* hypernatural powers of nonstandard complex numbers *) |
127 (* hypernatural powers of nonstandard complex numbers *) |
128 hcpow_def: |
128 hcpow_def: |
129 "(z::hcomplex) hcpow (n::hypnat) |
129 "(z::hcomplex) hcpow (n::hypnat) |
130 == Abs_hcomplex(UN X:Rep_hcomplex(z). UN Y: Rep_hypnat(n). |
130 == Abs_hcomplex(UN X:Rep_hcomplex(z). UN Y: Rep_star(n). |
131 hcomplexrel `` {%n. (X n) ^ (Y n)})" |
131 hcomplexrel `` {%n. (X n) ^ (Y n)})" |
132 |
132 |
133 |
133 |
134 lemma hcomplexrel_refl: "(x,x): hcomplexrel" |
134 lemma hcomplexrel_refl: "(x,x): hcomplexrel" |
135 by (simp add: hcomplexrel_def) |
135 by (simp add: hcomplexrel_def) |
815 |
815 |
816 subsection{*A Few Nonlinear Theorems*} |
816 subsection{*A Few Nonlinear Theorems*} |
817 |
817 |
818 lemma hcpow: |
818 lemma hcpow: |
819 "Abs_hcomplex(hcomplexrel``{%n. X n}) hcpow |
819 "Abs_hcomplex(hcomplexrel``{%n. X n}) hcpow |
820 Abs_hypnat(hypnatrel``{%n. Y n}) = |
820 Abs_star(starrel``{%n. Y n}) = |
821 Abs_hcomplex(hcomplexrel``{%n. X n ^ Y n})" |
821 Abs_hcomplex(hcomplexrel``{%n. X n ^ Y n})" |
822 apply (simp add: hcpow_def) |
822 apply (simp add: hcpow_def) |
823 apply (rule_tac f = Abs_hcomplex in arg_cong) |
823 apply (rule_tac f = Abs_hcomplex in arg_cong) |
824 apply (auto iff: hcomplexrel_iff, ultra) |
824 apply (auto iff: hcomplexrel_iff, ultra) |
825 done |
825 done |
826 |
826 |
827 lemma hcomplex_of_hypreal_hyperpow: |
827 lemma hcomplex_of_hypreal_hyperpow: |
828 "hcomplex_of_hypreal (x pow n) = (hcomplex_of_hypreal x) hcpow n" |
828 "hcomplex_of_hypreal (x pow n) = (hcomplex_of_hypreal x) hcpow n" |
829 apply (rule_tac z=x in eq_Abs_star, cases n) |
829 apply (rule_tac z=x in eq_Abs_star, rule_tac z=n in eq_Abs_star) |
830 apply (simp add: hcomplex_of_hypreal hyperpow hcpow complex_of_real_pow) |
830 apply (simp add: hcomplex_of_hypreal hyperpow hcpow complex_of_real_pow) |
831 done |
831 done |
832 |
832 |
833 lemma hcmod_hcpow: "hcmod(x hcpow n) = hcmod(x) pow n" |
833 lemma hcmod_hcpow: "hcmod(x hcpow n) = hcmod(x) pow n" |
834 apply (cases x, cases n) |
834 apply (cases x, rule_tac z=n in eq_Abs_star) |
835 apply (simp add: hcpow hyperpow hcmod complex_mod_complexpow) |
835 apply (simp add: hcpow hyperpow hcmod complex_mod_complexpow) |
836 done |
836 done |
837 |
837 |
838 lemma hcmod_hcomplex_inverse: "hcmod(inverse x) = inverse(hcmod x)" |
838 lemma hcmod_hcomplex_inverse: "hcmod(inverse x) = inverse(hcmod x)" |
839 apply (case_tac "x = 0", simp) |
839 apply (case_tac "x = 0", simp) |
880 done |
880 done |
881 |
881 |
882 lemma hcpow_minus: |
882 lemma hcpow_minus: |
883 "(-x::hcomplex) hcpow n = |
883 "(-x::hcomplex) hcpow n = |
884 (if ( *pNat* even) n then (x hcpow n) else -(x hcpow n))" |
884 (if ( *pNat* even) n then (x hcpow n) else -(x hcpow n))" |
885 apply (cases x, cases n) |
885 apply (cases x, rule_tac z=n in eq_Abs_star) |
886 apply (auto simp add: hcpow hyperpow starPNat hcomplex_minus, ultra) |
886 apply (auto simp add: hcpow hyperpow starPNat hcomplex_minus, ultra) |
887 apply (auto simp add: neg_power_if, ultra) |
887 apply (auto simp add: neg_power_if, ultra) |
888 done |
888 done |
889 |
889 |
890 lemma hcpow_mult: "((r::hcomplex) * s) hcpow n = (r hcpow n) * (s hcpow n)" |
890 lemma hcpow_mult: "((r::hcomplex) * s) hcpow n = (r hcpow n) * (s hcpow n)" |
891 apply (cases r, cases s, cases n) |
891 apply (cases r, cases s, rule_tac z=n in eq_Abs_star) |
892 apply (simp add: hcpow hypreal_mult hcomplex_mult power_mult_distrib) |
892 apply (simp add: hcpow hypreal_mult hcomplex_mult power_mult_distrib) |
893 done |
893 done |
894 |
894 |
895 lemma hcpow_zero [simp]: "0 hcpow (n + 1) = 0" |
895 lemma hcpow_zero [simp]: "0 hcpow (n + 1) = 0" |
896 apply (simp add: hcomplex_zero_def hypnat_one_def, cases n) |
896 apply (simp add: hcomplex_zero_def hypnat_one_def, rule_tac z=n in eq_Abs_star) |
897 apply (simp add: hcpow hypnat_add) |
897 apply (simp add: hcpow hypnat_add) |
898 done |
898 done |
899 |
899 |
900 lemma hcpow_zero2 [simp]: "0 hcpow (hSuc n) = 0" |
900 lemma hcpow_zero2 [simp]: "0 hcpow (hSuc n) = 0" |
901 by (simp add: hSuc_def) |
901 by (simp add: hSuc_def) |
902 |
902 |
903 lemma hcpow_not_zero [simp,intro]: "r \<noteq> 0 ==> r hcpow n \<noteq> (0::hcomplex)" |
903 lemma hcpow_not_zero [simp,intro]: "r \<noteq> 0 ==> r hcpow n \<noteq> (0::hcomplex)" |
904 apply (cases r, cases n) |
904 apply (cases r, rule_tac z=n in eq_Abs_star) |
905 apply (auto simp add: hcpow hcomplex_zero_def, ultra) |
905 apply (auto simp add: hcpow hcomplex_zero_def, ultra) |
906 done |
906 done |
907 |
907 |
908 lemma hcpow_zero_zero: "r hcpow n = (0::hcomplex) ==> r = 0" |
908 lemma hcpow_zero_zero: "r hcpow n = (0::hcomplex) ==> r = 0" |
909 by (blast intro: ccontr dest: hcpow_not_zero) |
909 by (blast intro: ccontr dest: hcpow_not_zero) |
1192 done |
1192 done |
1193 |
1193 |
1194 lemma hcis_hypreal_of_hypnat_Suc_mult: |
1194 lemma hcis_hypreal_of_hypnat_Suc_mult: |
1195 "hcis (hypreal_of_hypnat (n + 1) * a) = |
1195 "hcis (hypreal_of_hypnat (n + 1) * a) = |
1196 hcis a * hcis (hypreal_of_hypnat n * a)" |
1196 hcis a * hcis (hypreal_of_hypnat n * a)" |
1197 apply (rule_tac z=a in eq_Abs_star, cases n) |
1197 apply (rule_tac z=a in eq_Abs_star, rule_tac z=n in eq_Abs_star) |
1198 apply (simp add: hcis hypreal_of_hypnat hypnat_add hypnat_one_def hypreal_mult hcomplex_mult cis_real_of_nat_Suc_mult) |
1198 apply (simp add: hcis hypreal_of_hypnat hypnat_add hypnat_one_def hypreal_mult hcomplex_mult cis_real_of_nat_Suc_mult) |
1199 done |
1199 done |
1200 |
1200 |
1201 lemma NSDeMoivre_ext: "(hcis a) hcpow n = hcis (hypreal_of_hypnat n * a)" |
1201 lemma NSDeMoivre_ext: "(hcis a) hcpow n = hcis (hypreal_of_hypnat n * a)" |
1202 apply (rule_tac z=a in eq_Abs_star, cases n) |
1202 apply (rule_tac z=a in eq_Abs_star, rule_tac z=n in eq_Abs_star) |
1203 apply (simp add: hcis hypreal_of_hypnat hypreal_mult hcpow DeMoivre) |
1203 apply (simp add: hcis hypreal_of_hypnat hypreal_mult hcpow DeMoivre) |
1204 done |
1204 done |
1205 |
1205 |
1206 lemma DeMoivre2: |
1206 lemma DeMoivre2: |
1207 "(hrcis r a) ^ n = hrcis (r ^ n) (hypreal_of_nat n * a)" |
1207 "(hrcis r a) ^ n = hrcis (r ^ n) (hypreal_of_nat n * a)" |