Is %i an integer? - Adding more facts to the database



On 6/28/09, Dieter Kaiser <drdieterkaiser at web.de> wrote:

> I have added the following facts to the database:
>
>    (kind $%i $imaginary)
>    (kind $%pi $real)
>    (kind $%gamma $real)
>    (kind $%phi $real)

OK by me. But in addition perhaps %pi, %gamma, and %phi
should be declared irrational. (Or maybe transcendental for
%pi and %gamma, but I don't remember if featurep and kindp
handle that correctly.)

> Next I have improved the function NONINTEGERP.
>
> ;	  ((atom e) (kindp e '$noninteger))
>           ((atom e) (or (kindp e '$noninteger)
>                         (kindp e '$rational)
>                         (kindp e '$real)
>                         (kindp e '$complex)))

I don't think this is right. NONINTEGERP should return T when
E is demonstrably noninteger. Some rationals, reals, and
complex numbers are integers, right? So it can't use those
declarations to determine noninteger-ness.

I think testing for noninteger, irrational, imaginary, and
transcendental would be OK.

Thanks for working on this problem. I think handling declarations
correctly is very important.

best

Robert Dodier