I am unable to change the list_type to be "a sequence" rather than "an interval, set, or union". This means that if students enters something like "x" or "1, 2, 3", rather than "{1, 2, 3}", they are given confusing error messages:

Your answer isn't an interval, set or union

I would want this to sayYour answer isn't a sequence

I believe I am passing the appropriate parameters to the cmp call, so I have begun to wonder if there is a typo somewhere in the parser for the Set object. My MWE is short, so I'll just paste it here rather than attach itDOCUMENT();

loadMacros(

"PGstandard.pl",

"MathObjects.pl",

);

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

Context("Numeric");

Context()->parens->set('{'=>{type=>Set});

$answer = Set(1,2,3);

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

Context()->texStrings;

BEGIN_TEXT

Enter the sequence \($LBRACE 1, 2, 3$RBRACE\).$PAR

\{ans_rule(10)\}

END_TEXT

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

ANS($answer->cmp(list_type=>"a sequence",ordered=>1));

ENDDOCUMENT();

Second question, related to this problem: is there a relatively straightforward way to implement an ellipsis as part of the answer to a question like this? I tried removing . as an operator and making ... a String in the context, but then I was unable to form a list of mixed type, e.g. {1, 2, 3, ...} has Reals and a String. I tried making ... into a Real constant, but ... is an illegal name for a constant.loadMacros(

"PGstandard.pl",

"MathObjects.pl",

);

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

Context("Numeric");

Context()->parens->set('{'=>{type=>Set});

$answer = Set(1,2,3);

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

Context()->texStrings;

BEGIN_TEXT

Enter the sequence \($LBRACE 1, 2, 3$RBRACE\).$PAR

\{ans_rule(10)\}

END_TEXT

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

ANS($answer->cmp(list_type=>"a sequence",ordered=>1));

ENDDOCUMENT();