Skip to content

Simplification of zero to the symbolic power n #36863

@phul-ste

Description

@phul-ste

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 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.

Environment

- **OS**: Ubuntu 20.04
- **Sage Version**: 9.0
- Jupyter Notebook

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions