is(equal(x,y)) and infinities



Hi there,

I've been hunting through some core Maxima code to try to work out where
one could insert hooks to make simplifications etc. work sensibly with
bare objects. I noticed that MEQP, used for implementing is(equal(...)),
contains the following test (line 1000 or so of compar.lisp):

(cond
    ((or (like a b)) (not (member a indefinites)))
    ((or (member a indefinites) (member b indefinites)
         (member a infinities) (member b infinities)) nil)

    .... more tests ....
    )

INDEFINITES contains $UND and $IND, so the first bit makes sense (LIKE
is checking for syntactic equality). But the next bit seems strange to
me. It has the effect that

(%i1) is(equal(inf, inf));
(%o1)                                true
(%i2) is(equal(inf, 1+inf));
(%o2)                                false

The first happens because of the LIKE test, the second because 1+inf
isn't an atom equal to inf.

This seems really odd to me. Is there a reason we have this behaviour?

Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120602/b3f6f04e/attachment.pgp>;