GKZ hypergeometric system
Pfaﬃan system (Pfaﬀ equation), contiguity relations, cohomology intersection
Version 1.0
February 13, 2022

by S-J. Matsubara-Heo, N.Takayama

c Risa/Asir committers 2004--2020. All rights reserved.
Copyright ⃝1

1 About this document
This document explains Risa/Asir functions for GKZ hypergeometric system(A-hypergeometric system).
Loading the package:
import("mt_gkz.rr");
References cited in this document.
• [MT2020] Saiei-Jaeyeong Matsubara-Heo, Nobuki Takayama, Algorithms for Pfaﬃan
Systems and Cohomology Intersection Numbers of Hypergeometric Integrals, Lecture
Notes in Computer Science 12097 (2020), 73--84. Errata is posted on http://arxiv.
org/abs/???. E-attachments can be obtainable at http://www.math.kobe-u.ac.jp/
OpenXM/Math/intersection2• [GM2020] Yoshiaki Goto, Saiei-Jaeyeong Matsubara-Heo, Homology and cohomology
intersection numbers of GKZ systems, arXiv:2006.07848• [SST1999] M.Saito, B.Sturmfels, N.Takayama, Hypergeometric polynomials and integer
programming, Compositio Mathematica, 155 (1999), 185--204• [SST2000] M.Saito, B.Sturmfels, N.Takayama, Groebner Deformations of Hypergeometric Diﬀerential Equations. Springer, 2000.
References for maple packages IntegrableConnections and OreMorphisms.
• [BCEW] M.Barkatou, T.Cluzeau, C.El Bacha, J.-A.Weil, IntegrableConnections
a maple package for computing closed form solutions of integrable connections(2012). https://www.unilim.fr/pages perso/thomas.cluzeau/Packages/
IntegrableConnections/PDS.html• [CQ] T.Cluzeau and A.Quadrat, OreMorphisms: A homological algebraic package forfactoring, reducing and decomposing linear functional systems (2009). https://who.
rocq.inria.fr/Alban.Quadrat/OreMorphisms/index.html• [CQ08] T.Cluzeau, A.Quadrat, Factoring and decomposing a class of linear functional
systems, Linear Algebra and its Applications (LAA), 428(1): 324-381, 2008.

2

2 Pfaﬀ equation
2.1 Pfaﬀ equation for given cocycles
2.1.1 mt_gkz.pfaff_eq
mt_gkz.pfaff_eq(A,Beta,Ap,Rvec,DirX):: It returns the Pfaﬀ equation for the GKZ system deﬁned by A and Beta withrespect to cocycles deﬁned by Rvec.
returna list of coeﬃcients of the Pfaﬀ equation with respect to the direction DirXA

the matrix A of the GKZ system.

Beta

the parameter vector of the GKZ system.

Ap

See [MT2020].

Rvec

It is used to specify a basis of cocycles as explained below. See also [MT2020].

DirX
a list of dxi’s.
• The independent variables are x1, x2, x3, ...
• When Rvec=[v 1, v 2, ..., v r] where r is the rank of the GKZ system, the set of thecocycles standing for Av 1, Av 2, ..., Av r (see [MT2020]) is supposed to be the basis
tothe Pfaﬃan system. The exponents (qℓ , q) of the integral representation∫ ∏constructℓ q dxh−qxis shifted by Av i=: Avi as (qℓ , q) + Avi . Let a 1, a 2, ..., a n be theℓxcolumn vectors of the matrix A and v be a column vector (x 1, x 2, ..., x n)^T. Av isdeﬁned as a 1 x 1 + a 2 x 2 + ... + a n x n.
• When the columns of A are expressed as ei ⊗ αij , the columns of Ap is ei ⊗ 0 where$e i$ is the i-th unit vector. See [MT2020] on the deﬁnition of Ap. Here are someexamples. When A is[[1,1,0,0],[0,0,1,1],[0,1,0,1]]
Ap is[[1,1,0,0],[0,0,1,1],[0,0,0,0]] <-- zero row
When A is[[1,1,1,0,0,0],[0,0,0,1,1,1],[0,1,0,0,1,0],[0,0,1,0,0,1]]
Ap is[[1,1,1,0,0,0],[0,0,0,1,1,1],

Chapter 2: Pfaﬀ equation

3[0,0,0,0,0,0], <-- zero row[0,0,0,0,0,0] <-- zero row]
See also page 223 of [SST2000].
• Option xrule. When the option xrule is given, the x variables speciﬁed by this option
are specialized to numbers.
• Option shift. When the matrix A is not normal (the associated toric ideal is notnormal), a proper shift vector must be given to obtain an element of the b-ideal. Or,
use the option b ideal below. See [SST1999] on the theory.
• Option b ideal. When the matrix A is not normal, the option b_ideal=1 obtains
b-ideals and the ﬁrst element of each b-ideal is used as the b-function. The option shift
is ignored.
• Option cg. A constant matrix given by this option is used for the Gauge transformationof the Pfaﬃan system. In other words, the basis of cocycles speciﬁed by Rvec istransformed by the constant matrix given by this option.
• By mt gkz.use hilbert driven(Rank), the rank of the GKZ system is assumed to be
Rank. It makes the computation of Groebner basis by yang.rr faster. This option isdisabled by mt gkz.use hilbert driven(0);Example: Gauss hypergeometric system, see [GM2020] example ??.
[1883] import("mt_gkz.rr");[2657] PP=mt_gkz.pfaff_eq(A=[[1,1,0,0],[0,0,1,1],[0,1,0,1]],
Beta=[-g1,-g2,-c],
Ap = [[1,1,0,0],[0,0,1,1],[0,0,0,0]],Rvec = [[1,0,0,0],[0,0,1,0]],
DirX=[dx4,dx3] | xrule=[[x1,1],[x2,1]],
cg=matrix_list_to_matrix([[1,0],[-1,1]]))$
Bfunctions=[s_1*s_2-s_1*s_3+s_1^2,s_1*s_3,s_2^2+(-s_3+s_1)*s_2,s_3*s_2]-- snip -[2658] PP[0];[ (g2*x3-g2)/(x4-x3) (g2*x3)/(x4-x3) ][ ((-g2*x3-c+g2)*x4+(c-g1)*x3+g1)/(x4^2-x3*x4)((-g2*x3-c)*x4+(c-g1)*x3)/(x4^2-x3*x4) ][2659] PP[1];[ (-g2*x4+g2)/(x4-x3) (-g2*x4)/(x4-x3) ][ ((g2*x3+c-g2-1)*x4+(-c+g1+1)*x3-g1)/(x3*x4-x3^2)((g2*x3+c-g2-1)*x4+(-c+g1+g2+1)*x3)/(x3*x4-x3^2) ]Example: The role of shift. When the toric ideal is not normal, a proper shift vector
must be given with the option shift to ﬁnd an element of the b-ideal.
[1882] load("mt_gkz.rr");[1883] A=[[1,1,1,1],[0,1,3,4]];[[1,1,1,1],[0,1,3,4]]

