l3lab/ntp-mathlib huggingface dataset:
theorem cpow_eq_nhds' {p : ℂ × ℂ} (hp_fst : p.fst ≠ 0) :
    (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) := by
  suffices : ∀ᶠ x : ℂ × ℂ in 𝓝 p, x.1 ≠ 0
  exact
    this.mono fun x hx => by
      dsimp only
      rw [cpow_def_of_ne_zero hx]
  refine' IsOpen.eventually_mem _ hp_fst
  change IsOpen { x : ℂ × ℂ | x.1 = 0 }ᶜ
  rw [isOpen_compl_iff]
  

Proof state:
case this
α : Type u_1
p : ℂ × ℂ
hp_fst : p.1 ≠ 0
⊢ IsClosed {x | x.1 = 0}

Next tactic:
exact isClosed_eq continuous_fst continuous_const
theorem continuousAt_const_cpow {a b : ℂ} (ha : a ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
  

Proof state:
α : Type u_1
a b : ℂ
ha : a ≠ 0
⊢ ContinuousAt (fun x => a ^ x) b

Next tactic:
have cpow_eq : (fun x : ℂ => a ^ x) = fun x => exp (log a * x) := by
    ext1 b
    rw [cpow_def_of_ne_zero ha]
theorem continuousAt_const_cpow {a b : ℂ} (ha : a ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
  have cpow_eq : (fun x : ℂ => a ^ x) = fun x => exp (log a * x) := by
    

Proof state:
α : Type u_1
a b : ℂ
ha : a ≠ 0
⊢ (fun x => a ^ x) = fun x => cexp (Complex.log a * x)

Next tactic:
ext1 b
theorem continuousAt_const_cpow {a b : ℂ} (ha : a ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
  have cpow_eq : (fun x : ℂ => a ^ x) = fun x => exp (log a * x) := by
    ext1 b
    

Proof state:
case h
α : Type u_1
a b✝ : ℂ
ha : a ≠ 0
b : ℂ
⊢ a ^ b = cexp (Complex.log a * b)

Next tactic:
rw [cpow_def_of_ne_zero ha]
theorem continuousAt_const_cpow {a b : ℂ} (ha : a ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
  have cpow_eq : (fun x : ℂ => a ^ x) = fun x => exp (log a * x) := by
    ext1 b
    rw [cpow_def_of_ne_zero ha]
  

Proof state:
α : Type u_1
a b : ℂ
ha : a ≠ 0
cpow_eq : (fun x => a ^ x) = fun x => cexp (Complex.log a * x)
⊢ ContinuousAt (fun x => a ^ x) b

Next tactic:
rw [cpow_eq]
theorem continuousAt_const_cpow {a b : ℂ} (ha : a ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
  have cpow_eq : (fun x : ℂ => a ^ x) = fun x => exp (log a * x) := by
    ext1 b
    rw [cpow_def_of_ne_zero ha]
  rw [cpow_eq]
  

Proof state:
α : Type u_1
a b : ℂ
ha : a ≠ 0
cpow_eq : (fun x => a ^ x) = fun x => cexp (Complex.log a * x)
⊢ ContinuousAt (fun x => cexp (Complex.log a * x)) b

Next tactic:
exact continuous_exp.continuousAt.comp (ContinuousAt.mul continuousAt_const continuousAt_id)
theorem continuousAt_const_cpow' {a b : ℂ} (h : b ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
  

Proof state:
α : Type u_1
a b : ℂ
h : b ≠ 0
⊢ ContinuousAt (fun x => a ^ x) b

Next tactic:
by_cases ha : a = 0
theorem continuousAt_const_cpow' {a b : ℂ} (h : b ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
  by_cases ha : a = 0
  · 

Proof state:
case pos
α : Type u_1
a b : ℂ
h : b ≠ 0
ha : a = 0
⊢ ContinuousAt (fun x => a ^ x) b

Next tactic:
rw [ha, continuousAt_congr (zero_cpow_eq_nhds h)]
theorem continuousAt_const_cpow' {a b : ℂ} (h : b ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
  by_cases ha : a = 0
  · rw [ha, continuousAt_congr (zero_cpow_eq_nhds h)]
    

Proof state:
case pos
α : Type u_1
a b : ℂ
h : b ≠ 0
ha : a = 0
⊢ ContinuousAt 0 b

Next tactic:
exact continuousAt_const
theorem continuousAt_const_cpow' {a b : ℂ} (h : b ≠ 0) : ContinuousAt (fun x : ℂ => a ^ x) b := by
  by_cases ha : a = 0
  · rw [ha, continuousAt_congr (zero_cpow_eq_nhds h)]
    exact continuousAt_const
  · 

Proof state:
case neg
α : Type u_1
a b : ℂ
h : b ≠ 0
ha : ¬a = 0
⊢ ContinuousAt (fun x => a ^ x) b

Next tactic:
exact continuousAt_const_cpow ha
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  

Proof state:
α : Type u_1
p : ℂ × ℂ
hp_fst : 0 < p.1.re ∨ p.1.im ≠ 0
⊢ ContinuousAt (fun x => x.1 ^ x.2) p

Next tactic:
have hp_fst_ne_zero : p.fst ≠ 0 := by
    intro h
    cases' hp_fst with hp_fst hp_fst <;>
      · rw [h] at hp_fst
        simp at hp_fst
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  have hp_fst_ne_zero : p.fst ≠ 0 := by
    

Proof state:
α : Type u_1
p : ℂ × ℂ
hp_fst : 0 < p.1.re ∨ p.1.im ≠ 0
⊢ p.1 ≠ 0

Next tactic:
intro h
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  have hp_fst_ne_zero : p.fst ≠ 0 := by
    intro h
    

Proof state:
α : Type u_1
p : ℂ × ℂ
hp_fst : 0 < p.1.re ∨ p.1.im ≠ 0
h : p.1 = 0
⊢ False

Next tactic:
cases' hp_fst with hp_fst hp_fst
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  have hp_fst_ne_zero : p.fst ≠ 0 := by
    intro h
    cases' hp_fst with hp_fst hp_fst <;>
      · 

Proof state:
case inl
α : Type u_1
p : ℂ × ℂ
h : p.1 = 0
hp_fst : 0 < p.1.re
⊢ False

Next tactic:
rw [h] at hp_fst
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  have hp_fst_ne_zero : p.fst ≠ 0 := by
    intro h
    cases' hp_fst with hp_fst hp_fst <;>
      · rw [h] at hp_fst
        

Proof state:
case inl
α : Type u_1
p : ℂ × ℂ
h : p.1 = 0
hp_fst : 0 < 0.re
⊢ False

Next tactic:
simp at hp_fst
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  have hp_fst_ne_zero : p.fst ≠ 0 := by
    intro h
    cases' hp_fst with hp_fst hp_fst <;>
      · 

Proof state:
case inr
α : Type u_1
p : ℂ × ℂ
h : p.1 = 0
hp_fst : p.1.im ≠ 0
⊢ False

Next tactic:
rw [h] at hp_fst
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  have hp_fst_ne_zero : p.fst ≠ 0 := by
    intro h
    cases' hp_fst with hp_fst hp_fst <;>
      · rw [h] at hp_fst
        

Proof state:
case inr
α : Type u_1
p : ℂ × ℂ
h : p.1 = 0
hp_fst : 0.im ≠ 0
⊢ False

Next tactic:
simp at hp_fst
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  have hp_fst_ne_zero : p.fst ≠ 0 := by
    intro h
    cases' hp_fst with hp_fst hp_fst <;>
      · rw [h] at hp_fst
        simp at hp_fst
  

Proof state:
α : Type u_1
p : ℂ × ℂ
hp_fst : 0 < p.1.re ∨ p.1.im ≠ 0
hp_fst_ne_zero : p.1 ≠ 0
⊢ ContinuousAt (fun x => x.1 ^ x.2) p

Next tactic:
rw [continuousAt_congr (cpow_eq_nhds' hp_fst_ne_zero)]
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  have hp_fst_ne_zero : p.fst ≠ 0 := by
    intro h
    cases' hp_fst with hp_fst hp_fst <;>
      · rw [h] at hp_fst
        simp at hp_fst
  rw [continuousAt_congr (cpow_eq_nhds' hp_fst_ne_zero)]
  

Proof state:
α : Type u_1
p : ℂ × ℂ
hp_fst : 0 < p.1.re ∨ p.1.im ≠ 0
hp_fst_ne_zero : p.1 ≠ 0
⊢ ContinuousAt (fun x => cexp (Complex.log x.1 * x.2)) p

Next tactic:
refine' continuous_exp.continuousAt.comp _
/-- The function `z ^ w` is continuous in `(z, w)` provided that `z` does not belong to the interval
`(-∞, 0]` on the real line. See also `Complex.continuousAt_cpow_zero_of_re_pos` for a version that
works for `z = 0` but assumes `0 < re w`. -/
theorem continuousAt_cpow {p : ℂ × ℂ} (hp_fst : 0 < p.fst.re ∨ p.fst.im ≠ 0) :
    ContinuousAt (fun x : ℂ × ℂ => x.1 ^ x.2) p := by
  have hp_fst_ne_zero : p.fst ≠ 0 := by
    intro h
    cases' hp_fst with hp_fst hp_fst <;>
      · rw [h] at hp_fst
        simp at hp_fst
  rw [continuousAt_congr (cpow_eq_nhds' hp_fst_ne_zero)]
  refine' continuous_exp.continuousAt.comp _
  

Proof state:
α : Type u_1
p : ℂ × ℂ
hp_fst : 0 < p.1.re ∨ p.1.im ≠ 0
hp_fst_ne_zero : p.1 ≠ 0
⊢ ContinuousAt (fun x => Complex.log x.1 * x.2) p

Next tactic:
exact
    ContinuousAt.mul
      (ContinuousAt.comp (continuousAt_clog hp_fst) continuous_fst.continuousAt)
      continuous_snd.continuousAt
theorem Filter.Tendsto.const_cpow {l : Filter α} {f : α → ℂ} {a b : ℂ} (hf : Tendsto f l (𝓝 b))
    (h : a ≠ 0 ∨ b ≠ 0) : Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b)) := by
  

Proof state:
α : Type u_1
l : Filter α
f : α → ℂ
a b : ℂ
hf : Tendsto f l (𝓝 b)
h : a ≠ 0 ∨ b ≠ 0
⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))

Next tactic:
cases h with
  | inl h => exact (continuousAt_const_cpow h).tendsto.comp hf
  | inr h => exact (continuousAt_const_cpow' h).tendsto.comp hf
theorem Filter.Tendsto.const_cpow {l : Filter α} {f : α → ℂ} {a b : ℂ} (hf : Tendsto f l (𝓝 b))
    (h : a ≠ 0 ∨ b ≠ 0) : Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b)) := by
  cases h with
  

Proof state:
case inl
α : Type u_1
l : Filter α
f : α → ℂ
a b : ℂ
hf : Tendsto f l (𝓝 b)
h : a ≠ 0
⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))

Next tactic:
| inl h => exact (continuousAt_const_cpow h).tendsto.comp hf
theorem Filter.Tendsto.const_cpow {l : Filter α} {f : α → ℂ} {a b : ℂ} (hf : Tendsto f l (𝓝 b))
    (h : a ≠ 0 ∨ b ≠ 0) : Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b)) := by
  cases h with
  | inl h => 

Proof state:
case inl
α : Type u_1
l : Filter α
f : α → ℂ
a b : ℂ
hf : Tendsto f l (𝓝 b)
h : a ≠ 0
⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))

