PARI-GP Reference Card PARI Types & Input Formats Lists, Sets & Sorting (PARI-GP version 2.2.5) t INT. Integers ±n sort x by kth component vecsort(x, {k}, {fl = 0}) Note: optional arguments are surrounded by braces {}. t REAL. Real Numbers ±n.ddd Sets (= row vector of strings with strictly increasing entries) Starting & Stopping GP t INTMOD. Integers modulo m Mod(n, m) intersection of sets x and y setintersect(x, y) t FRAC. Rational Numbers n/m set of elements in x not belonging to y setminus(x, y) to enter GP, just type its name: gp t COMPLEX. Complex Numbers x + y ∗ I union of sets x and y setunion(x, y) to exit GP, type \q or quit t PADIC. p-adic Numbers x + O(p^k) look if y belongs to the set x setsearch(x, y, {fl}) Help t QUAD. Quadratic Numbers x + y ∗ quadgen(D) Lists t POLMOD. Polynomials modulo g Mod(f, g) create empty list of maximal length n listcreate(n) describe function ?function t POL. Polynomials a ∗ x^n + ··· + b delete all components of list l listkill(l) extended description ??keyword t SER. Power Series f + O(x^k) append x to list l listput(l, x, {i}) list of relevant help topics ???pattern t QFI/t QFR. Imag/Real bin. quad. forms Qfb(a, b, c, {d}) insert x in list l at position i listinsert(l, x, i) Input/Output & Defaults t RFRAC. Rational Functions f/g sort the list l listsort(l, {fl}) t VEC/t COL. Row/Column Vectors [x, y, z], [x, y, z] output previous line, the lines before %, %‘, %‘‘, etc. ~ t MAT. Matrices [x, y;z, t;u, v] Programming & User Functions output from line n %n t LIST. Lists List([x, y, z]) Control Statements (X: formal parameter in expression seq) separate multiple statements on line ; t STR. Strings "aaa" eval. seq for a ≤ X ≤ b for(X = a, b, seq) extend statement on additional lines \ eval. seq for X dividing n fordiv(n, X, seq) extend statements on several lines {seq ; seq ;} 1 2 Standard Operators eval. seq for primes a ≤ X ≤ b forprime(X = a, b, seq) comment /* ... */ basic operations +, - , *, /, ^ eval. seq for a ≤ X ≤ b stepping s forstep(X = a, b, s, seq) one-line comment, rest of line ignored \\ ... i=i+1, i=i-1, i=i*j, ... i++, i--, i*=j,... multivariable for forvec(X = v, seq) set default d to val default({d}, {val}, {fl}) euclidean quotient, remainder x\/y, x\y, x%y, divrem(x, y) if a 6= 0, evaluate seq , else seq if(a, {seq }, {seq }) mimic behaviour of GP 1.39 default(compatible,3) 1 2 1 2 shift x left or right n bits x<>n or shift(x, n) evaluate seq until a 6= 0 until(a, seq) Metacommands comparison operators <=, <, >=, >, ==, != while a 6= 0, evaluate seq while(a, seq) boolean operators (or, and, not) ||, &&, ! exit n innermost enclosing loops ({n}) toggle timer on/off # break sign of x = −1, 0, 1 sign(x) start new iteration of nth enclosing loop ({n}) print time for last result ## next maximum/minimum of x and y max, min(x, y) return x from current subroutine (x) print %n in raw format \a n return integer or real factorial of x x! or fact(x) error recovery (try seq ) ({err}, {seq }, {seq }) print %n in pretty format \b n 1 trap 2 1 derivative of f w.r.t. x f’ Input/Output print defaults \d set debug level to n \g n Conversions prettyprint args with/without newline printp(), printp1() print args with/without newline print(), print1() set memory debug level to n \gm n Change Objects enable/disable logfile {filename} read a string from keyboard input() \l make x a vector, , set, list, string Vec,Mat,Set,List,Str print %n in pretty matrix format reorder priority of variables x, y, z reorder({[x, y, z]}) \m create PARI object (x mod y) Mod(x, y) set output mode (raw, default, prettyprint) n output args in TEX format printtex(args) \o make x a polynomial of v Pol(x, {v}) set n significant digits n write args to file write, write1, writetex(file, args) \p as above, starting with constant term Polrev(x, {v}) set n terms in series n read file into GP read({file}) \ps make x a power series of v Ser(x, {v}) quit GP Interface with User and System \q PARI type of object x type(x, {t}) print the list of PARI types allocates a new stack of s bytes allocatemem({s}) \t object x with precision n prec(x, {n}) print the list of user-defined functions execute system command a system(a) \u evaluate f replacing vars by their value eval(f) read file into GP \r filename as above, feed result to GP extern(a) Select Pieces of an Object write %n to file \w n filename install function from library install(f, code, {gpf }, {lib}) length of x #x or length(x) alias old to new alias(new, old) GP Within Emacs n-th component of x component(x, n) new name of function f in GP 2.0 whatnow(f) n-th component of vector/list x x n to enter GP from within Emacs: M-x gp, C-u M-x gp [ ] User Defined Functions word completion hTABi (m, n)-th component of matrix x x[m, n] name(formal vars) = local(local vars); seq row m or column n of matrix x x m, , x , n help menu window M-\c [ ] [ ] struct.member = seq numerator of x (x) describe function M-? numerator kill value of variable or function x kill(x) lowest denominator of x denominator(x) display TEX’d PARI manual M-x gpman declare global variables global(x, ...) Conjugates and Lifts set prompt string M-\p Iterations, Sums & Products break line at column 100, insert \ M-\\ conjugate of a number x conj(x) PARI metacommand \letter M-\letter conjugate vector of algebraic number x conjvec(x) numerical integration intnum(X = a, b, expr, {fl}) norm of x, product with conjugate norm(x) sum expr over divisors of n sumdiv(n, X, expr) Reserved Variable Names square of L2 norm of vector x norml2(x) sum X = a to X = b, initialized at x sum(X = a, b, expr, {x}) π = 3.14159 ··· Pi lift of x from Mods lift, centerlift(x) sum of series expr suminf(X = a, expr) Euler’s constant = .57721 ··· Euler sum of alternating/positive series sumalt, sumpos square root of −1 I Random Numbers product a ≤ X ≤ b, initialized at x prod(X = a, b, expr, {x}) big-oh notation O random integer between 0 and N − 1 random({N}) product over primes a ≤ X ≤ b prodeuler(X = a, b, expr) get random seed getrand() infinite product a ≤ X ≤ ∞ prodinf(X = a, expr) c 2003 Karim Belabas. Permissions on back. v2.16 set random seed to s setrand(s) real root of expr between a and b solve(X = a, b, expr) Vectors & Matrices PARI-GP Reference Card Elementary Arithmetic Functions dimensions of matrix x matsize(x) (PARI-GP version 2.2.5) vector of binary digits of |x| binary(x) concatenation of x and y concat(x, {y}) Polynomials & Rational Functions give bit number n of integer x bittest(x, n) extract components of x vecextract(x, y, {z}) ceiling of x ceil(x) degree of f poldegree(f) transpose of vector or matrix x mattranspose(x) or x~ floor of x floor(x) adjoint of the matrix x matadjoint(x) coefficient of degree n of f polcoeff(f, n) fractional part of x frac(x) eigenvectors of matrix x mateigen(x) round coeffs of f to nearest integer round(f, {&e}) round x to nearest integer round(x, {&e}) characteristic polynomial of x charpoly(x, {v}, {fl}) gcd of coefficients of f content(f) truncate x truncate(x, {&e}) trace of matrix x trace(x) replace x by y in f subst(f, x, y) gcd/LCM of x and y gcd(x, y), lcm(x, y) Constructors & Special Matrices discriminant of polynomial f poldisc(f) gcd of entries of a vector/matrix content(x) row vec. of expr eval’ed at 1 ≤ X ≤ n vector(n, {X}, {expr}) resultant of f and g polresultant(f, g, {fl}) Primes and Factorization col. vec. of expr eval’ed at 1 ≤ X ≤ n vectorv(n, {X}, {expr}) as above, give [u, v, d], xu + yv = d bezoutres(x, y) add primes in v to the prime table addprimes(v) matrix 1 ≤ X ≤ m, 1 ≤ Y ≤ n matrix(m, n, {X}, {Y }, {expr}) derivative of f w.r.t. x deriv(f, x) the nth prime prime(n) diagonal matrix whose diag. is x matdiagonal(x) formal integral of f w.r.t. x intformal(f, x) vector of first n primes primes(n) deg f n × n identity matrix matid(n) reciprocal poly x f(1/x) polrecip(f) smallest prime ≥ x nextprime(x) Hessenberg form of square matrix x mathess(x) interpolating poly at a polinterpolate(X, {Y }, {a}, {&e}) largest prime ≤ x precprime(x) −1 n × n Hilbert matrix Hij = (i + j − 1) mathilbert(n) initialize t for Thue equation solver thueinit(f) factorization of x factor(x, {lim}) solve Thue equation f(x, y) = a thue(t, a, {sol}) n × n Pascal triangle P = i matpascal(n − 1) reconstruct x from its factorization factorback(fa, {nf}) ij j Roots and Factorization companion matrix to polynomial x matcompanion(x) Divisors number of real roots of f, a < x ≤ b polsturm(f, {a}, {b}) Gaussian elimination number of distinct prime divisors omega(x) complex roots of f polroots(f) of matrix x matdet(x, {fl}) number of prime divisors with mult bigomega(x) symmetric powers of roots of f up to n polsym(f, n) number of divisors of x numdiv(x) kernel of matrix x matker(x, {fl}) roots of f mod p polrootsmod(f, p, {fl}) intersection of column spaces of x and y matintersect(x, y) row vector of divisors of x divisors(x) factor f factor(f, {lim}) sum of (k-th powers of) divisors of x sigma(x, {k}) solve M ∗ X = B (M invertible) matsolve(M,B) factorization of f mod p factormod(f, p, {fl}) as solve, modulo D (col. vector) matsolvemod(M,D,B) Special Functions and Numbers factorization of f over Fpa factorff(f, p, a) binomial coefficient x binomial(x, y) one sol of M ∗ X = B matinverseimage(M,B) p-adic fact. of f to prec. r factorpadic(f, p, r, {fl}) y Bernoulli number B as real bernreal(n) basis for image of matrix x matimage(x) p-adic roots of f to prec. r polrootspadic(f, p, r) n Bernoulli vector B ,B ,...,B bernvec(n) supplement columns of x to get basis matsupplement(x) p-adic root of f cong. to a mod p padicappr(f, a) 0 2 2n nth Fibonacci number fibonacci(n) rows, cols to extract matindexrank(x) Newton polygon of f for prime p newtonpoly(f, p) rank of the matrix x (x) number of partitions of n numbpart(n) matrank Special Polynomials Euler φ-function eulerphi(x) nth cyclotomic polynomial in var. v polcyclo(n, {v}) Lattices & Quadratic Forms M¨obius µ-function moebius(x) d-th degree subfield of Q(ζ ) polsubcyclo(n, d, {v}) upper triangular Hermite Normal Form mathnf(x) n Hilbert symbol of x and y (at p) hilbert(x, y, {p}) n-th Legendre polynomial pollegendre(n) HNF of x where d is a multiple of det(x) mathnfmod(x, d) Kronecker-Legendre symbol ( x ) kronecker(x, y) elementary divisors of x matsnf(x) n-th Tchebicheff polynomial poltchebi(n) y Miscellaneous LLL-algorithm applied to columns of x qflll(x, {fl}) Zagier’s polynomial of index n,m polzagier(n, m) integer or real factorial of x x! or fact(x) like qflll, x is Gram matrix of lattice qflllgram(x, {fl}) Transcendental Functions integer square root of x sqrtint(x) LLL-reduced basis for kernel of x matkerint(x) solve z ≡ x and z ≡ y chinese(x, y) Z-lattice ←→ Q-vector space matrixqz(x, p) real, imaginary part of x real(x), imag(x) minimal u, v so xu + yv = gcd(x, y) bezout(x, y) signature of quad form ty ∗ x ∗ y qfsign(x) absolute value, argument of x abs(x), arg(x) multiplicative order of x (intmod) znorder(x) decomp into squares of ty ∗ x ∗ y qfgaussred(x) square/nth root of x sqrt(x), sqrtn(x, n,&z) primitive root mod prime power q znprimroot(q) find up to m sols of ty ∗ x ∗ y ≤ b qfminim(x, b, m) trig functions sin, cos, tan, cotan structure of (Z/nZ)∗ znstar(n) v, v[i] :=number of sols of ty ∗ x ∗ y = i qfrep(x, B, {fl}) inverse trig functions asin, acos, atan continued fraction of x contfrac(x, {b}, {lmax}) eigenvals/eigenvecs for real symmetric x qfjacobi(x) hyperbolic functions sinh, cosh, tanh inverse hyperbolic functions asinh, acosh, atanh last convergent of continued fraction x contfracpnqn(x) Formal & p-adic Series exponential of x exp(x) best rational approximation to x bestappr(x, k) truncate power series or p-adic number truncate(x) natural log of x ln(x) or log(x) True-False Tests valuation of x at p (x, p) R ∞ −t x−1 valuation gamma function Γ(x) = 0 e t dt gamma(x) Dirichlet and Power Series logarithm of gamma function lngamma(x) is x the disc. of a quadratic field? isfundamental(x) Taylor expansion around 0 of f w.r.t. x taylor(f, x) ψ(x) = Γ0(x)/Γ(x) psi(x) is x a prime? isprime(x) P k P k P k is x a strong pseudo-prime? ispseudoprime(x) akbkt from akt and bkt serconvol(x, y) incomplete gamma function (y = Γ(s)) incgam(s, x, {y}) P k P k R ∞ −t is x square-free? issquarefree(x) f = ak ∗ t from (ak/k!) ∗ t serlaplace(f) exponential integral x e /t dt eint1(x) √ 2 is x a square? issquare(x, {&n}) reverse power series F so F (f(x)) = x serreverse(f) R ∞ −t error function 2/ π x e dt erfc(x) is pol irreducible? polisirreducible(pol) Dirichlet series multiplication / division dirmul, dirdiv(x, y) dilogarithm of x dilog(x) Dirichlet Euler product (b terms) direuler(p = a, b, expr) mth polylogarithm of x polylog(m, x, {fl}) Based on an earlier version by Joseph H. Silverman p-adic Functions October 2003 v2.16. Copyright c 2003 K. Belabas U-confluent hypergeometric function hyperu(a, b, u) GP copyright by The PARI Group square of x, good for 2-adics (x) sqr J-Bessel function Jn+1/2(x) besseljh(n, x) Permission is granted to make and distribute copies of this card provided Teichmuller character of x teichmuller(x) K-Bessel function of index nu besselk(nu, x) the copyright and this permission notice are preserved on all copies. Newton polygon of f for prime p newtonpoly(f, p) Send comments and corrections to [email protected] PARI-GP Reference Card (2) Graphic Functions Binary Quadratic Forms (PARI-GP version 2.2.5) 2 2 crude graph of expr between a and b plot(X = a, b, expr) create ax + bxy√ + cy (distance d) Qfb(a, b, c, {d}) Elliptic Curves High-resolution plot (immediate plot) reduce x (s = D, l = bsc) qfbred(x, {fl}, {D}, {l}, {s}) plot expr between a and b ploth(X = a, b, expr, {fl}, {n}) composition of forms x*y or qfbnucomp(x, y, l) Elliptic curve initially given by 5-tuple E =[a1, a2, a3, a4, a6]. plot points given by lists lx, ly plothraw(lx, ly, {fl}) n-th power of form x^n or qfbnupow(x, n) Points are [x,y], the origin is [0]. terminal dimensions plothsizes() composition without reduction qfbcompraw(x, y) Initialize elliptic struct. ell, i.e create ellinit(E, {fl}) Rectwindow functions n-th power without reduction qfbpowraw(x, n) a1, a2, a3, a4, a6, b2, b4, b6, b8, c4, c6, disc, j. This data can init window w, with size x,y plotinit(w, x, y) prime form of disc. x above prime p qfbprimeform(x, p) be recovered by typing ell.a1,...,ell.j. If fl omitted, also erase window w plotkill(w) class number of disc. x qfbclassno(x) E defined over R copy w to w2 with offset (dx, dy) plotcopy(w, w2, dx, dy) Hurwitz class number of disc. x qfbhclassno(x) x-coords. of points of order 2 ell.roots scale coordinates in w plotscale(w, x1, x2, y1, y2) real and complex periods ell.omega Quadratic Fields ploth in w plotrecth(w, X = a, b, expr, {fl}, {n}) √ √ associated quasi-periods ell.eta plothraw in w plotrecthraw(w, data, {fl}) quadratic number ω = x or (1 + x)/2 quadgen(x) volume of complex lattice ell.area draw window w1 at (x1, y1), ... plotdraw([[w1, x1, y1],...]) minimal polynomial√ of ω quadpoly(x) E defined over Qp, |j|p > 1 Low-level Rectwindow Functions discriminant of Q( D) quaddisc(x) x-coord. of unit 2 torsion point ell.roots set current drawing color in w to c plotcolor(w, c) regulator of real quadratic field quadregulator(x) 2 Tate’s [u , u, q] ell.tate current position of cursor in w plotcursor(w) fundamental unit√ in real Q(x) quadunit(x) Mestre’s w ell.w write s at cursor’s position plotstring(w, s) class group of Q( D) √ quadclassunit(D, {fl}, {t}) change curve E using v =[u, r, s, t] ellchangecurve(ell, v) move cursor to (x, y) plotmove(w, x, y) Hilbert class field of Q( D) √ quadhilbert(D, {fl}) change point z using v =[u, r, s, t] ellchangepoint(z, v) move cursor to (x + dx, y + dy) plotrmove(w, dx, dy) ray class field modulo f of Q( D) quadray(D, f, {fl}) cond, min mod, Tamagawa num [N, v, c] ellglobalred(ell) draw a box to (x2, y2) plotbox(w, x2, y2) General Number Fields: Initializations Kodaira type of p fiber of E elllocalred(ell, p) draw a box to (x + dx, y + dy) plotrbox(w, dx, dy) add points z1 + z2 elladd(ell, z1, z2) draw polygon plotlines(w, lx, ly, {fl}) A number field K is given by a monic irreducible f ∈ Z[X]. subtract points z1 − z2 ellsub(ell, z1, z2) draw points plotpoints(w, lx, ly) init number field structure nf nfinit(f, {fl}) compute n · z ellpow(ell, z, n) draw line to (x + dx, y + dy) plotrline(w, dx, dy) nf members: check if z is on E ellisoncurve(ell, z) draw point (x + dx, y + dy) plotrpoint(w, dx, dy) polynomial defining nf, f(θ) = 0 nf.pol order of torsion point z ellorder(ell, z) Postscript Functions number of [real,complex] places nf.sign torsion subgroup with generators elltors(ell) as ploth psploth(X = a, b, expr, {fl}, {n}) discriminant of nf nf.disc y-coordinates of point(s) for x ellordinate(ell, x) as plothraw psplothraw(lx, ly, {fl}) T2 matrix nf.t2 canonical bilinear form taken at z , z ellbil(ell, z , z ) vector of roots of f nf.roots 1 2 1 2 as plotdraw psdraw([[w1, x1, y1],...]) canonical height of z ellheight(ell, z, {fl}) integral basis of ZK as powers of θ nf.zk height regulator matrix for pts in x ellheightmatrix(ell, x) different nf.diff pth coeff ap of L-function, p prime ellap(ell, p) codifferent nf.codiff kth coeff ak of L-function ellak(ell, k) recompute nf using current precision nfnewprec(nf) vector of first n ak’s in L-function ellan(ell, n) init relative rnf given by g = 0 over K rnfinit(nf, g) L(E, s), set A ≈ 1 elllseries(ell, s, {A}) init big number field structure bnf bnfinit(f, {fl}) root number for L(E,.) at p ellrootno(ell, {p}) bnf members: same as nf, plus modular parametrization of E elltaniyama(ell) underlying nf bnf.nf point [℘(z), ℘0(z)] corresp. to z ellztopoint(ell, z) classgroup bnf.clgp complex z such that p = [℘(z), ℘0(z)] ellpointtoz(ell, p) regulator bnf.reg fundamental units bnf.fu Elliptic & Modular Functions torsion units bnf.tu arithmetic-geometric mean agm(x, y) [tu, fu], [fu, tu] bnf.tufu/futu elliptic j-function 1/q + 744 + ··· ellj(x) compute a bnf from small bnf bnfmake(sbnf) Weierstrass σ function ellsigma(ell, z, {fl}) add S-class group and units, yield bnf s bnfsunit(nf,S) Weierstrass ℘ function ellwp(ell, {z}, {fl}) init class field structure bnr bnrinit(bnf, m, {fl}) Weierstrass ζ function ellzeta(ell, z) bnr members: same as bnf, plus Q n modified Dedekind η func. (1 − q ) eta(x, {fl}) underlying bnf bnr.bnf Jacobi sine theta function theta(q, z) ∗ structure of (ZK /m) bnr.zkst k-th derivative at z=0 of theta(q, z) thetanullk(q, k) Weber’s f functions weber(x, {fl}) Riemann’s zeta ζ(s) = P n−s zeta(s)

