l3lab/ntp-mathlib huggingface dataset:
theorem ofReal_cpow {x : ℝ} (hx : 0 ≤ x) (y : ℝ) : ((x ^ y : ℝ) : ℂ) = (x : ℂ) ^ (y : ℂ) := by
  simp only [Real.rpow_def_of_nonneg hx, Complex.cpow_def, ofReal_eq_zero]; split_ifs <;>
    

Proof state:
case neg
x : ℝ
hx : 0 ≤ x
y : ℝ
h✝¹ : x = 0
h✝ : ¬y = 0
⊢ ↑0 = 0

Next tactic:
simp [Complex.ofReal_log hx]
theorem ofReal_cpow {x : ℝ} (hx : 0 ≤ x) (y : ℝ) : ((x ^ y : ℝ) : ℂ) = (x : ℂ) ^ (y : ℂ) := by
  simp only [Real.rpow_def_of_nonneg hx, Complex.cpow_def, ofReal_eq_zero]; split_ifs <;>
    

Proof state:
case neg
x : ℝ
hx : 0 ≤ x
y : ℝ
h✝ : ¬x = 0
⊢ ↑(rexp (Real.log x * y)) = cexp (log ↑x * ↑y)

Next tactic:
simp [Complex.ofReal_log hx]
theorem ofReal_cpow_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℂ) :
    (x : ℂ) ^ y = (-x : ℂ) ^ y * exp (π * I * y) := by
  

Proof state:
x : ℝ
hx : x ≤ 0
y : ℂ
⊢ ↑x ^ y = (-↑x) ^ y * cexp (↑π * I * y)

Next tactic:
rcases hx.eq_or_lt with (rfl | hlt)
theorem ofReal_cpow_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℂ) :
    (x : ℂ) ^ y = (-x : ℂ) ^ y * exp (π * I * y) := by
  rcases hx.eq_or_lt with (rfl | hlt)
  · 

Proof state:
case inl
y : ℂ
hx : 0 ≤ 0
⊢ ↑0 ^ y = (-↑0) ^ y * cexp (↑π * I * y)

Next tactic:
rcases eq_or_ne y 0 with (rfl | hy)
theorem ofReal_cpow_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℂ) :
    (x : ℂ) ^ y = (-x : ℂ) ^ y * exp (π * I * y) := by
  rcases hx.eq_or_lt with (rfl | hlt)
  · rcases eq_or_ne y 0 with (rfl | hy) <;> 

Proof state:
case inl.inl
hx : 0 ≤ 0
⊢ ↑0 ^ 0 = (-↑0) ^ 0 * cexp (↑π * I * 0)

Next tactic:
simp [*]
theorem ofReal_cpow_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℂ) :
    (x : ℂ) ^ y = (-x : ℂ) ^ y * exp (π * I * y) := by
  rcases hx.eq_or_lt with (rfl | hlt)
  · rcases eq_or_ne y 0 with (rfl | hy) <;> 

Proof state:
case inl.inr
y : ℂ
hx : 0 ≤ 0
hy : y ≠ 0
⊢ ↑0 ^ y = (-↑0) ^ y * cexp (↑π * I * y)

Next tactic:
simp [*]
theorem ofReal_cpow_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℂ) :
    (x : ℂ) ^ y = (-x : ℂ) ^ y * exp (π * I * y) := by
  rcases hx.eq_or_lt with (rfl | hlt)
  · rcases eq_or_ne y 0 with (rfl | hy) <;> simp [*]
  

Proof state:
case inr
x : ℝ
hx : x ≤ 0
y : ℂ
hlt : x < 0
⊢ ↑x ^ y = (-↑x) ^ y * cexp (↑π * I * y)

Next tactic:
have hne : (x : ℂ) ≠ 0 := ofReal_ne_zero.mpr hlt.ne
theorem ofReal_cpow_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℂ) :
    (x : ℂ) ^ y = (-x : ℂ) ^ y * exp (π * I * y) := by
  rcases hx.eq_or_lt with (rfl | hlt)
  · rcases eq_or_ne y 0 with (rfl | hy) <;> simp [*]
  have hne : (x : ℂ) ≠ 0 := ofReal_ne_zero.mpr hlt.ne
  

Proof state:
case inr
x : ℝ
hx : x ≤ 0
y : ℂ
hlt : x < 0
hne : ↑x ≠ 0
⊢ ↑x ^ y = (-↑x) ^ y * cexp (↑π * I * y)

Next tactic:
rw [cpow_def_of_ne_zero hne, cpow_def_of_ne_zero (neg_ne_zero.2 hne), ← exp_add, ← add_mul, log,
    log, abs.map_neg, arg_ofReal_of_neg hlt, ← ofReal_neg,
    arg_ofReal_of_nonneg (neg_nonneg.2 hx), ofReal_zero, zero_mul, add_zero]
