I challenged myself.
The goal was to find a function $f$ with two variables $x$ and $y$ real, which results $1$ if $x=y$ and results $0$ if $x ≠ y$. But, the fonction can only use additions, soustractions, multiplications, divisions, exponents and roots.
My solution is : $f(x,y) =1 - \sqrt{ \frac{ \sqrt{ (x-y)^{2} } } { x-y+0^{(x-y)^{2}} } ^{2}}$
And my question is : is there a solution more elegant using the same restrictions ?
EDIT : I suppose $0^0 = 1$
If you assume $0^0=1$, then just use:
$$f(x, y)=0^{(x-y)^2}$$