GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1[1X14 [33X[0;0YInterfaces to other software packages[133X[101X23[33X[0;0Y[5Xsimpcomp[105X contains various interfaces to other software packages (see Chapter4[14X13[114X for file-related export and import formats). In this chapter, some more5sophisticated interfaces to other software packages are described.[133X67[33X[0;0YNote that this chapter is subject to change and extension as it is planned8to expand [5Xsimpcomp[105X's functionality in this area in the course of the next9versions.[133X101112[1X14.1 [33X[0;0YInterface to the [5XGAP[105X[101X[1X-package [5Xhomalg[105X[101X[1X[133X[101X1314[33X[0;0YAs of Version 1.5, [5Xsimpcomp[105X is equipped with an interface to the [5XGAP[105X-package15[5Xhomalg[105X [BR08] by Mohamed Barakat. This allows to use [5Xhomalg[105X's powerful16capabilities in the field of homological algebra to compute topological17properties of simplicial complexes.[133X1819[33X[0;0YFor the time being, the only functions provided are ones allowing to compute20the homology and cohomology groups of simplicial complexes with arbitrary21coefficients. It is planned to extend the functionality in future releases22of [5Xsimpcomp[105X. See below for a list of functions that provide an interface to23[5Xhomalg[105X.[133X2425[1X14.1-1 SCHomalgBoundaryMatrices[101X2627[29X[2XSCHomalgBoundaryMatrices[102X( [3Xcomplex[103X, [3Xmodulus[103X ) [32X method28[6XReturns:[106X [33X[0;10Ya list of [5Xhomalg[105X objects upon success, [9Xfail[109X otherwise.[133X2930[33X[0;0YThis function computes the boundary operator matrices for the simplicial31complex [3Xcomplex[103X with a ring of coefficients as specified by [3Xmodulus[103X: a value32of [10X0[110X yields [22XQ[122X-matrices, a value of [10X1[110X yields [22XZ[122X-matrices and a value of [10Xq[110X, q a33prime or a prime power, computes the [22XF_q[122X-matrices.[133X3435[4X[32X Example [32X[104X36[4X[28X gap> SCLib.SearchByName("CP^2 (VT)");[128X[104X37[4X[28X [ [ 16, "CP^2 (VT)" ] ][128X[104X38[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X39[4X[28X gap> SCHomalgBoundaryMatrices(c,0);[128X[104X40[4X[28X [ <A 36 x 9 mutable matrix over an internal ring>, [128X[104X41[4X[28X <A 84 x 36 mutable matrix over an internal ring>, [128X[104X42[4X[28X <A 90 x 84 mutable matrix over an internal ring>, [128X[104X43[4X[28X <A 36 x 90 mutable matrix over an internal ring>, [128X[104X44[4X[28X <An unevaluated 0 x 36 zero matrix over an internal ring> ][128X[104X45[4X[28X [128X[104X46[4X[32X[104X4748[1X14.1-2 SCHomalgCoboundaryMatrices[101X4950[29X[2XSCHomalgCoboundaryMatrices[102X( [3Xcomplex[103X, [3Xmodulus[103X ) [32X method51[6XReturns:[106X [33X[0;10Ya list of [5Xhomalg[105X objects upon success, [9Xfail[109X otherwise.[133X5253[33X[0;0YThis function computes the coboundary operator matrices for the simplicial54complex [3Xcomplex[103X with a ring of coefficients as specified by [3Xmodulus[103X: a value55of [10X0[110X yields [22XQ[122X-matrices, a value of [10X1[110X yields [22XZ[122X-matrices and a value of [10Xq[110X, q a56prime or a prime power, computes the [22XF_q[122X-matrices.[133X5758[4X[32X Example [32X[104X59[4X[28X gap> SCLib.SearchByName("CP^2 (VT)");[128X[104X60[4X[28X [ [ 16, "CP^2 (VT)" ] ][128X[104X61[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X62[4X[28X gap> SCHomalgCoboundaryMatrices(c,0);[128X[104X63[4X[28X [ <A 9 x 36 mutable matrix over an internal ring>, [128X[104X64[4X[28X <A 36 x 84 mutable matrix over an internal ring>, [128X[104X65[4X[28X <A 84 x 90 mutable matrix over an internal ring>, [128X[104X66[4X[28X <A 90 x 36 mutable matrix over an internal ring>, [128X[104X67[4X[28X <An unevaluated 36 x 0 zero matrix over an internal ring> ][128X[104X68[4X[28X [128X[104X69[4X[32X[104X7071[1X14.1-3 SCHomalgHomology[101X7273[29X[2XSCHomalgHomology[102X( [3Xcomplex[103X, [3Xmodulus[103X ) [32X method74[6XReturns:[106X [33X[0;10Ya list of integers upon success, [9Xfail[109X otherwise.[133X7576[33X[0;0YThis function computes the ranks of the homology groups of [3Xcomplex[103X with a77ring of coefficients as specified by [3Xmodulus[103X: a value of [10X0[110X computes the78[22XQ[122X-homology, a value of [10X1[110X computes the [22XZ[122X-homology and a value of [10Xq[110X, q a prime79or a prime power, computes the [22XF_q[122X-homology ranks.[133X8081[33X[0;0YNote that if you are interested not only in the ranks of the homology82groups, but rather their full structure, have a look at the function83[2XSCHomalgHomologyBasis[102X ([14X14.1-4[114X).[133X8485[4X[32X Example [32X[104X86[4X[28X gap> SCLib.SearchByName("K3");[128X[104X87[4X[28X [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ][128X[104X88[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X89[4X[28X gap> SCHomalgHomology(c,0);[128X[104X90[4X[28X #I SCHomalgHomologyOp: Q-homology ranks: [ 1, 0, 22, 0, 1 ][128X[104X91[4X[28X [ 1, 0, 22, 0, 1 ][128X[104X92[4X[28X [128X[104X93[4X[32X[104X9495[1X14.1-4 SCHomalgHomologyBasis[101X9697[29X[2XSCHomalgHomologyBasis[102X( [3Xcomplex[103X, [3Xmodulus[103X ) [32X method98[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X object upon success, [9Xfail[109X otherwise.[133X99100[33X[0;0YThis function computes the homology groups (including explicit bases of the101modules involved) of [3Xcomplex[103X with a ring of coefficients as specified by102[3Xmodulus[103X: a value of [10X0[110X computes the [22XQ[122X-homology, a value of [10X1[110X computes the103[22XZ[122X-homology and a value of [10Xq[110X, q a prime or a prime power, computes the104[22XF_q[122X-homology groups.[133X105106[33X[0;0YThe [22Xk[122X-th homology group [10Xhk[110X can be obtained by calling107[10Xhk:=CertainObject(homology,k);[110X, where [10Xhomology[110X is the [5Xhomalg[105X object returned108by this function. The generators of [10Xhk[110X can then be obtained via109[10XGeneratorsOfModule(hk);[110X.[133X110111[33X[0;0YNote that if you are only interested in the ranks of the homology groups,112then it is better to use the funtion [2XSCHomalgHomology[102X ([14X14.1-3[114X) which is way113faster.[133X114115[4X[32X Example [32X[104X116[4X[28X gap> SCLib.SearchByName("K3");[128X[104X117[4X[28X [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ][128X[104X118[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X119[4X[28X gap> SCHomalgHomologyBasis(c,0);[128X[104X120[4X[28X #I SCHomalgHomologyBasisOp: constructed Q-homology groups.[128X[104X121[4X[28X <A graded homology object consisting of 5 left modules at degrees [ 0 .. 4 ]>[128X[104X122[4X[28X [128X[104X123[4X[32X[104X124125[1X14.1-5 SCHomalgCohomology[101X126127[29X[2XSCHomalgCohomology[102X( [3Xcomplex[103X, [3Xmodulus[103X ) [32X method128[6XReturns:[106X [33X[0;10Ya list of integers upon success, [9Xfail[109X otherwise.[133X129130[33X[0;0YThis function computes the ranks of the cohomology groups of [3Xcomplex[103X with a131ring of coefficients as specified by [3Xmodulus[103X: a value of [10X0[110X computes the132[22XQ[122X-cohomology, a value of [10X1[110X computes the [22XZ[122X-cohomology and a value of [10Xq[110X, q a133prime or a prime power, computes the [22XF_q[122X-cohomology ranks.[133X134135[33X[0;0YNote that if you are interested not only in the ranks of the cohomology136groups, but rather their full structure, have a look at the function137[2XSCHomalgCohomologyBasis[102X ([14X14.1-6[114X).[133X138139[4X[32X Example [32X[104X140[4X[28X gap> SCLib.SearchByName("K3");[128X[104X141[4X[28X [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ][128X[104X142[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X143[4X[28X gap> SCHomalgCohomology(c,0);[128X[104X144[4X[28X #I SCHomalgCohomologyOp: Q-cohomology ranks: [ 1, 0, 22, 0, 1 ][128X[104X145[4X[28X [ 1, 0, 22, 0, 1 ][128X[104X146[4X[28X [128X[104X147[4X[32X[104X148149[1X14.1-6 SCHomalgCohomologyBasis[101X150151[29X[2XSCHomalgCohomologyBasis[102X( [3Xcomplex[103X, [3Xmodulus[103X ) [32X method152[6XReturns:[106X [33X[0;10Ya [5Xhomalg[105X object upon success, [9Xfail[109X otherwise.[133X153154[33X[0;0YThis function computes the cohomology groups (including explicit bases of155the modules involved) of [3Xcomplex[103X with a ring of coefficients as specified by156[3Xmodulus[103X: a value of [10X0[110X computes the [22XQ[122X-cohomology, a value of [10X1[110X computes the157[22XZ[122X-cohomology and a value of [10Xq[110X, q a prime or a prime power, computes the158[22XF_q[122X-homology groups.[133X159160[33X[0;0YThe [22Xk[122X-th cohomology group [10Xck[110X can be obtained by calling161[10Xck:=CertainObject(cohomology,k);[110X, where [10Xcohomology[110X is the [5Xhomalg[105X object162returned by this function. The generators of [10Xck[110X can then be obtained via163[10XGeneratorsOfModule(ck);[110X.[133X164165[33X[0;0YNote that if you are only interested in the ranks of the cohomology groups,166then it is better to use the funtion [2XSCHomalgCohomology[102X ([14X14.1-5[114X) which is167way faster.[133X168169[4X[32X Example [32X[104X170[4X[28X gap> SCLib.SearchByName("K3");[128X[104X171[4X[28X [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ][128X[104X172[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X173[4X[28X gap> SCHomalgCohomologyBasis(c,0);[128X[104X174[4X[28X #I SCHomalgCohomologyBasisOp: constructed Q-cohomology groups.[128X[104X175[4X[28X <A graded cohomology object consisting of 5 left modules at degrees [128X[104X176[4X[28X [ 1 .. 5 ]>[128X[104X177[4X[28X [128X[104X178[4X[32X[104X179180181182