diff --git a/gap/Library/library.gd b/gap/Library/library.gd index d21ee20c..118c0da8 100644 --- a/gap/Library/library.gd +++ b/gap/Library/library.gd @@ -462,7 +462,6 @@ DeclareOperation( "JanusHead", [] ); #! [ [ 1, 2, 5 ], [ 2, 3, 6 ], [ 3, 4, 7 ], [ 1, 4, 8 ] ] #! gap> VerticesOfFaces(umb4); #! [ [ 1, 2, 5 ], [ 2, 3, 5 ], [ 3, 4, 5 ], [ 1, 4, 5 ] ] -#! gap> #! gap> umb2 := SimplicialUmbrella(2); #! simplicial surface (3 vertices, 4 edges, and 2 faces) #! gap> VerticesOfEdges(umb2); @@ -476,6 +475,35 @@ DeclareOperation( "JanusHead", [] ); DeclareOperation("SimplicialUmbrella", [ IsPosInt ] ); DeclareSynonym("SimplicialGon", SimplicialUmbrella); +#! +#! +#! +#! a simplicial surface +#! +#! Return a simplicial surface consisting of two closed umbrella-paths +#! with nrFaces triangles which are joined at their boundary. +#! The labels of one umbrella are assigned according to the illustration for SimplicialUmbrella, +#! the additional vertex is labelled with nrFaces+2, the incident edges to this vertex +#! are labelled from 2*nrFaces+1 to 4*nrFaces and the incident faces are labelled from +#! nrFaces+1 to 2*nrFaces. +#! @ExampleSession +#! gap> doubleumb2:=SimplicialDoubleUmbrella(2); +#! simplicial surface (4 vertices, 6 edges, and 4 faces) +#! gap> VerticesOfEdges(doubleumb2); +#! [ [ 1, 3 ], [ 2, 3 ], [ 1, 2 ], [ 1, 2 ], [ 1, 4 ], [ 2, 4 ] ] +#! gap> EdgesOfFaces(doubleumb2); +#! [ [ 1, 2, 3 ], [ 1, 2, 4 ], [ 3, 5, 6 ], [ 4, 5, 6 ] ] +#! gap> doubleumb4:=SimplicialDoubleUmbrella(4); +#! simplicial surface (6 vertices, 12 edges, and 8 faces) +#! gap> IsIsomorphic(doubleumb4,Octahedron()); +#! true +#! @EndExampleSession +#! +#! +# here no AutoDoc documentation since synonyms can't be handled automatically +DeclareOperation("SimplicialDoubleUmbrella", [ IsPosInt ] ); +DeclareSynonym("SimplicialDoubleGon", SimplicialDoubleUmbrella); + #! @BeginGroup SimplicialOpenGeodesic #! @Description #! Return a simplicial surface consisting of one non-closed geodesic-path diff --git a/gap/Library/library.gi b/gap/Library/library.gi index 5904fa87..4424e642 100644 --- a/gap/Library/library.gi +++ b/gap/Library/library.gi @@ -827,6 +827,30 @@ InstallMethod( SimplicialUmbrella, "for an integer at least 2", [IsPosInt], end ); +InstallMethod(SimplicialDoubleUmbrella, "for an integer at least 2", [IsPosInt], + function(nrFaces) + local umbr, verticesOfEdges, edgesOfFaces, i; + + if nrFaces = 1 then + Error("SimplicialUmbrella: Argument has to be greater than 1."); + fi; + + umbr:=SimplicialUmbrella(nrFaces); + verticesOfEdges:=ShallowCopy(VerticesOfEdges(umbr)); + edgesOfFaces:=ShallowCopy(EdgesOfFaces(umbr)); + + for i in [1..nrFaces-1] do + edgesOfFaces[i+nrFaces] := [i+nrFaces,2*nrFaces+i,2*nrFaces+i+1]; + + verticesOfEdges[2*nrFaces+i] := [i,nrFaces+2]; + od; + edgesOfFaces[2*nrFaces] := [2*nrFaces,2*nrFaces+nrFaces, 2*nrFaces+1]; + verticesOfEdges[2*nrFaces+nrFaces]:=[nrFaces, nrFaces+2]; + + return SimplicialSurfaceByDownwardIncidenceNC(verticesOfEdges, edgesOfFaces); +end); + + InstallMethod( SimplicialOpenGeodesic, "for an integer at least 1", [IsPosInt], function(nrFaces) local verticesOfFaces;