Proving a function is a fixed point
You are thinking of the map: $$T_1(f,x,y) =\begin{cases} x & \text{if } y=0 \\f(x-1,y-1) & \text{otherwise} \end{cases}, $$ and want to show that the function $$ f(x,y)=x-y $$ is a fixed point. This amounts to showing $$ T_1(f,x,y)=f(x,y)=x-y\ $$ for any $x$ and $y$.
There are only two cases one has to check, $y=0$ and $y\neq 0$. If $y=0$, then $T_1(f,x,0)=x=x-0=f(x,0)$, just as we want. If $y\neq 0$, then $T_1(f,x,y)=f(x-1,y-1)=x-1-y+1=x-y=f(x,y)$, and the proof is done.
I don't fully understand the programmatic notation you are using, but I think this is what you are trying to do. However you have evaluated $f(x-1,y-1)$ to $x-y+2$ rather than $x-1-y+1=x-y$, possibly you have forgotten to distribute the minus sign. I hope this helps!