6・180 Determine all functions $f: R \rightarrow R$, where $R$ is the set of real numbers, such that for all $x, y \in R$, we have
$$
f(x-f(y))=f(f(y))+x f(y)+f(x)-1
$$

holds.
［Solution］Let
$$
A=\operatorname{Im} f
$$

be the image set of the function $f$, and let
$$
f(0)=c.
$$

In the given functional equation, setting $x=y=0$, we have
$$
f(-c)=f(c)+c-1,
$$

so
$$
c \neq 0.
$$

In the given functional equation, setting $x=f(y)$, we have
$$
f(0)=f(x)+x^{2}+f(x)-1,
$$

which implies
$$
f(x)=\frac{c+1}{2}-\frac{x^{2}}{2}, \quad x \in A.
$$

In the given functional equation, setting $y=0$, we have
$$
f(x-c)=f(c)+c x+f(x)-1,
$$

which implies
$$
f(x-c)-f(x)=c x+f(c)-1, \quad x \in \mathbb{R}.
$$

Since $c \neq 0$, we have
$$
\{c x+f(c)-1 \mid x \in \mathbb{R}\}=\mathbb{R},
$$

thus
$$
\{f(x-c)-f(x) \mid x \in \mathbb{R}\}=\mathbb{R}.
$$

From the above, for any real number $x$, there exist $y_{1}=f\left(x^{*}-c\right)$ and $y_{2}=f\left(x^{*}\right)$ such that $x=y_{1}-y_{2}$. Using (1), we get
$$
\begin{aligned}
f(x) & =f\left(y_{1}-y_{2}\right) \\
& =f\left(y_{2}\right)+y_{1} y_{2}+f\left(y_{1}\right)-1 \\
& =\frac{c+1}{2}-\frac{y_{2}^{2}}{2}+y_{1} y_{2}+\frac{c+1}{2}-\frac{y_{1}^{2}}{2}-1 \\
& =c-\frac{1}{2}\left(y_{1}-y_{2}\right)^{2} \\
& =c-\frac{x^{2}}{2}
\end{aligned}
$$

Thus,
$$
f(x)=c-\frac{x^{2}}{2}, \quad x \in \mathbb{R}.
$$

Comparing (1) and (2), we get
$$
c=1.
$$

Therefore, we have
$$
f(x)=1-\frac{x^{2}}{2}, \quad x \in \mathbb{R}.
$$

Conversely, it is easy to verify that the function (3) satisfies the conditions of the problem. Therefore, the required function is
(3).