In my textbook (Modern Algebra by John Durbin, 6th Ed), there is the following theorem:
Let $S$ denote any nonempty set. (a) Composition is an associative operation on $M(S)$, with identity element $\iota_S$. (b) Composition is an associative operation on the set of all invertible mappings in $M(S)$, with identity $\iota_S$.
Here, $M(S)$ denotes the set of all mappings from $S$ to $S$.
My question is simple: doesn't part (a) guarantee part (b)? After all, the set of all invertible mappings in $M(S)$ is simply a subset of all of the mappings in $M(S)$. Nonetheless, the author gives proofs for both parts of this theorem and doesn't address my point above. Where am I going wrong? Could someone confirm my reasoning or show my error by providing a counterexample perhaps?
First things first: It's easier for us if you would cite the result by its number in the book, rather than just saying that it comes from the book. This way, those of us who have the book in hardcopy can easily find it. It is Theorem 4.1 in Chapter I.
Also, the requirement that $S$ be nonempty is useless. I never understood why some people find it helpful to add such requirements. Almost no experts do this; the disease seems to be mostly spread across undergraduate-level texts.
Now, as for your question: You're saying that the associativity of the composition on invertible mappings follows from the associativity of the composition on all mappings, and thus its statement is redundant. This is true, and Durbin himself argues this way in the last paragraph of this proof. However, the statement that "Composition is an associative operation on a set $X$" doesn't just mean that composition is associative. It also means that composition is a welldefined binary operation $X \times X \to X$ (at least in this context); that is, it says that the composition of two elements of $X$ is again in $X$. So, in (b), it says that composition of two invertible mappings from $S$ to $S$ is again an invertible mapping from $S$ to $S$. This is what is really the point of part (b).