GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1[1X13 [33X[0;0YLibrary and I/O[133X[101X234[1X13.1 [33X[0;0YSimplicial complex library[133X[101X56[33X[0;0Y[5Xsimpcomp[105X contains a library of simplicial complexes on few vertices, most of7them (combinatorial) triangulations of manifolds and pseudomanifolds. The8user can load these known triangulations from the library in order to study9their properties or to construct new triangulations out of the known ones.10For example, a user could determine the topological type of a given11triangulation -- which can be quite tedious if done by hand -- by12establishing a PL equivalence to a complex in the library.[133X1314[33X[0;0YAmong other known triangulations, the library contains all of the vertex15transitive triangulations of combinatorial manifolds with up to [22X15[122X vertices16(for [22Xd ∈ { 2,3,9,10,11,12}[122X) and up to [22X13[122X vertices (for [22Xd ∈ { 4,5,6,7,8 }[122X)17and all of the vertex transitive combinatorial pseudomanifolds with up to [22X15[122X18vertices (for [22Xd=3[122X) and up to [22X13[122X vertices (for [22Xd ∈ { 4,5,6,7 }[122X) classified by19Frank Lutz that can be found on his ``Manifold Page''20[7Xhttp://www.math.tu-berlin.de/diskregeom/stellar/[107X, along with some21triangulations of sphere bundles and some bounded triangulated PL-manifolds.[133X2223[33X[0;0YSee [2XSCLib[102X ([14X13.1-2[114X) for a naming convention used for the global library of24[5Xsimpcomp[105X. Note: Another way of storing and loading complexes is provided by25the functions [2XSCExportIsoSig[102X ([14X6.2-2[114X), [2XSCExportToString[102X ([14X6.2-1[114X) and26[2XSCFromIsoSig[102X ([14X6.2-3[114X), see Section [14X6.2[114X for details.[133X2728[1X13.1-1 SCIsLibRepository[101X2930[29X[2XSCIsLibRepository[102X( [3Xobject[103X ) [32X filter31[6XReturns:[106X [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X upon success, [9Xfail[109X otherwise.[133X3233[33X[0;0YFilter for the category of a library repository [10XSCIsLibRepository[110X used by34the [5Xsimpcomp[105X library. The category [10XSCLibRepository[110X is derived from the35category [10XSCPropertyObject[110X.[133X3637[4X[32X Example [32X[104X38[4X[28X gap> SCIsLibRepository(SCLib); #the global library is stored in SCLib[128X[104X39[4X[28X true[128X[104X40[4X[28X [128X[104X41[4X[32X[104X4243[1X13.1-2 SCLib[101X4445[29X[2XSCLib[102X[32X global variable4647[33X[0;0YThe global variable [10XSCLib[110X contains the library object of the global library48of [5Xsimpcomp[105X through which the user can access the library. The path to the49global library is [10XGAPROOT/pkg/simpcomp/complexes[110X.[133X5051[33X[0;0YThe naming convention in the global library is the following: complexes are52usually named by their topological type. As usual, `S^d' denotes a [22Xd[122X-sphere,53`T' a torus, `x' the cartesian product, `~' the twisted product and `#' the54connected sum. The Klein Bottle is denoted by `K' or `K^2'.[133X5556[4X[32X Example [32X[104X57[4X[28X gap> SCLib;[128X[104X58[4X[28X [Simplicial complex library. Properties:[128X[104X59[4X[28X CalculateIndexAttributes=true[128X[104X60[4X[28X Number of complexes in library=7649[128X[104X61[4X[28X IndexAttributes=[ "Name", "Dim", "F", "G", "H", "Chi", "Homology", "IsPM", [128X[104X62[4X[28X "IsManifold" ][128X[104X63[4X[28X Loaded=true[128X[104X64[4X[28X Path="/home/mi/spreerjn/private/apps/gap4r8/pkg/simpcomp/complexes/"[128X[104X65[4X[28X ][128X[104X66[4X[28X gap> SCLib.Size;[128X[104X67[4X[28X 7649[128X[104X68[4X[28X gap> SCLib.SearchByName("S^4~");[128X[104X69[4X[28X [ [ 463, "S^4~S^1 (VT)" ], [ 1473, "S^4~S^1 (VT)" ], [ 1474, "S^4~S^1 (VT)" ],[128X[104X70[4X[28X [ 2477, "S^4~S^1 (VT)" ], [ 4395, "S^4~S^1 (VT)" ], [128X[104X71[4X[28X [ 4396, "S^4~S^1 (VT)" ], [ 4397, "S^4~S^1 (VT)" ], [128X[104X72[4X[28X [ 4398, "S^4~S^1 (VT)" ], [ 4399, "S^4~S^1 (VT)" ], [128X[104X73[4X[28X [ 4402, "S^4~S^1 (VT)" ], [ 4403, "S^4~S^1 (VT)" ], [128X[104X74[4X[28X [ 4404, "S^4~S^1 (VT)" ] ][128X[104X75[4X[28X gap> SCLib.Load(last[1][1]); [128X[104X76[4X[28X [SimplicialComplex[128X[104X77[4X[28X [128X[104X78[4X[28X Properties known: AltshulerSteinberg, ConnectedComponents, Dim, [128X[104X79[4X[28X DualGraph, EulerCharacteristic, FVector, FacetsEx, [128X[104X80[4X[28X GVector, HVector, HasBoundary, HasInterior, [128X[104X81[4X[28X Homology, Interior, IsConnected, [128X[104X82[4X[28X IsEulerianManifold, IsManifold, IsOrientable, [128X[104X83[4X[28X IsPseudoManifold, IsPure, IsStronglyConnected, [128X[104X84[4X[28X MinimalNonFacesEx, Name, Neighborliness, [128X[104X85[4X[28X NumFaces[], Orientation, Reference, SkelExs[], [128X[104X86[4X[28X Vertices.[128X[104X87[4X[28X [128X[104X88[4X[28X Name="S^4~S^1 (VT)"[128X[104X89[4X[28X Dim=5[128X[104X90[4X[28X AltshulerSteinberg=2417917928025780[128X[104X91[4X[28X EulerCharacteristic=0[128X[104X92[4X[28X FVector=[ 13, 78, 195, 260, 195, 65 ][128X[104X93[4X[28X GVector=[ 6, 21, -35 ][128X[104X94[4X[28X HVector=[ 7, 28, -7, 28, 7, 1 ][128X[104X95[4X[28X HasBoundary=false[128X[104X96[4X[28X HasInterior=true[128X[104X97[4X[28X Homology=[ [ 0, [ ] ], [ 1, [ ] ], [ 0, [ ] ], [ 0, [ ] ], [ 0, [ 2 ] ], [ 0,\[128X[104X98[4X[28X [ ] ] ][128X[104X99[4X[28X IsConnected=true[128X[104X100[4X[28X IsEulerianManifold=true[128X[104X101[4X[28X IsOrientable=false[128X[104X102[4X[28X IsPseudoManifold=true[128X[104X103[4X[28X IsPure=true[128X[104X104[4X[28X IsStronglyConnected=true[128X[104X105[4X[28X Neighborliness=2[128X[104X106[4X[28X [128X[104X107[4X[28X /SimplicialComplex][128X[104X108[4X[28X [128X[104X109[4X[32X[104X110111[1X13.1-3 SCLibAdd[101X112113[29X[2XSCLibAdd[102X( [3Xrepository[103X, [3Xcomplex[103X[, [3Xname[103X] ) [32X function114[6XReturns:[106X [33X[0;10Y[9Xtrue[109X upon success, [9Xfail[109X otherwise.[133X115116[33X[0;0YAdds a given simplicial complex [3Xcomplex[103X to a given repository [3Xrepository[103X of117type [10XSCIsLibRepository[110X. [3Xcomplex[103X is saved to a file with suffix [10X.sc[110X in the118repositories base path, where the file name is either formed from the119optional argument [3Xname[103X and the current time or taken from the name of the120complex, if it is named.[133X121122[4X[32X Example [32X[104X123[4X[28X gap> info:=InfoLevel(InfoSimpcomp);;[128X[104X124[4X[28X gap> SCInfoLevel(0);;[128X[104X125[4X[28X gap> myRepository:=SCLibInit("/tmp/repository");[128X[104X126[4X[28X [Simplicial complex library. Properties:[128X[104X127[4X[28X CalculateIndexAttributes=true[128X[104X128[4X[28X Number of complexes in library=0[128X[104X129[4X[28X IndexAttributes=[ "Name", "Dim", "F", "G", "H", "Chi", "Homology", "IsPM", [128X[104X130[4X[28X "IsManifold" ][128X[104X131[4X[28X Loaded=true[128X[104X132[4X[28X Path="/tmp/repository/"[128X[104X133[4X[28X ][128X[104X134[4X[28X gap> complex1:=SCBdCrossPolytope(4);;[128X[104X135[4X[28X gap> SCLibAdd(myRepository,complex1);[128X[104X136[4X[28X true[128X[104X137[4X[28X gap> complex2:=SCBdCrossPolytope(4);;[128X[104X138[4X[28X gap> myRepository.Add(complex2);; # alternative syntax[128X[104X139[4X[28X gap> SCInfoLevel(info);;[128X[104X140[4X[28X [128X[104X141[4X[32X[104X142143[1X13.1-4 SCLibAllComplexes[101X144145[29X[2XSCLibAllComplexes[102X( [3Xrepository[103X ) [32X function146[6XReturns:[106X [33X[0;10Ylist of entries of the form [10X[ integer, string ][110X upon success, [9Xfail[109X147otherwise.[133X148149[33X[0;0YReturns a list with entries of the form [10X[ ID, NAME ][110X of all the complexes in150the given repository [3Xrepository[103X of type [10XSCIsLibRepository[110X.[133X151152[4X[32X Example [32X[104X153[4X[28X gap> all:=SCLibAllComplexes(SCLib);;[128X[104X154[4X[28X gap> all[1];[128X[104X155[4X[28X [ 1, "Moebius Strip" ][128X[104X156[4X[28X gap> Length(all);[128X[104X157[4X[28X 7649[128X[104X158[4X[28X [128X[104X159[4X[32X[104X160161[1X13.1-5 SCLibDelete[101X162163[29X[2XSCLibDelete[102X( [3Xrepository[103X, [3Xid[103X ) [32X function164[6XReturns:[106X [33X[0;10Y[9Xtrue[109X upon success, [9Xfail[109X otherwise.[133X165166[33X[0;0YDeletes the simplicial complex with the given id [3Xid[103X from the given167repository [3Xrepository[103X. Apart from deleting the complexes' index entry, the168associated [10X.sc[110X file is also deleted.[133X169170[4X[32X Example [32X[104X171[4X[28X gap> myRepository:=SCLibInit("/tmp/repository");[128X[104X172[4X[28X [Simplicial complex library. Properties:[128X[104X173[4X[28X CalculateIndexAttributes=true[128X[104X174[4X[28X Number of complexes in library=2[128X[104X175[4X[28X IndexAttributes=[ "Name", "Dim", "F", "G", "H", "Chi", "Homology", "IsPM", [128X[104X176[4X[28X "IsManifold" ][128X[104X177[4X[28X Loaded=true[128X[104X178[4X[28X Path="/tmp/repository/"[128X[104X179[4X[28X ][128X[104X180[4X[28X gap> SCLibAdd(myRepository,SCSimplex(2));;[128X[104X181[4X[28X gap> SCLibDelete(myRepository,1);[128X[104X182[4X[28X true[128X[104X183[4X[28X [128X[104X184[4X[32X[104X185186[1X13.1-6 SCLibDetermineTopologicalType[101X187188[29X[2XSCLibDetermineTopologicalType[102X( [[3Xrepository[103X, ][3Xcomplex[103X ) [32X function189[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X or a list of190integers upon success, [9Xfail[109X otherwise.[133X191192[33X[0;0YTries to determine the topological type of a given complex [3Xcomplex[103X by first193looking for complexes with matching homology in the library repository194[3Xrepository[103X (if no repository is passed, the global repository [10XSCLib[110X is used)195and either returns a simplicial complex object (that is combinatorially196isomorphic to the complex given) or a list of library ids of complexes in197the library with the same homology as the complex provided.[133X198199[33X[0;0YThe ids obtained in this way can then be used to compare the corresponding200complexes with [3Xcomplex[103X via the function [2XSCEquivalent[102X ([14X9.2-2[114X).[133X201202[33X[0;0YIf [3Xcomplex[103X is a combinatorial manifold of dimension [22X1[122X or [22X2[122X its topological203type is computed, stored to the property [10XTopologicalType[110X and [3Xcomplex[103X is204returned.[133X205206[33X[0;0YIf no complexes with matching homology can be found, the empty set is207returned.[133X208209[4X[32X Example [32X[104X210[4X[28X gap> c:=SCFromFacets([[1,2,3],[1,2,6],[1,3,5],[1,4,5],[1,4,6],[128X[104X211[4X[28X [2,3,4],[2,4,5],[2,5,6],[3,4,6],[3,5,6]]);;[128X[104X212[4X[28X gap> SCLibDetermineTopologicalType(c);[128X[104X213[4X[28X [SimplicialComplex[128X[104X214[4X[28X [128X[104X215[4X[28X Properties known: BoundaryEx, Dim, FacetsEx, HasBoundary, [128X[104X216[4X[28X IsPseudoManifold, IsPure, Name, SkelExs[], [128X[104X217[4X[28X Vertices.[128X[104X218[4X[28X [128X[104X219[4X[28X Name="unnamed complex 167"[128X[104X220[4X[28X Dim=2[128X[104X221[4X[28X HasBoundary=false[128X[104X222[4X[28X IsPseudoManifold=true[128X[104X223[4X[28X IsPure=true[128X[104X224[4X[28X [128X[104X225[4X[28X /SimplicialComplex][128X[104X226[4X[28X [128X[104X227[4X[32X[104X228229[1X13.1-7 SCLibFlush[101X230231[29X[2XSCLibFlush[102X( [3Xrepository[103X, [3Xconfirm[103X ) [32X function232[6XReturns:[106X [33X[0;10Y[9Xtrue[109X upon success, [9Xfail[109X otherwise.[133X233234[33X[0;0YCompletely empties a given repository [3Xrepository[103X. The index and all235simplicial complexes in this repository are deleted. The second argument,236[3Xconfirm[103X, must be the string [10X"yes"[110X in order to confirm the deletion.[133X237238[4X[32X Example [32X[104X239[4X[28X gap> myRepository:=SCLibInit("/tmp/repository");;[128X[104X240[4X[28X gap> SCLibFlush(myRepository,"yes");[128X[104X241[4X[28X #I SCLibInit: invalid parameters.[128X[104X242[4X[28X true[128X[104X243[4X[28X [128X[104X244[4X[32X[104X245246[1X13.1-8 SCLibInit[101X247248[29X[2XSCLibInit[102X( [3Xdir[103X ) [32X function249[6XReturns:[106X [33X[0;10Ylibrary repository of type [10XSCLibRepository[110X upon success, [9Xfail[109X250otherwise.[133X251252[33X[0;0YThis function initializes a library repository object for the given253directory [3Xdir[103X (which has to be provided in form of a [5XGAP[105X object of type254[10XString[110X or [10XDirectory[110X) and returns that library repository object in case of255success. The returned object then provides a mean to access the library256repository via the [10XSCLib[110X-functions of [5Xsimpcomp[105X.[133X257258[33X[0;0YThe global library repository of [5Xsimpcomp[105X is loaded automatically at startup259and is stored in the variable [10XSCLib[110X. User repositories can be created by260calling [10XSCLibInit[110X with a desired destination directory. Note that each261repository must reside in a different path since otherwise data may get262lost.[133X263264[33X[0;0YThe function first tries to load the repository index for the given265directory to rebuild it (by calling [10XSCLibUpdate[110X) if loading the index fails.266The library index of a library repository is stored in its base path in the267XML file [10Xcomplexes.idx[110X, the complexes are stored in files with suffix [10X.sc[110X,268also in XML format.[133X269270[4X[32X Example [32X[104X271[4X[28X gap> myRepository:=SCLibInit("/tmp/repository");[128X[104X272[4X[28X #I SCLibInit: made directory "/tmp/repository/" for user library.[128X[104X273[4X[28X #I SCIntFunc.SCLibInit: index not found -- trying to reconstruct it.[128X[104X274[4X[28X #I SCLibUpdate: rebuilding index for /tmp/repository/.[128X[104X275[4X[28X #I SCLibUpdate: rebuilding index done.[128X[104X276[4X[28X [Simplicial complex library. Properties:[128X[104X277[4X[28X CalculateIndexAttributes=true[128X[104X278[4X[28X Number of complexes in library=0[128X[104X279[4X[28X IndexAttributes=[ "Name", "Dim", "F", "G", "H", "Chi", "Homology", "IsPM", [128X[104X280[4X[28X "IsManifold" ][128X[104X281[4X[28X Loaded=true[128X[104X282[4X[28X Path="/tmp/repository/"[128X[104X283[4X[28X ][128X[104X284[4X[28X [128X[104X285[4X[32X[104X286287[1X13.1-9 SCLibIsLoaded[101X288289[29X[2XSCLibIsLoaded[102X( [3Xrepository[103X ) [32X function290[6XReturns:[106X [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X upon succes, [9Xfail[109X otherwise.[133X291292[33X[0;0YReturns [9Xtrue[109X when a given library repository [3Xrepository[103X is in loaded state.293This means that the directory of this repository is accessible and a294repository index file for this repository exists in the repositories' path.295If this is not the case [9Xfalse[109X is returned.[133X296297[4X[32X Example [32X[104X298[4X[28X gap> SCLibIsLoaded(SCLib);[128X[104X299[4X[28X true[128X[104X300[4X[28X gap> SCLib.IsLoaded;[128X[104X301[4X[28X true[128X[104X302[4X[28X [128X[104X303[4X[32X[104X304305[1X13.1-10 SCLibSearchByAttribute[101X306307[29X[2XSCLibSearchByAttribute[102X( [3Xrepository[103X, [3Xexpr[103X ) [32X function308[6XReturns:[106X [33X[0;10YA list of items of the form [10X[ integer, string ][110X upon success, [9Xfail[109X309otherwise.[133X310311[33X[0;0YSearches a given repository [3Xrepository[103X for complexes for which the boolean312expression [3Xexpr[103X, passed as string, evaluates to [9Xtrue[109X and returns a list of313complexes with entries of the form [10X[ID, NAME][110X or [9Xfail[109X upon error. The314expression may use all [5XGAP[105X functions and can access all the indexed315attributes of the complexes in the given repository for the query. The316standard attributes are: Dim (Dimension), F (f-vector), G (g-vector), H317(h-vector), Chi (Euler characteristic), Homology, Name, IsPM, IsManifold.318See [10XSCLib[110X for the set of indexed attributes of the global library of319[5Xsimpcomp[105X.[133X320321[4X[32X Example [32X[104X322[4X[28X gap> SCLibSearchByAttribute(SCLib,"Dim=4 and F[3]=Binomial(F[1],3)");[128X[104X323[4X[28X [ [ 16, "CP^2 (VT)" ], [ 7648, "K3_16" ] ][128X[104X324[4X[28X gap> SCLib.SearchByAttribute("Dim=4 and F[3]=Binomial(F[1],3)");[128X[104X325[4X[28X [ [ 16, "CP^2 (VT)" ], [ 7648, "K3_16" ] ][128X[104X326[4X[28X [128X[104X327[4X[32X[104X328329[1X13.1-11 SCLibSearchByName[101X330331[29X[2XSCLibSearchByName[102X( [3Xrepository[103X, [3Xname[103X ) [32X function332[6XReturns:[106X [33X[0;10YA list of items of the form [10X[ integer, string ][110X upon success, [9Xfail[109X333otherwise.[133X334335[33X[0;0YSearches a given repository [3Xrepository[103X for complexes that contain the string336[3Xname[103X as a substring of their name attribute and returns a list of the337complexes found with entries of the form [10X[ID, NAME][110X. See [2XSCLib[102X ([14X13.1-2[114X) for338a naming convention used for the global library of [5Xsimpcomp[105X.[133X339340[4X[32X Example [32X[104X341[4X[28X gap> SCLibSearchByName(SCLib,"K3");[128X[104X342[4X[28X [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ][128X[104X343[4X[28X gap> SCLib.SearchByName("K3"); #alternative syntax[128X[104X344[4X[28X [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ][128X[104X345[4X[28X gap> SCLib.SearchByName("S^4x"); #search for products with S^4[128X[104X346[4X[28X [ [ 713, "S^4xS^1 (VT)" ], [ 1472, "S^4xS^1 (VT)" ], [ 1475, "S^4xS^1 (VT)" ],[128X[104X347[4X[28X [ 7479, "S^4xS^2" ], [ 7539, "S^4xS^3" ], [ 7573, "S^4xS^4" ] ][128X[104X348[4X[28X [128X[104X349[4X[32X[104X350351[1X13.1-12 SCLibSize[101X352353[29X[2XSCLibSize[102X( [3Xrepository[103X ) [32X function354[6XReturns:[106X [33X[0;10Yinteger upon success, [9Xfail[109X otherwise.[133X355356[33X[0;0YReturns the number of complexes contained in the given repository357[3Xrepository[103X. Fails if the library repository was not previously loaded with358[10XSCLibInit[110X.[133X359360[4X[32X Example [32X[104X361[4X[28X gap> SCLibSize(SCLib); #SCLib is the repository of the global library[128X[104X362[4X[28X 7649[128X[104X363[4X[28X [128X[104X364[4X[32X[104X365366[1X13.1-13 SCLibUpdate[101X367368[29X[2XSCLibUpdate[102X( [3Xrepository[103X[, [3Xrecalc[103X] ) [32X function369[6XReturns:[106X [33X[0;10Ylibrary repository of type [10XSCLibRepository[110X upon success, [9Xfail[109X370otherwise.[133X371372[33X[0;0YRecreates the index of a given repository (either via a repository object or373a base path of a repository [3Xrepository[103X) by scanning the base path for all374[10X.sc[110X files containing simplicial complexes of the repository. Returns a375repository object with the newly created index on success or [9Xfail[109X in case of376an error. The optional boolean argument [3Xrecalc[103X forces [5Xsimpcomp[105X to recompute377all the indexed properties (such as f-vector, homology, etc.) of the378simplicial complexes in the repository if set to [9Xtrue[109X.[133X379380[4X[32X Example [32X[104X381[4X[28X gap> myRepository:=SCLibInit("/tmp/repository");;[128X[104X382[4X[28X gap> SCLibUpdate(myRepository);[128X[104X383[4X[28X #I SCLibUpdate: rebuilding index for /tmp/repository/.[128X[104X384[4X[28X #I SCLibUpdate: rebuilding index done.[128X[104X385[4X[28X [Simplicial complex library. Properties:[128X[104X386[4X[28X CalculateIndexAttributes=true[128X[104X387[4X[28X Number of complexes in library=0[128X[104X388[4X[28X IndexAttributes=[ "Name", "Dim", "F", "G", "H", "Chi", "Homology", "IsPM", [128X[104X389[4X[28X "IsManifold" ][128X[104X390[4X[28X Loaded=true[128X[104X391[4X[28X Path="/tmp/repository/"[128X[104X392[4X[28X ][128X[104X393[4X[28X [128X[104X394[4X[32X[104X395396[1X13.1-14 SCLibStatus[101X397398[29X[2XSCLibStatus[102X( [3Xrepository[103X ) [32X function399[6XReturns:[106X [33X[0;10Ylibrary repository of type [10XSCLibRepository[110X upon success, [9Xfail[109X400otherwise.[133X401402[33X[0;0YLets [5XGAP[105X print the status of a given library repository [3Xrepository[103X.403[10XIndexAttributes[110X is the list of attributes indexed for this repository. If404[10XCalculateIndexAttributes[110X is true, the index attributes for a complex added405to the library are calculated automatically upon addition of the complex,406otherwise this is left to the user and only pre-calculated attributes are407indexed.[133X408409[4X[32X Example [32X[104X410[4X[28X gap> SCLibStatus(SCLib);[128X[104X411[4X[28X [Simplicial complex library. Properties:[128X[104X412[4X[28X CalculateIndexAttributes=true[128X[104X413[4X[28X Number of complexes in library=7649[128X[104X414[4X[28X IndexAttributes=[ "Name", "Dim", "F", "G", "H", "Chi", "Homology", "IsPM", [128X[104X415[4X[28X "IsManifold" ][128X[104X416[4X[28X Loaded=true[128X[104X417[4X[28X Path="/home/mi/spreerjn/private/apps/gap4r8/pkg/simpcomp/complexes/"[128X[104X418[4X[28X ][128X[104X419[4X[28X [128X[104X420[4X[32X[104X421422423[1X13.2 [33X[0;0Y[5Xsimpcomp[105X[101X[1X input / output functions[133X[101X424425[33X[0;0YThis section contains a description of the input/output-functionality426provided by [5Xsimpcomp[105X. The package provides the functionality to save and427load simplicial complexes (and their known properties) to, respectively from428files in XML format. Furthermore, it provides the user with functions to429export simplicial complexes into polymake format (for this format there also430exists rudimentary import functionality), as JavaView geometry or in form of431a LaTeX table. For importing more complex polymake data the package432polymaking [R\"13] can be used.[133X433434[1X13.2-1 SCLoad[101X435436[29X[2XSCLoad[102X( [3Xfilename[103X ) [32X function437[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X438otherwise.[133X439440[33X[0;0YLoads a simplicial complex stored in a binary format (using [10XIO_Pickle[110X) from441a file specified in [3Xfilename[103X (as string). If [3Xfilename[103X does not end in [10X.scb[110X,442this suffix is appended to the file name.[133X443444[4X[32X Example [32X[104X445[4X[28X gap> c:=SCBdSimplex(3);;[128X[104X446[4X[28X gap> SCSave(c,"/tmp/bddelta3");[128X[104X447[4X[28X true[128X[104X448[4X[28X gap> d:=SCLoad("/tmp/bddelta3");[128X[104X449[4X[28X [SimplicialComplex[128X[104X450[4X[28X [128X[104X451[4X[28X Properties known: AutomorphismGroup, AutomorphismGroupSize, [128X[104X452[4X[28X AutomorphismGroupStructure, [128X[104X453[4X[28X AutomorphismGroupTransitivity, Dim, [128X[104X454[4X[28X EulerCharacteristic, FacetsEx, GeneratorsEx, [128X[104X455[4X[28X HasBoundary, Homology, IsConnected, [128X[104X456[4X[28X IsStronglyConnected, Name, NumFaces[], [128X[104X457[4X[28X TopologicalType, Vertices.[128X[104X458[4X[28X [128X[104X459[4X[28X Name="S^2_4"[128X[104X460[4X[28X Dim=2[128X[104X461[4X[28X AutomorphismGroupSize=24[128X[104X462[4X[28X AutomorphismGroupStructure="S4"[128X[104X463[4X[28X AutomorphismGroupTransitivity=4[128X[104X464[4X[28X EulerCharacteristic=2[128X[104X465[4X[28X HasBoundary=false[128X[104X466[4X[28X Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ][128X[104X467[4X[28X IsConnected=true[128X[104X468[4X[28X IsStronglyConnected=true[128X[104X469[4X[28X TopologicalType="S^2"[128X[104X470[4X[28X [128X[104X471[4X[28X /SimplicialComplex][128X[104X472[4X[28X gap> c=d;[128X[104X473[4X[28X true[128X[104X474[4X[28X [128X[104X475[4X[32X[104X476477[1X13.2-2 SCLoadXML[101X478479[29X[2XSCLoadXML[102X( [3Xfilename[103X ) [32X function480[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X481otherwise.[133X482483[33X[0;0YLoads a simplicial complex stored in XML format from a file specified in484[3Xfilename[103X (as string). If [3Xfilename[103X does not end in [10X.sc[110X, this suffix is485appended to the file name.[133X486487[4X[32X Example [32X[104X488[4X[28X gap> c:=SCBdSimplex(3);;[128X[104X489[4X[28X gap> SCSaveXML(c,"/tmp/bddelta3");[128X[104X490[4X[28X true[128X[104X491[4X[28X gap> d:=SCLoadXML("/tmp/bddelta3");[128X[104X492[4X[28X [SimplicialComplex[128X[104X493[4X[28X [128X[104X494[4X[28X Properties known: AutomorphismGroup, AutomorphismGroupSize, [128X[104X495[4X[28X AutomorphismGroupStructure, [128X[104X496[4X[28X AutomorphismGroupTransitivity, Dim, [128X[104X497[4X[28X EulerCharacteristic, FacetsEx, GeneratorsEx, [128X[104X498[4X[28X HasBoundary, Homology, IsConnected, [128X[104X499[4X[28X IsStronglyConnected, Name, NumFaces[], [128X[104X500[4X[28X TopologicalType, Vertices.[128X[104X501[4X[28X [128X[104X502[4X[28X Name="S^2_4"[128X[104X503[4X[28X Dim=2[128X[104X504[4X[28X AutomorphismGroupSize=24[128X[104X505[4X[28X AutomorphismGroupStructure="S4"[128X[104X506[4X[28X AutomorphismGroupTransitivity=4[128X[104X507[4X[28X EulerCharacteristic=2[128X[104X508[4X[28X HasBoundary=false[128X[104X509[4X[28X Homology=[ [ 0, [ ] ], [ 0, [ ] ], [ 1, [ ] ] ][128X[104X510[4X[28X IsConnected=true[128X[104X511[4X[28X IsStronglyConnected=true[128X[104X512[4X[28X TopologicalType="S^2"[128X[104X513[4X[28X [128X[104X514[4X[28X /SimplicialComplex][128X[104X515[4X[28X gap> c=d;[128X[104X516[4X[28X true[128X[104X517[4X[28X [128X[104X518[4X[32X[104X519520[1X13.2-3 SCSave[101X521522[29X[2XSCSave[102X( [3Xcomplex[103X, [3Xfilename[103X ) [32X function523[6XReturns:[106X [33X[0;10Y[9Xtrue[109X upon success, [9Xfail[109X otherwise.[133X524525[33X[0;0YSaves a simplicial complex in a binary format (using [10XIO_Pickle[110X) to a file526specified in [3Xfilename[103X (as string). If [3Xfilename[103X does not end in [10X.scb[110X, this527suffix is appended to the file name.[133X528529[4X[32X Example [32X[104X530[4X[28X gap> c:=SCBdSimplex(3);;[128X[104X531[4X[28X gap> SCSave(c,"/tmp/bddelta3");[128X[104X532[4X[28X true[128X[104X533[4X[28X [128X[104X534[4X[32X[104X535536[1X13.2-4 SCSaveXML[101X537538[29X[2XSCSaveXML[102X( [3Xcomplex[103X, [3Xfilename[103X ) [32X function539[6XReturns:[106X [33X[0;10Y[9Xtrue[109X upon success, [9Xfail[109X otherwise.[133X540541[33X[0;0YSaves a simplicial complex [3Xcomplex[103X to a file specified by [3Xfilename[103X (as542string) in XML format. If [3Xfilename[103X does not end in [10X.sc[110X, this suffix is543appended to the file name.[133X544545[4X[32X Example [32X[104X546[4X[28X gap> c:=SCBdSimplex(3);;[128X[104X547[4X[28X gap> SCSaveXML(c,"/tmp/bddelta3");[128X[104X548[4X[28X true[128X[104X549[4X[28X [128X[104X550[4X[32X[104X551552[1X13.2-5 SCExportMacaulay2[101X553554[29X[2XSCExportMacaulay2[102X( [3Xcomplex[103X, [3Xring[103X, [3Xfilename[103X[, [3Xalphalabels[103X] ) [32X function555[6XReturns:[106X [33X[0;10Y[9Xtrue[109X upon success, [9Xfail[109X otherwise.[133X556557[33X[0;0YExports the facet list of a given simplicial complex [3Xcomplex[103X in [10XMacaulay2[110X558format to a file specified by [3Xfilename[103X. The argument [3Xring[103X can either be the559ring of integers (specified by [10XIntegers[110X) or the ring of rationals (sepcified560by [10XRationals[110X). The optional boolean argument [3Xalphalabels[103X labels the complex561with characters from [22Xa, dots ,z[122X in the exported file if a value of [9Xtrue[109X is562supplied, while the standard labeling of the vertices is [22Xv_1, dots ,v_n[122X563where [22Xn[122X is the number of vertices of [3Xcomplex[103X. If [3Xcomplex[103X has more than [22X26[122X564vertices, the argument [3Xalphalabels[103X is ignored.[133X565566[4X[32X Example [32X[104X567[4X[28X gap> c:=SCBdCrossPolytope(4);;[128X[104X568[4X[28X gap> SCExportMacaulay2(c,Integers,"/tmp/bdbeta4.m2");[128X[104X569[4X[28X true[128X[104X570[4X[28X [128X[104X571[4X[32X[104X572573[1X13.2-6 SCExportPolymake[101X574575[29X[2XSCExportPolymake[102X( [3Xcomplex[103X, [3Xfilename[103X ) [32X function576[6XReturns:[106X [33X[0;10Y[9Xtrue[109X upon success, [9Xfail[109X otherwise.[133X577578[33X[0;0YExports the facet list with vertex labels of a given simplicial complex579[3Xcomplex[103X in [10Xpolymake[110X format to a file specified by [3Xfilename[103X. Currently, only580the export in the format of [10Xpolymake[110X version 2.3 is supported.[133X581582[4X[32X Example [32X[104X583[4X[28X gap> c:=SCBdCrossPolytope(4);;[128X[104X584[4X[28X gap> SCExportPolymake(c,"/tmp/bdbeta4.poly");[128X[104X585[4X[28X true[128X[104X586[4X[28X [128X[104X587[4X[32X[104X588589[1X13.2-7 SCImportPolymake[101X590591[29X[2XSCImportPolymake[102X( [3Xfilename[103X ) [32X function592[6XReturns:[106X [33X[0;10Ysimplicial complex of type [10XSCSimplicialComplex[110X upon success, [9Xfail[109X593otherwise.[133X594595[33X[0;0YImports the facet list of a [10Xtopaz[110X [10Xpolymake[110X file specified by [3Xfilename[103X596(discarding any vertex labels) and creates a simplicial complex object from597these facets.[133X598599[4X[32X Example [32X[104X600[4X[28X gap> c:=SCBdCrossPolytope(4);;[128X[104X601[4X[28X gap> SCExportPolymake(c,"/tmp/bdbeta4.poly");[128X[104X602[4X[28X true[128X[104X603[4X[28X gap> d:=SCImportPolymake("/tmp/bdbeta4.poly");[128X[104X604[4X[28X [SimplicialComplex[128X[104X605[4X[28X [128X[104X606[4X[28X Properties known: Dim, FacetsEx, Name, Vertices.[128X[104X607[4X[28X [128X[104X608[4X[28X Name="polymake import '/tmp/bdbeta4.poly'"[128X[104X609[4X[28X Dim=3[128X[104X610[4X[28X [128X[104X611[4X[28X /SimplicialComplex][128X[104X612[4X[28X gap> c=d;[128X[104X613[4X[28X true[128X[104X614[4X[28X [128X[104X615[4X[32X[104X616617[1X13.2-8 SCExportLatexTable[101X618619[29X[2XSCExportLatexTable[102X( [3Xcomplex[103X, [3Xfilename[103X, [3Xitemsperline[103X ) [32X function620[6XReturns:[106X [33X[0;10Y[9Xtrue[109X on success, [9Xfail[109X otherwise.[133X621622[33X[0;0YExports the facet list of a given simplicial complex [3Xcomplex[103X (or any list623given as first argument) in form of a LaTeX table to a file specified by624[3Xfilename[103X. The argument [3Xitemsperline[103X specifies how many columns the exported625table should have. The faces are exported in the format [22X⟨ v_1,dots,v_k ⟩[122X.[133X626627[4X[32X Example [32X[104X628[4X[28X gap> c:=SCBdSimplex(5);;[128X[104X629[4X[28X gap> SCExportLatexTable(c,"/tmp/bd5simplex.tex",5);[128X[104X630[4X[28X true[128X[104X631[4X[28X [128X[104X632[4X[32X[104X633634[1X13.2-9 SCExportJavaView[101X635636[29X[2XSCExportJavaView[102X( [3Xcomplex[103X, [3Xfile[103X, [3Xcoords[103X ) [32X function637[6XReturns:[106X [33X[0;10Y[9Xtrue[109X on success, [9Xfail[109X otherwise.[133X638639[33X[0;0YExports the 2-skeleton of the given simplicial complex [3Xcomplex[103X (or the640facets if the complex is of dimension 2 or less) in [10XJavaView[110X format (file641name suffix [10X.jvx[110X) to a file specified by [3Xfilename[103X (as string). The list642[3Xcoords[103X must contain a [22X3[122X-tuple of real coordinates for each vertex of643[3Xcomplex[103X, either as tuple of length three containing the coordinates644(Warning: as [5XGAP[105X only has rudimentary support for floating point values,645currently only integer numbers can be used as coordinates when providing646[3Xcoords[103X as list of [22X3[122X-tuples) or as string of the form [10X"x.x y.y z.z"[110X with647decimal numbers [10Xx.x[110X, [10Xy.y[110X, [10Xz.z[110X for the three coordinates (i.e. [10X"1.0 0.06480.0"[110X).[133X649650[4X[32X Example [32X[104X651[4X[28X gap> coords:=[[1,0,0],[0,1,0],[0,0,1]];;[128X[104X652[4X[28X gap> SCExportJavaView(SCBdSimplex(2),"/tmp/triangle.jvx",coords);[128X[104X653[4X[28X true[128X[104X654[4X[28X [128X[104X655[4X[32X[104X656657[1X13.2-10 SCExportPolymake[101X658659[29X[2XSCExportPolymake[102X( [3Xcomplex[103X, [3Xfilename[103X ) [32X function660[6XReturns:[106X [33X[0;10Y[9Xtrue[109X upon success, [9Xfail[109X otherwise.[133X661662[33X[0;0YExports the gluings of the tetrahedra of a given combinatorial [22X3[122X-manifold663[3Xcomplex[103X in a format compatible with Matveev's [22X3[122X-manifold software664[10XRecognizer[110X.[133X665666[4X[32X Example [32X[104X667[4X[28X gap> c:=SCBdCrossPolytope(4);;[128X[104X668[4X[28X gap> SCExportRecognizer(c,"/tmp/bdbeta4.mv");[128X[104X669[4X[28X true[128X[104X670[4X[28X [128X[104X671[4X[32X[104X672673[1X13.2-11 SCExportSnapPy[101X674675[29X[2XSCExportSnapPy[102X( [3Xcomplex[103X, [3Xfilename[103X ) [32X function676[6XReturns:[106X [33X[0;10Y[9Xtrue[109X upon success, [9Xfail[109X otherwise.[133X677678[33X[0;0YExports the facet list and orientability of a given combinatorial679[22X3[122X-pseudomanifold [3Xcomplex[103X in [10XSnapPy[110X format to a file specified by [3Xfilename[103X.[133X680681[4X[32X Example [32X[104X682[4X[28X gap> SCLib.SearchByAttribute("Dim=3 and F=[8,28,56,28]");[128X[104X683[4X[28X [ [ 8, "PM^3 - TransitiveGroup(8,43), No. 1" ] ][128X[104X684[4X[28X gap> c:=SCLib.Load(last[1][1]);;[128X[104X685[4X[28X gap> SCExportSnapPy(c,"/tmp/M38.tri");[128X[104X686[4X[28X true[128X[104X687[4X[28X [128X[104X688[4X[32X[104X689690691692