Showing that $\mathbb{Z}[\sqrt{6}]$ and $\mathbb{Z}[\sqrt{7}]$ are PID's using number theory

I have to show that the class number of $K=\mathbb{Q}(\sqrt{6})$ and $L=\mathbb{Q}(\sqrt{7})$ is 1, i.e. that the ring of integers of $K$ and $L$ ($\mathbb{Z}[\sqrt{6}]$ and $\mathbb{Z}[\sqrt{7}]$ respectively) are PIDs. I've never done such an exercise and I'm having some troubles.

In Algebraic Theory of Numbers, by Pierre Samuel, I've found the following tips:

  1. first notice, using the Minkowski's bound, that every ideal class (of $K$ and $L$) contains an integral ideal of norm 1 or 2.
  2. Show that both $K$ and $L$ contain a principal ideal of norm $2$ if and only if there exist $a,b \in \mathbb{Z}$ such that $a^2-6b^2 =2$ or $-2$.
  3. Deduce that the ring of integers of $K$ and the ring of integers of $L$ are PIDs.

The first part is simple as the Minkowski's bound is $<3$.

About the second part: I can compute the norm of an integral element that is of the form $x=a+b\sqrt{6}$. The norm of the principal ideal generated by $x$ is the absolute value of the norm of the element, so I can conclude.

But now how can I deduce 3)?

I know that there are similar questions, but I'd like to solve it the way this book suggests, as I've been studying on this book! Thank you


Remember that a prime ideal $P$ has norm a power of a prime $p$ if and only if $P$ is lying above $p$ (that is appears in the decomposition of $pO_K$)

[Quick proof. If $O_k/P$ has order $p^m$, then $p^mO_K=(pO_K)^m \subset P$, so $p^m\in P$. Since $P$ is a prime ideal$ ,p\in P$, meaning that $P$ divides $pO_K$ by the rule "containing is dividing". The converse is clear by taking norms.]

Now since your extension is Galois, the Galois group acts transitively on the set of prime ideals lying above a fixed prime $p$. In particular, if ONE prime ideal lying above $p$ is principal, ALL of them are.

It follows from your work that all prime ideals of norm $2$ are principal. Now, since any ideal class is represented by an ideal of norm $1$ or $2$, it follows that every ideal class is trivial, hence your field is a PID.