17

4

I realize that *Mathematica* is not specifically an automated theorem prover. However, this article:

http://www.wolfram.com/products/mathematica/newin6/content/EquationalTheoremProving/

Suggests that *Mathematica* 6 onwards can apparently prove certain theorems. Examples are provided of expressions being provided to FullSimplify, and it coming up with a True or False response, depending on whether the expression is True or False (presumably in some axiom system internal to it). The proof itself is not provided.

The documentation also mentions, that *Mathematica* 'knows' about Fermat's Last Theorem. Indeed, the example provided:

```
FullSimplify[x^n + y^n == z^n, Element[x | y | z | n, Integers] && n > 2 && x y z != 0]
```

Gives

`False`

as expected. I would usually formulate this as:

```
FullSimplify[Exists[{x, y, z, n}, x^n + y^n == z^n && Element[x | y | z | n, Integers] && n > 2 && x y z != 0]]
```

and indeed that does give the same result. Am I to conclude that *Mathematica* is 'proving' or at least 'calculating' the result somehow using proprietary heuristic rules? Or is this particular theorem, being a famous one, simply hard coded into it? The documentation seems to suggest this by saying that Mathematica 'knows' about the theorem.

Specifically, I tried to prove a simple result - the irrationality of the square root of 2:

```
FullSimplify[Exists[{a, b}, Element[a, Integers] && Element[b, Integers] && a/b == Sqrt[2]]]
```

but all *Mathematica* does is re-format the expression into *Mathematical* notation. It is apparently unable to 'prove' or otherwise obtain a True/False decision. Of course, False is expected.

Is this simply something *Mathematica* cannot, as of now, do, or am I doing something wrong (and there is indeed some way to prove the irrationality of Sqrt[2] in *Mathematica*)?

Just as a note:

- Yes, I am aware of Theorema 2.0, but it seems incomplete and hardly documented as of now.
- I am also aware of this blog post: http://blog.stephenwolfram.com/2014/08/computational-knowledge-and-the-future-of-pure-mathematics/

1It turns out the

`! MemberQ[Divisors[b], a]`

clause is unnecessary; Mathematica will simplify the without it. The key change seems to be squaring both sides of the equation. – Pillsy – 2015-05-05T16:38:51.6403I am accepting this, and not the answers of @ilian and Pillsy for the following reason. The point of the question was not merely to find out if Mathematica can determine if root 2 is rational or not, since it common knowledge that it is not. Rather, I suspect that users including myself, would hope to use it to find the truth or falsity of complex statements, which might not have the form necessary to simply use the Element function, for example. Here, it is very troubling to me that the sides need to be squared in order to get a decision. In general, how would I know what to change? – Atriya – 2015-05-05T23:00:16.030

What happens if you rearrange the last equality to

`a^2 == 2 b^2`

? – J. M.'s ennui – 2015-05-06T00:40:05.983It just gave me True as a reply for FullSimplify[ Exists[{a, b}, Element[a, Integers] && Element[b, Integers] && ! MemberQ[Divisors[b], a] && a^2 == 2 *b^2] ]! This seems to be incorrect! – Atriya – 2015-05-06T15:19:38.780

1

`True`

seems fine as`{0, 0}`

satisfy all the conditions as written. – ilian – 2015-05-07T11:15:31.107That's true! Adding a b!=0 condition solves this problem. (However, Mathematica is still unable to decide the question if represented as a/b=Sqrt[2]). – Atriya – 2015-05-07T16:36:52.867