Advanced Number Theory

module DirichletSeries

DirichletSeries.hs
A Dirichlet series is a series of the form a1/1s+a2/2s+...+an/ns+...
Dirichlet series are important in multiplicative number theory because of the way they multiply together. If (an) and (bn) are Dirichlet series, then their product (cn) is given by
cn=sum {adbn/d s.t. d divides n}.
If we consider Dirichlet series as generating functions for various multiplicative functions, we find many interesting relationships between them. For example, the Riemann zeta function is the Dirichlet series (an) where an=1 for all n. If we consider the Dirichlet series zeta(s)*zeta(s), then from the above we know that its coefficients are cn = sum {adbn/d}. But in this case am and bm are 1 for all m, so we find that cn is a sum of d(n) 1s, where d(n) is the number of divisors of n. Hence zeta(s)*zeta(s) is a Dirichlet generating function for the d (number of divisors) function.
Exports
Examples
zeta s / zeta (2*s) returns DS [1,1,1,0,1,1,1,0,0,1,1,0,1,1,1,0]. This is the DGF for the function which returns 1 if a number is squarefree, 0 otherwise.

module QuadraticField

QuadraticField.hs
Still under development
This module contains code for working with quadratic extension fields of the rationals, that is, fields of the form QQ(sqrt d), formed by adjoining an irrational square root to the rationals.
Exports
Examples

module NonArchimedean

NonArchimedean.hs
This module contains code for working with p-adic numbers - a completion of the integers or rationals using a non-archimedean metric rather than the usual metric which leads to the reals.
(See introduction to p-adic numbers for more explanation.)
Exports
data Qp - the class of p-adic rationals, for which the usual arithmetic operations +, -, *, / are defined.
toQp p x - convert the rational x to its p-adic representation.
solvePolyQp p f - use Hensel's lemma to find p-adic solutions to a polynomial with coefficients in QQ, if they exist.
normQp x - the p-adic norm logQp x - p-adic logarithm defined by power series - only converges for normQp (x-1) < 1
expQp x - p-adic exponential defined by power series - only converges for normQp x < (1/p) ^ 1/(p-1)
iwasawaLog x - continuation of log to whole of Qp*
Examples
toQp 5 (1/2) returns Qp 5^0 [3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2] - alternatively, we can show this another way as:
showQp' (toQp 5 (1/2)), which returns:
"3*5^0 + 2*5^1 + 2*5^2 + 2*5^3 + 2*5^4 + 2*5^5 + 2*5^6 + 2*5^7 + 2*5^8 + 2*5^9 + 2*5^10 + 2*5^11 + 2*5^12 + 2*5^13 + 2*5^14 + 2*5^15 + O(5^16)"
solvePolyQp 5 (x^2 - 11) returns [Qp 5^0 [1,1,2,0,0,2,0,3,3,2,0,1,4,3,2,3],Qp 5^0 [4,3,2,4,4,2,4,1,1,2,4,3,0,1,2,1]], which are the 5-adic square roots of 11.
solvePolyQp 5 (x^2 + 1) returns the two 5-adic square roots of -1:
[Qp 5^0 [2,1,2,1,3,4,2,3,0,3,2,2,0,4,1,3],Qp 5^0 [3,3,2,3,1,0,2,1,4,1,2,2,4,0,3,1]]
solvePolyQp 5 (x^2 - 2) returns [], because 2 does not have square roots among the 5-adic integers.

module ModularForms

ModularForms.hs
Still under development
This module contains code for investigating number-theoretic properties of modular forms.

module EllipticCurves

EllipticCurves.hs
Still under development
This module contains code for investigating elliptic curves, especially over finite fields.
Exports
Examples
There is more code in this module. There is code to count the number of points on a curve over Fpk, in order to confirm the prediction of the zeta function. However, this code is slow, and not really ready for prime time. There is also code to calculate the L-function of an elliptic curve using Hecke characters. This is still under development, and currently only works for the curve y2 == x3-n2x