equal
deleted
inserted
replaced
604 "rcis r a = complex_of_real r * cis a" |
604 "rcis r a = complex_of_real r * cis a" |
605 |
605 |
606 abbreviation expi :: "complex \<Rightarrow> complex" |
606 abbreviation expi :: "complex \<Rightarrow> complex" |
607 where "expi \<equiv> exp" |
607 where "expi \<equiv> exp" |
608 |
608 |
609 lemma cos_coeff_Suc: "cos_coeff (Suc n) = - sin_coeff n / real (Suc n)" |
|
610 unfolding cos_coeff_def sin_coeff_def |
|
611 by (simp del: mult_Suc, auto simp add: odd_Suc_mult_two_ex) |
|
612 |
|
613 lemma sin_coeff_Suc: "sin_coeff (Suc n) = cos_coeff n / real (Suc n)" |
|
614 unfolding cos_coeff_def sin_coeff_def |
|
615 by (simp del: mult_Suc) |
|
616 |
|
617 lemma expi_imaginary: "expi (Complex 0 b) = cis b" |
609 lemma expi_imaginary: "expi (Complex 0 b) = cis b" |
618 proof (rule complex_eqI) |
610 proof (rule complex_eqI) |
619 { fix n have "Complex 0 b ^ n = |
611 { fix n have "Complex 0 b ^ n = |
620 real (fact n) *\<^sub>R Complex (cos_coeff n * b ^ n) (sin_coeff n * b ^ n)" |
612 real (fact n) *\<^sub>R Complex (cos_coeff n * b ^ n) (sin_coeff n * b ^ n)" |
621 apply (induct n) |
613 apply (induct n) |