Let R be a pid and let p be a prime element of R. Let S be the elements of R that are not divisible by p. Let T be S inverse of R, or if you prefer, R localized about p. In other words, T is the ring of fractions with numerators from R and denominators from S. If this sounds familiar, it should. When R is the integers, and p is a prime number, T is the fractions whose denominators are not divisible by p. We've been working with this valuation ring all along.
Let H be an ideal in T and pull it back to an ideal in R. This ideal is generated by an element g, and g/1 generates H in T. Therefore T is also a pid.
If a/b is not in T, then p must divide b, and cannot divide a. Therefore b/a is in T, and T is a valuation ring. Since T is both a pid and a valuation ring, it is a dvr.
The valuation group of a dvr is Z, which embeds nicely in the reals. This determines a metric, and the fraction field F becomes a metric space.
As you recall, we were able to complete this metric space, and ask whether the completion produces any new algebraic elements. All these theorems are applicable here.
For example, let R = K[y], the polynomials in y over a field K. This is a pid. Let p(y) be an irreducible polynomial in R, a prime element in the pid. Let T be the fractions whose denominators are not divisible by p. This is a valuation ring inside the field F = K(y).
Now T is a dvr, and defines a metric on the field F. Let F′ be the completion of F. Does this bring in any new algebraic elements? Are there algebraic elements that are not present in F′?
Apply the proofs in the previous section. Find a q(x), with coefficients in K[y], that is irreducible in K[y], and has no polynomial c(y) satisfying q(c) = 0 mod p. If the leading coefficient of q is not divisible by p, then q has no roots in F′.
On the other hand, if there is a polynomial c(y) with q(c) = 0 mod p, and if c joins the coefficients of q to build a polynomial u(y) that is not divisible by p, then q has a root in F′, which was not present in F.
Let R be a pid, and let p generate a maximal ideal in R, hence p acts as the base for the valuation. An entity in R has valuation v if it is divisible by pv. The same holds for an entity in F, although v could be negative.
Let s be a cauchy sequence, an element in the completion of F. Select any v, and beyond some sn, the difference between sn and sj has valuation v or higher. In other words, sj = sn mod pv. Beyond n, sj is constant mod pv. Later on, s becomes constant mod pv+1, then it becomes constant mod pv+2, and so on. At each step we add a power of p times something in K, where K is the quotient field R/p. Let's replace s with a series that carries the same information. It looks something like 3+6p+4p2+0p3+5p4+p5+…
The series could start with some negative powers of p, perhaps 3/p2+4/p, but there are finitely many of these, because s becomes constant mod p0, and then there are no more fractions. So the canonical representative for any cauchy sequence is a laurent series, the sum of powers of p with coefficients in K.
In the case of the p-adic numbers, p is a specific prime, and the terms of the series are integers, except perhaps for a finite number of fractions at the start. When R = K[y], and p = y (an irreducible polynomial), the canonical representative for an element in the completion of K(y) is a formal laurent series in y.
In the reals, there is some overlap, e.g. 0.399999… = 0.400000… But there is no overlap in the p-adic completion. Suppose two series s and t differ in the coefficient on pj. The difference, s-t, admits an instance of pj, and perhaps instances of higher powers of p. The valuation is always j. Since s-t does not approach 0, s and t represent different entities in the completion.
The above is similar to adding two ddecimal numbers digit by digit, although there is no carry operation. The p-adic numbers include a carry operation, which flows to the right. If p = 7, then 3p2 + 6p2 becomes 2p2+p3. The p3 carries into the next term, as we add the series together.
Series are multiplied using the diagonal algorithm associated with polynomials. If both power series begin with a constant term, the coefficient on p3, in the product, is a0b3 + a1b2 + a2b1 + a3b0. In the case of the p-adic numbers, there may be a carry operation, which is folded into the computation of the coefficient on p4. The result is the same as that obtained by multiplying, term by term, the sequences of partial sums. They converge to the same thing, or more accurately, their difference converges to 0. The proof is rather technical, so I think I'll skip it.
Since multiplication behaves as expected under polynomial operations, and since division is well defined in a field, two series can be divided using synthetic division. The quotient times the divisor reproduces the dividend, so it must be right. Dividing laurent series is straightforward, at least in theory. When dividing p-adic numbers, you need to borrow from the higher power - the inverse of the earlier carry operation.
In summary, the completion of F, with respect to its valuation p, is the laurent series based on p, with coefficients in K. In some cases, polynomial arithmetic, with possible carry/borrow operations, implements addition, subtraction, multiplication, and division in the completion of F.
The valuation of F extends to F′, a complete metric space. The extension of R into R′ produces another pid.
This is often applied to the algebraic closure. Let E be the algebraic closure of F, and extend the valuation as above. The result is rarely a dvr, even when R is a dvr. Consider the polynomials in Zp[y]. The closure includes the square root of y, and the fourth root of y, and the eighth root of y, and so on. If y has valuation 1, these roots have valuations ½, ¼, and so on. The valuation group cannot equal Z.
Put this all together and a pid induces a valuation on its fraction field, which extends to a valuation on the completion of F as a metric space, which then extends to a valuation on the algebraic closure. We may not have a simple formula that computes the valuation, but a valuation exists nonetheless, and it is consistent with the valuation produced by R, and the completion of R.