I would like to allow nonreduced and non simplified unions in some answers. I have looked around and I am struggling to find a way to do this. I can see that by default, Interval context requires simplified unions, but I am trying to find a way to avoid that. I have attempted to add the line

Context()->flags->set(reduceUnions => 0);

but to no avail. I have also attempted to play around with the reduceUnionsForComparision but I also cannot get that to work. Any ideas? Here is a simple example where I would love students to be able to enter either {1,6}U{2,5} OR {1}U{2,5}U{6}

###########################

# Initialization

DOCUMENT();

loadMacros(

"PGstandard.pl",

"MathObjects.pl",

"PGML.pl",

);

TEXT(beginproblem());

##########################

# Setup

Context("Interval");

$a = Interval("{1}U(2,5)U{6}");

BEGIN_PGML

the interval [`[$a]`] is [_]{$a}

END_PGML

COMMENT('Uses PGML.');

ENDDOCUMENT();