show $f\mid A=f\circ{i_A}$ My question is 
if $f:X\rightarrow{Y}$ and $A\subseteq{X}$, show that $f\mid A=f\circ{i_A}$.
So here's my attempt.
By definition of the inclusion map, $f|A$ is the function on A such that $(f\mid A)(a)=f(a), \forall{a}\in{A}$.  Also, by definition of the identity map on A into X, $i_X\mid A=i_A$.  Putting both together we get
$$f\mid A=(f\mid A)(a)=(f\mid A)(i_A)=f\circ{i_A}$$
This to me is short and sweet, but I'm trying to ensure my proofs are perfect and my logic flows correctly.  Also that my notation is correct, since this is the most abstract class I've had thus far.  No need to upvote or whatever, I just want to see if this is the way and if not, where I've missed (and hints if I'm wrong...)

I think you might want to be a bit more explicit about what you are doing.  First, $f \restriction A$ is a new function such that $dom (f \restriction A) = A$ and $cod (f \restriction A) = cod (f)$ (the codomain) and with the property that $f \restriction A (x) = f(x)$ for all $x \in A$.
Also, $i_A$ is a function with domain $A$ and codomain $X$ such that $i_A(x) = x$ (necessarily all these $x \in A$).
Now, $f \circ i_A$ (notice this composition works!) is a function with domain $A$ (the domain of $i_A$) and codomain $Y$ (the codomain of $f$).  Moreover, $f \circ i_A (x) = f(x)$ and again necessarily since the domain is $A$ all these $x \in A$.
Hence, $f \circ i_A (x)$ and  $f \restriction A (x)$ have the same domain and codomain and moreover, $f \circ i_A (x) = f \restriction A (x)$ for all $x \in A$ (their domain) and so these functions are equal.
