Skip to content

Simplicial Complex#351

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

Simplicial Complex#351
linuskuehnle wants to merge 56 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

codecov Bot commented Apr 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.98305% with 104 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.86%. Comparing base (2e398f8) to head (60caec4).
⚠️ Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
gap/PolygonalComplexes/constructors.gi 86.63% 62 Missing ⚠️
gap/PolygonalComplexes/modification.gi 48.38% 16 Missing ⚠️
gap/PolygonalComplexes/properties.gi 86.32% 16 Missing ⚠️
unit_tests/Test_Inferences_PolygonalComplex.g 96.66% 4 Missing ⚠️
gap/Paths/connectivity.gi 96.15% 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%   73.86%   +0.32%     
==========================================
  Files          61       61              
  Lines       17551    18053     +502     
==========================================
+ Hits        12907    13334     +427     
- Misses       4644     4719      +75     
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.33% <100.00%> (-0.10%) ⬇️
gap/Paths/orientability.gi 93.14% <100.00%> (ø)
gap/Paths/paths.gd 100.00% <ø> (ø)
gap/PolygonalComplexes/constructing_families.gi 86.50% <100.00%> (-0.07%) ⬇️
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

MeikeWeiss commented May 6, 2026

Copy link
Copy Markdown
Collaborator

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

linuskuehnle commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

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
Comment thread gap/PolygonalComplexes/incidence_geometry.gd Outdated
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
…s, adjusted and fixed descriptions and filters, and adjusted constructor calls across the package to these changes

@MeikeWeiss MeikeWeiss left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice progress!

Check in all examples that the lines are not too long in the manual.pdf.

Comment thread gap/Paths/paths.gd Outdated
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
Comment thread gap/PolygonalComplexes/drawing.gd Outdated
Comment thread gap/PolygonalComplexes/embedding.gd Outdated
Comment thread gap/PolygonalComplexes/incidence_geometry.gd Outdated
Comment thread gap/PolygonalComplexes/properties.gd Outdated
Comment thread gap/PolygonalComplexes/properties.gd
Comment thread gap/Paths/connectivity.gi Outdated
Comment thread gap/Paths/connectivity.gi Outdated
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
Comment thread gap/PolygonalComplexes/constructors.gd
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
Comment thread gap/PolygonalComplexes/constructors.gd Outdated
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