I don't have a strong math background (engineering math) so I am at a bit of a disadvantage here but I have been trying to learn the broad strokes of Category Theory to help get a fuller picture of some of the Functional programming languages I use (Haskell, Scala, F#, etc.).
I am reading 'An Introduction to Category Theory' by Harold Simmons and ran into something in the first chapter regarding Monoids that leaves me a bit confused.
He states that a Monoid is a structure $(R, *, 1)$ where $R$ is a set, $*$ is a binary operation on $R$ and $1$ is an element of $R$ that functions as an identity element. So far, so good.
He goes on to state that a monoid morphism between two monoids:
$$p: R \to S$$
is a function that respects the structure of the monoids. He then explains that this means:
$$p(r*s) = p(r) * p(s),\quad\mathrm{and}\quad p(1) = 1$$
where $r$ and $s$ are elements of $R$.
The question I have is that this seems to make certain assumptions: specifically, that $R$ and $S$ are the same monoid. I say this since $p(r)$ is a morphism from $R$ to $S$ and $*$ is defined for $R$, but not necessarily for $S$.
Have I missed something here?
A more detailed way to write the statment (i.e. without abuse of notation) would be the following:
However, in most sources the subscript indicating the monoid we're in is left away to ease notation, as it is assumed that the reader can easily deduce it. You'll get used to it, don't worry.