Skip to content
Closed
13 changes: 13 additions & 0 deletions Mathlib/Analysis/Calculus/DSlope.lean
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,16 @@ theorem differentiableOn_dslope_of_notMem (h : a ∉ s) :
theorem differentiableAt_dslope_of_ne (h : b ≠ a) :
DifferentiableAt 𝕜 (dslope f a) b ↔ DifferentiableAt 𝕜 f b := by
simp only [← differentiableWithinAt_univ, differentiableWithinAt_dslope_of_ne h]

lemma sub_smul_dslope_of_zero {f : 𝕜 → E} {a : 𝕜} (hf : f a = 0) (b : 𝕜) :
(b - a) • dslope f a b = f b := by
simp [hf]

lemma pow_sub_smul_iterate_dslope_of_zero {f : 𝕜 → E} {a : 𝕜} (n : ℕ)
(hf : ∀ k < n, (Function.swap dslope a)^[k] f a = 0) (b : 𝕜) :
(b - a) ^ n • (Function.swap dslope a)^[n] f b = f b := by
induction n generalizing f with
| zero => simp
| succ n ih =>
rw [Function.iterate_succ_apply', pow_succ, mul_smul,
sub_smul_dslope_of_zero (hf n n.lt_succ_self), ih (by grind)]
Loading