assumption for integer?



> how do I enter the assumption that some variable, say M, is an integer?

declare(m,integer)

Now, for example, sin(m*%pi) simplifies to 0 and (-1)^(2*m) simplifies to 1.

To test whether something is declared an integer, use
featurep(m,integer)=>true.  Featurep also works on expressions:
featurep(m^2+1,integer)=>true.

Integerp (as opposed to featurep) tests whether its argument is
*literally* an integer, not whether it can take only integer values:
integerp(m) => false.  This is also true of such functions as evenp:
evenp(m*2)=>false.

The Assume system and the Declare/Featurep system are not well
integrated; in particular, the Context system that is used by Assume
does not apply to declarations.

            -s

PS Yes, this could all be much cleaner, but that's the way it is today....