This question is rather similar in spirit to my previous question in that it's about figuring out how to "correctly" manipulate matrices of polynomials, ensuring that everything stays in the right rings.
In this case, I have a matrix, all of whose elements are of the form Univariate Laurent Polynomial Ring in t over Integer Ring
. The matrix has an inverse over this ring, yet sage insists that the entries of the inverse belong to Fraction Field of Univariate Polynomial Ring in t over Integer Ring
. Here's a minimal example:
sage: R.<t> = LaurentPolynomialRing(ZZ)
sage: f = t^2
sage: mat = matrix([[f]])
sage: mat[0,0].parent()
Univariate Laurent Polynomial Ring in t over Integer Ring
sage: mat.inverse()
[1/t^2]
sage: mat.inverse()[0,0].parent()
Fraction Field of Univariate Polynomial Ring in t over Integer Ring
Desired output:
sage: mat.inverse()
[t^-2]
sage: mat.inverse()[0,0].parent()
Univariate Laurent Polynomial Ring in t over Integer Ring
What would have been the correct way to obtain what I want?