First time here? Check out the FAQ!
answered 2024-03-20 19:32:46 +0100
Here a possible approach via an algebra over the free group:
F.<yy> = FreeGroup() A = F.algebra(QQ) y = A(yy) yinv = A(yy^-1) print( y*(y+1)*yinv )