Chapter 2: Pfaﬀ equation

4[1884] Ap=[[1,1,1,1],[0,0,0,0]];[[1,1,1,1],[0,0,0,0]][1885] Rvec=[[0,0,0,0],[0,0,1,0],[0,0,0,1],[0,0,0,2]];[[0,0,0,0],[0,0,1,0],[0,0,0,1],[0,0,0,2]];[2674] P=mt_gkz.pfaff_eq(A,[b1,b2],Ap,Rvec,DirX=[dx4]| xrule=[[x1,1],[x2,2],[x3,4]] )$dx remains
stopped in step_up at line 342 in file "./mt_gkz/saito-b.rr"
342
if (type(dn(Ans)) > 1) error("dx remains");(debug) quit// Since the toric ideal for A is not normal, it stops with the error.
[2675] P=mt_gkz.pfaff_eq(A,[b1,b2],Ap,Rvec,DirX=[dx4]| shift=[1,0],xrule=[[x1,1],[x2,2],[x3,4]])$// It works.
Refer to⟨undeﬁned⟩ [mt gkz.ﬀ1], page ⟨undeﬁned⟩, ⟨undeﬁned⟩ [mt gkz.ﬀ2], page ⟨undeﬁned⟩, Section 2.1.2 [mt gkz.ff], page 4, Section 2.1.3 [mt gkz.rvec to fvec],
page 5,2.1.2 mt_gkz.ff2, mt_gkz.ff1, mt_gkz.ff
mt_gkz.ff(Rvec0,A,Ap,Beta)
mt_gkz.ff1(Rvec0,A,Beta,Ap)
mt_gkz.ff2(Rvec0,A,Beta,Ap,BF,C):: ff returns a diﬀerential operator whose action to 1 gives the cocycle deﬁned
by Rvec0
returnff returns a diﬀerential operator whose action to 1 of MA (β) gives the cocycledeﬁned by Rvec0.

returnff1 returns a composite of step-down operators for the positive part of Rvec0

returnff2 returns a composite of step-up operators for the positive part of Rvec0

Rvec0

An element of Rvec explained in Section 2.1.1 [mt gkz.pfaﬀ eq], page 2.

BF

the list of b-functions to all directions.

Cthe list of the step up operators for all a 1, a 2, ..., a n.
Other arguments are same with those of pfaff_eq.
• The function ff generates the list of b-functions and the list of step up operators andstore them in the cache variable. They can be obtained by calling as S=mt_gkz.get_bf_
step_up() where S[0] is the list of b-functions and S[1] is the list of step up operators.
Step up operators are obtained by the algorithm given in [SST1999].
• Option nf. When nf=1, the output operator is reduced to the normal form with respect
to the Groebner basis of the GKZ system of the graded reverse lexicographic order.
• Option shift. See Section 2.1.1 [mt gkz.pfaﬀ eq], page 2.
• Internal info: The function mt_gkz.bb gives the constant so that the step up andstep down operators (contiguity operators) give contiguity relations for the integral
representation in [MT2020]. Note that mt_gkz.ff1 and mt_gkz.ff2 give contiguity
relations which are constant multiple of those for hypergeometric polynomials.

Chapter 2: Pfaﬀ equation

5• Internal info: mt_gkz.step_up generates step up operators of [SST1999] fromb-functions by utilizing mt_gkz.bf2euler and mt_gkz.toric.
Example: Step up operators compatible with the integral representation in [MT2020].
The function hgpoly res deﬁned in check-by-hgpoly.rr returns a multiple√ of the hypergeometric polynomial which agrees with the residue times a power of 2π −1 of the integral
representation. See [SST1999].
[1883] import("mt_gkz.rr")$[3175] load("mt_gkz/check-by-hgpoly.rr")$[3176] A=[[1,1,0,0],[0,0,1,1],[0,1,0,1]]$[3177] B=newvect(3,[5,4,7])$ Ap=[[1,1,0,0],[0,0,1,1],[0,0,0,0]]$[3179] Beta=[b1,b2,b3]$ R=[0,0,-1,0]$[3180] F2=hgpoly_res(A,B,2); // HG polynomial. 2 is the number of e_i’s.
10*x1^2*x2^3*x4^4+20*x1*x2^4*x3*x4^3+6*x2^5*x3^2*x4^2[3182] mt_gkz.ff(R,A,Ap,Beta); // the operator standing for R(x3*x4*dx4+x3^2*dx3+x1*x4*dx2+x1*x3*dx1+x3)/(b1+b2-b3+1)[3184] S=mt_gkz.get_bf_step_up(A); // b-function and non-reduced step up op’s[[ s_1*s_2-s_1*s_3+s_1^2 s_1*s_3 s_2^2+(-s_3+s_1)*s_2 s_3*s_2 ],[ x2*x3*dx4+x1*x3*dx3+x1*x2*dx2+x1^2*dx1+x1
x2*x4*dx4+x1*x4*dx3+x2^2*dx2+x1*x2*dx1+x2
x3*x4*dx4+x3^2*dx3+x1*x4*dx2+x1*x3*dx1+x3
x4^2*dx4+x3*x4*dx3+x2*x4*dx2+x2*x3*dx1+x4 ]][3185] Fvec=mt_gkz.ff2(R,A,Beta,Ap,S[0],S[1]);(x3*x4*dx4+x3^2*dx3+x1*x4*dx2+x1*x3*dx1+x3)/(b1+b2-b3+1)[3188] Fvec = base_replace(Fvec,assoc(Beta,vtol(B)));
1/3*x3*x4*dx4+1/3*x3^2*dx3+1/3*x1*x4*dx2+1/3*x1*x3*dx1+1/3*x3[3189] R32d = odiff_act(Fvec,F2,[x1,x2,x3,x4]); // Act Fvec to the hg-poly
10*x1^3*x2^2*x4^5+50*x1^2*x2^3*x3*x4^4+50*x1*x2^4*x3^2*x4^3+10*x2^5*x3^3*x4^2[3190] red(R32d/hgpoly_res(A,B+newvect(3,[0,1,0]),2));// R32d agrees with the HG polynomial with Beta=[5,4,7]+[0,1,0].
1Refer toSection 2.1.1 [mt gkz.pfaﬀ eq], page 2,

