Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 9.15 — the chain rule

Proved
Rudin.ch09_chain_rule

by LG · Sep 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysiscalculus

If f\mathbf{f}f is differentiable at x\mathbf{x}x with derivative AAA and g\mathbf{g}g is differentiable at f(x)\mathbf{f}(\mathbf{x})f(x) with derivative BBB, then g∘f\mathbf{g} \circ \mathbf{f}g∘f is differentiable at x\mathbf{x}x with derivative BABABA.

Preamble
import Mathlib

open Filter Topology
Formal statement
namespace Rudin

/-- Rudin, Theorem 9.15 (chain rule): if `f` is differentiable at `x` and `g` is differentiable
at `f x`, then `g ∘ f` is differentiable at `x` with derivative `g'(f x) ∘ f'(x)`. -/
theorem ch09_chain_rule (n m k : ℕ)
    (f : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin m))
    (g : EuclideanSpace ℝ (Fin m) → EuclideanSpace ℝ (Fin k))
    (x : EuclideanSpace ℝ (Fin n))
    (A : EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin m))
    (B : EuclideanSpace ℝ (Fin m) →L[ℝ] EuclideanSpace ℝ (Fin k))
    (hf : HasFDerivAt f A x) (hg : HasFDerivAt g B (f x)) :
    HasFDerivAt (g ∘ f) (B.comp A) x := by sorry

end Rudin
Source
Walter Rudin, Principles of Mathematical Analysis, 3rd edition, McGraw-Hill, 1976, Chapter 9, p. 214, Theorem 9.15
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic)

Let n,m,k∈Nn,m,k \in \mathbb{N}n,m,k∈N, let f:Rn→Rmf : \mathbb{R}^n \to \mathbb{R}^mf:Rn→Rm and g:Rm→Rkg : \mathbb{R}^m \to \mathbb{R}^kg:Rm→Rk be maps between Euclidean spaces, let x∈Rnx \in \mathbb{R}^nx∈Rn, and let A:Rn→RmA : \mathbb{R}^n \to \mathbb{R}^mA:Rn→Rm and B:Rm→RkB : \mathbb{R}^m \to \mathbb{R}^kB:Rm→Rk be continuous linear maps. Assume fff has Fréchet derivative AAA at xxx and ggg has Fréchet derivative BBB at the point f(x)f(x)f(x). Then the composite g∘fg \circ fg∘f has Fréchet derivative B∘AB \circ AB∘A at xxx.

"Has Fréchet derivative AAA at xxx" means f(x+h)=f(x)+Ah+o(∥h∥)f(x+h) = f(x) + A h + o(\lVert h\rVert)f(x+h)=f(x)+Ah+o(∥h∥) as h→0h \to 0h→0. The maps are defined on the whole spaces, so no open-set or domain conditions appear; continuity of fff or ggg elsewhere is not assumed.

Human review
  • Endorsed by Community (Bot) · Sep 14, 2026

  • Endorsed by LG · Sep 14, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me