[step:Prove the feedback-cyclic-vector lemma]We prove the following finite-dimensional lemma. If $(A,B)$ is controllable and $0\ne b\in \operatorname{im}B$, then there exists $F\in\mathbb R^{m\times n}$ such that the single-input pair $(A+BF,b)$ is controllable.
First note that controllability of a pair is invariant under state feedback. If $(M,B)$ is controllable and $G\in\mathbb R^{m\times n}$, then $(M+BG,B)$ is controllable. Indeed, every vector $(M+BG)^kBu$ lies in the span of vectors $M^jBw$, by induction on $k$. Conversely, since $M=(M+BG)+B(-G)$, the same argument with $-G$ expresses each $M^kBu$ in the reachable span of $(M+BG,B)$. Thus the two reachable spans are equal.
We now construct the feedback by induction. Set
\begin{align*}
F_0:=0,\qquad A_0:=A.
\end{align*}
At stage $j$, assume $(A_j,B)$ is controllable and $A_j=A+BF_j$. Let
\begin{align*}
V_j:=\operatorname{span}\{b,A_jb,A_j^2b,\dots\}.
\end{align*}
This subspace is $A_j$-invariant. If $V_j=\mathbb R^n$, then $(A_j,b)$ is controllable and $F:=F_j$ proves the lemma.
Suppose $V_j\ne\mathbb R^n$. If $\operatorname{im}B\subset V_j$, then $A_j$-invariance of $V_j$ would imply $A_j^kBu\in V_j$ for every $k\geq 0$ and every $u\in\mathbb R^m$, contradicting controllability of $(A_j,B)$. Hence choose $u_j\in\mathbb R^m$ such that
\begin{align*}
Bu_j\notin V_j.
\end{align*}
Let $r_j:=\dim V_j$. The vectors $b,A_jb,\dots,A_j^{r_j-1}b$ form a basis of $V_j$: if a first linear dependence occurred earlier, $V_j$ would be spanned by fewer than $r_j$ Krylov vectors, contradicting $r_j=\dim V_j$. Choose a linear functional $\ell_j:\mathbb R^n\to\mathbb R$ such that $\ell_j(A_j^{r_j-1}b)=1$ and $\ell_j(A_j^ib)=0$ for $0\leq i\leq r_j-2$. Define $G_j:\mathbb R^n\to\mathbb R^m$ by
\begin{align*}
G_jx:=\ell_j(x)u_j.
\end{align*}
Set
\begin{align*}
F_{j+1}:=F_j+G_j,\qquad A_{j+1}:=A+BF_{j+1}=A_j+BG_j.
\end{align*}
For $0\leq i\leq r_j-2$, we have $G_jA_j^ib=0$, so the first $r_j$ cyclic vectors are unchanged:
\begin{align*}
A_{j+1}^ib=A_j^ib
\end{align*}
for $0\leq i\leq r_j-1$. The next cyclic vector satisfies
\begin{align*}
A_{j+1}^{r_j}b=A_j^{r_j}b+Bu_j.
\end{align*}
Here $A_j^{r_j}b\in V_j$ because $V_j$ is $A_j$-invariant, while $Bu_j\notin V_j$. Therefore $A_{j+1}^{r_j}b\notin V_j$, and the cyclic subspace generated by $b$ under $A_{j+1}$ has dimension at least $r_j+1$. By state-feedback invariance, $(A_{j+1},B)$ is controllable, so the induction hypotheses hold at the next stage.
The dimension of $V_j$ strictly increases whenever it is not yet $n$. Hence after at most $n-1$ enlargement steps, some $V_j$ is all of $\mathbb R^n$. For that $j$, $(A+BF_j,b)$ is controllable.[/step]