2.1.3 mt_gkz.rvec_to_fvec
mt_gkz.rvec_to_fvec(Rvec,A,Ap,Beta):: It returns a set of diﬀerential operators standing for Rvec.
returnIt returns a set of diﬀerential operators of which action to 1 ∈ MA (β) givecocycles speciﬁed by Rvec.

A, Ap, Beta
Same with Section 2.1.1 [mt gkz.pfaﬀ eq], page 2,• Internal info: this function builds the set of operators by calling Section 2.1.2[mt gkz.ff], page 4.
Example: The following two expressions are congruent because 2a1 − a2 − a3 + a4 = a1
for this A.
[1883] import("mt_gkz.rr");Chapter 2: Pfaﬀ equation

6[3191] mt_gkz.rvec_to_fvec([[2,-1,-1,1],[0,0,1,0]],[[1,1,0,0],[0,0,1,1],[0,1,0,1]],[[1,1,0,0],[0,0,1,1],[0,0,0,0]],[b1,b2,b3]);[(x2*x3*x4^2*dx1^2*dx4^3+((x1*x3*x4^2+x2*x3^2*x4)*dx1^2*dx3+(x1*x2*x4^2+x2^2*x3*x4)*dx1^2*dx2+(x1^2*x4^2+2*x1*x2*x3*x4+x2^2*x3^2)*dx1^3+(x1*x4^2+3*x2*x3*x4)*dx1^2)*dx4^2+(x1*x3^2*x4*dx1^2*dx3^2+((x1^2*x3*x4+x1*x2*x3^2)*dx1^3+(3*x1*x3*x4+x2*x3^2)*dx1^2)*dx3+x1*x2^2*x4*dx1^2*dx2^2+((x1^2*x2*x4+x1*x2^2*x3)*dx1^3+(3*x1*x2*x4+x2^2*x3)*dx1^2)*dx2+x1^2*x2*x3*dx1^4+(x1^2*x4+3*x1*x2*x3)*dx1^3+(x1*x4+x2*x3)*dx1^2)*dx4)/(b3*b2*b1^3+(b3*b2^2+(-b3^2-2*b3)*b2)*b1^2+(-b3*b2^2+(b3^2+b3)*b2)*b1),(dx3)/(b2)][3192] mt_gkz.rvec_to_fvec([[1,0,0,0],[0,0,1,0]],[[1,1,0,0],[0,0,1,1],[0,1,0,1]],[[1,1,0,0],[0,0,1,1],[0,0,0,0]],[b1,b2,b3]);[(dx1)/(b1),(dx3)/(b2)]Refer toSection 2.1.1 [mt gkz.pfaﬀ eq], page 2,

2.1.4 mt_gkz.fvec_to_conn_mat
mt_gkz.fvec_to_conn_mat(Fvec,A,Beta,DirX):: It returns the coeﬃcient matrices of the basis Fvec or DirX[I]*Fvec in termsof the set of the standard basis.
returnIt returns the coeﬃcient matrices of the basis Fvec or DirX[I]*Fvec in termsof the set of the standard basis of the Groebner basis explained below.

A BetaSame with Section 2.1.1 [mt gkz.pfaﬀ eq], page 2.

DirX

When DirX is 1, this function returns the matrix which expresses Fvec interms of the set of the standard monomials of the Groebner basis of the GKZ
system in the ring of rational function coeﬃcients with respect to the graded
reverse lexicographic order. In other cases, it returns the coeﬃcient matrices of
DirX[I]’s*Fvec in terms of the set of the standard basis of the Groebner basis.

