Tell maxima k is not an integer?



To underline RJF's warning

>     Richard> Do not be fooled into thinking this method is
>     Richard> more comprehensive than it really is.


Here are some examples:

   declare([i1,i2],integer)$
   declare([n1,n2],noninteger)$

Works OK for very simple cases:

   featurep(i1+i2,integer) -> true
   featurep(i1*i2+3,integer) -> true, ditto

But only very simple cases:

   featurep(i1+n1,noninteger) -> false
   featurep(n1/2,noninteger) -> false
   featurep(i1/2+i2/2,integer) -> false
   featurep(abs(i1),integer) -> false

And certainly not for "hard" cases involving assume (they don't know about
each other at all):

   assume(equal(two,2))$
   featurep(two,integer) -> false
   declare(xx,integer)$
   assume(xx>1, xx<3)$
   is(equal(xx,2)) -> doesn't know

and others:

   featurep(floor(qqq),integer) -> false  This should be fixable

One obvious question is: why don't we integrate them?  Well, one reason not
to is that assume has a whole context system which feature does not.

Remember, feature is really only a way of tagging symbols; its extension to
expressions is pretty much a hack.

            -s