RagvaloD wrote:
a) Determine all functions $f:\mathbb{Z}\rightarrow\mathbb{Z}$ such that\[f(x-f(y))=f(f(x))-f(y)-1\]holds for all $x,y\in\mathbb{Z}$. (It is 2015 IMO Shortlist A2 )
b) The same question for if \[f(x-f(y))=f(f(x))-f(y)-2\]for all integers $x,y$
$P(x, y)$ : $f(x-f(y))=f(f(x))-f(y)-2$
$P(f(x), x)$ $\implies$ $f(f(f(x)))=f(x)+u$ for all $x$, where $u=f(0)+2$. $(1)$
$P(x, f(x))$ $\implies$ $f(t)=-2$ for some $t$.
$P(x, t)$ $\implies$ $f(f(x))=f(x+2)$ for all $x$. $(2)$
$(1) \land (2)$ $\implies$ $f(x+3)=f(x)+u$ for all $x$. $(*)$
Now, $P(x, y)$ becomes $f(x-f(y))=f(x+2)-f(y)-2$
$P(f(f(x))-2, y) \land (1)$ $\implies$ $f(x-f(y)+2)=f(f(x-f(y)))=f(f(f(x))-2-f(y))=f(f(f(x)))-f(y)-2=f(x)-f(y)+f(0)$ for all $x, y$.
So we have $R(x, y): $ $f(x-f(y)+2)=f(x)-f(y)+f(0)$ for all $x, y$.
$R(f(x), x)$ $\implies$ $f(x+2)-f(x)=v$, where $v=f(2)-f(0)$, for all $x$. $(**)$
$(*) \land (**)$ $\implies$ $f(x+3)-f(x+2)=u-v$ for all $x$. So $f(x)=ax+b$, for all $x$, where $a, b$ are fixed integers.
Substitute in the original FE, we get $(a, b) \in \{(0, -2), (1, 2) \}$. Hence $f \equiv -2$ or $f \equiv \mathrm{Id} + 2$. Which are indeed solutions.