lemma cpow_ofReal (x : ℂ) (y : ℝ) :
    x ^ (y : ℂ) = ↑(abs x ^ y) * (Real.cos (arg x * y) + Real.sin (arg x * y) * I) := by
  

Proof state:
x : ℂ
y : ℝ
⊢ x ^ ↑y = ↑(abs x ^ y) * (↑(Real.cos (arg x * y)) + ↑(Real.sin (arg x * y)) * I)

Next tactic:
rcases eq_or_ne x 0 with rfl | hx
lemma cpow_ofReal (x : ℂ) (y : ℝ) :
    x ^ (y : ℂ) = ↑(abs x ^ y) * (Real.cos (arg x * y) + Real.sin (arg x * y) * I) := by
  rcases eq_or_ne x 0 with rfl | hx
  · 

Proof state:
case inl
y : ℝ
⊢ 0 ^ ↑y = ↑(abs 0 ^ y) * (↑(Real.cos (arg 0 * y)) + ↑(Real.sin (arg 0 * y)) * I)

Next tactic:
simp [ofReal_cpow le_rfl]
lemma cpow_ofReal (x : ℂ) (y : ℝ) :
    x ^ (y : ℂ) = ↑(abs x ^ y) * (Real.cos (arg x * y) + Real.sin (arg x * y) * I) := by
  rcases eq_or_ne x 0 with rfl | hx
  · simp [ofReal_cpow le_rfl]
  · 

Proof state:
case inr
x : ℂ
y : ℝ
hx : x ≠ 0
⊢ x ^ ↑y = ↑(abs x ^ y) * (↑(Real.cos (arg x * y)) + ↑(Real.sin (arg x * y)) * I)

Next tactic:
rw [cpow_def_of_ne_zero hx, exp_eq_exp_re_mul_sin_add_cos, mul_comm (log x)]
lemma cpow_ofReal (x : ℂ) (y : ℝ) :
    x ^ (y : ℂ) = ↑(abs x ^ y) * (Real.cos (arg x * y) + Real.sin (arg x * y) * I) := by
  rcases eq_or_ne x 0 with rfl | hx
  · simp [ofReal_cpow le_rfl]
  · rw [cpow_def_of_ne_zero hx, exp_eq_exp_re_mul_sin_add_cos, mul_comm (log x)]
    

Proof state:
case inr
x : ℂ
y : ℝ
hx : x ≠ 0
⊢ cexp ↑(↑y * log x).re * (cos ↑(↑y * log x).im + sin ↑(↑y * log x).im * I) =
    ↑(abs x ^ y) * (↑(Real.cos (arg x * y)) + ↑(Real.sin (arg x * y)) * I)

Next tactic:
norm_cast
lemma cpow_ofReal (x : ℂ) (y : ℝ) :
    x ^ (y : ℂ) = ↑(abs x ^ y) * (Real.cos (arg x * y) + Real.sin (arg x * y) * I) := by
  rcases eq_or_ne x 0 with rfl | hx
  · simp [ofReal_cpow le_rfl]
  · rw [cpow_def_of_ne_zero hx, exp_eq_exp_re_mul_sin_add_cos, mul_comm (log x)]
    norm_cast
    

Proof state:
case inr
x : ℂ
y : ℝ
hx : x ≠ 0
⊢ ↑(rexp (↑y * log x).re) * (↑(Real.cos (↑y * log x).im) + ↑(Real.sin (↑y * log x).im) * I) =
    ↑(abs x ^ y) * (↑(Real.cos (arg x * y)) + ↑(Real.sin (arg x * y)) * I)

Next tactic:
rw [ofReal_mul_re, ofReal_mul_im, log_re, log_im, mul_comm y, mul_comm y, Real.exp_mul,
      Real.exp_log]
lemma cpow_ofReal (x : ℂ) (y : ℝ) :
    x ^ (y : ℂ) = ↑(abs x ^ y) * (Real.cos (arg x * y) + Real.sin (arg x * y) * I) := by
  rcases eq_or_ne x 0 with rfl | hx
  · simp [ofReal_cpow le_rfl]
  · rw [cpow_def_of_ne_zero hx, exp_eq_exp_re_mul_sin_add_cos, mul_comm (log x)]
    norm_cast
    rw [ofReal_mul_re, ofReal_mul_im, log_re, log_im, mul_comm y, mul_comm y, Real.exp_mul,
      Real.exp_log]
    

Proof state:
case inr
x : ℂ
y : ℝ
hx : x ≠ 0
⊢ 0 < abs x

Next tactic:
rwa [abs.pos_iff]
lemma cpow_ofReal_re (x : ℂ) (y : ℝ) : (x ^ (y : ℂ)).re = (abs x) ^ y * Real.cos (arg x * y) := by
  

Proof state:
x : ℂ
y : ℝ
⊢ (x ^ ↑y).re = abs x ^ y * Real.cos (arg x * y)

Next tactic:
rw [cpow_ofReal]
lemma cpow_ofReal_re (x : ℂ) (y : ℝ) : (x ^ (y : ℂ)).re = (abs x) ^ y * Real.cos (arg x * y) := by
  rw [cpow_ofReal]; 

Proof state:
x : ℂ
y : ℝ
⊢ (↑(abs x ^ y) * (↑(Real.cos (arg x * y)) + ↑(Real.sin (arg x * y)) * I)).re = abs x ^ y * Real.cos (arg x * y)

Next tactic:
generalize arg x * y = z
lemma cpow_ofReal_re (x : ℂ) (y : ℝ) : (x ^ (y : ℂ)).re = (abs x) ^ y * Real.cos (arg x * y) := by
  rw [cpow_ofReal]; generalize arg x * y = z; 

Proof state:
x : ℂ
y z : ℝ
⊢ (↑(abs x ^ y) * (↑(Real.cos z) + ↑(Real.sin z) * I)).re = abs x ^ y * Real.cos z

Next tactic:
simp [Real.cos]
lemma cpow_ofReal_im (x : ℂ) (y : ℝ) : (x ^ (y : ℂ)).im = (abs x) ^ y * Real.sin (arg x * y) := by
  

Proof state:
x : ℂ
y : ℝ
⊢ (x ^ ↑y).im = abs x ^ y * Real.sin (arg x * y)

Next tactic:
rw [cpow_ofReal]
lemma cpow_ofReal_im (x : ℂ) (y : ℝ) : (x ^ (y : ℂ)).im = (abs x) ^ y * Real.sin (arg x * y) := by
  rw [cpow_ofReal]; 

Proof state:
x : ℂ
y : ℝ
⊢ (↑(abs x ^ y) * (↑(Real.cos (arg x * y)) + ↑(Real.sin (arg x * y)) * I)).im = abs x ^ y * Real.sin (arg x * y)

Next tactic:
generalize arg x * y = z
lemma cpow_ofReal_im (x : ℂ) (y : ℝ) : (x ^ (y : ℂ)).im = (abs x) ^ y * Real.sin (arg x * y) := by
  rw [cpow_ofReal]; generalize arg x * y = z; 

Proof state:
x : ℂ
y z : ℝ
⊢ (↑(abs x ^ y) * (↑(Real.cos z) + ↑(Real.sin z) * I)).im = abs x ^ y * Real.sin z

Next tactic:
simp [Real.sin]
theorem abs_cpow_of_ne_zero {z : ℂ} (hz : z ≠ 0) (w : ℂ) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w) := by
  

Proof state:
z : ℂ
hz : z ≠ 0
w : ℂ
⊢ abs (z ^ w) = abs z ^ w.re / rexp (arg z * w.im)

Next tactic:
rw [cpow_def_of_ne_zero hz, abs_exp, mul_re, log_re, log_im, Real.exp_sub,
    Real.rpow_def_of_pos (abs.pos hz)]
theorem abs_cpow_of_imp {z w : ℂ} (h : z = 0 → w.re = 0 → w = 0) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w) := by
  

Proof state:
z w : ℂ
h : z = 0 → w.re = 0 → w = 0
⊢ abs (z ^ w) = abs z ^ w.re / rexp (arg z * w.im)

Next tactic:
rcases ne_or_eq z 0 with (hz | rfl) <;> [exact abs_cpow_of_ne_zero hz w; rw [map_zero]]
theorem abs_cpow_of_imp {z w : ℂ} (h : z = 0 → w.re = 0 → w = 0) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w) := by
  

Proof state:
z w : ℂ
h : z = 0 → w.re = 0 → w = 0
⊢ abs (z ^ w) = abs z ^ w.re / rexp (arg z * w.im)

Next tactic:
rcases ne_or_eq z 0 with (hz | rfl)
theorem abs_cpow_of_imp {z w : ℂ} (h : z = 0 → w.re = 0 → w = 0) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w) := by
  rcases ne_or_eq z 0 with (hz | rfl) <;> [

Proof state:
case inl
z w : ℂ
h : z = 0 → w.re = 0 → w = 0
hz : z ≠ 0
⊢ abs (z ^ w) = abs z ^ w.re / rexp (arg z * w.im)

Next tactic:
exact abs_cpow_of_ne_zero hz w
theorem abs_cpow_of_imp {z w : ℂ} (h : z = 0 → w.re = 0 → w = 0) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w) := by
  rcases ne_or_eq z 0 with (hz | rfl) <;> [exact abs_cpow_of_ne_zero hz w; 

Proof state:
case inr
w : ℂ
h : 0 = 0 → w.re = 0 → w = 0
⊢ abs (0 ^ w) = abs 0 ^ w.re / rexp (arg 0 * w.im)

Next tactic:
rw [map_zero]
theorem abs_cpow_of_imp {z w : ℂ} (h : z = 0 → w.re = 0 → w = 0) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w) := by
  rcases ne_or_eq z 0 with (hz | rfl) <;> [exact abs_cpow_of_ne_zero hz w; rw [map_zero]]
  

