This is just a textbook problem from Dummit and Foote, but the issue is that our class barely touched on PIDs and the preceding material, so I don't really know or understand much.
Anyway,
Let $R$ be an integral domain. If $R$ satisfies the following:
i. any two nonzero $a,b \in R$ have a gcd in the form of $d=ra+sb, r,s \in R$
ii. If $a_1, a_2,...$ are nonzero in $R$ such that $a_{i+1}$ divides $a_i$ for every $i$ then $\exists N \in \mathbb{Z}$ such that $a_n$ is an unit times $a_N$ $\forall n \ge N$,
prove that $R$ is a principal ideal domain.
From what I've gathered, the second condition means that $(a_1) \subset (a_2) \subset...$ and $(a_N) = (a_n)$ $\forall n \ge N$. However, I'm not sure what I should do now. I'm worried that I'm lacking the necessary context here especially since we used Artin pretty much all semester.
In short, my question is: how should I proceed with this proof given what I know?
Assume that a non-zero ideal $I$ is not principal and take $a_1\in I$, $a_1\ne 0$. Since $I$ is not principal $(a_1)\subsetneq I$. Now take $b_1\in I-(a_1)$. The ideal $(a_1,b_1)$ is principal generated by $a_2=\gcd(a_1,b_1)$ (why?). Moreover, we have $(a_1)\subsetneq (a_2)$. Now take $b_2\in I-(a_2)$ and proceed as before: set $a_3=\gcd(a_2,b_2)$ and note that $(a_2)\subsetneq (a_3)$. This way you will contradict ii).