I am trying to perform a certain computation in group theory. I start with a finitely presented group G, and I compute its Alexander matrix using the built-in method. This gives me a matrix over a multivariate Laurent polynomial ring with generators f4 and f5; I then apply a homomorphism "bar" which sends each of these to the generator t of a univariate Laurent polynomial ring.
F.<a,b,c,x,y> = FreeGroup()
G = F/[ac(ca)^-1,ax(xa)^-1,yc(cy)^-1,xyx(yxy)^-1,bay(yba)^-1,(abay)(ybab)^-1,cbx(xcb)^-1,bcbx(xcbc)^-1]
M = G.abelian_alexander_matrix()[0]
R.<t> = LaurentPolynomialRing(QQ)
bar = M.base_ring().hom([t,t])
Mbar = matrix([[bar(x) for x in m] for m in M])
(Apologies, I couldn't find information on how to mark this up as code.)
The baffling thing to me is that bar seems to be malfunctioning. For instance, the (0,0) entry of M is 1-f4, but the (0,0) entry of Mbar is t^-1 - 1. Pretty much the entirety of M/Mbar is like this: it seems like the entries in Mbar are correct only up to multiplication by some power of t, which is not uniform across Mbar. If I directly ask bar to evaluate 1-f4, it correctly returns 1-t.
Does anybody know what's going on, and how to fix it? Thanks!