PARI reference

Every PARI function, its ER2 name, and whether the prelude exposes it. Generated from er2/data/pari_functions.csv.

PARI functions and their ER2 names

Generated by tools/sync_pari_functions.py from the libpari bundled with cypari2 (PARI 2.17.2). Do not edit by hand: edit er2/data/pari_functions.csv and re-run the script.

Status Meaning Count
prelude top-level ER2 name (in the prelude) 31
namespace available as pari.<er2_name> 946
wrapper needs an ER2 wrapper (takes GP code; not a cypari2 method) 26
python not exposed: Python or its ecosystem already covers it 165
conflict not exposed yet: naming conflict to resolve 0
total 1168

1. Programming in GP (126)

PARI ER2 Status Note Description
addhelp python use Python add/change help message for the symbol sym
alarm python use Python if code is omitted, trigger an “e_ALARM” exception after s seconds (wall-clock time), cancelling any previously set alar…
alias python use Python defines the symbol newsym as an alias for the symbol sym
allocatemem python use Python allocates a new stack of s bytes
apply python use Python apply function f to each entry in A
arity python use Python return the arity of the closure C
break python use Python interrupt execution of current instruction sequence, and exit from the n innermost enclosing loops
breakpoint python use Python interrupt the program and enter the breakloop
call python use Python A being a vector, evaluates f(A[1],…,A[#A])
dbg_x python use Python print inner structure of A, complete if n is omitted, up to level n otherwise
default python use Python returns the current value of the default key
errname python use Python returns the type of the error message E
error python use Python abort script with error message str
export python use Python export the variables x,…,z to the parallel world
exportall python use Python declare all current dynamic variables as exported variables
extern python use Python execute shell command str, and feeds the result to GP (as if loading from file)
externstr python use Python execute shell command str, and returns the result as a vector of GP strings, one component per output line
fileclose python use Python close the file descriptor n
fileextern python use Python execute shell command str and returns a file descriptor attached to the command output as if it were read from a file
fileflush python use Python flush the file descriptor n (all descriptors to output streams if n is omitted)
fileopen python use Python open the file pointed to by ‘path’ and return a file descriptor which can be used with other file functions
fileread python use Python read a logical line from the file attached to the descriptor n, opened for reading with fileopen
filereadstr python use Python read a raw line from the file attached to the descriptor n, opened for reading with fileopen
filewrite python use Python write the string s to file attached to descriptor n, ending with a newline
filewrite1 python use Python write the string s to file number n without ending with newline
fold python use Python return f(…f(f(A[1],A[2]),A[3]),…,A[#A])
for python use Python the sequence is evaluated, X going from a up to b
forcomposite python use Python the sequence is evaluated, n running over the composite numbers between a and b
fordiv python use Python the sequence is evaluated, X running over the divisors of n
fordivfactored python use Python the sequence is evaluated, X running over the [d, factor(d)], d a divisor of n
foreach python use Python the sequence is evaluated, X running over the components of V
forell python use Python execute seq for each elliptic curves E of conductor between a and b in the elldata database
forfactored python use Python the sequence is evaluated, N is of the form [n, factor(n)], n going from a up to b
forpart python use Python evaluate seq where the Vecsmall X goes over the partitions of k
forperm python use Python the sequence is evaluated, p going through permutations of a
forprime python use Python the sequence is evaluated, p running over the primes between a and b
forprimestep python use Python the sequence is evaluated, p running over the primes less than b in the arithmetic progression a + k*q, k >= 0
forsquarefree python use Python the sequence is evaluated, N is of the form [n, factor(n)], n going through squarefree integers from a up to b
forstep python use Python the sequence is evaluated, X going from a to b in steps of s (can be a positive real number, an intmod for an arithmetic…
forsubgroup python use Python execute seq for each subgroup H of the abelian group G, whose index is bounded by bound if not omitted
forsubset python use Python if nk is an integer n, the sequence is evaluated, s going through all subsets of {1, 2, …, n}; if nk is a pair [n,k] o…
forvec python use Python v being a two-component vectors of length n, the sequence is evaluated with X[i] going from v[i][1] to v[i][2] for i=n,.…
getabstime python use Python milliseconds of CPU time since startup
getcache python use Python returns information about various auto-growing caches
getenv python use Python value of the environment variable s, 0 if it is not defined
getheap python use Python 2-component vector giving the current number of objects in the heap and the space they occupy (in long words)
getlocalbitprec python use Python returns the current dynamic bit precision
getlocalprec python use Python returns the current dynamic precision, in decimal digits
getrand python use Python current value of random number seed
getstack python use Python current value of stack pointer avma
gettime python use Python milliseconds of CPU time used since the last call to gettime
getwalltime python use Python time (in milliseconds) since the UNIX Epoch
global python use Python obsolete
if python use Python if a is nonzero, seq1 is evaluated, otherwise seq2
iferr python use Python evaluates the expression sequence seq1
inline python use Python declares x,…,z as inline variables
input python use Python read an expression from the input file or standard input
install python use Python load from dynamic library ‘lib’ the function ‘name’
kill python use Python restores the symbol sym to its `undefined'' status and kill attached help messages | |listcreate| | python | use Python | this function is obsolete, use List() | |listinsert| | python | use Python | insert x at index n in list L, shifting the remaining elements to the right | |listkill| | python | use Python | obsolete, retained for backward compatibility | |listpop| | python | use Python | removes n-th element from list | |listput| | python | use Python | sets n-th element of list equal to x | |listsort| | python | use Python | sort the list L in place | |local| | python | use Python | declare x,...,z as (dynamically scoped) local variables | |localbitprec| | python | use Python | set the real precision to p bits in the dynamic scope | |localprec| | python | use Python | set the real precision to p in the dynamic scope and return p | |mapapply| | python | use Python | applies the closure f to the image of x by the map M and returns the evaluation of f | |mapdelete| | python | use Python | removes x from the domain of the map M | |mapget| | python | use Python | returns the image of x by the map M | |mapisdefined| | python | use Python | true (1) if x has an image by the map M, false (0) otherwise | |mapput| | python | use Python | associates x to y in the map M | |my| | python | use Python | declare x,...,z as lexically-scoped local variables | |next| | python | use Python | interrupt execution of current instruction sequence, and start another iteration from the n-th innermost enclosing loops | |parapply| | python | use Python | parallel evaluation of f on the elements of x | |pareval| | python | use Python | parallel evaluation of the elements of the vector of closures x | |parfor| | python | use Python | evaluates the expression expr1 in parallel for all i between a and b (if b is set to +oo, the loop will not stop), resul… | |parforeach| | python | use Python | evaluates in parallel the expression expr1 for all components x of V | |parforprime| | python | use Python | evaluates the expression expr1 in parallel for all primes p between a and b (if b is set to +oo, the loop will not stop)… | |parforprimestep| | python | use Python | evaluates the expression expr1 in parallel for all primes p between a and b in an arithmetic progression of the form a +… | |parforstep| | python | use Python | evaluates the expression expr1 in parallel for i going from a to b in steps of s (can be a positive real number, an intm… | |parforvec| | python | use Python | evaluates the sequence expr2 (dependent on X and j) for X as generated by forvec, in random order, computed in parallel | |parselect| | python | use Python | (parallel select) selects elements of A according to the selection function f which is tested in parallel | |parsum| | python | use Python | the sum (i goes from a to b) of expression expr, evaluated in parallel (in random order) | |parvector| | python | use Python | as vector(N,i,expr) but the evaluations of expr are done in parallel | |print| | python | use Python | outputs its string arguments (in raw format) ending with a newline | |print1| | python | use Python | outputs its string arguments (in raw format) without ending with newline | |printf| | python | use Python | prints its arguments according to the format fmt | |printp| | python | use Python | outputs its string arguments (in prettymatrix format) ending with a newline | |printsep| | python | use Python | outputs its string arguments (in raw format), separated by 'sep', ending with a newline | |printsep1| | python | use Python | outputs its string arguments (in raw format), separated by 'sep', without ending with a newline | |printtex| | python | use Python | outputs its string arguments in TeX format | |read| | python | use Python | read from the input file filename | |readstr| | python | use Python | returns the vector of GP strings containing the lines in filename | |readvec| | python | use Python | create a vector whose components are the evaluation of all the expressions found in the input file filename | |return| | python | use Python | return from current subroutine with result x | |select| | python | use Python | selects elements of A according to the selection function f | |self| | python | use Python | return the calling function or closure | |setdebug| | python | use Python | sets debug level for domain D to n (n must be between 0 and 20) | |setrand| | python | use Python | reset the seed of the random number generator to n | |Strchr| | python | use Python | deprecated alias for strchr | |strchr| | python | use Python | converts integer or vector of integers x to a string, translating each integer into a character using ASCII encoding | |Strexpand| | python | use Python | deprecated alias for strexpand | |strexpand| | python | use Python | concatenates its (string) arguments into a single string, performing tilde expansion | |strjoin| | python | use Python | joins the strings in vector v, separating them with delimiter p | |Strprintf| | python | use Python | deprecated alias for strprintf | |strprintf| | python | use Python | returns a string built from the remaining arguments according to the format fmt | |strsplit| | python | use Python | splits the string s into a vector of strings, with p acting as a delimiter between successive fields; if p is empty or o… | |Strtex| | python | use ER2 latex() (§3.6) | deprecated alias for strtex | |strtex| | python | use ER2 latex() (§3.6) | translates its (string) arguments to TeX format and returns the resulting string | |strtime| | python | use Python | return a string describing the time t in milliseconds, in the format used by the GP timer | |system| | python | use Python | str being a string, execute the system command str | |trap| | python | use Python | this function is obsolete, use "iferr" | |type| | python | use Python | return the type of the GEN x | |unexport| | python | use Python | remove x,...,z from the list of variables exported to the parallel world | |unexportall| | python | use Python | empty the list of variables exported to the parallel world | |uninline| | python | use Python | forget all inline variables | |until| | python | use Python | evaluate the expression sequence seq until a is nonzero | |version| | python | use Python | returns the PARI version as [major,minor,patch] or [major,minor,patch,GITversion] | |warning| | python | use Python | display warning message str | |while| | python | use Python | while a is nonzero evaluate the expression sequence seq | |write| | python | use Python | appends the remaining arguments (same output as print) to filename | |write1| | python | use Python | appends the remaining arguments (same output as print1) to filename | |writebin| | python | use Python | write x as a binary object to file filename | |writetex`

2. Standard operators (10)

PARI ER2 Status Note Description
cmp cmp namespace compare two arbitrary objects x and y (1 if x>y, 0 if x=y, -1 if x<y)
divrem divrem namespace euclidean division of x by y giving as a 2-dimensional column vector the quotient and the remainder, with respect to v (…
lex lex namespace compare x and y lexicographically (1 if x>y, 0 if x=y, -1 if x<y)
max max namespace Python builtin: never shadowed in the prelude maximum of x and y
min min namespace Python builtin: never shadowed in the prelude minimum of x and y
shift shift namespace shift x left n bits if n>=0, right -n bits if n<0
shiftmul shiftmul namespace multiply x by 2^n (n>=0 or n<0)
sign sign namespace sign of x, of type integer, real or fraction
vecmax vecmax namespace largest entry in the vector/matrix x
vecmin vecmin namespace smallest entry in the vector/matrix x

3. Conversions and elementary functions (60)

PARI ER2 Status Note Description
binary binary namespace gives the vector formed by the binary digits of x (x integer)
bitand bitand namespace bitwise “and” of two integers x and y
bitneg bitneg namespace bitwise negation of an integers x truncated to n bits
bitnegimply bitnegimply namespace bitwise “negated imply” of two integers x and y, in other words, x BITAND BITNEG(y)
bitor bitor namespace bitwise “or” of two integers x and y
bitprecision bitprecision namespace if n is present and positive, return x at precision n bits
bittest bittest namespace gives bit number n (coefficient of 2^n) of the integer x
bitxor bitxor namespace bitwise “exclusive or” of two integers x and y
ceil ceil namespace ceiling of x = smallest integer >= x
centerlift centerlift namespace centered lift of x
characteristic characteristic namespace characteristic of the base ring over which x is defined
Col Col namespace type constructor (CapWords allowed by PEP 8) transforms the object x into a column vector of dimension n
Colrev Colrev namespace type constructor (CapWords allowed by PEP 8) transforms the object x into a column vector of dimension n in reverse order with respect to Col(x,{n})
component component namespace the n’th component of the internal representation of x
conj conj namespace the algebraic conjugate of x
conjvec conjvec namespace conjugate vector of the algebraic number z
denominator denominator namespace denominator of f
digits digits namespace gives the vector formed by the digits of x in base b
exponent exponent namespace binary exponent of x
floor floor namespace floor of x = largest integer <= x
frac frac namespace fractional part of x = x-floor(x)
fromdigits fromdigits namespace gives the integer formed by the elements of x seen as the digits of a number in base b
imag imag namespace imaginary part of x
length length namespace number of non code words in x, number of characters for a string
lift lift namespace if v is omitted, lifts elements of Z/nZ to Z, of Qp to Q, and of K[x]/(P) to K[x]
liftall liftall namespace lifts every element of Z/nZ to Z, of Qp to Q, and of K[x]/(P) to K[x]
liftint liftint namespace lifts every element of Z/nZ to Z and of Qp to Q
liftpol liftpol namespace lifts every polmod component of x to polynomials
List List namespace type constructor (CapWords allowed by PEP 8) transforms the vector or list x into a list
Map Map namespace type constructor (CapWords allowed by PEP 8) converts the matrix [a_1,b_1;a_2,b_2;…;a_n,b_n] to the map a_i->b_i
Mat Mat namespace type constructor (CapWords allowed by PEP 8) transforms any GEN x into a matrix
Mod Mod namespace type constructor (CapWords allowed by PEP 8) create ‘a modulo b’
norm norm namespace norm of x
numerator numerator namespace numerator of f
oo oo namespace infinity
padicprec padicprec namespace return the absolute p-adic precision of object x
Pol Pol namespace type constructor (CapWords allowed by PEP 8) convert t (usually a vector or a power series) into a polynomial with variable v, starting with the leading coefficient
Polrev Polrev namespace type constructor (CapWords allowed by PEP 8) convert t (usually a vector or a power series) into a polynomial with variable v, starting with the constant term
precision precision namespace if n is present, return x at precision n
Qfb Qfb namespace type constructor (CapWords allowed by PEP 8) binary quadratic form a*x2+bxy+c*y2
random random namespace random object, depending on the type of N
real real namespace real part of x
round round namespace Python builtin: never shadowed in the prelude take the nearest integer to all the coefficients of x
Ser Ser namespace type constructor (CapWords allowed by PEP 8) convert s into a power series with variable v and precision d, starting with the constant coefficient
serchop serchop namespace remove all terms of degree strictly less than n in series s
serprec serprec namespace return the absolute precision x with respect to power series in the variable v
Set Set namespace type constructor (CapWords allowed by PEP 8) convert x into a set, i.e
simplify simplify namespace simplify the object x as much as possible
sizebyte sizebyte namespace number of bytes occupied by the complete tree of the object x
sizedigit sizedigit namespace rough upper bound for the number of decimal digits of (the components of) x
Str python Python’s str covers it concatenates its (string) argument into a single string
truncate truncate namespace truncation of x; when x is a power series,take away the O(X^)
valuation valuation prelude valuation of x with respect to p
varhigher varhigher namespace return a variable ‘name’ whose priority is higher than the priority of v (of all existing variables if v is omitted)
variable variable namespace main variable of object x
variables variables namespace all variables occurring in object x, sorted by decreasing priority
varlower varlower namespace return a variable ‘name’ whose priority is lower than the priority of v (of all existing variables if v is omitted
Vec Vec namespace type constructor (CapWords allowed by PEP 8) transforms the object x into a vector of dimension n
Vecrev Vecrev namespace type constructor (CapWords allowed by PEP 8) transforms the object x into a vector of dimension n in reverse order with respect to Vec(x,{n})
Vecsmall Vecsmall namespace type constructor (CapWords allowed by PEP 8) transforms the object x into a VECSMALL of dimension n

4. Combinatorics (21)

PARI ER2 Status Note Description
bernfrac bernfrac namespace Bernoulli number B_n, as a rational number
bernpol bernpol namespace Bernoulli polynomial B_n, evaluated at a
bernreal bernreal namespace Bernoulli number B_n, as a real number with the current precision
bernvec bernvec namespace returns a vector containing, as rational numbers, the Bernoulli numbers B_0, B_2, …, B_{2n}
binomial binomial prelude binomial coefficient n(n-1)…(n-k+1)/k! defined for k in Z and any n
eulerfrac eulerfrac namespace Euler number E_n, as a rational number
eulerianpol eulerianpol namespace Eulerian polynomial A_n, in variable v
eulerpol eulerpol namespace Euler polynomial E_n, in variable v
eulerreal eulerreal namespace Euler number E_n, as a real number
eulervec eulervec namespace returns a vector containing the nonzero Euler numbers E_0, E_2, …, E_{2n}
fibonacci fibonacci prelude Fibonacci number of index x
hammingweight hammingweight namespace returns the Hamming weight of x
harmonic harmonic namespace generalized harmonic number of index n in power r
numbpart numbpart namespace number of partitions of n
numtoperm numtoperm namespace permutation number k (mod n!) of n letters (n C-integer)
partitions partitions namespace vector of partitions of the integer k
permcycles permcycles namespace cycles of the permutation x
permorder permorder namespace order of the permutation x
permsign permsign namespace signature of the permutation x
permtonum permtonum namespace ordinal (between 0 and n!-1) of permutation x
stirling stirling namespace if flag=1 (default) return the Stirling number of the first kind s(n,k), if flag=2, return the Stirling number of the se…

5. Number theory (127)

PARI ER2 Status Note Description
addprimes addprimes namespace add primes in the vector x to the prime table to be used in trial division
bestappr bestappr namespace return a rational approximation to x, whose denominator is limited by B, if present
bestapprPade bestappr_pade namespace renamed for PEP 8 returns a rational function approximation to x
bezout bezout namespace deprecated alias for gcdext
bigomega bigomega prelude draft Omega, renamed for PEP 8 (D8) number of prime divisors of x, counted with multiplicity
charconj charconj namespace given a finite abelian group (by its elementary divisors cyc) and a character chi, return the conjugate character
chardiv chardiv namespace given a finite abelian group (by its elementary divisors cyc) and two characters a and b, return the character a/b
chareval chareval namespace given an abelian group structure affording a discrete logarithm method, e.g
chargalois chargalois namespace let cyc represent a finite abelian group G by its elementary divisors cyc, return a list of representatives for the Galo…
charker charker namespace given a finite abelian group (by its elementary divisors cyc) and a character chi, return its kernel
charmul charmul namespace given a finite abelian group (by its elementary divisors cyc) and two characters a and b, return the product character a…
charorder charorder namespace given a finite abelian group (by its elementary divisors cyc) and a character chi, return the order of chi
charpow charpow namespace given a finite abelian group (by its elementary divisors cyc) a character a and an integer n return the character a^n
chinese chinese prelude x,y being both intmods (or polmods) computes z in the same residue classes as x and y
content content namespace gcd of all the components of x, when this makes sense
contfrac contfrac namespace continued fraction expansion of x (x rational,real or rational function)
contfracpnqn contfracpnqn namespace [p_n,p_{n-1}; q_n,q_{n-1}] corresponding to the continued fraction x
core core prelude unique squarefree integer d dividing n such that n/d is a square
coredisc coredisc namespace discriminant of the quadratic field Q(sqrt(n))
dirdiv dirdiv namespace division of the Dirichlet series x by the Dirichlet series y
direuler direuler wrapper GP expression argument; ER2 takes a Python callable Dirichlet Euler product of expression expr from p=a to p=b, limited to b terms
dirmul dirmul namespace multiplication of the Dirichlet series x by the Dirichlet series y
dirpowerssum dirpowerssum namespace return f(1)1^x + f(2)2^x +
divisors divisors prelude gives a vector formed by the divisors of x in increasing order
divisorslenstra divisorslenstra namespace finds all divisors d of N such that d = r (mod s)
eulerphi phi prelude draft name Euler’s totient function of x
factor factor prelude dispatch: integers -> PARI, Expr -> SymPy factorization of x over domain D
factorback factorback namespace given a factorization f, gives the factored object back
factorcantor factorcantor namespace this function is obsolete, use factormod
factorff factorff namespace obsolete, use factormod
factorial factorial namespace PARI returns a real; the exact factorial is in the prelude factorial of x, the result being given as a real number
factorint factorint namespace factor the integer x
factormod factormod namespace ER2: factor(f, modulus=p) factors the polynomial f over the finite field defined by the domain D; flag is optional, and can be 0: default or 1: on…
factormodcyclo factormodcyclo namespace factor n-th cyclotomic polynomial mod p
factormodDDF factormod_ddf namespace renamed for PEP 8 distinct-degree factorization of the squarefree polynomial f over the finite field defined by the domain D
factormodSQF factormod_sqf namespace renamed for PEP 8 squarefree factorization of the polynomial f over the finite field defined by the domain D
ffcompomap ffcompomap namespace Let k, l, m be three finite fields and f a (partial) map from l to m and g a partial map from k to l, return the (partia…
ffembed ffembed namespace given two elements a and b in finite fields, return a map embedding the definition field of a to the definition field of…
ffextend ffextend namespace extend the field K of definition of a by a root of the polynomial P, assumed to be irreducible over K
fffrobenius fffrobenius namespace return the n-th power of the Frobenius map over the field of definition of m
ffgen ffgen namespace ER2: GF(q).gen() return a generator of the finite field k (not necessarily a generator of its multiplicative group) as a t_FFELT
ffinit ffinit namespace ER2: GF(p, k) monic irreducible polynomial of degree n in F_p[v]
ffinvmap ffinvmap namespace given a map m between finite fields, return a partial map that return the pre-images by the map m
fflog fflog namespace return the discrete logarithm of the finite field element x in base g
ffmap ffmap namespace given a (partial) map m between two finite fields, return the image of x by m
ffmaprel ffmaprel namespace given a (partial) map m between two finite fields, express x as an algebraic element over the codomain of m in a way whi…
ffnbirred ffnbirred namespace number of monic irreducible polynomials over F_q, of degree n (flag=0, default) or at most n (flag=1)
fforder fforder namespace multiplicative order of the finite field element x
ffprimroot ffprimroot namespace return a primitive root of the multiplicative group of the definition field of the finite field element x (not necessari…
gcd gcd prelude greatest common divisor of x and y
gcdext gcdext namespace returns [u,v,d] such that d=gcd(x,y) and ux+vy=d
halfgcd halfgcd namespace return a vector [M, [a,b]~], where M is an invertible 2x2 matrix such that M*[x,y]~ = [a,b]~, where b is small
hilbert hilbert namespace Hilbert symbol at p of x,y
isfundamental isfundamental namespace true(1) if D is a fundamental discriminant (including 1), false(0) if not
ispolygonal ispolygonal namespace true(1) if x is an s-gonal number, false(0) if not (s > 2)
ispower ispower prelude if k > 0 is given, return true (1) if x is a k-th power, false (0) if not
ispowerful ispowerful namespace true(1) if x is a powerful integer (valuation at all primes dividing x is greater than 1), false(0) if not
isprime isprime prelude true(1) if x is a (proven) prime number, false(0) if not
isprimepower isprimepower prelude if x = p^k is a prime power (p prime, k > 0), return k, else return 0
ispseudoprime ispseudoprime prelude true(1) if x is a strong pseudoprime, false(0) if not
ispseudoprimepower ispseudoprimepower namespace if x = p^k is a pseudo-prime power (p pseudo-prime, k > 0), return k, else return 0
issquare issquare prelude true(1) if x is a square, false(0) if not
issquarefree issquarefree prelude true(1) if x is squarefree, false(0) if not
istotient istotient namespace true(1) if x = eulerphi(n) for some integer n, false(0) if not
kronecker kronecker prelude kronecker symbol (x/y)
lcm lcm prelude least common multiple of x and y, i.e
logint logint namespace return the largest non-negative integer e so that b^e <= x, where b > 1 is an integer and x >= 1 is a real number
moebius mu prelude draft name Moebius function of x
nextprime nextprime prelude smallest pseudoprime >= x
numdiv numdiv prelude number of divisors of x
omega omega prelude number of distinct prime divisors of x
precprime precprime prelude largest pseudoprime <= x, 0 if x<=1
prime prime prelude returns the n-th prime (n C-integer)
primecert primecert namespace If N is a prime, return a Primality Certificate
primecertexport primecertexport namespace Returns a string suitable for print/write to display a primality certificate
primecertisvalid primecertisvalid namespace Verifies if cert is a valid PARI ECPP Primality certificate
primepi primepi prelude the prime counting function pi(x) = #{p <= x, p prime}
primes primes prelude returns the vector of the first n primes (integer), or the primes in interval n = [a,b]
qfbclassno qfbclassno namespace class number of discriminant D using Shanks’s method by default
qfbcomp qfbcomp namespace Gaussian composition with reduction of the binary quadratic forms x and y
qfbcompraw qfbcompraw namespace Gaussian composition without reduction of the binary quadratic forms x and y
qfbcornacchia qfbcornacchia namespace Solves the equation x2+dy2 = n in integers x and y where d > 0 and n is prime or 4 times a prime
qfbhclassno qfbhclassno namespace Hurwitz-Kronecker class number of x>0
qfbnucomp qfbnucomp namespace composite of primitive positive definite quadratic forms x and y using nucomp and nudupl, where L=[|D/4|^(1/4)] is preco…
qfbnupow qfbnupow namespace n-th power of primitive positive definite quadratic form x using nucomp and nudupl
qfbpow qfbpow namespace n-th power with reduction of the binary quadratic form x
qfbpowraw qfbpowraw namespace n-th power without reduction of the binary quadratic form x
qfbprimeform qfbprimeform namespace returns the prime form of discriminant x, whose first coefficient is p
qfbred qfbred namespace reduction of the binary quadratic form x
qfbredsl2 qfbredsl2 namespace reduction of the binary quadratic form x, returns [y,g] where y is reduced and g in Sl(2,Z) is such that g.x = y; isD, i…
qfbsolve qfbsolve namespace Solve the equation Q(x,y)=n in coprime integers x and y where Q is a binary quadratic form, up to the action of the spec…
quadclassunit quadclassunit namespace compute the structure of the class group and the regulator of the quadratic field of discriminant D
quaddisc quaddisc namespace discriminant of the quadratic field Q(sqrt(x))
quadgen quadgen namespace standard generator g of quadratic order of discriminant D
quadhilbert quadhilbert namespace relative equation for the Hilbert class field of the quadratic field of discriminant D (which can also be a bnf)
quadpoly quadpoly namespace quadratic polynomial corresponding to the discriminant D, in variable v
quadray quadray namespace relative equation for the ray class field of conductor f for the quadratic field of discriminant D (which can also be a …
quadregulator quadregulator namespace regulator of the real quadratic field of discriminant D
quadunit quadunit namespace fundamental unit u of the quadratic order of discriminant D where D must be positive
quadunitindex quadunitindex namespace given a fundamental discriminant D, returns the index of the unit group of the order of conductor f
quadunitnorm quadunitnorm namespace returns the norm of the fundamental unit of the quadratic order of discriminant D
ramanujantau ramanujantau namespace compute the value of Ramanujan’s tau function at n, assuming the GRH
randomprime randomprime namespace returns a strong pseudo prime in [2, N-1]
removeprimes removeprimes namespace remove primes in the vector x from the prime table
sigma sigma prelude sum of the k-th powers of the divisors of x
sqrtint sqrtint prelude integer square root y of x, where x is a nonnegative real number
sqrtnint sqrtnint namespace integer n-th root of x, where x is nonnegative real number
sumdedekind sumdedekind namespace Dedekind sum attached to h,k
sumdigits sumdigits namespace sum of digits in the integer n, when written in base B
znchar znchar namespace given a datum D describing a group G = (Z/NZ)^* and a Dirichlet character chi, return the pair [G,chi]
zncharconductor zncharconductor namespace let G be znstar(q,1) and chi be a Dirichlet character on (Z/qZ)*
znchardecompose znchardecompose namespace given a znstar G = (Z/NZ)^* and a Dirichlet character chi, return the product of local characters chi_p for p | (N,Q)
znchargauss znchargauss namespace given a Dirichlet character chi on G = (Z/NZ)^*, return the complex Gauss sum g(chi,a)
zncharinduce zncharinduce namespace let G be znstar(q,1), let chi be a Dirichlet character mod q and let N be a multiple of q
zncharisodd zncharisodd namespace let G be znstar(N,1), let chi be a Dirichlet character mod N, return 1 if and only if chi(-1) = -1 and 0 otherwise
znchartokronecker znchartokronecker namespace let G be znstar(N,1), let chi be a Dirichlet character mod N, return the discriminant D if chi is real equal to the Kron…
znchartoprimitive znchartoprimitive namespace let G be znstar(q,1) and chi be a Dirichlet character on (Z/qZ)* of conductor q0
znconreychar znconreychar namespace Dirichlet character attached to m in (Z/qZ)* in Conrey’s notation, where G is znstar(q,1)
znconreyconductor znconreyconductor namespace let G be znstar(q,1) and chi be a Dirichlet character on (Z/qZ)* given by its Conrey logarithm
znconreyexp znconreyexp namespace Conrey exponential attached to G = znstar(q, 1)
znconreylog znconreylog namespace Conrey logarithm attached to m in (Z/qZ)*, where G is znstar(q,1)
zncoppersmith zncoppersmith namespace finds all integers x with |x| <= X such that gcd(N, P(x)) >= B
znlog znlog prelude return the discrete logarithm of x in (Z/nZ)* in base g
znorder znorder prelude order of the integermod x in (Z/nZ)*
znprimroot znprimroot prelude returns a primitive root of n when it exists
znstar znstar namespace 3-component vector v = [no,cyc,gen], giving the structure of the abelian group (Z/nZ)^*; no is the order (i.e
znsubgroupgenerators znsubgroupgenerators namespace finds generators of the subgroup H of (Z/fZ)^*; H is given by a vector of length f of 1/0 values: the a-th component is …

6. Polynomials and power series (65)

PARI ER2 Status Note Description
bezoutres bezoutres namespace deprecated alias for polresultantext
deriv deriv namespace ER2 diff dispatches to SymPy derivative of x with respect to v, or to the main variable of x if v is omitted
derivn derivn namespace n-th derivative of x with respect to v, or to the main variable of x if v is omitted
diffop diffop namespace apply the differential operator D to x, where D is defined by D(v[i])=d[i], where v is a vector of variable names
eval python GP code evaluation; pari.raw evaluates GP code if needed evaluation of x, replacing variables by their value
factorpadic factorpadic namespace p-adic factorization of the polynomial pol to precision r
fft fft namespace given w from rootsof1, return the discrete Fourier transform of P
fftinv fftinv namespace given w from rootsof1, return the inverse Fourier transform of P
intformal intformal namespace formal integration of x with respect to v, or to the main variable of x if v is omitted
O python use SymPy’s O or series(); PARI series convert both ways p-adic or power series zero with precision given by e
padicappr padicappr namespace p-adic roots of the polynomial pol congruent to a mod p
padicfields padicfields namespace returns polynomials generating all the extensions of degree N of the field of p-adic rational numbers; N is allowed to b…
polchebyshev polchebyshev namespace Chebyshev polynomial of the first (flag = 1) or second (flag = 2) kind, of degree n, evaluated at a
polclass polclass namespace return a polynomial generating the Hilbert class field of Q(sqrt(D)) for the discriminant D<0
polcoef polcoef namespace coefficient of degree n of x
polcoeff polcoeff namespace deprecated alias for polcoef
polcyclo polcyclo namespace n-th cyclotomic polynomial evaluated at a
polcyclofactors polcyclofactors namespace returns a vector of polynomials, whose product is the product of distinct cyclotomic polynomials dividing f
poldegree poldegree namespace degree of the polynomial or rational function x with respect to main variable if v is omitted, with respect to v otherwi…
poldisc poldisc namespace ER2: discriminant discriminant of the polynomial pol, with respect to main variable if v is omitted, with respect to v otherwise
poldiscfactors poldiscfactors namespace [D, faD], where D = discriminant of the polynomial T, and faD is a cheap partial factorization of D (entries are coprime…
poldiscreduced poldiscreduced namespace vector of elementary divisors of Z[a]/f’(a)Z[a], where a is a root of the polynomial f
polfromroots polfromroots namespace returns the monic polynomial in variable v whose roots are the components of the vector a with multiplicities
polgraeffe polgraeffe namespace returns the Graeffe transform g of f, such that g(x^2) = f(x)f(-x)
polhensellift polhensellift namespace lift the factorization B of A modulo p to a factorization modulo p^e using Hensel lift
polhermite polhermite namespace Hermite polynomial H(n,v) of degree n, evaluated at a
polinterpolate polinterpolate namespace polynomial interpolation at t according to data vectors X, Y, i.e., given P of minimal degree such that P(X[i]) = Y[i] f…
polisclass polisclass namespace P being a monic irreducible polynomial with integer coefficients, return 0 if P is not a class polynomial for the j-inva…
poliscyclo poliscyclo namespace returns 0 if f is not a cyclotomic polynomial, and n > 0 if f = Phi_n, the n-th cyclotomic polynomial
poliscycloprod poliscycloprod namespace returns 1 if f is a product of cyclotomic polynonials, and 0 otherwise
polisirreducible polisirreducible namespace ER2: isirreducible true(1) if pol is an irreducible nonconstant polynomial, false(0) if pol is reducible or constant
pollaguerre pollaguerre namespace Laguerre polynomial of degree n and parameter a evaluated at b
pollead pollead namespace leading coefficient of polynomial or series x, or x itself if x is a scalar
pollegendre pollegendre namespace legendre polynomial of degree n evaluated at a
polmodular polmodular namespace return the modular polynomial of level L and invariant inv
polrecip polrecip namespace reciprocal polynomial of pol
polresultant polresultant namespace ER2: resultant resultant of the polynomials x and y, with respect to the main variables of x and y if v is omitted, with respect to the…
polresultantext polresultantext namespace return [U,V,R] such that R=polresultant(A,B,v) and UA+VB = R, where A and B are polynomials
polroots polroots namespace complex roots of the polynomial T using Schonhage’s method, as modified by Gourdon
polrootsbound polrootsbound namespace return a sharp upper bound for the modulus of the largest complex root of the polynomial T with relative error tau
polrootsff polrootsff namespace obsolete, use polrootsmod
polrootsmod polrootsmod namespace roots of the polynomial f over the finite field defined by the domain D
polrootspadic polrootspadic namespace p-adic roots of the polynomial f to precision r
polrootsreal polrootsreal namespace real roots of the polynomial T with real coefficients, using Uspensky’s method
polsturm polsturm namespace number of distinct real roots of the polynomial T (in the interval ab = [a,b] if present)
polsubcyclo polsubcyclo namespace finds an equation (in variable v) for the d-th degree subfields of Q(zeta_n)
polsubcyclofast polsubcyclofast namespace If 1 <= d <= 6 or a prime, finds an equation for the subfields of Q(zeta_n) with galois group C_d
polsylvestermatrix polsylvestermatrix namespace forms the sylvester matrix attached to the two polynomials x and y
polsym polsym namespace column vector of symmetric powers of the roots of x up to n
poltchebi poltchebi namespace deprecated alias for polchebyshev
polteichmuller polteichmuller namespace return the polynomial whose roots (resp
poltomonic poltomonic namespace T in Q[x]; returns U monic in Z[x] such that U(x) = C T(x/L) for some rational C and L
polzagier polzagier namespace Zagier’s polynomials of index n,m
seralgdep seralgdep namespace find a linear relation between powers (1,s, …, s^p) of the series s, with polynomial coefficients of degree <= r
serconvol serconvol namespace convolution (or Hadamard product) of two power series
serdiffdep serdiffdep namespace find an inhomogenous linear differential equation satisfied by the series s, with polynomial coefficients of degree <= r
serlaplace serlaplace namespace replaces the power series sum of a_nx^n/n! by sum of a_nx^n
serreverse serreverse namespace reversion of the power series s
subst subst namespace in expression x, replace the variable y by the expression z
substpol substpol namespace in expression x, replace the polynomial y by the expression z, using remainder decomposition of x
substvec substvec namespace in expression x, make a best effort to replace the variables v1,…,vn by the expression w1,…,wn
sumformal sumformal namespace formal sum of f with respect to v, or to the main variable of f if v is omitted
taylor taylor namespace taylor expansion of x with respect to t, adding O(t^d) to all components of x
thue thue namespace solve the equation P(x,y)=a, where tnf was created with thueinit(P), and sol, if present, contains the solutions of Norm…
thueinit thueinit namespace initialize the tnf corresponding to P, that will be used to solve Thue equations P(x,y) = some-integer

7. Linear algebra (91)

PARI ER2 Status Note Description
algdep algdep namespace algebraic relations up to degree k of z, using lindep([1,z,…,z^(k-1)], flag)
bestapprnf bestapprnf namespace T being an integral polynomial and V being a scalar, vector, or matrix, return a reasonable approximation of V with polm…
charpoly charpoly namespace det(v*Id-A)=characteristic polynomial of the matrix or polmod A
concat concat namespace concatenation of x and y, which can be scalars, vectors or matrices, or lists (in this last case, both x and y have to b…
dirpowers dirpowers namespace return the vector [1x,2x,…,n^x]
forqfvec forqfvec wrapper GP expression argument; ER2 takes a Python callable q being a square and symmetric integral matrix representing an positive definite quadratic form, evaluate expr for all p…
lindep lindep namespace integral linear dependencies between components of v
matadjoint matadjoint namespace adjoint matrix of M using Leverrier-Faddeev’s algorithm
matcompanion matcompanion namespace companion matrix to polynomial x
matconcat matconcat namespace concatenate the entries of v and return the resulting matrix
matdet matdet namespace ER2: det determinant of the matrix x using an appropriate algorithm depending on the coefficients
matdetint matdetint namespace some multiple of the determinant of the lattice generated by the columns of B (0 if not of maximal rank)
matdetmod matdetmod namespace determinant of the matrix x modulo d
matdiagonal matdiagonal namespace creates the diagonal matrix whose diagonal entries are the entries of the vector x
mateigen mateigen namespace complex eigenvectors of the matrix x given as columns of a matrix H
matfrobenius matfrobenius namespace return the Frobenius form of the square matrix M
mathess mathess namespace Hessenberg form of x
mathilbert mathilbert namespace Hilbert matrix of order n
mathnf mathnf namespace ER2: hermite_form (upper triangular) Hermite normal form of M, basis for the lattice formed by the columns of M
mathnfmod mathnfmod namespace (upper triangular) Hermite normal form of x, basis for the lattice formed by the columns of x, where d is a multiple of …
mathnfmodid mathnfmodid namespace (upper triangular) Hermite normal form of x concatenated with matdiagonal(d)
mathouseholder mathouseholder namespace applies a sequence Q of Householder transforms to the vector or matrix v
matid matid namespace identity matrix of order n
matimage matimage namespace basis of the image of the matrix x
matimagecompl matimagecompl namespace vector of column indices not corresponding to the indices given by the function matimage
matimagemod matimagemod namespace basis of the image of the matrix x modulo d
matindexrank matindexrank namespace gives two extraction vectors (rows and columns) for the matrix M such that the extracted matrix is square of maximal ran…
matintersect matintersect namespace intersection of the vector spaces whose bases are the columns of x and y
matinverseimage matinverseimage namespace an element of the inverse image of the vector y by the matrix x if one exists, the empty vector otherwise
matinvmod matinvmod namespace left inverse of the matrix x modulo d
matisdiagonal matisdiagonal namespace true(1) if x is a diagonal matrix, false(0) otherwise
matker matker namespace ER2: kernel basis of the kernel of the matrix x
matkerint matkerint namespace LLL-reduced Z-basis of the kernel of the matrix x with integral entries; flag is deprecated, kept for backward compatibi…
matkermod matkermod namespace basis of the kernel of the matrix x modulo d
matmuldiagonal matmuldiagonal namespace product of matrix x by diagonal matrix whose diagonal coefficients are those of the vector d, equivalent but faster than…
matmultodiagonal matmultodiagonal namespace product of matrices x and y, knowing that the result will be a diagonal matrix
matpascal matpascal namespace Pascal triangle of order n if q is omitted
matpermanent matpermanent namespace permanent of the matrix x
matqr matqr namespace returns [Q,R], the QR-decomposition of the square invertible matrix M
matrank matrank namespace ER2: rank rank of the matrix x
matreduce matreduce namespace reduce the factorization matrix m to canonical form (sorted first row with unique elements) matrix
matrix matrix namespace m x n matrix of expression expr, where the row variable X goes from 1 to m and the column variable Y goes from 1 to n
matrixqz matrixqz namespace if p>=0, transforms the rational or integral mxn (m>=n) matrix A into an integral matrix with gcd of maximal determinant…
matsize matsize namespace number of rows and columns of the vector/matrix x as a 2-vector
matsnf matsnf namespace ER2: smith_form Smith normal form (i.e
matsolve matsolve namespace ER2: solve(A, b) solution of MX=B (M matrix, B column vector or matrix)
matsolvemod matsolvemod namespace one solution of system of congruences MX=B mod D (M matrix, B and D column vectors)
matsupplement matsupplement namespace supplement the columns of the matrix x to an invertible matrix
mattranspose mattranspose namespace x~ = transpose of x
minpoly minpoly namespace minimal polynomial of the matrix or polmod A
norml2 norml2 namespace square of the L2-norm of x
normlp normlp namespace Lp-norm of x; sup norm if p is omitted
powers powers namespace return the vector [1,x,…,x^n] if x0 is omitted, and [x0, x0x, …, x0x^n] otherwise
qfauto qfauto namespace automorphism group of the positive definite quadratic form G
qfautoexport qfautoexport namespace qfa being an automorphism group as output by qfauto, output a string representing the underlying matrix group in GAP not…
qfbil qfbil namespace this function is obsolete, use qfeval
qfcholesky qfcholesky namespace given a square symmetric matrix M, return R such that R~*R = M, or [] if there is no solution
qfcvp qfcvp namespace x being a square and symmetric matrix representing a positive definite quadratic form, and t a vector of the same dimens…
qfeval qfeval namespace evaluate the quadratic form q (symmetric matrix) at x; if y is present, evaluate the polar form at (x,y); if q omitted, …
qfgaussred qfgaussred namespace square reduction of the symmetric matrix q
qfisom qfisom namespace find an isomorphism between the integral positive definite quadratic forms G and H if it exists
qfisominit qfisominit namespace G being a square and symmetric matrix representing an integral positive definite quadratic form, this function returns a…
qfjacobi qfjacobi namespace eigenvalues and orthogonal matrix of eigenvectors of the real symmetric matrix A
qflll qflll namespace LLL reduction of the vectors forming the matrix x (gives the unimodular transformation matrix T such that x*T is LLL-red…
qflllgram qflllgram namespace LLL reduction of the lattice whose gram matrix is G (gives the unimodular transformation matrix)
qfminim qfminim namespace x being a square and symmetric matrix representing a positive definite quadratic form, this function deals with the vect…
qfminimize qfminimize namespace given a square symmetric matrix G with rational coefficients and non-zero determinant, of dimension n >= 1, return [H,U,…
qfnorm qfnorm namespace this function is obsolete, use qfeval
qforbits qforbits namespace return the orbits of V under the action of the group of linear transformation generated by the set G, which must stabili…
qfparam qfparam namespace coefficients of binary quadratic forms that parametrize the solutions of the ternary quadratic form G, using the particu…
qfperfection qfperfection namespace rank of matrix of xx~ for x minimal vectors of a Gram matrix G
qfrep qfrep namespace vector of (half) the number of vectors of norms from 1 to B for the integral and definite quadratic form q
qfsign qfsign namespace signature of the symmetric matrix x
qfsolve qfsolve namespace solve over Q the quadratic equation X~ G X = 0, where G is a symmetric matrix
setbinop setbinop namespace the set {f(x,y), x in X, y in Y}
setdelta setdelta namespace symmetric difference of the sets x and y
setintersect setintersect namespace intersection of the sets x and y
setisset setisset namespace true(1) if x is a set (row vector with strictly increasing entries), false(0) if not
setminus setminus namespace set of elements of x not belonging to y
setsearch setsearch namespace determines whether x belongs to the set (or sorted list) S
setunion setunion namespace union of the sets x and y
snfrank snfrank namespace assuming that D is a Smith normal form (i.e
trace trace namespace trace of x
vecextract vecextract namespace extraction of the components of the matrix or vector x according to y and z
vecprod vecprod namespace return the product of the components of the vector v
vecsearch vecsearch namespace determines whether x belongs to the sorted vector v
vecsort vecsort namespace sorts the vector x in ascending order, according to the comparison function cmpf, if not omitted
vecsum vecsum namespace return the sum of the components of the vector v
vector vector namespace row vector with n components of expression expr (X ranges from 1 to n)
vectorsmall vectorsmall wrapper GP expression argument; ER2 takes a Python callable VECSMALL with n components of expression expr (X ranges from 1 to n) which must be small integers
vectorv vectorv wrapper GP expression argument; ER2 takes a Python callable column vector with n components of expression expr (X ranges from 1 to n)

8. Transcendental functions (73)

PARI ER2 Status Note Description
abs abs namespace Python builtin: never shadowed in the prelude absolute value (or modulus) of x
acos acos namespace arc cosine of x
acosh acosh namespace inverse hyperbolic cosine of x
agm agm namespace arithmetic-geometric mean of x and y
airy airy namespace Airy [Ai,Bi] function of argument z
arg arg namespace argument of x, such that -pi<arg(x)<=pi
asin asin namespace arc sine of x
asinh asinh namespace inverse hyperbolic sine of x
atan atan namespace arc tangent of x
atanh atanh namespace inverse hyperbolic tangent of x
besselh1 besselh1 namespace H^1-bessel function of index nu and argument x
besselh2 besselh2 namespace H^2-bessel function of index nu and argument x
besseli besseli namespace I-bessel function of index nu and argument x
besselj besselj namespace J-bessel function of index nu and argument x
besseljh besseljh namespace J-bessel function of index n+1/2 and argument x, where n is a nonnegative integer
besseljzero besseljzero namespace k-th zero of the J-bessel function of index nu
besselk besselk namespace K-bessel function of index nu and argument x
besseln besseln namespace deprecated alias for bessely
bessely bessely namespace Y-bessel function of index nu and argument x
besselyzero besselyzero namespace k-th zero of the Y-bessel function of index nu
Catalan catalan namespace constant; SymPy name Catalan’s number with current precision
cos cos namespace cosine of x
cosh cosh namespace hyperbolic cosine of x
cotan cotan namespace cotangent of x
cotanh cotanh namespace hyperbolic cotangent of x
dilog dilog namespace dilogarithm of x
eint1 eint1 namespace exponential integral E1(x)
ellE ell_e namespace renamed for PEP 8 Complete elliptic integral of the second kind for the complex parameter k using the agm
ellK ell_k namespace renamed for PEP 8 Complete elliptic integral of the first kind for the complex parameter k using the agm
erfc erfc namespace complementary error function
eta eta namespace if flag=0, returns prod(n=1,oo, 1-q^n), where q = exp(2 i Pi z) if z is a complex scalar (belonging to the upper half pl…
Euler euler_gamma namespace constant; SymPy name Euler’s constant with current precision
exp exp namespace exponential of x
expm1 expm1 namespace exp(x)-1
gamma gamma namespace gamma function at s, a complex or p-adic number, or a series
gammah gammah namespace gamma of x+1/2 (x integer)
gammamellininv gammamellininv namespace returns G(t), where G is as output by gammamellininvinit (its m-th derivative if m is present)
gammamellininvasymp gammamellininvasymp namespace return the first n terms of the asymptotic expansion at infinity of the m-th derivative K^m(t) of the inverse Mellin tra…
gammamellininvinit gammamellininvinit namespace initialize data for the computation by gammamellininv() of the m-th derivative of the inverse Mellin transform of the fu…
hypergeom hypergeom namespace general hypergeometric function, where N and D are the vector of parameters in the numerator and denominator respectivel…
hyperu hyperu namespace U-confluent hypergeometric function
I I namespace constant; SymPy name square root of -1
incgam incgam namespace incomplete gamma function
incgamc incgamc namespace complementary incomplete gamma function
lambertw lambertw namespace solution of the implicit equation x*exp(x)=y
lerchphi lerchphi namespace Lerch transcendent equal to sum for n >= 0 of z^n / (n+a)^s for reasonable values of the arguments
lerchzeta lerchzeta namespace Lerch zeta function equal to sum for n >= 0 of e^(2 pi i lam n) / (n+a)^s for reasonable values of the arguments
lngamma lngamma namespace logarithm of the gamma function of x
log log namespace natural logarithm of x
log1p log1p namespace log(1+x)
Pi pi namespace constant; lowercase like SymPy the constant pi, with current precision
polylog polylog namespace m-th polylogarithm of x
polylogmult polylogmult namespace multiple polylogarithm value at integral s = [s1,…,sr] with argument z = [z1,…,zr]
psi digamma namespace PARI psi = digamma; Dedekind psi is dedekind_psi (D5) psi-function at x (der-th derivative of psi if der is set)
rootsof1 rootsof1 namespace column vector of complex N-th roots of 1
sin sin namespace sine of x
sinc sinc namespace sinc function of x
sinh sinh namespace hyperbolic sine of x
sqr sqr namespace square of x
sqrt sqrt namespace square root of x
sqrtn sqrtn namespace nth-root of x, n must be integer
tan tan namespace tangent of x
tanh tanh namespace hyperbolic tangent of x
teichmuller teichmuller namespace Teichmuller character of p-adic number x
theta theta namespace Jacobi sine theta-function
thetanullk thetanullk namespace k-th derivative at z=0 of theta(q,z)
weber weber namespace one of Weber’s f function of x
zeta zeta namespace Riemann zeta function at s with s a complex or a p-adic number
zetahurwitz zetahurwitz namespace Hurwitz zeta function at s, x, with s not 1 and x not a negative or zero integer
zetamult zetamult namespace multiple zeta value at integral s = [s1,…,sk]; more generally, return Yamamoto’s t-MZV interpolation (star value for t…
zetamultall zetamultall namespace list of all multiple zeta values for weight up to k
zetamultconvert zetamultconvert namespace a being either an evec, avec, or index m, converts into evec (flag=0), avec (flag=1), or index m (flag=2)
zetamultdual zetamultdual namespace s being either an evec, avec, or index m, return the dual sequence in avec format

9. Sums, products, integrals (39)

PARI ER2 Status Note Description
asympnum asympnum namespace asymptotic expansion of expr assuming it has rational coefficients with reasonable height; alpha is as in limitnum
asympnumraw asympnumraw namespace N+1 first terms of asymptotic expansion of expr as floating point numbers; alpha is as in limitnum
contfraceval contfraceval namespace given a continued fraction CF from contfracinit, evaluate the first lim terms of the continued fraction at t (all terms …
contfracinit contfracinit namespace given M representing the power series S = sum_{n>=0} M[n+1]z^n, transform it into a continued fraction suitable for eval…
derivnum derivnum wrapper GP expression argument; ER2 takes a Python callable numerical derivation of expr with respect to X at X = a
intcirc intcirc wrapper GP expression argument; ER2 takes a Python callable numerical integration of expr on the circle |z-a|=R, divided by 2IPi
intfuncinit python builds internal integration tables; not exposed initialize tables for integrations from a to b using a weight f(t)
intnum intnum wrapper GP expression argument; ER2 takes a Python callable numerical integration of expr from a to b with respect to X
intnumgauss intnumgauss wrapper GP expression argument; ER2 takes a Python callable numerical integration of expr from a to b, a compact interval, with respect to X using Gauss-Legendre quadrature
intnumgaussinit intnumgaussinit namespace initialize tables for n-point Gauss-Legendre integration on a compact interval
intnuminit intnuminit namespace initialize tables for integrations from a to b
intnumosc intnumosc wrapper GP expression argument; ER2 takes a Python callable numerical integration from a to oo of oscillating quasi-periodic function expr of half-period H
intnumromb intnumromb wrapper GP expression argument; ER2 takes a Python callable numerical integration of expr (smooth in ]a,b[) from a to b with respect to X
laurentseries laurentseries namespace expand f around 0 as a Laurent series in x to order M
limitnum limitnum namespace numerical limit of sequence expr using Lagrange-Zagier extrapolation; assume u(n) ~ sum a_i n^(-alpha*i)
prod prod wrapper GP expression argument; ER2 takes a Python callable x times the product (X runs from a to b) of expression
prodeuler prodeuler wrapper GP expression argument; ER2 takes a Python callable Euler product (p runs over the primes between a and b) of real or complex expression, as a floating point approximation
prodeulerrat prodeulerrat namespace product from primes p = a to infinity of F(p^s), where F is a rational function
prodinf prodinf wrapper GP expression argument; ER2 takes a Python callable infinite product (X goes from a to infinity) of real or complex expression
prodnumrat prodnumrat namespace product from n = a to infinity of F(n), where F-1 is a rational function of degree less than or equal to -2
solve solve wrapper GP expression argument; ER2 takes a Python callable real root of expression expr (X between a and b), where either a or b is infinite or expr(a)*expr(b)<=0
solvestep solvestep wrapper GP expression argument; ER2 takes a Python callable find zeros of a function in the real interval [a,b] by naive interval splitting
sum sum wrapper Python builtin: never shadowed in the prelude; GP expression argument; ER2 takes a Python callable x plus the sum (X goes from a to b) of expression expr
sumalt sumalt wrapper GP expression argument; ER2 takes a Python callable Cohen-Villegas-Zagier’s acceleration of alternating series expr, X starting at a
sumdiv sumdiv wrapper GP expression argument; ER2 takes a Python callable sum of expression expr, X running over the divisors of n
sumdivmult sumdivmult wrapper GP expression argument; ER2 takes a Python callable sum of multiplicative function expr, d running over the divisors of n
sumeulerrat sumeulerrat namespace sum from primes p = a to infinity of F(p^s), where F is a rational function
suminf suminf wrapper GP expression argument; ER2 takes a Python callable naive summation (X goes from a to infinity) of real or complex expression expr
sumnum sumnum wrapper GP expression argument; ER2 takes a Python callable numerical summation of f(n) from n = a to +infinity using Euler-MacLaurin summation
sumnumap sumnumap wrapper GP expression argument; ER2 takes a Python callable numerical summation of f(n) from n = a to +infinity using Abel-Plana formula
sumnumapinit sumnumapinit namespace initialize tables for Abel-Plana summation of a series
sumnuminit sumnuminit namespace initialize tables for Euler-MacLaurin delta summation of a series with positive terms
sumnumlagrange sumnumlagrange wrapper GP expression argument; ER2 takes a Python callable numerical summation of f(n) from n = a to +infinity using Lagrange summation
sumnumlagrangeinit sumnumlagrangeinit namespace initialize tables for Lagrange summation of a series
sumnummonien sumnummonien wrapper GP expression argument; ER2 takes a Python callable numerical summation from n = a to +infinity using Monien summation
sumnummonieninit sumnummonieninit namespace initialize tables for Monien summation of a series with positive terms
sumnumrat sumnumrat namespace sum from n = a to infinity of F(n), where F is a rational function of degree less than or equal to -2
sumnumsidi sumnumsidi wrapper GP expression argument; ER2 takes a Python callable numerical summation of f(n) from n = a to +infinity using Sidi summation; a must be an integer
sumpos sumpos wrapper GP expression argument; ER2 takes a Python callable sum of positive (or negative) series expr, the formal variable X starting at a

10. Number fields (210)

PARI ER2 Status Note Description
bnfcertify bnfcertify namespace ER2: certify=True certify the correctness (i.e
bnfdecodemodule bnfdecodemodule namespace given a coded module m as in bnrdisclist, gives the true module
bnfinit bnfinit namespace ER2: NumberField class group and units compute the necessary data for future use in ideal and unit group computations, including fundamental units if they are …
bnfisintnorm bnfisintnorm namespace compute a complete system of solutions (modulo units of positive norm) of the absolute norm equation N(a)=x, where a bel…
bnfisnorm bnfisnorm namespace tries to tell whether x (in Q) is the norm of some fractional y (in bnf)
bnfisprincipal bnfisprincipal namespace bnf being output by bnfinit, gives [e,t], where e is the vector of exponents on the class group generators and t is the …
bnfissunit bnfissunit namespace this function is obsolete, use bnfisunit
bnfisunit bnfisunit namespace bnf being output by bnfinit, give the column vector of exponents of x on the fundamental units and the roots of unity if…
bnflog bnflog namespace let bnf be attached to a number field F and let l be a prime number
bnflogdegree bnflogdegree namespace let A be an ideal, return exp(deg_F A) the exponential of the l-adic logarithmic degree
bnflogef bnflogef namespace return [e~, f~] the logarithmic ramification and residue degrees for the maximal ideal pr
bnfnarrow bnfnarrow namespace given a big number field as output by bnfinit, gives as a 3-component vector the structure of the narrow class group
bnfsignunit bnfsignunit namespace matrix of signs of the real embeddings of the system of fundamental units found by bnfinit
bnfsunit bnfsunit namespace compute the fundamental S-units of the number field bnf output by bnfinit, S being a list of prime ideals
bnfunits bnfunits namespace return the fundamental units of the number field bnf output by bnfinit; if S is present and is a list of prime ideals, c…
bnrchar bnrchar namespace returns all characters chi on G such that chi(g[i]) = e(v[i]); if v is omitted, returns all characters that are trivial …
bnrclassfield bnrclassfield namespace bnr being as output by bnrinit, find a relative equation for the class field corresponding to the congruence subgroup de…
bnrclassno bnrclassno namespace relative degree of the class field defined by A,B,C
bnrclassnolist bnrclassnolist namespace if list is as output by ideallist or similar, gives list of corresponding ray class numbers
bnrcompositum bnrcompositum namespace compositum [bnr,H] of the two abelian extensions given by A = [bnr1,H1] and B = [bnr2,H2], where bnr1 and bnr2 are attac…
bnrconductor bnrconductor namespace conductor f of the subfield of the ray class field given by A,B,C
bnrconductorofchar bnrconductorofchar namespace this function is obsolete, use bnrconductor
bnrdisc bnrdisc namespace absolute or relative [N,R1,discf] of the field defined by A,B,C
bnrdisclist bnrdisclist namespace list of discriminants of ray class fields of all conductors up to norm bound
bnrgaloisapply bnrgaloisapply namespace apply the automorphism given by its matrix mat to the congruence subgroup H given as a HNF matrix
bnrgaloismatrix bnrgaloismatrix namespace return the matrix of the action of the automorphism aut of the base field bnf.nf on the generators of the ray class fiel…
bnrinit bnrinit namespace given a bnf as output by bnfinit and a modulus f, initializes data linked to the ray class group structure corresponding…
bnrisconductor bnrisconductor namespace returns 1 if the modulus is the conductor of the subfield of the ray class field given by A,B,C (see bnrdisc), and 0 oth…
bnrisgalois bnrisgalois namespace check whether the class field attached to the subgroup H is Galois over the subfield of bnr.nf fixed by the Galois group…
bnrisprincipal bnrisprincipal namespace bnr being output by bnrinit and x being an ideal coprime to bnr.mod, returns [v,alpha], where v is the vector of exponen…
bnrL1 bnr_l1 namespace renamed for PEP 8 bnr being output by bnrinit and H being a square matrix defining a congruence subgroup of bnr (the trivial subgroup if o…
bnrmap bnrmap namespace if A and B are bnr structures for the same bnf attached to moduli mA and mB with mB | mA, return the canonical surjectio…
bnrrootnumber bnrrootnumber namespace returns the so-called Artin Root Number, i.e
bnrstark bnrstark namespace bnr being as output by bnrinit, finds a relative equation for the class field corresponding to the module in bnr and the…
bnrstarkunit bnrstarkunit namespace bnr being as output by bnrinit, returns the characteristic polynomial of the (conjectural) Stark unit corresponding to t…
dirzetak dirzetak namespace Dirichlet series of the Dedekind zeta function of the number field nf up to the bound b-1
factornf factornf namespace this function is obsolete, use nffactor
galoischardet galoischardet namespace return the determinant character of the character chi
galoischarpoly galoischarpoly namespace return the list of characteristic polynomials of the representation attached to the character chi
galoischartable galoischartable namespace return the character table of the underlying group of gal
galoisconjclasses galoisconjclasses namespace gal being output by galoisinit, return the list of conjugacy classes
galoisexport galoisexport namespace gal being a Galois group as output by galoisinit, output a string representing the underlying permutation group in GAP n…
galoisfixedfield galoisfixedfield namespace gal being a Galois group as output by galoisinit and perm a subgroup, an element of gal.group or a vector of such elemen…
galoisgetgroup galoisgetgroup namespace query the galpol package for a group of order a with index b in the GAP4 Small Group library
galoisgetname galoisgetname namespace query the galpol package for a string describing the group of order a with index b in the GAP4 Small Group library
galoisgetpol galoisgetpol namespace query the galpol package for a polynomial with Galois group isomorphic to GAP4(a,b), totally real if s=1 (default) and t…
galoisidentify galoisidentify namespace gal being a Galois group as output by galoisinit, output the isomorphism class of the underlying abstract group as a two…
galoisinit galoisinit namespace pol being a polynomial or a number field as output by nfinit defining a Galois extension of Q, compute the Galois group …
galoisisabelian galoisisabelian namespace gal being as output by galoisinit, return 0 if gal is not abelian, the HNF matrix of gal over gal.gen if flag=0, 1 if fl…
galoisisnormal galoisisnormal namespace gal being as output by galoisinit, and subgrp a subgroup of gal as output by galoissubgroups, return 1 if subgrp is a no…
galoispermtopol galoispermtopol namespace gal being a Galois group as output by galoisinit and perm a element of gal.group, return the polynomial defining the cor…
galoissplittinginit galoissplittinginit namespace Galois group over Q of the splitting field of P, for P integral, monic and irreducible or given by a nf structure
galoissubcyclo galoissubcyclo namespace computes a polynomial (in variable v) defining the subfield of Q(zeta_n) fixed by the subgroup H of (Z/nZ)*
galoissubfields galoissubfields namespace output all the subfields of G; flag has the same meaning as for galoisfixedfield
galoissubgroups galoissubgroups namespace output all the subgroups of G
gcharalgebraic gcharalgebraic namespace returns a matrix whose columns form a basis of the algebraic Grossencharacters in gc
gcharconductor gcharconductor namespace returns the conductor of chi, as a modulus over gc.bnf
gcharduallog gcharduallog namespace returns logarithm vector of character chi in R^n
gchareval gchareval namespace computes the evaluation chi(x) in C* if flag=1 and in C/Z if flag=0
gcharidentify gcharidentify namespace returns a Grossencharacter chi belonging to gc that approximately satisfies the constraints that chi_v is Lchiv[i] at th…
gcharinit gcharinit namespace given a bnf as output by bnfinit and a modulus f, initializes data related to the group of Grossencharacters of conducto…
gcharisalgebraic gcharisalgebraic namespace returns 1 if chi is an algebraic (type A0) character
gcharlocal gcharlocal namespace if v is a place, return the local character chi_v
gcharlog gcharlog namespace returns the internal representation (logarithm) of the ideal x suitable for computations in gc, as a column vector
gcharnewprec gcharnewprec namespace given a Grossencharacter group , recomputes its invariants to ensure accurate results to current precision
idealadd idealadd namespace sum of two ideals x and y in the number field defined by nf
idealaddtoone idealaddtoone namespace if y is omitted, when the sum of the ideals in the number field K defined by nf and given in the vector x is equal to Z_…
idealappr idealappr namespace x being a fractional ideal, gives an element b such that v_p(b)=v_p(x) for all prime ideals p dividing x, and v_p(b)>=0 …
idealchinese idealchinese namespace x being a prime ideal factorization and y a vector of elements, gives an element b such that v_p(b-y_p)>=v_p(x) for all …
idealcoprime idealcoprime namespace gives an element b in nf such that b
idealdiv idealdiv namespace quotient x/y of two ideals x and y in HNF in the number field nf
idealdown idealdown namespace finds the intersection of the ideal x with Q
idealfactor idealfactor namespace factorization of the ideal x into prime ideals in the number field nf
idealfactorback idealfactorback namespace given a factorization f, gives the ideal product back
idealfrobenius idealfrobenius namespace returns the Frobenius element (pr|nf/Q) attached to the unramified prime ideal pr in prid format, in the Galois group ga…
idealhnf idealhnf namespace hermite normal form of the ideal u in the number field nf if v is omitted
idealintersect idealintersect namespace intersection of two ideals A and B in the number field defined by nf
idealinv idealinv namespace inverse of the ideal x in the number field nf
idealismaximal idealismaximal namespace if x is a maximal ideal, return it in prid form, else return 0
idealispower idealispower namespace return 1 if A = B^n is an n-th power else return 0
ideallist ideallist namespace vector of vectors L of all idealstar of all ideals of norm<=bound
ideallistarch ideallistarch namespace list is a vector of vectors of bid’s as output by ideallist
ideallog ideallog namespace if bid is a big ideal, as given by idealstar(nf,D,…), gives the vector of exponents on the generators bid.gen (even if…
idealmin idealmin namespace pseudo-minimum of the ideal ix in the direction vdir in the number field nf
idealmul idealmul namespace product of the two ideals x and y in the number field nf
idealnorm idealnorm namespace norm of the ideal x in the number field nf
idealnumden idealnumden namespace returns [A,B], where A,B are coprime integer ideals such that x = A/B
idealpow idealpow namespace k-th power of the ideal x in HNF in the number field nf
idealprimedec idealprimedec namespace ER2: NumberField.factor(p) prime ideal decomposition of the prime number p in the number field nf as a vector of prime ideals
idealprincipalunits idealprincipalunits namespace returns the structure [no, cyc, gen] of the multiplicative group (1 + pr) / (1 + pr^k)
idealramgroups idealramgroups namespace let pr be a prime ideal in prid format, and gal the Galois group of the number field nf, return a vector g such that g[1…
idealred idealred namespace LLL reduction of the ideal I in the number field nf along direction v, in HNF
idealredmodpower idealredmodpower namespace return b such that x * b^n = v is small
idealstar idealstar namespace gives the structure of (Z_K/N)^*, where N is a modulus (an ideal in any form or a vector [f0, foo], where f0 is an ideal…
idealtwoelt idealtwoelt namespace two-element representation of an ideal x in the number field nf
idealval idealval namespace valuation at pr given in idealprimedec format of the ideal x in the number field nf
matalgtobasis matalgtobasis namespace nfalgtobasis applied to every element of the vector or matrix x
matbasistoalg matbasistoalg namespace nfbasistoalg applied to every element of the matrix or vector x
modreverse modreverse namespace reverse polmod of the polmod z, if it exists
newtonpoly newtonpoly namespace Newton polygon of polynomial x with respect to the prime p
nfalgtobasis nfalgtobasis namespace transforms the algebraic number x into a column vector on the integral basis nf.zk
nfbasis nfbasis namespace integral basis of the field Q[a], where a is a root of the polynomial T, using the round 4 algorithm
nfbasistoalg nfbasistoalg namespace transforms the column vector x on the integral basis into an algebraic number
nfcertify nfcertify namespace returns a vector of composite integers used to certify nf.zk and nf.disc unconditionally (both are correct when the outp…
nfcompositum nfcompositum namespace vector of all possible compositums of the number fields defined by the polynomials P and Q; flag is optional, whose bina…
nfdetint nfdetint namespace multiple of the ideal determinant of the pseudo generating set x
nfdisc nfdisc namespace discriminant of the number field defined by the polynomial T
nfdiscfactors nfdiscfactors namespace [D, faD], where D = nfdisc(T), and faD is the factorization of |D|
nfeltadd nfeltadd namespace element x+y in nf
nfeltdiv nfeltdiv namespace element x/y in nf
nfeltdiveuc nfeltdiveuc namespace gives algebraic integer q such that x-qy is small
nfeltdivmodpr nfeltdivmodpr namespace this function is obsolete, use nfmodpr
nfeltdivrem nfeltdivrem namespace gives [q,r] such that r=x-qy is small
nfeltembed nfeltembed namespace complex embeddings of x at places given by vector pl
nfeltispower nfeltispower namespace returns 1 if x is an n-th power in nf (and set y to an n-th root if present), else returns 0
nfeltissquare nfeltissquare namespace returns 1 if x is a square in nf (and sets y to a square root if present), else returns 0
nfeltmod nfeltmod namespace gives r such that r=x-qy is small with q algebraic integer
nfeltmul nfeltmul namespace element x.y in nf
nfeltmulmodpr nfeltmulmodpr namespace this function is obsolete, use nfmodpr
nfeltnorm nfeltnorm namespace norm of x
nfeltpow nfeltpow namespace element x^k in nf
nfeltpowmodpr nfeltpowmodpr namespace this function is obsolete, use nfmodpr
nfeltreduce nfeltreduce namespace gives r such that a-r is in the ideal id and r is small
nfeltreducemodpr nfeltreducemodpr namespace this function is obsolete, use nfmodpr
nfeltsign nfeltsign namespace signs of real embeddings of x at places given by vector pl
nfelttrace nfelttrace namespace trace of x
nfeltval nfeltval namespace valuation of element x at the prime pr as output by idealprimedec
nffactor nffactor namespace factor polynomial T in number field nf
nffactorback nffactorback namespace given a factorization f, returns the factored object back as an nf element
nffactormod nffactormod namespace this routine is obsolete, use nfmodpr and factormod
nfgaloisapply nfgaloisapply namespace apply the Galois automorphism aut to the object x (element or ideal) in the number field nf
nfgaloisconj nfgaloisconj namespace list of conjugates of a root of the polynomial x=nf.pol in the same number field
nfgrunwaldwang nfgrunwaldwang namespace a polynomial in the variable v defining a cyclic extension of nf (given in nf or bnf form) with local behavior prescribe…
nfhilbert nfhilbert namespace if pr is omitted, global Hilbert symbol (a,b) in nf, that is 1 if X2-aY2-bZ^2 has a nontrivial solution (X,Y,Z) in nf,…
nfhnf nfhnf namespace if x=[A,I], gives a pseudo-basis [B,J] of the module sum A_jI_j
nfhnfmod nfhnfmod namespace if x=[A,I], and detx is a multiple of the ideal determinant of x, gives a pseudo-basis of the module sum A_jI_j
nfinit nfinit namespace ER2: NumberField pol being a nonconstant irreducible polynomial in Q[X], returns an nf structure attached to the number field Q[X] / (pol…
nfisideal nfisideal namespace true(1) if x is an ideal in the number field nf, false(0) if not
nfisincl nfisincl namespace let f and g define number fields, either irreducible rational polynomials or number fields as output by nfinit; tests wh…
nfisisom nfisisom namespace as nfisincl but tests whether f is isomorphic to g
nfislocalpower nfislocalpower namespace true(1) if a is an n-th power in the local field K_v, false(0) if not
nfkermodpr nfkermodpr namespace this function is obsolete, use nfmodpr
nflist nflist namespace finds number fields (up to isomorphism) with Galois group of Galois closure isomorphic to G, and s complex places
nfmodpr nfmodpr namespace map x to the residue field mod pr
nfmodprinit nfmodprinit namespace transform the prime ideal pr into modpr format necessary for all operations mod pr in the number field nf
nfmodprlift nfmodprlift namespace lift x from residue field mod pr to nf
nfnewprec nfnewprec namespace transform the number field data nf into new data using the current (usually larger) precision
nfpolsturm nfpolsturm namespace number of distinct real roots of the polynomial s(T) where s runs through the real embeddings given by vector pl
nfresolvent nfresolvent namespace In the case where the Galois closure of the number field defined by pol is S3, Dl, A4, S4, F5, A5, M21, or M42, gives th…
nfroots nfroots namespace roots of polynomial x belonging to nf (Q if omitted) without multiplicity
nfrootsof1 nfrootsof1 namespace number of roots of unity and primitive root of unity in the number field nf
nfsnf nfsnf namespace if x=[A,I,J], outputs D=[d_1,…d_n] Smith normal form of x
nfsolvemodpr nfsolvemodpr namespace this function is obsolete, use nfmodpr
nfsplitting nfsplitting namespace defining polynomial S over Q for the splitting field of P, that is the smallest field over which P is totally split
nfsubfields nfsubfields namespace finds all subfields of degree d of number field defined by pol (all subfields if d is null or omitted)
nfsubfieldscm nfsubfieldscm namespace computes the maximal CM subfield of nf
nfsubfieldsmax nfsubfieldsmax namespace computes the list of maximal subfields of nf
nfweilheight nfweilheight namespace return the absolute Weil height of the vector v seen as an element of the projective space over the number field nf give…
polcompositum polcompositum namespace vector of all possible compositums of the number fields defined by the polynomials P and Q; flag is optional, whose bina…
polgalois polgalois namespace Galois group of the polynomial T (see manual for group coding)
polred polred namespace deprecated, use polredbest
polredabs polredabs namespace a smallest generating polynomial of the number field for the T2 norm on the roots, with smallest index for the minimal T…
polredbest polredbest namespace reduction of the polynomial T (gives minimal polynomials only)
polredord polredord namespace this function is obsolete, use polredbest
poltschirnhaus poltschirnhaus namespace random Tschirnhausen transformation of the polynomial x
rnfalgtobasis rnfalgtobasis namespace relative version of nfalgtobasis, where rnf is a relative numberfield
rnfbasis rnfbasis namespace given a projective Z_K-module M as output by rnfpseudobasis or rnfsteinitz, gives either a basis of M if it is free, or …
rnfbasistoalg rnfbasistoalg namespace relative version of nfbasistoalg, where rnf is a relative numberfield
rnfcharpoly rnfcharpoly namespace characteristic polynomial of a over nf, where a belongs to the algebra defined by T over nf
rnfconductor rnfconductor namespace conductor of the Abelian extension of bnf defined by T
rnfdedekind rnfdedekind namespace relative Dedekind criterion over the number field K, represented by nf, applied to the order Z_K[X]/(P), modulo the prim…
rnfdet rnfdet namespace given a pseudo-matrix M, compute its determinant
rnfdisc rnfdisc namespace given a polynomial T with coefficients in nf, gives a 2-component vector [D,d], where D is the relative ideal discrimina…
rnfeltabstorel rnfeltabstorel namespace transforms the element x from absolute to relative representation
rnfeltdown rnfeltdown namespace expresses x on the base field if possible; returns an error otherwise
rnfeltnorm rnfeltnorm namespace returns the relative norm N_{L/K}(x), as an element of K
rnfeltreltoabs rnfeltreltoabs namespace transforms the element x from relative to absolute representation
rnfelttrace rnfelttrace namespace returns the relative trace Tr_{L/K}(x), as an element of K
rnfeltup rnfeltup namespace expresses x (belonging to the base field) on the relative field
rnfequation rnfequation namespace given a pol with coefficients in nf, gives an absolute equation z of the number field defined by pol
rnfhnfbasis rnfhnfbasis namespace given a bnf attached to a number field K and a projective Z_K module M given by a pseudo-matrix, returns either a true H…
rnfidealabstorel rnfidealabstorel namespace transforms the ideal x from absolute to relative representation
rnfidealdown rnfidealdown namespace finds the intersection of the ideal x with the base field
rnfidealfactor rnfidealfactor namespace factor the ideal x into prime ideals in the number field nfinit(rnf)
rnfidealhnf rnfidealhnf namespace relative version of idealhnf, where rnf is a relative numberfield
rnfidealmul rnfidealmul namespace relative version of idealmul, where rnf is a relative numberfield
rnfidealnormabs rnfidealnormabs namespace absolute norm of the ideal x
rnfidealnormrel rnfidealnormrel namespace relative norm of the ideal x
rnfidealprimedec rnfidealprimedec namespace return prime ideal decomposition of the maximal ideal pr of K in L/K; pr is also allowed to be a prime number p, in whic…
rnfidealreltoabs rnfidealreltoabs namespace transforms the ideal x from relative to absolute representation
rnfidealtwoelt rnfidealtwoelt namespace relative version of idealtwoelt, where rnf is a relative numberfield
rnfidealup rnfidealup namespace lifts the ideal x (of the base field) to the relative field
rnfinit rnfinit namespace T being an irreducible polynomial defined over the number field nf, initializes a vector of data necessary for working i…
rnfisabelian rnfisabelian namespace T being a relative polynomial with coefficients in nf, return 1 if it defines an abelian extension, and 0 otherwise
rnfisfree rnfisfree namespace given a bnf attached to a number field K and a projective Z_K module M given by a pseudo-matrix, return true (1) if M is…
rnfislocalcyclo rnfislocalcyclo namespace true(1) if the l-extension attached to rnf is locally cyclotomic (locally contained in the Z_l extension of K_v at all p…
rnfisnorm rnfisnorm namespace T is as output by rnfisnorminit applied to L/K
rnfisnorminit rnfisnorminit namespace let K be defined by a root of pol, L/K the extension defined by polrel
rnfkummer rnfkummer namespace this function is deprecated
rnflllgram rnflllgram namespace given a pol with coefficients in nf and an order as output by rnfpseudobasis or similar, gives [[neworder],U], where new…
rnfnormgroup rnfnormgroup namespace norm group (or Artin or Takagi group) corresponding to the Abelian extension of bnr.bnf defined by pol, where the module…
rnfpolred rnfpolred namespace given a pol with coefficients in nf, finds a list of relative polynomials defining some subfields, hopefully simpler
rnfpolredabs rnfpolredabs namespace given an irreducible pol with coefficients in nf, finds a canonical relative polynomial defining the same field
rnfpolredbest rnfpolredbest namespace given a pol with coefficients in nf, finds a relative polynomial P defining the same field, hopefully simpler than pol; …
rnfpseudobasis rnfpseudobasis namespace given an irreducible polynomial T with coefficients in nf, returns [A,J,D,d] where [A,J] is a pseudo basis of the maxima…
rnfsteinitz rnfsteinitz namespace given a nf attached to a number field K and a projective module M given by a pseudo-matrix, returns [A,I,D,d] where (A,I…
subcyclohminus subcyclohminus namespace Let F be the abelian number field contained in Q(zeta_f) corresponding to the subgroup H of (Z/fZ)^*
subcycloiwasawa subcycloiwasawa namespace Let F be the abelian number field contained in Q(zeta_f) corresponding to the subgroup H of (Z/fZ)^*
subcyclopclgp subcyclopclgp namespace Let F be the abelian number field contained in Q(zeta_f) corresponding to the subgroup H of (Z/fZ)^*
subgrouplist subgrouplist namespace cyc being any object which has a ‘.cyc’ method giving the cyclic components for a finite Abelian group G, outputs the li…

11. Associative algebras (68)

PARI ER2 Status Note Description
algadd algadd namespace element x+y in al (Hamilton quaternions if omitted)
algalgtobasis algalgtobasis namespace transforms the element x of the algebra al into a column vector on the integral basis of al
algaut algaut namespace the stored automorphism of the splitting field of the cyclic algebra al
algb algb namespace the element b of the center of the cyclic algebra al used to define it
algbasis algbasis namespace basis of the stored order of the central simple algebra al
algbasistoalg algbasistoalg namespace transforms the column vector x on the integral basis of al into an element of al in algebraic form
algcenter algcenter namespace center of the algebra al
algcentralproj algcentralproj namespace projections of the algebra al on the orthogonal central idempotents z[i]
algchar algchar namespace characteristic of the algebra al
algcharpoly algcharpoly namespace (reduced) characteristic polynomial of b in al (Hamilton quaternions if omitted), with respect to the variable v
algdegree algdegree namespace degree of the central simple algebra al
algdim algdim namespace dimension of the algebra al
algdisc algdisc namespace discriminant of the stored order of the algebra al
algdivl algdivl namespace element xin al (Hamilton quaternions if omitted)
algdivr algdivr namespace element x/y in al (Hamilton quaternions if omitted)
alggroup alggroup namespace constructs the group algebra of gal over Q (resp
alggroupcenter alggroupcenter namespace constructs the center of the group algebra of gal over Q (resp
alghasse alghasse namespace the hasse invariant of the central simple algebra al at the place pl
alghassef alghassef namespace the hasse invariant of the central simple algebra al at finite places
alghassei alghassei namespace the hasse invariant of the central simple algebra al at infinite places
algindex algindex namespace the index of the central simple algebra al
alginit alginit namespace initializes the central simple algebra defined by data B, C
alginv alginv namespace element 1/x in al (Hamilton quaternions if omitted)
alginvbasis alginvbasis namespace basis of the natural order of the central simple algebra al in terms of the stored order
algisassociative algisassociative namespace true (1) if the multiplication table mt is suitable for algtableinit(mt,p), false (0) otherwise
algiscommutative algiscommutative namespace test whether the algebra al is commutative
algisdivision algisdivision namespace tests whether the central simple algebra al is a division algebra
algisdivl algisdivl namespace tests whether y is left divisible by x and sets z to the left quotient x
algisinv algisinv namespace tests whether x is invertible in al (Hamilton quaternions if omitted) and sets ix to the inverse of x
algisramified algisramified namespace tests whether the central simple algebra al is ramified, i.e
algissemisimple algissemisimple namespace test whether the algebra al is semisimple
algissimple algissimple namespace test whether the algebra al is simple
algissplit algissplit namespace tests whether the central simple algebra al is split, i.e
alglatadd alglatadd namespace the sum of the lattices lat1 and lat2
alglatcontains alglatcontains namespace tests whether the lattice lat contains the element x
alglatelement alglatelement namespace returns the element of al whose coordinates on the Z-basis of lat are c
alglathnf alglathnf namespace the lattice generated by the columns of m, assuming that this lattice contains d times the integral basis of al
alglatindex alglatindex namespace the generalized index (lat2:lat1)
alglatinter alglatinter namespace the intersection of the lattices lat1 and lat2
alglatlefttransporter alglatlefttransporter namespace the set of x in al such that x*lat1 is contained in lat2
alglatmul alglatmul namespace the lattice generated by the products of elements of lat1 and lat2
alglatrighttransporter alglatrighttransporter namespace the set of x in al such that lat1*x is contained in lat2
alglatsubset alglatsubset namespace tests whether lat1 is contained in lat2 and if true and ptindex is present, sets it to the index (lat2:lat1)
algmakeintegral algmakeintegral namespace computes an integral multiplication table for an isomorphic algebra
algmul algmul namespace element x*y in al (Hamilton quaternions if omitted)
algmultable algmultable namespace multiplication table of al over its prime subfield
algneg algneg namespace element -x in al (Hamilton quaternions if omitted)
algnorm algnorm namespace (reduced) norm of x
algpoleval algpoleval namespace T in K[X] evaluate T(b) in al (Hamilton quaternions if omitted)
algpow algpow namespace element x^n in al (Hamilton quaternions if omitted)
algprimesubalg algprimesubalg namespace prime subalgebra of the positive characteristic, semisimple algebra al
algquotient algquotient namespace quotient of the algebra al by the two-sided ideal I
algradical algradical namespace Jacobson radical of the algebra al
algramifiedplaces algramifiedplaces namespace vector of the places of the center of al that ramify in al
algrandom algrandom namespace random element in al (Hamilton quaternions if omitted) with coefficients in [-b,b]
algrelmultable algrelmultable namespace multiplication table of the central simple algebra al over its center
algsimpledec algsimpledec namespace [J,dec] where J is the Jacobson radical of al and dec is the decomposition into simple algebras of the semisimple algebr…
algsplit algsplit namespace computes an isomorphism between al and M_d(F_q)
algsplittingdata algsplittingdata namespace data stored in the central simple algebra al to compute a splitting of al over an extension
algsplittingfield algsplittingfield namespace the stored splitting field of the central simple algebra al
algsqr algsqr namespace element x^2 in al (Hamilton quaternions if omitted)
algsub algsub namespace element x-y in al (Hamilton quaternions if omitted)
algsubalg algsubalg namespace subalgebra of al with basis B
algtableinit algtableinit namespace initializes the associative algebra over Q (resp
algtensor algtensor namespace tensor product of al1 and al2
algtomatrix algtomatrix namespace left multiplication table of x (table algebra or abs=1) or image of x under a splitting of al (CSA and abs=0)
algtrace algtrace namespace (reduced) trace of x
algtype algtype namespace type of the algebra al

12. Elliptic and hyperelliptic curves (103)

PARI ER2 Status Note Description
ell2cover ell2cover namespace if E is an elliptic curve over Q, returns a basis of the set of everywhere locally soluble 2-covers of the curve E
elladd elladd namespace sum of the points z1 and z2 on elliptic curve E
ellak ellak namespace computes the n-th Fourier coefficient of the L-function of the elliptic curve E (assumes E is an integral model)
ellan ellan namespace computes the first n Fourier coefficients of the L-function of the elliptic curve E defined over a number field
ellanalyticrank ellanalyticrank namespace returns the order of vanishing at s=1 of the L-function of the elliptic curve E and the value of the first nonzero deriv…
ellap ellap namespace given an elliptic curve E defined over a finite field Fq, return the trace of Frobenius a_p = q+1-#E(Fq); for other fiel…
ellbil ellbil namespace deprecated alias for ellheight(E,P,Q)
ellbsd ellbsd namespace E being an elliptic curve over a number field, returns a real number c such that the BSD conjecture predicts that lfun(E…
ellcard ellcard namespace given an elliptic curve E defined over a finite field Fq, return the order of the group E(Fq); for other fields of defin…
ellchangecurve ellchangecurve namespace change data on elliptic curve according to v=[u,r,s,t]
ellchangepoint ellchangepoint namespace change data on point or vector of points x on an elliptic curve according to v=[u,r,s,t]
ellchangepointinv ellchangepointinv namespace change data on point or vector of points x on an elliptic curve according to v=[u,r,s,t], inverse of ellchangepoint
ellconvertname ellconvertname namespace convert an elliptic curve name (as found in the elldata database) from a string to a triplet [conductor, isogeny class, …
elldivpol elldivpol namespace n-division polynomial f_n for the curve E in the variable v
elleisnum elleisnum namespace k being an even positive integer, computes the numerical value of the Eisenstein series of weight k at the lattice w, as…
elleta elleta namespace w=[w1,w2], returns the vector [eta1,eta2] of quasi-periods attached to [w1,w2]
ellformaldifferential ellformaldifferential namespace E elliptic curve, n integer
ellformalexp ellformalexp namespace E elliptic curve, returns n terms of the formal elliptic exponential on E as a series in z
ellformallog ellformallog namespace E elliptic curve, returns n terms of the elliptic logarithm as a series of t =-x/y
ellformalpoint ellformalpoint namespace E elliptic curve, n integer; return the coordinates [x(t), y(t)] on the elliptic curve as a formal expansion in the form…
ellformalw ellformalw namespace E elliptic curve, n integer; returns n terms of the formal expansion of w = -1/y in the formal parameter t = -x/y
ellfromeqn ellfromeqn namespace given a genus 1 plane curve, defined by the affine equation f(x,y) = 0, return the coefficients [a1,a2,a3,a4,a6] of a We…
ellfromj ellfromj namespace returns the coefficients [a1,a2,a3,a4,a6] of a fixed elliptic curve with j-invariant j
ellgenerators ellgenerators namespace if E is an elliptic curve over the rationals, return the generators of the Mordell-Weil group attached to the curve
ellglobalred ellglobalred namespace E being an elliptic curve over a number field, returns [N, v, c, faN, L], where N is the conductor of E, c is the produc…
ellgroup ellgroup namespace given an elliptic curve E defined over a finite field Fq, returns the structure of the group E(Fq); for other fields of …
ellheegner ellheegner namespace return a rational nontorsion point on the elliptic curve E assumed to be of rank 1
ellheight ellheight namespace Faltings height of the curve E, resp
ellheightmatrix ellheightmatrix namespace gives the height matrix for vector of points x on elliptic curve E
ellidentify ellidentify namespace look up the elliptic curve E in the elldata database and return [[N, M, …], C] where N is the name of the curve in Cre…
ellinit ellinit namespace let x be a vector [a1,a2,a3,a4,a6], or [a4,a6] if a1=a2=a3=0, defining the curve Y^2 + a1.XY + a3.Y = X^3 + a2.X^2 + a4.…
ellintegralmodel ellintegralmodel namespace given an elliptic curve E defined over a number field or Qp, returns an integral model
elliscm elliscm namespace return 0 if the elliptic curve E, defined over a number field, is not CM, otherwise return the discriminant of its endom…
ellisdivisible ellisdivisible namespace given E/K and P in E(K), checks whether P = [n]R for some R in E(K) and sets Q to one such R if so; the integer n >= 0 m…
ellisisom ellisisom namespace return 0 if the elliptic curves E and F defined over the same number field are not isomorphic, otherwise return [u,r,s,t…
ellisogeny ellisogeny namespace compute the image and isogeny corresponding to the quotient of E by the subgroup G
ellisogenyapply ellisogenyapply namespace given an isogeny f and g either a point P (in the domain of f) or an isogeny, apply f to g: return the image of P under …
ellisomat ellisomat namespace E being an elliptic curve over a number field K, returns a list of representatives of the isomorphism classes of ellipti…
ellisoncurve ellisoncurve namespace true(1) if z is on elliptic curve E, false(0) if not
ellisotree ellisotree namespace E being an elliptic curve over Q or a set of isogenous rational curves as given by ellisomat, return minimal models of t…
ellissupersingular ellissupersingular namespace return 1 if the elliptic curve E, defined over a number field or a finite field, is supersingular at p, and 0 otherwise
ellj ellj namespace elliptic j invariant of x
ellL1 ell_l1 namespace renamed for PEP 8 returns the value at s=1 of the derivative of order r of the L-function of the elliptic curve E
elllocalred elllocalred namespace E being an elliptic curve, returns [f,kod,[u,r,s,t],c], where f is the conductor’s exponent, kod is the Kodaira type for…
elllog elllog namespace return the discrete logarithm of the point P of the elliptic curve E in base G
elllseries elllseries namespace L-series at s of the elliptic curve E, where A a cut-off point close to 1
ellmaninconstant ellmaninconstant namespace let E be an elliptic curve over Q given by ellinit or a rational isogeny class given by ellisomat
ellminimaldisc ellminimaldisc namespace E being an elliptic curve defined over a number field output by ellinit, return the minimal discriminant ideal of E
ellminimalmodel ellminimalmodel namespace determines whether the elliptic curve E defined over a number field admits a global minimal model
ellminimaltwist ellminimaltwist namespace E being an elliptic curve defined over Q, return a discriminant D such that the twist of E by D is minimal among all pos…
ellmoddegree ellmoddegree namespace e being an elliptic curve defined over Q output by ellinit, compute the modular degree of e divided by the square of the…
ellmodulareqn ellmodulareqn namespace given a prime N < 500, return a vector [P, t] where P(x,y) is a modular equation of level N
ellmul ellmul namespace n times the point z on elliptic curve E (n in Z)
ellneg ellneg namespace opposite of the point z on elliptic curve E
ellnonsingularmultiple ellnonsingularmultiple namespace given E/Q and P in E(Q), returns the pair [R,n] where n is the least positive integer such that R = [n]P has everywhere …
ellorder ellorder namespace order of the point z on the elliptic curve E over a number field or a finite field, 0 if nontorsion
ellordinate ellordinate namespace y-coordinates corresponding to x-ordinate x on elliptic curve E
ellpadicbsd ellpadicbsd namespace returns [r,Lp] where r is the (conjectural) analytic rank of the p-adic L-function attached to the quadratic twist E_D a…
ellpadicfrobenius ellpadicfrobenius namespace matrix of the Frobenius at p>2 in the standard basis of H^1_dR(E) to absolute p-adic precision p^n
ellpadicheight ellpadicheight namespace E elliptic curve/Q, P in E(Q), p prime, n an integer; returns the cyclotomic p-adic heights of P
ellpadicheightmatrix ellpadicheightmatrix namespace gives the height-pairing matrix for vector of points Q on elliptic curve E
ellpadicL ellpadic_l namespace renamed for PEP 8 returns the value on a character of Z_{p}^* represented by an integer s or a vector [s1,s2] of the derivative of order r…
ellpadiclambdamu ellpadiclambdamu namespace returns the Iwasawa invariants for the p-adic L-function attached to E, twisted by (D,.) and the i-th power of the Teich…
ellpadiclog ellpadiclog namespace returns the logarithm of P (in the kernel of reduction) to relative p-adic precision p^n
ellpadicregulator ellpadicregulator namespace E elliptic curve/Q, S a vector of points in E(Q), p prime, n an integer; returns the p-adic cyclotomic regulator of the …
ellpadics2 ellpadics2 namespace returns s2 to absolute p-adic precision p^n
ellperiods ellperiods namespace w describes a complex period lattice ([w1,w2] or an ellinit structure)
ellpointtoz ellpointtoz namespace lattice point z corresponding to the point P on the elliptic curve E
ellpow ellpow namespace deprecated alias for ellmul
ellrank ellrank namespace if E is an elliptic curve over Q, attempts to compute the Mordell-Weil group attached to the curve
ellrankinit ellrankinit namespace if E is an elliptic curve over Q, initialize data for further calls to ellrank
ellratpoints ellratpoints namespace E being an rational model of an elliptic curve, return a vector containing the affine rational points on the curve of na…
ellrootno ellrootno namespace root number for the L-function of the elliptic curve E/Q at a prime p (including 0, for the infinite place); global root…
ellsaturation ellsaturation namespace let E be an elliptic curve over Q and V be a vector of independent rational points on E of infinite order that generate …
ellsea ellsea namespace computes the order of the group E(Fq) for the elliptic curve E, defined over a finite field, using SEA algorithm, with e…
ellsearch ellsearch namespace returns all curves in the elldata database matching constraint N: given name (N = “11a1” or [11,0,1]), given isogeny cla…
ellsigma ellsigma namespace computes the value at z of the Weierstrass sigma function attached to the lattice L, as given by ellperiods(,1)
ellsub ellsub namespace difference of the points z1 and z2 on elliptic curve E
ellsupersingularj ellsupersingularj namespace return a random supersingular j-invariant defined over F_p^2 if p is prime number, over the (finite) field of definition…
elltamagawa elltamagawa namespace E being an elliptic curve over a number field, returns the global Tamagawa number of the curve
elltaniyama elltaniyama namespace modular parametrization of elliptic curve E/Q
elltatepairing elltatepairing namespace computes the Tate pairing of the two points P and Q on the elliptic curve E
elltors elltors namespace torsion subgroup of elliptic curve E: order, structure, generators
elltrace elltrace namespace sum of the Galois conjugates of the point P on elliptic curve E
elltwist elltwist namespace returns an ell structure for the twist of the elliptic curve E by the quadratic extension defined by P (when P is a poly…
ellweilcurve ellweilcurve namespace let E be an elliptic curve over Q given by ellinit or a rational isogeny class given by ellisomat
ellweilpairing ellweilpairing namespace computes the Weil pairing of the two points of m-torsion P and Q on the elliptic curve E
ellwp ellwp namespace computes the value at z of the Weierstrass P function attached to the lattice w, as given by ellperiods
ellxn ellxn namespace return polynomials [A,B] in the variable v such that x([n]P) = (A/B)(t) for any P = [t,u] on E outside of n-torsion
ellzeta ellzeta namespace computes the value at z of the Weierstrass Zeta function attached to the lattice w, as given by ellperiods(,1)
ellztopoint ellztopoint namespace inverse of ellpointtoz
genus2igusa genus2igusa namespace let PQ be a polynomial P, resp
genus2red genus2red namespace let PQ be a polynomial P, resp
hyperellchangecurve hyperellchangecurve namespace C being a nonsingular hyperelliptic model of a curve, apply the change of coordinate given by m
hyperellcharpoly hyperellcharpoly namespace X being a nonsingular hyperelliptic curve defined over a finite field, return the characteristic polynomial of the Frobe…
hyperelldisc hyperelldisc namespace X being a nonsingular hyperelliptic model of a curve, defined over a field of characteristic distinct from 2, returns it…
hyperellisoncurve hyperellisoncurve namespace X being a nonsingular hyperelliptic model of a curve, test whether the point p is on the curve
hyperellminimaldisc hyperellminimaldisc namespace C being a nonsingular integral hyperelliptic model of a curve, return the minimal discrminant of an integral model of C
hyperellminimalmodel hyperellminimalmodel namespace C being a nonsingular integral hyperelliptic model of a curve, return an integral model of C with minimal discriminant
hyperellordinate hyperellordinate namespace y-coordinates corresponding to x-ordinate x on hyperelliptic curve H
hyperellpadicfrobenius hyperellpadicfrobenius namespace Q being a rational polynomial of degree d and X being the curve defined by y^2=Q(x), return the matrix of the Frobenius …
hyperellratpoints hyperellratpoints namespace X being a nonsingular hyperelliptic curve given by an rational model, return a vector containing the affine rational poi…
hyperellred hyperellred namespace C being a nonsingular integral hyperelliptic model of a curve, return an integral model of C with the same discriminant …

13. L-functions (28)

PARI ER2 Status Note Description
lfun lfun namespace compute the L-function value L(s), or if D is set, the derivative of order D at s
lfunan lfunan namespace compute the first n terms of the Dirichlet series attached to the L-function given by L (Lmath, Ldata or Linit)
lfunartin lfunartin namespace returns the Ldata structure attached to the Artin L-function provided by the representation rho of the Galois group of t…
lfuncheckfeq lfuncheckfeq namespace given an L-function (Lmath, Ldata or Linit), check whether the functional equation is satisfied
lfunconductor lfunconductor namespace gives the conductor of the given L-function, expecting to find it in the interval [1,setN]
lfuncost lfuncost namespace estimate the cost of running lfuninit(L,sdom,der) at current bit precision
lfuncreate lfuncreate namespace given either an object such as a polynomial, elliptic curve, Dirichlet or Hecke character, eta quotient, etc., or an exp…
lfundiv lfundiv namespace creates the Ldata structure (without initialization) corresponding to the quotient of the Dirichlet series given by L1 a…
lfundual lfundual namespace creates the Ldata structure (without initialization) corresponding to the dual L-function of L
lfunetaquo lfunetaquo namespace returns the Ldata structure attached to the modular form z->prod(i=1,#M[,1],eta(M[i,1]*z)^M[i,2])
lfuneuler lfuneuler namespace return the Euler factor at p of the L-function given by L (Lmath, Ldata or Linit) assuming the L-function admits an Eule…
lfungenus2 lfungenus2 namespace returns the Ldata structure attached to the L-function attached to the genus-2 curve defined by y^2=F(x) or y^2+Q(x)*y=P…
lfunhardy lfunhardy namespace variant of the Hardy L-function attached to L, used for plotting on the critical line
lfuninit lfuninit namespace precompute data for evaluating the L-function given by ‘L’ (and its derivatives of order der, if set) in rectangular dom…
lfunlambda lfunlambda namespace compute the completed L function Lambda(s), or if D is set, the derivative of order D at s
lfunmfspec lfunmfspec namespace L corresponding to a modular eigenform, returns [ve,vo,om,op] in even weight, where ve (resp., vo) is the vector of even…
lfunmul lfunmul namespace creates the Ldata structure (without initialization) corresponding to the product of the Dirichlet series given by L1 an…
lfunorderzero lfunorderzero namespace computes the order of the possible zero of the L-function at the center k/2 of the critical strip
lfunparams lfunparams namespace returns the parameters [N, k, vga] of the L-function defined by ldata (see lfuncreate)
lfunqf lfunqf namespace returns the Ldata structure attached to the theta function of the lattice attached to the definite positive quadratic fo…
lfunrootres lfunrootres namespace given the Ldata attached to an L-function (or the output of lfunthetainit), compute the root number and the residues
lfunshift lfunshift namespace creates the Ldata structure (without initialization) corresponding to the function Ld such that Ld(s) = L(s-d)
lfunsympow lfunsympow namespace returns the Ldata structure attached to the L-function attached to m-th symmetric power of the elliptic curve E defined …
lfuntheta lfuntheta namespace compute the value of the m-th derivative at t of the theta function attached to the L-function given by data
lfunthetacost lfunthetacost namespace estimates the cost of running lfunthetainit(L,tdom,m) at current bit precision
lfunthetainit lfunthetainit namespace precompute data for evaluating the m-th derivative of theta functions with argument in domain tdom (by default t is real…
lfuntwist lfuntwist namespace creates the Ldata structure (without initialization) corresponding to the twist of L by the primitive character attached…
lfunzeros lfunzeros namespace lim being either an upper limit or a real interval, computes an ordered list of zeros of L(s) on the critical line up to…

14. Hypergeometric motives (12)

PARI ER2 Status Note Description
hgmalpha hgmalpha namespace returns the alpha and beta parameters of the hypergeometric motive template H
hgmbydegree hgmbydegree namespace outputs [L(0),…,L(n-1)] where L(w) is the list of cyclotomic parameters of all possible hypergeometric motive template…
hgmcoef hgmcoef namespace (H,t) being a hypergeometric motive, returns the n-th coefficient of its L-function
hgmcoefs hgmcoefs namespace (H,t) being a hypergeometric motive, returns the first n coefficients of its L-function, where Euler factors at wild pri…
hgmcyclo hgmcyclo namespace returns the cyclotomic parameters (D,E) of the hypergeometric motive template H
hgmeulerfactor hgmeulerfactor namespace (H,t) being a hypergeometric motive, returns the Euler factor P_p at the prime p; if present, set e to the valuation of …
hgmgamma hgmgamma namespace returns the gamma vector of the hypergeometric motive template H
hgminit hgminit namespace Create the template for a hypergeometric motive with parameters a and possibly b
hgmissymmetrical hgmissymmetrical namespace is the hypergeometric motive template H symmetrical at t=1?
hgmparams hgmparams namespace H being a hypergeometric motive template, returns [d, w, [P, T], M], where d is the degree, w the weight, P the Hodge po…
hgmtwist hgmtwist namespace twist by 1/2 of alpha and beta of the hypergeometric motive template H
lfunhgm lfunhgm namespace (H,t) being a hypergeometric motive, returns the corresponding lfuncreate data for use with the L function package

15. Modular forms (69)

PARI ER2 Status Note Description
lfunmf lfunmf namespace If F is a modular form in mf, output the L-functions corresponding to its complex embeddings
mfatkin mfatkin namespace Given an mfatk output by mfatk = mfatkininit(mf,Q) and a modular form f belonging to the space mf, returns the modular f…
mfatkineigenvalues mfatkineigenvalues namespace given a modular form space mf and a primitive divisor Q of the level of mf, outputs the corresponding Atkin-Lehner eigen…
mfatkininit mfatkininit namespace initializes data necessary for working with Atkin–Lehner operators W_Q, for now only the function mfatkin
mfbasis mfbasis namespace If NK=[N,k,CHI] as in mfinit, gives a basis of the corresponding subspace of M_k(G_0(N),CHI)
mfbd mfbd namespace F being a generalized modular form, return B(d)(F), where B(d) is the expanding operator tau -> d tau
mfbracket mfbracket namespace compute the m-th Rankin-Cohen bracket of the generalized modular forms F and G
mfcoef mfcoef namespace Compute the n-th Fourier coefficient a(n) of the generalized modular form F
mfcoefs mfcoefs namespace Compute the vector of coefficients [a[0],a[d],…,a[nd]] of the modular form F
mfconductor mfconductor namespace mf being output by mfinit and F a modular form, gives the smallest level at which F is defined
mfcosets mfcosets namespace list of right cosets of G_0(N) i.e., matrices g_j in G such that G = U G_0(N) g_j
mfcuspisregular mfcuspisregular namespace In the space defined by NK = [N,k,CHI] or NK = mf, determine if cusp in canonical format (oo or denominator dividing N) …
mfcusps mfcusps namespace list of cusps of G_0(N) in the form a/b with b dividing N
mfcuspval mfcuspval namespace valuation of modular form F in the space mf at cusp, which can be either oo or any rational number
mfcuspwidth mfcuspwidth namespace width of cusp in Gamma_0(N)
mfDelta mf_delta namespace renamed for PEP 8 mf corresponding to the Ramanujan Delta function
mfderiv mfderiv namespace m-th formal derivative of the power series corresponding to the generalized modular form F, with respect to the differen…
mfderivE2 mfderiv_e2 namespace renamed for PEP 8 compute the Serre derivative (q.d/dq)F - kE_2F/12 of the generalized modular form F of weight k; and if m > 1, the m-th …
mfdescribe mfdescribe namespace gives a human-readable description of F, which is either a modular form space or a modular form
mfdim mfdim namespace If NK=[N,k,CHI] as in mfinit, gives the dimension of the corresponding subspace of M_k(G_0(N),chi)
mfdiv mfdiv namespace compute F/G for two modular forms F and G assuming that the quotient will not have poles at infinity
mfEH mf_eh namespace renamed for PEP 8 k>0 being in 1/2+Z, mf corresponding to the Cohen-Eisenstein series H_k of weight k on G_0(4)
mfeigenbasis mfeigenbasis namespace vector of the eigenforms for the space mf
mfeigensearch mfeigensearch namespace search for normalized rational eigen cuspforms with quadratic characters given a few initial coefficients
mfeisenstein mfeisenstein namespace create the Eisenstein E_k(CHI1,CHI2), where an omitted character is considered as trivial
mfEk mf_ek namespace renamed for PEP 8 mf corresponding to the standard Eisenstein series E_k for nonnegative even integer k
mfembed mfembed namespace if v is omitted, f must be a modular form or a modular form space with parameters [N,k,chi] and we return a vector of co…
mfeval mfeval namespace computes the numerical value of the modular form F at the point vtau or the vector vtau of points in the completed upper…
mffields mffields namespace If mf is output by mfinit, gives the vector of polynomials defining each Galois orbit of the new space
mffromell mffromell namespace E being an elliptic curve defined over Q given by an integral model in ellinit format, computes a 3-component vector [mf…
mffrometaquo mffrometaquo namespace modular form corresponding to the eta quotient matrix eta
mffromlfun mffromlfun namespace L being an L-function representing a self-dual modular form, return [NK,space,v] where mf=mfinit(NK,space) contains the …
mffromqf mffromqf namespace Q being an even positive definite quadratic form and P a homogeneous spherical polynomial for Q, computes a 3-component …
mfgaloisprojrep mfgaloisprojrep namespace mf being an mf output by mfinit in weight 1, and F an eigenform, returns a polynomial defining the field fixed by the ke…
mfgaloistype mfgaloistype namespace NK being either [N,1,CHI] or an mf output by mfinit in weight 1 , gives the vector of types of Galois representations at…
mfhecke mfhecke namespace F being a modular form in space mf, returns T(n)F, where T(n) is the n-th Hecke operator
mfheckemat mfheckemat namespace if vecn is an integer, matrix of the Hecke operator T(n) on the basis formed by mfbasis(mf), if it is a vector, vector o…
mfinit mfinit namespace Create the space of modular forms corresponding to the data contained in NK and space
mfisCM mfis_cm namespace renamed for PEP 8 Tests whether the eigenform F is a CM form
mfisequal mfisequal namespace Checks whether the modular forms F and G are equal
mfisetaquo mfisetaquo namespace if the generalized modular form f is a holomorphic eta quotient, return the eta quotient matrix, else return 0
mfkohnenbasis mfkohnenbasis namespace mf being a cuspidal space of half-integral weight k >= 3/2, gives a basis B of the Kohnen + space of mf as a matrix whos…
mfkohnenbijection mfkohnenbijection namespace mf being a cuspidal space of half-integral weight returns [mf2,M,K,shi], where M is a matrix giving a Hecke-module isomo…
mfkohneneigenbasis mfkohneneigenbasis namespace mf being a cuspidal space of half-integral weight k >= 3/2 and bij being the output of mfkohnenbijection(mf), outputs a …
mflinear mflinear namespace vF being a vector of modular forms and v a vector of coefficients of same length, compute the linear combination of the …
mfmanin mfmanin namespace Given the modular symbol FS associated to an eigenform F by mfsymbol(mf,F), computes the even and odd special polynomial…
mfmul mfmul namespace Multiply the two forms F and G
mfnumcusps mfnumcusps namespace number of cusps of Gamma_0(N)
mfparams mfparams namespace If F is a modular form space, returns [N,k,CHI,space,Phi]: level, weight, character, and space code; where Phi is the cy…
mfperiodpol mfperiodpol namespace period polynomial of the cuspidal part of the form f, in other words integral from 0 to ioo of (X-tau)^(k-2)f(tau)
mfperiodpolbasis mfperiodpolbasis namespace basis of period polynomials for weight k
mfpetersson mfpetersson namespace Petersson scalar product of the modular forms f and g belonging to the same modular form space mf, given by the correspo…
mfpow mfpow namespace compute F^n
mfsearch mfsearch namespace NK being of the form [N,k] with k possibly half-integral, search for a modular form with rational coefficients, of weigh…
mfshift mfshift namespace Divide the form F by q^s omitting the remainder if there is one; s can be negative
mfshimura mfshimura namespace F being a modular form of half-integral weight k >= 3/2 and D a positive squarefree integer, computes the Shimura lift G…
mfslashexpansion mfslashexpansion namespace g being in M_2^+(Q), computes the Fourier expansion of f|_k g to n terms
mfspace mfspace namespace identify the modular space mf, resp
mfsplit mfsplit namespace mf containing the new space split the new space into Galois orbits of eigenforms of the newspace and return [vF,vK], whe…
mfsturm mfsturm namespace Sturm bound for modular forms on G_0(N) and weight k, i.e., an upper bound for the order of the zero at infinity of a no…
mfsymbol mfsymbol namespace Initialize data for working with all period polynomials of the modular form f: this is essential for efficiency for func…
mfsymboleval mfsymboleval namespace evaluation of the modular symbol fs output by mfsymbol on the given path, where path is either a vector [s1,s2] or an in…
mftaylor mftaylor namespace F being a modular form in M_k(SL_2(Z)), computes the first n+1 canonical Taylor expansion of F around tau=I
mfTheta mf_theta namespace renamed for PEP 8 the unary theta function corresponding to the primitive Dirichlet character psi, hence of weight 1/2 if psi is even, of …
mftobasis mftobasis namespace coefficients of the form F on the basis given by the mfbasis(mf)
mftocoset mftocoset namespace M being a matrix in SL_2(Z) and Lcosets being mfcosets(N), find the right coset of G_0(N) to which M belongs
mftonew mftonew namespace mf being a full or cuspidal space with parameters [N,k,chi] and F a cusp form in that space, returns a vector of 3-compo…
mftraceform mftraceform namespace If NK=[N,k,CHI,.] as in mfinit with k integral, gives the trace form in the corresponding subspace of S_k(G_0(N),chi)
mftwist mftwist namespace returns the twist of the form F by the integer D, i.e., the form G such that mfcoef(G,n)=(D/n)mfcoef(F,n), where (D/n) i…

16. Modular symbols (31)

PARI ER2 Status Note Description
msatkinlehner msatkinlehner namespace M being a full modular symbol space of level N, as given by msinit, let Q | N, (Q,N/Q) = 1, and let H be a subspace stab…
mscosets mscosets namespace gen being a system of generators for a group G and H being a subgroup of finite index of G, return a list of right coset…
mscuspidal mscuspidal namespace M being a full modular symbol space, as given by msinit, return its cuspidal part S
msdim msdim namespace M being a modular symbol space or subspace, return its dimension as a Q-vector space
mseisenstein mseisenstein namespace M being a full modular symbol space, as given by msinit, return its Eisenstein subspace
mseval mseval namespace M being a full modular symbol space, as given by msinit, s being a modular symbol from M and p being a path between two …
msfarey msfarey namespace F being a Farey symbol attached to a group G contained in SL2(Z) and H a subgroup of G, return a Farey symbol attached t…
msfromcusp msfromcusp namespace returns the modular symbol attached to the cusp c, where M is a modular symbol space of level N
msfromell msfromell namespace return the [M, x], where M is msinit(N,2) and x is the modular symbol in M attached to the elliptic curve E/Q
msfromhecke msfromhecke namespace given a msinit M and a vector v of pairs [p, P] (where p is prime and P is a polynomial with integer coefficients), retu…
msgetlevel msgetlevel namespace M being a full modular symbol space, as given by msinit, return its level N
msgetsign msgetsign namespace M being a full modular symbol space, as given by msinit, return its sign
msgetweight msgetweight namespace M being a full modular symbol space, as given by msinit, return its weight k
mshecke mshecke namespace M being a full modular symbol space, as given by msinit, p being a prime number, and H being a Hecke-stable subspace (M …
msinit msinit namespace given G a finite index subgroup of SL(2,Z) and a finite dimensional representation V of GL(2,Q), creates a space of modu…
msissymbol msissymbol namespace M being a full modular symbol space, as given by msinit, check whether s is a modular symbol attached to M
mslattice mslattice namespace M being a full modular symbol space, as given by msinit, H a Q-subspace or a matrix of modular symbols
msnew msnew namespace M being a full modular symbol space, as given by msinit, return its new cuspidal subspace
msomseval msomseval namespace return the vectors of moments of the p-adic distribution attached to the path ‘path’ via the overconvergent modular symb…
mspadicinit mspadicinit namespace M being a full modular symbol space, as given by msinit and a prime p, initialize technical data needed to compute with …
mspadicL mspadic_l namespace renamed for PEP 8 given mu from mspadicmoments (p-adic distributions attached to an overconvergent symbol PHI) returns the value on a char…
mspadicmoments mspadicmoments namespace given Mp from mspadicinit, an overconvergent eigensymbol PHI, and optionally a fundamental discriminant D coprime to p, …
mspadicseries mspadicseries namespace given mu from mspadicmoments, returns the attached p-adic series with maximal p-adic precision, depending on the precisi…
mspathgens mspathgens namespace M being a full modular symbol space, as given by msinit, return a set of Z[G]-generators for Div0(P1 Q)
mspathlog mspathlog namespace M being a full modular symbol space, as given by msinit and p being a path between two elements in P^1(Q), return (p_i) …
mspetersson mspetersson namespace M being a full modular symbol space, as given by msinit, calculate the intersection product {F,G} of modular symbols F a…
mspolygon mspolygon namespace M describes a subgroup G of finite index in the modular group PSL2(Z), as given by msinit or a positive integer N (encod…
msqexpansion msqexpansion namespace M being a full modular symbol space, as given by msinit, and projH being a projector on a Hecke-simple subspace, return …
mssplit mssplit namespace M being a full modular symbol space, as given by msinit, and H being a subspace (the new subspace if omitted), split H i…
msstar msstar namespace M being a full modular symbol space, as given by msinit, return the matrix of the * involution, induced by complex conju…
mstooms mstooms namespace given Mp from mspadicinit, lift the (classical) eigen symbol phi to a distribution-valued overconvergent symbol in the s…

17. Plotting (35)

PARI ER2 Status Note Description
parploth python use Matplotlib parallel version of ploth
parplothexport python use Matplotlib parallel version of plothexport
plot python use Matplotlib crude plot of expression expr, X goes from a to b, with Y ranging from Ymin to Ymax
plotarc python use Matplotlib if the cursor is at position (x1,y1), draws the ellipse that fits inside the box with diagonal (x1,y1) and (x2,y2) in re…
plotbox python use Matplotlib if the cursor is at position (x1,y1), draw a box with diagonal (x1,y1) and (x2,y2) in rectwindow w (cursor does not move…
plotclip python use Matplotlib clip the contents of the rectwindow to the bounding box (except strings)
plotcolor python use Matplotlib in rectwindow w, set default color to c
plotcopy python use Matplotlib copy the contents of rectwindow sourcew to rectwindow destw with offset (dx,dy)
plotcursor python use Matplotlib current position of cursor in rectwindow w
plotdraw python use Matplotlib draw rectwindow w
plotexport python use Matplotlib draw vector of rectwindows list as in plotdraw, returning the resulting picture as a character string; fmt is either “ps…
ploth python use Matplotlib plot of expression expr, X goes from a to b in high resolution
plothexport python use Matplotlib plot of expression expr, X goes from a to b in high resolution, returning the resulting picture as a character string wh…
plothraw python use Matplotlib plot in high resolution points whose x (resp
plothrawexport python use Matplotlib plot in high resolution points whose x (resp
plothsizes python use Matplotlib returns array of 8 elements: terminal width and height, sizes for ticks in horizontal and vertical directions, width and…
plotinit python use Matplotlib initialize rectwindow w to size x,y
plotkill python use Matplotlib erase the rectwindow w
plotlines python use Matplotlib draws an open polygon in rectwindow w where X and Y contain the x (resp
plotlinetype python use Matplotlib this function is obsolete; no graphing engine implement this functionality
plotmove python use Matplotlib move cursor to position x,y in rectwindow w
plotpoints python use Matplotlib draws in rectwindow w the points whose x (resp y) coordinates are in X (resp Y)
plotpointsize python use Matplotlib change the “size” of following points in rectwindow w
plotpointtype python use Matplotlib this function is obsolete; no graphing engine implement this functionality
plotrbox python use Matplotlib if the cursor is at (x1,y1), draw a box with diagonal (x1,y1)-(x1+dx,y1+dy) in rectwindow w (cursor does not move)
plotrecth python use Matplotlib writes to rectwindow w the curve output of ploth(w,X=a,b,expr,flag,n)
plotrecthraw python use Matplotlib plot graph(s) for data in rectwindow w, where data is a vector of vectors
plotrline python use Matplotlib if the cursor is at (x1,y1), draw a line from (x1,y1) to (x1+dx,y1+dy) (and move the cursor) in the rectwindow w
plotrmove python use Matplotlib move cursor to position (dx,dy) relative to the present position in the rectwindow w
plotrpoint python use Matplotlib draw a point (and move cursor) at position dx,dy relative to present position of the cursor in rectwindow w
plotscale python use Matplotlib scale the coordinates in rectwindow w so that x goes from x1 to x2 and y from y1 to y2 (y2<y1 is allowed)
plotstring python use Matplotlib draw in rectwindow w the string corresponding to x
psdraw python use Matplotlib obsolete function
psploth python use Matplotlib obsolete function
psplothraw python use Matplotlib obsolete function