Proof verifications: Elementary composition proofs. (if $g\circ f$ is one-to-one, then show $f$ is one-to-one etc.) Can someone please verify whether my following proofs are logically correct? :)
Let $f: A\rightarrow B$ and $g: B \rightarrow C$ be functions.


*

*If $g\circ f$ is onto, then show $g$ is onto.


Proof: The function $g$ is onto iff for all $c\in C$ there exists a $b\in B$ such that $g(b) = c$. Since $g\circ f$ is onto, for all $c\in C$, there exists an $a\in A$ such that $g(f(a)) = c$. Then for every $c\in C$, there exists an $f(a)=b \in B$ such that $f(b) = c$. By definition, $g$ is onto. $\square$


*If $g\circ f$ is one-to-one, then show $f$ is one-to-one.


Proof: The function $f$ is one-to-one if and only if for all $a_{1},a_{2}\in A$, $f(a_{1})=f(a_{2})$ implies $a_{1}=a_{2}$. Since $g\circ f$ is one-to-one, for all $a_{1},a_{2}\in A$, $g(f(a_{1}))=g(f(a_{2}))$ implies $a_{1}=a_{2}$. For $g(f(a_{1}))=g(f(a_{2}))$ to be true, then $f(a_{1})=f(a_{2})$. Then $f(a_{1})=f(a_{2})$ implies $a_{1}=a_{2}$. Therefore, $f$ is one-to-one. $\square$


*If $g\circ f$ is one-to-one and $f$ is onto, then show $g$ is one-to-one.


Proof: The function $g$ is one-to-one iff for all $b_{1},b_{2}\in B$, $g(b_{1})=g(b_{2})$ implies $b_{1}=b_{2}$. Since $f$ is onto, for every $b\in B$, there exists an $a\in A$ such that $f(a) = b$. Since $g\circ f$ is one-to-one and $f(a)\in B$, $g(f(a_{1}))=g(b_{1})=g(b_{2})=g(f(a_{2}))$ implies $b_{1}=b_{2}$. By definition, $g$ is one-to-one. $\square$


*If $g\circ f$ is onto and $g$ is one-to-one, then show $f$ is onto.


Proof: The function $f$ is onto iff for every $b\in B$, there exists an $a\in A$ such that $f(a) = b$. Since $g$ is one-to-one, for all $b\in B$, there exists a unique $c\in C$ such that $g(b) = c$. Since $g\circ f$ is onto, for every $c\in C$, there exists an $a\in A$ such that $g(f(a))=c$. Since $g$ is one-to-one, $c = f(b) = g(f(a))$ implies $f(a) = b$. Therefore, $f$ is onto. $\square$
 A: In 1), there is a typo. You wrote «Then, for every $c\in C$ there exist an $f(a)=b\in B$ such that $f(b)=c$» But, you should write «Then, for every $c\in C$ there exist an $f(a)=b\in B$ such that $g(b)=c$»
In 2), not necessarily is true that if $g(f(a_1))=g(f(a_2))$ then $f(a_1)=f(a_2)$ (why?). You need to begin (following your idea) with $f(a_1)=f(a_2)$ and prove that $a_1=a_2$.  The proof is in the next spoiler: (put the cursor in the square to see).

 Take $f(a_1)=f(a_2)$, then, we know that $g(f(a_1))=g(f(a_2))$ and, by hypothesis, $g\circ f$ is one-to-one, thus, $a_1=a_2$.

3) is ok. Only, don't forget say who is $b_1$ and $b_2$ (by the context is easy to know who is who, but, it's necessary).
For 4), there is a mistakes. You said «Since $g$ is one-to-one, for all $b\in B$, there exist a unique $c\in C$ such that $g(b)=c$» but that is not the definition of one-to-one. In fact, that's the definition of a function! Moreover, in the part of «since $g$ is one-to-one, $c=f(b)=g(f(a))$», remember that $g(f(a))\in C$ and $f(b)\in B$. They can't be equals!
The correct proof in the spoiler:

 Take $b\in B$. We want to prove that there exists $a\in A$ such that $f(a)=b$. Take the point $g(b)\in C$. We know that $g\circ f$ is onto, then, there exist $a\in A$ such that $g(f(a))=g(b)$. Because $g$ is one-to-one, $f(a)=b$. Thus, $f$ is onto.

