import sys, os; sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import io, contextlib
with contextlib.redirect_stdout(io.StringIO()):
    from c4_cyclic import *
def show(x): return {k: dict(sorted(v.items())) for k, v in sorted(x.items())}
w2 = fw((0,1,0,0,0,0)); w16 = fw((1,0,0,0,0,1))
R2 = r_of(w2); R16 = r_of(w16)
print('r(m_{w2^vee}) =', show(R2))
print('r(m_{w1^vee+w6^vee}) =', show(R16))
one = {(0,0): {0: 1}}; M11 = {(1,1): {0: 1}}; M30 = {(3,0): {0: 1}}; M03 = {(0,3): {0: 1}}
print('M11^2 =', show(smul(M11, M11)))
print('M30*M03 =', show(smul(M30, M03)))
print('M30^2 =', show(smul(M30, M30)))
