integer -> (rational|irrational) -> real inferences commented out in compar.lisp since 2009

David Scherfgen via Maxima-discuss <[email protected]> Mon, 1 Jun 2026 16:20:05 +0200
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <CAMTHLKg--Vu3RPy3c69ZpdX7MkM0DTyKLCPS2OLQ1hgxWog5Dg@mail.gmail.com>
Dear all,

If you look at the file compar.lisp, near the very bottom, there's this:

; Cutting out inferences for integer, rational, real, complex (DK 10/2009).
;  (kind $integer $rational)
;  (par ($rational $irrational) $real)
;  (par ($real $imaginary) $complex)

While the last one is definitely wrong (real and imaginary do *not*
partition the complex numbers!), I'm wondering why the other two lines are
commented out. Unfortunately, the comment doesn't tell.

When I put the first two inferences back in, the test suite finishes
without errors.

It's these missing inferences that require us to do this:

(defun decl-realp (e)
  (and (symbolp e)
       (or (kindp e '$real)
           (kindp e '$rational)
           (kindp e '$irrational)
           (kindp e '$integer))))

With the inferences back in place, only (kindp e '$real) is required.

Also, these missing inferences currently allow us to declare a symbol both
integer and irrational, among others.

Does anyone know why the correct inferences were commented out in 2009?
Should we add them back in? Unless it's somehow broken, I'd say yes. It
would make code at other places simpler and possibly fix some bugs that we
didn't even know about.

Best regards
David Scherfgen

_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss