Let $f, b$ be functions where $\operatorname{dom}(f) = A, \operatorname{dom}(g) = B$ and $C = A \cap B.$ Show $f \cap g$ is a function and $\operatorname{dom}(f \cap g) = C \iff f \upharpoonright C = g \upharpoonright C$.
My proof:
Suppose $(x, y) \in f \cap g.$ Then $x \in C$. Also, $(x, y) \in f$ and $(x, y) \in g$ and so $f(x) = y$ and $g(x) = y$ which means $f(x) = g(x)$ for all $x \in C$. Thus $f \upharpoonright C = g \upharpoonright C.$
Suppose $f\upharpoonright C = g \upharpoonright C$ and $(x, y), (x, z) \in f \cap g.$ Then $(x, y), (x, z) \in f $ and $(x, y), (x, z) \in g $. Since both $f, g$ are functions, $y = z.$ Thus $f \cap g$ is a function $\square$
I ended up not using the given assumptions in either direction. Obviously, something must've gone wrong. What is wrong with the proof above? Thanks.
edit:
@ Rob Arthan
$(1)$ Suppose $(x, y), (x, z) \in f \cap g.$ Then $(x, y), (x, z) \in f $ and $(x, y), (x, z) \in g $. Since both $f, g$ are functions, $y = z.$ Thus $f \cap g$ is a function.
$(2)$. Suppose $x \in C$. Also suppose $(x, y) \in f$ and $(x, y) \in g$. Then $f(x) = y$ and $g(x) = y$ which means $f(x) = g(x)$ for all $x \in C$. Thus $f \upharpoonright C = g \upharpoonright C.$ In the other direction, suppose $x \in C.$ Since $f \upharpoonright C = g \upharpoonright C$, then $x \in \operatorname{dom}(f \upharpoonright C) \subseteq \operatorname{dom}(f)$ and $x \in \operatorname{dom}(g \upharpoonright C) \subseteq \operatorname{dom}(g)$. Thus $x \in \operatorname{dom}(f \cap g).$ Now assuming $x \in \operatorname{dom}(f \cap g)$, if $f \upharpoonright C = g \upharpoonright C$ with $(x, y) \in f \upharpoonright C$, then $x \in C.$
Does it make sense?
Your proof of (1) is fine. For (2):
$\Rightarrow$: assume $\mathrm{dom}(f \cap g) = C$. Then for any $x \in C$, $f(x) = g(x)$ (i.e., there is a $y$ such that $(x, y) \in f$ and $(x, y) \in g)$, so the restriction $f \upharpoonright C = \{(x, y) \in f \mid x \in C\}$ of $f$ to $C$ is equal to the restriction $g \upharpoonright C = \{(x, y) \in g \mid x \in C\}$ of $g$ to $C$.
$\Leftarrow$: assume $f \upharpoonright C = g \upharpoonright C$. We have to prove that $\mathrm{dom}(f \cap g) = C$, i.e., that (i), $\mathrm{dom}(f \cap g) \subseteq C$ and (ii), $C \subseteq \mathrm{dom}(f \cap g)$. (i) is easy to prove (see proof of (1)). For (ii), if $x \in C$, then by our assumption, $f(x) = (f \upharpoonright C)(x) = (g \upharpoonright C)(x) = g(x)$. so $(x, f(x)) = (x, g(x)) \in f \cap g$, giving us that $x \in \mathrm{dom}(f \cap g)$. Hence $C \subseteq \mathrm{dom}(f \cap g)$ and we are done.