Skip to content

Simplicial Complex#351

Open
linuskuehnle wants to merge 40 commits into
gap-packages:masterfrom
linuskuehnle:SimplicialComplex
Open

Simplicial Complex#351
linuskuehnle wants to merge 40 commits into
gap-packages:masterfrom
linuskuehnle:SimplicialComplex

Conversation

@linuskuehnle
Copy link
Copy Markdown
Contributor

Contains a possible integration of type Simplicial Complex as a special case of type Triangular Complex.

linuskuehnle and others added 18 commits February 26, 2026 13:16
…sted properties of type simplicial complex + fixed object constructor call for short filter
…gument handling and add new explicit installation methods for simplicial complex short filter functions.
…ed simplicial complexes in AllWildTameColouredSurfaces helper function
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 93.45703% with 67 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.20%. Comparing base (2e398f8) to head (1487d02).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
gap/PolygonalComplexes/constructors.gi 94.16% 29 Missing ⚠️
gap/PolygonalComplexes/modification.gi 52.94% 16 Missing ⚠️
gap/PolygonalComplexes/properties.gi 86.88% 16 Missing ⚠️
gap/Paths/connectivity.gi 96.22% 2 Missing ⚠️
gap/PolygonalComplexes/main.gi 66.66% 2 Missing ⚠️
gap/ColouredComplexes/variColouring.gi 66.66% 1 Missing ⚠️
gap/PolygonalComplexes/incidence_geometry.gi 95.65% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #351      +/-   ##
==========================================
+ Coverage   73.53%   74.20%   +0.66%     
==========================================
  Files          61       61              
  Lines       17551    18148     +597     
==========================================
+ Hits        12907    13466     +559     
- Misses       4644     4682      +38     
Files with missing lines Coverage Δ
gap/ColouredComplexes/edgeColouring.gd 100.00% <100.00%> (ø)
gap/ColouredComplexes/edgeColouring.gi 50.32% <100.00%> (ø)
gap/Library/library.gi 55.43% <100.00%> (ø)
gap/Paths/orientability.gi 93.14% <100.00%> (ø)
gap/Paths/paths.gd 100.00% <ø> (ø)
gap/PolygonalComplexes/constructing_families.gi 86.56% <100.00%> (ø)
gap/PolygonalComplexes/constructors.gd 100.00% <100.00%> (ø)
gap/PolygonalComplexes/distances.gd 100.00% <ø> (ø)
gap/PolygonalComplexes/embedding.gd 100.00% <100.00%> (ø)
gap/PolygonalComplexes/embedding.gi 96.36% <100.00%> (ø)
... and 19 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…correctly, added tests for Simplicial Complexes, changed and added documentation, cleaned up categories_families.gd
@MeikeWeiss MeikeWeiss closed this May 5, 2026
@MeikeWeiss MeikeWeiss reopened this May 5, 2026
… constructor function for creating simplicial complexes from simplicial surfaces, renamed TriangularComplexFromSimplicialComplex to SimplicialSurfaceFromSimplicialComplex
@MeikeWeiss
Copy link
Copy Markdown
Collaborator

MeikeWeiss commented May 6, 2026

I wanted to create a simplicial complex consisting of a single vertex, a triangle and an edge connected to the triangle by SimplicialComplexByDownwardIncidence([1,2,3,4,5],[[2,3],[3,4],[4,5],[3,5]],[[2,3,4]]);. But I get an error and the same for SimplicialComplexByDownwardIncidence([1,2,3,4,5],[1,2,3,4],[1],[[2,3],[3,4],[4,5],[3,5]],[[2,3,4]]); but with a different error.

UpwardIncidence for this example is also not working SimplicialComplexByUpwardIncidence([1..5],[[],[1],[1,2,4],[2,3],[3,4]],[[],[1],[1],[1]]); .

Could it be that "isolated" edges are not included in the implementation? As it is not possible to include them in the constructor VerticesInFaces.

@linuskuehnle
Copy link
Copy Markdown
Contributor Author

linuskuehnle commented May 6, 2026

I wanted to create a simplicial complex consisting of a single vertex, a triangle and an edge connected to the triangle by SimplicialComplexByDownwardIncidence([1,2,3,4,5],[[2,3],[3,4],[4,5],[3,5]],[[2,3,4]]);. But I get an error and the same for SimplicialComplexByDownwardIncidence([1,2,3,4,5],[1,2,3,4],[1],[[2,3],[3,4],[4,5],[3,5]],[[2,3,4]]); but with a different error.

UpwardIncidence for this example is also not working SimplicialComplexByUpwardIncidence([1..5],[[],[1],[1,2,4],[2,3],[3,4]],[[],[1],[1],[1]]); .

Could it be that "isolated" edges are not included in the implementation? As it is not possible to include them in the constructor VerticesInFaces.

