Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to determine equality of symbolic expressions?

I expect the following code to yield True, but instead it is False:

var('x, y, n')
assume(n,'integer')
bool((x-y)^n==(-1)^n*(y-x)^n)

Is there anything I can do to enable the equality to be recognized?

How to determine equality of symbolic expressions?

I expect the following code to yield True, but instead it is False:

var('x, y, n')
assume(n,'integer')
assume(n >= 0)
bool((x-y)^n==(-1)^n*(y-x)^n)

Is there anything I can do to enable the equality to be recognized?