# ring homomorphism and integral domain

Let $$R$$ and $$S$$ be rings and $$R'$$ an integral domain. $$f: R \times S \to R'$$ is a ring homomorphism. I have to prove that there exists a ring homomorphism $$g: R \to R'$$ such that $$f(x,y) = g(x)\ \forall x \in R, y \in S$$. OR there exists a ring homomorphism $$h: S \to R'$$ such that $$f(x,y) = h(y)\ \forall x \in R, y \in S$$.

What I have so far: $$f(x_1+x_2,y_1+y_2) = f(x_1,y_1)+f(x_2,y_2) \ \forall x_1,x_2 \in R, y_1,y_2 \in S$$ $$f(x_1,y_1)=f(x_1,0)+f(0,y_1)$$ $$f(0,0) = f(x_1,0)\cdot f(0,y_1)$$ $$R'$$ has no zero divisors, so $$f(0,0) \notin R'$$

Now I am stuck. Can somebody help me?

$$f(0,0)=f((1, 0)(0,1))=f(1,0)f(0,1)=0$$ By the integral domain property, either $$f(1,0)=0$$ or $$f(0,1)=0$$. Assume the latter is true. Then $$f(0,s)=f(0,s)f(0,1)=0$$ for all $$s$$. Thus $$f(r, s) =f(r, 0)$$ for all $$(r, s)$$. Take $$g(x)=f(x, 0)$$ and you're done.
From $$f(0,0)=f(x,0)f(0,y)$$ you cannot conclude that $$f(0,0)\notin R'$$, but rather that
either $$f(x,0)=0$$ or $$f(0,y)=0$$
since $$R'$$ is an integral domain.
In particular, this is true for $$x=1$$ and $$y=1$$ (the unities in $$R$$ and $$S$$ respectively). Suppose $$f(0,1)=0$$; then $$f(0,y)=0$$, for every $$y\in S$$.