GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1[1X5 [33X[0;0YThe GAP object types [10XSCSimplicialComplex[110X[101X[1X and [10XSCNormalSurface[110X[101X[1X[133X[101X23[33X[0;0YCurrently, the [5XGAP[105X package [5Xsimpcomp[105X supports data structures for two4different kinds of geometric objects, namely simplicial complexes5([10XSCSimplicialComplex[110X) and discrete normal surfaces ([10XSCNormalSurface[110X) which6are both subtypes of the [5XGAP[105X object type [10XSCPolyhedralComplex[110X[133X789[1X5.1 [33X[0;0YThe object type [10XSCSimplicialComplex[110X[101X[1X[133X[101X1011[33X[0;0YA major part of [5Xsimpcomp[105X deals with the object type [10XSCSimplicialComplex[110X. For12a complete list of properties that [10XSCSimplicialComplex[110X handles, see Chapter13[14X6[114X. For a few fundamental methods and functions (such as checking the object14class, copying objects of this type, etc.) for [10XSCSimplicialComplex[110X see15below.[133X1617[1X5.1-1 SCIsSimplicialComplex[101X1819[29X[2XSCIsSimplicialComplex[102X( [3Xobject[103X ) [32X filter20[6XReturns:[106X [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X upon success, [9Xfail[109X otherwise.[133X2122[33X[0;0YChecks if [3Xobject[103X is of type [10XSCSimplicialComplex[110X. The object type23[10XSCSimplicialComplex[110X is derived from the object type [10XSCPropertyObject[110X.[133X2425[4X[32X Example [32X[104X26[4X[28X gap> c:=SCEmpty();;[128X[104X27[4X[28X gap> SCIsSimplicialComplex(c);[128X[104X28[4X[28X true[128X[104X29[4X[28X [128X[104X30[4X[32X[104X3132[1X5.1-2 SCCopy[101X3334[29X[2XSCCopy[102X( [3Xcomplex[103X ) [32X method35[6XReturns:[106X [33X[0;10Ya copy of [3Xcomplex[103X upon success, [9Xfail[109X otherwise.[133X3637[33X[0;0YMakes a ``deep copy'' of [3Xcomplex[103X -- this is a copy such that all properties38of the copy can be altered without changing the original complex.[133X3940[4X[32X Example [32X[104X41[4X[28X gap> c:=SCBdSimplex(4);;[128X[104X42[4X[28X gap> d:=SCCopy(c)-1;;[128X[104X43[4X[28X gap> c.Facets=d.Facets;[128X[104X44[4X[28X false[128X[104X45[4X[28X [128X[104X46[4X[32X[104X4748[4X[32X Example [32X[104X49[4X[28X gap> c:=SCBdSimplex(4);;[128X[104X50[4X[28X gap> d:=SCCopy(c);;[128X[104X51[4X[28X gap> IsIdenticalObj(c,d);[128X[104X52[4X[28X false[128X[104X53[4X[28X [128X[104X54[4X[32X[104X5556[1X5.1-3 ShallowCopy (SCSimplicialComplex)[101X5758[29X[2XShallowCopy (SCSimplicialComplex)[102X( [3Xcomplex[103X ) [32X method59[6XReturns:[106X [33X[0;10Ya copy of [3Xcomplex[103X upon success, [9Xfail[109X otherwise.[133X6061[33X[0;0YMakes a copy of [3Xcomplex[103X. This is actually a ``deep copy'' such that all62properties of the copy can be altered without changing the original complex.63Internally calls [2XSCCopy[102X ([14X5.1-2[114X).[133X6465[4X[32X Example [32X[104X66[4X[28X gap> c:=SCBdCrossPolytope(7);;[128X[104X67[4X[28X gap> d:=ShallowCopy(c)+10;;[128X[104X68[4X[28X gap> c.Facets=d.Facets;[128X[104X69[4X[28X false[128X[104X70[4X[28X [128X[104X71[4X[32X[104X7273[1X5.1-4 SCPropertiesDropped[101X7475[29X[2XSCPropertiesDropped[102X( [3Xcomplex[103X ) [32X function76[6XReturns:[106X [33X[0;10Ya object of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X otherwise.[133X7778[33X[0;0YAn object of the type [10XSCSimplicialComplex[110X caches its previously calculated79properties such that each property only has to be calculated once. This80function returns a copy of [3Xcomplex[103X with all properties (apart from Facets,81Dim and Name) dropped, clearing all previously computed properties. See also82[2XSCPropertyDrop[102X ([14X18.1-8[114X) and [2XSCPropertyTmpDrop[102X ([14X18.1-13[114X).[133X8384[4X[32X Example [32X[104X85[4X[28X gap> c:=SC(SCFacets(SCBdCyclicPolytope(10,12)));[128X[104X86[4X[28X [SimplicialComplex[128X[104X87[4X[28X [128X[104X88[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X89[4X[28X [128X[104X90[4X[28X Name="unnamed complex 27"[128X[104X91[4X[28X Dim=9[128X[104X92[4X[28X [128X[104X93[4X[28X /SimplicialComplex][128X[104X94[4X[28X gap> c.F; time; [128X[104X95[4X[28X [ 12, 66, 220, 495, 792, 922, 780, 465, 180, 36 ][128X[104X96[4X[28X 48[128X[104X97[4X[28X gap> c.F; time; [128X[104X98[4X[28X [ 12, 66, 220, 495, 792, 922, 780, 465, 180, 36 ][128X[104X99[4X[28X 0[128X[104X100[4X[28X gap> c:=SCPropertiesDropped(c); [128X[104X101[4X[28X [SimplicialComplex[128X[104X102[4X[28X [128X[104X103[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X104[4X[28X [128X[104X105[4X[28X Name="unnamed complex 27"[128X[104X106[4X[28X Dim=9[128X[104X107[4X[28X [128X[104X108[4X[28X /SimplicialComplex][128X[104X109[4X[28X gap> c.F; time; [128X[104X110[4X[28X [ 12, 66, 220, 495, 792, 922, 780, 465, 180, 36 ][128X[104X111[4X[28X 44[128X[104X112[4X[28X [128X[104X113[4X[32X[104X114115116[1X5.2 [33X[0;0YOverloaded operators of [10XSCSimplicialComplex[110X[101X[1X[133X[101X117118[33X[0;0Y[5Xsimpcomp[105X overloads some standard operations for the object type119[10XSCSimplicialComplex[110X if this definition is intuitive and mathematically120sound. See a list of overloaded operators below.[133X121122[1X5.2-1 Operation + (SCSimplicialComplex, Integer)[101X123124[29X[2XOperation + (SCSimplicialComplex, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method125[6XReturns:[106X [33X[0;10Ythe simplicial complex passed as argument upon success, [9Xfail[109X126otherwise.[133X127128[33X[0;0YPositively shifts the vertex labels of [3Xcomplex[103X (provided that all labels129satisfy the property [10XIsAdditiveElement[110X) by the amount specified in [3Xvalue[103X.[133X130131[4X[32X Example [32X[104X132[4X[28X gap> c:=SCBdSimplex(3)+10;;[128X[104X133[4X[28X gap> c.Facets;[128X[104X134[4X[28X [ [ 11, 12, 13 ], [ 11, 12, 14 ], [ 11, 13, 14 ], [ 12, 13, 14 ] ][128X[104X135[4X[28X [128X[104X136[4X[32X[104X137138[1X5.2-2 Operation - (SCSimplicialComplex, Integer)[101X139140[29X[2XOperation - (SCSimplicialComplex, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method141[6XReturns:[106X [33X[0;10Ythe simplicial complex passed as argument upon success, [9Xfail[109X142otherwise.[133X143144[33X[0;0YNegatively shifts the vertex labels of [3Xcomplex[103X (provided that all labels145satisfy the property [10XIsAdditiveElement[110X) by the amount specified in [3Xvalue[103X.[133X146147[4X[32X Example [32X[104X148[4X[28X gap> c:=SCBdSimplex(3)-1;;[128X[104X149[4X[28X gap> c.Facets;[128X[104X150[4X[28X [ [ 0, 1, 2 ], [ 0, 1, 3 ], [ 0, 2, 3 ], [ 1, 2, 3 ] ][128X[104X151[4X[28X [128X[104X152[4X[32X[104X153154[1X5.2-3 Operation mod (SCSimplicialComplex, Integer)[101X155156[29X[2XOperation mod (SCSimplicialComplex, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method157[6XReturns:[106X [33X[0;10Ythe simplicial complex passed as argument upon success, [9Xfail[109X158otherwise.[133X159160[33X[0;0YTakes all vertex labels of [3Xcomplex[103X modulo the value specified in [3Xvalue[103X161(provided that all labels satisfy the property [10XIsAdditiveElement[110X). Warning:162this might result in different vertices being assigned the same label or163even in invalid facet lists, so be careful.[133X164165[4X[32X Example [32X[104X166[4X[28X gap> c:=(SCBdSimplex(3)*10) mod 7;;[128X[104X167[4X[28X gap> c.Facets;[128X[104X168[4X[28X [ [ 2, 3, 5 ], [ 2, 3, 6 ], [ 2, 5, 6 ], [ 3, 5, 6 ] ][128X[104X169[4X[28X [128X[104X170[4X[32X[104X171172[1X5.2-4 Operation ^ (SCSimplicialComplex, Integer)[101X173174[29X[2XOperation ^ (SCSimplicialComplex, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method175[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X176otherwise.[133X177178[33X[0;0YForms the [3Xvalue[103X-th simplicial cartesian power of [3Xcomplex[103X, i.e. the179[3Xvalue[103X-fold cartesian product of copies of [3Xcomplex[103X. The complex passed as180argument is not altered. Internally calls [2XSCCartesianPower[102X ([14X6.6-1[114X).[133X181182[4X[32X Example [32X[104X183[4X[28X gap> c:=SCBdSimplex(2)^2; #a torus[128X[104X184[4X[28X [SimplicialComplex[128X[104X185[4X[28X [128X[104X186[4X[28X Properties known: Dim, FacetsEx, Name, TopologicalType, Vertices.[128X[104X187[4X[28X [128X[104X188[4X[28X Name="(S^1_3)^2"[128X[104X189[4X[28X Dim=2[128X[104X190[4X[28X TopologicalType="(S^1)^2"[128X[104X191[4X[28X [128X[104X192[4X[28X /SimplicialComplex][128X[104X193[4X[28X [128X[104X194[4X[32X[104X195196[1X5.2-5 Operation + (SCSimplicialComplex, SCSimplicialComplex)[101X197198[29X[2XOperation + (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method199[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X200otherwise.[133X201202[33X[0;0YForms the connected sum of [3Xcomplex1[103X and [3Xcomplex2[103X. Uses the lexicographically203first facets of both complexes to do the gluing. The complexes passed as204arguments are not altered. Internally calls [2XSCConnectedSum[102X ([14X6.6-5[114X).[133X205206[4X[32X Example [32X[104X207[4X[28X gap> SCLib.SearchByName("RP^3");[128X[104X208[4X[28X [ [ 45, "RP^3" ], [ 113, "RP^3=L(2,1) (VT)" ], [ 589, "(S^2~S^1)#RP^3" ], [128X[104X209[4X[28X [ 590, "(S^2xS^1)#RP^3" ], [ 632, "(S^2~S^1)#2#RP^3" ], [128X[104X210[4X[28X [ 633, "(S^2xS^1)#2#RP^3" ], [ 2414, "RP^3#RP^3" ], [128X[104X211[4X[28X [ 2426, "RP^3=L(2,1) (VT)" ], [ 2488, "(S^2~S^1)#3#RP^3" ], [128X[104X212[4X[28X [ 2489, "(S^2xS^1)#3#RP^3" ], [ 2502, "RP^3=L(2,1) (VT)" ], [128X[104X213[4X[28X [ 7473, "(S^2~S^1)#4#RP^3" ], [ 7474, "(S^2xS^1)#4#RP^3" ], [128X[104X214[4X[28X [ 7504, "(S^2~S^1)#5#RP^3" ], [ 7505, "(S^2xS^1)#5#RP^3" ] ][128X[104X215[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X216[4X[28X gap> SCLib.SearchByName("S^2~S^1"){[1..3]};[128X[104X217[4X[28X [ [ 12, "S^2~S^1 (VT)" ], [ 27, "S^2~S^1 (VT)" ], [ 28, "S^2~S^1 (VT)" ] ][128X[104X218[4X[28X gap> d:=SCLib.Load(last[1][1]);;[128X[104X219[4X[28X gap> c:=c+d; #form RP^3#(S^2~S^1)[128X[104X220[4X[28X [SimplicialComplex[128X[104X221[4X[28X [128X[104X222[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X223[4X[28X [128X[104X224[4X[28X Name="RP^3#+-S^2~S^1 (VT)"[128X[104X225[4X[28X Dim=3[128X[104X226[4X[28X [128X[104X227[4X[28X /SimplicialComplex][128X[104X228[4X[28X [128X[104X229[4X[32X[104X230231[1X5.2-6 Operation - (SCSimplicialComplex, SCSimplicialComplex)[101X232233[29X[2XOperation - (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method234[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X235otherwise.[133X236237[33X[0;0YCalls [2XSCDifference[102X ([14X6.10-5[114X)([3Xcomplex1[103X, [3Xcomplex2[103X)[133X238239[1X5.2-7 Operation * (SCSimplicialComplex, SCSimplicialComplex)[101X240241[29X[2XOperation * (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method242[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X243otherwise.[133X244245[33X[0;0YForms the simplicial cartesian product of [3Xcomplex1[103X and [3Xcomplex2[103X. Internally246calls [2XSCCartesianProduct[102X ([14X6.6-2[114X).[133X247248[4X[32X Example [32X[104X249[4X[28X gap> SCLib.SearchByName("RP^2");[128X[104X250[4X[28X [ [ 3, "RP^2 (VT)" ], [ 635, "RP^2xS^1" ] ][128X[104X251[4X[28X gap> c:=SCLib.Load(last[1][1])*SCBdSimplex(3); #form RP^2 x S^2[128X[104X252[4X[28X [SimplicialComplex[128X[104X253[4X[28X [128X[104X254[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X255[4X[28X [128X[104X256[4X[28X Name="RP^2 (VT)xS^2_4"[128X[104X257[4X[28X Dim=4[128X[104X258[4X[28X [128X[104X259[4X[28X /SimplicialComplex][128X[104X260[4X[28X [128X[104X261[4X[32X[104X262263[1X5.2-8 Operation = (SCSimplicialComplex, SCSimplicialComplex)[101X264265[29X[2XOperation = (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method266[6XReturns:[106X [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X upon success, [9Xfail[109X otherwise.[133X267268[33X[0;0YCalculates whether two simplicial complexes are isomorphic, i.e. are equal269up to a relabeling of the vertices.[133X270271[4X[32X Example [32X[104X272[4X[28X gap> c:=SCBdSimplex(3);;[128X[104X273[4X[28X gap> c=c+10;[128X[104X274[4X[28X true[128X[104X275[4X[28X gap> c=SCBdCrossPolytope(4);[128X[104X276[4X[28X false[128X[104X277[4X[28X [128X[104X278[4X[32X[104X279280281[1X5.3 [33X[0;0Y[10XSCSimplicialComplex[110X[101X[1X as a subtype of [10XSet[110X[101X[1X[133X[101X282283[33X[0;0YApart from being a subtype of [10XSCPropertyObject[110X, an object of type284[10XSCSimplicialComplex[110X also behaves like a [5XGAP[105X [10XSet[110X type. The elements of the285set are given by the facets of the simplical complex, grouped by their286dimensionality, i.e. if [10Xcomplex[110X is an object of type [10XSCSimplicialComplex[110X,287[10Xc[1][110X refers to the 0-faces of [10Xcomplex[110X, [10Xc[2][110X to the 1-faces, etc.[133X288289[1X5.3-1 Operation Union (SCSimplicialComplex, SCSimplicialComplex)[101X290291[29X[2XOperation Union (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method292[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X293otherwise.[133X294295[33X[0;0YComputes the union of two simplicial complexes by calling [2XSCUnion[102X ([14X7.3-16[114X).[133X296297[4X[32X Example [32X[104X298[4X[28X gap> c:=Union(SCBdSimplex(3),SCBdSimplex(3)+3); #a wedge of two 2-spheres[128X[104X299[4X[28X [SimplicialComplex[128X[104X300[4X[28X [128X[104X301[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X302[4X[28X [128X[104X303[4X[28X Name="S^2_4 cup S^2_4"[128X[104X304[4X[28X Dim=2[128X[104X305[4X[28X [128X[104X306[4X[28X /SimplicialComplex][128X[104X307[4X[28X [128X[104X308[4X[32X[104X309310[1X5.3-2 Operation Difference (SCSimplicialComplex, SCSimplicialComplex)[101X311312[29X[2XOperation Difference (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method313[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X314otherwise.[133X315316[33X[0;0YComputes the ``difference'' of two simplicial complexes by calling317[2XSCDifference[102X ([14X6.10-5[114X).[133X318319[4X[32X Example [32X[104X320[4X[28X gap> c:=SCBdSimplex(3);;[128X[104X321[4X[28X gap> d:=SC([[1,2,3]]);;[128X[104X322[4X[28X gap> disc:=Difference(c,d);;[128X[104X323[4X[28X gap> disc.Facets;[128X[104X324[4X[28X [ [ 1, 2, 4 ], [ 1, 3, 4 ], [ 2, 3, 4 ] ][128X[104X325[4X[28X gap> empty:=Difference(d,c);;[128X[104X326[4X[28X gap> empty.Dim;[128X[104X327[4X[28X -1[128X[104X328[4X[28X [128X[104X329[4X[32X[104X330331[1X5.3-3 Operation Intersection (SCSimplicialComplex, SCSimplicialComplex)[101X332333[29X[2XOperation Intersection (SCSimplicialComplex, SCSimplicialComplex)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method334[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X335otherwise.[133X336337[33X[0;0YComputes the ``intersection'' of two simplicial complexes by calling338[2XSCIntersection[102X ([14X6.10-8[114X).[133X339340[4X[32X Example [32X[104X341[4X[28X gap> c:=SCBdSimplex(3);; [128X[104X342[4X[28X gap> d:=SCBdSimplex(3);; [128X[104X343[4X[28X gap> d:=SCMove(d,[[1,2,3],[]]);;[128X[104X344[4X[28X gap> d:=d+1;; [128X[104X345[4X[28X gap> s1:=SCIntersection(c,d); [128X[104X346[4X[28X [SimplicialComplex[128X[104X347[4X[28X [128X[104X348[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X349[4X[28X [128X[104X350[4X[28X Name="S^2_4 cap unnamed complex 20"[128X[104X351[4X[28X Dim=1[128X[104X352[4X[28X [128X[104X353[4X[28X /SimplicialComplex][128X[104X354[4X[28X gap> s1.Facets; [128X[104X355[4X[28X [ [ 2, 3 ], [ 2, 4 ], [ 3, 4 ] ][128X[104X356[4X[28X [128X[104X357[4X[32X[104X358359[1X5.3-4 Size (SCSimplicialComplex)[101X360361[29X[2XSize (SCSimplicialComplex)[102X( [3Xcomplex[103X ) [32X method362[6XReturns:[106X [33X[0;10Yan integer upon success, [9Xfail[109X otherwise.[133X363364[33X[0;0YReturns the ``size'' of a simplicial complex. This is [22Xd+1[122X, where [22Xd[122X is the365dimension of the complex. [22Xd+1[122X is returned instead of [22Xd[122X, as all lists in [5XGAP[105X366are indexed beginning with 1 -- thus this also holds for all the face367lattice related properties of the complex.[133X368369[4X[32X Example [32X[104X370[4X[28X gap> SCLib.SearchByAttribute("F=[12,66,108,54]");[128X[104X371[4X[28X [ [ 139, "L_3_1" ], [ 140, "S^2~S^1 (VT)" ], [128X[104X372[4X[28X [ 141, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 142, "S^2xS^1 (VT)" ], [128X[104X373[4X[28X [ 143, "S^2xS^1 (VT)" ], [ 144, "S^2xS^1 (VT)" ], [ 145, "S^2xS^1 (VT)" ], [128X[104X374[4X[28X [ 146, "S^2~S^1 (VT)" ], [ 147, "S^2~S^1 (VT)" ], [ 148, "S^2~S^1 (VT)" ], [128X[104X375[4X[28X [ 149, "S^2~S^1 (VT)" ], [ 150, "S^2~S^1 (VT)" ], [128X[104X376[4X[28X [ 151, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 152, "S^2xS^1 (VT)" ], [128X[104X377[4X[28X [ 153, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 154, "S^2xS^1 (VT)" ], [128X[104X378[4X[28X [ 155, "S^2xS^1 (VT)" ], [ 156, "S^2~S^1 (VT)" ], [ 157, "S^2~S^1 (VT)" ], [128X[104X379[4X[28X [ 158, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 159, "S^2xS^1 (VT)" ], [128X[104X380[4X[28X [ 160, "S^2xS^1 (VT)" ], [ 161, "(S^2xS^1)#(S^2xS^1) (VT)" ] ][128X[104X381[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X382[4X[28X gap> for i in [1..Size(c)] do Print(c.F[i],"\n"); od;[128X[104X383[4X[28X 12[128X[104X384[4X[28X 66[128X[104X385[4X[28X 108[128X[104X386[4X[28X 54[128X[104X387[4X[28X [128X[104X388[4X[32X[104X389390[1X5.3-5 Length (SCSimplicialComplex)[101X391392[29X[2XLength (SCSimplicialComplex)[102X( [3Xcomplex[103X ) [32X method393[6XReturns:[106X [33X[0;10Yan integer upon success, [9Xfail[109X otherwise.[133X394395[33X[0;0YReturns the ``size'' of a simplicial complex by calling [10XSize([110X[3Xcomplex[103X[10X)[110X.[133X396397[4X[32X Example [32X[104X398[4X[28X gap> SCLib.SearchByAttribute("F=[12,66,108,54]");[128X[104X399[4X[28X [ [ 139, "L_3_1" ], [ 140, "S^2~S^1 (VT)" ], [128X[104X400[4X[28X [ 141, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 142, "S^2xS^1 (VT)" ], [128X[104X401[4X[28X [ 143, "S^2xS^1 (VT)" ], [ 144, "S^2xS^1 (VT)" ], [ 145, "S^2xS^1 (VT)" ], [128X[104X402[4X[28X [ 146, "S^2~S^1 (VT)" ], [ 147, "S^2~S^1 (VT)" ], [ 148, "S^2~S^1 (VT)" ], [128X[104X403[4X[28X [ 149, "S^2~S^1 (VT)" ], [ 150, "S^2~S^1 (VT)" ], [128X[104X404[4X[28X [ 151, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 152, "S^2xS^1 (VT)" ], [128X[104X405[4X[28X [ 153, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 154, "S^2xS^1 (VT)" ], [128X[104X406[4X[28X [ 155, "S^2xS^1 (VT)" ], [ 156, "S^2~S^1 (VT)" ], [ 157, "S^2~S^1 (VT)" ], [128X[104X407[4X[28X [ 158, "(S^2xS^1)#(S^2xS^1) (VT)" ], [ 159, "S^2xS^1 (VT)" ], [128X[104X408[4X[28X [ 160, "S^2xS^1 (VT)" ], [ 161, "(S^2xS^1)#(S^2xS^1) (VT)" ] ][128X[104X409[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X410[4X[28X gap> for i in [1..Length(c)] do Print(c.F[i],"\n"); od;[128X[104X411[4X[28X 12[128X[104X412[4X[28X 66[128X[104X413[4X[28X 108[128X[104X414[4X[28X 54[128X[104X415[4X[28X [128X[104X416[4X[32X[104X417418[1X5.3-6 Operation [] (SCSimplicialComplex)[101X419420[29X[2XOperation [] (SCSimplicialComplex)[102X( [3Xcomplex[103X, [3Xpos[103X ) [32X method421[6XReturns:[106X [33X[0;10Ya list of faces upon success, [9Xfail[109X otherwise.[133X422423[33X[0;0YReturns the [22X(pos-1)[122X-dimensional faces of [3Xcomplex[103X as a list. If [22Xpos ≥ d+2[122X,424where [22Xd[122X is the dimension of [3Xcomplex[103X, the empty set is returned. Note that425[3Xpos[103X must be [22X≥ 1[122X.[133X426427[4X[32X Example [32X[104X428[4X[28X gap> SCLib.SearchByName("K^2");[128X[104X429[4X[28X [ [ 17, "K^2 (VT)" ], [ 571, "K^2 (VT)" ] ][128X[104X430[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X431[4X[28X gap> c[2];[128X[104X432[4X[28X [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ], [ 1, 7 ], [ 1, 9 ], [ 1, 10 ], [ 2, 3 ], [128X[104X433[4X[28X [ 2, 4 ], [ 2, 6 ], [ 2, 8 ], [ 2, 10 ], [ 3, 4 ], [ 3, 5 ], [ 3, 7 ], [128X[104X434[4X[28X [ 3, 9 ], [ 4, 5 ], [ 4, 6 ], [ 4, 8 ], [ 4, 10 ], [ 5, 6 ], [ 5, 7 ], [128X[104X435[4X[28X [ 5, 9 ], [ 6, 7 ], [ 6, 8 ], [ 6, 10 ], [ 7, 8 ], [ 7, 9 ], [ 8, 9 ], [128X[104X436[4X[28X [ 8, 10 ], [ 9, 10 ] ][128X[104X437[4X[28X gap> c[4];[128X[104X438[4X[28X [ ][128X[104X439[4X[28X [128X[104X440[4X[32X[104X441442[1X5.3-7 Iterator (SCSimplicialComplex)[101X443444[29X[2XIterator (SCSimplicialComplex)[102X( [3Xcomplex[103X ) [32X method445[6XReturns:[106X [33X[0;10Yan iterator on the face lattice of [3Xcomplex[103X upon success, [9Xfail[109X446otherwise.[133X447448[33X[0;0YProvides an iterator object for the face lattice of a simplicial complex.[133X449450[4X[32X Example [32X[104X451[4X[28X gap> c:=SCBdCrossPolytope(4);;[128X[104X452[4X[28X gap> for faces in c do Print(Length(faces),"\n"); od;[128X[104X453[4X[28X 8[128X[104X454[4X[28X 24[128X[104X455[4X[28X 32[128X[104X456[4X[28X 16[128X[104X457[4X[28X [128X[104X458[4X[32X[104X459460461[1X5.4 [33X[0;0YThe object type [10XSCNormalSurface[110X[101X[1X[133X[101X462463[33X[0;0YThe [5XGAP[105X object type [10XSCNormalSurface[110X is designed to describe slicings (level464sets of discrete Morse functions) of combinatorial [22X3[122X-manifolds, i. e.465discrete normal surfaces. Internally [10XSCNormalSurface[110X is a subtype of466[10XSCPolyhedralComplex[110X and, thus, mostly behaves like a [10XSCSimplicialComplex[110X467object (see Section [14X5.1[114X). For a very short introduction to normal surfaces468see [14X2.4[114X, for a more thorough introduction to the field see [Spr11b]. For469some fundamental methods and functions for [10XSCNormalSurface[110X see below. For470more functions related to the [10XSCNormalSurface[110X object type see Chapter [14X7[114X.[133X471472473[1X5.5 [33X[0;0YOverloaded operators of [10XSCNormalSurface[110X[101X[1X[133X[101X474475[33X[0;0YAs with the object type [10XSCSimplicialComplex[110X, [5Xsimpcomp[105X overloads some476standard operations for the object type [10XSCNormalSurface[110X. See a list of477overloaded operators below.[133X478479[1X5.5-1 Operation + (SCNormalSurface, Integer)[101X480481[29X[2XOperation + (SCNormalSurface, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method482[6XReturns:[106X [33X[0;10Ythe discrete normal surface passed as argument upon success, [9Xfail[109X483otherwise.[133X484485[33X[0;0YPositively shifts the vertex labels of [3Xcomplex[103X (provided that all labels486satisfy the property [10XIsAdditiveElement[110X) by the amount specified in [3Xvalue[103X.[133X487488[4X[32X Example [32X[104X489[4X[28X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);;[128X[104X490[4X[28X gap> sl.Facets; [128X[104X491[4X[28X [ [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ] ], [128X[104X492[4X[28X [ [ 1, 2 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ][128X[104X493[4X[28X gap> sl:=sl + 2;; [128X[104X494[4X[28X gap> sl.Facets; [128X[104X495[4X[28X [ [ [ 3, 4 ], [ 3, 5 ], [ 3, 6 ] ], [ [ 3, 4 ], [ 3, 5 ], [ 3, 7 ] ], [128X[104X496[4X[28X [ [ 3, 4 ], [ 3, 6 ], [ 3, 7 ] ], [ [ 3, 5 ], [ 3, 6 ], [ 3, 7 ] ] ][128X[104X497[4X[28X [128X[104X498[4X[32X[104X499500[1X5.5-2 Operation - (SCNormalSurface, Integer)[101X501502[29X[2XOperation - (SCNormalSurface, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method503[6XReturns:[106X [33X[0;10Ythe discrete normal surface passed as argument upon success, [9Xfail[109X504otherwise.[133X505506[33X[0;0YNegatively shifts the vertex labels of [3Xcomplex[103X (provided that all labels507satisfy the property [10XIsAdditiveElement[110X) by the amount specified in [3Xvalue[103X.[133X508509[4X[32X Example [32X[104X510[4X[28X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);;[128X[104X511[4X[28X gap> sl.Facets; [128X[104X512[4X[28X [ [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ] ], [128X[104X513[4X[28X [ [ 1, 2 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ][128X[104X514[4X[28X gap> sl:=sl - 2;; [128X[104X515[4X[28X gap> sl.Facets; [128X[104X516[4X[28X [ [ [ -1, 0 ], [ -1, 1 ], [ -1, 2 ] ], [ [ -1, 0 ], [ -1, 1 ], [ -1, 3 ] ], [128X[104X517[4X[28X [ [ -1, 0 ], [ -1, 2 ], [ -1, 3 ] ], [ [ -1, 1 ], [ -1, 2 ], [ -1, 3 ] ] ][128X[104X518[4X[28X [128X[104X519[4X[32X[104X520521[1X5.5-3 Operation mod (SCNormalSurface, Integer)[101X522523[29X[2XOperation mod (SCNormalSurface, Integer)[102X( [3Xcomplex[103X, [3Xvalue[103X ) [32X method524[6XReturns:[106X [33X[0;10Ythe discrete normal surface passed as argument upon success, [9Xfail[109X525otherwise.[133X526527[33X[0;0YTakes all vertex labels of [3Xcomplex[103X modulo the value specified in [3Xvalue[103X528(provided that all labels satisfy the property [10XIsAdditiveElement[110X). Warning:529this might result in different vertices being assigned the same label or530even invalid facet lists, so be careful.[133X531532[4X[32X Example [32X[104X533[4X[28X gap> sl:=SCNSSlicing(SCBdSimplex(4),[[1],[2..5]]);; [128X[104X534[4X[28X gap> sl.Facets;[128X[104X535[4X[28X [ [ [ 1, 2 ], [ 1, 3 ], [ 1, 4 ] ], [ [ 1, 2 ], [ 1, 3 ], [ 1, 5 ] ], [128X[104X536[4X[28X [ [ 1, 2 ], [ 1, 4 ], [ 1, 5 ] ], [ [ 1, 3 ], [ 1, 4 ], [ 1, 5 ] ] ][128X[104X537[4X[28X gap> sl:=sl mod 2;;[128X[104X538[4X[28X gap> sl.Facets; [128X[104X539[4X[28X [ [ [ 1, 0 ], [ 1, 0 ], [ 1, 1 ] ], [ [ 1, 0 ], [ 1, 0 ], [ 1, 1 ] ], [128X[104X540[4X[28X [ [ 1, 0 ], [ 1, 1 ], [ 1, 1 ] ], [ [ 1, 0 ], [ 1, 1 ], [ 1, 1 ] ] ][128X[104X541[4X[28X [128X[104X542[4X[32X[104X543544545[1X5.6 [33X[0;0Y[10XSCNormalSurface[110X[101X[1X as a subtype of [10XSet[110X[101X[1X[133X[101X546547[33X[0;0YLike objects of type [10XSCSimplicialComplex[110X, an object of type [10XSCNormalSurface[110X548behaves like a [5XGAP[105X [10XSet[110X type. The elements of the set are given by the facets549of the normal surface, grouped by their dimensionality and type, i.e. if550[10Xcomplex[110X is an object of type [10XSCNormalSurface[110X, [10Xc[1][110X refers to the 0-faces of551[10Xcomplex[110X, [10Xc[2][110X to the 1-faces, [10Xc[3][110X to the triangles and [10Xc[4][110X to the552quadrilaterals. See below for some examples and Section [14X5.3[114X for details.[133X553554[1X5.6-1 Operation Union (SCNormalSurface, SCNormalSurface)[101X555556[29X[2XOperation Union (SCNormalSurface, SCNormalSurface)[102X( [3Xcomplex1[103X, [3Xcomplex2[103X ) [32X method557[6XReturns:[106X [33X[0;10Ydiscrete normal surface of type [10XSCNormalSurface[110X upon success, [9Xfail[109X558otherwise.[133X559560[33X[0;0YComputes the union of two discrete normal surfaces by calling [2XSCUnion[102X561([14X7.3-16[114X).[133X562563[4X[32X Example [32X[104X564[4X[28X gap> SCLib.SearchByAttribute("F = [ 10, 35, 50, 25 ]");[128X[104X565[4X[28X [ [ 19, "S^3 (VT)" ] ][128X[104X566[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X567[4X[28X gap> sl1:=SCNSSlicing(c,[[1,3,5,7,9],[2,4,6,8,10]]);;[128X[104X568[4X[28X gap> sl2:=sl1+10;;[128X[104X569[4X[28X gap> SCTopologicalType(sl1);[128X[104X570[4X[28X "T^2"[128X[104X571[4X[28X gap> sl3:=Union(sl1,sl2);;[128X[104X572[4X[28X gap> SCTopologicalType(sl3);[128X[104X573[4X[28X "T^2 U T^2"[128X[104X574[4X[28X [128X[104X575[4X[32X[104X576577578579