added simple matrix simplification rules