A regular local ring is a UFD.

The title gives the result whose proof I'm looking at. The proof is an induction on Krull dimension n, which uses the fact that a commutative Noetherian integral domain is a UFD if every rank 1 prime is principal. It all flows fine for me apart from one part.

A regular local ring $$R$$ is a commutative Noetherian domain in which the dimension of $$J / J^2$$, where $$J$$ is the unique maximal ideal, as a vector space over $$R / J$$ is equal to the rank of $$J$$.

Base case is easy. We assume the result for dimensions less than $$n$$ and consider a regular local ring $$R$$ with dimension $$n \geq 1$$. We denote its maximal ideal by $$J$$. We choose $$p \in J \setminus J^2$$ (we can do this by Nakayama's Lemma). By an earlier result we know that $$R / pR$$ is also a regular local ring. Since a regular local ring is an integral domain, $$pR$$ is a prime ideal and $$p$$ is prime. We let $$S = \{ p^n \colon n \in \mathbb{N} \}$$ and consider the ring $$R_S$$, which has Krull dimension strictly less than that of $$R$$.

We choose a rank 1 prime of $$R, A$$ (the goal is to show that it is principal). We can show that $$A R_S$$ is a projective $$R_S$$ module. Then, since $$A$$ is finitely generated over $$R$$, it is finitely generated over $$R_S$$, and hence has finite free resolution (we can find an exact sequence $$0 \to F_n \to \dots \to F_0 \to A R_S$$ where each $$F_i$$ is free). By a previous result we now know that $$A R_S$$ is stably free, i.e. there are finitely generated free $$R_S$$ modules $$F$$ and $$G$$ such that $$G \bigoplus A R_S \cong F$$.

Here is the one step in which the proof completely loses me. We want to conclude from what we've done so far that $$A R_S$$ is free. I understand everything that comes after that conclusion. However, it is claimed that we can apply a theorem of Kaplanksy to see this:

Let $$R$$ be a commutative integral domain and $$A$$ a nonzero ideal of $$R$$ such that $$A \bigoplus R^{n-1} \cong R^n$$ as $$R$$-modules. Then $$A$$ is a principal ideal of $$R$$.

The conclusion of this is that $$A$$ is principal, not free, while the proof here only uses the fact that $$A R_S$$ is free to conclude that it is principal, so immediately it seems like there's something wrong here. However it doesn't seem to be just a labeling issue as nothing in the immediate vicinity allows me to quickly conclude that $$A R_S$$ is free either. Does anyone know what result should be used here?

• For a domain $R$ we have an ideal $I$ is principal iff $I$ as a $R$ module is free of rank 1, that might help? This is just by taking the generator as a basis and vice versa. – user277182 Dec 12 '18 at 23:05

Let $$R$$ be a commutative domain, $$K$$ its fraction field, and $$A$$ a nonzero ideal of $$R$$. If $$A\oplus R^{n-1}$$ is free for some $$n$$, then the rank of $$A\oplus R^{n-1}$$ is $$n$$.
To see this, simply tensor with $$K$$, and we have that the rank of $$A\oplus R^{n-1}$$ is the dimension of $$(A\otimes_R K) \oplus K^{n-1}$$, which is $$n-1 + \dim A \otimes_R K$$, and $$A\otimes_R K \simeq K$$. Thus the rank of $$A\oplus R^{n-1}$$ is necessarily $$n$$ if $$A\ne 0$$ and $$A\oplus R^{n-1}$$ is free.
It's possible that the author forgot the precise statement of the theorem that they were citing, since a principal ideal in a commutative domain is certainly free of rank 1, and a free ideal in a domain is also certainly of rank 1 (as we can see by e.g. tensoring with $$K$$). Thus it doesn't make much difference whether the conclusion is that the ideal is free or the ideal is principal.