## Compute the invariant factors and elementary divisors of a given module

Suppose the vector space $V$ is the direct sum of cyclic $F[x]$-modules whose annihilators are $(x+1)^2$, $(x-1)(x^2+1)^2$, $x^4-1$, and $(x+1)(x^2-1)$. Determine the invariant factors and elementary divisors of $V$.

We have $V \cong F[x]/((x+1)^2) \oplus F[x]/((x-1)(x^2+1)^2) \oplus F[x]/(x^4-1) \oplus F[x]/((x+1)(x^2-1))$. If $x^2+1$ is irreducible over $F$, then by the Chinese Remainder Theorem for modules (see here and here), we have $V \cong F[x]/((x+1)^2) \oplus F[x]/(x-1)$ $\oplus F[x]/((x^2+1)^2) \oplus F[x]/(x+1)$ $\oplus F[x]/(x-1) \oplus F[x]/(x^2+1)$ $\oplus F[x]/((x+1)^2) \oplus F[x]/(x-1)$.

The elementary divisors of $V$ are thus $(x^2+1)^2$, $x^2+1$, $(x+1)^2$, $(x+1)^2$, $x+1$, $x-1$, $x-1$, and $x-1$.

The invariant factors of $V$ are $(x^2+1)^2(x+1)^2(x-1)$, $(x^2+1)(x+1)^2(x-1)$, and $(x+1)(x-1)$.

If $x^2+1$ is reducible over $F$, then is has a root $\alpha$, and indeed $x^2+1 = (x+\alpha)(x-\alpha)$. Now by the Chinese Remainder Theorem for modules we have $V \cong F[x]/((x+1)^2) \oplus F[x]/(x-1)$ $\oplus F[x]/((x+\alpha)^2) \oplus F[x]/((x-\alpha)^2) \oplus F[x]/(x+1)$ $\oplus F[x]/(x-1) \oplus F[x]/(x+\alpha) \oplus F[x]/(x-\alpha)$ $\oplus F[x]/((x+1)^2) \oplus F[x]/(x-1)$.

So the elementary divisors of $V$ are $(x-\alpha)^2$, $x-\alpha$, $(x+\alpha)^2$, $x+\alpha$, $(x+1)^2$, $(x+1)^2$, $x+1$, $x-1$, $x-1$, and $x-1$.

The invariant factors of $V$ are $(x-\alpha)^2(x+\alpha)^2(x+1)^2(x-1)$, $(x-\alpha)(x+\alpha)(x+1)^2(x-1)$, and $(x+1)(x-1)$. (Which are the same as if $F$ did not contain $\alpha$. This is to be expected in light of Corollary 18 on page 477 of D&F.)

You need to consider characteristic 2, then $( x+1)$ factors to $(x+i)^2$
All that matters here is how the polynomials factor over $F$.