"Term Rewriting and All That" - Exercise 3.10
I am studying Term Rewriting by reading <PERSON>/Nipkow's book "Term Rewriting and All That". I am in chapter 3 - Universal Algebra, in the section 3.2 - Algebras, homomorphism and congruences. I am trying to do exercise 3.10:
Let $\mathcal{Z}$ be the additive group of integers.
(a) - Determine all subalgebras of $\mathcal{Z}$ and all congruences on $\mathcal{Z}$.
(b) - Characterize those subsets of $\mathbb{Z}$ of cardinality 2 that generate $\mathcal{Z}$.
(c) - Given the integers $a, b, c \in \mathbb{Z}$, we define the mapping $h_{}: \mathbb{Z} \rightarrow \mathbb{Z}$ by: $$h_{(a, b, c)}(z) := az^2 + bz + c.$$ For what triples (a, b, c) is $h_{(a, b, c)}$ an endomorphism of $\mathcal{Z}$?
(d) - Given the integers $a, b$, we define the mapping $g_{(a, b)}: \mathbb{Z} \times \mathbb{Z} \rightarrow \mathbb{Z}$ by $$ g_{(a, b)}(z_1, z_2) := a z_1 + b z_2 .$$ Show that $g_{(a, b)}$ is a homomorphism of the direct product $\mathcal{Z} \times \mathcal{Z}$ into $\mathcal{Z}$. For what tuples $(a, b)$ is $g_{(a, b)}$ onto?
I think I was able to do items (a), (b) and (c), but I am having problems with item (d).
For item (a):
The subalgebras of $\mathcal{Z}$ are all of the form $\mathcal{nZ}$ where the carrier is $\mathbb{nZ} \ := \ { n z \ |\ z \in \mathbb{Z} }$. This subalgebra is generated by ${ n }$.
The congruences on $\mathcal{Z}$ are all of the form $\equiv_{n} := \ {(z_1, z_2) \ | \ n \text{ is a divisor of } z_1 - z_2 }$.
For item (b):
A subset of cardinality 2 ${ z_1, z_2 }$ generates $\mathbb{Z}$ if and only if it generates {1}. 610
This happens if and only if $gcd(z_1, z_2) = 1$. So, the subsets of $\mathbb{Z}$ of cardinality 2 that generate $\mathcal{Z}$ are of the form ${z_1, z_2 \ | \ gcd(z_1, z_2) = 1 }$.
For item (c):
It suffices to guarantee that $h(z_1) + h(z_2) = h(z_1 + z_2)$ for all $z_1, z_2$. Notice that:
$h(z_1) + h(z_2) = a (z_{1}^{2} + z_{2}^2) + b (z_1 + z_2) + c $
$h(z_1 + z_2) = a (z_{1} + z_{2})^2 + b (z_1 + z_2) + c$
Since this equality must hold for all $z_1, z_2$, we must have $a (z_{1}^{2} + z_{2}^2) = a (z_{1} + z_{2})^2$ for all $z_1, z_2$. This is only possible if $a = 0$. There are no restrictions on $b$ and $c$. So, the triples ${(0, b, c) }$ make $h_{(a, b, c)}$ an endomorphism of $\mathcal{Z}$. 610