Proof state:
case inr
w : ℂ
h : 0 = 0 → w.re = 0 → w = 0
⊢ abs (0 ^ w) = 0 ^ w.re / rexp (arg 0 * w.im)

Next tactic:
rcases eq_or_ne w.re 0 with hw | hw
theorem abs_cpow_of_imp {z w : ℂ} (h : z = 0 → w.re = 0 → w = 0) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w) := by
  rcases ne_or_eq z 0 with (hz | rfl) <;> [exact abs_cpow_of_ne_zero hz w; rw [map_zero]]
  rcases eq_or_ne w.re 0 with hw | hw
  · 

Proof state:
case inr.inl
w : ℂ
h : 0 = 0 → w.re = 0 → w = 0
hw : w.re = 0
⊢ abs (0 ^ w) = 0 ^ w.re / rexp (arg 0 * w.im)

Next tactic:
simp [hw, h rfl hw]
theorem abs_cpow_of_imp {z w : ℂ} (h : z = 0 → w.re = 0 → w = 0) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w) := by
  rcases ne_or_eq z 0 with (hz | rfl) <;> [exact abs_cpow_of_ne_zero hz w; rw [map_zero]]
  rcases eq_or_ne w.re 0 with hw | hw
  · simp [hw, h rfl hw]
  · 

Proof state:
case inr.inr
w : ℂ
h : 0 = 0 → w.re = 0 → w = 0
hw : w.re ≠ 0
⊢ abs (0 ^ w) = 0 ^ w.re / rexp (arg 0 * w.im)

Next tactic:
rw [Real.zero_rpow hw, zero_div, zero_cpow, map_zero]
theorem abs_cpow_of_imp {z w : ℂ} (h : z = 0 → w.re = 0 → w = 0) :
    abs (z ^ w) = abs z ^ w.re / Real.exp (arg z * im w) := by
  rcases ne_or_eq z 0 with (hz | rfl) <;> [exact abs_cpow_of_ne_zero hz w; rw [map_zero]]
  rcases eq_or_ne w.re 0 with hw | hw
  · simp [hw, h rfl hw]
  · rw [Real.zero_rpow hw, zero_div, zero_cpow, map_zero]
    

Proof state:
case inr.inr
w : ℂ
h : 0 = 0 → w.re = 0 → w = 0
hw : w.re ≠ 0
⊢ w ≠ 0

Next tactic:
exact ne_of_apply_ne re hw
theorem abs_cpow_le (z w : ℂ) : abs (z ^ w) ≤ abs z ^ w.re / Real.exp (arg z * im w) := by
  

Proof state:
z w : ℂ
⊢ abs (z ^ w) ≤ abs z ^ w.re / rexp (arg z * w.im)

Next tactic:
by_cases h : z = 0 → w.re = 0 → w = 0
theorem abs_cpow_le (z w : ℂ) : abs (z ^ w) ≤ abs z ^ w.re / Real.exp (arg z * im w) := by
  by_cases h : z = 0 → w.re = 0 → w = 0
  · 

Proof state:
case pos
z w : ℂ
h : z = 0 → w.re = 0 → w = 0
⊢ abs (z ^ w) ≤ abs z ^ w.re / rexp (arg z * w.im)

Next tactic:
exact (abs_cpow_of_imp h).le
theorem abs_cpow_le (z w : ℂ) : abs (z ^ w) ≤ abs z ^ w.re / Real.exp (arg z * im w) := by
  by_cases h : z = 0 → w.re = 0 → w = 0
  · exact (abs_cpow_of_imp h).le
  · 

Proof state:
case neg
z w : ℂ
h : ¬(z = 0 → w.re = 0 → w = 0)
⊢ abs (z ^ w) ≤ abs z ^ w.re / rexp (arg z * w.im)

Next tactic:
push_neg at h
theorem abs_cpow_le (z w : ℂ) : abs (z ^ w) ≤ abs z ^ w.re / Real.exp (arg z * im w) := by
  by_cases h : z = 0 → w.re = 0 → w = 0
  · exact (abs_cpow_of_imp h).le
  · push_neg at h
    

Proof state:
case neg
z w : ℂ
h : z = 0 ∧ w.re = 0 ∧ w ≠ 0
⊢ abs (z ^ w) ≤ abs z ^ w.re / rexp (arg z * w.im)

Next tactic:
simp [h]
@[simp]
theorem abs_cpow_real (x : ℂ) (y : ℝ) : abs (x ^ (y : ℂ)) = Complex.abs x ^ y := by
  

