l3lab/ntp-mathlib huggingface dataset:
theorem Nat.factors_multiset_prod_of_irreducible {s : Multiset ℕ}
    (h : ∀ x : ℕ, x ∈ s → Irreducible x) : normalizedFactors s.prod = s := by
  rw [← Multiset.rel_eq, ← associated_eq_eq]
  apply
    UniqueFactorizationMonoid.factors_unique irreducible_of_normalized_factor h
      (normalizedFactors_prod _)
  

Proof state:
s : Multiset ℕ
h : ∀ x ∈ s, Irreducible x
⊢ Multiset.prod s ≠ 0

Next tactic:
rw [Ne.def, Multiset.prod_eq_zero_iff]
theorem Nat.factors_multiset_prod_of_irreducible {s : Multiset ℕ}
    (h : ∀ x : ℕ, x ∈ s → Irreducible x) : normalizedFactors s.prod = s := by
  rw [← Multiset.rel_eq, ← associated_eq_eq]
  apply
    UniqueFactorizationMonoid.factors_unique irreducible_of_normalized_factor h
      (normalizedFactors_prod _)
  rw [Ne.def, Multiset.prod_eq_zero_iff]
  

Proof state:
s : Multiset ℕ
h : ∀ x ∈ s, Irreducible x
⊢ 0 ∉ s

Next tactic:
intro con
theorem Nat.factors_multiset_prod_of_irreducible {s : Multiset ℕ}
    (h : ∀ x : ℕ, x ∈ s → Irreducible x) : normalizedFactors s.prod = s := by
  rw [← Multiset.rel_eq, ← associated_eq_eq]
  apply
    UniqueFactorizationMonoid.factors_unique irreducible_of_normalized_factor h
      (normalizedFactors_prod _)
  rw [Ne.def, Multiset.prod_eq_zero_iff]
  intro con
  

Proof state:
s : Multiset ℕ
h : ∀ x ∈ s, Irreducible x
con : 0 ∈ s
⊢ False

Next tactic:
exact not_irreducible_zero (h 0 con)
theorem finite_int_iff_natAbs_finite {a b : ℤ} : Finite a b ↔ Finite a.natAbs b.natAbs := by
  

Proof state:
a b : ℤ
⊢ Finite a b ↔ Finite (_root_.Int.natAbs a) (_root_.Int.natAbs b)

Next tactic:
simp only [finite_def, ← Int.natAbs_dvd_natAbs, Int.natAbs_pow]
theorem finite_int_iff {a b : ℤ} : Finite a b ↔ a.natAbs ≠ 1 ∧ b ≠ 0 := by
  

Proof state:
a b : ℤ
⊢ Finite a b ↔ _root_.Int.natAbs a ≠ 1 ∧ b ≠ 0

Next tactic:
rw [finite_int_iff_natAbs_finite, finite_nat_iff, pos_iff_ne_zero, Int.natAbs_ne_zero]
theorem induction_on_primes {P : ℕ → Prop} (h₀ : P 0) (h₁ : P 1)
    (h : ∀ p a : ℕ, p.Prime → P a → P (p * a)) (n : ℕ) : P n := by
  

Proof state:
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Nat.Prime p → P a → P (p * a)
n : ℕ
⊢ P n

Next tactic:
apply UniqueFactorizationMonoid.induction_on_prime
theorem induction_on_primes {P : ℕ → Prop} (h₀ : P 0) (h₁ : P 1)
    (h : ∀ p a : ℕ, p.Prime → P a → P (p * a)) (n : ℕ) : P n := by
  apply UniqueFactorizationMonoid.induction_on_prime
  · 

Proof state:
case h₁
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Nat.Prime p → P a → P (p * a)
n : ℕ
⊢ P 0

Next tactic:
exact h₀
theorem induction_on_primes {P : ℕ → Prop} (h₀ : P 0) (h₁ : P 1)
    (h : ∀ p a : ℕ, p.Prime → P a → P (p * a)) (n : ℕ) : P n := by
  apply UniqueFactorizationMonoid.induction_on_prime
  · exact h₀
  · 

Proof state:
case h₂
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Nat.Prime p → P a → P (p * a)
n : ℕ
⊢ ∀ (x : ℕ), IsUnit x → P x

Next tactic:
intro n h
theorem induction_on_primes {P : ℕ → Prop} (h₀ : P 0) (h₁ : P 1)
    (h : ∀ p a : ℕ, p.Prime → P a → P (p * a)) (n : ℕ) : P n := by
  apply UniqueFactorizationMonoid.induction_on_prime
  · exact h₀
  · intro n h
    

Proof state:
case h₂
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h✝ : ∀ (p a : ℕ), Nat.Prime p → P a → P (p * a)
n✝ n : ℕ
h : IsUnit n
⊢ P n

Next tactic:
rw [Nat.isUnit_iff.1 h]
theorem induction_on_primes {P : ℕ → Prop} (h₀ : P 0) (h₁ : P 1)
    (h : ∀ p a : ℕ, p.Prime → P a → P (p * a)) (n : ℕ) : P n := by
  apply UniqueFactorizationMonoid.induction_on_prime
  · exact h₀
  · intro n h
    rw [Nat.isUnit_iff.1 h]
    

Proof state:
case h₂
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h✝ : ∀ (p a : ℕ), Nat.Prime p → P a → P (p * a)
n✝ n : ℕ
h : IsUnit n
⊢ P 1

Next tactic:
exact h₁
theorem induction_on_primes {P : ℕ → Prop} (h₀ : P 0) (h₁ : P 1)
    (h : ∀ p a : ℕ, p.Prime → P a → P (p * a)) (n : ℕ) : P n := by
  apply UniqueFactorizationMonoid.induction_on_prime
  · exact h₀
  · intro n h
    rw [Nat.isUnit_iff.1 h]
    exact h₁
  · 

Proof state:
case h₃
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Nat.Prime p → P a → P (p * a)
n : ℕ
⊢ ∀ (a p : ℕ), a ≠ 0 → Prime p → P a → P (p * a)

Next tactic:
intro a p _ hp ha
theorem induction_on_primes {P : ℕ → Prop} (h₀ : P 0) (h₁ : P 1)
    (h : ∀ p a : ℕ, p.Prime → P a → P (p * a)) (n : ℕ) : P n := by
  apply UniqueFactorizationMonoid.induction_on_prime
  · exact h₀
  · intro n h
    rw [Nat.isUnit_iff.1 h]
    exact h₁
  · intro a p _ hp ha
    

Proof state:
case h₃
P : ℕ → Prop
h₀ : P 0
h₁ : P 1
h : ∀ (p a : ℕ), Nat.Prime p → P a → P (p * a)
n a p : ℕ
a✝ : a ≠ 0
hp : Prime p
ha : P a
⊢ P (p * a)

Next tactic:
exact h p a hp.nat_prime ha
theorem Int.associated_iff_natAbs {a b : ℤ} : Associated a b ↔ a.natAbs = b.natAbs := by
  

Proof state:
a b : ℤ
⊢ Associated a b ↔ natAbs a = natAbs b

Next tactic:
rw [← dvd_dvd_iff_associated, ← Int.natAbs_dvd_natAbs, ← Int.natAbs_dvd_natAbs,
    dvd_dvd_iff_associated]
theorem Int.associated_iff_natAbs {a b : ℤ} : Associated a b ↔ a.natAbs = b.natAbs := by
  rw [← dvd_dvd_iff_associated, ← Int.natAbs_dvd_natAbs, ← Int.natAbs_dvd_natAbs,
    dvd_dvd_iff_associated]
  

Proof state:
a b : ℤ
⊢ Associated (natAbs a) (natAbs b) ↔ natAbs a = natAbs b

Next tactic:
exact associated_iff_eq
theorem Int.associated_iff {a b : ℤ} : Associated a b ↔ a = b ∨ a = -b := by
  

Proof state:
a b : ℤ
⊢ Associated a b ↔ a = b ∨ a = -b

Next tactic:
rw [Int.associated_iff_natAbs]
theorem Int.associated_iff {a b : ℤ} : Associated a b ↔ a = b ∨ a = -b := by
  rw [Int.associated_iff_natAbs]
  

Proof state:
a b : ℤ
⊢ natAbs a = natAbs b ↔ a = b ∨ a = -b

