# Sum of ideals in polynomial rings

Let $I = \lbrace g(X) \in \mathbb{Z} \;| \; g(0)\in 5\mathbb{Z}\rbrace$

Show that $I$ is an ideal in $\mathbb{Z}[X]$, and that $I = \langle 5\rangle + \langle X\rangle$.

From previous parts of the exercise, I've proved the following statements:

$5 \in \langle f(X)\rangle \Rightarrow n = 0\wedge a_0 \;|\; 5$

$X \in \langle f(X)\rangle \Rightarrow n \leq 1 \wedge (\;\langle X \rangle = \langle f(X)\rangle \vee \langle X\rangle = \mathbb{Z}[X]\;)$

I have proven the first part by checking that I is a subgroup of $\mathbb{Z}[X]$ and checking that $I$ is an ideal.

How do I go from here? I figure I can use the previously proven statements, but I'm not sure how. I know that the sum of ideals is the set containing the sum of one element from each ideal.

$\mathbb{Z}[X]$ is not a principal ideal domain, so not every ideal is of the form $\langle f(X)\rangle$. To see that $I\subseteq \langle 5\rangle +\langle X\rangle$, note that every element $g(X)$ of $I$ can be written as $h(X)+5n$ where $n\in\mathbb{Z}$ and $h(0)=0$. Then $h\in\langle X\rangle$ and $5n\in\langle 5\rangle$, so $g\in \langle 5\rangle +\langle X\rangle$. To see that $\langle 5\rangle + \langle X\rangle\subseteq I$, note that every element $g(X)$ of $\langle 5\rangle+\langle X\rangle$ is a sum of the form $h(X)+5n$ where $n\in\mathbb{Z}$ and $h\in\langle X\rangle$, meaning that $h(0)=0$. Thus $g(0)=h(0)+5n=5n\in 5\mathbb{Z}$, so $g\in I$.
Hint $\,\ g \in (x,5)\iff \overbrace{g\ {\rm mod}\ x}^{\Large g(0)}\in (x,5)\iff 5\mid g(0)$