GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1[1X8 [33X[0;0Y(Co-)Homology of simplicial complexes[133X[101X23[33X[0;0YBy default, [5Xsimpcomp[105X uses an algorithm based on discrete Morse theory (see4Chapter [14X12[114X, [2XSCHomology[102X ([14X7.3-9[114X)) for its homology computations. However, some5additional (co-)homology related functionality cannot be realised using this6algorithm. For this, [5Xsimpcomp[105X contains an additional (co-)homology algorithm7(cf. [2XSCHomologyInternal[102X ([14X8.1-5[114X)), which will be presented in this chapter.[133X89[33X[0;0YFurthermore, whenever possible [5Xsimpcomp[105X makes use of the [5XGAP[105X package10''homology'' [DHSW11], for an alternative method to calculate homology11groups (cf. [2XSCHomologyClassic[102X ([14X6.9-31[114X)) which sometimes is much faster than12the built-in discrete Morse theory algorithm.[133X131415[1X8.1 [33X[0;0YHomology computation[133X[101X1617[33X[0;0YApart from calculating boundaries of simplices, boundary matrices or the18simplicial homology of a given complex, [5Xsimpcomp[105X is also able to compute a19basis of the homology groups.[133X2021[1X8.1-1 SCBoundaryOperatorMatrix[101X2223[29X[2XSCBoundaryOperatorMatrix[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method24[6XReturns:[106X [33X[0;10Ya rectangular matrix upon success, [9Xfail[109X otherwise.[133X2526[33X[0;0YCalculates the matrix of the boundary operator [22X∂_[3Xk+1[103X[122X of a simplicial complex27[3Xcomplex[103X. Note that each column contains the boundaries of a [3Xk[103X[22X+1[122X-simplex as a28list of oriented [3Xk[103X-simplices and that the matrix is stored as a list of row29vectors (as usual in GAP).[133X3031[4X[32X Example [32X[104X32[4X[28X gap> c:=SCFromFacets([[1,2,3],[1,2,6],[1,3,5],[1,4,5],[1,4,6],\[128X[104X33[4X[28X [2,3,4],[2,4,5],[2,5,6],[3,4,6],[3,5,6]]);;[128X[104X34[4X[28X gap> mat:=SCBoundaryOperatorMatrix(c,1);[128X[104X35[4X[28X [ [ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X36[4X[28X [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ], [128X[104X37[4X[28X [ 0, -1, 0, 0, 0, -1, 0, 0, 0, 1, 1, 1, 0, 0, 0 ], [128X[104X38[4X[28X [ 0, 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 1, 1, 0 ], [128X[104X39[4X[28X [ 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, -1, 0, 1 ], [128X[104X40[4X[28X [ 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, -1, -1 ] ][128X[104X41[4X[28X [128X[104X42[4X[32X[104X4344[1X8.1-2 SCBoundarySimplex[101X4546[29X[2XSCBoundarySimplex[102X( [3Xsimplex[103X, [3Xorientation[103X ) [32X function47[6XReturns:[106X [33X[0;10Ya list upon success, [9Xfail[109X otherwise.[133X4849[33X[0;0YCalculates the boundary of a given [3Xsimplex[103X. If the flag [3Xorientation[103X is set50to [9Xtrue[109X, the function returns the boundary as a list of oriented simplices51of the form [ ORIENTATION, SIMPLEX ], where ORIENTATION is either +1 or -152and a value of +1 means that SIMPLEX is positively oriented and a value of53-1 that SIMPLEX is negatively oriented. If [3Xorientation[103X is set to [9Xfalse[109X, an54unoriented list of simplices is returned.[133X5556[4X[32X Example [32X[104X57[4X[28X gap> SCBoundarySimplex([1..5],true);[128X[104X58[4X[28X [ [ -1, [ 2, 3, 4, 5 ] ], [ 1, [ 1, 3, 4, 5 ] ], [ -1, [ 1, 2, 4, 5 ] ], [128X[104X59[4X[28X [ 1, [ 1, 2, 3, 5 ] ], [ -1, [ 1, 2, 3, 4 ] ] ][128X[104X60[4X[28X gap> SCBoundarySimplex([1..5],false);[128X[104X61[4X[28X [ [ 2, 3, 4, 5 ], [ 1, 3, 4, 5 ], [ 1, 2, 4, 5 ], [ 1, 2, 3, 5 ], [128X[104X62[4X[28X [ 1, 2, 3, 4 ] ][128X[104X63[4X[28X [128X[104X64[4X[32X[104X6566[1X8.1-3 SCHomologyBasis[101X6768[29X[2XSCHomologyBasis[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method69[6XReturns:[106X [33X[0;10Ya list of pairs of the form [10X[ integer, list of linear combinations70of simplices ][110X upon success, [9Xfail[109X otherwise.[133X7172[33X[0;0YCalculates a set of basis elements for the [3Xk[103X-dimensional homology group73(with integer coefficients) of a simplicial complex [3Xcomplex[103X. The entries of74the returned list are of the form [ MODULUS, [ BASEELM1, BASEELM2, ...] ],75where the value MODULUS is 1 for the basis elements of the free part of the76[3Xk[103X-th homology group and [22Xq≥ 2[122X for the basis elements of the [22Xq[122X-torsion part.77In contrast to the function [2XSCHomologyBasisAsSimplices[102X ([14X8.1-4[114X) the basis78elements are stored as lists of coefficient-index pairs referring to the79simplices of the complex, i.e. a basis element of the form [22X[ [ λ_1, i],80[λ_2, j], dots ] dots[122X encodes the linear combination of simplices of the81form [22Xλ_1*∆_1+λ_2*∆_2[122X with [22X∆_1[122X=[10XSCSkel(complex,k)[i][110X, [22X∆_2[122X=[10XSCSkel(complex,k)[j][110X82and so on.[133X8384[4X[32X Example [32X[104X85[4X[28X gap> SCLib.SearchByName("(S^2xS^1)#RP^3");[128X[104X86[4X[28X [ [ 590, "(S^2xS^1)#RP^3" ] ][128X[104X87[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X88[4X[28X gap> SCHomologyBasis(c,1);[128X[104X89[4X[28X [ [ 1, [ [ 1, 12 ], [ -1, 7 ], [ 1, 1 ] ] ], [128X[104X90[4X[28X [ 2, [ [ 1, 68 ], [ -1, 69 ], [ -1, 71 ], [ 2, 72 ], [ -2, 73 ] ] ] ][128X[104X91[4X[28X [128X[104X92[4X[32X[104X9394[1X8.1-4 SCHomologyBasisAsSimplices[101X9596[29X[2XSCHomologyBasisAsSimplices[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method97[6XReturns:[106X [33X[0;10Ya list of pairs of the form [10X[ integer, list of linear combinations98of simplices ][110X upon success, [9Xfail[109X otherwise.[133X99100[33X[0;0YCalculates a set of basis elements for the [3Xk[103X-dimensional homology group101(with integer coefficients) of a simplicial complex [3Xcomplex[103X. The entries of102the returned list are of the form [ MODULUS, [ BASEELM1, BASEELM2, ...] ],103where the value MODULUS is 1 for the basis elements of the free part of the104[3Xk[103X-th homology group and [22Xq≥ 2[122X for the basis elements of the [22Xq[122X-torsion part.105In contrast to the function [2XSCHomologyBasis[102X ([14X8.1-3[114X) the basis elements are106stored as lists of coefficient-simplex pairs, i.e. a basis element of the107form [22X[ [ λ_1, ∆_1], [λ_2, ∆_2], dots ][122X encodes the linear combination of108simplices of the form [22Xλ_1*∆_1+λ_2*∆_2 + dots[122X.[133X109110[4X[32X Example [32X[104X111[4X[28X gap> SCLib.SearchByName("(S^2xS^1)#RP^3");[128X[104X112[4X[28X [ [ 590, "(S^2xS^1)#RP^3" ] ][128X[104X113[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X114[4X[28X gap> SCHomologyBasisAsSimplices(c,1);[128X[104X115[4X[28X [ [ 1, [ [ 1, [ 2, 8 ] ], [ -1, [ 1, 8 ] ], [ 1, [ 1, 2 ] ] ] ], [128X[104X116[4X[28X [ 2, [128X[104X117[4X[28X [ [ 1, [ 11, 12 ] ], [ -1, [ 11, 13 ] ], [ -1, [ 12, 13 ] ], [128X[104X118[4X[28X [ 2, [ 12, 14 ] ], [ -2, [ 13, 14 ] ] ] ] ][128X[104X119[4X[28X [128X[104X120[4X[32X[104X121122[1X8.1-5 SCHomologyInternal[101X123124[29X[2XSCHomologyInternal[102X( [3Xcomplex[103X ) [32X function125[6XReturns:[106X [33X[0;10Ya list of pairs of the form [10X[ integer, list ][110X upon success, [9Xfail[109X126otherwise.[133X127128[33X[0;0YThis function computes the reduced simplicial homology with integer129coefficients of a given simplicial complex [3Xcomplex[103X with integer130coefficients. It uses the algorithm described in [DKT08].[133X131132[33X[0;0YThe output is a list of homology groups of the form [22X[H_0,....,H_d][122X, where [22Xd[122X133is the dimension of [3Xcomplex[103X. The format of the homology groups [22XH_i[122X is given134in terms of their maximal cyclic subgroups, i.e. a homology group [22XH_i≅ Z^f +135Z / t_1 Z × dots × Z / t_n Z[122X is returned in form of a list [22X[ f,136[t_1,...,t_n] ][122X, where [22Xf[122X is the (integer) free part of [22XH_i[122X and [22Xt_i[122X denotes137the torsion parts of [22XH_i[122X ordered in weakly incresing size. See also138[2XSCHomology[102X ([14X7.3-9[114X) and [2XSCHomologyClassic[102X ([14X6.9-31[114X).[133X139140[4X[32X Example [32X[104X141[4X[28X gap> c:=SCSurface(1,false);;[128X[104X142[4X[28X gap> SCHomologyInternal(c);[128X[104X143[4X[28X [ [ 0, [ ] ], [ 0, [ 2 ] ], [ 0, [ ] ] ][128X[104X144[4X[28X [128X[104X145[4X[32X[104X146147148[1X8.2 [33X[0;0YCohomology computation[133X[101X149150[33X[0;0Y[5Xsimpcomp[105X can also compute the cohomology groups of simplicial complexes,151bases of these cohomology groups, the cup product of two cocycles and the152intersection form of (orientable) 4-manifolds.[133X153154[1X8.2-1 SCCoboundaryOperatorMatrix[101X155156[29X[2XSCCoboundaryOperatorMatrix[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method157[6XReturns:[106X [33X[0;10Ya rectangular matrix upon success, [9Xfail[109X otherwise.[133X158159[33X[0;0YCalculates the matrix of the coboundary operator [22Xd^[3Xk+1[103X[122X as a list of row160vectors.[133X161162[4X[32X Example [32X[104X163[4X[28X gap> c:=SCFromFacets([[1,2,3],[1,2,6],[1,3,5],[1,4,5],[1,4,6],\[128X[104X164[4X[28X [2,3,4],[2,4,5],[2,5,6],[3,4,6],[3,5,6]]);[128X[104X165[4X[28X > [SimplicialComplex[128X[104X166[4X[28X [128X[104X167[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X168[4X[28X [128X[104X169[4X[28X Name="unnamed complex 2"[128X[104X170[4X[28X Dim=2[128X[104X171[4X[28X [128X[104X172[4X[28X /SimplicialComplex][128X[104X173[4X[28X gap> mat:=SCCoboundaryOperatorMatrix(c,1);[128X[104X174[4X[28X [ [ -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X175[4X[28X [ -1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0 ], [128X[104X176[4X[28X [ 0, -1, 0, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0 ], [128X[104X177[4X[28X [ 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0 ], [128X[104X178[4X[28X [ 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0 ], [128X[104X179[4X[28X [ 0, 0, 0, 0, 0, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0 ], [128X[104X180[4X[28X [ 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0 ], [128X[104X181[4X[28X [ 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -1 ], [128X[104X182[4X[28X [ 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, -1, 0 ], [128X[104X183[4X[28X [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, -1 ] ][128X[104X184[4X[28X [128X[104X185[4X[32X[104X186187[1X8.2-2 SCCohomology[101X188189[29X[2XSCCohomology[102X( [3Xcomplex[103X ) [32X method190[6XReturns:[106X [33X[0;10Ya list of pairs of the form [10X[ integer, list ][110X upon success, [9Xfail[109X191otherwise.[133X192193[33X[0;0YThis function computes the simplicial cohomology groups of a given194simplicial complex [3Xcomplex[103X with integer coefficients. It uses the algorithm195described in [DKT08].[133X196197[33X[0;0YThe output is a list of cohomology groups of the form [22X[H^0,....,H^d][122X, where198[22Xd[122X is the dimension of [3Xcomplex[103X. The format of the cohomology groups [22XH^i[122X is199given in terms of their maximal cyclic subgroups, i.e. a cohomology group200[22XH^i≅ Z^f + Z / t_1 Z × dots × Z / t_n Z[122X is returned in form of a list [22X[ f,201[t_1,...,t_n] ][122X, where [22Xf[122X is the (integer) free part of [22XH^i[122X and [22Xt_i[122X denotes202the torsion parts of [22XH^i[122X ordered in weakly increasing size.[133X203204[4X[32X Example [32X[104X205[4X[28X gap> c:=SCFromFacets([[1,2,3],[1,2,6],[1,3,5],[1,4,5],[1,4,6],[128X[104X206[4X[28X [2,3,4],[2,4,5],[2,5,6],[3,4,6],[3,5,6]]);[128X[104X207[4X[28X > [SimplicialComplex[128X[104X208[4X[28X [128X[104X209[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X210[4X[28X [128X[104X211[4X[28X Name="unnamed complex 4"[128X[104X212[4X[28X Dim=2[128X[104X213[4X[28X [128X[104X214[4X[28X /SimplicialComplex][128X[104X215[4X[28X gap> SCCohomology(c);[128X[104X216[4X[28X [ [ 1, [ ] ], [ 0, [ ] ], [ 0, [ 2 ] ] ][128X[104X217[4X[28X [128X[104X218[4X[32X[104X219220[1X8.2-3 SCCohomologyBasis[101X221222[29X[2XSCCohomologyBasis[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method223[6XReturns:[106X [33X[0;10Ya list of pairs of the form [10X[ integer, list of linear combinations224of simplices ][110X upon success, [9Xfail[109X otherwise.[133X225226[33X[0;0YCalculates a set of basis elements for the [3Xk[103X-dimensional cohomology group227(with integer coefficients) of a simplicial complex [3Xcomplex[103X. The entries of228the returned list are of the form [ MODULUS, [ BASEELM1, BASEELM2, ...] ],229where the value MODULUS is 1 for the basis elements of the free part of the230[3Xk[103X-th homology group and [22Xq≥ 2[122X for the basis elements of the [22Xq[122X-torsion part.231In contrast to the function [2XSCCohomologyBasisAsSimplices[102X ([14X8.2-4[114X) the basis232elements are stored as lists of coefficient-index pairs referring to the233linear forms dual to the simplices in the [22Xk[122X-th cochain complex of [3Xcomplex[103X,234i.e. a basis element of the form [22X[ [ λ_1, i], [λ_2, j], dots ] dots[122X encodes235the linear combination of simplices (or their dual linear forms in the236corresponding cochain complex) of the form [22Xλ_1*∆_1+λ_2*∆_2[122X with237[22X∆_1[122X=[10XSCSkel(complex,k)[i][110X, [22X∆_2[122X=[10XSCSkel(complex,k)[j][110X and so on.[133X238239[4X[32X Example [32X[104X240[4X[28X gap> SCLib.SearchByName("SU(3)/SO(3)"); [128X[104X241[4X[28X [ [ 563, "SU(3)/SO(3) (VT)" ], [ 7276, "SU(3)/SO(3) (VT)" ], [128X[104X242[4X[28X [ 7418, "SU(3)/SO(3) (VT)" ], [ 7419, "SU(3)/SO(3) (VT)" ] ][128X[104X243[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X244[4X[28X gap> SCCohomologyBasis(c,3); [128X[104X245[4X[28X [ [ 2, [ [ -9, 259 ], [ 9, 262 ], [ 9, 263 ], [ -9, 270 ], [ 9, 271 ], [128X[104X246[4X[28X [ -9, 273 ], [ -9, 274 ], [ -18, 275 ], [ -9, 276 ], [ 9, 278 ], [128X[104X247[4X[28X [ -9, 279 ], [ -9, 280 ], [ 3, 283 ], [ -3, 285 ], [ 3, 289 ], [128X[104X248[4X[28X [ -3, 294 ], [ 3, 310 ], [ -3, 313 ], [ 3, 316 ], [ -1, 317 ], [128X[104X249[4X[28X [ -6, 318 ], [ 3, 319 ], [ -6, 320 ], [ 6, 321 ], [ 1, 322 ], [128X[104X250[4X[28X [ 3, 325 ], [ -1, 328 ], [ 6, 330 ], [ -2, 331 ], [ 12, 332 ], [128X[104X251[4X[28X [ 7, 333 ], [ -5, 334 ], [ 1, 345 ], [ 3, 355 ], [ -9, 357 ], [128X[104X252[4X[28X [ 9, 358 ], [ 1, 363 ], [ 12, 365 ], [ -9, 366 ], [ -3, 370 ], [128X[104X253[4X[28X [ -1, 371 ], [ -3, 372 ], [ 8, 373 ], [ -1, 374 ], [ 6, 375 ], [128X[104X254[4X[28X [ 9, 376 ], [ 3, 377 ], [ 1, 380 ], [ 3, 383 ], [ -8, 385 ], [128X[104X255[4X[28X [ -9, 386 ], [ -9, 388 ], [ -18, 404 ], [ 9, 410 ], [ -9, 425 ], [128X[104X256[4X[28X [ -18, 426 ], [ -9, 427 ], [ 9, 428 ], [ -9, 429 ], [ 3, 433 ], [128X[104X257[4X[28X [ -3, 435 ], [ -9, 437 ], [ 10, 442 ], [ 12, 445 ], [ 1, 447 ], [128X[104X258[4X[28X [ -19, 448 ], [ 2, 449 ], [ -1, 450 ], [ -9, 451 ], [ 3, 453 ], [128X[104X259[4X[28X [ 1, 455 ], [ 1, 457 ], [ -11, 458 ], [ -9, 459 ], [ 9, 461 ], [128X[104X260[4X[28X [ 9, 462 ], [ -9, 468 ], [ 9, 469 ], [ -18, 471 ], [ -9, 472 ], [128X[104X261[4X[28X [ 9, 474 ], [ -9, 475 ], [ 9, 488 ], [ 9, 495 ], [ -9, 500 ], [128X[104X262[4X[28X [ -3, 504 ], [ 9, 505 ], [ 9, 512 ], [ 9, 515 ], [ 6, 519 ], [128X[104X263[4X[28X [ 18, 521 ], [ -15, 523 ], [ 9, 524 ], [ -3, 525 ], [ 18, 527 ], [128X[104X264[4X[28X [ -18, 528 ], [ 6, 529 ], [ 6, 531 ], [ 12, 532 ] ] ] ][128X[104X265[4X[28X [128X[104X266[4X[32X[104X267268[1X8.2-4 SCCohomologyBasisAsSimplices[101X269270[29X[2XSCCohomologyBasisAsSimplices[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method271[6XReturns:[106X [33X[0;10Ya list of pars of the form [10X[ integer, linear combination of272simplices ][110X upon success, [9Xfail[109X otherwise.[133X273274[33X[0;0YCalculates a set of basis elements for the [3Xk[103X-dimensional cohomology group275(with integer coefficients) of a simplicial complex [3Xcomplex[103X. The entries of276the returned list are of the form [ MODULUS, [ BASEELM1, BASEELM2, ...] ],277where the value MODULUS is 1 for the basis elements of the free part of the278[3Xk[103X-th homology group and [22Xq≥ 2[122X for the basis elements of the [22Xq[122X-torsion part.279In contrast to the function [2XSCCohomologyBasis[102X ([14X8.2-3[114X) the basis elements are280stored as lists of coefficient-simplex pairs referring to the linear forms281dual to the simplices in the [22Xk[122X-th cochain complex of [3Xcomplex[103X, i.e. a basis282element of the form [22X[ [ λ_1, ∆_i], [λ_2, ∆_j], dots ] dots[122X encodes the283linear combination of simplices (or their dual linear forms in the284corresponding cochain complex) of the form [22Xλ_1*∆_1+λ_2*∆_2 + dots[122X.[133X285286[4X[32X Example [32X[104X287[4X[28X gap> SCLib.SearchByName("SU(3)/SO(3)"); [128X[104X288[4X[28X [ [ 563, "SU(3)/SO(3) (VT)" ], [ 7276, "SU(3)/SO(3) (VT)" ], [128X[104X289[4X[28X [ 7418, "SU(3)/SO(3) (VT)" ], [ 7419, "SU(3)/SO(3) (VT)" ] ][128X[104X290[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X291[4X[28X gap> SCCohomologyBasisAsSimplices(c,3);[128X[104X292[4X[28X [ [ 2, [128X[104X293[4X[28X [ [ -9, [ 2, 7, 8, 9 ] ], [ 9, [ 2, 7, 8, 12 ] ], [128X[104X294[4X[28X [ 9, [ 2, 7, 8, 13 ] ], [ -9, [ 2, 7, 11, 12 ] ], [128X[104X295[4X[28X [ 9, [ 2, 7, 11, 13 ] ], [ -9, [ 2, 8, 9, 10 ] ], [128X[104X296[4X[28X [ -9, [ 2, 8, 9, 11 ] ], [ -18, [ 2, 8, 9, 12 ] ], [128X[104X297[4X[28X [ -9, [ 2, 8, 9, 13 ] ], [ 9, [ 2, 8, 10, 12 ] ], [128X[104X298[4X[28X [ -9, [ 2, 8, 10, 13 ] ], [ -9, [ 2, 8, 11, 12 ] ], [128X[104X299[4X[28X [ 3, [ 2, 9, 10, 12 ] ], [ -3, [ 2, 9, 11, 12 ] ], [128X[104X300[4X[28X [ 3, [ 3, 4, 5, 7 ] ], [ -3, [ 3, 4, 5, 12 ] ], [128X[104X301[4X[28X [ 3, [ 3, 4, 10, 12 ] ], [ -3, [ 3, 5, 6, 7 ] ], [128X[104X302[4X[28X [ 3, [ 3, 5, 6, 11 ] ], [ -1, [ 3, 5, 6, 13 ] ], [128X[104X303[4X[28X [ -6, [ 3, 5, 7, 8 ] ], [ 3, [ 3, 5, 7, 10 ] ], [128X[104X304[4X[28X [ -6, [ 3, 5, 7, 11 ] ], [ 6, [ 3, 5, 7, 12 ] ], [128X[104X305[4X[28X [ 1, [ 3, 5, 7, 13 ] ], [ 3, [ 3, 5, 8, 12 ] ], [128X[104X306[4X[28X [ -1, [ 3, 5, 9, 13 ] ], [ 6, [ 3, 5, 10, 12 ] ], [128X[104X307[4X[28X [ -2, [ 3, 5, 10, 13 ] ], [ 12, [ 3, 5, 11, 12 ] ], [128X[104X308[4X[28X [ 7, [ 3, 5, 11, 13 ] ], [ -5, [ 3, 5, 12, 13 ] ], [128X[104X309[4X[28X [ 1, [ 3, 6, 9, 13 ] ], [ 3, [ 3, 7, 10, 12 ] ], [128X[104X310[4X[28X [ -9, [ 3, 7, 11, 12 ] ], [ 9, [ 3, 7, 11, 13 ] ], [128X[104X311[4X[28X [ 1, [ 3, 8, 9, 13 ] ], [ 12, [ 3, 8, 10, 12 ] ], [128X[104X312[4X[28X [ -9, [ 3, 8, 10, 13 ] ], [ -3, [ 3, 9, 10, 12 ] ], [128X[104X313[4X[28X [ -1, [ 3, 9, 10, 13 ] ], [ -3, [ 3, 9, 11, 12 ] ], [128X[104X314[4X[28X [ 8, [ 3, 9, 11, 13 ] ], [ -1, [ 3, 9, 12, 13 ] ], [128X[104X315[4X[28X [ 6, [ 3, 10, 11, 12 ] ], [ 9, [ 3, 10, 11, 13 ] ], [128X[104X316[4X[28X [ 3, [ 3, 10, 12, 13 ] ], [ 1, [ 4, 5, 6, 8 ] ], [128X[104X317[4X[28X [ 3, [ 4, 5, 6, 11 ] ], [ -8, [ 4, 5, 6, 13 ] ], [128X[104X318[4X[28X [ -9, [ 4, 5, 7, 8 ] ], [ -9, [ 4, 5, 7, 11 ] ], [128X[104X319[4X[28X [ -18, [ 4, 6, 8, 9 ] ], [ 9, [ 4, 6, 9, 13 ] ], [128X[104X320[4X[28X [ -9, [ 4, 8, 9, 10 ] ], [ -18, [ 4, 8, 9, 12 ] ], [128X[104X321[4X[28X [ -9, [ 4, 8, 9, 13 ] ], [ 9, [ 4, 8, 10, 12 ] ], [128X[104X322[4X[28X [ -9, [ 4, 8, 10, 13 ] ], [ 3, [ 4, 9, 10, 12 ] ], [128X[104X323[4X[28X [ -3, [ 4, 9, 11, 12 ] ], [ -9, [ 4, 9, 12, 13 ] ], [128X[104X324[4X[28X [ 10, [ 5, 6, 7, 8 ] ], [ 12, [ 5, 6, 7, 11 ] ], [128X[104X325[4X[28X [ 1, [ 5, 6, 7, 13 ] ], [ -19, [ 5, 6, 8, 9 ] ], [128X[104X326[4X[28X [ 2, [ 5, 6, 8, 11 ] ], [ -1, [ 5, 6, 8, 12 ] ], [128X[104X327[4X[28X [ -9, [ 5, 6, 8, 13 ] ], [ 3, [ 5, 6, 9, 11 ] ], [128X[104X328[4X[28X [ 1, [ 5, 6, 9, 13 ] ], [ 1, [ 5, 6, 10, 13 ] ], [128X[104X329[4X[28X [ -11, [ 5, 6, 11, 13 ] ], [ -9, [ 5, 7, 8, 9 ] ], [128X[104X330[4X[28X [ 9, [ 5, 7, 8, 12 ] ], [ 9, [ 5, 7, 8, 13 ] ], [128X[104X331[4X[28X [ -9, [ 5, 7, 11, 12 ] ], [ 9, [ 5, 7, 11, 13 ] ], [128X[104X332[4X[28X [ -18, [ 5, 8, 9, 12 ] ], [ -9, [ 5, 8, 9, 13 ] ], [128X[104X333[4X[28X [ 9, [ 5, 8, 10, 12 ] ], [ -9, [ 5, 8, 11, 12 ] ], [128X[104X334[4X[28X [ 9, [ 6, 7, 8, 13 ] ], [ 9, [ 6, 7, 11, 13 ] ], [128X[104X335[4X[28X [ -9, [ 6, 8, 10, 13 ] ], [ -3, [ 6, 9, 11, 12 ] ], [128X[104X336[4X[28X [ 9, [ 6, 9, 11, 13 ] ], [ 9, [ 7, 8, 9, 13 ] ], [128X[104X337[4X[28X [ 9, [ 7, 8, 11, 12 ] ], [ 6, [ 7, 9, 11, 12 ] ], [128X[104X338[4X[28X [ 18, [ 7, 11, 12, 13 ] ], [ -15, [ 8, 9, 10, 12 ] ], [128X[104X339[4X[28X [ 9, [ 8, 9, 10, 13 ] ], [ -3, [ 8, 9, 11, 12 ] ], [128X[104X340[4X[28X [ 18, [ 8, 10, 11, 12 ] ], [ -18, [ 8, 10, 12, 13 ] ], [128X[104X341[4X[28X [ 6, [ 9, 10, 11, 12 ] ], [ 6, [ 9, 10, 12, 13 ] ], [128X[104X342[4X[28X [ 12, [ 9, 11, 12, 13 ] ] ] ] ][128X[104X343[4X[28X [128X[104X344[4X[32X[104X345346[1X8.2-5 SCCupProduct[101X347348[29X[2XSCCupProduct[102X( [3Xcomplex[103X, [3Xcocycle1[103X, [3Xcocycle2[103X ) [32X function349[6XReturns:[106X [33X[0;10Ya list of pairs of the form [10X[ ORIENTATION, SIMPLEX ][110X upon success,350[9Xfail[109X otherwise.[133X351352[33X[0;0YThe cup product is a method of adjoining two cocycles of degree [22Xp[122X and [22Xq[122X to353form a composite cocycle of degree [22Xp + q[122X. It endows the cohomology groups of354a simplicial complex with the structure of a ring.[133X355356[33X[0;0YThe construction of the cup product starts with a product of cochains: if357[3Xcocycle1[103X is a p-cochain and [3Xcocylce2[103X is a q-cochain of a simplicial complex358[3Xcomplex[103X (given as list of oriented p- (q-)simplices), then[133X359360[33X[0;0Y[3Xcocycle1[103X [22X⌣[122X [3Xcocycle2[103X[22X(σ) =[122X[3Xcocycle1[103X[22X(σ ∘ ι_0,1, ... p) ⋅[122X [3Xcocycle2[103X[22X(σ ∘ ι_p, p+1361,..., p + q)[122X[133X362363[33X[0;0Ywhere [22Xσ[122X is a [22Xp + q[122X-simplex and [22Xι_S[122X, [22XS ⊂ {0,1,...,p+q }[122X is the canonical364embedding of the simplex spanned by [22XS[122X into the [22X(p + q)[122X-standard simplex.[133X365366[33X[0;0Y[22Xσ ∘ ι_0,1, ..., p[122X is called the [22Xp[122X-th front face and [22Xσ ∘ ι_p, p+1, ..., p + q[122X367is the [22Xq[122X-th back face of [22Xσ[122X, respectively.[133X368369[33X[0;0YNote that this function only computes the cup product in the case that370[3Xcomplex[103X is an orientable weak pseudomanifold of dimension [22X2k[122X and [22Xp = q = k[122X.371Furthermore, [3Xcomplex[103X must be given in standard labeling, with sorted facet372list and [3Xcocylce1[103X and [3Xcocylce2[103X must be given in simplex notation and labeled373accordingly. Note that the latter condition is usually fulfilled in case the374cocycles were computed using [2XSCCohomologyBasisAsSimplices[102X ([14X8.2-4[114X).[133X375376[4X[32X Example [32X[104X377[4X[28X gap> SCLib.SearchByName("K3");[128X[104X378[4X[28X [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ][128X[104X379[4X[28X gap> c:=SCLib.Load(last[1][1]);; [128X[104X380[4X[28X gap> basis:=SCCohomologyBasisAsSimplices(c,2);;[128X[104X381[4X[28X gap> SCCupProduct(c,basis[1][2],basis[1][2]);[128X[104X382[4X[28X [ [ 1, [ 1, 2, 4, 7, 11 ] ], [ 1, [ 2, 3, 4, 5, 9 ] ] ][128X[104X383[4X[28X gap> SCCupProduct(c,basis[1][2],basis[2][2]);[128X[104X384[4X[28X [ [ -1, [ 1, 2, 4, 7, 11 ] ], [ -1, [ 1, 2, 4, 7, 15 ] ], [128X[104X385[4X[28X [ -1, [ 2, 3, 4, 5, 9 ] ] ][128X[104X386[4X[28X [128X[104X387[4X[32X[104X388389[1X8.2-6 SCIntersectionForm[101X390391[29X[2XSCIntersectionForm[102X( [3Xcomplex[103X ) [32X method392[6XReturns:[106X [33X[0;10Ya square matrix of integer values upon success, [9Xfail[109X otherwise.[133X393394[33X[0;0YFor [22X2k[122X-dimensional orientable manifolds [22XM[122X the cup product (see [2XSCCupProduct[102X395([14X8.2-5[114X)) defines a bilinear form[133X396397[33X[0;0YH[22X^k ( M ) ×[122XH[22X^k ( M ) ->[122XH[22X^2k (M), (a,b) ↦ a ∪ b[122X[133X398399[33X[0;0Ycalled the intersection form of [22XM[122X. This function returns the intersection400form of an orientable combinatorial [22X2k[122X-manifold [3Xcomplex[103X in form of a matrix401[10Xmat[110X with respect to the basis of H[22X^k ([122X[3Xcomplex[103XM[22X)[122X computed by402[2XSCCohomologyBasisAsSimplices[102X ([14X8.2-4[114X). The matrix entry [10Xmat[i][j][110X equals the403intersection number of the [10Xi[110X-th base element with the [10Xj[110X-th base element of404H[22X^k ([122X[3Xcomplex[103XM[22X)[122X.[133X405406[4X[32X Example [32X[104X407[4X[28X gap> SCLib.SearchByName("CP^2"); [128X[104X408[4X[28X [ [ 16, "CP^2 (VT)" ], [ 99, "CP^2#-CP^2" ], [ 100, "CP^2#CP^2" ], [128X[104X409[4X[28X [ 400, "CP^2#(S^2xS^2)" ], [ 2486, "Gaifullin CP^2" ], [128X[104X410[4X[28X [ 4401, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ][128X[104X411[4X[28X gap> c:=SCLib.Load(last[1][1]);; [128X[104X412[4X[28X gap> c1:=SCConnectedSum(c,c);;[128X[104X413[4X[28X gap> c2:=SCConnectedSumMinus(c,c);;[128X[104X414[4X[28X gap> q1:=SCIntersectionForm(c1);;[128X[104X415[4X[28X gap> q2:=SCIntersectionForm(c2);;[128X[104X416[4X[28X gap> PrintArray(q1);[128X[104X417[4X[28X [ [ 1, 0 ],[128X[104X418[4X[28X [ 0, 1 ] ][128X[104X419[4X[28X gap> PrintArray(q2);[128X[104X420[4X[28X [ [ 1, 0 ],[128X[104X421[4X[28X [ 0, -1 ] ][128X[104X422[4X[28X [128X[104X423[4X[32X[104X424425[1X8.2-7 SCIntersectionFormParity[101X426427[29X[2XSCIntersectionFormParity[102X( [3Xcomplex[103X ) [32X method428[6XReturns:[106X [33X[0;10Y[10X0[110X or [10X1[110X upon success, [9Xfail[109X otherwise.[133X429430[33X[0;0YComputes the parity of the intersection form of a combinatorial manifold431[3Xcomplex[103X (see [2XSCIntersectionForm[102X ([14X8.2-6[114X)). If the intersection for is even432(i. e. all diagonal entries are even numbers) [10X0[110X is returned, otherwise [10X1[110X is433returned.[133X434435[4X[32X Example [32X[104X436[4X[28X gap> SCLib.SearchByName("S^2xS^2");[128X[104X437[4X[28X [ [ 59, "S^2xS^2" ], [ 134, "S^2xS^2 (VT)" ], [ 135, "S^2xS^2 (VT)" ], [128X[104X438[4X[28X [ 136, "S^2xS^2 (VT)" ], [ 137, "(S^2xS^2)#(S^2xS^2)" ], [128X[104X439[4X[28X [ 360, "(S^2xS^2)#(S^2xS^2) (VT)" ], [ 361, "(S^2xS^2)#(S^2xS^2) (VT)" ], [128X[104X440[4X[28X [ 400, "CP^2#(S^2xS^2)" ] ][128X[104X441[4X[28X gap> c:=SCLib.Load(last[1][1]);; [128X[104X442[4X[28X gap> SCIntersectionFormParity(c);[128X[104X443[4X[28X 0[128X[104X444[4X[28X gap> SCLib.SearchByName("CP^2"); [128X[104X445[4X[28X [ [ 16, "CP^2 (VT)" ], [ 99, "CP^2#-CP^2" ], [ 100, "CP^2#CP^2" ], [128X[104X446[4X[28X [ 400, "CP^2#(S^2xS^2)" ], [ 2486, "Gaifullin CP^2" ], [128X[104X447[4X[28X [ 4401, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ][128X[104X448[4X[28X gap> c:=SCLib.Load(last[1][1]);; [128X[104X449[4X[28X gap> SCIntersectionFormParity(c);[128X[104X450[4X[28X 1[128X[104X451[4X[28X [128X[104X452[4X[32X[104X453454[1X8.2-8 SCIntersectionFormDimensionality[101X455456[29X[2XSCIntersectionFormDimensionality[102X( [3Xcomplex[103X ) [32X method457[6XReturns:[106X [33X[0;10Yan integer upon success, [9Xfail[109X otherwise.[133X458459[33X[0;0YReturns the dimensionality of the intersection form of a combinatorial460manifold [3Xcomplex[103X, i. e. the length of a minimal generating set of H[22X^k (M)[122X461(where [22X2k[122X is the dimension of [3Xcomplex[103X). See [2XSCIntersectionForm[102X ([14X8.2-6[114X) for462further details.[133X463464[4X[32X Example [32X[104X465[4X[28X gap> SCLib.SearchByName("CP^2"); [128X[104X466[4X[28X [ [ 16, "CP^2 (VT)" ], [ 99, "CP^2#-CP^2" ], [ 100, "CP^2#CP^2" ], [128X[104X467[4X[28X [ 400, "CP^2#(S^2xS^2)" ], [ 2486, "Gaifullin CP^2" ], [128X[104X468[4X[28X [ 4401, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ][128X[104X469[4X[28X gap> c:=SCLib.Load(last[1][1]);; [128X[104X470[4X[28X gap> SCIntersectionFormParity(c);[128X[104X471[4X[28X 1[128X[104X472[4X[28X gap> SCCohomology(c);[128X[104X473[4X[28X [ [ 1, [ ] ], [ 0, [ ] ], [ 1, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ][128X[104X474[4X[28X gap> SCIntersectionFormDimensionality(c);[128X[104X475[4X[28X 1[128X[104X476[4X[28X gap> d:=SCConnectedProduct(c,10);;[128X[104X477[4X[28X gap> SCIntersectionFormDimensionality(d);[128X[104X478[4X[28X 10[128X[104X479[4X[28X [128X[104X480[4X[32X[104X481482[1X8.2-9 SCIntersectionFormSignature[101X483484[29X[2XSCIntersectionFormSignature[102X( [3Xcomplex[103X ) [32X method485[6XReturns:[106X [33X[0;10Ya triple of integers upon success, [9Xfail[109X otherwise.[133X486487[33X[0;0YComputes the dimensionality (see [2XSCIntersectionFormDimensionality[102X ([14X8.2-8[114X))488and the signature of the intersection form of a combinatorial manifold489[3Xcomplex[103X as a [22X3[122X-tuple that contains the dimensionality in the first entry and490the number of positive / negative eigenvalues in the second and third entry.491See [2XSCIntersectionForm[102X ([14X8.2-6[114X) for further details.[133X492493[33X[0;0YInternally calls the [5XGAP[105X-functions [10XMatrix_CharacteristicPolynomialSameField[110X494and [10XCoefficientsOfLaurentPolynomial[110X to compute the number of positive /495negative eigenvalues of the intersection form.[133X496497[4X[32X Example [32X[104X498[4X[28X gap> SCLib.SearchByName("CP^2"); [128X[104X499[4X[28X [ [ 16, "CP^2 (VT)" ], [ 99, "CP^2#-CP^2" ], [ 100, "CP^2#CP^2" ], [128X[104X500[4X[28X [ 400, "CP^2#(S^2xS^2)" ], [ 2486, "Gaifullin CP^2" ], [128X[104X501[4X[28X [ 4401, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ][128X[104X502[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X503[4X[28X gap> SCIntersectionFormParity(c);[128X[104X504[4X[28X 1[128X[104X505[4X[28X gap> SCCohomology(c);[128X[104X506[4X[28X [ [ 1, [ ] ], [ 0, [ ] ], [ 1, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ][128X[104X507[4X[28X gap> SCIntersectionFormSignature(c);[128X[104X508[4X[28X [ 1, 0, 1 ][128X[104X509[4X[28X gap> d:=SCConnectedSum(c,c); [128X[104X510[4X[28X [SimplicialComplex[128X[104X511[4X[28X [128X[104X512[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X513[4X[28X [128X[104X514[4X[28X Name="CP^2 (VT)#+-CP^2 (VT)"[128X[104X515[4X[28X Dim=4[128X[104X516[4X[28X [128X[104X517[4X[28X /SimplicialComplex][128X[104X518[4X[28X gap> SCIntersectionFormSignature(d);[128X[104X519[4X[28X [ 2, 2, 0 ][128X[104X520[4X[28X gap> d:=SCConnectedSumMinus(c,c);;[128X[104X521[4X[28X gap> SCIntersectionFormSignature(d);[128X[104X522[4X[28X [ 2, 1, 1 ][128X[104X523[4X[28X [128X[104X524[4X[32X[104X525526527528