Next tactic:
exact (continuousAt_const_cpow h).tendsto.comp hf
theorem Filter.Tendsto.const_cpow {l : Filter α} {f : α → ℂ} {a b : ℂ} (hf : Tendsto f l (𝓝 b))
    (h : a ≠ 0 ∨ b ≠ 0) : Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b)) := by
  cases h with
  | inl h => exact (continuousAt_const_cpow h).tendsto.comp hf
  

Proof state:
case inr
α : Type u_1
l : Filter α
f : α → ℂ
a b : ℂ
hf : Tendsto f l (𝓝 b)
h : b ≠ 0
⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))

Next tactic:
| inr h => exact (continuousAt_const_cpow' h).tendsto.comp hf
theorem Filter.Tendsto.const_cpow {l : Filter α} {f : α → ℂ} {a b : ℂ} (hf : Tendsto f l (𝓝 b))
    (h : a ≠ 0 ∨ b ≠ 0) : Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b)) := by
  cases h with
  | inl h => exact (continuousAt_const_cpow h).tendsto.comp hf
  | inr h => 

Proof state:
case inr
α : Type u_1
l : Filter α
f : α → ℂ
a b : ℂ
hf : Tendsto f l (𝓝 b)
h : b ≠ 0
⊢ Tendsto (fun x => a ^ f x) l (𝓝 (a ^ b))

Next tactic:
exact (continuousAt_const_cpow' h).tendsto.comp hf
theorem continuousAt_const_rpow {a b : ℝ} (h : a ≠ 0) : ContinuousAt (rpow a) b := by
  

Proof state:
a b : ℝ
h : a ≠ 0
⊢ ContinuousAt (rpow a) b

Next tactic:
have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
theorem continuousAt_const_rpow {a b : ℝ} (h : a ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    

Proof state:
a b : ℝ
h : a ≠ 0
⊢ rpow a = fun x => (↑a ^ ↑x).re

Next tactic:
ext1 x
theorem continuousAt_const_rpow {a b : ℝ} (h : a ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    

Proof state:
case h
a b : ℝ
h : a ≠ 0
x : ℝ
⊢ rpow a x = (↑a ^ ↑x).re

Next tactic:
rw [rpow_eq_pow, rpow_def]
theorem continuousAt_const_rpow {a b : ℝ} (h : a ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
  

Proof state:
a b : ℝ
h : a ≠ 0
this : rpow a = fun x => (↑a ^ ↑x).re
⊢ ContinuousAt (rpow a) b

Next tactic:
rw [this]
theorem continuousAt_const_rpow {a b : ℝ} (h : a ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
  rw [this]
  

Proof state:
a b : ℝ
h : a ≠ 0
this : rpow a = fun x => (↑a ^ ↑x).re
⊢ ContinuousAt (fun x => (↑a ^ ↑x).re) b

Next tactic:
refine' Complex.continuous_re.continuousAt.comp _
theorem continuousAt_const_rpow {a b : ℝ} (h : a ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
  rw [this]
  refine' Complex.continuous_re.continuousAt.comp _
  

Proof state:
a b : ℝ
h : a ≠ 0
this : rpow a = fun x => (↑a ^ ↑x).re
⊢ ContinuousAt (fun x => ↑a ^ ↑x) b

Next tactic:
refine' (continuousAt_const_cpow _).comp Complex.continuous_ofReal.continuousAt
theorem continuousAt_const_rpow {a b : ℝ} (h : a ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
  rw [this]
  refine' Complex.continuous_re.continuousAt.comp _
  refine' (continuousAt_const_cpow _).comp Complex.continuous_ofReal.continuousAt
  

Proof state:
a b : ℝ
h : a ≠ 0
this : rpow a = fun x => (↑a ^ ↑x).re
⊢ ↑a ≠ 0

Next tactic:
norm_cast
theorem continuousAt_const_rpow' {a b : ℝ} (h : b ≠ 0) : ContinuousAt (rpow a) b := by
  

Proof state:
a b : ℝ
h : b ≠ 0
⊢ ContinuousAt (rpow a) b

Next tactic:
have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
theorem continuousAt_const_rpow' {a b : ℝ} (h : b ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    

Proof state:
a b : ℝ
h : b ≠ 0
⊢ rpow a = fun x => (↑a ^ ↑x).re

Next tactic:
ext1 x
theorem continuousAt_const_rpow' {a b : ℝ} (h : b ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    

Proof state:
case h
a b : ℝ
h : b ≠ 0
x : ℝ
⊢ rpow a x = (↑a ^ ↑x).re

Next tactic:
rw [rpow_eq_pow, rpow_def]
theorem continuousAt_const_rpow' {a b : ℝ} (h : b ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
  

Proof state:
a b : ℝ
h : b ≠ 0
this : rpow a = fun x => (↑a ^ ↑x).re
⊢ ContinuousAt (rpow a) b

Next tactic:
rw [this]
theorem continuousAt_const_rpow' {a b : ℝ} (h : b ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
  rw [this]
  

Proof state:
a b : ℝ
h : b ≠ 0
this : rpow a = fun x => (↑a ^ ↑x).re
⊢ ContinuousAt (fun x => (↑a ^ ↑x).re) b

Next tactic:
refine' Complex.continuous_re.continuousAt.comp _
theorem continuousAt_const_rpow' {a b : ℝ} (h : b ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
  rw [this]
  refine' Complex.continuous_re.continuousAt.comp _
  

Proof state:
a b : ℝ
h : b ≠ 0
this : rpow a = fun x => (↑a ^ ↑x).re
⊢ ContinuousAt (fun x => ↑a ^ ↑x) b

Next tactic:
refine' (continuousAt_const_cpow' _).comp Complex.continuous_ofReal.continuousAt
theorem continuousAt_const_rpow' {a b : ℝ} (h : b ≠ 0) : ContinuousAt (rpow a) b := by
  have : rpow a = fun x : ℝ => ((a : ℂ) ^ (x : ℂ)).re := by
    ext1 x
    rw [rpow_eq_pow, rpow_def]
  rw [this]
  refine' Complex.continuous_re.continuousAt.comp _
  refine' (continuousAt_const_cpow' _).comp Complex.continuous_ofReal.continuousAt
  

Proof state:
a b : ℝ
h : b ≠ 0
this : rpow a = fun x => (↑a ^ ↑x).re
⊢ ↑b ≠ 0

Next tactic:
norm_cast
theorem rpow_eq_nhds_of_neg {p : ℝ × ℝ} (hp_fst : p.fst < 0) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) * cos (x.2 * π) := by
  

Proof state:
p : ℝ × ℝ
hp_fst : p.1 < 0
⊢ (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)

Next tactic:
suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, x.1 < 0
theorem rpow_eq_nhds_of_neg {p : ℝ × ℝ} (hp_fst : p.fst < 0) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) * cos (x.2 * π) := by
  suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, x.1 < 0
  

Proof state:
p : ℝ × ℝ
hp_fst : p.1 < 0
this : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.1 < 0
⊢ (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
case this p : ℝ × ℝ hp_fst : p.1 < 0 ⊢ ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.1 < 0

Next tactic:
exact
    this.mono fun x hx => by
      dsimp only
      rw [rpow_def_of_neg hx]
theorem rpow_eq_nhds_of_neg {p : ℝ × ℝ} (hp_fst : p.fst < 0) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) * cos (x.2 * π) := by
  suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, x.1 < 0
  exact
    this.mono fun x hx => by
      

Proof state:
p : ℝ × ℝ
hp_fst : p.1 < 0
this : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.1 < 0
x : ℝ × ℝ
hx : x.1 < 0
⊢ (fun x => x.1 ^ x.2) x = (fun x => rexp (log x.1 * x.2) * cos (x.2 * π)) x

Next tactic:
dsimp only
theorem rpow_eq_nhds_of_neg {p : ℝ × ℝ} (hp_fst : p.fst < 0) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) * cos (x.2 * π) := by
  suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, x.1 < 0
  exact
    this.mono fun x hx => by
      dsimp only
      

Proof state:
p : ℝ × ℝ
hp_fst : p.1 < 0
this : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.1 < 0
x : ℝ × ℝ
hx : x.1 < 0
⊢ x.1 ^ x.2 = rexp (log x.1 * x.2) * cos (x.2 * π)

Next tactic:
rw [rpow_def_of_neg hx]
theorem rpow_eq_nhds_of_neg {p : ℝ × ℝ} (hp_fst : p.fst < 0) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) * cos (x.2 * π) := by
  suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, x.1 < 0
  exact
    this.mono fun x hx => by
      dsimp only
      rw [rpow_def_of_neg hx]
  

Proof state:
case this
p : ℝ × ℝ
hp_fst : p.1 < 0
⊢ ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, x.1 < 0

Next tactic:
exact IsOpen.eventually_mem (isOpen_lt continuous_fst continuous_const) hp_fst
theorem rpow_eq_nhds_of_pos {p : ℝ × ℝ} (hp_fst : 0 < p.fst) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) := by
  

Proof state:
p : ℝ × ℝ
hp_fst : 0 < p.1
⊢ (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2)

Next tactic:
suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, 0 < x.1
theorem rpow_eq_nhds_of_pos {p : ℝ × ℝ} (hp_fst : 0 < p.fst) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) := by
  suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, 0 < x.1
  

Proof state:
p : ℝ × ℝ
hp_fst : 0 < p.1
this : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.1
⊢ (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2)
case this p : ℝ × ℝ hp_fst : 0 < p.1 ⊢ ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.1

Next tactic:
exact
    this.mono fun x hx => by
      dsimp only
      rw [rpow_def_of_pos hx]
theorem rpow_eq_nhds_of_pos {p : ℝ × ℝ} (hp_fst : 0 < p.fst) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) := by
  suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, 0 < x.1
  exact
    this.mono fun x hx => by
      

Proof state:
p : ℝ × ℝ
hp_fst : 0 < p.1
this : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.1
x : ℝ × ℝ
hx : 0 < x.1
⊢ (fun x => x.1 ^ x.2) x = (fun x => rexp (log x.1 * x.2)) x

Next tactic:
dsimp only
theorem rpow_eq_nhds_of_pos {p : ℝ × ℝ} (hp_fst : 0 < p.fst) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) := by
  suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, 0 < x.1
  exact
    this.mono fun x hx => by
      dsimp only
      

