sagemath_pari: Computational Number Theory with PARI/GP¶
This pip-installable distribution passagemath-pari
is a small
distribution that provides modules that depend on
PARI/GP, the computer algebra
system designed for fast computations in number theory: factorizations,
algebraic number theory, elliptic curves, modular forms, L-functions…
What is included¶
much of the p-adics functionality of the Sage library
parts of the quadratic forms functionality of the Sage library
various other modules with dependencies on PARI/GP, see MANIFEST
the
cypari2
APIthe binary wheels on PyPI ship a prebuilt copy of PARI/GP
the binary wheels on PyPI ship XEUS-GP, a Jupyter kernel for PARI/GP
Examples¶
Starting the GP calculator from the command line:
$ pipx run --pip-args="--prefer-binary" --spec "passagemath-pari" sage -gp
GP/PARI CALCULATOR Version 2.17.2 (released)
...
Using the pexpect interface to the GP calculator:
$ pipx run --pip-args="--prefer-binary" --spec "passagemath-pari[test]" ipython
In [1]: from sage.interfaces.gp import gp
In [2]: E = gp.ellinit([1,2,3,4,5])
In [3]: E.ellglobalred()
Out[3]: [10351, [1, -1, 0, -1], 1, [11, 1; 941, 1], [[1, 5, 0, 1], [1, 5, 0, 1]]]
Using the cypari2
library interface:
$ pipx run --pip-args="--prefer-binary" --spec "passagemath-pari" python
>>> import cypari2
>>> pari = cypari2.Pari()
>>> pari(2).zeta()
1.64493406684823
>>> p = pari("x^3 + x^2 + x - 1")
>>> modulus = pari("t^3 + t^2 + t - 1")
>>> fq = p.factorff(3, modulus)
>>> fq.lift().centerlift()
[x - t, 1; x + (t^2 + t - 1), 1; x + (-t^2 - 1), 1]
Available as extras, from other distributions¶
PARI/GP data packages¶
See https://pari.math.u-bordeaux.fr/packages.html for detailed descriptions.
pip install "passagemath-pari[elldata]"
pip install "passagemath-pari[galdata]"
pip install "passagemath-pari[galpol]"
pip install "passagemath-pari[nflistdata]"
pip install "passagemath-pari[nftables]"
pip install "passagemath-pari[seadata]"
pip install "passagemath-pari[seadata-big]"
pip install "passagemath-pari[seadata-small]"
Type¶
standard
Dependencies¶
$(PYTHON)
$(PYTHON_TOOLCHAIN)
conway_polynomials: Python interface to Frank Lübeck’s Conway polynomial database
cython: C-Extensions for Python, an optimizing static compiler
givaro: C++ library for arithmetic and algebraic computations
memory_allocator: An extension class to allocate memory easily with Cython
pari: Computer algebra system for fast computations in number theory
sagemath_categories: Sage categories, basic rings, polynomials, functions
Version Information¶
package-version.txt:
10.6.3
version_requirements.txt:
passagemath-pari ~= 10.6.3.0
Equivalent System Packages¶
(none known)