The question I'm asking might be rather simple, but I couldn't find relevant information (maybe it's too trivial?). Here's the question that baffled me.
Let $f:X\rightarrow Y$ and $g:Y\rightarrow Z$ functions. If g and $g \circ f$ are invertible, then is f also invertible?
Now, the reason I'm confused is that I'm currently learning set theory. I'm using the textbook "Introduction to Set Theory" by Karel Harbacek and Thomas Jech. In the book, the composite function is defined as follows:
$g \circ f$={(x, y)| $\exists$z(f(x)=z $\land$ g(z)=y)} where dom($g \circ f$)=domf $\cap$$f^{-1}$[domg]
Notice that we only need the intermediate $z$ to find the elements of the composite function, and only the domain is defined. Now, consider the case where f(1)=1 and g(k)=k for all $k$, where $k$ is equal or less than a certain natural number $n$.
In this case, clearly $g$ is bijective, hence invertible. The problem is the composite function. Since we defined only the domain of a composite function, the domain of the composite function in this case is {1} and the range is {1}.
Now, should we regard this range as the comain(surjective) so the composite function is invertible? Or, should we say the codomain of the composite function is $Z$, the codomain of g? This ambiguousity arose because the definition of the composite function seems somewhat incomplete.
My second question is, what if the problem didn't specify all the domains and codomains of each function? Then would be the conclusion different from the first case?
Lastly, I've heard from one of my fellows that in some textbook the domain of the composite function is defined as just plainly, $domf$. What made all the authors to make different definitions to such an important concept! I'm being confused!
Thanks in advance.