Definition of semi-ring homomorphism I need the definition of semi-ring homomorphism. Thanks in advance!
 A: The definition should depend on your purposes, but I think that this should be the best definition:
$$f(a+b) = f(a) + f(b)$$
$$f(ab) = f(a)f(b)$$
$$f(0) = 0$$
$$f(1) = 1$$
Unlike with rings, you cannot deduce $f(0) = 0$ from the other axioms.
If you want to work with non-unital semirings, you might drop the last axiom.  But as far as I can tell, semirings are always defined to be additive monoids, in which case you definitely should not drop $f(0) = 0$.
A: For any sort of algebra, a homomorphism is a function that preserves the structure.
What do you consider to be the structure of a semiring? $0,1,+,\cdot$? Then the definition of homomorphism is any function $R \to S$ such that


*

*$f(0) = 0$

*$f(1) = 1$

*$f(a + b) = f(a) + f(b)$

*$f(a \cdot b) = f(a) \cdot f(b)$


The same is true for fields, groups, or whatever.
Aside: the definition of group homomorphism is usually presented in a different way. But it turns out that any function between groups that preserves $\cdot$ also preserves ${}^{-1}$ and $1$, so the above general notion also works in the group case.
Another aside: this is part of why people make a big deal about whether the existence of a multiplicative identity in a ring is specified by giving a constant $1$ that satisfies $\forall x: 1x=x1=x$, or by an existential statement like $\exists e \forall x: ex = xe = x$. The two different options lead to two different notions of ring homomorphism.
A: Just as for rings: $f(a+b)=f(a)+f(b), f(ab)=f(a)f(b)$.
