batch( * , test) and sets



On 9/15/08, John Lapeyre <pdl at johnlapeyre.com> wrote:

>  (%i1) batch("testsets.mac",test);
>
>  ********************** Problem 1 ***************
>  Input:
>  {1,2,3}
>
>  Result:
>  {1,2,3}
>
>  This differed from the expected result:
>  {1,2,3}

Sets are represented internally as set(1, 2, 3). The conversion from the
so-called matchfix notation {1, 2, 3} to set(1, 2, 3) happens in evaluation,
but the expected results in a test script are not evaluated.
So the comparison is between two expressions with different operators.

The code to translate {} to set() can be executed by the parser, so that
it happens before evaluation or simplification. Other operators are handled
that way so it makes sense that {} should be also. I'll take a look at that.

Thanks for pointing out this problem.

Robert Dodier