Proof state:
x : ℂ
y : ℝ
⊢ abs (x ^ ↑y) = abs x ^ y

Next tactic:
rw [abs_cpow_of_imp]
@[simp]
theorem abs_cpow_real (x : ℂ) (y : ℝ) : abs (x ^ (y : ℂ)) = Complex.abs x ^ y := by
  rw [abs_cpow_of_imp] <;> 

Proof state:
x : ℂ
y : ℝ
⊢ abs x ^ (↑y).re / rexp (arg x * (↑y).im) = abs x ^ y

Next tactic:
simp
@[simp]
theorem abs_cpow_real (x : ℂ) (y : ℝ) : abs (x ^ (y : ℂ)) = Complex.abs x ^ y := by
  rw [abs_cpow_of_imp] <;> 

Proof state:
x : ℂ
y : ℝ
⊢ x = 0 → (↑y).re = 0 → ↑y = 0

Next tactic:
simp
@[simp]
theorem abs_cpow_inv_nat (x : ℂ) (n : ℕ) : abs (x ^ (n⁻¹ : ℂ)) = Complex.abs x ^ (n⁻¹ : ℝ) := by
  

Proof state:
x : ℂ
n : ℕ
⊢ abs (x ^ (↑n)⁻¹) = abs x ^ (↑n)⁻¹

Next tactic:
rw [← abs_cpow_real]
@[simp]
theorem abs_cpow_inv_nat (x : ℂ) (n : ℕ) : abs (x ^ (n⁻¹ : ℂ)) = Complex.abs x ^ (n⁻¹ : ℝ) := by
  rw [← abs_cpow_real]; 

Proof state:
x : ℂ
n : ℕ
⊢ abs (x ^ (↑n)⁻¹) = abs (x ^ ↑(↑n)⁻¹)

Next tactic:
simp [-abs_cpow_real]
theorem abs_cpow_eq_rpow_re_of_pos {x : ℝ} (hx : 0 < x) (y : ℂ) : abs (x ^ y) = x ^ y.re := by
  

Proof state:
x : ℝ
hx : 0 < x
y : ℂ
⊢ abs (↑x ^ y) = x ^ y.re

