# equality with integer exponents

n = var("n",domain = ZZ) assume(n>0) bool(3^(2*n) == (3^2)^n )

reply: False

Why?

Big thangs

equality with integer exponents

n = var("n",domain = ZZ) assume(n>0) bool(3^(2*n) == (3^2)^n )

reply: False

Why?

Big thangs

add a comment

0

When asked for a Boolean expression, SageMath returns `False`

if it is not capable to evaluate the expression to either true or false (a real false). This is what is happening in the present case; SageMath does not detect the identity:

```
sage: (3^(2*n) - (3^2)^n).simplify_full()
-9^n + 3^(2*n)
```

SymPy is more clever:

```
sage: (3^(2*n) - (3^2)^n)._sympy_().simplify()
0
```

Well, SageMath can get it with `canonicalize_radical()`

:

```
sage: (3^(2*n) - (3^2)^n).canonicalize_radical()
0
```

Asked: **
2019-12-23 10:22:48 -0500
**

Seen: **28 times**

Last updated: **Dec 23 '19**

Stack overflow in boolean test

RuntimeError Groebner basis for a Boolean system

(Unexpanded) symbolic inequalities yield erroneous results

Sage symbolic math simplification error

Getting the denominator takes ages...

Where is information passed on to var() stored?

Exponential change of variables in symbolic ring

Sage won't solve a symbolic equation unless it is in a specific form.

How to reorder terms in an expression to follow a specific order?

Convert expression to univariate polynomial over symbolic ring properly

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.