• It utilizes a Groebner basis computation by the package yang.rr and yang.reduction
to obtain connection matrices.
• This function calls some utility functions mt_gkz.dmul(Op1,Op2,XvarList) (multiplication of Op1 and Op2 and mt_gkz.index_vars(x,Start,End | no_=1) which generates indexed variables without the underbar “ ”.
• We note here some other utility functions in this section: mt_gkz.check_compatibility(P,Q,X,Y), which checkes if the sytem d/dX-P, d/dY-Q is
compatible.
Example: The following example illustrates how mt gkz.pfaﬀ eq obtains connection matrices.
[1883] import("mt_gkz.rr");[3201] V=mt_gkz.index_vars(x,1,4 | no_=1);[x1,x2,x3,x4]

Chapter 2: Pfaﬀ equation

7[3202] mt_gkz.dmul(dx1,x1^2,V);
x1^2*dx1+2*x1[3204] A=[[1,1,0,0],[0,0,1,1],[0,1,0,1]]$
Ap=[[1,1,0,0],[0,0,1,1],[0,0,0,0]]$
Beta= [b1,b2,b3]$
Rvec = [[1,0,0,0],[0,0,1,0]]$Fvec = mt_gkz.rvec_to_fvec(Rvec,A,Ap,Beta)$/* Express cocyles Rvec
by elements Fvec in the Weyl algebra by contiguity relations. */Cg = matrix_list_to_matrix([[1,0],[1,-1]])$[3208] NN=mt_gkz.fvec_to_conn_mat(Fvec,A,Beta,1);// Express Fvec by the standard monomials Std=NN[1].
1 ooo 2 .ooo[[ (x4)/(b1*x1) (b1-b3)/(b1*x1) ][ (-x4)/(b1*x2) (1)/(x3) ],[dx4,1]][3209] Std=NN[1];[dx4,1][3173] NN=NN[0];[ (x4)/(b1*x1) (b1-b3)/(b1*x1) ][ (-x4)/(b2*x3) (1)/(x3) ][3174] NN1=mt_gkz.fvec_to_conn_mat(Fvec,A,Beta,dx1)[0];// Express dx1*Fvec by the standard monomials Std.
1 ooo 2 .ooo
[ ((2*b1+b2-b3-1)*x1*x4^2+(-b1+b3+1)*x2*x3*x4)/(b1*x1^3*x4-b1*x1^2*x2*x3)((b1^2+(-2*b3-1)*b1-b3*b2+b3^2+b3)*x1*x4+(-b1^2+(2*b3+1)*b1-b3^2-b3)*x2*x3)/(b1*x1^3*x4-b1*x1^2*x2*x3) ][(b1 (-b1*x1*x4^2-b2*x2*x3*x4)/(b2*x1^2*x3*x4-b2*x1*x2*x3^2)(b1*x1*x4+(-b1+b3)*x2*x3)/(x1^2*x3*x4-x1*x2*x3^2) ][3188] P1=map(red,Cg*NN1*matrix_inverse(NN)*matrix_inverse(Cg));[ ((-b2*x3+(b1+b2-b3-1)*x1)*x4+(-b1+b3+1)*x2*x3)/(x1^2*x4-x1*x2*x3)(b2*x3*x4)/(x1^2*x4-x1*x2*x3) ][ ((-b2*x3+(b2-b3-1)*x1)*x4+(-b1+b3+1)*x2*x3+b1*x1*x2)/(x1^2*x4-x1*x2*x3)((b2*x3+b1*x1)*x4)/(x1^2*x4-x1*x2*x3) ][3191] mt_gkz.pfaff_eq(A,Beta,Ap,Rvec,[dx1]|cg=Cg)[0]-P1;[ 0 0 ]
[ 0 0 ] // P1 agrees with the output of mt_gkz.pfaff_eq.
Refer toSection 2.1.1 [mt gkz.pfaﬀ eq], page 2,

2.1.5 mt_gkz.contiguity, mt_gkz.contiguity_by_fvec
mt_gkz.contiguity(A,Beta,Ap,Rvec1,Rvec2):: It returns the coeﬃcient matrix P that satisﬁes Rvec1 = P Rvec2.
mt_gkz.contiguity_by_fvec(A,Beta,Ap,Fvec1,Fvec2):: It returns the coeﬃcient matrix P that satisﬁes Fvec1 = P Fvec2.
returnThe coeﬃcient matrix P that satisﬁes Rvec1 = P Rvec2 or Fvec1=P Fvec2

Chapter 2: Pfaﬀ equation

8

A Beta Ap Rvec1 Rvec2
Same with Section 2.1.1 [mt gkz.pfaﬀ eq], page 2.
• It returns the contiguity relation between Rvec1 and Rvec2
Example:[1883] import("mt_gkz.rr");[3200] PP=mt_gkz.contiguity(A=[[1,1,0,0],[0,0,1,1],[0,1,0,1]],
Beta=[-g1,-g2,-c],
Ap = [[1,1,0,0],[0,0,1,1],[0,0,0,0]],
Rvec1 = [[1,0,0,0],[0,0,1,0]],
Rvec2 = [[0,0,1,0],[1,0,0,0]]);[3366] Fvec411=mt_gkz.rvec_to_fvec(Rvec411=[[1,1,0]],
A=[[1,1,1],[1,0,1],[0,1,1]],
Ap=[[1,1,1],[0,0,0],[0,0,0]],
Beta=[eps,-eps*del,-eps*del])$Fvec411d=[mt_gkz.dmul(dx1,Fvec411[0],[x1,x2,x3])];[(dx1^2*dx2)/(eps^2-eps)][3367] mt_gkz.contiguity_by_fvec(A,Beta,Ap,Fvec411d,Fvec411);
1 .ooo[ ((del+1)*eps-1)/(x1) ]Refer toSection 2.1.1 [mt gkz.pfaﬀ eq], page 2, Section 2.1.4 [mt gkz.fvec to conn mat],page 6,9

3 b function
3.1 b function and facet polynomial
3.1.1 mt_gkz.bf
mt_gkz.bf(A,Facet_poly,II0):: It returns the b-function with respect to the direction II0.
returnIt returns the b-function introduced Saito with respect to the direction II0 in
case of A is normal or an element of b-ideal when a proper shift vector is given
in case of A is not normal.

A

the matrix A of the GKZ system.

Facet poly
The set of facet polynomials of the convex hull of A.
II0
Direction expressed as 0, 1, 2, ... (not 1, 2, 3, ...) to obtain the b function.
• See [SST1999] on the b-function introduced Saito and b-ideal.
• The facet polynomial must be primitive.
Example:[1883] import("mt_gkz.rr");[3193] A;[[1,1,0,0],[0,0,1,1],[0,1,0,1]][3194] Fpoly=mt_gkz.facet_poly(A);[[s_3,s_1,s_2-s_3+s_1,s_2],[[0,0,1],[1,0,0],[1,1,-1],[0,1,0]]][3196] mt_gkz.bf(A,Fpoly,0);s_1*s_2-s_1*s_3+s_1^2[3197] mt_gkz.bf(A,Fpoly,1);s_1*s_3
Refer toSection 2.1.2 [mt gkz.ff], page 4, ⟨undeﬁned⟩ [mt gkz.facet poly], page ⟨undeﬁned⟩,

3.1.2 mt_gkz.facet_poly
mt_gkz.facet_poly(A):: It returns the set of facet polynomials and their normal vectors of the conedeﬁned by A.
returnA

It returns the set of facet polynomials and their normal vectors of the cone
generated by the column vectors of the matrix A.

the matrix A of the GKZ system.
• The facet polynomial f is primitive. In other words, all f(a i) is integer and min f(a i)=1
for a i’s not being on f=0. where a i is the i-th column vector of the matrix A. It canbe checked by mt_gkz.is_primitive(At,Facets) where At is the transpose of A andFacets is the second return value of this function.

Chapter 3: b function• This function utilizes the system polymake https://polymake.org on our server.
Example:[1883] import("mt_gkz.rr");[1884] mt_gkz.facet_poly([[1,1,1,1],[0,1,2,3]]);oohg_native=0, oohg_curl=1[[s_2,-s_2+3*s_1],[[0,1],[3,-1]]]
Refer toSection 3.1.1 [mt gkz.bf], page 9,

10

11

4 Utilities
4.1 Some utility functions
We only show examples on these functions. As for details, please see the source code.
[1883] import("mt_gkz.rr");[2667] mt_gkz.dvar([x1,x2]); // it generates variables starting with d[dx1,dx2][2669] mt_gkz.p_true_nf_rat((1/3)*x^3-1,[x^2-1],[x],0);[x-3,3]// p_true_nf does not accept rational number coefficients[2670] A=[[1,1,1,1],[0,1,3,4]];[[1,1,1,1],[0,1,3,4]][2671] mt_gkz.reduce_by_toric(dx3^4,A);
dx1*dx4^3// reduction by toric ideal defined by A
[2672] nk_toric.toric_ideal(A);[-x1*x4+x2*x3,-x2*x4^2+x3^3,x2^2*x4-x1*x3^2,-x1^2*x3+x2^3][2673] mt_gkz.yang_gkz_buch(A,[b1,b2]); // Groebner basis of GKZ system by yang.rr
1 o 2 ..o 3 ..oooooooo 4 o 6 ooo 9 o[[[(x2)*<<0,1,0,0>>+(3*x3)*<<0,0,1,0>>+ ---snip ---*<<0,0,0,0>>,1]],[dx1,dx2,dx3,dx4],[(1)*<<0,0,0,2>>,(1)*<<0,0,1,0>>,(1)*<<0,0,0,1>>,(1)*<<0,0,0,0>>]][2674] mt_gkz.dp_op_to_coef_vec([x1*<<1,0>>+x1*x2*<<0,1>>,x1+1],[<<1,0>>,<<0,1>>]);// x1+1 is the denominator[ (x1)/(x1+1) (x1*x2)/(x1+1) ][2675] mt_gkz.tk_base_is_equal([1,2],[1,2]);
1[2676] mt_gkz.tk_base_is_equal([1,2],[1,x,y]);0[2677] mt_gkz.mdiff(sin(x),x,1);cos(x)[2678] mt_gkz.mdiff(sin(x),x,2); //2nd derivative-sin(x)[3164] mt_gkz.ord_xi(V=[x1,x2,x3],II=1);// matrix to define graded lexicographic order so that V[II] is the smallest.
[ 1 1 1 ][ 0 -1 0 ][ -1 0 0 ][3166] load("mt_gkz/check-by-hgpoly.rr");[3187] check_0123(); // check the pfaffian for the A below by hg-polynomial.
A=[[1,1,1,1],[0,1,2,3]]
Ap=[[1,1,1,1],[0,0,0,0]]--- snip --Bfunctions= --- snip --0 (vector) is expected:[[ 0 0 0 ],[ 0 0 0 ]]

12[3188] mt_gkz.get_check_fvec();// get the basis of cocycles used in terms of differential operators.
[1,(dx4)/(b1),(dx4^2)/(b1^2-b1)][3189] mt_gkz.clear_bf();0[3190] mt_gkz.get_bf_step_up(A=[[1,1,1,1],[0,1,2,3]]);// b-functions and step-up operators.
// Option b_ideal=1 or shift=... may be used for non-normal case.
[[ -s_2^3+(9*s_1-3)*s_2^2+ ---snip---s_2^3+(3*s_1+1)*s_2^2-3*s_1*s_2 s_2^3-3*s_2^2+2*s_2 ],[ x3^3*dx4^2+ ---snip--3*x3^2*x4*dx4^2+ --- snip---]][3191] mt_gkz.mytoric_ideal(0 | use_4ti2=1);// 4ti2 is used to obtain a generator set of the toric ideal// defined by the matrix A[3192] mt_gkz.mytoric_ideal(0 | use_4ti2=0);// A slower method is used to obtain a generator set of the toric ideal// defined by the matrix A. 4ti2 is not needed. Default.
[3193] mt_gkz.cbase_by_euler(A=[[1,1,1,1],[0,1,3,4]]);// Cohomology basis of the GKZ system defined by A for generic beta.
// Basis is given by a set of Euler operators.
// It is an implementation of the algorithm in http://dx.doi.org/10.1016/j.aim.2016.10.
// beta is set by random numbers. Option: no_prob=1

13

5 Cohomology intersection numbers
5.1 Secondary equation
5.1.1 mt_gkz.kronecker_prd
mt_gkz.kronecker_prd(A,B):: It returns the Kronecker product of A and B.
returna matrix which is equal to the Kronecker product of A and B (https://en.
wikipedia.org/wiki/Kronecker_product).

A,B

list
[2644] A=[[a,b],[c,d]];[[a,b],[c,d]][2645] B=[[e,f],[g,h]];[[e,f],[g,h]][2646] mt_gkz.kronecker_prd(A,B);[ e*a f*a e*b f*b ][ g*a h*a g*b h*b ][ e*c f*c e*d f*d ][ g*c h*c g*d h*d ]5.1.2 mt_gkz.secondary_eq
mt_gkz.secondary_eq(A,Beta,Ap,Rvec,DirX):: It returns the secondary equation with respect to cocycles deﬁned by Rvec.
returna list of coeﬃcients of the Pfaﬃan system corresponding to the secondary equation (cf. equation (8) of [MT2020]).

A,Beta,Ap,Rvec,DirX
see pfaff_eq• The secondary equation is originally a Pfaﬃan system for an unkwon r by r matrix I
with r =length(Rvec). We set Y = (I11 , I12 , ..., I1r , I21 , I22 , ...)T . Then, the secondarydYequation can be seen as a Pfaﬃan system dx= Ai Y with DirX={dxi }i . The functioni
mt gkz.secondary eq(A,Beta,Ap,Rvec,DirX ) outputs a list obtained by aligning thematrices Ai .
• Let F := (ωi )i be a column vector whose entries are given by the cohomology classes
speciﬁed by entries of Rvec. Then, pfaff_eq computes the Pfaﬃan matrices Pi sodF
that dx= Pi F . If Qi denotes the matrix obtained by replacing Beta by -Beta, weihave Ai =mt_gkz.kronecker_prd(E,Pi )+mt_gkz.kronecker_prd(Qi ,E) where E is theidentity matrix of size length(Rvec).
• Options xrule, shift, b ideal,cg. Same as pfaff_eq.
Example:[2647] Beta=[b1,b2,b3]$[2648] DirX=[dx1,dx4]$

Chapter 5: Cohomology intersection numbers

14[2649] Rvec=[[1,0,0,0],[0,0,1,0]]$[2650] A=[[1,1,0,0],[0,0,1,1],[0,1,0,1]]$[2651] Ap=[[1,1,0,0],[0,0,1,1],[0,0,0,0]]$[2652] Xrule=[[x2,1],[x3,1]]$[2653] P=mt_gkz.secondary_eq(A,Beta,Ap,Rvec,DirX|xrule=Xrule)$--snip-[2654] length(P);2[2655] P[0];[[(-2*x1^3*x4^2+4*x1^2*x4-2*x1)/(x1^4*x4^2-2*x1^3*x4+x1^2),(b2*x4)/(x1^2*x4-x1),(-b2*x4)/(x1^2*x4-x1),0],[(b1)/(x1*x4-1),((b2-4/3)*x1^2*x4^2+(-b1-b2+8/3)*x1*x4+b1-4/3)/(x1^3*x4^2-2*x1^2*x4+x1),0,(-b2*x4)/(x1^2*x4-x1)],[(-b1)/(x1*x4-1),0,((-b2-2/3)*x1^2*x4^2+(b1+b2+4/3)*x1*x4-b1-2/3)/(x1^3*x4^2-2*x1^2*x4+x1),(b2*x4)/(x1^2*x4-x1)],[0,(-b1)/(x1*x4-1),(b1)/(x1*x4-1),0]]<--- Paffian matrix in x1 direction.
[2656] P[1];[[0,(b2)/(x1*x4-1),(-b2)/(x1*x4-1),0],[(b1*x1)/(x1*x4^2-x4),((b2-1/3)*x1^2*x4^2+(-b1-b2+2/3)*x1*x4+b1-1/3)/(x1^2*x4^3-2*x1*x4^2+x4),0,(-b2)/(x1*x4-1)],[(-b1*x1)/(x1*x4^2-x4),0,((-b2+1/3)*x1^2*x4^2+(b1+b2-2/3)*x1*x4-b1+1/3)/(x1^2*x4^3-2*x1*x4^2+x4),(b2)/(x1*x4-1)],[0,(-b1*x1)/(x1*x4^2-x4),(b1*x1)/(x1*x4^2-x4),0]]<--- Paffian matrix in x4 direction.
Refer toSection 2.1.1 [mt gkz.pfaﬀ eq], page 2,

5.1.3 mt_gkz.generate_maple_file_IC
mt_gkz.generate_maple_file_IC(A,Beta,Ap,Rvec,DirX):: It returns the maple input for a solver of a Pfaﬃan system IntegrableConnections[RationalSolutions].
returna maple input ﬁle for the function IntegrableConnections[RationalSolutions] (cf.
[BCEW]) for the Pfaﬃan system mt gkz.secondary eq(A,Beta,Ap,Rvec,DirX).

A,Beta,Ap,Rvec,DirX
see pfaff_eq.
• A maple package IntegrableConnections is available in [BCEW]. In order to use IntegrableConnections, you need to add the global path to the ﬁle IntegrableConnections.m
to libname on maple. See [BCEW].
• If Beta contains unkwon variables, they are regarded as generic parameters. For example, if Beta=[b1,b2,1/5,1/7,b5,...], parameters are [b1,b2,b5,...].
• Options xrule, shift, b ideal,cg. Same as pfaff_eq.
• Option ﬁlename. You can specify the ﬁle name by specifying the option variableﬁlename. If you do not specify it, generate_maple_file_IC generates a ﬁle"auto-generated-IC.ml".
Example:[2681] Beta=[b1,b2,1/3]$

Chapter 5: Cohomology intersection numbers

15[2682] DirX=[dx1,dx4]$[2683] Rvec=[[1,0,0,0],[0,0,1,0]]$[2684] A=[[1,1,0,0],[0,0,1,1],[0,1,0,1]]$[2685] Ap=[[1,1,0,0],[0,0,1,1],[0,0,0,0]]$[2687] Xrule=[[x2,1],[x3,1]]$[2688] mt_gkz.generate_maple_file_IC(A,Beta,Ap,Rvec,DirX|xrule=Xrule,filename="Test.ml"//A file named Test.ml is automatically generated as follows:

with(OreModules);with(IntegrableConnections);
with(linalg);
C:=[Matrix([[(-2*x1^3*x4^2+4*x1^2*x4-2*x1)/(x1^4*x4^2-2*x1^3*x4+x1^2),(b2*x4)/(x1^2*x4-x1),(-b2*x4)/(x1^2*x4-x1),0],[(b1)/(x1*x4-1),((b2-4/3)*x1^2*x4^2+(-b1-b2+8/3)*x1*x4+b1-4/3)/(x1^3*x4^2-2*x1^2*x4+x1),0,(-b2*x4)/(x1^2*x4-x1)],[(-b1)/(x1*x4-1),0,((-b2-2/3)*x1^2*x4^2+(b1+b2+4/3)*x1*x4-b1-2/3)/(x1^3*x4^2-2*x1^2*x4+x1),(b2*x4)/(x1^2*x4-x1)],[0,(-b1)/(x1*x4-1),(b1)/(x1*x4-1),0]]),Matrix([[0,(b2)/(x1*x4-1),(-b2)/(x1*x4-1),0],[(b1*x1)/(x1*x4^2-x4),((b2-1/3)*x1^2*x4^2+(-b1-b2+2/3)*x1*x4+b1-1/3)/(x1^2*x4^3-2*x1*x4^2+x4),0,(-b2)/(x1*x4-1)],[(-b1*x1)/(x1*x4^2-x4),0,((-b2+1/3)*x1^2*x4^2+(b1+b2-2/3)*x1*x4-b1+1/3)/(x1^2*x4^3-2*x1*x4^2+x4),(b2)/(x1*x4-1)],[0,(-b1*x1)/(x1*x4^2-x4),(b1*x1)/(x1*x4^2-x4),0]])];
RatSols:=RationalSolutions(C,[x1,x4],[’param’,[b1,b2]]);/*
If you run the output file on maple, you obtain a rational solution of
the secondary equation.
*/[b2*(3*b1-1)/(b1*x1^2)]
RatSols:=[3*b2/x1][3*b2/x1][3*b2-1]/*
Note that the 4 entries of this vector correspond to entries of a 2 by 2 matrix.
They are aligned as (1,1), (1,2), (2,1) (2,2) from the top.
*/

Refer toSection 2.1.1 [mt gkz.pfaﬀ eq], page 2,

Chapter 5: Cohomology intersection numbers

16

5.1.4 mt_gkz.generate_maple_file_MR
mt_gkz.generate_maple_file_MR(A,Beta,Ap,Rvec,DirX,D1,D2):: It returns the maple input for a solver of a Pfaﬃan system MorphismsRat[OreMorphisms].
returna maple input ﬁle for the function MorphismsRat[OreMorphisms] (cf. [CQ]) for
the Pfaﬃan system obtained by secondary_eq. If you run the output ﬁle onmaple, you obtain a rational solution of the secondary equation.

A,Beta,Ap,Rvec,DirX
see pfaff_eq.
D1,D2

Positive integers. D1 (resp. D2) is the upper bound of the degree of thenumerator (resp. denominator) of the solution.
• We use the same notation as the explanation of generate_maple_file_IC. Let D
denote the ring of linear diﬀerential operators with
coeﬃecients in the ﬁeld of rational∑1×lfunctions.
We consider D-modules R := D / dxi ∈DirX D1×l (∂i E − Pi ) and S :=∑1×l
D / dxi ∈DirX D1×l (∂i E + QTi ) where l =length(Rvec). Then, computing a rational
solution of the secondary equation is equivalent to computing a D-morphism from R
to S represented by rational function matrix (cf. pp12-13 of [CQ08]).
• A maple package OreMorphisms is available in [CQ]. In order to use OreMorphisms,
you need to add the global path to the ﬁle OreMorphisms.m to libname on maple.
• Options xrule, shift, b ideal,cg. Same as pfaff_eq.
• Option ﬁlename. You can specify the ﬁle name as in generate_maple_file_IC.
• The diﬀerence between generate_maple_file_IC and generate_maple_file_MR isthe appearence of auxilliary variables D1 and D2. If you can guess the degree of thenumerator and the denominator of the solution of the secondary equation, MorphismsRat[OreMorphisms] can be faster than RationalSolutions[IntegrableConnections].
Example:[2668] Beta=[b1,b2,1/3]$[2669] DirX=[dx1,dx4]$[2670] Rvec=[[1,0,0,0],[0,0,1,0]]$[2671] A=[[1,1,0,0],[0,0,1,1],[0,1,0,1]]$[2672] Ap=[[1,1,0,0],[0,0,1,1],[0,0,0,0]]$[2673] Xvar=[x1,x4]$[2674] Xrule=[[x2,1],[x3,1]]$[2675] mt_gkz.generate_maple_file_MR(A,Beta,Ap,Rvec,DirX,2,2|xrule=Xrule)$//A file "auto-generated-MR.ml" is automatically generated as follows:

with(OreModules);with(OreMorphisms);
with(linalg);
Alg:=DefineOreAlgebra(diff=[dx1,x1],diff=[dx4,x4],polynom=[x1,x4],comm=[b1,b2]);

Chapter 5: Cohomology intersection numbers

17

P:=Matrix([[dx1,0],[0,dx1],[dx4,0],[0,dx4]])-Matrix([[((b1+b2-4/3)*x1*x4-b1+4/3)/(x1^2*x4-x1),(-b2*x4)/(x1^2*x4-x1)],[(-b1)/(x1*x4-1),(b1*x4)/(x1*x4-1)],[(b2*x1)/(x1*x4-1),(-b2)/(x1*x4-1)],[(-b1*x1)/(x1*x4^2-x4),(1/3*x1*x4+b1-1/3)/(x1*x4^2-x4)]]);
Q:=Matrix([[dx1,0],[0,dx1],[dx4,0],[0,dx4]])+Matrix([[((-b1-b2-2/3)*x1*x4+b1+2/3)/(x1^2*x4-x1),(b1)/(x1*x4-1)],[(b2*x4)/(x1^2*x4-x1),(-b1*x4)/(x1*x4-1)],[(-b2*x1)/(x1*x4-1),(b1*x1)/(x1*x4^2-x4)],[(b2)/(x1*x4-1),(-1/3*x1*x4-b1+1/3)/(x1*x4^2-x4)]]);
RatSols:=MorphismsRat(P,Q,Alg,0,2,2);/*
If you run the output file on maple, you obtain a vector RatSols.
RatSols[1] is the rational solution of the secondary equation:*/
RatSols[1]:=[(1/3)*n213 *(3*b1-1)/(b1*x1^2*d61 ) n213 /(x1*d61 )]1
1[n213 /(x1*d61 )(1/3)*n213 *(3*b2-1)/(b2*d61 )]1

1/*Here, n213 and d61 are arbitrary constants. We can take n213 = 3∗b2 and d61 =1
1
1 to obtain the rational solution of the secondary equation which is identical to the one obtained from generate_maple_file_IC.
*/

Refer toSection 2.1.1 [mt gkz.pfaﬀ eq], page 2, Section 5.1.3 [mt gkz.generate maple ﬁle IC],
page 14.

5.2 Normalizing the cohomology intersection matrix
5.2.1 mt_gkz.principal_normalizing_constant
mt_gkz.principal_normalizing_constant(A,T,Beta,K):: It returns the normalizing constant of the cohomology intersection matrix interms of a regular triangulation T.
returnarationalfunction which is the cohomology intersection numberin terms of the regular triangulation T. Here, n is thenumber of integration variables and dtt is the volume form dtt11 ∧ · · · ∧ dttnn of thecomplex n-torus.
√1⟨[ dtt ], [ dtt ]⟩ch
(2π −1)nA,Betasee pfaff_eq.

Ta regular triangulation of A.

K

The number of polynomial factors in the integrand. see [MT2020].
• This function is useful when the basis of the cohomology group {ωi }ri=1 is given so that
ω1 = [ dtt ].

Chapter 5: Cohomology intersection numbers

18• One can ﬁnd a regular triangulation by using a function mt_gkz.regular_
triangulation.
• mt_gkz.leading_terms can be used more generally.
Example:[2676] A=[[1,1,0,0],[0,0,1,1],[0,1,0,1]]$[2677] Beta=[b1,b2,b3]$[2678] K=2$
[2679] T=[[1,2,3],[2,3,4]]$[2680] mt_gkz.principal_normalizing_constant(A,T,Beta,K);(-b1-b2)/(b3*b1+b3*b2-b3^2)
Refer toSection 5.2.2 [mt gkz.leading terms], page 18.

5.2.2 mt_gkz.leading_terms
mt_gkz.leading_terms(A,Beta,W,Q1,Q2,K,N):: It returns the W-leading terms of a cohomology intersection number speciﬁedby Q1 and Q2 up to W-degree=(minimum W-degree)+N.
returna list [[C1,DEG1],[C2,DEG2],...]. Each CI is a rational function depending
on Beta times a monomial xm in x-variables. DEGI is the W-degree of xm .
′
′′
′
′′
The cohomology intersection number (2π√1−1)n ⟨[h−q1 tq1 dtt ], [h−q2 tq2 dtt ]⟩ch has a
Laurent expansion of the form C1+C2+....

A,Betasee pfaff_eq.

W

a positive and integral weight vector.

Q1,Q2

Q1 = (q1′ , q1′′ )T , Q2 = (q2′ , q2′′ )T are integer vectors. The lengths of q1′ and q2′ areboth equal to K.

K

The number of polynomial factors in the integrand. see [MT2020].

N

A positive integer.
mn
1• For a monomial xm = xm
and a weight vector W = (w1 , . . . , wn ), the W-degree
1 · · · xnmof x is given by the dot product m · W = m1 w1 + · · · + mn wn .
′
′′
′
′′
• The W-leading terms of the cohomology intersection number (2π√1−1)n ⟨[h−q1 tq1 dtt ], [h−q2 tq2 dtt ]⟩chcan be computed by means of Theorem 2.6 of [GM2020]. See also Theorem 3.4.2 of[SST2000].
• If the weight vector is not generic, you will receive an error message such as "WARNING(initial mon): The weight may not be generic". In this case, the output may be
wrong and you should retake a suitable W. To be more precise, W should be chosenfrom an open cone of the Groebner fan.
• Option xrule. Same as pfaff_eq.
Example:[2922] Beta=[b1,b2,1/3];[b1,b2,1/3][2923] Q=[[1,0,0],[0,1,0]];[[1,0,0],[0,1,0]]Chapter 5: Cohomology intersection numbers

19[2924] A=[[1,1,0,0],[0,0,1,1],[0,1,0,1]];[[1,1,0,0],[0,0,1,1],[0,1,0,1]][2925] W=[1,0,0,0];[1,0,0,0][2926] K=2;2[2927] N=2;2[2928] NC=mt_gkz.leading_terms(A,Beta,W,Q[0],Q[1],K,N|xrule=[[x2,1],[x3,1],[x4,1]])$--snip-[2929] NC;[[(-3)/(x1),-5],[0,-4],[0,-3]]/*This output means that the W-leading √term of the (1,2) entry of the cohomology
intersection matrix is (−3)/(x1)× (2π −1). In view of examples of generate_
maple_file_IC or generate_maple_file_MR, we can conclude that the cohomology
intersection matrix is given by*/[-(3*b1-1)/(b1*x1^2)[-3/x1//divided by
Refer to

-3/x1]-(3*b2-1)/b2]]√
2π −1.

Section
5.2.2[mt gkz.leading terms],
page
18,
Section
5.1.3[mt gkz.generate maple ﬁle IC], page 14, Section 5.1.4 [mt gkz.generate maple ﬁle MR],
page 16.

5.2.3 mt_gkz.leading_term_rat
mt_gkz.leading_term_rat(P,W,V):: It returns the W-leading term of a rational function P depending on variables
V.
returnIt returns the W-leading term of a rational function P.

Pa rational function.

Wa weight vector.

Va list of variables of P.
• This function is supposed to be combined with leading_terms to compute the leading
term of a cohomology intersection number.
• If W is chose so that there are several initial terms, you will receive an error message"WARNING(leading term rat):The weight vector may not be generic."

Refer toSection 5.2.2 [mt gkz.leading terms], page 18.

Chapter 5: Cohomology intersection numbers

20

5.3 Regular triangulations
5.3.1 mt_gkz.toric_gen_initial, mt_gkz.regular_triangulation, mt_
gkz.top_standard_pairs
mt_gkz.toric_gen_initial(A,W)
mt_gkz.regular_triangulation(A,W)
mt_gkz.top_standard_pairs(A,W):: utility functions for computing ring theoretic invariants: generic initial ideal
for the toric ideal speciﬁed by the matrix A and a weight W, its associatedregular triangulation, and its associated top-dimensional standard pairs.
returntoric_gen_initial returns a list [L1,L2] of length 2. L1 is a list of generatorsof the W-initial ideal of the toric ideal IA speciﬁed by A. L2 is a list of variablesof IA .

returnregular_triangulation returns a list of simplices of a regular triangulation
TW speciﬁed by the weight W.

returntop_standard_pairs returns a list of the form [[L1,S1],[L2,S2],...]. Each SI isa simplex of TW . Each LI is a list of exponents.

A

a conﬁguration matrix.

W
a positive weight vector.
• As for the deﬁnition of the standard pair, see Chapter 3 of [SST00].
• We set n=length(A) and set BS1:={1, 2, ..., n} \ S1. Then, each L1[I] is an exponent kk, S1). Here, k is a list of length n-length(S1)of a top-dimensional standard pair (∂BS1and ∂BS1 = (∂J )J∈BS1 .
• If the weight vector is not generic, you will receive an error message such as "WARNING(initial mon): The weight may not be generic". See also leading_terms.
• These functions are utilized in leading_terms.
Example: An example of a non-unimodular triangulation and non-trivial standard pairs.
[3256] A=[[1,1,1,1,1],[0,1,0,2,0],[0,0,1,0,2]];[[1,1,1,1,1],[0,1,0,2,0],[0,0,1,0,2]][3257] W=[2,0,1,2,2];[2,0,1,2,2][3258] mt_gkz.toric_gen_initial(A,W);--snip-[[x1*x5,x1*x4,x3^2*x4],[x1,x2,x3,x4,x5]][3259] mt_gkz.regular_triangulation(A,W);--snip-[[2,4,5],[2,3,5],[1,2,3]][3260] mt_gkz.top_standard_pairs(A,W);--snip-[[[[0,0],[0,1]],[2,4,5]],[[[0,0]],[2,3,5]],[[[0,0]],[1,2,3]]]/*This means that the regular triangulation of the configuration matrix A is

Chapter 5: Cohomology intersection numbers

21

given by T = {{2, 4, 5}, {2, 3, 5}, {1, 2, 3}}. The normalized volumes of these simplices
are 2,1 and 1. Moreover, the top-dimensional standard pairs are(1, {2, 4, 5}), (∂3 , {2, 4, 5}), (1, {2, 3, 5}),(1, {1, 2, 3}).
*/
Refer toSection 5.2.2 [mt gkz.leading terms], page 18.

22

Index
(Index is nonexistent)(Index is nonexistent)

iShort Contents
1

About this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2

Pfaﬀ equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

3b function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4
5

Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Cohomology intersection numbers . . . . . . . . . . . . . . . . . . . . . . . 13

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

ii

Table of Contents
1

About this document . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2

Pfaﬀ equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1 Pfaﬀ equation for given cocycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1.1 mt_gkz.pfaff_eq. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1.2 mt_gkz.ff2, mt_gkz.ff1, mt_gkz.ff . . . . . . . . . . . . . . . . . . . . . . 4
2.1.3 mt_gkz.rvec_to_fvec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.4 mt_gkz.fvec_to_conn_mat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.5 mt_gkz.contiguity, mt_gkz.contiguity_by_fvec . . . . . . . . 7

3b function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1 b function and facet polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.1 mt_gkz.bf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.2 mt_gkz.facet_poly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4

Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.1 Some utility functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5

Cohomology intersection numbers . . . . . . . . . . . . 13
5.1 Secondary equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.1.1 mt_gkz.kronecker_prd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.1.2 mt_gkz.secondary_eq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.1.3 mt_gkz.generate_maple_file_IC . . . . . . . . . . . . . . . . . . . . . . . . 14
5.1.4 mt_gkz.generate_maple_file_MR . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Normalizing the cohomology intersection matrix . . . . . . . . . . . . . . . 17
5.2.1 mt_gkz.principal_normalizing_constant . . . . . . . . . . . . . . 17
5.2.2 mt_gkz.leading_terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.2.3 mt_gkz.leading_term_rat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.3 Regular triangulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.3.1 mt_gkz.toric_gen_initial, mt_gkz.regular_
triangulation, mt_gkz.top_standard_pairs . . . . . . . . . . . . . . . . 20

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

23