1
$\begingroup$

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

$\endgroup$

1 Answer 1

4
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Thanks! question: what does the simplify function do in this? Why is it necessary to evaluate to true? $\endgroup$
    – tom
    Oct 29, 2018 at 21:30
  • $\begingroup$ 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. $\endgroup$
    – eyorble
    Oct 29, 2018 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.