def vct_left(b, a): from t10_1_mod import mul if len(b) != len(a): return 'invalid move' B = [] B.append(b) r = mul(B, a) return r[0]
def vct_right(a, b): from t10_1_mod import mul if len(a[0]) != len(b): return 'invalid move' B = [] for i in b: l = [] l.append(i) B.append(l) r = mul(a, B) r = [o[0] for o in r] return r
def chng_c(c1, c2, a): from t10_1_mod import el_p, mul return mul(a, el_p(c1, c2, len(a[0])))
def chng_r(r1, r2, a): from t10_1_mod import el_p, mul return mul(el_p(r1, r2, len(a)), a)