  
  [1X8 [33X[0;0Y(Co-)Homology of simplicial complexes[133X[101X
  
  [33X[0;0YAlthough [5Xsimpcomp[105X makes use of the [5XGAP[105X package ''homology'' [DHSW04] for its
  homology   calculations  whenever  possible  (due  to  efficiency  reasons),
  [5Xsimpcomp[105X  comes  with  an  own  (co-)homology  algorithm  as  well  as  some
  additional  homology  related functionality, which will be explained in this
  chapter.[133X
  
  
  [1X8.1 [33X[0;0YHomology computation[133X[101X
  
  [33X[0;0YApart  from  calculating  boundaries  of simplices, boundary matrices or the
  simplicial  homology  of a given complex, [5Xsimpcomp[105X is also able to compute a
  basis of the homology groups.[133X
  
  [1X8.1-1 SCBoundaryOperatorMatrix[101X
  
  [29X[2XSCBoundaryOperatorMatrix[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya rectangular matrix upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YCalculates the matrix of the boundary operator [22X∂_[3Xk+1[103X[122X of a simplicial complex
  [3Xcomplex[103X. Note that each column contains the boundaries of a [3Xk[103X[22X+1[122X-simplex as a
  list  of oriented [3Xk[103X-simplices and that the matrix is stored as a list of row
  vectors (as usual in GAP).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCFromFacets([[1,2,3],[1,2,6],[1,3,5],[1,4,5],[1,4,6],\
[128X[104X
    [4X[28X                       [2,3,4],[2,4,5],[2,5,6],[3,4,6],[3,5,6]]);;
[128X[104X
    [4X[28X gap> mat:=SCBoundaryOperatorMatrix(c,1);
[128X[104X
    [4X[28X [ [ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X   [ -1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X   [ 0, -1, 0, 0, 0, -1, 0, 0, 0, 1, 1, 1, 0, 0, 0 ], [128X[104X
    [4X[28X   [ 0, 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 1, 1, 0 ], [128X[104X
    [4X[28X   [ 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, -1, 0, 1 ], [128X[104X
    [4X[28X   [ 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, -1, 0, -1, -1 ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.1-2 SCBoundarySimplex[101X
  
  [29X[2XSCBoundarySimplex[102X( [3Xsimplex[103X, [3Xorientation[103X ) [32X function
  [6XReturns:[106X  [33X[0;10Ya list upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YCalculates  the  boundary of a given [3Xsimplex[103X. If the flag [3Xorientation[103X is set
  to  [9Xtrue[109X,  the function returns the boundary as a list of oriented simplices
  of  the  form [ ORIENTATION, SIMPLEX ], where ORIENTATION is either +1 or -1
  and  a  value of +1 means that SIMPLEX is positively oriented and a value of
  -1  that  SIMPLEX is negatively oriented. If [3Xorientation[103X is set to [9Xfalse[109X, an
  unoriented list of simplices is returned.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCBoundarySimplex([1..5],true);
[128X[104X
    [4X[28X [ [ -1, [ 2, 3, 4, 5 ] ], [ 1, [ 1, 3, 4, 5 ] ], [ -1, [ 1, 2, 4, 5 ] ], [128X[104X
    [4X[28X   [ 1, [ 1, 2, 3, 5 ] ], [ -1, [ 1, 2, 3, 4 ] ] ][128X[104X
    [4X[28X gap> SCBoundarySimplex([1..5],false);
[128X[104X
    [4X[28X [ [ 2, 3, 4, 5 ], [ 1, 3, 4, 5 ], [ 1, 2, 4, 5 ], [ 1, 2, 3, 5 ], [128X[104X
    [4X[28X   [ 1, 2, 3, 4 ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.1-3 SCHomologyBasis[101X
  
  [29X[2XSCHomologyBasis[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya list of pairs of the form [10X[ integer, list of linear combinations
            of simplices ][110X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YCalculates  a  set  of  basis  elements for the [3Xk[103X-dimensional homology group
  (with  integer coefficients) of a simplicial complex [3Xcomplex[103X. The entries of
  the  returned  list are of the form [ MODULUS, [ BASEELM1, BASEELM2, ...] ],
  where  the value MODULUS is 1 for the basis elements of the free part of the
  [3Xk[103X-th  homology  group and [22Xq≥ 2[122X for the basis elements of the [22Xq[122X-torsion part.
  In  contrast  to  the  function [2XSCHomologyBasisAsSimplices[102X ([14X8.1-4[114X) the basis
  elements  are  stored  as  lists of coefficient-index pairs referring to the
  simplices  of  the  complex,  i.e.  a basis element of the form [22X[ [ λ_1, i],
  [λ_2,  j],  dots  ]  dots[122X encodes the linear combination of simplices of the
  form [22Xλ_1*∆_1+λ_2*∆_2[122X with [22X∆_1[122X=[10XSCSkel(complex,k)[i][110X, [22X∆_2[122X=[10XSCSkel(complex,k)[j][110X
  and so on.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("(S^2xS^1)#RP^3");
[128X[104X
    [4X[28X [ [ 590, "(S^2xS^1)#RP^3" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> SCHomologyBasis(c,1);
[128X[104X
    [4X[28X [ [ 1, [ [ 1, 12 ], [ -1, 7 ], [ 1, 1 ] ] ], [128X[104X
    [4X[28X   [ 2, [ [ 1, 68 ], [ -1, 69 ], [ -1, 71 ], [ 2, 72 ], [ -2, 73 ] ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.1-4 SCHomologyBasisAsSimplices[101X
  
  [29X[2XSCHomologyBasisAsSimplices[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya list of pairs of the form [10X[ integer, list of linear combinations
            of simplices ][110X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YCalculates  a  set  of  basis  elements for the [3Xk[103X-dimensional homology group
  (with  integer coefficients) of a simplicial complex [3Xcomplex[103X. The entries of
  the  returned  list are of the form [ MODULUS, [ BASEELM1, BASEELM2, ...] ],
  where  the value MODULUS is 1 for the basis elements of the free part of the
  [3Xk[103X-th  homology  group and [22Xq≥ 2[122X for the basis elements of the [22Xq[122X-torsion part.
  In  contrast  to the function [2XSCHomologyBasis[102X ([14X8.1-3[114X) the basis elements are
  stored  as  lists  of coefficient-simplex pairs, i.e. a basis element of the
  form  [22X[  [  λ_1,  ∆_1], [λ_2, ∆_2], dots ][122X encodes the linear combination of
  simplices of the form [22Xλ_1*∆_1+λ_2*∆_2 + dots[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("(S^2xS^1)#RP^3");
[128X[104X
    [4X[28X [ [ 590, "(S^2xS^1)#RP^3" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> SCHomologyBasisAsSimplices(c,1);
[128X[104X
    [4X[28X [ [ 1, [ [ 1, [ 2, 8 ] ], [ -1, [ 1, 8 ] ], [ 1, [ 1, 2 ] ] ] ], [128X[104X
    [4X[28X   [ 2, [128X[104X
    [4X[28X       [ [ 1, [ 11, 12 ] ], [ -1, [ 11, 13 ] ], [ -1, [ 12, 13 ] ], [128X[104X
    [4X[28X           [ 2, [ 12, 14 ] ], [ -2, [ 13, 14 ] ] ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.1-5 SCHomologyInternal[101X
  
  [29X[2XSCHomologyInternal[102X( [3Xcomplex[103X ) [32X function
  [6XReturns:[106X  [33X[0;10Ya  list  of pairs of the form [10X[ integer, list ][110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YThis   function  computes  the  reduced  simplicial  homology  with  integer
  coefficients   of   a   given   simplicial   complex  [3Xcomplex[103X  with  integer
  coefficients. It uses the algorithm described in [DKT08].[133X
  
  [33X[0;0YThe  output is a list of homology groups of the form [22X[H_0,....,H_d][122X, where [22Xd[122X
  is  the dimension of [3Xcomplex[103X. The format of the homology groups [22XH_i[122X is given
  in terms of their maximal cyclic subgroups, i.e. a homology group [22XH_i≅ Z^f +
  Z  /  t_1  Z  ×  dots  ×  Z  /  t_n  Z[122X  is  returned  in form of a list [22X[ f,
  [t_1,...,t_n]  ][122X,  where [22Xf[122X is the (integer) free part of [22XH_i[122X and [22Xt_i[122X denotes
  the  torsion  parts  of  [22XH_i[122X  ordered  in  weakly  incresing  size. See also
  [2XSCHomology[102X ([14X7.3-9[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCSurface(1,false);;
[128X[104X
    [4X[28X gap> SCHomologyInternal(c);
[128X[104X
    [4X[28X [ [ 0, [  ] ], [ 0, [ 2 ] ], [ 0, [  ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  
  [1X8.2 [33X[0;0YCohomology computation[133X[101X
  
  [33X[0;0Y[5Xsimpcomp[105X  can  also  compute  the cohomology groups of simplicial complexes,
  bases  of  these  cohomology groups, the cup product of two cocycles and the
  intersection form of (orientable) 4-manifolds.[133X
  
  [1X8.2-1 SCCoboundaryOperatorMatrix[101X
  
  [29X[2XSCCoboundaryOperatorMatrix[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya rectangular matrix upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YCalculates  the  matrix  of  the  coboundary operator [22Xd^[3Xk+1[103X[122X as a list of row
  vectors.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCFromFacets([[1,2,3],[1,2,6],[1,3,5],[1,4,5],[1,4,6],\
[128X[104X
    [4X[28X                       [2,3,4],[2,4,5],[2,5,6],[3,4,6],[3,5,6]]);
[128X[104X
    [4X[28X > [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="unnamed complex 2"[128X[104X
    [4X[28X  Dim=2[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> mat:=SCCoboundaryOperatorMatrix(c,1);
[128X[104X
    [4X[28X [ [ -1, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X   [ -1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X   [ 0, -1, 0, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0 ], [128X[104X
    [4X[28X   [ 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0 ], [128X[104X
    [4X[28X   [ 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0 ], [128X[104X
    [4X[28X   [ 0, 0, 0, 0, 0, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X   [ 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, -1, 0, 0 ], [128X[104X
    [4X[28X   [ 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, -1 ], [128X[104X
    [4X[28X   [ 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, -1, 0 ], [128X[104X
    [4X[28X   [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, -1 ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.2-2 SCCohomology[101X
  
  [29X[2XSCCohomology[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya  list  of pairs of the form [10X[ integer, list ][110X upon success, [9Xfail[109X
            otherwise.[133X
  
  [33X[0;0YThis   function  computes  the  simplicial  cohomology  groups  of  a  given
  simplicial  complex [3Xcomplex[103X with integer coefficients. It uses the algorithm
  described in [DKT08].[133X
  
  [33X[0;0YThe  output is a list of cohomology groups of the form [22X[H^0,....,H^d][122X, where
  [22Xd[122X  is  the  dimension of [3Xcomplex[103X. The format of the cohomology groups [22XH^i[122X is
  given  in  terms  of their maximal cyclic subgroups, i.e. a cohomology group
  [22XH^i≅  Z^f  + Z / t_1 Z × dots × Z / t_n Z[122X is returned in form of a list [22X[ f,
  [t_1,...,t_n]  ][122X,  where [22Xf[122X is the (integer) free part of [22XH^i[122X and [22Xt_i[122X denotes
  the torsion parts of [22XH^i[122X ordered in weakly increasing size.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> c:=SCFromFacets([[1,2,3],[1,2,6],[1,3,5],[1,4,5],[1,4,6],
[128X[104X
    [4X[28X                       [2,3,4],[2,4,5],[2,5,6],[3,4,6],[3,5,6]]);
[128X[104X
    [4X[28X > [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="unnamed complex 4"[128X[104X
    [4X[28X  Dim=2[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> SCCohomology(c);
[128X[104X
    [4X[28X [ [ 1, [  ] ], [ 0, [  ] ], [ 0, [ 2 ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.2-3 SCCohomologyBasis[101X
  
  [29X[2XSCCohomologyBasis[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya list of pairs of the form [10X[ integer, list of linear combinations
            of simplices ][110X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YCalculates  a  set  of basis elements for the [3Xk[103X-dimensional cohomology group
  (with  integer coefficients) of a simplicial complex [3Xcomplex[103X. The entries of
  the  returned  list are of the form [ MODULUS, [ BASEELM1, BASEELM2, ...] ],
  where  the value MODULUS is 1 for the basis elements of the free part of the
  [3Xk[103X-th  homology  group and [22Xq≥ 2[122X for the basis elements of the [22Xq[122X-torsion part.
  In  contrast  to the function [2XSCCohomologyBasisAsSimplices[102X ([14X8.2-4[114X) the basis
  elements  are  stored  as  lists of coefficient-index pairs referring to the
  linear  forms  dual to the simplices in the [22Xk[122X-th cochain complex of [3Xcomplex[103X,
  i.e.  a basis element of the form [22X[ [ λ_1, i], [λ_2, j], dots ] dots[122X encodes
  the  linear  combination  of  simplices  (or  their dual linear forms in the
  corresponding   cochain   complex)   of   the   form   [22Xλ_1*∆_1+λ_2*∆_2[122X  with
  [22X∆_1[122X=[10XSCSkel(complex,k)[i][110X, [22X∆_2[122X=[10XSCSkel(complex,k)[j][110X and so on.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("SU(3)/SO(3)");   
[128X[104X
    [4X[28X [ [ 563, "SU(3)/SO(3) (VT)" ], [ 7276, "SU(3)/SO(3) (VT)" ], [128X[104X
    [4X[28X   [ 7418, "SU(3)/SO(3) (VT)" ], [ 7419, "SU(3)/SO(3) (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> SCCohomologyBasis(c,3); 
[128X[104X
    [4X[28X [ [ 2, [ [ -9, 259 ], [ 9, 262 ], [ 9, 263 ], [ -9, 270 ], [ 9, 271 ], [128X[104X
    [4X[28X           [ -9, 273 ], [ -9, 274 ], [ -18, 275 ], [ -9, 276 ], [ 9, 278 ], [128X[104X
    [4X[28X           [ -9, 279 ], [ -9, 280 ], [ 3, 283 ], [ -3, 285 ], [ 3, 289 ], [128X[104X
    [4X[28X           [ -3, 294 ], [ 3, 310 ], [ -3, 313 ], [ 3, 316 ], [ -1, 317 ], [128X[104X
    [4X[28X           [ -6, 318 ], [ 3, 319 ], [ -6, 320 ], [ 6, 321 ], [ 1, 322 ], [128X[104X
    [4X[28X           [ 3, 325 ], [ -1, 328 ], [ 6, 330 ], [ -2, 331 ], [ 12, 332 ], [128X[104X
    [4X[28X           [ 7, 333 ], [ -5, 334 ], [ 1, 345 ], [ 3, 355 ], [ -9, 357 ], [128X[104X
    [4X[28X           [ 9, 358 ], [ 1, 363 ], [ 12, 365 ], [ -9, 366 ], [ -3, 370 ], [128X[104X
    [4X[28X           [ -1, 371 ], [ -3, 372 ], [ 8, 373 ], [ -1, 374 ], [ 6, 375 ], [128X[104X
    [4X[28X           [ 9, 376 ], [ 3, 377 ], [ 1, 380 ], [ 3, 383 ], [ -8, 385 ], [128X[104X
    [4X[28X           [ -9, 386 ], [ -9, 388 ], [ -18, 404 ], [ 9, 410 ], [ -9, 425 ], [128X[104X
    [4X[28X           [ -18, 426 ], [ -9, 427 ], [ 9, 428 ], [ -9, 429 ], [ 3, 433 ], [128X[104X
    [4X[28X           [ -3, 435 ], [ -9, 437 ], [ 10, 442 ], [ 12, 445 ], [ 1, 447 ], [128X[104X
    [4X[28X           [ -19, 448 ], [ 2, 449 ], [ -1, 450 ], [ -9, 451 ], [ 3, 453 ], [128X[104X
    [4X[28X           [ 1, 455 ], [ 1, 457 ], [ -11, 458 ], [ -9, 459 ], [ 9, 461 ], [128X[104X
    [4X[28X           [ 9, 462 ], [ -9, 468 ], [ 9, 469 ], [ -18, 471 ], [ -9, 472 ], [128X[104X
    [4X[28X           [ 9, 474 ], [ -9, 475 ], [ 9, 488 ], [ 9, 495 ], [ -9, 500 ], [128X[104X
    [4X[28X           [ -3, 504 ], [ 9, 505 ], [ 9, 512 ], [ 9, 515 ], [ 6, 519 ], [128X[104X
    [4X[28X           [ 18, 521 ], [ -15, 523 ], [ 9, 524 ], [ -3, 525 ], [ 18, 527 ], [128X[104X
    [4X[28X           [ -18, 528 ], [ 6, 529 ], [ 6, 531 ], [ 12, 532 ] ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.2-4 SCCohomologyBasisAsSimplices[101X
  
  [29X[2XSCCohomologyBasisAsSimplices[102X( [3Xcomplex[103X, [3Xk[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya  list  of  pars  of  the  form  [10X[ integer, linear combination of
            simplices ][110X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YCalculates  a  set  of basis elements for the [3Xk[103X-dimensional cohomology group
  (with  integer coefficients) of a simplicial complex [3Xcomplex[103X. The entries of
  the  returned  list are of the form [ MODULUS, [ BASEELM1, BASEELM2, ...] ],
  where  the value MODULUS is 1 for the basis elements of the free part of the
  [3Xk[103X-th  homology  group and [22Xq≥ 2[122X for the basis elements of the [22Xq[122X-torsion part.
  In contrast to the function [2XSCCohomologyBasis[102X ([14X8.2-3[114X) the basis elements are
  stored  as  lists of coefficient-simplex pairs referring to the linear forms
  dual  to  the simplices in the [22Xk[122X-th cochain complex of [3Xcomplex[103X, i.e. a basis
  element  of  the  form  [22X[  [  λ_1, ∆_i], [λ_2, ∆_j], dots ] dots[122X encodes the
  linear  combination  of  simplices  (or  their  dual  linear  forms  in  the
  corresponding cochain complex) of the form [22Xλ_1*∆_1+λ_2*∆_2 + dots[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("SU(3)/SO(3)");   
[128X[104X
    [4X[28X [ [ 563, "SU(3)/SO(3) (VT)" ], [ 7276, "SU(3)/SO(3) (VT)" ], [128X[104X
    [4X[28X   [ 7418, "SU(3)/SO(3) (VT)" ], [ 7419, "SU(3)/SO(3) (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> SCCohomologyBasisAsSimplices(c,3);
[128X[104X
    [4X[28X [ [ 2, [128X[104X
    [4X[28X       [ [ -9, [ 2, 7, 8, 9 ] ], [ 9, [ 2, 7, 8, 12 ] ], [128X[104X
    [4X[28X           [ 9, [ 2, 7, 8, 13 ] ], [ -9, [ 2, 7, 11, 12 ] ], [128X[104X
    [4X[28X           [ 9, [ 2, 7, 11, 13 ] ], [ -9, [ 2, 8, 9, 10 ] ], [128X[104X
    [4X[28X           [ -9, [ 2, 8, 9, 11 ] ], [ -18, [ 2, 8, 9, 12 ] ], [128X[104X
    [4X[28X           [ -9, [ 2, 8, 9, 13 ] ], [ 9, [ 2, 8, 10, 12 ] ], [128X[104X
    [4X[28X           [ -9, [ 2, 8, 10, 13 ] ], [ -9, [ 2, 8, 11, 12 ] ], [128X[104X
    [4X[28X           [ 3, [ 2, 9, 10, 12 ] ], [ -3, [ 2, 9, 11, 12 ] ], [128X[104X
    [4X[28X           [ 3, [ 3, 4, 5, 7 ] ], [ -3, [ 3, 4, 5, 12 ] ], [128X[104X
    [4X[28X           [ 3, [ 3, 4, 10, 12 ] ], [ -3, [ 3, 5, 6, 7 ] ], [128X[104X
    [4X[28X           [ 3, [ 3, 5, 6, 11 ] ], [ -1, [ 3, 5, 6, 13 ] ], [128X[104X
    [4X[28X           [ -6, [ 3, 5, 7, 8 ] ], [ 3, [ 3, 5, 7, 10 ] ], [128X[104X
    [4X[28X           [ -6, [ 3, 5, 7, 11 ] ], [ 6, [ 3, 5, 7, 12 ] ], [128X[104X
    [4X[28X           [ 1, [ 3, 5, 7, 13 ] ], [ 3, [ 3, 5, 8, 12 ] ], [128X[104X
    [4X[28X           [ -1, [ 3, 5, 9, 13 ] ], [ 6, [ 3, 5, 10, 12 ] ], [128X[104X
    [4X[28X           [ -2, [ 3, 5, 10, 13 ] ], [ 12, [ 3, 5, 11, 12 ] ], [128X[104X
    [4X[28X           [ 7, [ 3, 5, 11, 13 ] ], [ -5, [ 3, 5, 12, 13 ] ], [128X[104X
    [4X[28X           [ 1, [ 3, 6, 9, 13 ] ], [ 3, [ 3, 7, 10, 12 ] ], [128X[104X
    [4X[28X           [ -9, [ 3, 7, 11, 12 ] ], [ 9, [ 3, 7, 11, 13 ] ], [128X[104X
    [4X[28X           [ 1, [ 3, 8, 9, 13 ] ], [ 12, [ 3, 8, 10, 12 ] ], [128X[104X
    [4X[28X           [ -9, [ 3, 8, 10, 13 ] ], [ -3, [ 3, 9, 10, 12 ] ], [128X[104X
    [4X[28X           [ -1, [ 3, 9, 10, 13 ] ], [ -3, [ 3, 9, 11, 12 ] ], [128X[104X
    [4X[28X           [ 8, [ 3, 9, 11, 13 ] ], [ -1, [ 3, 9, 12, 13 ] ], [128X[104X
    [4X[28X           [ 6, [ 3, 10, 11, 12 ] ], [ 9, [ 3, 10, 11, 13 ] ], [128X[104X
    [4X[28X           [ 3, [ 3, 10, 12, 13 ] ], [ 1, [ 4, 5, 6, 8 ] ], [128X[104X
    [4X[28X           [ 3, [ 4, 5, 6, 11 ] ], [ -8, [ 4, 5, 6, 13 ] ], [128X[104X
    [4X[28X           [ -9, [ 4, 5, 7, 8 ] ], [ -9, [ 4, 5, 7, 11 ] ], [128X[104X
    [4X[28X           [ -18, [ 4, 6, 8, 9 ] ], [ 9, [ 4, 6, 9, 13 ] ], [128X[104X
    [4X[28X           [ -9, [ 4, 8, 9, 10 ] ], [ -18, [ 4, 8, 9, 12 ] ], [128X[104X
    [4X[28X           [ -9, [ 4, 8, 9, 13 ] ], [ 9, [ 4, 8, 10, 12 ] ], [128X[104X
    [4X[28X           [ -9, [ 4, 8, 10, 13 ] ], [ 3, [ 4, 9, 10, 12 ] ], [128X[104X
    [4X[28X           [ -3, [ 4, 9, 11, 12 ] ], [ -9, [ 4, 9, 12, 13 ] ], [128X[104X
    [4X[28X           [ 10, [ 5, 6, 7, 8 ] ], [ 12, [ 5, 6, 7, 11 ] ], [128X[104X
    [4X[28X           [ 1, [ 5, 6, 7, 13 ] ], [ -19, [ 5, 6, 8, 9 ] ], [128X[104X
    [4X[28X           [ 2, [ 5, 6, 8, 11 ] ], [ -1, [ 5, 6, 8, 12 ] ], [128X[104X
    [4X[28X           [ -9, [ 5, 6, 8, 13 ] ], [ 3, [ 5, 6, 9, 11 ] ], [128X[104X
    [4X[28X           [ 1, [ 5, 6, 9, 13 ] ], [ 1, [ 5, 6, 10, 13 ] ], [128X[104X
    [4X[28X           [ -11, [ 5, 6, 11, 13 ] ], [ -9, [ 5, 7, 8, 9 ] ], [128X[104X
    [4X[28X           [ 9, [ 5, 7, 8, 12 ] ], [ 9, [ 5, 7, 8, 13 ] ], [128X[104X
    [4X[28X           [ -9, [ 5, 7, 11, 12 ] ], [ 9, [ 5, 7, 11, 13 ] ], [128X[104X
    [4X[28X           [ -18, [ 5, 8, 9, 12 ] ], [ -9, [ 5, 8, 9, 13 ] ], [128X[104X
    [4X[28X           [ 9, [ 5, 8, 10, 12 ] ], [ -9, [ 5, 8, 11, 12 ] ], [128X[104X
    [4X[28X           [ 9, [ 6, 7, 8, 13 ] ], [ 9, [ 6, 7, 11, 13 ] ], [128X[104X
    [4X[28X           [ -9, [ 6, 8, 10, 13 ] ], [ -3, [ 6, 9, 11, 12 ] ], [128X[104X
    [4X[28X           [ 9, [ 6, 9, 11, 13 ] ], [ 9, [ 7, 8, 9, 13 ] ], [128X[104X
    [4X[28X           [ 9, [ 7, 8, 11, 12 ] ], [ 6, [ 7, 9, 11, 12 ] ], [128X[104X
    [4X[28X           [ 18, [ 7, 11, 12, 13 ] ], [ -15, [ 8, 9, 10, 12 ] ], [128X[104X
    [4X[28X           [ 9, [ 8, 9, 10, 13 ] ], [ -3, [ 8, 9, 11, 12 ] ], [128X[104X
    [4X[28X           [ 18, [ 8, 10, 11, 12 ] ], [ -18, [ 8, 10, 12, 13 ] ], [128X[104X
    [4X[28X           [ 6, [ 9, 10, 11, 12 ] ], [ 6, [ 9, 10, 12, 13 ] ], [128X[104X
    [4X[28X           [ 12, [ 9, 11, 12, 13 ] ] ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.2-5 SCCupProduct[101X
  
  [29X[2XSCCupProduct[102X( [3Xcomplex[103X, [3Xcocycle1[103X, [3Xcocycle2[103X ) [32X function
  [6XReturns:[106X  [33X[0;10Ya list of pairs of the form [10X[ ORIENTATION, SIMPLEX ][110X upon success,
            [9Xfail[109X otherwise.[133X
  
  [33X[0;0YThe  cup  product is a method of adjoining two cocycles of degree [22Xp[122X and [22Xq[122X to
  form a composite cocycle of degree [22Xp + q[122X. It endows the cohomology groups of
  a simplicial complex with the structure of a ring.[133X
  
  [33X[0;0YThe  construction  of  the cup product starts with a product of cochains: if
  [3Xcocycle1[103X  is a p-cochain and [3Xcocylce2[103X is a q-cochain of a simplicial complex
  [3Xcomplex[103X (given as list of oriented p- (q-)simplices), then[133X
  
  [33X[0;0Y[3Xcocycle1[103X  [22X⌣[122X  [3Xcocycle2[103X[22X(σ) =[122X[3Xcocycle1[103X[22X(σ ∘ ι_0,1, ... p) ⋅[122X [3Xcocycle2[103X[22X(σ ∘ ι_p, p+1
  ,..., p + q)[122X[133X
  
  [33X[0;0Ywhere  [22Xσ[122X  is  a  [22Xp  + q[122X-simplex and [22Xι_S[122X, [22XS ⊂ {0,1,...,p+q }[122X is the canonical
  embedding of the simplex spanned by [22XS[122X into the [22X(p + q)[122X-standard simplex.[133X
  
  [33X[0;0Y[22Xσ ∘ ι_0,1, ..., p[122X is called the [22Xp[122X-th front face and [22Xσ ∘ ι_p, p+1, ..., p + q[122X
  is the [22Xq[122X-th back face of [22Xσ[122X, respectively.[133X
  
  [33X[0;0YNote  that  this  function  only  computes  the cup product in the case that
  [3Xcomplex[103X  is an orientable weak pseudomanifold of dimension [22X2k[122X and [22Xp = q = k[122X.
  Furthermore,  [3Xcomplex[103X  must be given in standard labeling, with sorted facet
  list and [3Xcocylce1[103X and [3Xcocylce2[103X must be given in simplex notation and labeled
  accordingly. Note that the latter condition is usually fulfilled in case the
  cocycles were computed using [2XSCCohomologyBasisAsSimplices[102X ([14X8.2-4[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("K3");
[128X[104X
    [4X[28X [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;                                     
[128X[104X
    [4X[28X gap> basis:=SCCohomologyBasisAsSimplices(c,2);;
[128X[104X
    [4X[28X gap> SCCupProduct(c,basis[1][2],basis[1][2]);
[128X[104X
    [4X[28X [ [ 1, [ 1, 2, 4, 7, 11 ] ], [ 1, [ 2, 3, 4, 5, 9 ] ] ][128X[104X
    [4X[28X gap> SCCupProduct(c,basis[1][2],basis[2][2]);
[128X[104X
    [4X[28X [ [ -1, [ 1, 2, 4, 7, 11 ] ], [ -1, [ 1, 2, 4, 7, 15 ] ], [128X[104X
    [4X[28X   [ -1, [ 2, 3, 4, 5, 9 ] ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.2-6 SCIntersectionForm[101X
  
  [29X[2XSCIntersectionForm[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya square matrix of integer values upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YFor  [22X2k[122X-dimensional orientable manifolds [22XM[122X the cup product (see [2XSCCupProduct[102X
  ([14X8.2-5[114X)) defines a bilinear form[133X
  
  [33X[0;0YH[22X^k ( M ) ×[122XH[22X^k ( M ) ->[122XH[22X^2k (M), (a,b) ↦ a ∪ b[122X[133X
  
  [33X[0;0Ycalled  the  intersection  form of [22XM[122X. This function returns the intersection
  form  of an orientable combinatorial [22X2k[122X-manifold [3Xcomplex[103X in form of a matrix
  [10Xmat[110X   with   respect   to   the   basis   of   H[22X^k  ([122X[3Xcomplex[103XM[22X)[122X  computed  by
  [2XSCCohomologyBasisAsSimplices[102X  ([14X8.2-4[114X). The matrix entry [10Xmat[i][j][110X equals the
  intersection  number  of the [10Xi[110X-th base element with the [10Xj[110X-th base element of
  H[22X^k ([122X[3Xcomplex[103XM[22X)[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("CP^2");       
[128X[104X
    [4X[28X [ [ 16, "CP^2 (VT)" ], [ 99, "CP^2#-CP^2" ], [ 100, "CP^2#CP^2" ], [128X[104X
    [4X[28X   [ 400, "CP^2#(S^2xS^2)" ], [ 2486, "Gaifullin CP^2" ], [128X[104X
    [4X[28X   [ 4401, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);; 
[128X[104X
    [4X[28X gap> c1:=SCConnectedSum(c,c);;
[128X[104X
    [4X[28X gap> c2:=SCConnectedSumMinus(c,c);;
[128X[104X
    [4X[28X gap> q1:=SCIntersectionForm(c1);;
[128X[104X
    [4X[28X gap> q2:=SCIntersectionForm(c2);;
[128X[104X
    [4X[28X gap> PrintArray(q1);
[128X[104X
    [4X[28X [ [  1,  0 ],[128X[104X
    [4X[28X   [  0,  1 ] ][128X[104X
    [4X[28X gap> PrintArray(q2);
[128X[104X
    [4X[28X [ [   1,   0 ],[128X[104X
    [4X[28X   [   0,  -1 ] ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.2-7 SCIntersectionFormParity[101X
  
  [29X[2XSCIntersectionFormParity[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Y[10X0[110X or [10X1[110X upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YComputes  the  parity  of  the intersection form of a combinatorial manifold
  [3Xcomplex[103X  (see  [2XSCIntersectionForm[102X  ([14X8.2-6[114X)). If the intersection for is even
  (i.  e. all diagonal entries are even numbers) [10X0[110X is returned, otherwise [10X1[110X is
  returned.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("S^2xS^2");
[128X[104X
    [4X[28X [ [ 59, "S^2xS^2" ], [ 134, "S^2xS^2 (VT)" ], [ 135, "S^2xS^2 (VT)" ], [128X[104X
    [4X[28X   [ 136, "S^2xS^2 (VT)" ], [ 137, "(S^2xS^2)#(S^2xS^2)" ], [128X[104X
    [4X[28X   [ 360, "(S^2xS^2)#(S^2xS^2) (VT)" ], [ 361, "(S^2xS^2)#(S^2xS^2) (VT)" ], [128X[104X
    [4X[28X   [ 400, "CP^2#(S^2xS^2)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;    
[128X[104X
    [4X[28X gap> SCIntersectionFormParity(c);
[128X[104X
    [4X[28X 0[128X[104X
    [4X[28X gap> SCLib.SearchByName("CP^2");       
[128X[104X
    [4X[28X [ [ 16, "CP^2 (VT)" ], [ 99, "CP^2#-CP^2" ], [ 100, "CP^2#CP^2" ], [128X[104X
    [4X[28X   [ 400, "CP^2#(S^2xS^2)" ], [ 2486, "Gaifullin CP^2" ], [128X[104X
    [4X[28X   [ 4401, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);; 
[128X[104X
    [4X[28X gap> SCIntersectionFormParity(c);
[128X[104X
    [4X[28X 1[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.2-8 SCIntersectionFormDimensionality[101X
  
  [29X[2XSCIntersectionFormDimensionality[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Yan integer upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YReturns  the  dimensionality  of  the  intersection  form of a combinatorial
  manifold  [3Xcomplex[103X,  i.  e. the length of a minimal generating set of H[22X^k (M)[122X
  (where  [22X2k[122X  is the dimension of [3Xcomplex[103X). See [2XSCIntersectionForm[102X ([14X8.2-6[114X) for
  further details.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("CP^2");       
[128X[104X
    [4X[28X [ [ 16, "CP^2 (VT)" ], [ 99, "CP^2#-CP^2" ], [ 100, "CP^2#CP^2" ], [128X[104X
    [4X[28X   [ 400, "CP^2#(S^2xS^2)" ], [ 2486, "Gaifullin CP^2" ], [128X[104X
    [4X[28X   [ 4401, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);; 
[128X[104X
    [4X[28X gap> SCIntersectionFormParity(c);
[128X[104X
    [4X[28X 1[128X[104X
    [4X[28X gap> SCCohomology(c);
[128X[104X
    [4X[28X [ [ 1, [  ] ], [ 0, [  ] ], [ 1, [  ] ], [ 0, [  ] ], [ 1, [  ] ] ][128X[104X
    [4X[28X gap> SCIntersectionFormDimensionality(c);
[128X[104X
    [4X[28X 1[128X[104X
    [4X[28X gap> d:=SCConnectedProduct(c,10);;
[128X[104X
    [4X[28X gap> SCIntersectionFormDimensionality(d);
[128X[104X
    [4X[28X 10[128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
  [1X8.2-9 SCIntersectionFormSignature[101X
  
  [29X[2XSCIntersectionFormSignature[102X( [3Xcomplex[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Ya triple of integers upon success, [9Xfail[109X otherwise.[133X
  
  [33X[0;0YComputes  the  dimensionality (see [2XSCIntersectionFormDimensionality[102X ([14X8.2-8[114X))
  and  the  signature  of  the  intersection  form of a combinatorial manifold
  [3Xcomplex[103X as a [22X3[122X-tuple that contains the dimensionality in the first entry and
  the number of positive / negative eigenvalues in the second and third entry.
  See [2XSCIntersectionForm[102X ([14X8.2-6[114X) for further details.[133X
  
  [33X[0;0YInternally  calls the [5XGAP[105X-functions [10XMatrix_CharacteristicPolynomialSameField[110X
  and  [10XCoefficientsOfLaurentPolynomial[110X  to  compute  the  number of positive /
  negative eigenvalues of the intersection form.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X gap> SCLib.SearchByName("CP^2");       
[128X[104X
    [4X[28X [ [ 16, "CP^2 (VT)" ], [ 99, "CP^2#-CP^2" ], [ 100, "CP^2#CP^2" ], [128X[104X
    [4X[28X   [ 400, "CP^2#(S^2xS^2)" ], [ 2486, "Gaifullin CP^2" ], [128X[104X
    [4X[28X   [ 4401, "(S^3~S^1)#(CP^2)^{#5} (VT)" ] ][128X[104X
    [4X[28X gap> c:=SCLib.Load(last[1][1]);;
[128X[104X
    [4X[28X gap> SCIntersectionFormParity(c);
[128X[104X
    [4X[28X 1[128X[104X
    [4X[28X gap> SCCohomology(c);
[128X[104X
    [4X[28X [ [ 1, [  ] ], [ 0, [  ] ], [ 1, [  ] ], [ 0, [  ] ], [ 1, [  ] ] ][128X[104X
    [4X[28X gap> SCIntersectionFormSignature(c);
[128X[104X
    [4X[28X [ 1, 0, 1 ][128X[104X
    [4X[28X gap> d:=SCConnectedSum(c,c);                           
[128X[104X
    [4X[28X [SimplicialComplex[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X
    [4X[28X [128X[104X
    [4X[28X  Name="CP^2 (VT)#+-CP^2 (VT)"[128X[104X
    [4X[28X  Dim=4[128X[104X
    [4X[28X [128X[104X
    [4X[28X /SimplicialComplex][128X[104X
    [4X[28X gap> SCIntersectionFormSignature(d);
[128X[104X
    [4X[28X [ 2, 2, 0 ][128X[104X
    [4X[28X gap> d:=SCConnectedSumMinus(c,c);;
[128X[104X
    [4X[28X gap> SCIntersectionFormSignature(d);
[128X[104X
    [4X[28X [ 2, 1, 1 ][128X[104X
    [4X[28X [128X[104X
  [4X[32X[104X
  
