606 apply (simp only: pos_le_divide_eq [symmetric], linarith) |
606 apply (simp only: pos_le_divide_eq [symmetric], linarith) |
607 done |
607 done |
608 |
608 |
609 lemma e_less_3: "exp 1 < (3::real)" |
609 lemma e_less_3: "exp 1 < (3::real)" |
610 using e_approx_32 |
610 using e_approx_32 |
611 by (simp add: abs_if split: split_if_asm) |
611 by (simp add: abs_if split: if_split_asm) |
612 |
612 |
613 lemma ln3_gt_1: "ln 3 > (1::real)" |
613 lemma ln3_gt_1: "ln 3 > (1::real)" |
614 by (metis e_less_3 exp_less_cancel_iff exp_ln_iff less_trans ln_exp) |
614 by (metis e_less_3 exp_less_cancel_iff exp_ln_iff less_trans ln_exp) |
615 |
615 |
616 |
616 |
1086 using Im_Ln_le_pi [of z] mpi_less_Im_Ln [of z] assms |
1086 using Im_Ln_le_pi [of z] mpi_less_Im_Ln [of z] assms |
1087 by auto |
1087 by auto |
1088 then have "\<bar>Im w\<bar> < pi/2 \<longleftrightarrow> 0 < Re(exp w)" |
1088 then have "\<bar>Im w\<bar> < pi/2 \<longleftrightarrow> 0 < Re(exp w)" |
1089 apply (auto simp: Re_exp zero_less_mult_iff cos_gt_zero_pi) |
1089 apply (auto simp: Re_exp zero_less_mult_iff cos_gt_zero_pi) |
1090 using cos_lt_zero_pi [of "-(Im w)"] cos_lt_zero_pi [of "(Im w)"] |
1090 using cos_lt_zero_pi [of "-(Im w)"] cos_lt_zero_pi [of "(Im w)"] |
1091 apply (simp add: abs_if split: split_if_asm) |
1091 apply (simp add: abs_if split: if_split_asm) |
1092 apply (metis (no_types) cos_minus cos_pi_half eq_divide_eq_numeral1(1) eq_numeral_simps(4) |
1092 apply (metis (no_types) cos_minus cos_pi_half eq_divide_eq_numeral1(1) eq_numeral_simps(4) |
1093 less_numeral_extra(3) linorder_neqE_linordered_idom minus_mult_minus minus_mult_right |
1093 less_numeral_extra(3) linorder_neqE_linordered_idom minus_mult_minus minus_mult_right |
1094 mult_numeral_1_right) |
1094 mult_numeral_1_right) |
1095 done |
1095 done |
1096 } |
1096 } |
1108 using Im_Ln_le_pi [of z] mpi_less_Im_Ln [of z] assms |
1108 using Im_Ln_le_pi [of z] mpi_less_Im_Ln [of z] assms |
1109 by auto |
1109 by auto |
1110 then have "\<bar>Im w\<bar> \<le> pi/2 \<longleftrightarrow> 0 \<le> Re(exp w)" |
1110 then have "\<bar>Im w\<bar> \<le> pi/2 \<longleftrightarrow> 0 \<le> Re(exp w)" |
1111 apply (auto simp: Re_exp zero_le_mult_iff cos_ge_zero) |
1111 apply (auto simp: Re_exp zero_le_mult_iff cos_ge_zero) |
1112 using cos_lt_zero_pi [of "- (Im w)"] cos_lt_zero_pi [of "(Im w)"] not_le |
1112 using cos_lt_zero_pi [of "- (Im w)"] cos_lt_zero_pi [of "(Im w)"] not_le |
1113 apply (auto simp: abs_if split: split_if_asm) |
1113 apply (auto simp: abs_if split: if_split_asm) |
1114 done |
1114 done |
1115 } |
1115 } |
1116 then show ?thesis using assms |
1116 then show ?thesis using assms |
1117 by auto |
1117 by auto |
1118 qed |
1118 qed |
1174 subsection\<open>More Properties of Ln\<close> |
1174 subsection\<open>More Properties of Ln\<close> |
1175 |
1175 |
1176 lemma cnj_Ln: "z \<notin> \<real>\<^sub>\<le>\<^sub>0 \<Longrightarrow> cnj(Ln z) = Ln(cnj z)" |
1176 lemma cnj_Ln: "z \<notin> \<real>\<^sub>\<le>\<^sub>0 \<Longrightarrow> cnj(Ln z) = Ln(cnj z)" |
1177 apply (cases "z=0", auto) |
1177 apply (cases "z=0", auto) |
1178 apply (rule exp_complex_eqI) |
1178 apply (rule exp_complex_eqI) |
1179 apply (auto simp: abs_if split: split_if_asm) |
1179 apply (auto simp: abs_if split: if_split_asm) |
1180 using Im_Ln_less_pi Im_Ln_le_pi apply force |
1180 using Im_Ln_less_pi Im_Ln_le_pi apply force |
1181 apply (metis complex_cnj_zero_iff diff_minus_eq_add diff_strict_mono minus_less_iff |
1181 apply (metis complex_cnj_zero_iff diff_minus_eq_add diff_strict_mono minus_less_iff |
1182 mpi_less_Im_Ln mult.commute mult_2_right) |
1182 mpi_less_Im_Ln mult.commute mult_2_right) |
1183 by (metis exp_Ln exp_cnj) |
1183 by (metis exp_Ln exp_cnj) |
1184 |
1184 |
1185 lemma Ln_inverse: "z \<notin> \<real>\<^sub>\<le>\<^sub>0 \<Longrightarrow> Ln(inverse z) = -(Ln z)" |
1185 lemma Ln_inverse: "z \<notin> \<real>\<^sub>\<le>\<^sub>0 \<Longrightarrow> Ln(inverse z) = -(Ln z)" |
1186 apply (cases "z=0", auto) |
1186 apply (cases "z=0", auto) |
1187 apply (rule exp_complex_eqI) |
1187 apply (rule exp_complex_eqI) |
1188 using mpi_less_Im_Ln [of z] mpi_less_Im_Ln [of "inverse z"] |
1188 using mpi_less_Im_Ln [of z] mpi_less_Im_Ln [of "inverse z"] |
1189 apply (auto simp: abs_if exp_minus split: split_if_asm) |
1189 apply (auto simp: abs_if exp_minus split: if_split_asm) |
1190 apply (metis Im_Ln_less_pi Im_Ln_le_pi add.commute add_mono_thms_linordered_field(3) inverse_nonzero_iff_nonzero mult_2) |
1190 apply (metis Im_Ln_less_pi Im_Ln_le_pi add.commute add_mono_thms_linordered_field(3) inverse_nonzero_iff_nonzero mult_2) |
1191 done |
1191 done |
1192 |
1192 |
1193 lemma Ln_minus1 [simp]: "Ln(-1) = ii * pi" |
1193 lemma Ln_minus1 [simp]: "Ln(-1) = ii * pi" |
1194 apply (rule exp_complex_eqI) |
1194 apply (rule exp_complex_eqI) |
1988 less_irrefl mult_zero_right zero_complex.simps(1) zero_complex.simps(2)) |
1988 less_irrefl mult_zero_right zero_complex.simps(1) zero_complex.simps(2)) |
1989 have nzi: "((1 - \<i>*z) * inverse (1 + \<i>*z)) \<noteq> 0" |
1989 have nzi: "((1 - \<i>*z) * inverse (1 + \<i>*z)) \<noteq> 0" |
1990 using nz1 nz2 by auto |
1990 using nz1 nz2 by auto |
1991 have "Im ((1 - \<i>*z) / (1 + \<i>*z)) = 0 \<Longrightarrow> 0 < Re ((1 - \<i>*z) / (1 + \<i>*z))" |
1991 have "Im ((1 - \<i>*z) / (1 + \<i>*z)) = 0 \<Longrightarrow> 0 < Re ((1 - \<i>*z) / (1 + \<i>*z))" |
1992 apply (simp add: divide_complex_def) |
1992 apply (simp add: divide_complex_def) |
1993 apply (simp add: divide_simps split: split_if_asm) |
1993 apply (simp add: divide_simps split: if_split_asm) |
1994 using assms |
1994 using assms |
1995 apply (auto simp: algebra_simps abs_square_less_1 [unfolded power2_eq_square]) |
1995 apply (auto simp: algebra_simps abs_square_less_1 [unfolded power2_eq_square]) |
1996 done |
1996 done |
1997 then have *: "((1 - \<i>*z) / (1 + \<i>*z)) \<notin> \<real>\<^sub>\<le>\<^sub>0" |
1997 then have *: "((1 - \<i>*z) / (1 + \<i>*z)) \<notin> \<real>\<^sub>\<le>\<^sub>0" |
1998 by (auto simp add: complex_nonpos_Reals_iff) |
1998 by (auto simp add: complex_nonpos_Reals_iff) |
2398 also have "... = - (\<i> * Ln (exp (\<i>*z)))" |
2398 also have "... = - (\<i> * Ln (exp (\<i>*z)))" |
2399 by (simp add: field_simps power2_eq_square) |
2399 by (simp add: field_simps power2_eq_square) |
2400 also have "... = z" |
2400 also have "... = z" |
2401 apply (subst Complex_Transcendental.Ln_exp) |
2401 apply (subst Complex_Transcendental.Ln_exp) |
2402 using assms |
2402 using assms |
2403 apply (auto simp: abs_if simp del: eq_divide_eq_numeral1 split: split_if_asm) |
2403 apply (auto simp: abs_if simp del: eq_divide_eq_numeral1 split: if_split_asm) |
2404 done |
2404 done |
2405 finally show ?thesis . |
2405 finally show ?thesis . |
2406 qed |
2406 qed |
2407 |
2407 |
2408 lemma Arcsin_unique: |
2408 lemma Arcsin_unique: |