Using Map instead of lists
Will turn Ax+Bx into (A+B)x