4
$\begingroup$

A constructible number is any number which can be expressed with only natural numbers and the operators $+$, $-$, $\times$, $/$, $\sqrt{}$ (square root only). Is Mathematica's Simplify or FullSimplify guaranteed to be able to detect equality between two such numbers regardless of the complexity of the expression? More specifically, if I have two expressions a and b which represent the same constructible number, is either of the following guaranteed to yield True?

FullSimplify[a - b] == 0
FullSimplify[a == b]

An algorithm for determining equality exists, but from the documentation it's not clear, whether Mathematica will always be able to determine equality or just "try really hard".

Bonus question if the answer is "yes": how about algebraic numbers, i.e. allowing radicals of other orders than 2.

$\endgroup$
  • 2
    $\begingroup$ The best thing to do is RootReduce[]; if the two algebraic numbers are indeed equal, RootReduce[] should be able to see that their difference is zero. Alternatively (or equivalently, if you think about it), use MinimalPolynomial[]. $\endgroup$ – J. M.'s technical difficulties Apr 1 '16 at 9:52
  • 1
    $\begingroup$ Have you seen Constructible numbers? $\endgroup$ – user9660 Apr 1 '16 at 13:57
3
$\begingroup$

Use

PossibleZeroQ[a - b, Method -> "ExactAlgebraics"]

The documentation says:

For explicit algebraic numbers the answer is provably correct

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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