[proofplan]
We first use [Frobenius' theorem](/theorems/2453) for the involutive codimension-one distribution $\Delta_{n-1}$ to construct a local smooth output $\lambda$ whose differential annihilates exactly the distribution $\Delta_{n-1}$. The full-rank condition on $\mathcal C(x_0)$ then forces $d\lambda(\operatorname{ad}_f^{n-1}g)(x_0)\neq 0$. A commutator induction converts this annihilation condition into the relative-degree identities $L_gL_f^k\lambda=0$ for $0\leq k\leq n-2$ and $L_gL_f^{n-1}\lambda\neq 0$. Finally the relative-degree coordinates $\Phi=(\lambda,L_f\lambda,\dots,L_f^{n-1}\lambda)$ are shown to be a local diffeomorphism, and the usual input-output cancelling feedback gives the Brunovsky integrator chain.
[/proofplan]
[step:Choose a local output annihilating the involutive distribution]
For $0\leq k\leq n-1$, define the smooth vector field
\begin{align*}
A_k:U\to\mathbb{R}^n,\qquad A_k:=\operatorname{ad}_f^k g.
\end{align*}
Thus $\Delta_{n-1}(x)=\operatorname{span}\{A_0(x),\dots,A_{n-2}(x)\}$ and $\mathcal C(x)=\operatorname{span}\{A_0(x),\dots,A_{n-1}(x)\}$.
By hypothesis, after replacing $U$ by an open neighbourhood of $x_0$ if necessary, $\Delta_{n-1}$ has constant rank $n-1$ and is involutive on $U$. Frobenius' theorem for codimension-one involutive distributions (citing a result not yet in the wiki: Frobenius Theorem) gives an open neighbourhood $V_0\subset U$ of $x_0$ and a smooth submersion
\begin{align*}
\lambda:V_0\to\mathbb{R}
\end{align*}
such that
\begin{align*}
\ker d\lambda_x=\Delta_{n-1}(x)\quad\text{for every }x\in V_0.
\end{align*}
In particular,
\begin{align*}
d\lambda_x(A_j(x))=0\quad\text{for every }x\in V_0\text{ and every }0\leq j\leq n-2.
\end{align*}
Since $\dim\mathcal C(x_0)=n$, the vectors $A_0(x_0),\dots,A_{n-1}(x_0)$ form a basis of $\mathbb{R}^n$. The first $n-1$ of these vectors span $\Delta_{n-1}(x_0)=\ker d\lambda_{x_0}$, so $A_{n-1}(x_0)\notin \ker d\lambda_{x_0}$. Hence
\begin{align*}
d\lambda_{x_0}(A_{n-1}(x_0))\neq 0.
\end{align*}
By continuity, after shrinking to an open neighbourhood $V_1\subset V_0$ of $x_0$, we may assume
\begin{align*}
d\lambda_x(A_{n-1}(x))\neq 0\quad\text{for every }x\in V_1.
\end{align*}
[guided]
The geometric role of Frobenius' theorem is to turn the involutive rank-$(n-1)$ distribution into level hypersurfaces. Since $\Delta_{n-1}$ has rank $n-1$, its annihilator at each point is one-dimensional. Frobenius' theorem says that, locally near $x_0$, these hyperplanes are tangent to the level sets of a smooth submersion. Thus there are an open neighbourhood $V_0\subset U$ of $x_0$ and a smooth map
\begin{align*}
\lambda:V_0\to\mathbb{R}
\end{align*}
with $d\lambda_x\neq 0$ for every $x\in V_0$ and
\begin{align*}
\ker d\lambda_x=\Delta_{n-1}(x)\quad\text{for every }x\in V_0.
\end{align*}
Because $\Delta_{n-1}(x)$ is spanned by $A_0(x),\dots,A_{n-2}(x)$, this gives
\begin{align*}
d\lambda_x(A_j(x))=0\quad\text{for every }x\in V_0\text{ and every }0\leq j\leq n-2.
\end{align*}
Now we use the rank condition on the larger family. The condition $\dim\mathcal C(x_0)=n$ says exactly that
\begin{align*}
A_0(x_0),A_1(x_0),\dots,A_{n-1}(x_0)
\end{align*}
are linearly independent in $\mathbb{R}^n$. The first $n-1$ vectors span $\Delta_{n-1}(x_0)=\ker d\lambda_{x_0}$. Since the full list of $n$ vectors is independent, $A_{n-1}(x_0)$ cannot lie in this kernel. Therefore
\begin{align*}
d\lambda_{x_0}(A_{n-1}(x_0))\neq 0.
\end{align*}
The function $x\mapsto d\lambda_x(A_{n-1}(x))$ is smooth, hence continuous. Therefore, after shrinking $V_0$ to a smaller open neighbourhood $V_1$ of $x_0$, we have
\begin{align*}
d\lambda_x(A_{n-1}(x))\neq 0\quad\text{for every }x\in V_1.
\end{align*}
[/guided]
[/step]
[step:Convert annihilation of brackets into relative-degree identities]
For a smooth function $\varphi:V_1\to\mathbb{R}$ and a smooth vector field $X:V_1\to\mathbb{R}^n$, write
\begin{align*}
L_X\varphi(x):=d\varphi_x(X(x))
\end{align*}
for the Lie derivative of $\varphi$ along $X$.
[claim:The commutator induction gives the required vanishing pattern]
For all integers $m,k\geq 0$ with $m+k\leq n-2$,
\begin{align*}
L_{A_m}L_f^k\lambda=0\quad\text{on }V_1.
\end{align*}
For all integers $m,k\geq 0$ with $m+k=n-1$,
\begin{align*}
L_{A_m}L_f^k\lambda=(-1)^k d\lambda(A_{n-1})\quad\text{on }V_1.
\end{align*}
[/claim]
[proof]
We use induction on $k$. For $k=0$, the first assertion says $L_{A_m}\lambda=d\lambda(A_m)=0$ for $m\leq n-2$, which is exactly the annihilation of $\Delta_{n-1}$. The second assertion for $k=0$ says $L_{A_{n-1}}\lambda=d\lambda(A_{n-1})$, which follows from the definition of the Lie derivative.
Assume the two assertions have been proved for $k-1$, where $k\geq 1$. The commutator identity for Lie derivatives gives
\begin{align*}
L_{A_m}L_f\psi=L_fL_{A_m}\psi+L_{[A_m,f]}\psi
\end{align*}
for every smooth function $\psi:V_1\to\mathbb{R}$. Since $A_{m+1}=[f,A_m]$, we have $[A_m,f]=-A_{m+1}$. Applying the identity to $\psi=L_f^{k-1}\lambda$ gives
\begin{align*}
L_{A_m}L_f^k\lambda=L_f(L_{A_m}L_f^{k-1}\lambda)-L_{A_{m+1}}L_f^{k-1}\lambda.
\end{align*}
If $m+k\leq n-2$, then both $m+(k-1)\leq n-2$ and $(m+1)+(k-1)\leq n-2$. By the induction hypothesis, both terms on the right-hand side vanish on $V_1$, so
\begin{align*}
L_{A_m}L_f^k\lambda=0.
\end{align*}
If $m+k=n-1$, then $m+(k-1)=n-2$, so the first term on the right-hand side is the derivative of the zero function and vanishes. Also $(m+1)+(k-1)=n-1$, so the second induction assertion gives
\begin{align*}
L_{A_{m+1}}L_f^{k-1}\lambda=(-1)^{k-1}d\lambda(A_{n-1}).
\end{align*}
Therefore
\begin{align*}
L_{A_m}L_f^k\lambda=(-1)^k d\lambda(A_{n-1}).
\end{align*}
This proves both assertions.
[/proof]
Taking $m=0$ in the claim gives
\begin{align*}
L_gL_f^k\lambda=0\quad\text{on }V_1\text{ for }0\leq k\leq n-2
\end{align*}
and
\begin{align*}
L_gL_f^{n-1}\lambda=(-1)^{n-1}d\lambda(A_{n-1})\neq 0\quad\text{on }V_1.
\end{align*}
Thus $\lambda$ has relative degree $n$ on $V_1$.
[/step]
[step:Show that the relative-degree coordinates form a local diffeomorphism]
Define the smooth map
\begin{align*}
\Phi:V_1\to\mathbb{R}^n,\qquad \Phi(x):=(\lambda(x),L_f\lambda(x),\dots,L_f^{n-1}\lambda(x)).
\end{align*}
For $1\leq i\leq n$, define the component function
\begin{align*}
z_i:V_1\to\mathbb{R},\qquad z_i(x):=L_f^{i-1}\lambda(x).
\end{align*}
We prove that $d z_1,\dots,d z_n$ are linearly independent at $x_0$.
Evaluate the covectors $d z_i$ on the ordered vector fields
\begin{align*}
A_{n-1},A_{n-2},\dots,A_0.
\end{align*}
The claim from the preceding step says that, whenever $(i-1)+j\leq n-2$,
\begin{align*}
d z_i(A_j)=L_{A_j}L_f^{i-1}\lambda=0.
\end{align*}
It also says that, whenever $(i-1)+j=n-1$,
\begin{align*}
d z_i(A_j)=(-1)^{i-1}d\lambda(A_{n-1}).
\end{align*}
Therefore the matrix whose $(i,\ell)$ entry is $d z_i(A_{n-\ell})$ is triangular, and its diagonal entries are all equal to $\pm d\lambda(A_{n-1})$. At $x_0$ these diagonal entries are nonzero. Hence
\begin{align*}
d z_1\wedge d z_2\wedge\cdots\wedge d z_n\neq 0\quad\text{at }x_0.
\end{align*}
Thus $d\Phi_{x_0}:\mathbb{R}^n\to\mathbb{R}^n$ is invertible. By the [inverse function theorem](/theorems/51), after shrinking to an open neighbourhood $V\subset V_1$ of $x_0$, the map $\Phi:V\to\Phi(V)$ is a diffeomorphism.
[/step]
[step:Apply the cancelling feedback to obtain the chain of integrators]
Define the smooth functions
\begin{align*}
\alpha:V\to\mathbb{R},\qquad \alpha(x):=L_f^n\lambda(x)
\end{align*}
and
\begin{align*}
\beta:V\to\mathbb{R},\qquad \beta(x):=L_gL_f^{n-1}\lambda(x).
\end{align*}
From the preceding relative-degree computation, $\beta(x)\neq 0$ for every $x\in V$. Define the smooth static feedback transformation
\begin{align*}
\kappa:V\times\mathbb{R}\to\mathbb{R},\qquad \kappa(x,v):=\frac{v-\alpha(x)}{\beta(x)}.
\end{align*}
Set $u=\kappa(x,v)$.
For $1\leq i\leq n-1$, differentiating $z_i=L_f^{i-1}\lambda$ along the controlled vector field $f+gu$ gives
\begin{align*}
\dot z_i=L_f^i\lambda+uL_gL_f^{i-1}\lambda.
\end{align*}
Since $i-1\leq n-2$, the relative-degree identities give $L_gL_f^{i-1}\lambda=0$, and therefore
\begin{align*}
\dot z_i=L_f^i\lambda=z_{i+1}.
\end{align*}
For the last coordinate,
\begin{align*}
\dot z_n=L_f^n\lambda+uL_gL_f^{n-1}\lambda=\alpha+\frac{v-\alpha}{\beta}\beta=v.
\end{align*}
Thus, in the coordinates $z=\Phi(x)$ and under the feedback $u=\kappa(x,v)$, the system is
\begin{align*}
\dot z_1=z_2,\qquad \dot z_2=z_3,\qquad \dots,\qquad \dot z_{n-1}=z_n,\qquad \dot z_n=v.
\end{align*}
This is the controllable chain of $n$ integrators, so the original system is locally static state-feedback linearisable near $x_0$.
[/step]