author huffman Thu, 18 Aug 2011 22:31:52 -0700 changeset 44291 dbd9965745fd parent 44290 23a5137162ea child 44292 453803d28c4b
define complex exponential 'expi' as abbreviation for 'exp'
 src/HOL/Complex.thy file | annotate | diff | comparison | revisions
```--- a/src/HOL/Complex.thy	Thu Aug 18 21:23:31 2011 -0700
+++ b/src/HOL/Complex.thy	Thu Aug 18 22:31:52 2011 -0700
@@ -603,10 +603,42 @@
rcis :: "[real, real] => complex" where
"rcis r a = complex_of_real r * cis a"

-definition
-  (* e ^ (x + iy) *)
-  expi :: "complex => complex" where
-  "expi z = complex_of_real(exp (Re z)) * cis (Im z)"
+abbreviation expi :: "complex \<Rightarrow> complex"
+  where "expi \<equiv> exp"
+
+lemma cos_coeff_Suc: "cos_coeff (Suc n) = - sin_coeff n / real (Suc n)"
+  unfolding cos_coeff_def sin_coeff_def
+  by (simp del: mult_Suc, auto simp add: odd_Suc_mult_two_ex)
+
+lemma sin_coeff_Suc: "sin_coeff (Suc n) = cos_coeff n / real (Suc n)"
+  unfolding cos_coeff_def sin_coeff_def
+  by (simp del: mult_Suc)
+
+lemma expi_imaginary: "expi (Complex 0 b) = cis b"
+proof (rule complex_eqI)
+  { fix n have "Complex 0 b ^ n =
+    real (fact n) *\<^sub>R Complex (cos_coeff n * b ^ n) (sin_coeff n * b ^ n)"
+      apply (induct n)
+      apply (simp add: cos_coeff_def sin_coeff_def)
+      apply (simp add: sin_coeff_Suc cos_coeff_Suc del: mult_Suc)
+      done } note * = this
+  show "Re (exp (Complex 0 b)) = Re (cis b)"
+    unfolding exp_def cis_def cos_def
+    by (subst bounded_linear.suminf[OF bounded_linear_Re summable_exp_generic],
+      simp add: * mult_assoc [symmetric])
+  show "Im (exp (Complex 0 b)) = Im (cis b)"
+    unfolding exp_def cis_def sin_def
+    by (subst bounded_linear.suminf[OF bounded_linear_Im summable_exp_generic],
+      simp add: * mult_assoc [symmetric])
+qed
+
+lemma expi_def: "expi z = complex_of_real (exp (Re z)) * cis (Im z)"
+proof -
+  have "expi z = expi (complex_of_real (Re z) + Complex 0 (Im z))"
+    by simp
+  thus ?thesis
+    unfolding exp_add exp_of_real expi_imaginary .
+qed

lemma complex_split_polar:
"\<exists>r a. z = complex_of_real r * (Complex (cos a) (sin a))"
@@ -713,10 +745,10 @@