Post · 1 min read· p. 8

A neat trick to distinguish integers

Something neat from Hector Pasten’s talk at the CYMS seminar: suppose that we want to give a formula for the statement “x≠yx \neq y” where xx and yy are integers, but we want to do so in a positive existential system, i.e., using only the defined arithmetical operations (+,×,=)(+,\times,=) and the existential quantifier ∃\exists. In particular, we can’t use negation or the universal quantifier ∀\forall.

At first glance, this might seem difficult – how do we express the concept of “not equal” without using “not”? However, there is a very nice trick. First, observe that

x≠y  ⟺  x−y−1≥0∨x−y−1≤0.x \neq y \iff x-y-1 \ge 0 \vee x-y-1 \le 0.
We’ve changed the problem from defining x≠yx \neq y to the problem of defining “x≥0x \ge 0” (in a positive existential way). Recall Lagrange’s Four Square Theorem:

Theorem (Lagrange’s Four Square Theorem)

Every nonnegative integer n∈Nn \in \mathbb{N} may be written as a sum of four squares:

n=x12+x22+x32+x42xi∈N.n = x_1^2 + x_2^2 + x_3^2 + x_4^2 \quad x_i \in \mathbb{N}.

So, we can write:

x≥0  ⟺  ∃x1,…,x4(x=x12+x22+x32+x42)x \ge 0 \iff \exists x_1,\ldots,x_4 ( x = x_1^2 + x_2^2 + x_3^2 + x_4^2)
which, in turn, gives us our desired positive existential formula for x≠yx \neq y.