Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 25e8730

Browse files
committed
feat(analysis/special_functions/pow): abs value of real to complex power (#13048)
1 parent 33a323c commit 25e8730

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/analysis/special_functions/pow.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,23 @@ end
401401
@[simp] lemma abs_cpow_inv_nat (x : ℂ) (n : ℕ) : abs (x ^ (n⁻¹ : ℂ)) = x.abs ^ (n⁻¹ : ℝ) :=
402402
by rw ← abs_cpow_real; simp [-abs_cpow_real]
403403

404+
lemma abs_cpow_eq_rpow_re_of_pos {x : ℝ} (hx : 0 < x) (y : ℂ) : abs (x ^ y) = x ^ y.re :=
405+
begin
406+
rw [cpow_def_of_ne_zero (of_real_ne_zero.mpr hx.ne'), abs_exp, ←of_real_log hx.le,
407+
of_real_mul_re, real.exp_mul, real.exp_log hx],
408+
end
409+
410+
lemma abs_cpow_eq_rpow_re_of_nonneg {x : ℝ} (hx : 0 ≤ x) {y : ℂ} (hy : re y ≠ 0) :
411+
abs (x ^ y) = x ^ y.re :=
412+
begin
413+
rw cpow_def, split_ifs with j1 j2,
414+
{ rw j2, simp, },
415+
{ rw of_real_eq_zero at j1, rw [j1, abs_zero, real.zero_rpow hy] },
416+
{ have : 0 < x := lt_of_le_of_ne hx (ne_comm.mp $ of_real_ne_zero.mp j1),
417+
have t := abs_cpow_eq_rpow_re_of_pos this y,
418+
rwa cpow_def_of_ne_zero (of_real_ne_zero.mpr this.ne') at t }
419+
end
420+
404421
end complex
405422

406423
namespace real

0 commit comments

Comments
 (0)