Function which satisfies $f(x-f(x))=f(x)-1$ While trying to solve a particular problem, I got stuck trying to find an unknown function $f(x)$ , $f : \Bbb{R}\to\Bbb{R}$ whose only known property is that it satisfies the following equation:
$$f(x-f(x))=f(x)-1$$
Is there a way to determine if the above equation has a unique solution?
If $f(x)$ is indeed unique, but its explicit form cannot be determined, is there a way to find its value at some arbitrary point $f(a_0)$?
 A: There does not exist any such function that is continuous, but there exist $2^{\mathfrak{c}}$ different such functions that are not continuous.
For convenience, let me write $g(x)=x-f(x)$.  The functional equation in terms of $g$ can then be rearranged to $$g(g(x))=2g(x)-x+1.$$
Note that this implies $g$ is injective, since if $g(x)=g(y)$ then $g(g(x))=g(g(y))$ and comparing the functional equations for the two gives $x=y$.
Now assume that $f$ (and hence $g$) is continuous.  Then $g$ must be monotone.  Also, note that if $g(x)=x$ then the functional equation gives $x=x+1$ which is impossible, so $g$ has no fixed points.  Now observe that the image of $f(x)=x-g(x)$ is closed under subtracting $1$ (this is immediate from the functional equation for $f$).  Since $f$ cannot be $0$, it must always be negative by continuity.  It follows that $g(x)>x$ for all $x$ and $g$ must be increasing (since it would be impossible to always have $g(x)>x$ if $g$ were decreasing).
Now suppose $g$ is surjective.  Letting $x=g^{-1}(y)$ in the functional equation, we get $$g^{-1}(y)=2y-g(y)+1.$$
Let $a=g(0)$.  We then get $g^{-1}(0)=1-a$, $g^{-2}(0)=g^{-1}(1-a)=3-2a$, and an easy induction shows similarly that $$g^{-n}(0)=\frac{n(n+1)}{2}-na$$ for all $n\in\mathbb{Z}$.  Recalling that $g(x)>x$ for all $x$ and setting $x=g^{-n}(0)$, we get $$\frac{n(n-1)}{2}-(n-1)a>\frac{n(n+1)}{2}-na$$ and hence $$a>n.$$  Since $n\in\mathbb{Z}$ is arbitrary, this is a contradiction.
Thus $g$ is not surjective.  Note that $g$ is unbounded above (since $g(x)>x$ for all $x$), so it must be bounded below.  That is, $$L=\lim_{x\to-\infty}g(x)$$ is finite.    Now choose $N$ large enough such that $g(-N)<L+1/2$.  We then have $$g(g(-N))=2g(-N)+N+1$$ and $$g(g(-N-1))=2g(-N-1)+N+2.$$  Since $$L<g(-N-1)<g(-N)<L+1/2,$$ we have $$2g(-N-1)>2L>2g(-N)-1.$$  But now comparing our formulas for $g(g(-N))$ and $g(g(-N-1))$ we see that $g(g(-N-1))>g(g(-N))$.  This contradicts the fact that $g$ is increasing, and completes the proof that $f$ cannot be continuous.

Now I will sketch how to construct such functions $g$ (and hence such functions $f$) that are not continuous.  In particular, I will describe a transfinite induction construction of such a $g$ that is a bijection.  The induction has length $\mathfrak{c}$ and at each step there are multiple choices, so this actually gives $2^{\mathfrak{c}}$ different examples.
First, let us consider what the orbits of $g$ must look like, assuming $g$ is to be a bijection.  Suppose we have $g(a)=b$ for some $a,b\in\mathbb{R}$.  By induction on $n$, we can see that for each $n\in\mathbb{Z}$ we must have $$g^n(a)=nb+k_na+\ell_n$$ for certain integers $k_n$ and $\ell_n$ (in fact, $k_n=1-n$ and $\ell_n=\frac{n(n-1)}{2}$ but this is not important for the construction).  Conversely, if we fix numbers $a$ and $b$ such that the numbers $nb+k_na+\ell_n$ are distinct for all $n\in\mathbb{Z}$ and define $g^n(a)=nb+k_na+\ell_n$, this function will satisfy the functional equation $g(g(x))=2g(x)-x+1$ on the set of numbers of the form $nb+k_na+\ell_n$.
So, we can construct a function $g$ satisfying the functional equation by building one orbit at a time in this way.  Construct $g$ by a transfinite recursion of length $\mathfrak{c}$, where in each step we define $g$ on one new orbit.  At any step, we have defined $g$ so far on fewer than $\mathfrak{c}$ points.  Let $a$ be the first point (in some enumeration of $\mathbb{R}$ with order type $\mathfrak{c}$) where $g$ is not yet defined.  In order to define $g$ on $a$ (and its entire orbit), we just need to pick some $b$ such that the numbers $nb+k_na+\ell_n$ are all distinct from each other and distinct from the inputs on which we have already defined $g$.  This is easy: just pick any $b$ that is not in the $\mathbb{Q}$-linear span of $a$, $1$, and the inputs at which $g$ is already defined.  Choosing such a $b$, we then define $g^n(a)=nb+k_na+\ell_n$ for all $n\in\mathbb{Z}$.
After iterating this process for $\mathfrak{c}$ steps, $g$ will be defined on all of $\mathbb{R}$ and will satisfy $g(g(x))=2g(x)-x+1$ for all $x$.  Defining $f(x)=x-g(x)$, $f$ will satisfy $f(x-f(x))=f(x)-1$.
