II.1. Show that α ∈ ℂ is algebraic if and only if |ℚ(α)∶ℚ|$<∞$. Deduce that 𝔸, the set of algebraic numbers in ℂ, is a subfield of ℂ. Assuming that the algebraic integers, $\barℤ$, form a ring, show that the field of fractions of $\barℤ$ is 𝔸.

If k = |ℚ(α)∶ℚ|$<∞$, then 1, α, …, αk ∈ ℚ(α) are linearly dependent, so α is algebraic.
If α is algebraic, there exists irreducible $f(x)∈ℚ[x]:f(α)=α^n+a_{n-1}α^{n-1}+⋯+a_0=0$.
[See Example 5.1] $⟨f(x)⟩$ is a maximal ideal, so $ℚ[x]/⟨f(x)⟩$ is a field, so $ℚ[α]=ℚ(α)$. By division algorithm {1, α, …, αn−1} span $ℚ[α]$. So |ℚ(α)∶ℚ|$=n<∞$.
Since 𝔸 is a field that contains $\barℤ$, we have $𝔸⊃\operatorname{Frac}(\barℤ)$.
If α ∈ 𝔸, there is a0, …, an ∈ ℤ such that$$a_nα^n+a_{n-1}α^{n-1}+⋯+a_0=0$$Multiplying through by $a^{n-1}_n$ gives a monic polynomial in $ℤ[a_nα]$$$(a_nα)^n+a_{n-1}(a_nα)^{n-1}+⋯+a_n^{n-1}a_0=0$$so $a_nα∈\barℤ$, so $α∈\operatorname{Frac}(\barℤ)$. Since α is arbitrary, $𝔸⊂\operatorname{Frac}(\barℤ)$, so $𝔸=\operatorname{Frac}(\barℤ)$.

II.2. Show that 2 is irreducible but not prime in $ℤ[\sqrt{-5}]$, and that 1 is a greatest common divisor of 2 and $1+\sqrt{-5}$. Do we have $⟨2⟩+⟨1+\sqrt{-5}⟩=ℤ[\sqrt{-5}]$? Is $2+2\sqrt{-5}$ a least common multiple of 2 and $1+\sqrt{-5}$? Does 6 have a unique factorisation into irreducibles? Does 2 have a unique factorisation into irreducibles?

If $a,b∈ℤ[\sqrt{-5}]$ satisfy $2=ab$, then $4=N(a)N(b)$ where $N(a),N(b)∈ℤ^+$, so $N(a),N(b)<5$, so $a,b∈ℤ$, so $a∼1$ or $b∼1$. So 2 is irreducible in $ℤ[\sqrt{-5}]$.
$2|m+n\sqrt{-5}$ iff $2|m,n$. So $2∤(1-\sqrt{-5})$ and $2∤(1+\sqrt{-5})$.
But $2|(1-\sqrt{-5})(1+\sqrt{-5})=6$. So 2 is not prime in $ℤ[\sqrt{-5}]$.
MSE
Let $a=\gcd(2,1+\sqrt{-5})$. Since $a|2$, $N(a)|N(2)=4$. Similarly $N(a)|N(1+\sqrt{-5})=6$, thus $N(a)|\gcd(4,6)=2$. There is no element with norm 2, hence $N(a)=1⇒a∼1$.
If $1=2r+(1+\sqrt{-5})s,r=a_1+b_1\sqrt{-5},s=a_2+b_2\sqrt{-5},a_1,b_1,a_2,b_2∈ℤ$, we compute \begin{align*}1=N(2r+s+s\sqrt{-5})&=(2a_1+a_2-5b_2)^2+5(2b_1+b_2+a_2)^2\\&≡(a_2+b_2)^2+(b_2+a_2)^2\\&≡0\pmod2\end{align*}contradiction$⇒1∉⟨2⟩+⟨1+\sqrt{-5}⟩⇒⟨2⟩+⟨1+\sqrt{-5}⟩≠ℤ[\sqrt{-5}]$.
$6=2⋅3=(1+\sqrt{-5})(1-\sqrt{-5})$ is a common multiple of 2 and $1+\sqrt{-5}$
But $N(2+2\sqrt{-5})=24$, so $2+2\sqrt{-5}∤6$, so $2+2\sqrt{-5}$ is not a LCM of 2 and $1+\sqrt{-5}$.
$6=2⋅3=(1+\sqrt{-5})(1-\sqrt{-5})$. It remains to prove $2,3,1±\sqrt{-5}$ are irreducible.
Let $x=a+b\sqrt{-5}|2$ and $x≁1$ then $N(x)|N(2)=4⇒b=0⇒a^2|4⇒a=2$, so 2 is irreducible, so 2 has a unique factorisation into irreducibles.
Let $x=a+b\sqrt{-5}|3$ and $x≁1$ then $N(x)|N(3)=9$, if $b=0$ then $a^2|9⇒a=3$; if $b=1$ then $a^2+5|9⇒a=2$ but $2+\sqrt{-5}∤3$ so 3 is irreducible.
Let $x=a+b\sqrt{-5}|1±\sqrt{-5}$ and $x≁1$ then $N(x)|N(1±\sqrt{-5})=6$, if $b=0$ then $a^2|6$ contradiction; if $b=1$ then $a^2+5|6⇒a=±1$ but $1±\sqrt{-5}$ doesn't divide each other, so $1±\sqrt{-5}$ are irreducible.
So 6 has non-unique factorisation into irreducibles.

