Title: URSS
1p-adic arithmetic
Fast Library for Number Theory -
Introduction
1) FLINT The Fast Library for Number Theory
(FLINT) is an open source, highly optimised C
library of functions for doing number theory. The
two main areas of functionality currently in
FLINT are polynomial arithmetic over the integers
and a quadratic sieve. FLINT is now used in SAGE
for computing modular forms.
with and . We
call a series of this form a p-adic number. Every
rational number has a p-adic expansion. The idea
behind p-adics was to introduce the theory of
power series expansions to number theory and is
based on the analogy between the integers Z and
polynomials in ZX.
3) My Project If we fix a prime p, the set of
all p-adic numbers forms a field, denoted .
Since this is a field, we can perform arithmetic
on elements of , such as , -, and .
The aim of my project was to design a module for
p-adics in FLINT, allowing users to perform basic
arithmetic on p-adics and other p-adic functions
such as finding n-th roots and powers of p-adics.
2) p-Adic Numbers Let p be a prime number and x
be a positive number. Then we can write x in the
form
with and .
For example, the 3-adic expansion of 44 is
. As soon as we
want to find the p-adic expansion of negative
numbers or fractions, we are forced to consider
infinite series
Research
1) Storing the p-Adic The problem with p-adics is
that many p-adic numbers have an infinite
expansion in p. Since a computer is only capable
of storing a finite amount of information this
means that in such cases it is necessary to
truncate the expansion after so many terms. For
example, if we wanted the infinite 3-adic
expansion of 17/5 but to precision 6, we would
write
. This gives us the possibility of
storing p-adics as an integer modulo some power
of p. We decided that this would be the best way
to proceed, as then performing arithmetic on
p-adics is reduced to the arithmetic of integers
and the optimised gmp arithmetic for integers can
be used.
2) Other Computer Algebra Systems Despite their
importance in number theory, not much work has
been done on implementing p-adics into computer
algebra systems so far. Looking at what other
software packages can do is important to see what
is already implemented and how fast these
implementations are. One of the main computer
algebra systems that supports p-adics is PARI. We
found that PARI can handle the basic operations,
but these are implemented for convenience, not
for speed each elementary operation involves
updating and a reduction mod . PARI can
deal with some transcendental functions with a
p-adic input such as the p-adic logarithm, but
several others such as the p-adic polylogarithm
have yet to be implemented.
Discussion
We first factor out the term in x to allow
us to store it as an integer. In the third step a
multiplication of integers is performed which
represents the multiplication of the p-adics. We
use similar steps to perform addition,
subtraction and division.
We decided to store p-adics internally as an
integer. So given the p-adics
and and,
say, we wanted , we would follow these
steps
- Find
and - Store the integers (16, -1, 3, 5) for x and (10,
0, 3, 5) - for y
- Calculate and
- Find the 3-adic expansion of 160,
- Multiply through by to get the 3-adic
expansion of
Future Developments The next stages are to
implement the algorithms we have researched into
FLINT. Then more advanced functionality can be
built in such as more transcendental functions
and ramified/unramified extensions. Another
example is dealing with polynomials with p-adic
coefficients. We found papers that give efficient
algorithms for polynomial factorisation with
p-adic coefficients. The FLINT website can be
found at www.flintlib.org
Daniel Ellam
Department of Mathematics University of Warwick
Supervisor Dr Bill Hart