`OneOf`

MathObject available from the `parserOneOf.pl`

file (see its documentation for details). For example:
loadMacros( "PGML.pl", "parerOneOf.pl", ); BEGIN_PGML Your answer is: [__________]{OneOf("x+1","x-1")} END_PGMLwould allow the student to answer either x+1 or x-1 (or 1+x, or -(1-x), or anything equivalent to one of those).

On the other hand, I've just posted an answer to another question that includes a context for permutations, in in that context, both of your answers would be marked correct automatically. So you might be better off using that context directly.

In your can, you might also need to accept "(312)", "(231)", "(312)(4)", "(231)(4)", "(4)(123)", etc., unless you are forcing the students to enter the permutation in a canonical form. The context that I created allows you some control over whether the student must use disjoint cycles, or use the canonical form.