Am Mittwoch, den 30.09.2009, 07:42 +0100 schrieb Leo Butler:
>
> This exact bug has been reported:
>
> http://www.math.utexas.edu/pipermail/maxima/2009/017646.html
>
> Perhaps Dieter could comment.
I have suggested an extension to include facts like %i or %pi is a
noninteger on the assumption that we do not change the implemented
behavior of declare and featurep.
Now a symbol declared to be an integer is a real and complex too (This
is a bit strange from a mathematically viewpoint). If we implemented a
fact like %pi is a noninteger, we can not declare it at the same time as
a real. The assume database will enter an endless loop. Therefore I have
changed the routine nonintegerp to get the behavior that real and
complex symbols are a noninteger too. This was necessary to avoid
endless loops in the assume database.
I have posted a table which shows the actual behavior of featurep and
declare:
http://www.math.utexas.edu/pipermail/maxima/2009/016938.html
The discussion on this list which followed shows to me that we have
different viewpoints what declare and featurep should do.
The first viewpoint is, that declare and featurep should work more
mathematically, e.g. a real can contain an integer. Something like this
is implemented, but in a different manner as one would expect from the
mathematical side.
Another viewpoint is, that featurep gives an answer what a symbol is
declared to be.
Because of the discussions on this list I hesitated to commit the code I
have suggested.
At the end I think it is the best to cut out the inferences between the
different declarations.
Remark: I have tried to implement declare and featurep in the other way
too. That is a real can contain an integer, but an integer can not
contain a real. I have got a lot of problems with the assume database. I
think such an implementation will not work with the current database.
So I think we have to possibilities:
1.
Do a change to nonintegerp without changing the current behavior of
featurep and declare. It is possible to do declarations like declare(%
i,imaginary) or declare(%pi,real) and both symbols are a noninteger at
the same time.
2.
Cut out the inferences between the different declarations. Then a symbol
can declared to be a real and a noninteger at the same time.
Dieter Kaiser