compute the difference between pairs of ideals