the result is not trivial: i'll take to be the ground field. let be the minimal polynomials of we have because the minimal and characteristic polynomials of are equal.
now for every define see that is an ideal of and thus, since is a PID, is principal, i.e. for some
on the other hand, clearly and so but the number of divisors of is finite, which means the number of distinct elements of the set is finite. let
be those distinct elements and put it is clear that each is a subspace of and therefore for some thus for all
i.e. . that implies by the minimality of and so because we already know that and is monic.
finally, suppose that for some let then , i.e. therefore
which is not possible unless because so we must have for all
Remark 1. second solution: very briefly, give the structure of an module by defining the multiplication by then see that is a finitely generated torsion module and
thus, since is a PID, we can apply the fundamental theorem for finitely generated modules over PIDs to get some such that now it's easy to show that the set
is linearly independent over
Remark 2. the statement in the problem is actually an "if and only if" statement.