Let $I$ be an ideal of $\mathbb{Z}$. Prove that $I = (m)$ for some $m ∈ \mathbb{Z}$.
My Attempt:
So $(m)=\{ am \, | \, a \in \mathbb{Z} \}$
If $m=0$ then $I=\{ 0 \}$ which is trivial.
1) If $m>0$, let $A \in I$ be the maximum in $I$. By division theorem, $A=xm+r$ where $x,r \in \mathbb{Z}$ and $0 \leq r <m$. If $r$ is anything besides zero, then $A$ wouldn't be the maximum. So $r=0$ by assumption, so $A=xm \in (m)$. So $I$ is a subset of $(m)$.
2) Let $am, bm \in (m)$ where $a,b$ are integers, then $am-bm= (a-b)m \in I$ since $a-b \in \mathbb{Z}$ and $I$ is an ideal of $\mathbb{Z}$. So $(m)$ is a subset of $I$.
3) If $m<0$, let $m=-n$ for some $n \in \mathbb{N}$ and let $A \in I$ be the minimum in $I$. By division theorem, $A=xm+r=-xn +r$ where $x,r \in \mathbb{Z}$ and $-n < x < \leq $. If $r$ is anything besides zero, then $A$ wouldn't be the minimum. So $r=0$ by assumption, so $A=-xn=xm \in (m)$. So $I$ is a subset of $(m)$.
4) Same as (2). So $(m)$ is a subset of $I$.
Hence $I=(m)$.
Now I know that for part 1 and 3, I was meant to say min for 1 and max for 3 which was a silly mistake I did in my exam. Also in 1 and 3, I didn't rearrange to $r$ so I could imagine this as lack of justification.
But please would you estimate a mark out of 7 for this. Surely I at least got one mark...