Next tactic:
rw [abs_cpow_of_ne_zero (ofReal_ne_zero.mpr hx.ne'), arg_ofReal_of_nonneg hx.le,
    zero_mul, Real.exp_zero, div_one, abs_of_nonneg hx.le]
theorem abs_cpow_eq_rpow_re_of_nonneg {x : ℝ} (hx : 0 ≤ x) {y : ℂ} (hy : re y ≠ 0) :
    abs (x ^ y) = x ^ re y := by
  

Proof state:
x : ℝ
hx : 0 ≤ x
y : ℂ
hy : y.re ≠ 0
⊢ abs (↑x ^ y) = x ^ y.re

Next tactic:
rw [abs_cpow_of_imp]
theorem abs_cpow_eq_rpow_re_of_nonneg {x : ℝ} (hx : 0 ≤ x) {y : ℂ} (hy : re y ≠ 0) :
    abs (x ^ y) = x ^ re y := by
  rw [abs_cpow_of_imp] <;> 

Proof state:
x : ℝ
hx : 0 ≤ x
y : ℂ
hy : y.re ≠ 0
⊢ abs ↑x ^ y.re / rexp (arg ↑x * y.im) = x ^ y.re

Next tactic:
simp [*, arg_ofReal_of_nonneg, _root_.abs_of_nonneg]
theorem abs_cpow_eq_rpow_re_of_nonneg {x : ℝ} (hx : 0 ≤ x) {y : ℂ} (hy : re y ≠ 0) :
    abs (x ^ y) = x ^ re y := by
  rw [abs_cpow_of_imp] <;> 

Proof state:
x : ℝ
hx : 0 ≤ x
y : ℂ
hy : y.re ≠ 0
⊢ ↑x = 0 → y.re = 0 → y = 0

Next tactic:
simp [*, arg_ofReal_of_nonneg, _root_.abs_of_nonneg]
theorem rpow_mul {x : ℝ} (hx : 0 ≤ x) (y z : ℝ) : x ^ (y * z) = (x ^ y) ^ z := by
  

Proof state:
x✝ y✝ z✝ : ℝ
n : ℕ
x : ℝ
hx : 0 ≤ x
y z : ℝ
⊢ x ^ (y * z) = (x ^ y) ^ z

Next tactic:
rw [← Complex.ofReal_inj, Complex.ofReal_cpow (rpow_nonneg_of_nonneg hx _),
      Complex.ofReal_cpow hx, Complex.ofReal_mul, Complex.cpow_mul, Complex.ofReal_cpow hx]
theorem rpow_mul {x : ℝ} (hx : 0 ≤ x) (y z : ℝ) : x ^ (y * z) = (x ^ y) ^ z := by
  rw [← Complex.ofReal_inj, Complex.ofReal_cpow (rpow_nonneg_of_nonneg hx _),
      Complex.ofReal_cpow hx, Complex.ofReal_mul, Complex.cpow_mul, Complex.ofReal_cpow hx] <;>
    

Proof state:
case h₁
x✝ y✝ z✝ : ℝ
n : ℕ
x : ℝ
hx : 0 ≤ x
y z : ℝ
⊢ -π < (Complex.log ↑x * ↑y).im

Next tactic:
simp only [(Complex.ofReal_mul _ _).symm, (Complex.ofReal_log hx).symm, Complex.ofReal_im,
      neg_lt_zero, pi_pos, le_of_lt pi_pos]
theorem rpow_mul {x : ℝ} (hx : 0 ≤ x) (y z : ℝ) : x ^ (y * z) = (x ^ y) ^ z := by
  rw [← Complex.ofReal_inj, Complex.ofReal_cpow (rpow_nonneg_of_nonneg hx _),
      Complex.ofReal_cpow hx, Complex.ofReal_mul, Complex.cpow_mul, Complex.ofReal_cpow hx] <;>
    

Proof state:
case h₂
x✝ y✝ z✝ : ℝ
n : ℕ
x : ℝ
hx : 0 ≤ x
y z : ℝ
⊢ (Complex.log ↑x * ↑y).im ≤ π

Next tactic:
simp only [(Complex.ofReal_mul _ _).symm, (Complex.ofReal_log hx).symm, Complex.ofReal_im,
      neg_lt_zero, pi_pos, le_of_lt pi_pos]
theorem rpow_add_int {x : ℝ} (hx : x ≠ 0) (y : ℝ) (n : ℤ) : x ^ (y + n) = x ^ y * x ^ n :=
  by 

Proof state:
x✝ y✝ z : ℝ
n✝ : ℕ
x : ℝ
hx : x ≠ 0
y : ℝ
n : ℤ
⊢ x ^ (y + ↑n) = x ^ y * x ^ n

Next tactic:
rw [rpow_def, rpow_def, Complex.ofReal_add,
    Complex.cpow_add _ _ (Complex.ofReal_ne_zero.mpr hx), Complex.ofReal_int_cast,
    Complex.cpow_int_cast, ← Complex.ofReal_zpow, mul_comm, Complex.ofReal_mul_re, mul_comm]
theorem rpow_add_nat {x : ℝ} (hx : x ≠ 0) (y : ℝ) (n : ℕ) : x ^ (y + n) = x ^ y * x ^ n :=
  by 

Proof state:
x✝ y✝ z : ℝ
n✝ : ℕ
x : ℝ
hx : x ≠ 0
y : ℝ
n : ℕ
⊢ x ^ (y + ↑n) = x ^ y * x ^ n

Next tactic:
simpa using rpow_add_int hx y n
theorem rpow_sub_int {x : ℝ} (hx : x ≠ 0) (y : ℝ) (n : ℕ) : x ^ (y - n) = x ^ y / x ^ n :=
  by 

Proof state:
x✝ y✝ z : ℝ
n✝ : ℕ
x : ℝ
hx : x ≠ 0
y : ℝ
n : ℕ
⊢ x ^ (y - ↑n) = x ^ y / x ^ n

Next tactic:
simpa using rpow_add_int hx y (-n)
theorem rpow_sub_nat {x : ℝ} (hx : x ≠ 0) (y : ℝ) (n : ℕ) : x ^ (y - n) = x ^ y / x ^ n :=
  by 

Proof state:
x✝ y✝ z : ℝ
n✝ : ℕ
x : ℝ
hx : x ≠ 0
y : ℝ
n : ℕ
⊢ x ^ (y - ↑n) = x ^ y / x ^ n

Next tactic:
simpa using rpow_sub_int hx y n
lemma rpow_add_int' (hx : 0 ≤ x) {n : ℤ} (h : y + n ≠ 0) : x ^ (y + n) = x ^ y * x ^ n := by
  

Proof state:
x y z : ℝ
n✝ : ℕ
hx : 0 ≤ x
n : ℤ
h : y + ↑n ≠ 0
⊢ x ^ (y + ↑n) = x ^ y * x ^ n

Next tactic:
rw [rpow_add' hx h, rpow_int_cast]
lemma rpow_add_nat' (hx : 0 ≤ x) (h : y + n ≠ 0) : x ^ (y + n) = x ^ y * x ^ n := by
  

Proof state:
x y z : ℝ
n : ℕ
hx : 0 ≤ x
h : y + ↑n ≠ 0
⊢ x ^ (y + ↑n) = x ^ y * x ^ n

Next tactic:
rw [rpow_add' hx h, rpow_nat_cast]
lemma rpow_sub_int' (hx : 0 ≤ x) {n : ℤ} (h : y - n ≠ 0) : x ^ (y - n) = x ^ y / x ^ n := by
  

Proof state:
x y z : ℝ
n✝ : ℕ
hx : 0 ≤ x
n : ℤ
h : y - ↑n ≠ 0
⊢ x ^ (y - ↑n) = x ^ y / x ^ n

Next tactic:
rw [rpow_sub' hx h, rpow_int_cast]
lemma rpow_sub_nat' (hx : 0 ≤ x) (h : y - n ≠ 0) : x ^ (y - n) = x ^ y / x ^ n := by
  

Proof state:
x y z : ℝ
n : ℕ
hx : 0 ≤ x
h : y - ↑n ≠ 0
⊢ x ^ (y - ↑n) = x ^ y / x ^ n

Next tactic:
rw [rpow_sub' hx h, rpow_nat_cast]
theorem rpow_add_one {x : ℝ} (hx : x ≠ 0) (y : ℝ) : x ^ (y + 1) = x ^ y * x := by
  

Proof state:
x✝ y✝ z : ℝ
n : ℕ
x : ℝ
hx : x ≠ 0
y : ℝ
⊢ x ^ (y + 1) = x ^ y * x

Next tactic:
simpa using rpow_add_nat hx y 1
theorem rpow_sub_one {x : ℝ} (hx : x ≠ 0) (y : ℝ) : x ^ (y - 1) = x ^ y / x := by
  

Proof state:
x✝ y✝ z : ℝ
n : ℕ
x : ℝ
hx : x ≠ 0
y : ℝ
⊢ x ^ (y - 1) = x ^ y / x

Next tactic:
simpa using rpow_sub_nat hx y 1
lemma rpow_add_one' (hx : 0 ≤ x) (h : y + 1 ≠ 0) : x ^ (y + 1) = x ^ y * x := by
  

Proof state:
x y z : ℝ
n : ℕ
hx : 0 ≤ x
h : y + 1 ≠ 0
⊢ x ^ (y + 1) = x ^ y * x

Next tactic:
rw [rpow_add' hx h, rpow_one]
lemma rpow_one_add' (hx : 0 ≤ x) (h : 1 + y ≠ 0) : x ^ (1 + y) = x * x ^ y := by
  

Proof state:
x y z : ℝ
n : ℕ
hx : 0 ≤ x
h : 1 + y ≠ 0
⊢ x ^ (1 + y) = x * x ^ y

Next tactic:
rw [rpow_add' hx h, rpow_one]
lemma rpow_sub_one' (hx : 0 ≤ x) (h : y - 1 ≠ 0) : x ^ (y - 1) = x ^ y / x := by
  

Proof state:
x y z : ℝ
n : ℕ
hx : 0 ≤ x
h : y - 1 ≠ 0
⊢ x ^ (y - 1) = x ^ y / x

Next tactic:
rw [rpow_sub' hx h, rpow_one]
lemma rpow_one_sub' (hx : 0 ≤ x) (h : 1 - y ≠ 0) : x ^ (1 - y) = x / x ^ y := by
  

Proof state:
x y z : ℝ
n : ℕ
hx : 0 ≤ x
h : 1 - y ≠ 0
⊢ x ^ (1 - y) = x / x ^ y

Next tactic:
rw [rpow_sub' hx h, rpow_one]
@[simp]
theorem rpow_two (x : ℝ) : x ^ (2 : ℝ) = x ^ 2 := by
  

Proof state:
x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ 2 = x ^ 2

Next tactic:
rw [← rpow_nat_cast]
@[simp]
theorem rpow_two (x : ℝ) : x ^ (2 : ℝ) = x ^ 2 := by
  rw [← rpow_nat_cast]
  

Proof state:
x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ 2 = x ^ ↑2

Next tactic:
simp only [Nat.cast_ofNat]
theorem rpow_neg_one (x : ℝ) : x ^ (-1 : ℝ) = x⁻¹ := by
  

Proof state:
x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ (-1) = x⁻¹

Next tactic:
suffices H : x ^ ((-1 : ℤ) : ℝ) = x⁻¹
theorem rpow_neg_one (x : ℝ) : x ^ (-1 : ℝ) = x⁻¹ := by
  suffices H : x ^ ((-1 : ℤ) : ℝ) = x⁻¹; · 

Proof state:
x✝ y z : ℝ
n : ℕ
x : ℝ
H : x ^ ↑(-1) = x⁻¹
⊢ x ^ (-1) = x⁻¹

Next tactic:
rwa [Int.cast_neg, Int.cast_one] at H
theorem rpow_neg_one (x : ℝ) : x ^ (-1 : ℝ) = x⁻¹ := by
  suffices H : x ^ ((-1 : ℤ) : ℝ) = x⁻¹; · rwa [Int.cast_neg, Int.cast_one] at H
  

Proof state:
case H
x✝ y z : ℝ
n : ℕ
x : ℝ
⊢ x ^ ↑(-1) = x⁻¹

Next tactic:
simp only [rpow_int_cast, zpow_one, zpow_neg]
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  

Proof state:
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
⊢ (x * y) ^ z = x ^ z * y ^ z

Next tactic:
iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> simp_all
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 

Proof state:
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
⊢ (x * y) ^ z = x ^ z * y ^ z

Next tactic:
rw [Real.rpow_def_of_nonneg]
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; 

Proof state:
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
⊢ (if x * y = 0 then if z = 0 then 1 else 0 else rexp (log (x * y) * z)) = x ^ z * y ^ z

Next tactic:
split_ifs with h_ifs
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> 

Proof state:
case pos
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs : x * y = 0
h✝ : z = 0
⊢ 1 = x ^ z * y ^ z

Next tactic:
simp_all
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> 

Proof state:
case neg
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs : x * y = 0
h✝ : ¬z = 0
⊢ 0 = x ^ z * y ^ z

Next tactic:
simp_all
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> 

Proof state:
case neg
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs : ¬x * y = 0
⊢ rexp (log (x * y) * z) = x ^ z * y ^ z

Next tactic:
simp_all
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 

Proof state:
case neg
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs : ¬(x = 0 ∨ y = 0)
⊢ rexp (log (x * y) * z) = x ^ z * y ^ z
case hx x y z : ℝ n : ℕ hx : 0 ≤ x hy : 0 ≤ y ⊢ 0 ≤ x * y

Next tactic:
rw [Real.rpow_def_of_nonneg]
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; 

Proof state:
case neg
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs : ¬(x = 0 ∨ y = 0)
⊢ rexp (log (x * y) * z) = (if x = 0 then if z = 0 then 1 else 0 else rexp (log x * z)) * y ^ z

Next tactic:
split_ifs with h_ifs
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> 

Proof state:
case pos
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs✝ : ¬(x = 0 ∨ y = 0)
h_ifs : x = 0
h✝ : z = 0
⊢ rexp (log (x * y) * z) = 1 * y ^ z

Next tactic:
simp_all
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> 

Proof state:
case neg
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs✝ : ¬(x = 0 ∨ y = 0)
h_ifs : x = 0
h✝ : ¬z = 0
⊢ rexp (log (x * y) * z) = 0 * y ^ z

Next tactic:
simp_all
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> 

Proof state:
case neg
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs✝ : ¬(x = 0 ∨ y = 0)
h_ifs : ¬x = 0
⊢ rexp (log (x * y) * z) = rexp (log x * z) * y ^ z

Next tactic:
simp_all
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> simp_all
  · 

Proof state:
case neg
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs✝ : ¬y = 0
h_ifs : ¬x = 0
⊢ rexp (log (x * y) * z) = rexp (log x * z) * y ^ z

Next tactic:
rw [log_mul ‹_› ‹_›, add_mul, exp_add, rpow_def_of_pos (hy.lt_of_ne' ‹_›)]
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> simp_all
  · rw [log_mul ‹_› ‹_›, add_mul, exp_add, rpow_def_of_pos (hy.lt_of_ne' ‹_›)]
  

Proof state:
case neg.hx
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs : ¬(x = 0 ∨ y = 0)
⊢ 0 ≤ x
case hx x y z : ℝ n : ℕ hx : 0 ≤ x hy : 0 ≤ y ⊢ 0 ≤ x * y

Next tactic:
all_goals positivity
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> simp_all
  · rw [log_mul ‹_› ‹_›, add_mul, exp_add, rpow_def_of_pos (hy.lt_of_ne' ‹_›)]
  all_goals 

Proof state:
case neg.hx
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
h_ifs : ¬(x = 0 ∨ y = 0)
⊢ 0 ≤ x

Next tactic:
positivity
theorem mul_rpow (hx : 0 ≤ x) (hy : 0 ≤ y) : (x * y) ^ z = x ^ z * y ^ z := by
  iterate 2 rw [Real.rpow_def_of_nonneg]; split_ifs with h_ifs <;> simp_all
  · rw [log_mul ‹_› ‹_›, add_mul, exp_add, rpow_def_of_pos (hy.lt_of_ne' ‹_›)]
  all_goals 

Proof state:
case hx
x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
⊢ 0 ≤ x * y

Next tactic:
positivity
theorem inv_rpow (hx : 0 ≤ x) (y : ℝ) : x⁻¹ ^ y = (x ^ y)⁻¹ := by
  

Proof state:
x y✝ z : ℝ
n : ℕ
hx : 0 ≤ x
y : ℝ
⊢ x⁻¹ ^ y = (x ^ y)⁻¹

Next tactic:
simp only [← rpow_neg_one, ← rpow_mul hx, mul_comm]