I am trying to find the Smith normal form of matrix over $ \mathbb{R} [ X ]$ of the 4x4 matrix
$$M =\begin{pmatrix} 2X-1 & X & X-1 & 1\\ X & 0 & 1 & 0 \\ 0 & 1 & X & X\\ 1 & X^2 & 0 & 2X-2 \end{pmatrix}$$
I know of two methods for computing the smith normal form of a matrix:
1) Using the algorithm
2) Computing the Fitting Ideals
The first process looks horrible and cumbersome for such a matrix- maybe it all cancels nicely but I have tried and it doesn't appear clean.
The second looks like it might work if the matix behaves 'nicely'- for example it isn't hard to see that $\mathrm{Fit}_1 (M)= \mathrm{Fit}_2 (M)= (1) $ so we have the first two diagonal elements as 1. However computing the 3x3 sub determinants seems really lengthy and can't see any nice terms like 1 coming out. I could compute the whole 4x4, but again, this seems lengthy and then I'd hope it to not have many factors so I can 'deduce' the 3rd diagonal element, but this seems too hopeful.
Is there some property of the ring/ overall technique I'm missing?
Any help would be appreciated
I don't think using row and column operations is so bad if you have a computer, at least. (Assuming I didn't make a mistake, of course.) I computed the Smith normal form using Sage using the following code:
In the end, I get $$ \left(\begin{array}{rrrr} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & x^{5} - 2 x^{4} - 3 x^{3} + 9 x^{2} - 8 x + 1 \end{array}\right) \, . $$
You can try the code yourself online using the SageMathCell.