Open DaveWitteMorris opened 4 years ago
I'm no expert, but my guess is that pynac (or somebody else) knows that the left side of the assumption is 0, and decides to be helpful by simplifying it to 0. Thus, maxima receives the assumption 0 == 0
, and quite reasonably rejects this as being redundant.
sage: var('m');
sage: assume(m, 'integer')
sage: cos((4*pi*m+pi)/2)
0
Suggestions for how to fix this? If my diagnosis is correct, I think pynac (or whoever) should be prevented from messing up assumptions before they are passed to maxima.
Changed keywords from maxima to maxima, assume
I now see that my previous comment largely states the obvious; since assume
is a function, the evaluation of assume(statement)
entails evaluating statement
, and then calling assume
on the result. I think the bug is that the evaluation of statement
is done by a different backend than the one that needs statement
.
Can this be fixed somehow? If not, and there is no harm in surrounding assumptions with with hold
, perhaps this workaround should be suggested in the documentation.
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
Another problem is that sagemath (following maxima) is giving the wrong value for the limit. The correct answer is 4*m + 1
, not 0
. A ticket to fix this is at #34140.
As reported in #29608, maxima sometimes asks for additional information, but then reports that the information is redundant when an attempt is made to provide the appropriate assumption. The problem seems to go away if the assumption is put inside a
with hold
clause.Component: symbolics
Keywords: maxima, assume
Issue created by migration from https://trac.sagemath.org/ticket/29616