Next tactic:
exact Int.natAbs_eq_natAbs_iff
theorem span_natAbs (a : ℤ) : Ideal.span ({(a.natAbs : ℤ)} : Set ℤ) = Ideal.span {a} := by
  

Proof state:
a : ℤ
⊢ Ideal.span {↑(natAbs a)} = Ideal.span {a}

Next tactic:
rw [Ideal.span_singleton_eq_span_singleton]
theorem span_natAbs (a : ℤ) : Ideal.span ({(a.natAbs : ℤ)} : Set ℤ) = Ideal.span {a} := by
  rw [Ideal.span_singleton_eq_span_singleton]
  

Proof state:
a : ℤ
⊢ Associated (↑(natAbs a)) a

Next tactic:
exact (associated_natAbs _).symm
theorem eq_pow_of_mul_eq_pow_bit1_left {a b c : ℤ} (hab : IsCoprime a b) {k : ℕ}
    (h : a * b = c ^ bit1 k) : ∃ d, a = d ^ bit1 k := by
  

Proof state:
a b c : ℤ
hab : IsCoprime a b
k : ℕ
h : a * b = c ^ bit1 k
⊢ ∃ d, a = d ^ bit1 k

Next tactic:
obtain ⟨d, hd⟩ := exists_associated_pow_of_mul_eq_pow' hab h
theorem eq_pow_of_mul_eq_pow_bit1_left {a b c : ℤ} (hab : IsCoprime a b) {k : ℕ}
    (h : a * b = c ^ bit1 k) : ∃ d, a = d ^ bit1 k := by
  obtain ⟨d, hd⟩ := exists_associated_pow_of_mul_eq_pow' hab h
  

Proof state:
case intro
a b c : ℤ
hab : IsCoprime a b
k : ℕ
h : a * b = c ^ bit1 k
d : ℤ
hd : Associated (d ^ bit1 k) a
⊢ ∃ d, a = d ^ bit1 k

Next tactic:
replace hd := hd.symm
theorem eq_pow_of_mul_eq_pow_bit1_left {a b c : ℤ} (hab : IsCoprime a b) {k : ℕ}
    (h : a * b = c ^ bit1 k) : ∃ d, a = d ^ bit1 k := by
  obtain ⟨d, hd⟩ := exists_associated_pow_of_mul_eq_pow' hab h
  replace hd := hd.symm
  

Proof state:
case intro
a b c : ℤ
hab : IsCoprime a b
k : ℕ
h : a * b = c ^ bit1 k
d : ℤ
hd : Associated a (d ^ bit1 k)
⊢ ∃ d, a = d ^ bit1 k

Next tactic:
rw [associated_iff_natAbs, natAbs_eq_natAbs_iff, ← neg_pow_bit1] at hd
theorem eq_pow_of_mul_eq_pow_bit1_left {a b c : ℤ} (hab : IsCoprime a b) {k : ℕ}
    (h : a * b = c ^ bit1 k) : ∃ d, a = d ^ bit1 k := by
  obtain ⟨d, hd⟩ := exists_associated_pow_of_mul_eq_pow' hab h
  replace hd := hd.symm
  rw [associated_iff_natAbs, natAbs_eq_natAbs_iff, ← neg_pow_bit1] at hd
  

Proof state:
case intro
a b c : ℤ
hab : IsCoprime a b
k : ℕ
h : a * b = c ^ bit1 k
d : ℤ
hd : a = d ^ bit1 k ∨ a = (-d) ^ bit1 k
⊢ ∃ d, a = d ^ bit1 k

Next tactic:
obtain rfl | rfl := hd
theorem eq_pow_of_mul_eq_pow_bit1_left {a b c : ℤ} (hab : IsCoprime a b) {k : ℕ}
    (h : a * b = c ^ bit1 k) : ∃ d, a = d ^ bit1 k := by
  obtain ⟨d, hd⟩ := exists_associated_pow_of_mul_eq_pow' hab h
  replace hd := hd.symm
  rw [associated_iff_natAbs, natAbs_eq_natAbs_iff, ← neg_pow_bit1] at hd
  obtain rfl | rfl := hd <;> 

Proof state:
case intro.inl
b c : ℤ
k : ℕ
d : ℤ
hab : IsCoprime (d ^ bit1 k) b
h : d ^ bit1 k * b = c ^ bit1 k
⊢ ∃ d_1, d ^ bit1 k = d_1 ^ bit1 k

Next tactic:
exact ⟨_, rfl⟩
theorem eq_pow_of_mul_eq_pow_bit1_left {a b c : ℤ} (hab : IsCoprime a b) {k : ℕ}
    (h : a * b = c ^ bit1 k) : ∃ d, a = d ^ bit1 k := by
  obtain ⟨d, hd⟩ := exists_associated_pow_of_mul_eq_pow' hab h
  replace hd := hd.symm
  rw [associated_iff_natAbs, natAbs_eq_natAbs_iff, ← neg_pow_bit1] at hd
  obtain rfl | rfl := hd <;> 

Proof state:
case intro.inr
b c : ℤ
k : ℕ
d : ℤ
hab : IsCoprime ((-d) ^ bit1 k) b
h : (-d) ^ bit1 k * b = c ^ bit1 k
⊢ ∃ d_1, (-d) ^ bit1 k = d_1 ^ bit1 k

Next tactic:
exact ⟨_, rfl⟩
theorem eq_pow_of_mul_eq_pow_bit1_right {a b c : ℤ} (hab : IsCoprime a b) {k : ℕ}
    (h : a * b = c ^ bit1 k) : ∃ d, b = d ^ bit1 k :=
  eq_pow_of_mul_eq_pow_bit1_left hab.symm (by 

Proof state:
a b c : ℤ
hab : IsCoprime a b
k : ℕ
h : a * b = c ^ bit1 k
⊢ b * a = ?m.202647 hab h ^ bit1 k

Next tactic:
rwa [mul_comm] at h
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  

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

Next tactic:
simp only [rpow_def, Complex.cpow_def]
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; 

Proof state:
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ (if ↑x = 0 then if ↑y = 0 then 1 else 0 else Complex.exp (Complex.log ↑x * ↑y)).re =
    if x = 0 then if y = 0 then 1 else 0 else rexp (log x * y)

Next tactic:
split_ifs
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; split_ifs <;>
  

Proof state:
case pos
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
h✝³ : ↑x = 0
h✝² : ↑y = 0
h✝¹ : x = 0
h✝ : y = 0
⊢ 1.re = 1

Next tactic:
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
      (Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; split_ifs <;>
  

Proof state:
case neg
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
h✝³ : ↑x = 0
h✝² : ↑y = 0
h✝¹ : x = 0
h✝ : ¬y = 0
⊢ 1.re = 0

Next tactic:
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
      (Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; split_ifs <;>
  

Proof state:
case neg
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
h✝² : ↑x = 0
h✝¹ : ↑y = 0
h✝ : ¬x = 0
⊢ 1.re = rexp (log x * y)

Next tactic:
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
      (Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; split_ifs <;>
  

Proof state:
case pos
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
h✝³ : ↑x = 0
h✝² : ¬↑y = 0
h✝¹ : x = 0
h✝ : y = 0
⊢ 0.re = 1

Next tactic:
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
      (Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; split_ifs <;>
  

Proof state:
case neg
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
h✝³ : ↑x = 0
h✝² : ¬↑y = 0
h✝¹ : x = 0
h✝ : ¬y = 0
⊢ 0.re = 0

Next tactic:
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
      (Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; split_ifs <;>
  

Proof state:
case neg
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
h✝² : ↑x = 0
h✝¹ : ¬↑y = 0
h✝ : ¬x = 0
⊢ 0.re = rexp (log x * y)

Next tactic:
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
      (Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; split_ifs <;>
  

Proof state:
case pos
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
h✝² : ¬↑x = 0
h✝¹ : x = 0
h✝ : y = 0
⊢ (Complex.exp (Complex.log ↑x * ↑y)).re = 1

Next tactic:
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
      (Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; split_ifs <;>
  

Proof state:
case neg
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
h✝² : ¬↑x = 0
h✝¹ : x = 0
h✝ : ¬y = 0
⊢ (Complex.exp (Complex.log ↑x * ↑y)).re = 0

Next tactic:
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
      (Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
theorem rpow_def_of_nonneg {x : ℝ} (hx : 0 ≤ x) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) := by
  simp only [rpow_def, Complex.cpow_def]; split_ifs <;>
  

Proof state:
case neg
x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
h✝¹ : ¬↑x = 0
h✝ : ¬x = 0
⊢ (Complex.exp (Complex.log ↑x * ↑y)).re = rexp (log x * y)

Next tactic:
simp_all [(Complex.ofReal_log hx).symm, -Complex.ofReal_mul, -IsROrC.ofReal_mul,
      (Complex.ofReal_mul _ _).symm, Complex.exp_ofReal_re, Complex.ofReal_eq_zero]
theorem rpow_def_of_pos {x : ℝ} (hx : 0 < x) (y : ℝ) : x ^ y = exp (log x * y) := by
  

Proof state:
x✝ y✝ z x : ℝ
hx : 0 < x
y : ℝ
⊢ x ^ y = rexp (log x * y)

Next tactic:
rw [rpow_def_of_nonneg (le_of_lt hx), if_neg (ne_of_gt hx)]
theorem exp_mul (x y : ℝ) : exp (x * y) = exp x ^ y := by 

Proof state:
x✝ y✝ z x y : ℝ
⊢ rexp (x * y) = rexp x ^ y

Next tactic:
rw [rpow_def_of_pos (exp_pos _), log_exp]
@[simp, norm_cast]
theorem rpow_int_cast (x : ℝ) (n : ℤ) : x ^ (n : ℝ) = x ^ n := by
  

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

Next tactic:
simp only [rpow_def, ← Complex.ofReal_zpow, Complex.cpow_int_cast, Complex.ofReal_int_cast,
    Complex.ofReal_re]
@[simp, norm_cast]
theorem rpow_nat_cast (x : ℝ) (n : ℕ) : x ^ (n : ℝ) = x ^ n := by 

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

Next tactic:
simpa using rpow_int_cast x n
@[simp]
theorem exp_one_rpow (x : ℝ) : exp 1 ^ x = exp x := by 

Proof state:
x✝ y z x : ℝ
⊢ rexp 1 ^ x = rexp x

Next tactic:
rw [← exp_mul, one_mul]
@[simp] lemma exp_one_pow (n : ℕ) : exp 1 ^ n = exp n := by 

Proof state:
x y z : ℝ
n : ℕ
⊢ rexp 1 ^ n = rexp ↑n

Next tactic:
rw [← rpow_nat_cast, exp_one_rpow]
theorem rpow_eq_zero_iff_of_nonneg (hx : 0 ≤ x) : x ^ y = 0 ↔ x = 0 ∧ y ≠ 0 := by
  

Proof state:
x y z : ℝ
hx : 0 ≤ x
⊢ x ^ y = 0 ↔ x = 0 ∧ y ≠ 0

Next tactic:
simp only [rpow_def_of_nonneg hx]
theorem rpow_eq_zero_iff_of_nonneg (hx : 0 ≤ x) : x ^ y = 0 ↔ x = 0 ∧ y ≠ 0 := by
  simp only [rpow_def_of_nonneg hx]
  

Proof state:
x y z : ℝ
hx : 0 ≤ x
⊢ (if x = 0 then if y = 0 then 1 else 0 else rexp (log x * y)) = 0 ↔ x = 0 ∧ y ≠ 0

Next tactic:
split_ifs
theorem rpow_eq_zero_iff_of_nonneg (hx : 0 ≤ x) : x ^ y = 0 ↔ x = 0 ∧ y ≠ 0 := by
  simp only [rpow_def_of_nonneg hx]
  split_ifs <;> 

Proof state:
case pos
x y z : ℝ
hx : 0 ≤ x
h✝¹ : x = 0
h✝ : y = 0
⊢ 1 = 0 ↔ x = 0 ∧ y ≠ 0

Next tactic:
simp [*, exp_ne_zero]
theorem rpow_eq_zero_iff_of_nonneg (hx : 0 ≤ x) : x ^ y = 0 ↔ x = 0 ∧ y ≠ 0 := by
  simp only [rpow_def_of_nonneg hx]
  split_ifs <;> 

Proof state:
case neg
x y z : ℝ
hx : 0 ≤ x
h✝¹ : x = 0
h✝ : ¬y = 0
⊢ 0 = 0 ↔ x = 0 ∧ y ≠ 0

Next tactic:
simp [*, exp_ne_zero]
theorem rpow_eq_zero_iff_of_nonneg (hx : 0 ≤ x) : x ^ y = 0 ↔ x = 0 ∧ y ≠ 0 := by
  simp only [rpow_def_of_nonneg hx]
  split_ifs <;> 

Proof state:
case neg
x y z : ℝ
hx : 0 ≤ x
h✝ : ¬x = 0
⊢ rexp (log x * y) = 0 ↔ x = 0 ∧ y ≠ 0

Next tactic:
simp [*, exp_ne_zero]
@[simp]
lemma rpow_eq_zero (hx : 0 ≤ x) (hy : y ≠ 0) : x ^ y = 0 ↔ x = 0 := by
  

Proof state:
x y z : ℝ
hx : 0 ≤ x
hy : y ≠ 0
⊢ x ^ y = 0 ↔ x = 0

Next tactic:
simp [rpow_eq_zero_iff_of_nonneg, *]
theorem rpow_def_of_neg {x : ℝ} (hx : x < 0) (y : ℝ) : x ^ y = exp (log x * y) * cos (y * π) := by
  

Proof state:
x✝ y✝ z x : ℝ
hx : x < 0
y : ℝ
⊢ x ^ y = rexp (log x * y) * cos (y * π)

Next tactic:
rw [rpow_def, Complex.cpow_def, if_neg]
theorem rpow_def_of_neg {x : ℝ} (hx : x < 0) (y : ℝ) : x ^ y = exp (log x * y) * cos (y * π) := by
  rw [rpow_def, Complex.cpow_def, if_neg]
  

Proof state:
x✝ y✝ z x : ℝ
hx : x < 0
y : ℝ
⊢ (Complex.exp (Complex.log ↑x * ↑y)).re = rexp (log x * y) * cos (y * π)
case hnc x✝ y✝ z x : ℝ hx : x < 0 y : ℝ ⊢ ¬↑x = 0

Next tactic:
have : Complex.log x * y = ↑(log (-x) * y) + ↑(y * π) * Complex.I := by
    simp only [Complex.log, abs_of_neg hx, Complex.arg_ofReal_of_neg hx, Complex.abs_ofReal,
      Complex.ofReal_mul]
    ring
theorem rpow_def_of_neg {x : ℝ} (hx : x < 0) (y : ℝ) : x ^ y = exp (log x * y) * cos (y * π) := by
  rw [rpow_def, Complex.cpow_def, if_neg]
  have : Complex.log x * y = ↑(log (-x) * y) + ↑(y * π) * Complex.I := by
    

Proof state:
x✝ y✝ z x : ℝ
hx : x < 0
y : ℝ
⊢ Complex.log ↑x * ↑y = ↑(log (-x) * y) + ↑(y * π) * Complex.I

Next tactic:
simp only [Complex.log, abs_of_neg hx, Complex.arg_ofReal_of_neg hx, Complex.abs_ofReal,
      Complex.ofReal_mul]
theorem rpow_def_of_neg {x : ℝ} (hx : x < 0) (y : ℝ) : x ^ y = exp (log x * y) * cos (y * π) := by
  rw [rpow_def, Complex.cpow_def, if_neg]
  have : Complex.log x * y = ↑(log (-x) * y) + ↑(y * π) * Complex.I := by
    simp only [Complex.log, abs_of_neg hx, Complex.arg_ofReal_of_neg hx, Complex.abs_ofReal,
      Complex.ofReal_mul]
    

Proof state:
x✝ y✝ z x : ℝ
hx : x < 0
y : ℝ
⊢ (↑(log (-x)) + ↑π * Complex.I) * ↑y = ↑(log (-x)) * ↑y + ↑y * ↑π * Complex.I

Next tactic:
ring
theorem rpow_def_of_neg {x : ℝ} (hx : x < 0) (y : ℝ) : x ^ y = exp (log x * y) * cos (y * π) := by
  rw [rpow_def, Complex.cpow_def, if_neg]
  have : Complex.log x * y = ↑(log (-x) * y) + ↑(y * π) * Complex.I := by
    simp only [Complex.log, abs_of_neg hx, Complex.arg_ofReal_of_neg hx, Complex.abs_ofReal,
      Complex.ofReal_mul]
    ring
  · 

Proof state:
x✝ y✝ z x : ℝ
hx : x < 0
y : ℝ
this : Complex.log ↑x * ↑y = ↑(log (-x) * y) + ↑(y * π) * Complex.I
⊢ (Complex.exp (Complex.log ↑x * ↑y)).re = rexp (log x * y) * cos (y * π)

Next tactic:
rw [this, Complex.exp_add_mul_I, ← Complex.ofReal_exp, ← Complex.ofReal_cos, ←
      Complex.ofReal_sin, mul_add, ← Complex.ofReal_mul, ← mul_assoc, ← Complex.ofReal_mul,
      Complex.add_re, Complex.ofReal_re, Complex.mul_re, Complex.I_re, Complex.ofReal_im,
      Real.log_neg_eq_log]
theorem rpow_def_of_neg {x : ℝ} (hx : x < 0) (y : ℝ) : x ^ y = exp (log x * y) * cos (y * π) := by
  rw [rpow_def, Complex.cpow_def, if_neg]
  have : Complex.log x * y = ↑(log (-x) * y) + ↑(y * π) * Complex.I := by
    simp only [Complex.log, abs_of_neg hx, Complex.arg_ofReal_of_neg hx, Complex.abs_ofReal,
      Complex.ofReal_mul]
    ring
  · rw [this, Complex.exp_add_mul_I, ← Complex.ofReal_exp, ← Complex.ofReal_cos, ←
      Complex.ofReal_sin, mul_add, ← Complex.ofReal_mul, ← mul_assoc, ← Complex.ofReal_mul,
      Complex.add_re, Complex.ofReal_re, Complex.mul_re, Complex.I_re, Complex.ofReal_im,
      Real.log_neg_eq_log]
    

Proof state:
x✝ y✝ z x : ℝ
hx : x < 0
y : ℝ
this : Complex.log ↑x * ↑y = ↑(log (-x) * y) + ↑(y * π) * Complex.I
⊢ rexp (log x * y) * cos (y * π) + ((↑(rexp (log x * y) * sin (y * π))).re * 0 - 0 * Complex.I.im) =
    rexp (log x * y) * cos (y * π)

Next tactic:
ring
theorem rpow_def_of_neg {x : ℝ} (hx : x < 0) (y : ℝ) : x ^ y = exp (log x * y) * cos (y * π) := by
  rw [rpow_def, Complex.cpow_def, if_neg]
  have : Complex.log x * y = ↑(log (-x) * y) + ↑(y * π) * Complex.I := by
    simp only [Complex.log, abs_of_neg hx, Complex.arg_ofReal_of_neg hx, Complex.abs_ofReal,
      Complex.ofReal_mul]
    ring
  · rw [this, Complex.exp_add_mul_I, ← Complex.ofReal_exp, ← Complex.ofReal_cos, ←
      Complex.ofReal_sin, mul_add, ← Complex.ofReal_mul, ← mul_assoc, ← Complex.ofReal_mul,
      Complex.add_re, Complex.ofReal_re, Complex.mul_re, Complex.I_re, Complex.ofReal_im,
      Real.log_neg_eq_log]
    ring
  · 

Proof state:
case hnc
x✝ y✝ z x : ℝ
hx : x < 0
y : ℝ
⊢ ¬↑x = 0

Next tactic:
rw [Complex.ofReal_eq_zero]
theorem rpow_def_of_neg {x : ℝ} (hx : x < 0) (y : ℝ) : x ^ y = exp (log x * y) * cos (y * π) := by
  rw [rpow_def, Complex.cpow_def, if_neg]
  have : Complex.log x * y = ↑(log (-x) * y) + ↑(y * π) * Complex.I := by
    simp only [Complex.log, abs_of_neg hx, Complex.arg_ofReal_of_neg hx, Complex.abs_ofReal,
      Complex.ofReal_mul]
    ring
  · rw [this, Complex.exp_add_mul_I, ← Complex.ofReal_exp, ← Complex.ofReal_cos, ←
      Complex.ofReal_sin, mul_add, ← Complex.ofReal_mul, ← mul_assoc, ← Complex.ofReal_mul,
      Complex.add_re, Complex.ofReal_re, Complex.mul_re, Complex.I_re, Complex.ofReal_im,
      Real.log_neg_eq_log]
    ring
  · rw [Complex.ofReal_eq_zero]
    

Proof state:
case hnc
x✝ y✝ z x : ℝ
hx : x < 0
y : ℝ
⊢ ¬x = 0

Next tactic:
exact ne_of_lt hx
theorem rpow_def_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) * cos (y * π) := by
  

Proof state:
x✝ y✝ z x : ℝ
hx : x ≤ 0
y : ℝ
⊢ x ^ y = if x = 0 then if y = 0 then 1 else 0 else rexp (log x * y) * cos (y * π)

Next tactic:
split_ifs with h
theorem rpow_def_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) * cos (y * π) := by
  split_ifs with h <;> 

Proof state:
case pos
x✝ y✝ z x : ℝ
hx : x ≤ 0
y : ℝ
h : x = 0
h✝ : y = 0
⊢ x ^ y = 1

Next tactic:
simp [rpow_def, *]
theorem rpow_def_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) * cos (y * π) := by
  split_ifs with h <;> 

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

Next tactic:
simp [rpow_def, *]
theorem rpow_def_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) * cos (y * π) := by
  split_ifs with h <;> 

Proof state:
case neg
x✝ y✝ z x : ℝ
hx : x ≤ 0
y : ℝ
h : ¬x = 0
⊢ x ^ y = rexp (log x * y) * cos (y * π)

Next tactic:
simp [rpow_def, *]
theorem rpow_def_of_nonpos {x : ℝ} (hx : x ≤ 0) (y : ℝ) :
    x ^ y = if x = 0 then if y = 0 then 1 else 0 else exp (log x * y) * cos (y * π) := by
  split_ifs with h <;> simp [rpow_def, *]; 

Proof state:
case neg
x✝ y✝ z x : ℝ
hx : x ≤ 0
y : ℝ
h : ¬x = 0
⊢ (↑x ^ ↑y).re = rexp (log x * y) * cos (y * π)

Next tactic:
exact rpow_def_of_neg (lt_of_le_of_ne hx h) _
theorem rpow_pos_of_pos {x : ℝ} (hx : 0 < x) (y : ℝ) : 0 < x ^ y := by
  

Proof state:
x✝ y✝ z x : ℝ
hx : 0 < x
y : ℝ
⊢ 0 < x ^ y

Next tactic:
rw [rpow_def_of_pos hx]
theorem rpow_pos_of_pos {x : ℝ} (hx : 0 < x) (y : ℝ) : 0 < x ^ y := by
  rw [rpow_def_of_pos hx]; 

Proof state:
x✝ y✝ z x : ℝ
hx : 0 < x
y : ℝ
⊢ 0 < rexp (log x * y)

Next tactic:
apply exp_pos
@[simp]
theorem rpow_zero (x : ℝ) : x ^ (0 : ℝ) = 1 := by 

Proof state:
x✝ y z x : ℝ
⊢ x ^ 0 = 1

Next tactic:
simp [rpow_def]
theorem rpow_zero_pos (x : ℝ) : 0 < x ^ (0 : ℝ) := by 

Proof state:
x✝ y z x : ℝ
⊢ 0 < x ^ 0

Next tactic:
simp
@[simp]
theorem zero_rpow {x : ℝ} (h : x ≠ 0) : (0 : ℝ) ^ x = 0 := by 

Proof state:
x✝ y z x : ℝ
h : x ≠ 0
⊢ 0 ^ x = 0

Next tactic:
simp [rpow_def, *]
theorem zero_rpow_eq_iff {x : ℝ} {a : ℝ} : 0 ^ x = a ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1 := by
  

Proof state:
x✝ y z x a : ℝ
⊢ 0 ^ x = a ↔ x ≠ 0 ∧ a = 0 ∨ x = 0 ∧ a = 1

Next tactic:
constructor