%run sympowers.py
A=Matrix(2,2,[1,2,x,y])
A
for n in range(1,6):
B=SymPower(A,n)
display(B,trace(B),expand(trace(A**n)))
st=SymmTraces(A,6);pt=PowerTraces(A,6)
for i in range(6):
display([st[i],pt[i]])
B=Matrix(2,2,[y,x,2,1])
C=A*B-B*A
A,B,C
GAM(A,4),GAM(B,4),GAM(C,4),simplify(GAM(A,4)*GAM(B,4)-GAM(B,4)*GAM(A,4)-GAM(C,4))