Showing that an integral domain is a PID if it satisfies two conditions 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?
 A: 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).
A: Here's a slightly different spin.


*

*Condition i) says that given any two elements, $a,b$, there exists $d$ such that $(d)=(a,b)$. So, every $2$-generated ideal is principal.

*By induction, you can use the last point to conclude that every finitely generated ideal of  $R$ is principal.

*Condition ii) says that $R$ satisfies the ascending chain condition on principal ideals of $R$, but in view of the last point we can say more: the ascending chain condition for finitely generated ideals holds.

*This allows us to show in fact that all ideals are finitely generated, for if an ideal $I$ had a minimal infinite generating set $x_1,x_2\dots$, then $(x_1)\subset(x_1,x_2)\subset\dots(x_1,x_2,x_3\dots)$ would be a strictly increasing chain of finitely generated ideals, which is forbidden by the last point. Thus $I$ had to be finitely generated to begin with.

*But now recall that the finitely generated ideals are principal, so all ideals are finitely generated and now principal. Thus you have a PID.

A: maybe the clue is that condition 1 implies that any two elements of an ideal must be contained in a principal ideal (else they generate the whole ring). if all elements are in this principal ideal you are done. otherwise choose an element that is not, and apply the same procedure to this element and the generator of the principal ideal from step 1. the second condition is there to make sure this process must eventually halt.
