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

Proof steps:
state_before: x y z : ℝ
p : ℝ × ℝ
hp : p.1 < 0
⊢ HasStrictFDerivAt (fun x => x.1 ^ x.2)
    ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ)
    p
state_after: x y z : ℝ
p : ℝ × ℝ
hp : p.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
⊢ HasStrictFDerivAt (fun x => x.1 ^ x.2)
    ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ)
    p
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.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
⊢ HasStrictFDerivAt (fun x => x.1 ^ x.2)
    ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ)
    p
state_after: x y z : ℝ
p : ℝ × ℝ
hp : p.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
⊢ HasStrictFDerivAt (fun x => rexp (log x.1 * x.2) * cos (x.2 * π))
    ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ)
    p
tactic: refine HasStrictFDerivAt.congr_of_eventuallyEq ?_ this.symm
state_before: x y z : ℝ
p : ℝ × ℝ
hp : p.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
⊢ HasStrictFDerivAt (fun x => rexp (log x.1 * x.2) * cos (x.2 * π))
    ((p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ)
    p
state_after: case h.e'_10.h.h
x y z : ℝ
p : ℝ × ℝ
hp : p.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
e_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup
he✝ : NormedField.toNormedSpace = NormedAlgebra.toNormedSpace'
⊢ (p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ =
    rexp (log p.1 * p.2) • -sin (p.2 * π) • π • ContinuousLinearMap.snd ℝ ℝ ℝ +
      cos (p.2 * π) •
        rexp (log p.1 * p.2) • (log p.1 • ContinuousLinearMap.snd ℝ ℝ ℝ + p.2 • p.1⁻¹ • ContinuousLinearMap.fst ℝ ℝ ℝ)
tactic: convert ((hasStrictFDerivAt_fst.log hp.ne).mul hasStrictFDerivAt_snd).exp.mul
    (hasStrictFDerivAt_snd.mul_const π).cos using 1
state_before: case h.e'_10.h.h
x y z : ℝ
p : ℝ × ℝ
hp : p.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
e_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup
he✝ : NormedField.toNormedSpace = NormedAlgebra.toNormedSpace'
⊢ (p.2 * p.1 ^ (p.2 - 1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ =
    rexp (log p.1 * p.2) • -sin (p.2 * π) • π • ContinuousLinearMap.snd ℝ ℝ ℝ +
      cos (p.2 * π) •
        rexp (log p.1 * p.2) • (log p.1 • ContinuousLinearMap.snd ℝ ℝ ℝ + p.2 • p.1⁻¹ • ContinuousLinearMap.fst ℝ ℝ ℝ)
state_after: case h.e'_10.h.h
x y z : ℝ
p : ℝ × ℝ
hp : p.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
e_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup
he✝ : NormedField.toNormedSpace = NormedAlgebra.toNormedSpace'
⊢ (p.2 * (p.1 ^ p.2 / p.1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ =
    (rexp (log p.1 * p.2) * -sin (p.2 * π) * π + p.1 ^ p.2 * log p.1) • ContinuousLinearMap.snd ℝ ℝ ℝ +
      (p.1 ^ p.2 * p.2 * p.1⁻¹) • ContinuousLinearMap.fst ℝ ℝ ℝ
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.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
e_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup
he✝ : NormedField.toNormedSpace = NormedAlgebra.toNormedSpace'
⊢ (p.2 * (p.1 ^ p.2 / p.1)) • ContinuousLinearMap.fst ℝ ℝ ℝ +
      (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ =
    (rexp (log p.1 * p.2) * -sin (p.2 * π) * π + p.1 ^ p.2 * log p.1) • ContinuousLinearMap.snd ℝ ℝ ℝ +
      (p.1 ^ p.2 * p.2 * p.1⁻¹) • ContinuousLinearMap.fst ℝ ℝ ℝ
state_after: case h.e'_10.h.h
x y z : ℝ
p : ℝ × ℝ
hp : p.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
e_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup
he✝ : NormedField.toNormedSpace = NormedAlgebra.toNormedSpace'
⊢ (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ +
      (p.2 * (p.1 ^ p.2 * p.1⁻¹)) • ContinuousLinearMap.fst ℝ ℝ ℝ =
    (rexp (log p.1 * p.2) * -sin (p.2 * π) * π + p.1 ^ p.2 * log p.1) • ContinuousLinearMap.snd ℝ ℝ ℝ +
      (p.1 ^ p.2 * p.2 * p.1⁻¹) • ContinuousLinearMap.fst ℝ ℝ ℝ
tactic: rw [div_eq_mul_inv, add_comm]
state_before: case h.e'_10.h.h
x y z : ℝ
p : ℝ × ℝ
hp : p.1 < 0
this : (fun x => x.1 ^ x.2) =ᶠ[𝓝 p] fun x => rexp (log x.1 * x.2) * cos (x.2 * π)
e_7✝ : normedAddCommGroup = NonUnitalNormedRing.toNormedAddCommGroup
he✝ : NormedField.toNormedSpace = NormedAlgebra.toNormedSpace'
⊢ (p.1 ^ p.2 * log p.1 - rexp (log p.1 * p.2) * sin (p.2 * π) * π) • ContinuousLinearMap.snd ℝ ℝ ℝ +
      (p.2 * (p.1 ^ p.2 * p.1⁻¹)) • ContinuousLinearMap.fst ℝ ℝ ℝ =
    (rexp (log p.1 * p.2) * -sin (p.2 * π) * π + p.1 ^ p.2 * log p.1) • ContinuousLinearMap.snd ℝ ℝ ℝ +
      (p.1 ^ p.2 * p.2 * p.1⁻¹) • ContinuousLinearMap.fst ℝ ℝ ℝ
state_after: no goals
tactic: congr 2 <;> ring