src/HOL/Analysis/Complex_Transcendental.thy
changeset 77223 607e1e345e8f
parent 77221 0cdb384bf56a
child 77230 2d26af072990
equal deleted inserted replaced
77222:0c073854e6ce 77223:607e1e345e8f
  2647   fixes n::nat and z::complex shows "z powr n = (if z = 0 then 0 else z^n)"
  2647   fixes n::nat and z::complex shows "z powr n = (if z = 0 then 0 else z^n)"
  2648   by (simp add: exp_of_nat_mult powr_def)
  2648   by (simp add: exp_of_nat_mult powr_def)
  2649 
  2649 
  2650 lemma powr_nat': "(z :: complex) \<noteq> 0 \<or> n \<noteq> 0 \<Longrightarrow> z powr of_nat n = z ^ n"
  2650 lemma powr_nat': "(z :: complex) \<noteq> 0 \<or> n \<noteq> 0 \<Longrightarrow> z powr of_nat n = z ^ n"
  2651   by (cases "z = 0") (auto simp: powr_nat)
  2651   by (cases "z = 0") (auto simp: powr_nat)
  2652   
  2652     
  2653 lemma norm_powr_real: "w \<in> \<real> \<Longrightarrow> 0 < Re w \<Longrightarrow> norm(w powr z) = exp(Re z * ln(Re w))"
  2653 lemma norm_powr_real: "w \<in> \<real> \<Longrightarrow> 0 < Re w \<Longrightarrow> norm(w powr z) = exp(Re z * ln(Re w))"
  2654   using Ln_Reals_eq norm_exp_eq_Re by (auto simp: Im_Ln_eq_0 powr_def norm_complex_def)
  2654   using Ln_Reals_eq norm_exp_eq_Re by (auto simp: Im_Ln_eq_0 powr_def norm_complex_def)
  2655 
  2655 
  2656 lemma norm_powr_real_powr': "w \<in> \<real> \<Longrightarrow> norm (z powr w) = norm z powr Re w"
  2656 lemma norm_powr_real_powr': "w \<in> \<real> \<Longrightarrow> norm (z powr w) = norm z powr Re w"
  2657   by (auto simp: powr_def Reals_def)
  2657   by (auto simp: powr_def Reals_def)
  2692   fixes z::complex and n::int
  2692   fixes z::complex and n::int
  2693   assumes "z\<noteq>(0::complex)"
  2693   assumes "z\<noteq>(0::complex)"
  2694   shows "z powr of_int n = (if n\<ge>0 then z^nat n else inverse (z^nat (-n)))"
  2694   shows "z powr of_int n = (if n\<ge>0 then z^nat n else inverse (z^nat (-n)))"
  2695   by (metis assms not_le of_int_of_nat powr_complexpow powr_minus)
  2695   by (metis assms not_le of_int_of_nat powr_complexpow powr_minus)
  2696 
  2696 
       
  2697 lemma complex_powr_of_int: "z \<noteq> 0 \<or> n \<noteq> 0 \<Longrightarrow> z powr of_int n = (z :: complex) powi n"
       
  2698   by (cases "z = 0 \<or> n = 0")
       
  2699      (auto simp: power_int_def powr_minus powr_nat powr_of_int power_0_left power_inverse)
       
  2700   
  2697 lemma powr_Reals_eq: "\<lbrakk>x \<in> \<real>; y \<in> \<real>; Re x \<ge> 0\<rbrakk> \<Longrightarrow> x powr y = of_real (Re x powr Re y)"
  2701 lemma powr_Reals_eq: "\<lbrakk>x \<in> \<real>; y \<in> \<real>; Re x \<ge> 0\<rbrakk> \<Longrightarrow> x powr y = of_real (Re x powr Re y)"
  2698   by (metis of_real_Re powr_of_real)
  2702   by (metis of_real_Re powr_of_real)
  2699 
  2703 
  2700 lemma norm_powr_real_mono:
  2704 lemma norm_powr_real_mono:
  2701     "\<lbrakk>w \<in> \<real>; 1 < Re w\<rbrakk>
  2705     "\<lbrakk>w \<in> \<real>; 1 < Re w\<rbrakk> \<Longrightarrow> cmod(w powr z1) \<le> cmod(w powr z2) \<longleftrightarrow> Re z1 \<le> Re z2"
  2702      \<Longrightarrow> cmod(w powr z1) \<le> cmod(w powr z2) \<longleftrightarrow> Re z1 \<le> Re z2"
       
  2703   by (auto simp: powr_def algebra_simps Reals_def Ln_of_real)
  2706   by (auto simp: powr_def algebra_simps Reals_def Ln_of_real)
  2704 
  2707 
  2705 lemma powr_times_real:
  2708 lemma powr_times_real:
  2706     "\<lbrakk>x \<in> \<real>; y \<in> \<real>; 0 \<le> Re x; 0 \<le> Re y\<rbrakk>
  2709     "\<lbrakk>x \<in> \<real>; y \<in> \<real>; 0 \<le> Re x; 0 \<le> Re y\<rbrakk>
  2707            \<Longrightarrow> (x * y) powr z = x powr z * y powr z"
  2710            \<Longrightarrow> (x * y) powr z = x powr z * y powr z"