To write down a general
-adic element completely would require an infinite
amount of data. Since computers do not have infinite storage space,
we must instead store finite approximations to elements. Thus, just
as in the case of floating point numbers for representing reals, we
have to store an element to a finite precision level. The different
ways of doing this account for the different types of
-adics.
We can think of
-adics in two ways. First, as a projective limit
of finite groups:
Secondly, as Cauchy sequences of rationals (or integers, in the case of
Both of these representations give a natural way of thinking about
finite approximations to a
-adic element. In the first
representation, we can just stop at some point in the projective
limit, giving an element of
. As
,
this is is equivalent to specifying our element modulo
.
The absolute precision of a finite approximation
to
is the non-negative integer
.
In the second representation, we can achieve the same thing by truncating a series
at
As above, we call this
Given any
with
, we can write
where
and
. We could thus also store an element of
(or
) by storing
and a finite approximation of
.
This motivates the following definition: The
relative precision of an approximation to
is defined as the
absolute precision of the approximation minus the valuation of
.
For example, if
then the absolute precision of
is
, the valuation of
is
and the relative precision of
is
.
There are four different representations of
in SAGE and two
representations of
: