Let $f$ be a function with domain D, and let $g$ be an extension of $f$ with domain A. Then by definition, $f=g|_{D}$ and $D \subseteq A$. Let $i$ be the inclusion mapping from D to A given by $i(x)=x$ for all $x \in D$. Prove $f = g \circ i$.
So I know that to prove function equality, I have to prove that: 1. Dom(f)=Dom($g \circ i$) 2. For all $x \in Dom(f)$, f(x)=g(x)
To prove the first point, I have: $[\subseteq]$ Let $x \in Dom(f)$. Then $x \in D$. $Dom(g \circ i)=D$ by Theorem 4.2.1, so $Dom(f) \subseteq Dom(g \circ i)$ $[\supseteq]$ Let $x \in Dom(g \circ i)$. $Dom(g \circ i)=D$, so $x \in D$. Dom(f)=D, so $Dom(g \circ i) \subseteq Dom(f)$.
Then, to prove the second point, I'm sort of lost. I know I have to prove that for any $x \in f(x), x \in g(x)$, but I'm lost as to how.
Suggestions?
On the first part: Since you have that $Dom(f)=D=Dom(g\circ i)$, you don't have to do inclusion in both directions, because you already know they're the same set.
For the second point, what you need to show is that, for every $x$ in that domain, we have $f(x)=(g\circ i)(x)$, which is true by definition of "extension".
That's really all you need.