Let
r Î Q. Write
r = a/b where gcd
(a,b)=1. Let
  be a norm on
Q.
That means that
  is a function:
 : Q ®Q^{ ³ 0}
that satisfies certain properties:
 a+b  £ a + b for all a,b and  a  = 0 Û a = 0.
This gives rise to a distance function
d(a,b) = a  b
that satisfies the triangle inequality:
d(a,c) £ d(a,b) + d(b,c)
We use a norm to decide which elements of Q are thought of as small, i.e. close to 0. If two norms give rise to the same notion of smallness then we will call them equivalent. So two norms  _{1} and  _{2} are equivalent when:

The most familiar norm is the absolute value norm which we shall denote as  _{¥} (the reason for using a subscript in this notation is so we can distinguish it from other norms). When r=a/b is not zero, then r is very small in the in the absolute value norm if and only if r=0 or b has a lot more digits than a.
When a is a nonzero integer and p is a prime number, define the padic valuation as follows.
v_{p}(a) = largest n for which a º 0 mod p^{n}
If a=0 then v_{p}(a) is defined to be ¥. If r = a/b Î Q then define
v_{p}(r) = v_{p}(a)  v_{p}(b).
Now define the padic valuation norm  _{p} as follows. Take a number C > 1 and define:
 r _{p} = C^{vp(r)} for all r Î Q.
It is customary to take C=p in this defintion. Note that it does not matter which C you take, if you change C you get a different (but equivalent) norm as long as C > 1. Notice that: The valuation is high if and only if the norm is small.
Now  0 _{p} = 0 (this is why v_{p}(0) was defined to be infinity). The padic valuation norm  _{p} satisfies what is called the strong triangle inequality:
 a+b _{p} £ max( a_{p}, b_{p} ) in other words: d(a,c) £ max( d(a,b), d(b,c) ).
This will turn out to be very convenient for estimating errors when we work with approximations, because in the padic valuation norm, if we have two roundoff errors e_{1},e_{2} then the sum of the two errors e_{1}+e_{2} is in the  _{p}norm no greater than the maximum of the two errors.
Let (r_{i})_{i=1,2,¼} with r_{i} Î Q be an infinite sequence of rational numbers. If   is a norm, then this sequence is called a Cauchy sequence with respect to   when
"_{e > 0} $_{N > 0} "_{i,j > N}  r_{i}  r_{j}  < e
Two Cauchy sequences (r)_{i} and (s)_{i} are called  equivalent when:
"_{e > 0} $_{N > 0} "_{i > N}  r_{i}  s_{i}  < e
We can now define the completion of Q with respect to a norm   as follows:
Q^{c} is the set of all Cauchy sequences modulo  equivalence.
Note that any Cauchy sequence
r_{1},r_{2},¼ Î Q has
a limit in
Q^{c}, namely this limit is:

Theorem.
Denote
R as the completion of
Q with respect
to the absolute value norm.
Denote
Q_{p} as the completion of
Q with
respect to the
padic valuation norm.
If we consider any norms on
Q, then the only completions
of
Q that are fields are the following:
R, Q_{2}, Q_{3},Q_{5}, Q_{7}, Q_{11}, ¼
In other words: The absolute value norm, and the padic valuation norms for all prime numbers p give a completion Q^{c} of Q that is a field, and all such completions that are fields are obtained in this way.
If we took say
p=10 then in the completion of the integers
Z one would have zerodivisors (construct an element
a that is divisible
by arbitrarily high powers of 2, and construct
b that is divisible
by arbitrarily high powers of 5, and then
ab is divisible by arbitrarily
high powers of 10, so its valuation is infinity so
ab must be 0, and
hence
a and
b are zerodivisors). Because of this we will not use
10adic numbers in the algorithms. Notice that if we want to work in a
completion of
Q then there are infinitely many choices; there
is
R and furthermore there are infinitely many primes
p.
In many algorithms in computer algebra it is possible to use either
R or
Q_{p} but very often it is more convenient to use
Q_{p} . Notice that since there are infinitely many primes
p we can
always avoid finitely many primes that are inconvenient (like primes that
appear for example in the denominator, if we avoid those primes then we
never have to worry about negative valuations
r_{p} which makes the
algorithms much easier).
Completions of other fields.
We will look at another example. Consider the ring Q[x]. Define the xadic valuation as follows:
v_{x}(f) = largest n such that f º 0 mod x^{n}.
Again, if f=0 then the valuation is infinity. Now extend v_{x} to the field Q(x) by setting v_{x}(a/b) = v_{x}(a)  v_{x}(b). We can now define a norm  _{x} in the same way as before:
 f _{x} = C^{vx(f)}
where
C is chosen as some number greater than
1. So again: high
valuation
Û small norm.
Then we can define the completion of the ring
Q[x] with
respect to this norm. The result is denoted as:
Q[[x]] = the ring of formal power series in x.
The word formal refers to the fact that these power series do not need to be convergent. If we take the completion of the field Q(x) with respect to the norm  _{x} then we get a field denoted as:
Q((x)) = the field of formal Laurent series in x.
This field is the field of fractions of Q[[x]]. We have:
