0
$\begingroup$

Prove that $f \cup g $ is a function if and only if $f(x)=g(x)$, for all $x \in dom(f) \cap dom(g)$

I am trying to prove this problem. I have already proved it from right to left but from left to right is giving me problems. I have tried to let $(x,y) \in f \cup g $ and I think i need to prove $y \in f,g$ which i don't know I i can achieve that.

1 Answers 1

0

I guess that $f,g \colon A \rightarrow B$. Assume that $f \cup g$ is a function and let $x \in \operatorname{dom}(f) \cap \operatorname{dom}(g)$. Then $(x,f(x)) \in f$ and $(x,g(x)) \in g$ so in particular both $(x,f(x))$ and $(x,g(x))$ are in $f \cup g$. Since $f \cup g$ is a function, this implies that $f(x) = g(x)$ (by definition of a function, if $(x,y_1),(x,y_2) \in f \cup g$ then $y_1 = y_2$).