Inverse Function Theorem

lean4-proofcalculusvisualization
f(a)0    g:  g(f(x))=x near af'(a)\neq 0\implies\exists\,g:\;g(f(x))=x\text{ near }a

Statement

Let f:RRf : \mathbb{R} \to \mathbb{R} be continuously differentiable near aa with f(a)0f'(a) \neq 0. Then there exists an open interval UaU \ni a and an open interval Vf(a)V \ni f(a) such that f:UVf : U \to V is a bijection with a continuously differentiable inverse g=f1:VUg = f^{-1} : V \to U. Moreover

g(f(a))=1f(a)g'(f(a)) = \frac{1}{f'(a)}

In higher dimensions: if f:RnRnf : \mathbb{R}^n \to \mathbb{R}^n has invertible Jacobian Df(a)Df(a), then ff is a local C1C^1-diffeomorphism and Dg(f(a))=(Df(a))1Dg(f(a)) = (Df(a))^{-1}.

Visualization

Example: f(x)=x3+xf(x) = x^3 + x near x=0x = 0.

f(x)=3x2+1f'(x) = 3x^2 + 1, so f(0)=10f'(0) = 1 \neq 0. The IFT guarantees a local inverse gg near y=f(0)=0y = f(0) = 0:

  y = f(x) = x³ + x       y = g(y) (inverse)

  2 |        /              2 |           /
    |      /                  |         /
  1 |    /                  1 |       /
    |   /  ← slope=1 at 0     |     /  ← slope=1 at 0
  0 |--*--               0 |--*--
    |  /                     |  /
 -1 | /                   -1 | /
    +--+--+--               +--+--+--
      -1  0  1                -1  0  1
xxf(x)=x3+xf(x) = x^3+xg(f(x))=1/f(x)g'(f(x)) = 1/f'(x)
0.00.0001.000
0.50.6251/(1.75)0.5711/(1.75) \approx 0.571
1.02.0001/4=0.2501/4 = 0.250

The inverse gg satisfies g(0)=0g(0) = 0, g(2)=1g(2) = 1, and g(0)=1/f(0)=1g'(0) = 1/f'(0) = 1.

Proof Sketch

  1. Strict derivative: Replace the C1C^1 hypothesis with the equivalent strict differentiability at aa (valid for C1C^1 maps).
  2. Approximate linearly: Near aa, f(x)f(y)f(a)(xy)f(x) - f(y) \approx f'(a)(x - y). Since f(a)0f'(a) \neq 0, the linear approximation is a bijection.
  3. Contraction mapping: On a small ball, ff is an approximate linear isometry; the fixed-point theorem yields a local right inverse gg with f(g(y))=yf(g(y)) = y.
  4. Differentiability of gg: Differentiate f(g(y))=yf(g(y)) = y using the chain rule: f(g(y))g(y)=1f'(g(y)) \cdot g'(y) = 1, so g(y)=1/f(g(y))g'(y) = 1/f'(g(y)).

Connections

  • Implicit Function TheoremImplicit Function TheoremF(x0,y0)=0,  yF invertible    y=φ(x) locallyF(x_0,y_0)=0,\;\partial_y F\text{ invertible}\implies y=\varphi(x)\text{ locally}A smooth equation F(x,y)=0 with invertible partial derivative in y locally defines y as a smooth function of xRead more → — the IFT is proved by applying the IFT to Φ(x,y)=(x,F(x,y))\Phi(x,y) = (x, F(x,y)); conversely the IFT follows from the IFT
  • Chain RuleChain Ruleddx[f(g(x))]=f(g(x))g(x)\frac{d}{dx}[f(g(x))] = f'(g(x)) \cdot g'(x)Differentiate composite functions by peeling layersRead more → — differentiating f(g(y))=yf(g(y)) = y uses the chain rule to obtain the inverse derivative formula
  • Mean Value TheoremMean Value Theoremc(a,b)  :  f(c)=f(b)f(a)ba\exists\, c \in (a,b)\;:\; f'(c) = \frac{f(b)-f(a)}{b-a}There exists a point where the instantaneous rate of change equals the average rate of changeRead more → — the MVT is used in the estimate f(x)f(y)f(a)(xy)εxy|f(x) - f(y) - f'(a)(x-y)| \leq \varepsilon|x-y| that makes ff a local contraction

Lean4 Proof

import Mathlib.Analysis.Calculus.InverseFunctionTheorem.Deriv

/-- Inverse Function Theorem (1D): if `f` has a non-zero strict derivative at `a`,
    then the local inverse has derivative `f'⁻¹` at `f a`.
    Wraps `HasStrictDerivAt.to_localInverse`. -/
theorem ift_1d (f :   ) (f' a : )
    (hf : HasStrictDerivAt f f' a) (hf' : f'  0) :
    HasStrictDerivAt (hf.localInverse f f' a hf') f'⁻¹ (f a) :=
  hf.to_localInverse hf'