Necessary and Sufficient Condition for $\phi(i) = g^i$ as a homomorphism - Fraleigh p. 135 13.55 Let $g \in \text{ group } G $ and $n \in N$. Let $\phi : \mathbb{Z_n} \rightarrow G$ be defined by $\phi(i) = g^i$ for $0 \le i \le n$. Give a necessary and sufficient condition (in terms of g and n) for $\phi$ to be a homomorphism. Prove
your assertion. My $g =$ solution's $h$. I think $h$ is mismatched for group G.

(1.) Where does the necessary and sufficient condition spring up from? How do you preordain it?
(2.) How do you preordain to calculate $h^n$? I know homomorphism maps $0 \to id_G$.
(3.) I know if $|a| = n < \infty$ then $a^i = a^j \iff n | (i - j)$. However why not $<h> \simeq \mathbb{Z_n}$ ? 
(4.) In the same line as the purple underline, the solution used the Division Algorithm to induce $q_i, r_i$ for $i = 1,2$ such that  $i = q_1m + r_1$ and $j = q_2m + r_2$ for all $0 \le r_1,r_2 < m$.
Add these two equations: $i + j = (q_1 + q_2)m + r_1 + r_2$ for all $0 \le r_1 + r_2 < 2m$.
Hence why does the solution apply the Division Algorithm to $i + j$ to induce $i + j = qm +r, 0 \le r < m$? Isn't this redundant? 
 A: (1.) I think it is fairly obvious that $h^n = e$ after all $e = \phi(0) = \phi(n) = h^n$. Notice the forward direction of this proof is rather short. So, here we get a necessary condition. It turns out this condition is also sufficient, but notice the reverse direction is a longer proof. Thus the that fact that this is also sufficient may not be obvious to you, but you just have to try it. That is part of math. Sometimes to have to try to figure out what works.
(2.) We never need to compute $h^n$ we just we the fact that $\phi$ is a homomorphism. Let $\phi(1) = h$ since $\phi(1)$ has to been something let's call it $h$. Now use that $\phi$ is a homomorphism and remember that we write our group operation in $\mathbb{Z}_n$ additively. As I said above it may be clearer to you to read it in reverse like $e = \phi(0) = \phi(n) = h^n$ then is doesn't seem like the $h^n$ is coming out of nowhere.
You are exactly right your $g$ is this solutions $h$. So, their map looks like $\phi(i) = h^i$ which you can deduce from $\phi(1) = h$. Note any homomorphism $\phi: \mathbb{Z} \to G$ must look like this.
(3.) If $h^n = e$ then we have $|h|$ divides $n$, note we do not necessarily have $|h| = n$. This is why we have $\langle h \rangle \cong \mathbb{Z}_m$ for some $m$ dividing $n$.
(4.) You are right $i+j = (q_1 + q_2)m + (r_1 + r_2)$ with $0 \leq r_1 + r_2 < 2m$, but we want $i+j = qm + r$ with $0 \leq r < m$. The solution just uses the division algorithm to get this. Note if $r_1 + r_2 < m$ then $q = q_1 + q_2$ and $r = r_1 + r_2$, but if $r_1 + r_2 > m$ then we get $q = q_1 + q_2 + 1$ and $r = r_1 + r_2 - m$. So, $q$ and $r$ are related to $q_1,q_2$ and $r_1,r_2$. However there is no need for this argument and the solution used the division algorithm again to avoid it.
