8

Consider terms built from elements of $\mathbb Q$ and the operations $+,\times,-,/$, and $\sqrt[n]{\,\cdot\,}$ for each natural number $n$. Given the promise that two terms are well-formed -- that is, there is no division by zero, and no even roots of negative numbers -- is there an algorithm which decides when the two terms are equal?

A related question was posted here, but it is more general (as it allows arbitrary exponentiation, rather than just by rational numbers).

Mees de Vries
  • 353
  • 2
  • 16

2 Answers2

3
  1. Algebraic numbers are solutions of polynomials with rational coefficients.
  2. $+,\times,-,/$ of algebraic numbers result in algebraic numbers because algebraic numbers form a field (1). This means nested radicals are algebraic numbers too (2).
  3. Nested radicals can be denested by algorithm (3,4).
  4. Each algebraic number of degree $n$ can be uniquely represented as a $n$ by $n$ matrix of integers under a suitable basis (for example, $[1,x, (x^2+1)/2]$). This representation allows symbolic evaluation of $+,\times,-,/$ by matrix addition, multiplication, and inverse (p.159 of 5,6,7).
  5. Two terms are equal if their unique representations are identical.
3

Yes. ​ By the real-number analogue of the Tseytin transformation, that
reduces to the existential theory of the reals, which is in PSPACE by

page 291 and the bottom of page 290 from this paper
and
the answers to this question

.


For all real numbers $x$, $\sqrt{x^2}$ and $x$ are both well-formed and ​ ​ ​ $\sqrt{x^2} = x$ ​ if and only if ​ $0\leq x$ ​ , ​ ​ ​ so testing inequality reduces to your problem. ​ ​ ​ ​ ​ ​ ​ I'm not aware of any better upper bound for testing inequalities of sums-of-square-roots than this paper, which puts it in the counting hierarchy.