Simplicial Complexes
Introduction
Abstract simplicial complexes provide a combinatorial way to define topological spaces. By no means every topological space arises in this way, but this is a (most) natural choice in a computational setup.
A simplicial complex $K$ on a vertex set $V$ is a nonempty subset of $2^V$ such that for each $\sigma \in K$ and $\tau \subset\sigma$ we have $\tau\in K$. Here $V$ is usually $[n] = \{1,2,\dots,n\}$ for some $n\geq 0$.
General textbooks offering details on the theory include:
- [Koz08]
Construction
simplicial_complex
— Methodsimplical_complex(generators::Union{Vector{Vector{Int}}, Vector{Set{Int}}})
Construct an abstract simplicial complex from a set of faces. While arbitrary non-negative integers are allowed as vertices, they will be relabeled to consecutive integers starting at 1.
Examples
julia> K = simplicial_complex([[1,2,3],[2,3,4]])
Abstract simplicial complex of dimension 2 on 4 vertices
julia> G = complete_bipartite_graph(2,3)
Undirected graph with 5 nodes and the following edges:
(3, 1)(3, 2)(4, 1)(4, 2)(5, 1)(5, 2)
julia> K = simplicial_complex(G)
Abstract simplicial complex of dimension 1 on 5 vertices
Simplicial complex comprising the empty set only:
julia> empty = simplicial_complex(Vector{Set{Int}}([]))
Abstract simplicial complex of dimension -1 on 0 vertices
The original vertices can be recovered:
julia> L = simplicial_complex([[0,2,17],[2,17,90]]);
julia> facets(L)
2-element Vector{Set{Int64}}:
Set([2, 3, 1])
Set([4, 2, 3])
julia> vertexindices(L)
4-element Vector{Int64}:
0
2
17
90
Subcomplexes
star_subcomplex
— Methodstar_subcomplex(K::SimplicialComplex, sigma::Union{Vector{Int}, Set{Int}})
Return the star of the face sigma
in the abstract simplicial complex K
.
Examples
julia> K = simplicial_complex([[1,2,3],[2,3,4]]);
julia> star_subcomplex(K,[1])
Abstract simplicial complex of dimension 2 on 3 vertices
link_subcomplex
— Methodlink_subcomplex(K::SimplicialComplex, sigma::Union{Vector{Int}, Set{Int}})
Return the link of the face sigma
in the abstract simplicial complex K
.
Examples
julia> K = simplicial_complex([[1,2,3],[2,3,4]]);
julia> link_subcomplex(K,[2,3])
Abstract simplicial complex of dimension 0 on 2 vertices
Surface examples
torus
— Methodtorus()
Construct Möbius' (vertex-minimal) 7-vertex triangulation of the torus (surface).
klein_bottle
— Methodklein_bottle()
Construct a 9-vertex triangulation of the Klein bottle.
real_projective_plane
— Methodreal_projective_plane()
Construct the (vertex-minimal) 6-vertex triangulation of the real projective plane.
Other examples
complex_projective_plane
— Methodcomplex_projective_plane()
Construct the (vertex-minimal) 9-vertex triangulation of the complex projective plane.
Basic properties
n_vertices
— Methodn_vertices(K::SimplicialComplex)
Return the number of vertices of the abstract simplicial complex K
.
Examples
julia> n_vertices(torus())
7
n_facets
— Methodn_facets(K::SimplicialComplex)
Return the number of facets of the abstract simplicial complex K
.
dim
— Methoddim(K::SimplicialComplex)
Return the dimension of the abstract simplicial complex K
.
f_vector
— Methodf_vector(K::SimplicialComplex)
Return the face vector (number of faces per dimension) of the abstract simplicial complex K
.
Examples
julia> f_vector(torus())
3-element Vector{Int64}:
7
21
14
h_vector
— Methodh_vector(K::SimplicialComplex)
Return the h-vector of the abstract simplicial complex K
.
Examples
julia> h_vector(torus())
4-element Vector{Int64}:
1
4
10
-1
euler_characteristic
— Methodeuler_characteristic(K::SimplicialComplex)
Return the reduced Euler characteristic of the abstract simplicial complex K
.
Examples
julia> euler_characteristic(complex_projective_plane())
2
Homology and cohomology
homology
— Methodhomology(K::SimplicialComplex, i::Int)
Return i
-th integral homology group of K
.
Examples
julia> [ homology(real_projective_plane(), i) for i in [0,1,2] ]
3-element Vector{FinGenAbGroup}:
Z
Z/2
Z/1
betti_numbers
— Methodbetti_numbers(K::SimplicialComplex)
Return the reduced rational Betti numbers of the abstract simplicial complex K
.
Examples
julia> betti_numbers(klein_bottle())
3-element Vector{Int64}:
0
1
0
cohomology
— Methodcohomology(K::SimplicialComplex, i::Int)
Return i
-th integral cohomology group of K
.
Examples
julia> K = simplicial_complex([[0,1],[1,2],[0,2]]);
julia> cohomology(K,1)
Z
Fundamental group
fundamental_group
— Methodfundamental_group(K::SimplicialComplex)
Return the fundamental group of the abstract simplicial complex K
.
Examples
julia> pi_1 = fundamental_group(torus());
julia> describe(pi_1)
"Z x Z"
Recognizing topological spaces
is_sphere
— Methodis_sphere(K::SimplicialComplex)
Heuristically check if the abstract simplicial complex K
is a combinatorial sphere; see [JLLT22]. Note that this is undecidable in general. Returns true if recognized as a sphere. Returns false if not a sphere. Returns nothing if heuristics unsuccessful.
Examples
julia> K = simplicial_complex([[1,2,3],[2,3,4]]);
julia> is_sphere(K)
false
is_ball
— Methodis_ball(K::SimplicialComplex)
Heuristically check if the abstract simplicial complex K
is a combinatorial ball; see [JLLT22]. Note that this is undecidable in general. Returns true if recognized as a ball. Returns false if not a ball. Returns nothing if heuristics unsuccessful.
Examples
julia> K = simplicial_complex([[1,2,3],[2,3,4]]);
julia> is_ball(K)
true
is_manifold
— Methodis_manifold(K::SimplicialComplex)
Check if the abstract simplicial complex K
is a combinatorial manifold, possibly with boundary. Note that this is undecidable in general. Returns true if recognized as a manifold. Returns false if not a manifold. Returns nothing if heuristics unsuccessful.
Examples
julia> is_manifold(torus())
true
julia> is_manifold(simplicial_complex([[1,2],[2,3]]))
true
julia> is_manifold(simplicial_complex([[1,2],[2,3],[2,4]]))
false
Connection to commutative algebra
The complements of the minimal non-faces form the facets of the Alexander dual.
minimal_nonfaces
— Methodminimal_nonfaces(K::SimplicialComplex)
Return the minimal non-faces of the abstract simplicial complex K
.
Examples
julia> K = simplicial_complex([[1,2,3],[2,3,4]]);
julia> minimal_nonfaces(K)
1-element Vector{Set{Int64}}:
Set([4, 1])
alexander_dual
— Methodalexander_dual(K::SimplicialComplex)
Return the Alexander dual of the abstract simplicial complex K
.
Examples
julia> K = simplicial_complex([[1,2,3],[2,3,4]]);
julia> alexander_dual(K)
Abstract simplicial complex of dimension 1 on 2 vertices
Let $K$ be a simplicial complex on $n$ vertices. The minimal non-faces of $K$ generate a square-free monomial ideal, known as the Stanley-Reisner ideal of $K$. The quotient of the polynomial ring (in $n$ variables, with integer coefficients) modulo that ideal is the Stanley-Reisner ring. For details see Chapter 5 of [BH09].
stanley_reisner_ideal
— Methodstanley_reisner_ideal(K::SimplicialComplex)
Return the Stanley-Reisner ideal of the abstract simplicial complex K
.
Examples
julia> stanley_reisner_ideal(real_projective_plane())
Ideal generated by
x1*x2*x3
x1*x2*x4
x1*x5*x6
x2*x5*x6
x1*x3*x6
x1*x4*x5
x3*x4*x5
x3*x4*x6
x2*x3*x5
x2*x4*x6
stanley_reisner_ideal
— Methodstanley_reisner_ideal(R::MPolyRing, K::SimplicialComplex)
Return the Stanley-Reisner ideal of the abstract simplicial complex K
, in the given ring R
.
Examples
julia> R, _ = QQ[:a, :b, :c, :d, :e, :f];
julia> stanley_reisner_ideal(R, real_projective_plane())
Ideal generated by
a*b*c
a*b*d
a*e*f
b*e*f
a*c*f
a*d*e
c*d*e
c*d*f
b*c*e
b*d*f
stanley_reisner_ring
— Methodstanley_reisner_ring(K::SimplicialComplex)
Return the Stanley-Reisner ring of the abstract simplicial complex K
.
Examples
julia> K = simplicial_complex([[1,2,3],[2,3,4]]);
julia> stanley_reisner_ring(K)
(Quotient of multivariate polynomial ring by ideal (x1*x4), Map: multivariate polynomial ring -> quotient of multivariate polynomial ring)
stanley_reisner_ring
— Methodstanley_reisner_ring(R::MPolyRing, K::SimplicialComplex)
Return the Stanley-Reisner ring of the abstract simplicial complex K
, as a quotient of a given ring R
.
Examples
julia> R, _ = ZZ[:a, :b, :c, :d, :e, :f];
julia> stanley_reisner_ring(R, real_projective_plane())
(Quotient of multivariate polynomial ring by ideal (a*b*c, a*b*d, a*e*f, b*e*f, a*c*f, a*d*e, c*d*e, c*d*f, b*c*e, b*d*f), Map: R -> quotient of multivariate polynomial ring)
Helpful functions
is_isomorphic
— Methodis_isomorphic(K1::SimplicialComplex, K2::SimplicialComplex)
Checks if the given simplicial complexes are isomorphic.
Examples
julia> K1 = simplicial_complex([[1,2,3],[2,3,4]]);
julia> K2 = simplicial_complex([[1,2,3],[2,3,4]]);
julia> is_isomorphic(K1, K2)
true
connected_sum
— Functionconnected_sum(K1::SimplicialComplex, K2::SimplicialComplex, f1::Int=0, f2::Int=0)
Compute the connected sum of two abstract simplicial complexes. Parameters f1
and f2
specify which facet of the first and second complex correspondingly are glued together. Default is the 0-th facet of both. The vertices in the selected facets are identified with each other according to their order in the facet (that is, in increasing index order).
Examples
julia> K = torus();
julia> surface_genus_2 = connected_sum(K, K)
Abstract simplicial complex of dimension 2 on 11 vertices
julia> homology(surface_genus_2, 1)
Z^4
julia> is_manifold(surface_genus_2)
true
deletion
— Methoddeletion(K::SimplicialComplex, face::Union{<:AbstractSet{Int},<:AbstractVector{Int}})
Remove the given face and all the faces containing it from an abstract simplicial complex K
.
Examples
julia> K = simplicial_complex([[1, 2, 3], [2, 3, 4]]);
julia> K_with_deletion = deletion(K, Set([1, 2]));
julia> facets(K_with_deletion)
2-element Vector{Set{Int64}}:
Set([3, 1])
Set([4, 2, 3])
automorphism_group
— Methodautomorphism_group(K::SimplicialComplex; action=:on_vertices)
Given a simplicial complex K
return its automorphism group as a PermGroup
. The group can be returned as a subgroup of the permutation group of the vertices by passing :on_vertices
to the action
keyword argument or on the facets by passing :on_facets
.
Examples
julia> K = simplicial_complex([[1, 2, 3], [2, 3, 4]])
Abstract simplicial complex of dimension 2 on 4 vertices
julia> automorphism_group(K)
Permutation group of degree 4
on_simplicial_complex
— Methodon_simplicial_complex(K::SimplicialComplex, g::PermGroupElem)
Given a simplicial complex K
return the simplicial complex corresponding to a permutation on it's vertices given by g
.
Examples
julia> K = simplicial_complex([[1, 2, 3], [2, 3, 4]])
Abstract simplicial complex of dimension 2 on 4 vertices
julia> G = automorphism_group(K)
Permutation group of degree 4
julia> g = collect(G)[2]
(1,4)
julia> facets(on_simplicial_complex(K, g))
2-element Vector{Set{Int64}}:
Set([2, 3, 1])
Set([4, 2, 3])
Saving and loading
Objects of type SimplicialComplex
can be saved to a file and loaded with the two methods save
and load
. The file is in JSON format and contains the underlying polymake object. In particular, such a file can be read by both polymake and OSCAR.