c 2003 Karim Belabas. Permissions on back. v2.16 Simple Arithmetic Invariants (nf) PARI-GP Reference Card (2) Projective ZK -modules, maximal order Elements are rational numbers, polynomials, polmods, or col- (PARI-GP version 2.2.5) relative polred rnfpolred(nf, g) umn vectors (on integral basis nf.zk). Ideals relative polredabs rnfpolredabs(nf, g) integral basis of field def. by f = 0 nfbasis(f) characteristic poly. of a mod g rnfcharpoly(nf, g, a, {v}) field discriminant of field f = 0 nfdisc(f) Ideals are elements, primes, or matrix of generators in HNF. relative Dedekind criterion, prime pr rnfdedekind(nf, g, pr) reverse polmod a = A(X) mod T (X) modreverse(a) is id an ideal in nf ? nfisideal(nf, id) discriminant of relative extension rnfdisc(nf, g) Galois group of field f = 0, deg f ≤ 11 polgalois(f) is x principal in bnf ? bnfisprincipal(bnf, x) pseudo-basis of ZL rnfpseudobasis(nf, g) smallest poly defining f = 0 polredabs(f, {fl}) principal ideal generated by x idealprincipal(nf, x) relative HNF basis of order rnfhnfbasis(bnf, order) small polys defining subfields of f = 0 polred(f, {fl}, {p}) principal idele generated by x ideleprincipal(nf, x) reduced basis for order rnflllgram(nf, g, order) small polys defining suborders of f = 0 polredord(f) give [a, b], s.t. aZK + bZK = x idealtwoelt(nf, x, {a}) determinant of pseudo-matrix A rnfdet(nf,A) poly of degree ≤ k with root x ∈ C algdep(x, k) put ideal a (aZK + bZK ) in HNF form idealhnf(nf, a, {b}) Steinitz class of order rnfsteinitz(nf, order) small linear rel. on coords of vector x lindep(x) norm of ideal x idealnorm(nf, x) is order a free ZK -module? rnfisfree(bnf, order) are fields f = 0 and g = 0 isomorphic? nfisisom(f, g) minimum of ideal x (direction v) idealmin(nf, x, v) true basis of order, if it is free rnfbasis(bnf, order) is field f = 0 a subfield of g = 0? nfisincl(f, g) LLL-reduce the ideal x (direction v) idealred(nf, x, {v}) Norms compositum of f = 0, g = 0 polcompositum(f, g, {fl}) Ideal Operations absolute norm of ideal x rnfidealnormabs(rnf, x) basic element operations (prefix nfelt): add ideals x and y idealadd(nf, x, y) relative norm of ideal x rnfidealnormrel(rnf, x) (nfelt)mul, pow, div, diveuc, mod, divrem, val multiply ideals x and y idealmul(nf, x, y, {fl}) solutions of NK/Q(y) = x ∈ Z bnfisintnorm(bnf, x) express x on integer basis nfalgtobasis(nf, x) intersection of ideals x and y idealintersect(nf, x, y, {fl}) is x ∈ Q a norm from K? bnfisnorm(bnf, x, {fl}) express element x as a polmod nfbasistoalg(nf, x) n-th power of ideal x idealpow(nf, x, n, {fl}) initialize T for norm eq. solver rnfisnorminit(K, pol, {fl}) quadratic Hilbert symbol (at p) nfhilbert(nf, a, b, {p}) inverse of ideal x idealinv(nf, x) is a ∈ K a norm from L? rnfisnorm(T, a, {fl}) roots of g belonging to nf nfroots({nf}, g) divide ideal x by y idealdiv(nf, x, y, {fl}) factor g in nf nffactor(nf, g) Find (a, b) ∈ x × y, a + b = 1 idealaddtoone(nf, x, {y}) factor g mod prime pr in nf nffactormod(nf, g, pr) Primes and Multiplicative Structure number of roots of unity in nf nfrootsof1(nf ) factor ideal x in nf idealfactor(nf, x) conjugates of a root θ of nf nfgaloisconj(nf, {fl}) recover x from its factorization in nf factorback(x, nf) apply Galois automorphism s to x nfgaloisapply(nf, s, x) decomposition of prime p in nf idealprimedec(nf, p) subfields (of degree d) of nf nfsubfields(nf, {d}) valuation of x at prime ideal pr idealval(nf, x, pr) weak approximation theorem in nf idealchinese(nf, x, y) Dedekind Zeta Function ζK ∗ give bid =structure of (ZK /id) idealstar(nf, id, {fl}) ζK as Dirichlet series, N(I) < b dirzetak(nf, b) ∗ init nfz for field f = 0 zetakinit(f) discrete log of x in (ZK /bid) ideallog(nf, x, bid) idealstar of all ideals of norm ≤ b ideallist(nf, b, {fl}) compute ζK (s) zetak(nfz, s, {fl}) Artin root number of K bnrrootnumber(bnr, chi, {fl}) add archimedean places ideallistarch(nf, b, {ar}, {fl}) init prmod structure nfmodprinit(nf, pr) ∗ Class Groups & Units (bnf, bnr) kernel of matrix M in (ZK /pr) nfkermodpr(nf, M, prmod) solve Mx = B in (Z /pr)∗ nfsolvemodpr(nf, M, B, prmod) a1, {a2}, {a3} usually bnr, subgp or bnf, module, {subgp} K remove GRH assumption from bnf bnfcertify(bnf) Relative Number Fields (rnf) expo. of ideal x on class gp bnfisprincipal(bnf, x, {fl}) expo. of ideal x on ray class gp bnrisprincipal(bnr, x, {fl}) Extension L/K is defined by g ∈ K[x]. We have order ⊂ L. expo. of x on fund. units bnfisunit(bnf, x) absolute equation of L rnfequation(nf, g, {fl}) as above for S-units bnfissunit(bnfs, x) Lifts and Push-downs fundamental units of bnf bnfunit(bnf) absolute → relative repres. for x rnfeltabstorel(rnf, x) signs of real embeddings of bnf.fu bnfsignunit(bnf) relative → absolute repres. for x rnfeltreltoabs(rnf, x) Class Field Theory lift x to the relative field rnfeltup(rnf, x) ray class group structure for mod. m bnrclass(bnf, m, {fl}) push x down to the base field rnfeltdown(rnf, x) ray class number for mod. m bnrclassno(bnf, m) idem for x ideal: (rnfideal)reltoabs, abstorel, up, down relative nfalgtobasis rnfalgtobasis(rnf, x) discriminant of class field ext bnrdisc(a1, {a2}, {a3}) Based on an earlier version by Joseph H. Silverman relative nfbasistoalg rnfbasistoalg(rnf, x) ray class numbers, l list of mods bnrclassnolist(bnf, l) October 2003 v2.16. Copyright c 2003 K. Belabas discriminants of class fields bnrdisclist(bnf, l, {arch}, {fl}) relative idealhnf rnfidealhnf(rnf, x) GP copyright by The PARI Group decode output from bnrdisclist bnfdecodemodule(nf, fa) relative idealmul rnfidealmul(rnf, x, y) Permission is granted to make and distribute copies of this card provided relative idealtwoelt rnfidealtwoelt(rnf, x) the copyright and this permission notice are preserved on all copies. is modulus the conductor? bnrisconductor(a1, {a2}, {a3}) Send comments and corrections to [email protected] conductor of character chi bnrconductorofchar(bnr, chi) conductor of extension bnrconductor(a1, {a2}, {a3}, {fl}) conductor of extension def. by g rnfconductor(bnf, g) Artin group of ext. def’d by g rnfnormgroup(bnr, g) subgroups of bnr, index <= b subgrouplist(bnr, b, {fl}) rel. eq. for class field def’d by sub rnfkummer(bnr, sub, {d}) same, using Stark units (real field) bnrstark(bnr, sub, {fl})