Run SmithDecomposition on a matrix including variables

I try to do the following but failed:

In[699]:= {{-1, 0, 0, -(1/4) + 2 x}, {-1, 1, 1, 1/4 + x - z}, {0, -1, 
   0, 1/4 + y + z}, {0, 0, 0, 1}} // SmithDecomposition

During evaluation of In[699]:= SmithDecomposition::latm: Matrix contains an entry that is not rational.

Out[699]= SmithDecomposition[{{-1, 0, 0, -(1/4) + 2 x}, {-1, 1, 1, 
   1/4 + x - z}, {0, -1, 0, 1/4 + y + z}, {0, 0, 0, 1}}]

How can I run SmithDecomposition command by limiting the above variables in rational field?

Regards,
Zhao

There is ResourceFunction["PolynomialSmithDecomposition"] that might do what you want. Check the reference page for details.

As its title indicted: Compute the Smith decomposition of a matrix of univariate polynomials, it only supports univariate polynomials, and my case involves a system of multivariate first-order polynomial equations.

I believe you’d first have to define the Smith decomposition for that ring.

I looked at the examples provided in its documentation, but for my multivariable problem, there is still no solution/idea/clue.

The Smith decomposition is defined over Euclidean domains such as the integers, or univariate polynomials over a field. Q[x,z] is not a Euclidean domain.

Are you saying that my problem itself is not covered by this method?

Correct. There is no Smith decompostion defined for your matrix.