Prove the following ideal $I$ is not a principal ideal. Prove the ideal $I = \left<X^2,3\right> \space $of$ \space \mathbb{Z}[X]$ is not a principal ideal.
The solution I have been given is the following:
Assume for contradiction that I were a principal ideal, i.e., $I = \left<f(X)\right>$ for some $f(X) \in \mathbb{Z}[X]$. This means that 
$$f(X) = 3 \cdot g(X) + X^2 \cdot h(X), \tag{1}$$
$$3 = f(X) \cdot k(X), \tag{2}$$
$$X^2 = f(X) \cdot s(X), \tag{3}$$
for some polynomials $g(X), h(X), k(X)$ and $s(X)$ in $\mathbb{Z}[X]$. As $\mathbb{Z}$is an integral domain, the equation $(2)$ implies that $0 = \deg(3) = \deg f(X) + \deg k(X)$, whereby $\deg f(X) = 0$, i.e., $f(X)$ is a constant polynomial, say $f(X) = n \in \mathbb{Z}$. Next, the equation $(1)$ implies that $n = f(0) = 3g(0)$,
whereby $n \in 3 \mathbb{Z}$. Thus, all the coefficients of $n \cdot s(X)$ are in $3\mathbb{Z}$, contradicting the fact that this is supposed to equal $X^2$ by the equation $(3)$.
Could someone help me break this down a bit please. I am struggling to come to terms with the definition of a degree. These are the current definitions I have in simple terms:
Ideal - A subring which agrees with the relevant axioms
Principal ideal - If $I$ is generated by a set with only one element
Apologies if this seems quite vague. TIA
 A: The degree of a polynomial $f(x)=a_nx^n+\cdots+a_0$ (where $a_n\neq 0$) is by definition $n$, the highest exponent of $x$ in the expression of $f$. If $f(x)=a_nx^n+\cdots+a_0$ and $g(x)=b_mx^m+\cdots+b_0$ are polynomials, then we have $$f(x)g(x)=a_nb_mx^{n+m}+\cdots+a_0b_0,$$ so that $\deg(fg)=\deg f+\deg g.$ Observe also that the polynomials $f$ with $\deg f=0$ are exactly the constant polynomials.
Now let's take a look at the proof you've presented. Assume for a contradiction that $(3,x^2)=I=(f(x)).$ Since $3,x^2\in I=(f(x)),$ we can write $$3 = f(x)\cdot k(x)$$ and $$x^2 = f(x)\cdot s(x)$$ for some $k(x),s(x)\in\mathbb Z[x].$ Now, since $3 = f(x)\cdot k(x),$ we have $0=\deg 3 = \deg(fk)=\deg f+\deg k.$ This forces $\deg f=\deg k=0,$ since degrees are always nonnegative. [Your proof says "since $\mathbb Z$ is an integral domain." This may as well be good justification, but I my justification is just as good.] Hence $f$ is constant, and in fact equals $\pm 3$ since the equation $3=f\cdot k$ means $f$ divides $3.$ However we also have $x^2=f(x)\cdot s(x)$. Since $f=\pm 3$, this means all the coefficients of $f(x)s(x)$ are divisible by $3.$ But this is not true of $x^2.$ This is a contradiction, and it completes the proof.
You'll notice we never used the equation $f(x)=3\cdot g(x)+x^2\cdot h(x).$
Hope this helps.
A: I'll assume you are happy with the first line.
Equation (1) is saying $f$ must be a combination of the generators given. Similarly, equations (2) and (3) say the generators given must be recoverable from $f$. Thus, the equations together give equality.
The degree of a univariate polynomial in $x$ is simply the highest power of $x$ occuring (so with nonzero coefficient). This is a useful tool allowing us to make the deductions in the next paragraph. That is, if $g = fk$, then $\deg g = \deg f + \deg k$, as used in the case $\deg g = 0$ to force, in particular, $\deg f = 0$.
Finally, substituting $X = 0$ in equation 1 forces $n$ to be a multiple of 3, deriving a contradiction in equation 3.
Is it now clear? If not, what in particular could I explain better?
