Solution (source code)

= Solution

The <structure theorem for finitely generated modules over a principal ideal domain> applies in particular to a <Euclidean domain> $R$: every <finitely generated module> has an <isomorphism>
$$
M\cong R^r\oplus R/(d_1)\oplus\cdots\oplus R/(d_k),\qquad d_1\mid d_2\mid\cdots\mid d_k,
$$
with each $d_i$ nonzero and a nonunit. The <rank of a free module> $r$ and the <invariant factors of a finitely generated module> $d_i$ are unique up to multiplication by units; empty sums are allowed. This is the classification theorem being used, without a proof of that theorem.

The <rational canonical form> theorem states that for a <linear operator> $T$ on a finite-dimensional <vector space> over any <field> $F$, there are unique monic nonconstant <polynomials> $p_1\mid\cdots\mid p_k$ such that some <basis> gives
$$
\boxed{[T]=\operatorname{diag}(C(p_1),\ldots,C(p_k))}.
$$
Here, for $p(t)=t^d+a_{d-1}t^{d-1}+\cdots+a_0$, the <companion matrix> has ones on its subdiagonal and last column $(-a_0,\ldots,-a_{d-1})^T$. The empty matrix covers a zero-dimensional space. Two <linear operators> have <matrix similarity> exactly when they have the same <invariant factors of a linear operator>.

For the proof, make $V$ an $F[t]$-<module> by $t\cdot v=T(v)$. It is a <finitely generated module>, since a vector-space <basis> also generates it as a <module>. It is a <torsion module>: the powers of $T$ have <linear dependence> in the finite-dimensional space $\operatorname{End}_F(V)$, so some nonzero <polynomial> annihilates every vector. Because $F[t]$ is a <Euclidean domain>, the classification theorem gives
$$
V\cong\bigoplus_{i=1}^kF[t]/(p_i),\qquad p_1\mid\cdots\mid p_k.
$$
There is no free summand, since a nonzero <free module> over $F[t]$ is not a <torsion module>. Choose monic generators of the ideals. On $F[t]/(p_i)$, the classes of $1,t,\ldots,t^{d_i-1}$ form an $F$-<basis> by <polynomial division>. Multiplication by $t$ is exactly $C(p_i)$ in that <basis>, proving existence. Uniqueness in the classification theorem proves uniqueness of the <rational canonical form>. Finally, an $F[t]$-<module isomorphism> is precisely an invertible $F$-<linear map> intertwining the operators, establishing the assertion about <matrix similarity>. In particular the <characteristic polynomial> is $\prod_i p_i$ and the <minimal polynomial> is $p_k$ for nonzero $V$.