Interval_cmp() does not have a way to do what you ask, but the MathObjects Interval object does this by default. If you use

loadMacros("MathObjects.pl");
Context("Interval");
$I = Union("[1,7) U (3,10)");
ANS($I->cmp);

you will get an interval answer checker that requires the student to simplify the interval. You will need a relatively recent version of PG for this (otherwise, use Parser.pl rather than MathObjects.pl).

There is no built-in notation for intersections as there is for union (though it would be possible to add one), but you can compute them in the problem code as follows:

loadMacros("MathObjects.pl";
Context("Interval");
$I1 = Interval("[1,5]");
$I2 = Interval("(2,6]");
$I3 = $I1->intersect($I2);
ANS($I3->cmp);

There are, of course variations on this, like

ANS($I1->intersect($I2)->cmp);

or

$I3 = Interval("[1,5]")->intersect("(2,6]");

but you should get the idea. You can also use subtraction on intervals to perform set differences, and can use braces to indicate finite point sets. E.g., {3,5} is the set containing the numbes 3 and 5. So [3,5] - (3,5) = {3,5}. The interval (-inf,inf) is available as R for convenience in the Interval context.

There is also a relatively new MathObject class for inequalities like x < 5 or 2 <= x < 5 as an alternative notation for entering intervals. See pg/macros/contextInequalities.pl for details. You will definitely need a current copy of PG for that, since it was only added in the fall.

Hope that helps

Davide