I have to solve the following problem:
Does a matrix G∈GL(n,Z) exists such that G×A×G−1=B being A,B given matrices in Q?
Doing everything by hand, I finally find myself with a bunch of symbolic matrices. Now I have to check if they can lay inside GL(n,Z), i.e. if there are integer values for the variables in the matrix such that the matrix is integer, invertible and with integer inverse.
E.g.: (x0 0y) does the trick only for x=y=1.
Is there a quick method within Sage to solve that last problem?
Thanks!