II.3. Suppose that R is an infinite integral domain with finitely many units in which every non-unit has an irreducible factor. By emulating Euclid’s proof that there are infinitely many primes show that R contains infinitely many irreducible elements. Apply this to $𝔽_2[X]$ to deduce that there are arbitrarily large fields of characteristic 2.

Since \(R\) is not a field, it has at least one irreducible element, say \(p_1\). Suppose now that the set of associate classes of irreducible elements is finite, say with representatives \(p_1,p_2,…,p_r\) for the associate classes. Let \(a=p_1p_2…p_r\). Consider the set $S = \{ 1 + a, 1 + a^2, 1 + a^3, …\}$
Since $a$ is not a unit, \(a^n≠±1\) for any \(n\).
Since \(a≠0,1 - a^{n-m}≠0\) and R is an integral domain,\[(1 + a^m) - (1 + a^n) = a^m(1 - a^{n-m})≠0\]Thus, all the \(1 + a^n\) are distinct. Thus, \(S\) is an infinite set of distinct nonzero elements.
Since there are only finitely many units in \(R\), there exists \(n\) such that \(1 + a^n\) is not a unit.
Since every non-unit has an irreducible factor, \(1 + a^n\) has an irreducible factor, say $p_i$.
But \(p_i | a^n\) and \(p_i | 1 + a^n\), so \(p_i | 1\), a contradiction.
Applying this to $𝔽_2[X]$, we deduce that there are infinitely many irreducible elements.
Since elements of degree < n are finite, ∃ irreducible $f(X)∈𝔽_2[X]$ of degree > n.
[See Example 5.1] $⟨f(X)⟩$ is a maximal ideal, so $𝔽_2[X]/⟨f(X)⟩$ is a field of characteristic 2 and cardinality > 2n.

II.4. Show that if R is an integral domain in which every ideal is finitely generated then R has the ACCP. Assuming that the algebraic integers, $\barℤ$, form a ring, show that it has no irreducible elements and deduce that not every ideal in $\barℤ$ is finitely generated.

Factorization in Domains - factor_lecture.pdf
Integral domains are PID ⟺ Bezout & ACCP
Consider a chain $I_1⊂I_2⊂I_3⊂⋯$ of ideals in R and let $I=⋃_{k∈ℕ}I_k$, also an ideal in R, so $I$ is finitely generated: $I=⟨a_1, a_2, …, a_m⟩$. Since each $a_i$ must belong to some $I_k$, the right-most of these, $I_n$, contains all of the $a_i$, and hence $I$. That is $$ I⊂I_n⊂I_{n+1}⊂I_{n+2}⊂⋯⊂I, $$ proving that each of these inclusions is an equality, and that the chain stabilizes.
For non-unit $α∈\barℤ$, wlog α > 0. As $α=\sqrtα⋅\sqrtα$, we show $\sqrtα∈\barℤ$ then α is not irreducible.
$α∈\barℤ⇒∃a_i∈ℤ:α^n+a_{n-1}α^{n-1}+⋯+a_0=0$
$⇒{\sqrtα}^{2n}+a_{n-1}{\sqrtα}^{2(n-1)}+⋯+a_0=0⇒\sqrtα∈\barℤ$
Suppose every ideal in $\barℤ$ is finitely generated, by first part, $\barℤ$ has the ACCP, by Prop 3.32, every x ∈ $\barℤ$* has a factorisation into irreducibles, contradicting that it has no irreducibles.

II.5. Draw a picture to explain why for every z ∈ ℂ there is w ∈ ℤ[i] with |zw|$≤1/\sqrt2$. Hence show that the function f(a + bi) ≔ |a + bi|2 is a Euclidean function on ℤ[i], and use this to find z, w ∈ ℤ[i] such that d ≔ 2z + (3 − 5i)w has $d|2$ and $d|3-5i$ in ℤ[i]. Is the function $f(a+b\sqrt{-5})≔\left|a + b\sqrt{-5}\right|^2$ a Euclidean function on $ℤ[\sqrt{-5}]$? Is the function $f(a+b\sqrt{-2})≔\left|a+b\sqrt{-2}\right|^2$ a Euclidean function on $ℤ[\sqrt{-2}]$?

