# Internal direct sum of kernel of surjective homomorphism and cyclic subgroup

I'm studying for a qualifying exam in algebra, and my abstract algebra skills are quite rusty. I'm attempting to solve the following problem:

Suppose that $$\Phi:G\rightarrow\mathbb{Z}$$ is a surjective group homomorphism from the abelian group $$(G,+)$$ to the group of integers under addition. Let $$K$$ be the kernel of $$\Phi$$, and let $$g$$ be an element of $$G$$ for which $$\Phi(g)=1$$. Prove that $$G$$ is the (internal) direct sum of $$K$$ and the subgroup of $$G$$ generated by $$g$$.

I was initially thrown off by the fact that $$\Phi(g)=1$$, thinking this meant $$g\in K$$ as $$1$$ is typically used to denote the identity. However, the codomain here is $$(\mathbb{Z},+)$$, so the identity is actually the additive identity of the integers, $$0$$. Thus $$g\notin K$$. Which I believe makes it clear that $$K\cap\langle g\rangle=0$$ by a simple homomorphism argument (something to the effect of $$\Phi(ng)=\Phi(g)+\Phi(g)+\cdots+\Phi(g)=1+1+\cdots+1=n\neq0$$). What I'm stuck on is how to argue that $$G=K+\langle g\rangle$$. I can use the first isomorphism theorem to claim that $$\mathbb{Z}\cong G/K$$ and $$K\triangleleft G$$, but I'm not sure how this helps.

Edit: I must be thinking of something wrong, as it seems to me that $$\Phi(\langle g\rangle)=\mathbb{Z}_{\geq0}$$. But this doesn't allow the desired result, as $$\Phi$$ is surjective, meaning everything in $$\mathbb{Z}$$ gets mapped to, so specifically, $$\exists h\in G$$ s.t. $$\Phi(h)=-1$$. There's no way to write $$h=k+g'$$ where $$k\in K$$ and $$g'\in\langle g\rangle$$.

This is exactly the reason why I prefer to denote the identity of a general group by $$e$$. You can't confuse it with anything. In most books it is denoted by $$e$$ by the way.
Anyway, you want to show that $$G=K+\langle g\rangle$$. First of all it is clear that $$K+\langle g\rangle\subseteq G$$, because a sum of an element in $$K$$ and an element in $$\langle g\rangle$$ is a sum of two elements in $$G$$, hence it belongs to $$G$$. Now we want to show the other direction. Let $$h\in G$$. Denote $$n=\Phi(h)$$. Let's suppose $$n>0$$. Then:
$$\Phi(h)=n=1+...+1=\Phi(g)+...+\Phi(g)=\Phi(ng)$$.
Now denote $$k=h-ng$$. Then $$\Phi(k)=\Phi(h)-\Phi(ng)=0$$. So $$h=k+ng$$ where $$k\in K,ng\in\langle g\rangle$$.
Note that we assumed that $$\Phi(h)>0$$. Now if $$\Phi(h)<0$$ use the fact that $$\Phi(-h)>0$$, so $$-h$$ has the required representation. And if $$\Phi(h)=0$$ then $$h\in K$$ and then $$h=h+0\in K+\langle g\rangle$$.