Condition for Mapping between Structures to be Homomorphism

Theorem
Let $\struct {A, \odot}$ and $\struct {B, \circledast}$ be magmas.

Let $\struct {A \times B, \otimes}$ be the external direct product of $\struct {A, \odot}$ and $\struct {B, \circledast}$.

Let $\phi: A \to B$ be a mapping.

Let $\phi$ be considered as a subset of the Cartesian product $A \times B$.

Then:
 * $\phi$ is a homomorphism


 * the algebraic structure $\struct {\phi, \otimes_\phi}$ is a submagma of $\struct {A \times B, \otimes}$.
 * the algebraic structure $\struct {\phi, \otimes_\phi}$ is a submagma of $\struct {A \times B, \otimes}$.

Proof
Let $\phi$ be a homomorphism

Let $\tuple {a, b}, \tuple {c, d} \in A \times B$ such that:

Then:

That is:
 * $\struct {\phi, \otimes_\phi}$ is a closed subset of $\struct {A \times B, \otimes}$

which means the same thing as:
 * $\struct {\phi, \otimes_\phi}$ is a submagma of $\struct {A \times B, \otimes}$.

The argument reverses, so:
 * if $\struct {\phi, \otimes_\phi}$ is a submagma of $\struct {A \times B, \otimes}$

then:
 * $\phi$ is a homomorphism.