Skip to content

Commit 3d2b110

Browse files
bustercopleypfaffelh
authored andcommitted
style(RingTheory/PowerSeries/Derivative): prove derivative_pow from Derivation.leibniz_pow (leanprover-community#35067)
1 parent 775aafe commit 3d2b110

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Mathlib/RingTheory/PowerSeries/Derivative.lean

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,13 @@ there is currently no instance of `Inv R⟦X⟧` for more general base rings `R`
175175
apply Derivation.leibniz_of_mul_eq_one
176176
exact PowerSeries.inv_mul_cancel (h := h)
177177

178-
variable (A : Type*) [CommRing A]
179-
180178
set_option backward.isDefEq.respectTransparency false in
181179
/-- The derivative of g^n equals n * g^(n-1) * g'. -/
182-
theorem derivative_pow (g : A⟦X⟧) (n : ℕ) :
180+
theorem derivative_pow (A : Type*) [CommSemiring A] (g : A⟦X⟧) (n : ℕ) :
183181
d⁄dX A (g ^ n) = n * g ^ (n - 1) * d⁄dX A g := by
184-
induction n with
185-
| zero => simp
186-
| succ n ih =>
187-
simp only [pow_succ, (derivative A).leibniz, ih, smul_eq_mul, add_tsub_cancel_right]
188-
rcases n with _ | m
189-
· simp
190-
· simp only [add_tsub_cancel_right, pow_succ]; push_cast; ring
182+
rw [Derivation.leibniz_pow, smul_eq_mul, nsmul_eq_mul, mul_assoc]
183+
184+
variable (A : Type*) [CommRing A]
191185

192186
set_option backward.isDefEq.respectTransparency false in
193187
/-- Chain rule for polynomials viewed as power series. Use `derivative_subst` instead. -/

0 commit comments

Comments
 (0)