You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we run n=var('n') a=0^n b=a.simplify_full() (a({n:0}),b({n:0}))
we get (1,0) as a result
Expected Behavior
I would expect that simplify_full applied at 0^n would not convert it to 0, since most (all?) mathematical formulas on non-negative integers are more compatible with 0^0=1 (as currently implemented, see the above-evaluation of a({n:0})).
I currently think that simplifications should preserve the form 0^n.
Actual Behavior
even with assumptions like assume(n, 'integer') assume(n>=0) or even assume(n==0), the simplification of 0^n yields to 0.
Additional Information
This is a more general issue than #36838 where we (yet) replaced 0^n by kronecker_delta(0, n).
Note that such basic replacement assumes n to be a non-negative integer.
I worked on this, and found that the problem is with the maxima function, the function simplify_full() is calling maxima many times and when it is called for first time 0^n is resolved to 0 as you can see in below output.
We had a same probelm with maxima function which can be found from the discussion in #36841. Where we had a problem that maxima function is simplifying conjugate(y) to y where y's domain is not defined. Here, I think this is also a problem with maxima function although we have defined the domain but here it is simplifying (0^n) to 0, no matter whatever the domain is. I think maxima does not have a condition to handle (0^n), I might be wrong but this was my observation.
I found another discussion based on this link .
So, I think this can be resolved only when maxima will change these things or sage implement its own system instead of maxima. But I think we can implement similar thing as we did in #36838.
Steps To Reproduce
If we run
n=var('n')
a=0^n
b=a.simplify_full()
(a({n:0}),b({n:0}))
we get
(1,0)
as a resultExpected Behavior
I would expect that
simplify_full
applied at0^n
would not convert it to0
, since most (all?) mathematical formulas on non-negative integers are more compatible with0^0=1
(as currently implemented, see the above-evaluation ofa({n:0})
).I currently think that simplifications should preserve the form
0^n
.Actual Behavior
even with assumptions like
assume(n, 'integer')
assume(n>=0)
or evenassume(n==0)
, the simplification of0^n
yields to0
.Additional Information
This is a more general issue than #36838 where we (yet) replaced
0^n
bykronecker_delta(0, n)
.Note that such basic replacement assumes
n
to be a non-negative integer.Environment
Checklist
The text was updated successfully, but these errors were encountered: