This problem is in the book I am studying for proofs. A theorem stated in the book is that a function $f:A \rightarrow B$ is bijective if it is injective/surjective. Also the Domain of $f$ has to equal $A$.
While proving that a composition of functions is bijective if the functions themselves are bijective, the author proves in the end that given functions $f:A\rightarrow B$ and $g:B \rightarrow A$ the domain of $g \circ f=A$ by using the following logic:
$Dom(f)=A$ and $Dom(g)=B$.
Let $a \in A$. Then $a \in Dom(f)=A$ so $\exists b \in B$ such that $f(a)=b$.
But $b \in B=Dom(g)$ so $\exists c \in C$ such that $g(b)=c$ then
$(g \circ f)(a)=g(f(a))=g(b)=c$ So $a \in Dom(g \circ f)$
Im sorry if this is obvious but how does this prove the domain of $g \circ f=A$ ?