Given sum function, equality and `x is a perfect square` predicates in $ \mathbb{N} $. Construct the predicate $ z = x\times y $. Given sum function, equality and x is a perfect square predicates in $ \mathbb{N} $. Construct the predicate $ z = x\times y $.
I can do the same in $ \mathbb{Z} $ if the second predicate was $ x = y^2 $.
$ \exists{x'} \exists{y'} (x' = x^2) \land (y' = y^2) \land (x' + y') + (z + z) = (x + y)^2$ .
I don't have any good ideas oher than using forumlas like $ (a + b)^2 = a^2 + 2ab + b^2 $ in this problem too.
 A: I'm sure there is a more elegant way of doing it, but you can do it this way: if you get the predicate $x=y^2$ with the sum function, equality and the predicate '$x$ is a perfect square' then you only have to use this predicate as you mention to obtain $z=xy$. So let's try to get the predicate $x=y^2$.
Now, $x = y^2\iff x$ is a perfect square, $x+y+y+1$ is a perfect square and all elements between $x$ and $x+y+y+1$ are not perfect squares. This is because the difference between two consecutive squares uniquely determines this two squares, $(n+1)^2 - n^2 = n+n+1$. In this case we're saying $x$ is a square and the next square is exactly $y+y+1$ after it.
You could write it as:
$$x \text{ is a square number}\wedge x+y+y+1 \text{ is a square number} \wedge$$
$$ (\neg \exists k, t (x+k+t = x+y+y+1) \wedge x+k \text{ is a square number })$$
I hope I didn't use something out of the alphabet you're required to use in the exercise, I wasn't sure if this predicates had to follow some structure. Also, if your natural numbers contain the $0$ (which some professors/textbooks include and some others don't) then you have to include that $t,k \neq 0$.