Error! Click to view log. Clearly f ≥ 0. If $a|b$, $\frac ba∈$ℤ[i]*$⇒f(a)⩽f(a)f\left(\frac ba\right)=f(b)$
If a, b ∈ ℤ[i]*, ∃q ∈ ℤ[i]: $f\left(\frac ab-q\right)≤2\left(\frac12\right)^2=\frac12$$$f(a-bq)≤\frac{f(b)}2<f(b)$$Hence f is a Euclidean function on ℤ[i].\begin{array}l(3-5i)/2=1.5-2.5i\\3-5i=2×(1-3i)+1+i\\2=(1+i)×(1-i)\\⇒d=1+i=2×(-1+3i)+(3-5i)\end{array}
Let $a,b∈ℤ[\sqrt{-2}]$*, we'll find $q∈ℤ[\sqrt{-2}]$ such that ${|a-bq|}<b$.
Let $ab^{-1}=c+di,\,c,d∈ℝ$. Let $c',d'$ be the closest integer to $c,d$. Let $q=c+d\sqrt{-2}$.\begin{align*}f(a-bq)&=f(b)f(ab^{-1}-q)=f(b)f\left((c-c')+(d-d')\sqrt{-2}\right)\\&=f(b)[(c-c')^2+2(d-d')^2]\\&≤f(b)[(1/2)^2+2(1/2)^2]<f(b)\end{align*}(…the rest is same as ℤ[i] proof). Hence f is a Euclidean function on $ℤ[\sqrt{-2}]$.
By II.2 $ℤ[\sqrt{-5}]$ is not UFD, so it is not ED. Alternatively, the ideal $⟨3,2+\sqrt{-5}⟩$ is not principal [Suppose $⟨3,2+\sqrt{-5}⟩=⟨a⟩$, then $a≁1$ and $a|3⇒a=±3$, but $a∤2+\sqrt{-5}$], so $ℤ[\sqrt{-5}]$ is not PID, so it is not ED.
Why is $ℤ[\sqrt{-n}],n≥3$ not a UFD?
Prove that $ℤ[\sqrt{-2}]$ is a Euclidean domain and $ℤ[\sqrt{-10}]$ is not
For which $d<0$ is $ℤ[\sqrt{d}]$ an Euclidean Domain?
Specific way of showing $ℤ[\sqrt{-d}]$ is not a Euclidean Domain when $d>2$

II.6. Suppose p is prime in ℤ. Show that if there are a, b ∈ ℤ such that p = a2 + b2 then a + bi is prime in ℤ[i], and if there are no such a and b then p is prime in ℤ[i].

Suppose $a+bi=uv,u,v∈$ℤ[i]. Taking norm in ℂ, $p=N(u)N(v)$ is prime in ℤ, so $N(u)$ or $N(v)$ is 1, so $u$ or $v$ is a unit, so $a+bi$ is irreducible in ℤ[i], by Prop 3.21 it is prime in ℤ[i].
If ∃u, v not units, $p=uv$, taking norm, $p^2=N(u)N(v)$, but $N(u),N(v)>1$, so $N(u)=p$.
Writing u = a + ib, a, b ∈ ℤ, then this says $a^2+b^2=p$.
Part IB — Groups, Rings and Modules

II.7. Use the fact that every irreducible element of ℚ[X] is prime in ℚ[X] to show that every irreducible element of ℤ[X] is prime in ℤ[X].

ℚ[X] is a Bezout domain, so every irreducible in ℚ[X] is prime.
Let f be non-constant, irreducible in ℤ[X], by Gauss' lemma, f is irreducible and primitive ℚ[X], but ℚ[X] is Bezout domain, so f is prime in ℚ[X].
Suppose g, h ∈ ℤ[X], $f|gh$, since f is prime in ℚ[X], wlog $f|g$ in ℚ[X]. Since f is primitive, $f|g$ in ℤ[X].

II.8. Show that ℤ[X] has the ACCP, and combine this with the previous exercise to deduce that ℤ[X] is a unique factorisation domain.

