Task 3. Find all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ that satisfy

$$
f(-f(x)-f(y))=1-x-y
$$

for all $x, y \in \mathbb{Z}$.
Solution II. Suppose there are $a, b \in \mathbb{Z}$ such that $f(a)=f(b)$. Then substituting $y=0$ and first $x=a$ and then $x=b$ gives

$$
1-a=f(-f(a)-f(0))=f(-f(b)-f(0))=1-b
$$

so $a=b$. We conclude that $f$ is injective.

Now substitute first $x=n, y=1$ and then $x=n+1, y=0$, which gives

$$
f(-f(n)-f(1))=1-n-1=1-(n+1)-0=f(-f(n+1)-f(0))
$$

from which, by injectivity, it follows that $-f(n)-f(1)=-f(n+1)-f(0)$, or equivalently $f(n+1)=f(n)+f(1)-f(0)$. It follows, just as in the previous solution, that $f$ is a linear function, and checking shows that the only solution is $f(x)=x-1$.