I need to find the Smith Canonical Matrix Equivalent to the characteristic matrix of $ J=\mathrm{diag}[J_{2}(1), 1, -1] $
where $ J= \pmatrix{ 1 & 0 & 0 & 0\\ 1 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & -1\\ } $
I am using the textbook " Matrices and Linear Transformations" by Cullen.
The characteristic matrix is:
$ xI-J= \pmatrix{ x-1 & 0 & 0 & 0\\ -1 & x-1 & 0 & 0\\ 0 & 0 & x-1 & 0\\ 0 & 0 & 0 & x+1\\ } $
The book has thereom 6.13 which says
For every $A(x) \in F[x]_{nxn} $is equivalent to a unique matrix: $S(x)=\mathrm{diag}[f_{1}(x), \dots, f_{r}(x), 0]$ where
$f_{t}(x)=\frac{d_{t}(x)}{d_{t-1}(x)}=\frac{\gcd( t \times t \text{ subdeterminants of } A(x) )}{\gcd((t-1) \times (t-1) \text{ subdeterminants of }A(x)) } $
These are the answers I got: \begin{align*} f_{1}(x) & =1, \\ f_{2}(x) & =(x-1), \\ f_{3}(x) & =(x-1), \\ f_{4}(x) & =(x-1)^{2}(x+1). \end{align*} The textbook says that $f_{2}=1$
I need to know where I am going wrong.