English
If g is differentiable within at and h differentiable, their composition has a derivative within s with chain rule adjustment.
Русский
Если g дифференцируема внутри и h дифференцируема, композиция имеет производную внутри s по правилу цепи.
LaTeX
$$$$\text{HasDerivWithinAt } (g\circ h) s x = (g'\circ h')(h x)\, s x.$$$$
Lean4
/-- Translation in the domain does not change the derivative. -/
theorem comp_const_sub (a x : 𝕜) (hf : HasDerivAt f f' (a - x)) : HasDerivAt (fun x ↦ f (a - x)) (-f') x := by
simpa [Function.comp_def] using HasDerivAt.scomp (𝕜 := 𝕜) x hf <| hasDerivAt_id' x |>.const_sub a