[BACK]Return to refcard.tex CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / pari / doc

Annotation of OpenXM_contrib/pari/doc/refcard.tex, Revision 1.1

1.1     ! maekawa     1: % This file is intended to be processed by plain TeX (TeX82).
        !             2: % Reference Card for PARI-GP version 2.0
        !             3:
        !             4: % Copyright (c) 1997-1999 Karim Belabas. May be freely distributed.
        !             5: %
        !             6: % This reference card is distributed in the hope that it will be useful,
        !             7: % but WITHOUT ANY WARRANTY; without even the implied warranty of
        !             8: % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
        !             9:
        !            10: % Based on an earlier version by Joseph H. Silverman who kindly let me
        !            11: % use his original file.
        !            12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        !            13: % The original copyright notice read:
        !            14: %
        !            15: %% Copyright (c) 1993,1994 Joseph H. Silverman. May be freely distributed.
        !            16: %% Created Tuesday, July 27, 1993
        !            17: %% Thanks to Stephen Gildea for the multicolumn macro package
        !            18: %% which I modified from his GNU emacs reference card
        !            19: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        !            20:
        !            21: %**start of header
        !            22: \newcount\columnsperpage
        !            23: % The final reference card has six columns, three on each side.
        !            24: % This file can be used to produce it in any of three ways:
        !            25: % 1 column per page
        !            26: %    produces six separate pages, each of which needs to be reduced to 80%.
        !            27: %    This gives the best resolution.
        !            28: % 2 columns per page
        !            29: %    produces three already-reduced pages.
        !            30: %    You will still need to cut and paste.
        !            31: % 3 columns per page
        !            32: %    produces two pages which must be printed sideways to make a
        !            33: %    ready-to-use 8.5 x 11 inch reference card.
        !            34: %    For this you need a dvi device driver that can print sideways.
        !            35: % [For 2 or 3 columns, you'll need 6 and 8 point fonts.]
        !            36: % Which mode to use is controlled by setting \columnsperpage above.
        !            37: %
        !            38: % Specify how many columns per page you want here:
        !            39: \columnsperpage=3
        !            40:
        !            41: % You shouldn't need to modify anything below this line.
        !            42: %
        !            43: % Author:
        !            44: %  Karim Belabas
        !            45: %  Universite Paris Sud
        !            46: %  Departement de Mathematiques (bat. 425)
        !            47: %  F-91405 Orsay
        !            48: %  Internet: Karim.Belabas@math.u-psud.fr
        !            49: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        !            50: % (original reference card by Joseph H. Silverman)
        !            51: % (original reference card macros due to Stephen Gildea)
        !            52: % Original Thanks and History:
        !            53: %
        !            54: %% Thanks:
        !            55: %%  I would like to thank Jim Delaney, Kevin Buzzard, Dan Lieman,
        !            56: %%  and Jaap Top for sending me corrections.
        !            57: %%
        !            58: %% History:
        !            59: %%  Version 1.0 - July 1993, first general distribution
        !            60: %%  Version 1.1 - April 1994, corrected six typos
        !            61: %%  Version 1.2 - January 1995, minor corrections and additions
        !            62: %%  Version 1.3 - January 1996, minor corrections and additions
        !            63: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        !            64: % Version 2.0 - November 1997, general distribution for GP 2.0
        !            65: % Version 2.1 - January 1998, set nf,bnf,etc in a sensible font, updated default
        !            66: % Version 2.2 - March 1998, some new functions (modpr, bnrstark), updated
        !            67: %   concat, removed spurious tabs.
        !            68: % Version 2.3 - May 1998, added write1, corrected my email address.
        !            69: % Version 2.4 - July 1998, removed vecindexsort, added ellrootno, updated
        !            70: %   elllseries
        !            71: % Version 2.5 - October 1998, updated elliptic functions. Added quadray and
        !            72: % user member functions
        !            73: % Version 2.6 - December 1998, added local() keyword
        !            74: % Version 2.7 - February 1999, added some pointer '&' arguments. Removed
        !            75: %   rounderror
        !            76: % Version 2.8 - April 1999, removed \k, added \l filename
        !            77: %% Thanks to Bill Allombert, Henri Cohen, Gerhard Niklasch, and Joe
        !            78: %% Silverman for many comments and corrections.
        !            79:
        !            80: \def\versionnumber{2.8}% Version of this reference card
        !            81: \def\PARIversion{2.0.15}% Version of PARI described on this reference card
        !            82: \def\year{1999}
        !            83: \def\month{April}
        !            84: \def\version{\month\ \year\ v\versionnumber}
        !            85:
        !            86: \def\shortcopyrightnotice{\vskip .5ex plus 2 fill
        !            87:   \centerline{\small \copyright\ \year\ Karim Belabas.
        !            88:   Permissions on back.  v\versionnumber}}
        !            89:
        !            90: \def\<#1>{$\langle${#1}$\rangle$}
        !            91: \def\copyrightnotice{\vskip 1ex plus 2 fill
        !            92: \begingroup\small
        !            93: \centerline{Based on an earlier version by Joseph H. Silverman}
        !            94: \centerline{\version. Copyright \copyright\ \year\ K. Belabas}
        !            95: \centerline{GP copyright by C.Batut, K. Belabas, D.Bernardi, H.Cohen, M.Olivier}
        !            96:
        !            97: Permission is granted to make and distribute copies of this card provided the
        !            98: copyright and this permission notice are preserved on all copies.
        !            99:
        !           100: Send comments and corrections to \<Karim.BELABAS@math.u-psud.fr>
        !           101: \endgroup}
        !           102:
        !           103: % make \bye not \outer so that the \def\bye in the \else clause below
        !           104: % can be scanned without complaint.
        !           105: \def\bye{\par\vfill\supereject\end}
        !           106:
        !           107: \newdimen\intercolumnskip
        !           108: \newbox\columna
        !           109: \newbox\columnb
        !           110:
        !           111: \def\ncolumns{\the\columnsperpage}
        !           112:
        !           113: \message{[\ncolumns\space
        !           114:   column\if 1\ncolumns\else s\fi\space per page]}
        !           115:
        !           116: \def\scaledmag#1{ scaled \magstep #1}
        !           117:
        !           118: % This multi-way format was designed by Stephen Gildea
        !           119: % October 1986.
        !           120: \if 1\ncolumns
        !           121:   \hsize 4in
        !           122:   \vsize 10in
        !           123:   \voffset -.7in
        !           124:   \font\titlefont=\fontname\tenbf \scaledmag3
        !           125:   \font\headingfont=\fontname\tenbf \scaledmag2
        !           126:   \font\smallfont=\fontname\sevenrm
        !           127:   \font\smallsy=\fontname\sevensy
        !           128:
        !           129:   \footline{\hss\folio}
        !           130:   \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
        !           131: \else
        !           132:   \hsize 3.2in
        !           133: %  \vsize 7.95in
        !           134:   \vsize 7.90in
        !           135:   \hoffset -.75in
        !           136: %  \voffset -.745in
        !           137:   \voffset -.815in
        !           138:   \font\titlefont=cmbx10 \scaledmag2
        !           139:   \font\headingfont=cmbx10 \scaledmag1
        !           140:   \font\smallfont=cmr6
        !           141:   \font\smallsy=cmsy6
        !           142:   \font\eightrm=cmr8
        !           143:   \font\eightbf=cmbx8
        !           144:   \font\eightit=cmti8
        !           145:   \font\eighttt=cmtt8
        !           146:   \font\eightsy=cmsy8
        !           147:   \font\eightsl=cmsl8
        !           148:   \font\eighti=cmmi8
        !           149:   \font\eightex=cmex10 at 8pt
        !           150:   \textfont0=\eightrm
        !           151:   \textfont1=\eighti
        !           152:   \textfont2=\eightsy
        !           153:   \textfont3=\eightex
        !           154:   \def\rm{\fam0 \eightrm}
        !           155:   \def\bf{\eightbf}
        !           156:   \def\it{\eightit}
        !           157:   \def\tt{\eighttt}
        !           158:   \normalbaselineskip=.8\normalbaselineskip
        !           159:   \normallineskip=.8\normallineskip
        !           160:   \normallineskiplimit=.8\normallineskiplimit
        !           161:   \normalbaselines\rm %make definitions take effect
        !           162:
        !           163:   \if 2\ncolumns
        !           164:     \let\maxcolumn=b
        !           165:     \footline{\hss\rm\folio\hss}
        !           166:     \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
        !           167:   \else \if 3\ncolumns
        !           168:     \let\maxcolumn=c
        !           169:     \nopagenumbers
        !           170:   \else
        !           171:     \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
        !           172:     \errmessage{Illegal number of columns per page}
        !           173:   \fi\fi
        !           174:
        !           175:   \intercolumnskip=.46in
        !           176:   \def\abc{a}
        !           177:   \output={%
        !           178:       % This next line is useful when designing the layout.
        !           179:       %\immediate\write16{Column \folio\abc\space starts with \firstmark}
        !           180:       \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
        !           181:       \else\if a\abc
        !           182:         \global\setbox\columna\columnbox \global\def\abc{b}
        !           183:         %% in case we never use \columnb (two-column mode)
        !           184:         \global\setbox\columnb\hbox to -\intercolumnskip{}
        !           185:       \else
        !           186:         \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
        !           187:   \def\multicolumnformat{\shipout\vbox{\makeheadline
        !           188:       \hbox{\box\columna\hskip\intercolumnskip
        !           189:         \box\columnb\hskip\intercolumnskip\columnbox}
        !           190:       \makefootline}\advancepageno}
        !           191:   \def\columnbox{\leftline{\pagebody}}
        !           192:
        !           193:   \def\bye{\par\vfill\supereject
        !           194:     \if a\abc \else\null\vfill\eject\fi
        !           195:     \if a\abc \else\null\vfill\eject\fi
        !           196:     \end}
        !           197: \fi
        !           198:
        !           199: % we won't be using math mode much, so redefine some of the characters
        !           200: % we might want to talk about
        !           201: %\catcode`\^=12
        !           202: %\catcode`\_=12
        !           203: %\catcode`\~=12
        !           204:
        !           205: \chardef\\=`\\
        !           206: \chardef\{=`\{
        !           207: \chardef\}=`\}
        !           208:
        !           209: \hyphenation{}
        !           210:
        !           211: \parindent 0pt
        !           212: \parskip 0pt
        !           213:
        !           214: \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
        !           215:
        !           216: \outer\def\newcolumn{\vfill\eject}
        !           217:
        !           218: \outer\def\title#1{{\titlefont\centerline{#1}}}
        !           219:
        !           220: \outer\def\section#1{\par\filbreak
        !           221:   \vskip 1.4ex plus .4ex minus .5ex
        !           222:   {\headingfont #1}\mark{#1}%
        !           223:   \vskip .7ex plus .3ex minus .5ex
        !           224: }
        !           225:
        !           226: \outer\def\subsec#1{\filbreak
        !           227:   \vskip 0.1ex plus 0.05ex
        !           228:   {\bf #1}
        !           229:   \vskip 0.04ex plus 0.05ex
        !           230: }
        !           231:
        !           232: \newdimen\keyindent
        !           233: \def\beginindentedkeys{\keyindent=1em}
        !           234: \def\endindentedkeys{\keyindent=0em}
        !           235: \def\begindoubleindentedkeys{\keyindent=2em}
        !           236: \def\enddoubleindentedkeys{\keyindent=1em}
        !           237: \endindentedkeys
        !           238:
        !           239: \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
        !           240: \def\var#1{\hbox{\it #1}}
        !           241: \def\fl{\{\var{f{}l\/}\}}
        !           242:
        !           243: \def\key#1#2{\leavevmode\hbox to \hsize{\vtop
        !           244:   {\hsize=.75\hsize\rightskip=1em
        !           245:   \hskip\keyindent\relax#1}\kbd{#2}\hfil}}
        !           246:
        !           247: \newbox\libox
        !           248: \setbox\libox\hbox{\kbd{M-x }}
        !           249: \newdimen\liwidth
        !           250: \liwidth=\wd\libox
        !           251:
        !           252: \def\li#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
        !           253:   {\hskip\keyindent\relax#1\hfil}%
        !           254:   \hskip -\liwidth minus 1fil
        !           255:   \kbd{#2}\hfil}}
        !           256:
        !           257: \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad
        !           258:   &\kbd{#3}\quad\cr}
        !           259:
        !           260: \def\mod{\;\hbox{\rm mod}\;}
        !           261: \def\expr{\hbox{\it expr}}
        !           262: \def\seq{\hbox{\it seq}}
        !           263: \def\args{\hbox{\it args}}
        !           264: \def\file{\hbox{\it file}}
        !           265: \def\QQ{\hbox{\bf Q}}
        !           266: \def\ZZ{\hbox{\bf Z}}
        !           267: \def\RR{\hbox{\bf R}}
        !           268: \def\FF{\hbox{\bf F}}
        !           269: \def\CC{\hbox{\bf C}}
        !           270: \def\deg{\mathop{\rm deg}}
        !           271: \def\bs{\char'134}
        !           272: \def\pow{\^{}\hskip0pt}
        !           273: \def\til{\raise-0.3em\hbox{\~{}}}
        !           274: \def\typ#1{\kbd{t\_#1}}
        !           275: %**end of header
        !           276:
        !           277: \title{PARI-GP Reference Card}
        !           278: \centerline{(PARI-GP version \PARIversion)}
        !           279: Note: optional arguments are surrounded by braces {\tt \{\}}.
        !           280:
        !           281: \section{Starting \& Stopping GP}
        !           282: \key{to enter GP, just type its name:}{gp}
        !           283: \key{to exit GP, type}{\\q {\rm or }quit}
        !           284:
        !           285: \section{Help}
        !           286: \li{describe function}{?{\rm function}}
        !           287: \li{extended description}{??{\rm keyword}}
        !           288: \li{list of relevant help topics}{???{\rm pattern}}
        !           289:
        !           290: \section{Input/Output \& Defaults}
        !           291: \li{output previous line, the lines before}
        !           292:   {\%{\rm, }\%`{\rm, }\%``{\rm, etc.}}
        !           293: \key{output from line $n$}{\%$n$}
        !           294: \key{separate multiple statements on line}{;}
        !           295: \key{extend statement on additional lines}{\\}
        !           296: \key{extend statements on several lines}{\{\seq1; \seq2;\}}
        !           297: \key{comment}{/* \dots */}
        !           298: \key{one-line comment, rest of line ignored}{\\\\ \dots}
        !           299: \li{set default $d$ to \var{val}} {default$(\{d\},\{\var{val}\},\fl)$}
        !           300: \li{mimic behaviour of GP 1.39} {default(compatible,3)}
        !           301:
        !           302: \section{Metacommands}
        !           303: \key{toggle timer on/off}{\#}
        !           304: \key{print time for last result}{\#\#}
        !           305: \key{print \%$n$ in raw format}{\\a $n$}
        !           306: \key{print \%$n$ in pretty format}{\\b $n$}
        !           307: \key{print defaults}{\\d}
        !           308: \key{set debug level to $n$}{\\g $n$}
        !           309: \key{set memory debug level to $n$}{\\gm $n$}
        !           310: \key{enable/disable logfile}{\\l \{filename\}}
        !           311: \key{print \%$n$ in pretty matrix format}{\\m}
        !           312: \key{set $n$ significant digits}{\\p $n$}
        !           313: \key{set $n$ terms in series}{\\ps $n$}
        !           314: \key{quit GP}{\\q}
        !           315: \key{print the list of PARI types}{\\t}
        !           316: \key{print the list of user-defined functions}{\\u}
        !           317: \li{read file into GP}{\\r {\rm filename}}
        !           318: \li{write \%$n$ to file}{\\w $n$ {\rm filename}}
        !           319:
        !           320: \section{GP Within Emacs}
        !           321: \li{to enter GP from within Emacs:}{M-x gp{\rm,} C-u M-x gp}
        !           322: \li{word completion}{<TAB>}
        !           323: \li{help menu window}{M-\\c}
        !           324: \li{describe function}{M-?}
        !           325: \li{display \TeX'd PARI manual}{M-x gpman}
        !           326: \li{set prompt string}{M-\\p}
        !           327: \li{break line at column 100, insert \kbd{\\}}{M-\\\\}
        !           328: \li{PARI metacommand \kbd{\\}{\it letter}}{M-\\\hbox{\it letter}}
        !           329:
        !           330: \section{Reserved Variable Names}
        !           331: \li{$\pi=3.14159\cdots$}{Pi}
        !           332: \li{Euler's constant ${}=.57721\cdots$}{Euler}
        !           333: \li{square root of $-1$}{I}
        !           334: \li{big-oh notation}{O}
        !           335:
        !           336: % ****************************************
        !           337: % This goes at the bottom of page 1
        !           338: \shortcopyrightnotice
        !           339: \newcolumn
        !           340:
        !           341: \section{PARI Types \& Input Formats}
        !           342: \li{\typ{INT}. Integers}{$\pm n$}
        !           343: \li{\typ{REAL}. Real Numbers}{$\pm n.ddd$}
        !           344: \li{\typ{INTMOD}. Integers modulo $m$}{Mod$(n,m)$}
        !           345: \li{\typ{FRAC}. Rational Numbers}{$n/m$}
        !           346: \li{\typ{COMPLEX}. Complex Numbers}{$x+\kbd{I}*y$}
        !           347: \li{\typ{PADIC}. $p$-adic Numbers}{$x+O(p$\pow$k)$}
        !           348: \li{\typ{QUAD}. Quadratic Numbers}{$x + y\,*\;$quadgen$(D)$}
        !           349: \li{\typ{POLMOD}. Polynomials modulo $g$}{Mod$(f,g)$}
        !           350: \li{\typ{POL}. Polynomials}{$a*x$\pow$n+\cdots+b$}
        !           351: \li{\typ{SER}. Power Series}{$f+O(x$\pow$k)$}
        !           352: \li{\typ{QFI}/\typ{QFR}. Imag/Real bin.\ quad.\ forms}
        !           353:   {Qfb$(a,b,c,\{d\})$}
        !           354: \li{\typ{RFRAC}. Rational Functions}{$f/g$}
        !           355: \li{\typ{VEC}/\typ{COL}. Row/Column Vectors}
        !           356:   {$[x,y,z]${\rm,} $[x,y,z]$\til}
        !           357: %\li{\typ{COL}. Column Vectors}{$[x,y,z]$\til}
        !           358: \li{\typ{MAT}. Matrices}{$[x,y;z,t;u,v]$}
        !           359: \li{\typ{LIST}. Lists}{List$([x,y,z])$}
        !           360: \li{\typ{STR}. Strings}{"aaa"}
        !           361:
        !           362: \section{Standard Operators}
        !           363: \li{basic operations}{+{\rm,} - {\rm,} *{\rm,} /{\rm,} \pow}
        !           364: \li{\kbd{i=i+1}, \kbd{i=i-1}, \kbd{i=i*j}, \dots}
        !           365:   {i++{\rm,} i--{\rm,} i*=j{\rm,}\dots}
        !           366: \li{euclidean quotient, remainder}{$x$\bs/$y${\rm,} $x$\bs$y${\rm,}
        !           367: $x$\%$y${\rm,} divrem$(x,y)$}
        !           368: \li{shift $x$ left or right $n$ bits}{ $x$<<$n$, $x$>>$n$
        !           369:   {\rm or} shift$(x,n)$}
        !           370: \li{comparison operators}{<={\rm, }<{\rm, }>={\rm, }>{\rm, }=={\rm, }!=}
        !           371: \li{boolean operators (or, and, not)}{||{\rm, } \&\&{\rm ,} !}
        !           372: \li{sign of $x=-1,0,1$}{sign$(x)$}
        !           373: \li{maximum/minimum of $x$ and $y$}{max{\rm,} min$(x,y)$}
        !           374: \li{integer or real factorial of $x$}{$x$!~{\rm or} fact$(x)$}
        !           375:
        !           376: \section{Conversions}
        !           377: %
        !           378: \subsec{Change Objects}
        !           379: \li{make $x$ a vector, matrix, set, list, string}
        !           380:   {Vec{\rm,}Mat{\rm,}Set{\rm,}List{\rm,}Str}
        !           381: \li{create PARI object $(x\mod y)$}{Mod$(x,y)$}
        !           382: \li{make $x$ a polynomial of $v$}{Pol$(x,\{v\})$}
        !           383: \li{as above, starting with constant term}{Polrev$(x,\{v\})$}
        !           384: \li{make $x$ a power series of $v$}{Ser$(x,\{v\})$}
        !           385: \li{PARI type of object $x$}{type$(x, \{t\})$}
        !           386: \li{object $x$ with precision $n$}{prec$(x,\{n\})$}
        !           387: \li{evaluate $f$ replacing vars by their value}{eval$(f)$}
        !           388: %
        !           389: \subsec{Select Pieces of an Object}
        !           390: \li{length of $x$}{length$(x)$}
        !           391: \li{$n$-th component of $x$}{component$(x,n)$}
        !           392: \li{$n$-th component of vector/list $x$}{$x$[n]}
        !           393: \li{$(m,n)$-th component of matrix $x$}{$x$[m,n]}
        !           394: \li{row $m$ or column $n$ of matrix $x$}{$x$[m,]{\rm,} $x$[,n]}
        !           395: \li{numerator of $x$}{numerator$(x)$}
        !           396: \li{lowest denominator of $x$}{denominator$(x)$}
        !           397: %
        !           398: \subsec{Conjugates and Lifts}
        !           399: \li{conjugate of a number $x$}{conj$(x)$}
        !           400: \li{conjugate vector of algebraic number $x$}{conjvec$(x)$}
        !           401: \li{norm of $x$, product with conjugate}{norm$(x)$}
        !           402: \li{square of $L^2$ norm of vector $x$}{norml2$(x)$}
        !           403: \li{lift of $x$ from Mods}{lift{\rm,} centerlift$(x)$}
        !           404:
        !           405: \section{Random Numbers}
        !           406: \li{random integer between $0$ and $N-1$}{random$(\{N\})$}
        !           407: \li{get random seed}{getrand$()$}
        !           408: \li{set random seed to $s$}{setrand$(s)$}
        !           409:
        !           410: \begingroup
        !           411: \outer\def\subsec#1{\filbreak
        !           412:   \vskip 0.05ex plus 0.05ex
        !           413:   {\bf #1}
        !           414:   \vskip 0.05ex plus 0.05ex
        !           415: }
        !           416:
        !           417: \section{Lists, Sets \& Sorting}
        !           418: \li{sort $x$ by $k$th component}{vecsort$(x,\{k\},\{\fl=0\})$}
        !           419:   {\bf Sets} (= row vector of strings with strictly increasing entries)\hfill\break
        !           420: %
        !           421: \li{intersection of sets $x$ and $y$}{setintersect$(x,y)$}
        !           422: \li{set of elements in $x$ not belonging to $y$}{setminus$(x,y)$}
        !           423: \li{union of sets $x$ and $y$}{setunion$(x,y)$}
        !           424: \li{look if $y$ belongs to the set $x$}{setsearch$(x,y,\fl)$}
        !           425: %
        !           426: \subsec{Lists}
        !           427: \li{create empty list of maximal length $n$}{listcreate$(n)$}
        !           428: \li{delete all components of list $l$}{listkill$(l)$}
        !           429: \li{append $x$ to list $l$}{listput$(l,x,\{i\})$}
        !           430: \li{insert $x$ in list $l$ at position $i$}{listinsert$(l,x,i)$}
        !           431: \li{sort the list $l$}{listsort$(l,\fl)$}
        !           432:
        !           433: \section{Programming \& User Functions}
        !           434: $X$ is the formal parameter used in the expression \seq\ (or \expr).\hfill
        !           435: \subsec{Control Statements}
        !           436: \li{eval.\ \seq\ for $a\le X\le b$}{for$(X=a,b,\seq)$}
        !           437: \li{eval.\ \seq\ for $X$ dividing $n$}{fordiv$(n,X,\seq)$}
        !           438: \li{eval.\ \seq\ for primes $a\le X\le b$}{forprime$(X=a,b,\seq)$}
        !           439: \li{eval.\ \seq\ for $a\le X\le b$ stepping $s$}{forstep$(X=a,b,s,\seq)$}
        !           440: \li{multivariable {\tt for}}{forvec$(X=v,\seq)$}
        !           441: \li{if $a\ne0$, evaluate \seq1, else \seq2}{if$(a,\{\seq1\},\{\seq2\})$}
        !           442: \li{evaluate \seq\ until $a\ne0$}{until$(a,\seq)$}
        !           443: \li{while $a\ne0$, evaluate \seq}{while$(a,\seq)$}
        !           444: \li{exit $n$ innermost enclosing loops}{break$(\{n\})$}
        !           445: \li{start a new iteration of enclosing loop}{next$()$}
        !           446: \li{return $x$ from current subroutine}{return$(x)$}
        !           447: %
        !           448: \subsec{Input/Output}
        !           449: \li{prettyprint args with/without newline}{printp(){\rm,} printp1()}
        !           450: \li{print args with/without newline}{print(){\rm,} print1()}
        !           451: \li{read a string from keyboard}{input$()$}
        !           452: \li{reorder priority of variables $[x,y,z]$}{reorder$(\{[x,y,z]\})$}
        !           453: \li{output \args\ in \TeX\ format}{printtex$(\args)$}
        !           454: \li{write \args\ to file}{write{\rm,} write1{\rm,} writetex$(\file,\args)$}
        !           455: \li{read file into GP}{read(\{\file\})}
        !           456: %
        !           457: \subsec{Interface with User and System}
        !           458: \li{allocates a new stack of $s$ bytes}{allocatemem$(\{s\})$}
        !           459: \li{execute system command $a$}{system$(a)$}
        !           460: \li{as above, feed result to GP}{extern$(a)$}
        !           461: \li{install function from library}{install$(f,code,\{\var{gpf\/}\},\{\var{lib}\})$}
        !           462: \li{alias \var{old}\ to \var{new}}{alias$(\var{new},\var{old})$}
        !           463: \li{new name of function $f$ in GP 2.0}{whatnow$(f)$}
        !           464: %
        !           465: \subsec{User Defined Functions}
        !           466: \leavevmode
        !           467:   {\tt name(formal vars) = local(local vars); \var{seq}}\hfill\break
        !           468:   {\tt struct.member = \var{seq}}\hfill\break
        !           469: \li{kill value of variable or function $x$}{kill$(x)$}
        !           470: \li{declare global variables}{global$(x,...)$}
        !           471:
        !           472: \section{Iterations, Sums \& Products}
        !           473: \li{numerical integration}{intnum$(X=a,b,\expr,\fl)$}
        !           474: \li{sum \expr\ over divisors of $n$}{sumdiv$(n,X,\expr)$}
        !           475: \li{sum $X=a$ to $X=b$, initialized at $x$}{sum$(X=a,b,\expr,\{x\})$}
        !           476: \li{sum of series \expr}{suminf$(X=a,\expr)$}
        !           477: \li{sum of alternating/positive series}{sumalt{\rm,} sumpos}
        !           478: \li{product $a\le X\le b$, initialized at $x$}{prod$(X=a,b,\expr,\{x\})$}
        !           479: \li{product over primes $a\le X\le b$}{prodeuler$(X=a,b,\expr)$}
        !           480: \li{infinite product $a\le X\le\infty$}{prodinf$(X=a,\expr)$}
        !           481: \li{real root of \expr\ between $a$ and $b$}{solve$(X=a,b,\expr)$}
        !           482: \endgroup
        !           483:
        !           484: % This goes at the top of page 4 (=1st column on back of reference card)
        !           485:
        !           486: \section{Vectors \& Matrices}
        !           487: %
        !           488: \li{dimensions of matrix $x$}{matsize$(x)$}
        !           489: \li{concatenation of $x$ and $y$}{concat$(x,\{y\})$}
        !           490: \li{extract components of $x$}{vecextract$(x,y,\{z\})$}
        !           491: \li{transpose of vector or matrix $x$}{mattranspose$(x)$ {\rm or} $x$\til}
        !           492: \li{adjoint of the matrix $x$}{matadj$(x)$}
        !           493: \li{eigenvectors of matrix $x$}{mateigen$(x)$}
        !           494: \li{characteristic polynomial of $x$}{charpoly$(x,\{v\},\fl)$}
        !           495: \li{trace of matrix $x$}{trace$(x)$}
        !           496: %
        !           497: \subsec{Constructors \& Special Matrices}
        !           498: \li{row vec.\ of \expr\ eval'ed at $1\le X\le n$}{vector$(n,\{X\},\{\expr\})$}
        !           499: \li{col.\ vec.\ of \expr\ eval'ed at $1\le X\le n$}{vectorv$(n,\{X\},\{\expr\})$}
        !           500: \li{matrix $1\le X\le m$, $1\le Y\le n$}{matrix$(m,n,\{X\},\{Y\},\{\expr\})$}
        !           501: \li{diagonal matrix whose diag. is $x$}{matdiagonal$(x)$}
        !           502: \li{$n\times n$ identity matrix}{matid$(n)$}
        !           503: \li{Hessenberg form of square matrix $x$}{mathess$(x)$}
        !           504: \li{$n\times n$ Hilbert matrix $H_{ij}=(i+j-1)^{-1}$}{mathilbert$(n)$}
        !           505: \li{$n\times n$ Pascal triangle $P_{ij}={i\choose j}$}{matpascal$(n-1)$}
        !           506: \li{companion matrix to polynomial $x$}{matcompanion$(x)$}
        !           507: %
        !           508: \subsec{Gaussian elimination}
        !           509: \li{determinant of matrix $x$}{matdet$(x,\fl)$}
        !           510: \li{kernel of matrix $x$}{matker$(x,\fl)$}
        !           511: \li{intersection of column spaces of $x$ and $y$}{matintersect$(x,y)$}
        !           512: \li{solve $M*X = B$ ($M$ invertible)}{matsolve$(M,B)$}
        !           513: \li{as solve, modulo $D$ (col. vector)}{matsolvemod$(M,D,B)$}
        !           514: \li{one sol of $M*X = B$}{matinverseimage$(M,B)$}
        !           515: \li{basis for image of matrix $x$}{matimage$(x)$}
        !           516: \li{supplement columns of $x$ to get basis}{matsupplement$(x)$}
        !           517: \li{rows, cols to extract invertible matrix}{matindexrank$(x)$}
        !           518: \li{rank of the matrix $x$}{matrank$(x)$}
        !           519:
        !           520: \section{Lattices \& Quadratic Forms}
        !           521: \li{upper triangular Hermite Normal Form}{mathnf$(x)$}
        !           522: \li{HNF of $x$ where $d$ is a multiple of det$(x)$}{mathnfmod$(x,d)$}
        !           523: \li{vector of elementary divisors of $x$}{matsnf$(x)$}
        !           524: \li{LLL-algorithm applied to columns of $x$}{qflll$(x,\fl)$}
        !           525: \li{like \kbd{qflll}, $x$ is Gram matrix of lattice}
        !           526:   {qflllgram$(x,\fl)$}
        !           527: \li{LLL-reduced basis for kernel of $x$}{matkerint$(x)$}
        !           528: \li{$\ZZ$-lattice $\longleftrightarrow$ $\QQ$-vector space}{matrixqz$(x,p)$}
        !           529: %
        !           530: \subsec{Quadratic Forms}
        !           531: \li{signature of quad form $^ty*x*y$}{qfsign$(x)$}
        !           532: \li{decomp into squares of $^ty*x*y$}{qfgaussred$(x)$}
        !           533: \li{find up to $m$ sols of $^ty*x*y\le b$}{qfminim$(x,b,m)$}
        !           534: %\li{perfection rank of $x$}{qfperfection$(x)$}
        !           535: \li{eigenvals/eigenvecs for real symmetric $x$}{qfjacobi$(x)$}
        !           536:
        !           537: \section{Formal \& p-adic Series}
        !           538: \li{truncate power series or $p$-adic number}{truncate$(x)$}
        !           539: \li{valuation of $x$ at $p$}{valuation$(x,p)$}
        !           540: \subsec{Dirichlet and Power Series}
        !           541: \li{Taylor expansion around $0$ of $f$ w.r.t. $x$}{taylor$(f,x)$}
        !           542: \li{$\sum a_kb_kt^k$ from $\sum a_kt^k$ and $\sum b_kt^k$}{serconvol$(x,y)$}
        !           543: \li{$f=\sum a_k*t^k$ from $\sum (a_k/k!)*t^k$}{serlaplace$(f)$}
        !           544: \li{reverse power series $F$ so $F(f(x))=x$}{serreverse$(f)$}
        !           545: \li{Dirichlet series multiplication / division}{dirmul{\rm,} dirdiv$(x,y)$}
        !           546: \li{Dirichlet Euler product ($b$ terms)}{direuler$(p=a,b,\expr)$}
        !           547: \subsec{$p$-adic Functions}
        !           548: \li{square of $x$, good for $2$-adics}{sqr$(x)$}
        !           549: \li{Teichmuller character of $x$}{teichmuller$(x)$}
        !           550: \li{Newton polygon of $f$ for prime $p$}{newtonpoly$(f,p)$}
        !           551:
        !           552: \newcolumn
        !           553: \title{PARI-GP Reference Card}
        !           554: \centerline{(PARI-GP version \PARIversion)}
        !           555:
        !           556: \section{Polynomials \& Rational Functions}
        !           557: %
        !           558: \li{degree of $f$}{poldegree$(f)$}
        !           559: \li{coefficient of degree $n$ of $f$}{polcoeff$(f,n)$}
        !           560: \li{round coeffs of $f$ to nearest integer}{round$(f,\{\&e\})$}
        !           561: \li{gcd of coefficients of $f$}{content$(f)$}
        !           562: \li{replace $x$ by $y$ in $f$}{subst$(f,x,y)$}
        !           563: \li{discriminant of polynomial $f$}{poldisc$(f)$}
        !           564: %\li{elementary divisors of Z[a]/f'(a)Z[a]}{poldiscreduced$(f)$}
        !           565: \li{resultant of $f$ and $g$}{polresultant$(f,g,\fl)$}
        !           566: \li{as above, give $[u,v,d]$, $xu + yv = d$}{bezoutres$(x,y)$}
        !           567: \li{derivative of $f$ w.r.t. $x$}{deriv$(f,x)$}
        !           568: \li{formal integral of $f$ w.r.t. $x$}{intformal$(f,x)$}
        !           569: \li{reciprocal poly $x^{\deg f}f(1/x)$}{polrecip$(f)$}
        !           570: \li{interpolating poly evaluated at $a$}{polinterpolate$(X,Y,\{a\},\{\&e\})$}
        !           571: \li{initialize $t$ for Thue equation solver}{thueinit(f)}
        !           572: \li{solve Thue equation $f(x,y)=a$}{thue$(t,a,\{sol\})$}
        !           573: %
        !           574: \subsec{Roots and Factorization}
        !           575: \li{number of real roots of $f$, $a < x\le b$}{polsturm$(f,\{a\},\{b\})$}
        !           576: \li{complex roots of $f$}{polroots$(f)$}
        !           577: \li{symmetric powers of roots of $f$ up to $n$}{polsym$(f,n)$}
        !           578: \li{roots of $f \mod p$}{polrootsmod$(f,p,\fl)$}
        !           579: \li{factor $f$}{factor$(f,\{lim\})$}
        !           580: \li{factorization of $f\mod p$}{factormod$(f,p,\fl)$}
        !           581: \li{factorization of $f$ over $\FF_{p^a}$}{factorff$(f,p,a)$}
        !           582: \li{$p$-adic fact. of $f$ to prec. $r$}{factorpadic$(f,p,r,\fl)$}
        !           583: \li{$p$-adic roots of $f$ to prec. $r$}{polrootspadic$(f,p,r)$}
        !           584: \li{$p$-adic root of $f$ cong. to $a\mod p$}{padicappr$(f,a)$}
        !           585: \li{Newton polygon of $f$ for prime $p$}{newtonpoly$(f,p)$}
        !           586: %
        !           587: \subsec{Special Polynomials}
        !           588: \li{$n$th cyclotomic polynomial in var. $v$}{polcyclo$(n,\{v\})$}
        !           589: \li{$d$-th degree subfield of $\QQ(\zeta_n)$} {polsubcyclo$(n,d,\{v\})$}
        !           590: \li{$n$-th Legendre polynomial}{pollegendre$(n)$}
        !           591: \li{$n$-th Tchebicheff polynomial}{poltchebi$(n)$}
        !           592: \li{Zagier's polynomial of index $n$,$m$}{polzagier$(n,m)$}
        !           593:
        !           594: \section{Transcendental Functions}
        !           595: \li{real, imaginary part of $x$}{real$(x)$, imag$(x)$}
        !           596: \li{absolute value, argument of $x$}{abs$(x)$, arg$(x)$}
        !           597: \li{square root of $x$}{sqrt$(x)$}
        !           598: \li{trig functions}{sin, cos, tan, cotan}
        !           599: \li{inverse trig functions}{asin, acos, atan}
        !           600: \li{hyperbolic functions}{sinh, cosh, tanh}
        !           601: \li{inverse hyperbolic functions}{asinh, acosh, atanh}
        !           602: \li{exponential of $x$}{exp$(x)$}
        !           603: \li{natural log of $x$}{ln$(x)$ {\rm or} log$(x)$}
        !           604: %
        !           605: \li{gamma function $\Gamma(x)=\int_0^\infty e^{-t}t^{x-1}dt$}{gamma$(x)$}
        !           606: %\li{half-integer gamma function $\Gamma(n+1/2)$}{gammah$(n)$}
        !           607: \li{logarithm of gamma function}{lngamma$(x)$}
        !           608: \li{$\psi(x)=\Gamma'(x)/\Gamma(x)$}{psi$(x)$}
        !           609: \li{incomplete gamma function ($y=\Gamma(s)$)}{incgam$(s,x,\{y\})$}
        !           610: \li{exponential integral $\int_x^\infty e^{-t}/t\,dt$}{eint1$(x)$}
        !           611: \li{error function $2/\sqrt\pi\int_x^\infty e^{-t^2}dt$}{erfc$(x)$}
        !           612: \li{dilogarithm of $x$}{dilog$(x)$}
        !           613: \li{$m$th polylogarithm of $x$}{polylog$(m,x,\fl)$}
        !           614: \li{$U$-confluent hypergeometric function}{hyperu$(a,b,u)$}
        !           615: \li{$J$-Bessel function $J_{n+1/2}(x)$}{besseljh$(n,x)$}
        !           616: \li{$K$-Bessel function of index \var{nu}}{besselk$(\var{nu},x)$}
        !           617:
        !           618: \section{Elementary Arithmetic Functions}
        !           619: \li{vector of binary digits of $|x|$}{binary$(x)$}
        !           620: \li{give bit number $n$ of integer $x$}{bittest$(x,n)$}
        !           621: \li{ceiling of $x$}{ceil$(x)$}
        !           622: \li{floor of $x$}{floor$(x)$}
        !           623: \li{fractional part of $x$}{frac$(x)$}
        !           624: \li{round $x$ to nearest integer}{round$(x,\{\&e\})$}
        !           625: \li{truncate $x$}{truncate$(x,\{\&e\})$}
        !           626: \li{gcd of $x$ and $y$}{gcd$(x,y)$}
        !           627: \li{LCM of $x$ and $y$}{lcm$(x,y)$}
        !           628: \li{gcd of entries of a vector/matrix}{content$(x)$}
        !           629: \par
        !           630: \subsec{Primes and Factorization}
        !           631: \li{add primes in $v$ to the prime table}{addprimes$(v)$}
        !           632: \li{the $n$th prime}{prime$(n)$}
        !           633: \li{vector of first $n$ primes}{primes$(n)$}
        !           634: \li{smallest prime $\ge x$}{nextprime$(x)$}
        !           635: \li{largest prime $\le x$}{precprime$(x)$}
        !           636: \li{factorization of $x$}{factor$(x,\{lim\})$}
        !           637: \li{reconstruct $x$ from its factorization}{factorback$(fa,\{nf\})$}
        !           638: \par
        !           639: \subsec{Divisors}
        !           640: \li{number of distinct prime divisors}{omega$(x)$}
        !           641: \li{number of prime divisors  with mult}{bigomega$(x)$}
        !           642: \li{number of divisors of $x$}{numdiv$(x)$}
        !           643: \li{row vector of divisors of $x$}{divisors$(x)$}
        !           644: \li{sum of ($k$-th powers of) divisors of $x$}{sigma$(x,\{k\})$}
        !           645: \par
        !           646: \subsec{Special Functions and Numbers}
        !           647: \li{binomial coefficient $x\choose y$}{binomial$(x,y)$}
        !           648: \li{Bernoulli number $B_n$ as real}{bernreal$(n)$}
        !           649: \li{Bernoulli vector $B_0,B_2,\ldots,B_{2n}$}{bernvec$(n)$}
        !           650: \li{$n$th Fibonacci number}{fibonacci$(n)$}
        !           651: \li{Euler $\phi$-function}{eulerphi$(x)$}
        !           652: \li{M\"obius $\mu$-function}{moebius$(x)$}
        !           653: \li{Hilbert symbol of $x$ and $y$ (at $p$)}{hilbert$(x,y,\{p\})$}
        !           654: \li{Kronecker-Legendre symbol $({x\over y})$}{kronecker$(x,y)$}
        !           655: \par
        !           656: \subsec{Miscellaneous}
        !           657: \li{integer or real factorial of $x$}{$x!$ {\rm or} fact$(x)$}
        !           658: \li{integer square root of $x$}{sqrtint$(x)$}
        !           659: \li{solve $z\equiv x$ and $z\equiv y$}{chinese$(x,y)$}
        !           660: \li{minimal $u,v$ so $xu+yv=\gcd(x,y)$}{bezout$(x,y)$}
        !           661: \li{multiplicative order of $x$ (intmod)}{znorder$(x)$}
        !           662: \li{primitive root mod prime power $q$}{znprimroot$(q)$}
        !           663: \li{structure of $(\ZZ/n\ZZ)^*$}{znstar$(n)$}
        !           664: \li{continued fraction of $x$}{contfrac$(x,\{b\},\{lmax\})$}
        !           665: \li{last convergent of continued fraction $x$}{contfracpnqn$(x)$}
        !           666: \li{best rational approximation to $x$}{bestappr$(x,k)$}
        !           667:
        !           668: \section{True-False Tests}
        !           669: \li{is $x$ the disc. of a quadratic field?}{isfundamental$(x)$}
        !           670: \li{is $x$ a prime?}{isprime$(x)$}
        !           671: \li{is $x$ a strong pseudo-prime?}{ispseudoprime$(x)$}
        !           672: \li{is $x$ square-free?}{issquarefree$(x)$}
        !           673: \li{is $x$ a square?}{issquare$(x,\{\&n\})$}
        !           674: \li{is \var{pol}\ irreducible?}{polisirreducible$(\var{pol})$}
        !           675:
        !           676: % This goes at the bottom of the second page (column 6)
        !           677: \copyrightnotice
        !           678: %
        !           679:
        !           680: %%%%%%%%%%% Extra Material (part II)
        !           681: %
        !           682: \newcolumn
        !           683: \title{PARI-GP Reference Card (2)}
        !           684: \centerline{(PARI-GP version \PARIversion)}
        !           685:
        !           686: \section{Elliptic Curves}
        !           687: %
        !           688: Elliptic curve initially given by $5$-tuple $E=$\kbd{[a1,a2,a3,a4,a6]}.
        !           689: Points are \kbd{[x,y]}, the origin is \kbd{[0]}.
        !           690: \hfill\break
        !           691: \li{Initialize elliptic struct. $\var{ell}$, i.e create}{ellinit$(E,\fl)$}
        !           692: \leavevmode\strut\hskip1em
        !           693: $a_1,a_2,a_3,a_4,a_6,b_2,b_4,b_6,b_8,c_4,c_6,disc,j$. This data can be
        !           694: recovered by typing \kbd{\var{ell}.a1},$\dots$,\kbd{\var{ell}.j}.
        !           695: If $\var{fl}$ omitted, also
        !           696: \hfill\break
        !           697: \beginindentedkeys
        !           698: \li{$E$ defined over $\RR$}{}
        !           699: \begindoubleindentedkeys
        !           700: \key{$x$-coords. of points of order $2$}{\var{ell}.roots}
        !           701: \key{real and complex periods}{\var{ell}.omega}
        !           702: \key{associated quasi-periods}{\var{ell}.eta}
        !           703: \key{volume of complex lattice}{\var{ell}.area}
        !           704: \enddoubleindentedkeys
        !           705: \li{$E$ defined over $\QQ_p$, $|j|_p>1$}{}
        !           706: \begindoubleindentedkeys
        !           707: \key{$x$-coord. of unit $2$ torsion point}{\var{ell}.roots}
        !           708: \key{Tate's $[u^2, u, q]$}{\var{ell}.tate}
        !           709: \key{Mestre's $w$}{\var{ell}.w}
        !           710: \endindentedkeys
        !           711: \li{change curve $E$ using $v=[u,r,s,t]$}{ellchangecurve$(ell,v)$}
        !           712: \li{change point $z$ using $v=[u,r,s,t]$}{ellchangepoint$(z,v)$}
        !           713: \li{cond, min mod, Tamgawa nmbr $[N,v,c]$}{ellglobalred$(ell)$}
        !           714: \li{Kodaira type of $p$ fiber of $E$}{elllocalred$(ell,p)$}
        !           715: \li{add points $z1+z2$}{elladd$(ell,z1,z2)$}
        !           716: \li{subtract points $z1-z2$}{ellsub$(ell,z1,z2)$}
        !           717: \li{compute $n\cdot z$}{ellpow$(ell,z,n)$}
        !           718: \li{check if $z$ is on $E$}{ellisoncurve$(ell,z)$}
        !           719: \li{order of torsion point $z$}{ellorder$(ell,z)$}
        !           720: \li{torsion subgroup with generators}{elltors$(ell)$}
        !           721: \li{$y$-coordinates of point(s) for $x$}{ellordinate$(ell,x)$}
        !           722: \li{canonical bilinear form taken at $z1$, $z2$}{ellbil$(ell,z1,z2)$}
        !           723: \li{canonical height of $z$}{ellheight$(ell,z,\fl)$}
        !           724: \li{height regulator matrix for pts in $x$}{ellheightmatrix$(ell,x)$}
        !           725: \li{$p$th coeff $a_p$ of $L$-function, $p$ prime}{ellap$(ell,p)$}
        !           726: \li{$k$th coeff $a_k$ of $L$-function}{ellak$(ell,k)$}
        !           727: \li{vector of first $n$ $a_k$'s in $L$-function}{ellan$(ell,n)$}
        !           728: \li{$L(E,s)$, set $A\approx1$}{elllseries$(ell,s,\{A\})$}
        !           729: \li{root number for $L(E,.)$ at $p$}{ellrootno$(ell,\{p\})$}
        !           730: \li{modular parametrization of $E$}{elltaniyama$(ell)$}
        !           731: \li{point $[\wp(z),\wp'(z)]$ corresp. to $z$}{ellztopoint$(ell,z)$}
        !           732: \li{complex $z$ such that $p=[\wp(z),\wp'(z)]$}{ellpointtoz$(ell,p)$}
        !           733:
        !           734: \section{Elliptic \& Modular Functions}
        !           735: %
        !           736: \li{arithmetic-geometric mean}{agm$(x,y)$}
        !           737: \li{elliptic $j$-function $1/q+744+\cdots$}{ellj$(x)$}
        !           738: \li{Weierstrass $\sigma$ function}{ellsigma$(ell,z,\fl)$}
        !           739: \li{Weierstrass $\wp$ function}{ellwp$(ell,\{z\},\fl)$}
        !           740: \li{Weierstrass $\zeta$ function}{ellzeta$(ell,z)$}
        !           741: \li{modified Dedekind $\eta$ func. $\prod(1-q^n)$}{eta$(x,\fl)$}
        !           742: \li{Jacobi sine theta function}{theta$(q,z)$}
        !           743: \li{k-th derivative at z=0 of \kbd{theta}$(q,z)$}{thetanullk$(q,k)$}
        !           744: \li{Weber's $f$ functions}{weber$(x,\fl)$}
        !           745: \li{Riemann's zeta $\zeta(s)=\sum n^{-s}$}{zeta$(s)$}
        !           746: %
        !           747: \shortcopyrightnotice
        !           748: \newcolumn
        !           749:
        !           750: \section{Graphic Functions}
        !           751: \li{crude graph of \expr\ between $a$ and $b$}{plot$(X=a,b,expr)$}
        !           752: \subsec{High-resolution plot {\rm (immediate plot)}}
        !           753: \li{plot \expr\ between $a$ and $b$}{ploth$(X=a,b,expr,\fl,\{n\})$}
        !           754: \li{plot points given by lists $lx$, $ly$}{plothraw$(lx,ly,\fl)$}
        !           755: \li{terminal dimensions}{plothsizes$()$}
        !           756: %
        !           757: \subsec{Rectwindow functions}
        !           758: \li{init window $w$, with size $x$,$y$}{plotinit$(w,x,y)$}
        !           759: \li{erase window $w$}{plotkill$(w)$}
        !           760: \li{copy $w$ to $w2$ with offset $(dx,dy)$}{plotcopy$(w,w2,dx,dy)$}
        !           761: \li{scale coordinates in $w$}{plotscale$(w,x_1,x_2,y_1,y_2)$}
        !           762: \li{\kbd{ploth} in $w$}{plotrecth$(w,X=a,b,expr,\fl,\{n\})$}
        !           763: \li{\kbd{plothraw} in $w$}{plotrecthraw$(w,data,\fl)$}
        !           764: \li{draw window $w_1$ at $(x_1,y_1)$, \dots} {plotdraw$([[w_1,x_1,y_1],\dots])$}
        !           765: %
        !           766: \subsec{Low-level Rectwindow Functions}
        !           767: %\li{}{plotlinetype$(w,)$}
        !           768: %\li{}{plotpointtype$(w,)$}
        !           769: %\li{}{plotterm$(w,)$}
        !           770: \li{set current drawing color in $w$ to $c$}{plotcolor$(w,c)$}
        !           771: \li{current position of cursor in $w$}{plotcursor$(w)$}
        !           772: %
        !           773: \li{write $s$ at cursor's position}{plotstring$(w,s)$}
        !           774: \li{move cursor to $(x,y)$}{plotmove$(w,x,y)$}
        !           775: \li{move cursor to $(x+dx,y+dy)$}{plotrmove$(w,dx,dy)$}
        !           776: \li{draw a box to $(x_2,y_2)$}{plotbox$(w,x_2,y_2)$}
        !           777: \li{draw a box to $(x+dx,y+dy)$}{plotrbox$(w,dx,dy)$}
        !           778: \li{draw polygon}{plotlines$(w,lx,ly,\fl)$}
        !           779: \li{draw points}{plotpoints$(w,lx,ly)$}
        !           780: \li{draw line to $(x+dx,y+dy)$}{plotrline$(w,dx,dy)$}
        !           781: \li{draw point $(x+dx,y+dy)$}{plotrpoint$(w,dx,dy)$}
        !           782: %
        !           783: \subsec{Postscript Functions}
        !           784: \li{as {\tt ploth}}{psploth$(X=a,b,expr,\fl,\{n\})$}
        !           785: \li{as {\tt plothraw}}{psplothraw$(lx,ly,\fl)$}
        !           786: \li{as {\tt plotdraw}}{psdraw$([[w_1,x_1,y_1],\dots])$}
        !           787: \newcolumn
        !           788:
        !           789: \section{Binary Quadratic Forms}
        !           790: %
        !           791: \li{create $ax^2+bxy+cy^2$ (distance $d$) }{Qfb$(a,b,c,\{d\})$}
        !           792: \li{reduce $x$ ($s =\sqrt{D}$, $l=\lfloor s\rfloor$)}
        !           793:   {qfbred$(x,\fl,\{D\},\{l\},\{s\})$}
        !           794: \li{composition of forms}{$x*y$ {\rm or }qfbnucomp$(x,y,l)$}
        !           795: \li{$n$-th power of form}{$x$\pow$n$ {\rm or }qfbnupow$(x,n)$}
        !           796: \li{composition without reduction}{qfbcompraw$(x,y)$}
        !           797: \li{$n$-th power without reduction}{qfbpowraw$(x,n)$}
        !           798: \li{prime form of disc. $x$ above prime $p$}{qfbprimeform$(x,p)$}
        !           799: \li{class number of disc. $x$}{qfbclassno$(x)$}
        !           800: \li{Hurwitz class number of disc. $x$}{qfbhclassno$(x)$}
        !           801:
        !           802: \section{Quadratic Fields}
        !           803: %
        !           804: \li{quadratic number $\omega=\sqrt x$ or $(1+\sqrt x)/2$}{quadgen$(x)$}
        !           805: \li{minimal polynomial of $\omega$}{quadpoly$(x)$}
        !           806: \li{discriminant of $\QQ(\sqrt{D})$}{quaddisc$(x)$}
        !           807: \li{regulator of real quadratic field}{quadregulator$(x)$}
        !           808: \li{fundamental unit in real $\QQ(x)$}{quadunit$(x)$}
        !           809: \li{class group of $\QQ(\sqrt{D})$}{quadclassunit$(D,\fl,\{t\})$}
        !           810: \li{Hilbert class field of $\QQ(\sqrt{D})$}{quadhilbert$(D,\fl)$}
        !           811: \li{ray class field modulo $f$ of $\QQ(\sqrt{D})$}{quadray$(D,f,\fl)$}
        !           812:
        !           813: \section{General Number Fields: Initializations}
        !           814: A number field $K$ is given by a monic irreducible $f\in\ZZ[X]$.\hfill\break
        !           815: \li{init number field structure \var{nf}}{nfinit$(f,\fl)$}
        !           816: \subsec{nf members:}
        !           817: \beginindentedkeys
        !           818: \key{polynomial defining \var{nf}, $f(\theta)=0$}{\var{nf}.pol}
        !           819: \key{number of [real,complex] places}{\var{nf}.sign}
        !           820: \key{discriminant of \var{nf}}{\var{nf}.disc}
        !           821: \key{$T_2$ matrix}{\var{nf}.t2}
        !           822: \key{vector of roots of $f$}{\var{nf}.roots}
        !           823: \key{integral basis of $\ZZ_K$ as powers of $\theta$}{\var{nf}.zk}
        !           824: \key{different}{\var{nf}.diff}
        !           825: \key{codifferent}{\var{nf}.codiff}
        !           826: \endindentedkeys
        !           827: \li{recompute \var{nf}\ using current precision}{nfnewprec$(nf)$}
        !           828: \li{init relative \var{rnf}\ given by $g=0$ over $K$}{rnfinit$(\var{nf},g)$}
        !           829: %
        !           830: \li{init big number field structure \var{bnf}}{bnfinit$(f,\fl)$}
        !           831: \subsec{bnf members: {\rm same as \var{nf}, plus}}
        !           832: \beginindentedkeys
        !           833: \key{underlying \var{nf}}{\var{bnf}.nf}
        !           834: \key{classgroup}{\var{bnf}.clgp}
        !           835: \key{regulator}{\var{bnf}.reg}
        !           836: \key{fundamental units}{\var{bnf}.fu}
        !           837: \key{torsion units}{\var{bnf}.tu}
        !           838: \key{$[tu,fu]$, $[fu,tu]$}{\var{bnf}.tufu{\rm/}futu}
        !           839: \endindentedkeys
        !           840: \li{compute a \var{bnf}\ from small \var{bnf}}{bnfmake$(\var{sbnf})$}
        !           841: %
        !           842: \li{add $S$-class group and units, yield \var{bnfs}}{bnfsunit$(\var{nf},S)$}
        !           843: \li{init class field structure \var{bnr}}{bnrinit$(\var{bnf},m,\fl)$}
        !           844: %
        !           845: \subsec{bnr members: {\rm same as \var{bnf}, plus}}
        !           846: \beginindentedkeys
        !           847: \key{underlying \var{bnf}}{\var{bnr}.bnf}
        !           848: \key{structure of $(\ZZ_K/m)^*$}{\var{bnr}.zkst}
        !           849: \endindentedkeys
        !           850:
        !           851: \section{Simple Arithmetic Invariants (nf)}
        !           852: Elements are rational numbers, polynomials, polmods, or column vectors (on
        !           853: integral basis \kbd{\var{nf}.zk}).\hfill\break
        !           854: \li{integral basis of field def. by $f=0$}{nfbasis$(f)$}
        !           855: \li{field discriminant of field $f=0$}{nfdisc$(f)$}
        !           856: \li{reverse polmod $a=A(X)\mod T(X)$}{modreverse$(a)$}
        !           857: \li{Galois group of field $f=0$, $\deg f\le 11$}{polgalois$(f)$}
        !           858: \li{smallest poly defining $f=0$}{polredabs$(f,\fl)$}
        !           859: \li{small polys defining subfields of $f=0$}{polred$(f,\fl,\{p\})$}
        !           860: \li{small polys defining suborders of $f=0$}{polredord$(f)$}
        !           861: \li{poly of degree $\le k$ with root $x\in\CC$}{algdep$(x,k)$}
        !           862: \li{small linear rel.\ on coords of vector $x$}{lindep$(x)$}
        !           863: \li{are fields $f=0$ and $g=0$ isomorphic?}{nfisisom$(f,g)$}
        !           864: \li{is field $f=0$ a subfield of $g=0$?}{nfisincl$(f,g)$}
        !           865: \li{compositum of $f=0$, $g=0$}{polcompositum$(f,g,\fl)$}
        !           866: %
        !           867: \li{basic element operations (prefix \kbd{nfelt}):}{}
        !           868: \leavevmode\strut\hskip1em
        !           869: $($\kbd{nfelt}$)$\kbd{mul}, \kbd{pow}, \kbd{div}, \kbd{diveuc},
        !           870: \kbd{mod}, \kbd{divrem}, \kbd{val}
        !           871: \hfill\break
        !           872: %
        !           873: \li{express $x$ on integer basis}{nfalgtobasis$(\var{nf},x)$}
        !           874: \li{express element\ $x$ as a polmod}{nfbasistoalg$(\var{nf},x)$}
        !           875: \li{quadratic Hilbert symbol (at $p$)}{nfhilbert$(\var{nf},a,b,\{p\})$}
        !           876: \li{roots of $g$ belonging to {\tt nf}}{nfroots$(\var{nf},g)$}
        !           877: \li{factor $g$ in {\tt nf}}{nffactor$(\var{nf},g)$}
        !           878: \li{factor $g$ mod prime $pr$ in {\tt nf}}{nffactormod$(\var{nf},g,pr)$}
        !           879: \li{number of roots of $1$ in {\tt nf}}{nfrootsof1$(nf)$}
        !           880: \li{conjugates of a root $\theta$ of {\tt nf}}{nfgaloisconj$(\var{nf},\fl)$}
        !           881: \li{apply Galois automorphism $s$ to $x$}{nfgaloisapply$(\var{nf},s,x)$}
        !           882: \li{subfields (of degree $d$) of {\tt nf}}{nfsubfields$(\var{nf},\{d\})$}
        !           883: %
        !           884: \subsec{Dedekind Zeta Function $\zeta_K$}
        !           885: \li{$\zeta_K$ as Dirichlet series, $N(I)<b$}{dirzetak$(\var{nf},b)$}
        !           886: \li{init \var{nfz}\ for field $f=0$}{zetakinit$(f)$}
        !           887: \li{compute $\zeta_K(s)$}{zetak$(\var{nfz},s,\fl)$}
        !           888: \li{Artin root number of $K$}{bnrrootnumber$(\var{bnr},\var{chi},\fl)$}
        !           889:
        !           890: \section{Class Groups \& Units (\var{bnf}, bnr)}
        !           891: \leavevmode
        !           892: $a1,\{a2\},\{a3\}$ usually $bnr,subgp$ or $\var{bnf},module,\{subgp\}$
        !           893: \hfill\break
        !           894: %
        !           895: \li{remove GRH assumption from \var{bnf}}{bnfcertify$(\var{bnf})$}
        !           896: \li{expo.~of ideal $x$ on class gp}{bnfisprincipal$(\var{bnf},x,\fl)$}
        !           897: \li{expo.~of ideal $x$ on ray class gp}{bnrisprincipal$(\var{bnr},x,\fl)$}
        !           898: \li{expo.~of $x$ on fund.~units}{bnfisunit$(\var{bnf},x)$}
        !           899: \li{as above for $S$-units}{bnfissunit$(\var{bnfs},x)$}
        !           900: \li{fundamental units of \var{bnf}}{bnfunit$(\var{bnf})$}
        !           901: \li{signs of real embeddings of \kbd{\var{bnf}.fu}}{bnfsignunit$(\var{bnf})$}
        !           902: %
        !           903: \subsec{Class Field Theory}
        !           904: \li{ray class group structure for mod.~$m$}{bnrclass$(\var{bnf},m,\fl)$}
        !           905: \li{ray class number for mod.~$m$}{bnrclassno$(\var{bnf},m)$}
        !           906: \li{discriminant of class field ext}{bnrdisc$(a1,\{a2\},\{a3\})$}
        !           907: \li{ray class numbers, $l$ list of mods}{bnrclassnolist$(\var{bnf},l)$}
        !           908: \li{discriminants of class fields}{bnrdisclist$(\var{bnf},l,\{arch\},\fl)$}
        !           909: \li{decode output from \kbd{bnrdisclist}}{bnfdecodemodule$(\var{nf},fa)$}
        !           910: \li{is modulus the conductor?}{bnrisconductor$(a1,\{a2\},\{a3\})$}
        !           911: \li{conductor of character $chi$}{bnrconductorofchar$(\var{bnr},chi)$}
        !           912: \li{conductor of extension}{bnrconductor$(a1,\{a2\},\{a3\},\fl)$}
        !           913: \li{conductor of extension def.\ by $g$}{rnfconductor$(\var{bnf},g)$}
        !           914: \li{Artin group of ext.\ def'd by $g$}{rnfnormgroup$(\var{bnr},g)$}
        !           915: \li{subgroups of {\tt bnr}, index $<=b$}{subgrouplist$(\var{bnr},b,\fl)$}
        !           916: \li{rel.\ eq.\ for class field def'd by $sub$}{rnfkummer$(\var{bnr},sub,\{d\})$}
        !           917: \li{same, using Stark units (real field)}{bnrstark$(\var{bnr},sub,\fl)$}
        !           918:
        !           919: \newcolumn
        !           920: \title{PARI-GP Reference Card (2)}
        !           921: \centerline{(PARI-GP version \PARIversion)}
        !           922:
        !           923: \section{Ideals}
        !           924: Ideals are elements, primes, or matrix of generators in HNF.\hfill\break
        !           925: \li{is $id$ an ideal in {\tt nf}?}{nfisideal$(\var{nf},id)$}
        !           926: \li{is $x$ principal in {\tt bnf}?}{bnfisprincipal$(\var{bnf},x)$}
        !           927: \li{principal ideal generated by $x$}{idealprincipal$(\var{nf},x)$}
        !           928: \li{principal idele generated by $x$}{ideleprincipal$(\var{nf},x)$}
        !           929: \li{give $[a,b]$, s.t.~ $a\ZZ_K+b\ZZ_K = x$}{idealtwoelt$(\var{nf},x,\{a\})$}
        !           930: \li{put ideal $a$ ($a\ZZ_K+b\ZZ_K$) in HNF form}{idealhnf$(\var{nf},a,\{b\})$}
        !           931: \li{norm of ideal $x$}{idealnorm$(\var{nf},x)$}
        !           932: \li{minimum of ideal $x$ (direction $v$)}{idealmin$(\var{nf},x,v)$}
        !           933: \li{LLL-reduce the ideal $x$ (direction $v$)}{idealred$(\var{nf},x,\{v\})$}
        !           934: %
        !           935: \subsec{Ideal Operations}
        !           936: \li{add ideals $x$ and $y$}{idealadd$(\var{nf},x,y)$}
        !           937: \li{multiply ideals $x$ and $y$}{idealmul$(\var{nf},x,y,\fl)$}
        !           938: \li{intersection of ideals $x$ and $y$}{idealintersect$(\var{nf},x,y,\fl)$}
        !           939: \li{$n$-th power of ideal $x$}{idealpow$(\var{nf},x,n,\fl)$}
        !           940: \li{inverse of ideal $x$}{idealinv$(\var{nf},x)$}
        !           941: \li{divide ideal $x$ by $y$}{idealdiv$(\var{nf},x,y,\fl)$}
        !           942: \li{Find $[a,b]\in x\times y$, $a+b=1$}{idealaddtoone$(\var{nf},x,\{y\})$}
        !           943: %
        !           944: \subsec{Primes and Multiplicative Structure}
        !           945: \li{factor ideal $x$ in {\tt nf}}{idealfactor$(\var{nf},x)$}
        !           946: \li{recover $x$ from its factorization in {\tt nf}}{factorback$(x,nf)$}
        !           947: \li{decomposition of prime $p$ in {\tt nf}}{idealprimedec$(\var{nf},p)$}
        !           948: \li{valuation of $x$ at prime ideal $pr$}{idealval$(\var{nf},x,pr)$}
        !           949: \li{weak approximation theorem in {\tt nf}}{idealchinese$(\var{nf},x,y)$}
        !           950: \li{give $bid=$structure of $(\ZZ_K/id)^*$}{idealstar$(\var{nf},id,\fl)$}
        !           951: \li{discrete log of $x$ in $(\ZZ_K/bid)^*$}{ideallog$(\var{nf},x,bid)$}
        !           952: \li{\kbd{idealstar} of all ideals of norm $\le b$}{ideallist$(\var{nf},b,\fl)$}
        !           953: \li{add archimedean places}{ideallistarch$(\var{nf},b,\{ar\},\fl)$}
        !           954: \li{init \kbd{prmod} structure}{nfmodprinit$(\var{nf},pr)$}
        !           955: \li{kernel of matrix $M$ in $(\ZZ_K/pr)^*$}{nfkermodpr$(\var{nf},M,prmod)$}
        !           956: \li{solve $M x = B$ in $(\ZZ_K/pr)^*$}{nfsolvemodpr$(\var{nf},M,B,prmod)$}
        !           957:
        !           958: \section{Relative Number Fields (rnf)}
        !           959: Extension $L/K$ is defined by $g\in K[x]$. We have $order\subset L$.
        !           960: \hfill\break
        !           961: %
        !           962: \li{absolute equation of $L$}{rnfequation$(\var{nf},g,\fl)$}
        !           963: %
        !           964: \subsec{Lifts and Push-downs}
        !           965: \li{absolute $\rightarrow$ relative repres.\ for $x$}
        !           966:   {rnfeltabstorel$(\var{rnf},x)$}
        !           967: \li{relative $\rightarrow$ absolute repres.\ for $x$}
        !           968:   {rnfeltreltoabs$(\var{rnf},x)$}
        !           969: \li{lift $x$ to the relative field}{rnfeltup$(\var{rnf},x)$}
        !           970: \li{push $x$ down to the base field}{rnfeltdown$(\var{rnf},x)$}
        !           971: \leavevmode idem for $x$ ideal:
        !           972: \kbd{$($rnfideal$)$reltoabs}, \kbd{abstorel}, \kbd{up}, \kbd{down}\hfill\break
        !           973: %
        !           974: \li{relative {\tt nfalgtobasis}}{rnfalgtobasis$(\var{rnf},x)$}
        !           975: \li{relative {\tt nfbasistoalg}}{rnfbasistoalg$(\var{rnf},x)$}
        !           976: \li{relative {\tt idealhnf}}{rnfidealhnf$(\var{rnf},x)$}
        !           977: \li{relative {\tt idealmul}}{rnfidealmul$(\var{rnf},x,y)$}
        !           978: \li{relative {\tt idealtwoelt}}{rnfidealtwoelt$(\var{rnf},x)$}
        !           979: %
        !           980: \subsec{Projective $\ZZ_K$-modules, maximal order}
        !           981: \li{relative {\tt polred}}{rnfpolred$(\var{nf},g)$}
        !           982: \li{relative {\tt polredabs}}{rnfpolredabs$(\var{nf},g)$}
        !           983: \li{characteristic poly.\ of $a$ mod $g$}{rnfcharpoly$(\var{nf},g,a,\{v\})$}
        !           984: \li{relative Dedekind criterion, prime $pr$}{rnfdedekind$(\var{nf},g,pr)$}
        !           985: \li{discriminant of relative extension}{rnfdisc$(\var{nf},g)$}
        !           986: \li{pseudo-basis of $\ZZ_L$}{rnfpseudobasis$(\var{nf},g)$}
        !           987: \li{relative HNF basis of $order$}{rnfhnfbasis$(\var{bnf},order)$}
        !           988: \li{reduced basis for $order$}{rnflllgram$(\var{nf},g,order)$}
        !           989: \li{determinant of pseudo-matrix $A$}{rnfdet$(\var{nf},A)$}
        !           990: \li{Steinitz class of $order$}{rnfsteinitz$(\var{nf},order)$}
        !           991: \li{is \var{order} a free $\ZZ_K$-module?}{rnfisfree$(\var{bnf},\var{order})$}
        !           992: \li{true basis of \var{order}, if it is free}{rnfbasis$(\var{bnf},\var{order})$}
        !           993: %
        !           994: \subsec{Norms}
        !           995: \li{absolute norm of ideal $x$}{rnfidealnormabs$(\var{rnf},x)$}
        !           996: \li{relative norm of ideal $x$}{rnfidealnormrel$(\var{rnf},x)$}
        !           997: \li{solutions of $N_{K/\QQ}(y)=x\in \ZZ$}{bnfisintnorm$(\var{bnf},x)$}
        !           998: \li{is $x\in\QQ$ a norm from $K$?}{bnfisnorm$(\var{bnf},x,\fl)$}
        !           999: \li{is $x\in K$ a norm from $L$?}{rnfisnorm$(\var{bnf},ext,x,\fl)$}
        !          1000: \vfill
        !          1001: \copyrightnotice
        !          1002: \bye
        !          1003: % Local variables:
        !          1004: % compile-command: "tex PARIRefCard"
        !          1005: % End:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>