I'm a newbie at category theory and just started reading Emily Riehl's Category Theory in Context. I got to the definition of functors, which contains the following two axioms: if $F:C\to D$ is a functor between categories, then
- For every composable pair of morphisms $f:x\to y$, $g:y\to z$ in $C$, $F(g\circ f)=Fg\circ Ff$
- For every object $c\in C$, $F\left(1_c\right)=1_{Fc}$
I'm concerned about the second axiom. For a group homomorphism $f:G\to G'$, it's enough to say that $f$ respects the group operation, and it follows from there that $f\left(1_G\right)=1_{G'}$. On the other hand, it's not enough to say that a ring homomorphism $g:R\to R'$ respects both addition and multiplication, for there exist maps that are both additive and multiplicative that don't preserve the multiplicative identity.
I tried coming up with a counterexample with a category consisting of one object and whose morphisms are the elements of a ring; however, this creates two identity morphisms (the additive and multiplicative identity). Even worse, these morphisms aren't necessarily associative.
Are there any examples of almost-functors that obey the first axiom but not the second?