Proof state:
p : ℝ × ℝ
hp_fst : 0 < p.1
this : ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.1
x : ℝ × ℝ
hx : 0 < x.1
⊢ x.1 ^ x.2 = rexp (log x.1 * x.2)

Next tactic:
rw [rpow_def_of_pos hx]
theorem rpow_eq_nhds_of_pos {p : ℝ × ℝ} (hp_fst : 0 < p.fst) :
    (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) := by
  suffices : ∀ᶠ x : ℝ × ℝ in 𝓝 p, 0 < x.1
  exact
    this.mono fun x hx => by
      dsimp only
      rw [rpow_def_of_pos hx]
  

Proof state:
case this
p : ℝ × ℝ
hp_fst : 0 < p.1
⊢ ∀ᶠ (x : ℝ × ℝ) in 𝓝 p, 0 < x.1

Next tactic:
exact IsOpen.eventually_mem (isOpen_lt continuous_const continuous_fst) hp_fst
theorem continuousAt_rpow_of_ne (p : ℝ × ℝ) (hp : p.1 ≠ 0) :
    ContinuousAt (fun p : ℝ × ℝ => p.1 ^ p.2) p := by
  

Proof state:
p : ℝ × ℝ
hp : p.1 ≠ 0
⊢ ContinuousAt (fun p => p.1 ^ p.2) p