Let $f_{n+1}|f_n\,∀n≥1$ in ℤ[X] and $a_n$ be the lead coefficient of $f_n$.
$a_{n+1}|a_n$, since ℤ has ACCP, $∃N,∀n≥N:a_n∼a_N$
$(\deg f_n)$ is a decreasing sequence in ℕ, so $∃N'≥N,∀n≥N':\deg f_n=\deg f_{N'}⇒f_n∼f_N$
ℤ[X] has the ACCP, Prop 3.32 tells us that every element of ℤ[X]* has a factorisation into irreducibles. By II.7 every irreducible in ℤ[X]* is prime, the result follows from Prop 3.14.

II.9. Suppose that R is an integral domain. Show that R is a PID if and only if there is a function f : R* → ℕ0 with $f(a)≤f(b)$ whenever $a|b$; and such that if a, bR* then either $b|a$, or there are x, yR and rR* with $ax=by+r$ and $f(r)<f(b)$.

Suppose $I$ is a non-zero ideal. Let $b∈I$ have $f(x)$ minimal, and suppose that $a∈I$.
If $a∉⟨b⟩$ then there is x, yR and rR* with $ax=by+r$ and $f(r)<f(b)$, so $r∈I$, contradicting minimality of $f(b)$.

II.10. Suppose that R is an integral domain with the ACCP in which every maximal ideal is principal. Show that R is a PID.

A local Noetherian ring with principal maximal ideal implies PIR?
Every maximal ideal is principal. Is R principal?
Integral Domains, Modules and Algebraic Integers Hilary Term 2012
Algebraic Number Theory
THE GAUSSIAN INTEGERS, Keith Conrad
Since the union of a nested chain of non-principal ideals is a non-principal ideal, let $I$ be maximal among all non-principal ideals, by Krull's Theorem ∃ maximal ideal $J$ such that $I⊂J$, then $J$ is principal, let $J=⟨a⟩$. Let $x_1∈I$, since $x_1∈J$, $∃x_2∈J:x_1=ax_2$, by lemma $I$ is prime ideal, $a∉I$, so $x_2∈I$, ⋯we get $x_{i+1}|x_i$ and $x_{i+1}≁x_i$, contradiction ACCP.
Lemma. R is a commutative ring. If U is maximal among non-principal ideals, U is prime.
Proof. Let $U$ be maximal among all non-principal ideals of $R$. Suppose $∃a,b∉U:ab∈U$.
Since $U⊂U+⟨a⟩$ and $a∈U+⟨a⟩$, we have $U⊊U+⟨a⟩$, so $U+⟨a⟩=⟨c⟩$, for some $c∈R$.\begin{array}{rll} c∈U+⟨a⟩\mmlToken{mo}[rspace=0]⟹&c=u+ra&\text{for some $u∈U$ and $r∈R$}\\ ⟹&bc=b(u+ra)=bu+r(ab)∈U&\text{since $ab∈U$}\\ ⟹&b∈\{x∈R|cx∈U\}≕V \end{array} Since $U⊂V$, and $b∈V∖U$, we have $U⊊V$, so $V=⟨d⟩$ for some $d∈R$.
For any $u∈U$, \begin{array}{rll}U⊂U+⟨a⟩=⟨c⟩\mmlToken{mo}[rspace=0]⟹&u=cy&\text{for some $y∈R$}\\ ⟹&cy∈U\\ ⟹&y∈V=⟨d⟩&\text{by definition of $V$}\\ ⟹&y = dz&\text{for some }z∈R\\ ⟹&u=c(dz)\\ ⟹&u∈⟨cd⟩\\ \end{array} Thus, $U⊂⟨cd⟩$.
Also, since $d∈V$, by definition of $V$, we get $cd∈U$, hence $⟨cd⟩⊂U$.
But then $U=⟨cd⟩$, contrary to the assumption that $U$ is not principal.
It follows that $U$ is prime.
exercise 10 from chapter 1, section 1, Kaplansky−Commutative Rings, Rev Ed (1974)
Maximal (among non-principal ideals) Ideal Must be Prime
Alternate proof:
Let $I_0$ be a non-principal ideal, since $\{0\}$ is a principal ideal, $I≠\{0\}$, let $x_0∈I_0∖\{ 0\}$. Suppose we have non-principal ideals $I_0⊂…⊂I_n$ with non-zero $x_i∈I_i∖\{0\}$ with $x_i|x_{i-1}$ and $x_i≁x_{i-1}$. Since $R$ is a principal ideal in $R$, $I_n≠R$, by
Krull's Theorem ∃ maximal ideal $⟨d_n⟩$ such that $I_n⊂⟨d_n⟩$, define $f_n(x)=d_nx$, then $∀x∈I_n:x∈⟨d_n⟩⇒f_n^{-1}(x)≠∅$, also $f_n$ is 1-1 since R is integral domain. Let $I_{n+1}=f_n^{-1}(I_n)$.
Then $I_{n+1}$ is an ideal containing $I_n$ [since $∀x∈I_n:x∈f^{-1}(d_nx)$ where $d_nx∈I_n$].
Since $x_n∈⟨d_n⟩$, $∃x_{n+1}∈I_{n+1}$ such that $x_n=x_{n+1}d_n$
$I_{n+1}$ not principal, [suppose $I_{n+1}=⟨w⟩$, then $I_n=d_n(I_{n+1})=⟨d_nw⟩$ is principal]
By induction on n, we have $⋯|x_1|x_0$ and $x_i≁x_{i-1}$, contradicting ACCP.