I can not find the proof of the following theorem:
If $A$ is a $n \times n$ matrix, $e_1(x),e_2(x),...e_n(x)$ its invariant factors and $F_1, F_2,...,F_k$ their companion matrices then $A$ is similar to $diag(F_1,F_2,...,F_k)$.
So far I know that two matrices are similar if their eigenmatrices have the same Smith normal forms. I also know that the Smith normal form of a companion matrix of a polynomial $p(x)$ is $diag(1,1,...,1,p(x))$, but I can not seem to deduce anything from that.
Given the comments in the discussion, it suffices to find the smith normal form of $\operatorname{diag}(F_1,\dots,F_k)$. From your question, we know that there exist invertible matrix polynomials $U_j(x),V_j(x)$ such that $$ U_j(x)(xI - F_j)V_j(x) = S_j(x) = \operatorname{diag}(1,\dots,1,e_j(x)). $$ Now, define $U(x) = \operatorname{diag}(U_1(x),\dots,U_k(x))$ and $V(x) = \operatorname{diag}(V_1(x),\dots,V_k(x))$. We have $$ U(x) (xI - \operatorname{diag}(F_1,\dots,F_k))V(x) = \operatorname{diag}(S_1(x),\dots,S_k(x)), $$ which is almost in Smith normal form. By selecting a suitable permutation matrix $P$, we can permute the diagonal elements to obtain $$ P\operatorname{diag}(S_1(x),\dots,S_k(x))P^T = \operatorname{diag}(1,\dots,1,e_1(x),\dots,e_k(x)). $$ So indeed, $\operatorname{diag}(F_1,\dots,F_k)$ has the same Smith normal form as $A$.