Next tactic:
rw [ne_iff_lt_or_gt] at hp
theorem continuousAt_rpow_of_ne (p : ℝ × ℝ) (hp : p.1 ≠ 0) :
    ContinuousAt (fun p : ℝ × ℝ => p.1 ^ p.2) p := by
  rw [ne_iff_lt_or_gt] at hp
  

Proof state:
p : ℝ × ℝ
hp : p.1 < 0 ∨ p.1 > 0
⊢ ContinuousAt (fun p => p.1 ^ p.2) p

Next tactic:
cases hp with
  | inl hp =>
    rw [continuousAt_congr (rpow_eq_nhds_of_neg hp)]
    refine' ContinuousAt.mul _ (continuous_cos.continuousAt.comp _)
    · refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)
      refine' (continuousAt_log _).comp continuous_fst.continuousAt
      exact hp.ne
    · exact continuous_snd.continuousAt.mul continuousAt_const
  | inr hp =>
    rw [continuousAt_congr (rpow_eq_nhds_of_pos hp)]
    refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)
    refine' (continuousAt_log _).comp continuous_fst.continuousAt
    exact hp.lt.ne.symm
theorem continuousAt_rpow_of_ne (p : ℝ × ℝ) (hp : p.1 ≠ 0) :
    ContinuousAt (fun p : ℝ × ℝ => p.1 ^ p.2) p := by
  rw [ne_iff_lt_or_gt] at hp
  cases hp with
  