SimplicialComplexByDownwardIncidence([1,2,3,4,5],[[2,3],[3,4],[4,5],[3,5]],[[2,3,4]]); fails because for some reason [1,2,3,4,5] does not satisfy the IsSet filter, if you use SimplicialComplexByDownwardIncidence([1..5],[[2,3],[3,4],[4,5],[3,5]],[[2,3,4]]);

One issue you encounter when calling the constructors like that is that lists like [1,2,3,4,5] for vertices or [1,2,3,4] for edges seem to not satisfy the IsSet filter even though IsSet is obviously true for them. It finds the correct function with [1..5] for vertices or [1..4] for edges as args though:

SimplicialComplexByDownwardIncidence([1..5],[[2,3],[3,4],[4,5],[3,5]],[[2,3,4]]);
SimplicialComplexByDownwardIncidence([1..5],[1..4],[1],[[2,3],[3,4],[4,5],[3,5]],[[2,3,4]]);

Right now they throw an error because SimplicialComplex is supposed to be a Simplicial Complex with isolated vertices. It is not supposed to work with triangles that have an edge connected to it as in your example. I will work on that so that will be possible too.
Here is an example on how i construct Simplicial Complexes for now:

vertices := [1..4];
edges := [1..3];
faces := [1..2];
verticesOfEdges := [ [ 1, 2 ], [ 1, 3 ], [ 2, 3 ] ];
edgesOfFaces := [ [ 1, 2, 3 ], [ 1, 2, 3 ] ];

SimplicialComplexByDownwardIncidence(vertices, edges, faces, verticesOfEdges, edgesOfFaces);
SimplicialComplexByDownwardIncidenceNC(vertices, edges, faces, verticesOfEdges, edgesOfFaces);
SimplicialComplexByDownwardIncidence(vertices, verticesOfEdges, edgesOfFaces);
comp := SimplicialComplexByDownwardIncidenceNC(vertices, verticesOfEdges, edgesOfFaces);

edgesOfVertices := EdgesOfVertices(comp);
facesOfEdges := FacesOfEdges(comp);

SimplicialComplexByUpwardIncidence(vertices, edges, faces, edgesOfVertices, facesOfEdges);
SimplicialComplexByUpwardIncidenceNC(vertices, edges, faces, edgesOfVertices, facesOfEdges);
SimplicialComplexByUpwardIncidence(vertices, edgesOfVertices, facesOfEdges);
SimplicialComplexByUpwardIncidenceNC(vertices, edgesOfVertices, facesOfEdges);

verticesInFaces := VerticesOfFaces(comp);

SimplicialComplexByVerticesInFaces(vertices, faces, verticesInFaces);
SimplicialComplexByVerticesInFacesNC(vertices, faces, verticesInFaces);
SimplicialComplexByVerticesInFaces(vertices, verticesInFaces);
SimplicialComplexByVerticesInFacesNC(vertices, verticesInFaces);

@MeikeWeiss
Copy link
Copy Markdown
Collaborator

Is there any possibility such that [1,2,3,4] is also allowed?

Thanks! Here is an image with some examples that all should be possible to construct: https://en.wikipedia.org/wiki/Simplicial_complex

linuskuehnle and others added 3 commits May 7, 2026 22:53
…d isolated edges and vertices on all complexes, compressed and added simplicial complexes tests, removed SimplicialComplexFromSimplicialSurface functions, rolled back to old IsTriangular, renamed SimplicialSurfaceFromSimplicialComplex to PureSimplicialComplex
…eGraphs build functions to ignore isolated vertices for edge graph construction
…ce over edge-face incidence to avoid missing edges with no face incidences in Edge() computation
- Updated methods in edgeColouring.gi and variColouring.gi to set IsNotTwisted instead of IsPolygonalComplex for various complex types.
- Modified constructors in constructors.gd and constructors.gi to reflect the change in handling twisted polygonal complexes.
- Adjusted methods in orientability.gi, embedding.gi, incidence_geometry.gi, and modification.gi to ensure consistency with the new IsNotTwisted property.
- Removed redundant checks and property definitions in properties.gi and categories_families.gd.
…icialComplex and added tests for PureSimplicialComplex
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
Comment thread gap/PolygonalComplexes/graphs.gi Outdated
Comment thread gap/PolygonalComplexes/main.gi Outdated
Comment thread gap/PolygonalComplexes/properties.gi Outdated
Comment thread gap/PolygonalComplexes/properties.gi Outdated
…adjusted EdgeDigraphsGraph to also include isolated vertices, removed redundant IsolatedVertices call on closed complex, removed unused helper function
…in EdgeDigraphsGraph, allowed either full vertex list or only isolated vertices as vertices argument on short filter SimplicialComplex contructor calls
Comment thread gap/PolygonalComplexes/incidence_geometry.gd
Comment thread gap/PolygonalComplexes/incidence_geometry.gd Outdated
… documentation on SimplicialComplex constructors, adjusted IsFacePure example description, fixed constructor not setting vertices explicitly when required, adjusted BoundaryVertices and BoundaryEdges to work with complexes with isolated vertices and edges, added examples for IsolatedEdges, fixed typos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants