Theorem: Real.hasStrictFDerivAt_rpow_of_neg
File: Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean

tactic: have : (fun x : ℝ × ℝ => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => exp (log x.1 * x.2) * cos (x.2 * π) :=
  (continuousAt_fst.eventually (gt_mem_nhds hp)).mono fun p hp => rpow_def_of_neg hp _
state_before: x y z : ℝ
p : ℝ × ℝ
hp : p.fst < 0
⊢ HasStrictFDerivAt (fun x => x.fst ^ x.snd)
    ((p.snd * p.fst ^ (p.snd - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.fst ^ p.snd * log p.fst - exp (log p.fst * p.snd) * sin (p.snd * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ)
    p

tactic: refine' HasStrictFDerivAt.congr_of_eventuallyEq _ this.symm
state_before: x y z : ℝ
p : ℝ × ℝ
hp : p.fst < 0
this : (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => exp (log x.fst * x.snd) * cos (x.snd * π)
⊢ HasStrictFDerivAt (fun x => x.fst ^ x.snd)
    ((p.snd * p.fst ^ (p.snd - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.fst ^ p.snd * log p.fst - exp (log p.fst * p.snd) * sin (p.snd * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ)
    p

tactic: convert ((hasStrictFDerivAt_fst.log hp.ne).mul hasStrictFDerivAt_snd).exp.mul
  (hasStrictFDerivAt_snd.mul_const π).cos using 1
state_before: x y z : ℝ
p : ℝ × ℝ
hp : p.fst < 0
this : (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => exp (log x.fst * x.snd) * cos (x.snd * π)
⊢ HasStrictFDerivAt (fun x => exp (log x.fst * x.snd) * cos (x.snd * π))
    ((p.snd * p.fst ^ (p.snd - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.fst ^ p.snd * log p.fst - exp (log p.fst * p.snd) * sin (p.snd * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ)
    p

tactic: simp_rw [rpow_sub_one hp.ne, smul_add, ← add_assoc, smul_smul, ← add_smul, ← mul_assoc,
  mul_comm (cos _), ← rpow_def_of_neg hp]
state_before: case h.e'_10.h.h
x y z : ℝ
p : ℝ × ℝ
hp : p.fst < 0
this : (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => exp (log x.fst * x.snd) * cos (x.snd * π)
e_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup
he✝ : NormedField.toNormedSpace = NormedAlgebra.toNormedSpace'
⊢ (p.snd * p.fst ^ (p.snd - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.fst ^ p.snd * log p.fst - exp (log p.fst * p.snd) * sin (p.snd * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ =
    exp (log p.fst * p.snd) • -sin (p.snd * π) • π • ContinuousLinearMap.snd ℝ ℝ ℝ +
      cos (p.snd * π) •
        exp (log p.fst * p.snd) •
          (log p.fst • ContinuousLinearMap.snd ℝ ℝ ℝ + p.snd • p.fst⁻¹ • ContinuousLinearMap.fst ℝ ℝ ℝ)

tactic: rw [div_eq_mul_inv, add_comm]
state_before: case h.e'_10.h.h
x y z : ℝ
p : ℝ × ℝ
hp : p.fst < 0
this : (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => exp (log x.fst * x.snd) * cos (x.snd * π)
e_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup
he✝ : NormedField.toNormedSpace = NormedAlgebra.toNormedSpace'
⊢ (p.snd * (p.fst ^ p.snd / p.fst)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.fst ^ p.snd * log p.fst - exp (log p.fst * p.snd) * sin (p.snd * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ =
    (exp (log p.fst * p.snd) * -sin (p.snd * π) * π + p.fst ^ p.snd * log p.fst) • ContinuousLinearMap.snd ℝ ℝ ℝ +
      (p.fst ^ p.snd * p.snd * p.fst⁻¹) • ContinuousLinearMap.fst ℝ ℝ ℝ

tactic: congr 2 <;> ring
state_before: case h.e'_10.h.h
x y z : ℝ
p : ℝ × ℝ
hp : p.fst < 0
this : (fun x => x.fst ^ x.snd) =ᶠ[𝓝 p] fun x => exp (log x.fst * x.snd) * cos (x.snd * π)
e_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup
he✝ : NormedField.toNormedSpace = NormedAlgebra.toNormedSpace'
⊢ (p.fst ^ p.snd * log p.fst - exp (log p.fst * p.snd) * sin (p.snd * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ +
      (p.snd * (p.fst ^ p.snd * p.fst⁻¹)) • ContinuousLinearMap.fst ℝ ℝ ℝ =
    (exp (log p.fst * p.snd) * -sin (p.snd * π) * π + p.fst ^ p.snd * log p.fst) • ContinuousLinearMap.snd ℝ ℝ ℝ +
      (p.fst ^ p.snd * p.snd * p.fst⁻¹) • ContinuousLinearMap.fst ℝ ℝ ℝ