Proof state:
case inl
p : ℝ × ℝ
hp : p.1 < 0
⊢ ContinuousAt (fun p => p.1 ^ p.2) p

Next tactic:
| inl hp =>
    rw [continuousAt_congr (rpow_eq_nhds_of_neg hp)]
    refine' ContinuousAt.mul _ (continuous_cos.continuousAt.comp _)
    · refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)
      refine' (continuousAt_log _).comp continuous_fst.continuousAt
      exact hp.ne
    · exact continuous_snd.continuousAt.mul continuousAt_const
theorem continuousAt_rpow_of_ne (p : ℝ × ℝ) (hp : p.1 ≠ 0) :
    ContinuousAt (fun p : ℝ × ℝ => p.1 ^ p.2) p := by
  rw [ne_iff_lt_or_gt] at hp
  cases hp with
  | inl hp =>
    

Proof state:
case inl
p : ℝ × ℝ
hp : p.1 < 0
⊢ ContinuousAt (fun p => p.1 ^ p.2) p

Next tactic:
rw [continuousAt_congr (rpow_eq_nhds_of_neg hp)]
theorem continuousAt_rpow_of_ne (p : ℝ × ℝ) (hp : p.1 ≠ 0) :
    ContinuousAt (fun p : ℝ × ℝ => p.1 ^ p.2) p := by
  rw [ne_iff_lt_or_gt] at hp
  cases hp with
  | inl hp =>
    rw [continuousAt_congr (rpow_eq_nhds_of_neg hp)]
    

Proof state:
case inl
p : ℝ × ℝ
hp : p.1 < 0
⊢ ContinuousAt (fun x => rexp (log x.1 * x.2) * cos (x.2 * π)) p

Next tactic:
refine' ContinuousAt.mul _ (continuous_cos.continuousAt.comp _)
theorem continuousAt_rpow_of_ne (p : ℝ × ℝ) (hp : p.1 ≠ 0) :
    ContinuousAt (fun p : ℝ × ℝ => p.1 ^ p.2) p := by
  rw [ne_iff_lt_or_gt] at hp
  cases hp with
  | inl hp =>
    rw [continuousAt_congr (rpow_eq_nhds_of_neg hp)]
    refine' ContinuousAt.mul _ (continuous_cos.continuousAt.comp _)
    · 

Proof state:
case inl.refine'_1
p : ℝ × ℝ
hp : p.1 < 0
⊢ ContinuousAt (fun x => rexp (log x.1 * x.2)) p

Next tactic:
refine' continuous_exp.continuousAt.comp (ContinuousAt.mul _ continuous_snd.continuousAt)