# Proofs and exponents to the N power

I'm still a beginner at Mathematica and I'd like to understand how to use it for proofs. Here is a simple one on exponent properties

(a*b)^n == a^n*b^n


I tried using the Truth-evaluating function in the mathematica on more complex versions of this, it does not work, even thought mathematica will recognize it when the variables are evaluated at a point (the first expand term)

a = 1
b = 3
c=2
n=3

(a*b+a*c)^n
(a^n)*(b+c)^n
(a*b+a*c)^n == (a^n)*(b+c)^n
Expand[%]
(x*y+x*z)^u == (x^u)*(y+z)^u
Expand[%]


The last line should evaluate to true, but doesn't. I'd like to understand how to do proofs related to algebraic concepts. Thanks for any help and let me know if I can make this question more clear

Mathematica typically works with complex numbers. It turns out however that the identity $$a^n b^n = \left(a b\right)^n$$ is not generally true for all complex numbers. This can be quickly verified with FindInstance:

FindInstance[(a b)^n != a^n b^n, {a, b, n}]


The two major conditions this will be true is if $$n \in \mathbb{Z}$$ or if $$a>0 \land b>0$$. These can be shown to be generally true by using Simplify with the appropriate assumptions (in the second argument).

Simplify[(a b)^n == a^n b^n, {n \[Element] Integers}]
Simplify[(a b)^n == a^n b^n, {a > 0, b > 0}]


Both of which evaluate to True, as expected.

This works with the more complicated expression as well:

Simplify[(x*y + x*z)^u == (x^u)*(y + z)^u, {x > 0, y > 0, z > 0}]


True

You may also be interested in looking at PowerExpand, which expands powers based on assuming the (given) variables are positive and real.

• Thanks! question: what does the simplify function do in this? Why is it necessary to evaluate to true?
– tom
Oct 29, 2018 at 21:30
• Simplify attempts to rewrite the expression to the simplest form it can find, and it can take a set of assumptions as its second argument. If a statement is universally true under a set of assumptions, then the simplest form is naturally going to be True. It's not the only function that could be used here, but it is one of the more general ones. Oct 29, 2018 at 21:43