The specific case I present here is much less important than the general question. I have two matrices: $$ p = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & -\frac{1}{2} \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 \end{pmatrix} $$
$$ q = \begin{pmatrix} 1 & -1 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}$$ and I would like to show that the group generated by them is (I think) not free. i.e. I would like to find some non-trivial identity satisfied by the two matrices. Is there a program that can help me search for such non-trivial identities? Is there a way to do it in Sage? (I'm afraid I'm very new to sage, so don't know much about it).
Ideally there would be some general way of dealing with this for general matrices. At the moment I don't have a better technique than simple trial and error.
EDIT:
I have gotten sage to run:
from sage.groups.free_group import is_FreeGroup
p = matrix(QQ, [[1, 0, 0, 0], [0, 1, 1, -1/2], [0, 0, 1, 1], [0, 0, 0, 1]])
q = matrix(QQ, [[1, -1, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]])
G = MatrixGroup([p, q])
is_FreeGroup(G)
Which returns False. But I don't know how to have it tell me which non-trivial relation the generators satisfy. Is there a way to tell me which group it is isomorphic to? (I have a hunch it is isomorphic to the Heisenberg group: 3x3 upper triangular matrices with 1 on the diagonal)