# ox_pari

### August 27, 2020.

by Risa/Asir committers

 [ << ] [ < ] [上] [ > ] [ >> ] [冒頭] [目次] [見出し] [ ? ]

The ox_pari is an OpenXM server for the number theory system pari. Pari functions can be called as

```pari(function name, argument 1, ...);
```

The function names which can be called by the OpenXM are listed in the next chapter.

Pari/gp is a system for the number theory developed at Bordeaux university. See the following web page.

 [ << ] [ < ] [上] [ > ] [ >> ] [冒頭] [目次] [見出し] [ ? ]

# 2 ox_pari functions

 [ << ] [ < ] [上] [ > ] [ >> ] [冒頭] [目次] [見出し] [ ? ]

## 2.1 `ox_pari`

pari(func,arg1,arg2, ...)

:: Call the pari function func.

return

Result by the pari function.

argn

Argument for the pari function.

• ox_pari server starts automatically when the user calls the pari function first time. The number number can be obtained by ctrl("oxpari_id") or ox_get_serverinfo(). In order to interrupt ox_pari or shutdown ox_pari, use ox_reset(server number) and ox_shutdown(server number) respectively. As to these functions, refer to the Risa/Asir manual (see, e.g., documents of http://www.openxm.org).
• pari library functions are described in https://pari.math.u-bordeaux.fr/dochtml/html/
• The pari library listed below can be called from Risa/Asir. Note that names of library functions are sometimes different with gp function names.
```/* type=1 : one num/poly/mat arg */
/* type=2 : 1starg=num/poly/mat arg, 2ndarg=0(flag) */

struct parif parif_tab[] = {
/* (ulong)allocatemoremem(ulong) */
{"allocatemem",(GEN (*)())allocatemoremem,0},
/* num/num */
{"abs",gabs,1},
{"erfc",gerfc,1},
{"arg",garg,1},
{"isqrt",racine,1},
{"gamma",ggamma,1},
{"zeta",gzeta,1},
{"floor",gfloor,1},
{"frac",gfrac,1},
{"imag",gimag,1},
{"conj",gconj,1},
{"ceil",gceil,1},
{"isprime",gisprime,2},
{"bigomega",gbigomega,1},
{"denom",denom,1},
{"numer",numer,1},
{"lngamma",glngamma,1},
{"logagm",glogagm,1},
{"classno",classno,1},
{"dilog",dilog,1},
{"disc",discsr,1},
{"discf",discf,1},
{"nextprime",nextprime,1},
{"eintg1",eint1,1},
{"eta",eta,1},
{"issqfree",gissquarefree,1},
{"issquare",gcarreparfait,1},
{"gamh",ggamd,1},
{"hclassno",classno3,1},

/* num/array */
{"binary",binaire,1},
{"factorint",factorint,2},
{"factor",Z_factor,1},
{"cf",gcf,1},
{"divisors",divisors,1},
{"smallfact",smallfact,1},

/* poly/poly */
{"centerlift",centerlift,1},
{"content",content,1},

/* poly/array */
{"galois",galois,1},
{"roots",roots,1},
{"factpol",factpol,1},

/* mat/mat */
{"lll",lll,1},
{"lllgen",lllgen,1},
{"lllgram",lllgram,1},
{"lllgramgen",lllgramgen,1},
{"lllgramint",lllgramint,1},
{"lllgramkerim",lllgramkerim,1},
{"lllgramkerimgen",lllgramkerimgen,1},
{"lllint",lllint,1},
{"lllkerim",lllkerim,1},
{"lllkerimgen",lllkerimgen,1},
{"trans",gtrans,1},
{"eigen",eigen,1},
{"hermite",hnf,1},
{"mat",gtomat,1},
{"matrixqz2",matrixqz2,1},
{"matrixqz3",matrixqz3,1},
{"hess",hess,1},
{"ker",ker,1},
{"keri",keri,1},
{"kerint",kerint,1},
{"kerintg1",kerint1,1},

/* mat/poly */
{"det",det,1},
{"det2",det2,1},

/* not examined yet */
{"image",image,1},
{"image2",image2,1},
{"indexrank",indexrank,1},
{"indsort",indexsort,1},
{"initalg",initalg,1},
{"isfund",gisfundamental,1},
{"ispsp",gispsp,1},
{"jacobi",jacobi,1},
{"jell",jell,1},
{"length",(GEN(*)())glength,1},
{"lexsort",lexsort,1},
{"lift",lift,1},
{"lindep",lindep,1},
{"modreverse",polymodrecip,1},
{"mu",gmu,1},
{"norm",gnorm,1},
{"norml2",gnorml2,1},
{"numdiv",numbdiv,1},
{"omega",gomega,1},
{"order",order,1},
{"ordred",ordred,1},
{"phi",phi,1},
{"pnqn",pnqn,1},
{"primroot",gener,1},
{"psi",gpsi,1},
{"recip",polrecip       ,1},
{"redreal",redreal       ,1},
{"regula",regula  ,1},
{"reorder",reorder  ,1},
{"rhoreal",rhoreal       ,1},
{"sigma",sumdiv,1},
{"signat",signat,1},
{"simplify",simplify,1},
{"smith",smith,1},
{"smith2",smith2,1},
{"sort",sort,1},
{"sqr",gsqr,1},
{"sqred",sqred,1},
{"sqrt",gsqrt,1},
{"supplement",suppl,1},
{"trace",gtrace,1},
{"trunc",gtrunc,1},
{"unit",fundunit,1},
{"wf",wf,1},
{"wf2",wf2,1},
};
```

Example, finding Ker(P: Z^4 —> Z^2).

```pari(kerint,P=newmat(2,4,[[1,1,1],[0,1,3,4]]));
```

In order to find a description of kerint, please visit https://pari.math.u-bordeaux.fr/dochtml/html/ (the function name in gp is matkerint.)

ChangeLog

• The table is in OpenXM/src/ox_pari/pari_ftab.c

 [ << ] [ < ] [上] [ > ] [ >> ] [冒頭] [目次] [見出し] [ ? ]

# Index

移動: P
見出し一覧 項 `pari` 2.1 `ox_pari`
移動: P

 [冒頭] [目次] [見出し] [ ? ]

# 目次

 [冒頭] [目次] [見出し] [ ? ]

# 簡略化した目次

 [冒頭] [目次] [見出し] [ ? ]

# この文書について

この文書は6月 5, 2023texi2html 5.0を用いて生成されました。

ナビゲーションパネル中のボタンには以下の意味があります。

ボタン 名称 移動先 1.2.3項からの移動先
[ << ] FastBack Beginning of this chapter or previous chapter 1
[ < ] Back Previous section in reading order 1.2.2
[上] Up Up section 1.2
[ > ] Forward Next section in reading order 1.2.4
[ >> ] FastForward Next chapter 2
[冒頭] 冒頭 Cover (top) of document
[見出し] 見出し 見出し

では、以下に示す構造を持つ文書の1.2.3項を現在位置に仮定しています。

• 1. 第1項
• 1.1 第1.1項
• ...
• 1.2 第1.2項
• 1.2.1 第1.2.1項
• 1.2.2 第1.2.2項
• 1.2.3 第1.2.3項     <== 現在位置
• 1.2.4 第1.2.4項
• 1.3 第1.3項
• ...
• 1.4 第1.4項

この文書は6月 5, 2023texi2html 5.0を用いて生成されました。