simplify triple product