implementing algebraic manipulations of operators