l3lab/ntp-mathlib huggingface dataset:
noncomputable instance : HasShift (Triangle C) ℤ :=
  hasShiftMk (Triangle C) ℤ
    { F := Triangle.shiftFunctor C
      zero := Triangle.shiftFunctorZero C
      add := fun a b => Triangle.shiftFunctorAdd' C a b _ rfl
      assoc_hom_app := fun a b c T => by
        ext
        all_goals
          dsimp
          rw [← shiftFunctorAdd'_assoc_hom_app a b c _ _ _ rfl rfl (add_assoc a b c)]
          

Proof state:
case h₂
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
a b c : ℤ
T : Triangle C
⊢ (shiftFunctorAdd' C (a + b) c (a + b + c) (_ : a + b + c = a + b + c)).hom.app T.obj₂ ≫
      (shiftFunctor C c).map ((shiftFunctorAdd' C a b (a + b) (_ : a + b = a + b)).hom.app T.obj₂) =
    (eqToHom
          (_ :
            Triangle.mk ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₁)
                ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₂)
                ((a + b + c).negOnePow •
                  (shiftFunctor C (a + b + c)).map T.mor₃ ≫ (shiftFunctorComm C 1 (a + b + c)).hom.app T.obj₁) =
              Triangle.mk ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₁)
                ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₂)
                ((a + (b + c)).negOnePow •
                  (shiftFunctor C (a + (b + c))).map T.mor₃ ≫
                    (shiftFunctorComm C 1 (a + (b + c))).hom.app T.obj₁))).hom₂ ≫
      (shiftFunctorAdd' C (a + b) c (a + (b + c)) (_ : a + b + c = a + (b + c))).hom.app T.obj₂ ≫
        (shiftFunctor C c).map ((shiftFunctorAdd' C a b (a + b) (_ : a + b = a + b)).hom.app T.obj₂)

Next tactic:
dsimp only [CategoryTheory.shiftFunctorAdd']
noncomputable instance : HasShift (Triangle C) ℤ :=
  hasShiftMk (Triangle C) ℤ
    { F := Triangle.shiftFunctor C
      zero := Triangle.shiftFunctorZero C
      add := fun a b => Triangle.shiftFunctorAdd' C a b _ rfl
      assoc_hom_app := fun a b c T => by
        ext
        all_goals
          dsimp
          rw [← shiftFunctorAdd'_assoc_hom_app a b c _ _ _ rfl rfl (add_assoc a b c)]
          dsimp only [CategoryTheory.shiftFunctorAdd']
          

Proof state:
case h₂
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
a b c : ℤ
T : Triangle C
⊢ (eqToIso (_ : shiftFunctor C (a + b + c) = shiftFunctor C (a + b + c)) ≪≫ shiftFunctorAdd C (a + b) c).hom.app
        T.obj₂ ≫
      (shiftFunctor C c).map
        ((eqToIso (_ : shiftFunctor C (a + b) = shiftFunctor C (a + b)) ≪≫ shiftFunctorAdd C a b).hom.app T.obj₂) =
    (eqToHom
          (_ :
            Triangle.mk ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₁)
                ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₂)
                ((a + b + c).negOnePow •
                  (shiftFunctor C (a + b + c)).map T.mor₃ ≫ (shiftFunctorComm C 1 (a + b + c)).hom.app T.obj₁) =
              Triangle.mk ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₁)
                ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₂)
                ((a + (b + c)).negOnePow •
                  (shiftFunctor C (a + (b + c))).map T.mor₃ ≫
                    (shiftFunctorComm C 1 (a + (b + c))).hom.app T.obj₁))).hom₂ ≫
      (eqToIso (_ : shiftFunctor C (a + (b + c)) = shiftFunctor C (a + b + c)) ≪≫ shiftFunctorAdd C (a + b) c).hom.app
          T.obj₂ ≫
        (shiftFunctor C c).map
          ((eqToIso (_ : shiftFunctor C (a + b) = shiftFunctor C (a + b)) ≪≫ shiftFunctorAdd C a b).hom.app T.obj₂)

Next tactic:
simp
noncomputable instance : HasShift (Triangle C) ℤ :=
  hasShiftMk (Triangle C) ℤ
    { F := Triangle.shiftFunctor C
      zero := Triangle.shiftFunctorZero C
      add := fun a b => Triangle.shiftFunctorAdd' C a b _ rfl
      assoc_hom_app := fun a b c T => by
        ext
        all_goals
          

Proof state:
case h₃
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
a b c : ℤ
T : Triangle C
⊢ (((fun a b => Triangle.shiftFunctorAdd' C a b (a + b) (_ : a + b = a + b)) (a + b) c).hom.app T ≫
        (Triangle.shiftFunctor C c).map
          (((fun a b => Triangle.shiftFunctorAdd' C a b (a + b) (_ : a + b = a + b)) a b).hom.app T)).hom₃ =
    (eqToHom (_ : (Triangle.shiftFunctor C (a + b + c)).obj T = (Triangle.shiftFunctor C (a + (b + c))).obj T) ≫
        ((fun a b => Triangle.shiftFunctorAdd' C a b (a + b) (_ : a + b = a + b)) a (b + c)).hom.app T ≫
          ((fun a b => Triangle.shiftFunctorAdd' C a b (a + b) (_ : a + b = a + b)) b c).hom.app
            ((Triangle.shiftFunctor C a).obj T)).hom₃

Next tactic:
dsimp
noncomputable instance : HasShift (Triangle C) ℤ :=
  hasShiftMk (Triangle C) ℤ
    { F := Triangle.shiftFunctor C
      zero := Triangle.shiftFunctorZero C
      add := fun a b => Triangle.shiftFunctorAdd' C a b _ rfl
      assoc_hom_app := fun a b c T => by
        ext
        all_goals
          dsimp
          

Proof state:
case h₃
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
a b c : ℤ
T : Triangle C
⊢ (shiftFunctorAdd' C (a + b) c (a + b + c) (_ : a + b + c = a + b + c)).hom.app T.obj₃ ≫
      (shiftFunctor C c).map ((shiftFunctorAdd' C a b (a + b) (_ : a + b = a + b)).hom.app T.obj₃) =
    (eqToHom
          (_ :
            Triangle.mk ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₁)
                ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₂)
                ((a + b + c).negOnePow •
                  (shiftFunctor C (a + b + c)).map T.mor₃ ≫ (shiftFunctorComm C 1 (a + b + c)).hom.app T.obj₁) =
              Triangle.mk ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₁)
                ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₂)
                ((a + (b + c)).negOnePow •
                  (shiftFunctor C (a + (b + c))).map T.mor₃ ≫
                    (shiftFunctorComm C 1 (a + (b + c))).hom.app T.obj₁))).hom₃ ≫
      (shiftFunctorAdd' C a (b + c) (a + (b + c)) (_ : a + (b + c) = a + (b + c))).hom.app T.obj₃ ≫
        (shiftFunctorAdd' C b c (b + c) (_ : b + c = b + c)).hom.app ((shiftFunctor C a).obj T.obj₃)

Next tactic:
rw [← shiftFunctorAdd'_assoc_hom_app a b c _ _ _ rfl rfl (add_assoc a b c)]
noncomputable instance : HasShift (Triangle C) ℤ :=
  hasShiftMk (Triangle C) ℤ
    { F := Triangle.shiftFunctor C
      zero := Triangle.shiftFunctorZero C
      add := fun a b => Triangle.shiftFunctorAdd' C a b _ rfl
      assoc_hom_app := fun a b c T => by
        ext
        all_goals
          dsimp
          rw [← shiftFunctorAdd'_assoc_hom_app a b c _ _ _ rfl rfl (add_assoc a b c)]
          

Proof state:
case h₃
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
a b c : ℤ
T : Triangle C
⊢ (shiftFunctorAdd' C (a + b) c (a + b + c) (_ : a + b + c = a + b + c)).hom.app T.obj₃ ≫
      (shiftFunctor C c).map ((shiftFunctorAdd' C a b (a + b) (_ : a + b = a + b)).hom.app T.obj₃) =
    (eqToHom
          (_ :
            Triangle.mk ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₁)
                ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₂)
                ((a + b + c).negOnePow •
                  (shiftFunctor C (a + b + c)).map T.mor₃ ≫ (shiftFunctorComm C 1 (a + b + c)).hom.app T.obj₁) =
              Triangle.mk ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₁)
                ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₂)
                ((a + (b + c)).negOnePow •
                  (shiftFunctor C (a + (b + c))).map T.mor₃ ≫
                    (shiftFunctorComm C 1 (a + (b + c))).hom.app T.obj₁))).hom₃ ≫
      (shiftFunctorAdd' C (a + b) c (a + (b + c)) (_ : a + b + c = a + (b + c))).hom.app T.obj₃ ≫
        (shiftFunctor C c).map ((shiftFunctorAdd' C a b (a + b) (_ : a + b = a + b)).hom.app T.obj₃)

Next tactic:
dsimp only [CategoryTheory.shiftFunctorAdd']
noncomputable instance : HasShift (Triangle C) ℤ :=
  hasShiftMk (Triangle C) ℤ
    { F := Triangle.shiftFunctor C
      zero := Triangle.shiftFunctorZero C
      add := fun a b => Triangle.shiftFunctorAdd' C a b _ rfl
      assoc_hom_app := fun a b c T => by
        ext
        all_goals
          dsimp
          rw [← shiftFunctorAdd'_assoc_hom_app a b c _ _ _ rfl rfl (add_assoc a b c)]
          dsimp only [CategoryTheory.shiftFunctorAdd']
          

Proof state:
case h₃
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
a b c : ℤ
T : Triangle C
⊢ (eqToIso (_ : shiftFunctor C (a + b + c) = shiftFunctor C (a + b + c)) ≪≫ shiftFunctorAdd C (a + b) c).hom.app
        T.obj₃ ≫
      (shiftFunctor C c).map
        ((eqToIso (_ : shiftFunctor C (a + b) = shiftFunctor C (a + b)) ≪≫ shiftFunctorAdd C a b).hom.app T.obj₃) =
    (eqToHom
          (_ :
            Triangle.mk ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₁)
                ((a + b + c).negOnePow • (shiftFunctor C (a + b + c)).map T.mor₂)
                ((a + b + c).negOnePow •
                  (shiftFunctor C (a + b + c)).map T.mor₃ ≫ (shiftFunctorComm C 1 (a + b + c)).hom.app T.obj₁) =
              Triangle.mk ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₁)
                ((a + (b + c)).negOnePow • (shiftFunctor C (a + (b + c))).map T.mor₂)
                ((a + (b + c)).negOnePow •
                  (shiftFunctor C (a + (b + c))).map T.mor₃ ≫
                    (shiftFunctorComm C 1 (a + (b + c))).hom.app T.obj₁))).hom₃ ≫
      (eqToIso (_ : shiftFunctor C (a + (b + c)) = shiftFunctor C (a + b + c)) ≪≫ shiftFunctorAdd C (a + b) c).hom.app
          T.obj₃ ≫
        (shiftFunctor C c).map
          ((eqToIso (_ : shiftFunctor C (a + b) = shiftFunctor C (a + b)) ≪≫ shiftFunctorAdd C a b).hom.app T.obj₃)

Next tactic:
simp
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  

Proof state:
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x

Next tactic:
have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    

Proof state:
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝¹ m✝ : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m✝
m : ℤ
hm : 0 < m
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x

Next tactic:
lift m to ℕ using hm.le
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    

Proof state:
case intro
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝¹ m✝ : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m✝
m : ℕ
hm : 0 < ↑m
⊢ HasStrictDerivAt (fun x => x ^ ↑m) (↑↑m * x ^ (↑m - 1)) x

Next tactic:
simp only [zpow_ofNat, Int.cast_ofNat]
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    

Proof state:
case intro
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝¹ m✝ : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m✝
m : ℕ
hm : 0 < ↑m
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (↑m - 1)) x

Next tactic:
convert hasStrictDerivAt_pow m x using 2
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    

Proof state:
case h.e'_7.h.e'_6
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝¹ m✝ : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m✝
m : ℕ
hm : 0 < ↑m
⊢ x ^ (↑m - 1) = x ^ (m - 1)

Next tactic:
rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    

Proof state:
case h.e'_7.h.e'_6
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝¹ m✝ : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m✝
m : ℕ
hm : 0 < ↑m
⊢ 1 ≤ m

Next tactic:
norm_cast at hm
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
  

Proof state:
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
this : ∀ (m : ℤ), 0 < m → HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x

Next tactic:
rcases lt_trichotomy m 0 with (hm | hm | hm)
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
  rcases lt_trichotomy m 0 with (hm | hm | hm)
  · 

Proof state:
case inl
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
this : ∀ (m : ℤ), 0 < m → HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x
hm : m < 0
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x

Next tactic:
have hx : x ≠ 0 := h.resolve_right hm.not_le
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
  rcases lt_trichotomy m 0 with (hm | hm | hm)
  · have hx : x ≠ 0 := h.resolve_right hm.not_le
    

Proof state:
case inl
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
this : ∀ (m : ℤ), 0 < m → HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x
hm : m < 0
hx : x ≠ 0
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x

Next tactic:
have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;>
      [skip; exact zpow_ne_zero_of_ne_zero hx _]
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
  rcases lt_trichotomy m 0 with (hm | hm | hm)
  · have hx : x ≠ 0 := h.resolve_right hm.not_le
    

Proof state:
case inl
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
this : ∀ (m : ℤ), 0 < m → HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x
hm : m < 0
hx : x ≠ 0
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x

Next tactic:
have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm))
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
  rcases lt_trichotomy m 0 with (hm | hm | hm)
  · have hx : x ≠ 0 := h.resolve_right hm.not_le
    have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;>
      [

Proof state:
case inl.refine_2
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
this✝ : ∀ (m : ℤ), 0 < m → HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x
hm : m < 0
hx : x ≠ 0
this : HasStrictDerivAt (Inv.inv ∘ fun x => x ^ (-m)) ((↑(-m) * x ^ (-m - 1)) • -((x ^ (-m)) ^ 2)⁻¹) x
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x

Next tactic:
skip
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
  rcases lt_trichotomy m 0 with (hm | hm | hm)
  · have hx : x ≠ 0 := h.resolve_right hm.not_le
    have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;>
      [skip; 

Proof state:
case inl.refine_1
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
this : ∀ (m : ℤ), 0 < m → HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x
hm : m < 0
hx : x ≠ 0
⊢ x ^ (-m) ≠ 0

Next tactic:
exact zpow_ne_zero_of_ne_zero hx _
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
  rcases lt_trichotomy m 0 with (hm | hm | hm)
  · have hx : x ≠ 0 := h.resolve_right hm.not_le
    have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;>
      [skip; exact zpow_ne_zero_of_ne_zero hx _]
    

Proof state:
case inl.refine_2
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
this✝ : ∀ (m : ℤ), 0 < m → HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x
hm : m < 0
hx : x ≠ 0
this : HasStrictDerivAt (Inv.inv ∘ fun x => x ^ (-m)) ((↑(-m) * x ^ (-m - 1)) • -((x ^ (-m)) ^ 2)⁻¹) x
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x

Next tactic:
simp only [(· ∘ ·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
  rcases lt_trichotomy m 0 with (hm | hm | hm)
  · have hx : x ≠ 0 := h.resolve_right hm.not_le
    have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;>
      [skip; exact zpow_ne_zero_of_ne_zero hx _]
    simp only [(· ∘ ·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this
    

Proof state:
case inl.refine_2
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
this✝ : ∀ (m : ℤ), 0 < m → HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x
hm : m < 0
hx : x ≠ 0
this : HasStrictDerivAt (fun x => x ^ m) (↑(-m) * x ^ (-m - 1) * -((x ^ m)⁻¹ ^ 2)⁻¹) x
⊢ HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x

Next tactic:
convert this using 1
theorem hasStrictDerivAt_zpow (m : ℤ) (x : 𝕜) (h : x ≠ 0 ∨ 0 ≤ m) :
    HasStrictDerivAt (fun x => x ^ m) ((m : 𝕜) * x ^ (m - 1)) x := by
  have : ∀ m : ℤ, 0 < m → HasStrictDerivAt (· ^ m) ((m : 𝕜) * x ^ (m - 1)) x := fun m hm ↦ by
    lift m to ℕ using hm.le
    simp only [zpow_ofNat, Int.cast_ofNat]
    convert hasStrictDerivAt_pow m x using 2
    rw [← Int.ofNat_one, ← Int.ofNat_sub, zpow_ofNat]
    norm_cast at hm
  rcases lt_trichotomy m 0 with (hm | hm | hm)
  · have hx : x ≠ 0 := h.resolve_right hm.not_le
    have := (hasStrictDerivAt_inv ?_).scomp _ (this (-m) (neg_pos.2 hm)) <;>
      [skip; exact zpow_ne_zero_of_ne_zero hx _]
    simp only [(· ∘ ·), zpow_neg, one_div, inv_inv, smul_eq_mul] at this
    convert this using 1
    

Proof state:
case h.e'_7
𝕜 : Type u
inst✝² : NontriviallyNormedField 𝕜
E : Type v
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
x✝ : 𝕜
s : Set 𝕜
m✝ m : ℤ
x : 𝕜
h : x ≠ 0 ∨ 0 ≤ m
this✝ : ∀ (m : ℤ), 0 < m → HasStrictDerivAt (fun x => x ^ m) (↑m * x ^ (m - 1)) x
hm : m < 0
hx : x ≠ 0
this : HasStrictDerivAt (fun x => x ^ m) (↑(-m) * x ^ (-m - 1) * -((x ^ m)⁻¹ ^ 2)⁻¹) x
⊢ ↑m * x ^ (m - 1) = ↑(-m) * x ^ (-m - 1) * -((x ^ m)⁻¹ ^ 2)⁻¹

Next tactic:
rw [sq, mul_inv, inv_inv, Int.cast_neg, neg_mul, neg_mul_neg, ← zpow_add₀ hx, mul_assoc, ←
      zpow_add₀ hx]