bug? multiply symbolic exponents

Is this a bug ?

sage: var('a b c x y z')
(a, b, c, x, y, z)
sage: assert( (e^x)^y == e^(x*y) )
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
/Users/marks/mysage/sage-9.0/local/lib/python3.7/site-packages/sage/all_cmdline.py in <module>()
----> 1 assert( (e**x)**y == e**(x*y) )

AssertionError:
sage: assert( (e^2)^3 == e^(2*3) )
sage:

edit retag close merge delete

but

sage: (e^x)^y - e^(x*y)
y
⎛ x⎞     x⋅y
⎝ℯ ⎠  - ℯ
sage: simplify(_)
0

( 2021-01-01 12:10:40 +0200 )edit

Sort by » oldest newest most voted

Not necessarily true. See sympy's documentation for a nice abstract on the problems...

EDIT : This is the third case mentioned in the pointed documentation :

sage: bool((x^a)^b==x^(a*b))
False
sage: with assuming(b,"integer"): bool((x^a)^b==x^(a*b))
True

more

A nice beginning to 2021: this answer led me to some new-to-me math, to a new appreciation of sage/sympy, and to gratitude for this forum. Thanks--and happy new year!

( 2021-01-01 14:06:04 +0200 )edit

Stats

Seen: 319 times

Last updated: Jan 01 '21