DeRhamComputation/sage/drafty/draft2.sage

5 lines
202 B
Python

F = GF(2)
A = matrix(F, [[1, 1, 1], [0, 0, 1], [0, 1, 0]])
B = matrix(F, [[0, 0, 1], [1, 1, 1], [1, 0, 0]])
print(A^2 == identity_matrix(3), B^2 == identity_matrix(3), A*B == B*A)
print(magmathis(A, B))