# mathlib3documentation

analysis.convex.simplicial_complex.basic

# Simplicial complexes #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

In this file, we define simplicial complexes in π-modules. A simplicial complex is a collection of simplices closed by inclusion (of vertices) and intersection (of underlying sets).

We model them by a downward-closed set of affine independent finite sets whose convex hulls "glue nicely", each finite set and its convex hull corresponding respectively to the vertices and the underlying set of a simplex.

## Main declarations #

• simplicial_complex π E: A simplicial complex in the π-module E.
• simplicial_complex.vertices: The zero dimensional faces of a simplicial complex.
• simplicial_complex.facets: The maximal faces of a simplicial complex.

## Notation #

s β K means that s is a face of K.

K β€ L means that the faces of K are faces of L.

## Implementation notes #

"glue nicely" usually means that the intersection of two faces (as sets in the ambient space) is a face. Given that we store the vertices, not the faces, this would be a bit awkward to spell. Instead, simplicial_complex.inter_subset_convex_hull is an equivalent condition which works on the vertices.

## TODO #

Simplicial complexes can be generalized to affine spaces once convex_hull has been ported.

theorem geometry.simplicial_complex.ext_iff {π : Type u_1} {E : Type u_2} {_inst_1 : ordered_ring π} {_inst_2 : add_comm_group E} {_inst_3 : module π E} (x y : E) :
x = y β x.faces = y.faces
@[ext]
structure geometry.simplicial_complex (π : Type u_1) (E : Type u_2) [ordered_ring π] [module π E] :
Type u_2

A simplicial complex in a π-module is a collection of simplices which glue nicely together. Note that the textbook meaning of "glue nicely" is given in geometry.simplicial_complex.disjoint_or_exists_inter_eq_convex_hull. It is mostly useless, as geometry.simplicial_complex.convex_hull_inter_convex_hull is enough for all purposes.

Instances for geometry.simplicial_complex
theorem geometry.simplicial_complex.ext {π : Type u_1} {E : Type u_2} {_inst_1 : ordered_ring π} {_inst_2 : add_comm_group E} {_inst_3 : module π E} (x y : E) (h : x.faces = y.faces) :
x = y
@[protected, instance]
def geometry.simplicial_complex.has_mem {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] :

A finset belongs to a simplicial_complex if it's a face of it.

Equations
def geometry.simplicial_complex.space {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] (K : E) :
set E

The underlying space of a simplicial complex is the union of its faces.

Equations
theorem geometry.simplicial_complex.mem_space_iff {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {x : E} :
theorem geometry.simplicial_complex.convex_hull_subset_space {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {s : finset E} (hs : s β K.faces) :
@[protected]
theorem geometry.simplicial_complex.subset_space {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {s : finset E} (hs : s β K.faces) :
theorem geometry.simplicial_complex.convex_hull_inter_convex_hull {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {s t : finset E} (hs : s β K.faces) (ht : t β K.faces) :
theorem geometry.simplicial_complex.disjoint_or_exists_inter_eq_convex_hull {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {s t : finset E} (hs : s β K.faces) (ht : t β K.faces) :

The conclusion is the usual meaning of "glue nicely" in textbooks. It turns out to be quite unusable, as it's about faces as sets in space rather than simplices. Further, additional structure on π means the only choice of u is s β© t (but it's hard to prove).

def geometry.simplicial_complex.of_erase {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] (faces : set (finset E)) (indep : β (s : finset E), s β faces β ) (down_closed : β (s : finset E), s β faces β β (t : finset E), t β s β t β faces) (inter_subset_convex_hull : β (s : finset E), s β faces β β (t : finset E), t β faces β β(convex_hull π) βs β© β(convex_hull π) βt β β(convex_hull π) (βs β© βt)) :

Construct a simplicial complex by removing the empty face for you.

Equations
@[simp]
theorem geometry.simplicial_complex.of_erase_faces {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] (faces : set (finset E)) (indep : β (s : finset E), s β faces β ) (down_closed : β (s : finset E), s β faces β β (t : finset E), t β s β t β faces) (inter_subset_convex_hull : β (s : finset E), s β faces β β (t : finset E), t β faces β β(convex_hull π) βs β© β(convex_hull π) βt β β(convex_hull π) (βs β© βt)) :
indep down_closed inter_subset_convex_hull).faces = faces \ {β}
@[simp]
theorem geometry.simplicial_complex.of_subcomplex_faces {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] (K : E) (faces : set (finset E)) (subset : faces β K.faces) (down_closed : β {s t : finset E}, s β faces β t β s β t β faces) :
(K.of_subcomplex faces subset down_closed).faces = faces
def geometry.simplicial_complex.of_subcomplex {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] (K : E) (faces : set (finset E)) (subset : faces β K.faces) (down_closed : β {s t : finset E}, s β faces β t β s β t β faces) :

Construct a simplicial complex as a subset of a given simplicial complex.

Equations

### Vertices #

def geometry.simplicial_complex.vertices {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] (K : E) :
set E

The vertices of a simplicial complex are its zero dimensional faces.

Equations
theorem geometry.simplicial_complex.mem_vertices {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {x : E} :
theorem geometry.simplicial_complex.vertices_eq {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} :
K.vertices = β (k : finset E) (H : k β K.faces), βk
theorem geometry.simplicial_complex.vertices_subset_space {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} :
theorem geometry.simplicial_complex.vertex_mem_convex_hull_iff {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {s : finset E} {x : E} (hx : x β K.vertices) (hs : s β K.faces) :
theorem geometry.simplicial_complex.face_subset_face_iff {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {s t : finset E} (hs : s β K.faces) (ht : t β K.faces) :

A face is a subset of another one iff its vertices are.

### Facets #

def geometry.simplicial_complex.facets {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] (K : E) :

A facet of a simplicial complex is a maximal face.

Equations
theorem geometry.simplicial_complex.mem_facets {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {s : finset E} :
theorem geometry.simplicial_complex.facets_subset {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} :
theorem geometry.simplicial_complex.not_facet_iff_subface {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] {K : E} {s : finset E} (hs : s β K.faces) :

### The semilattice of simplicial complexes #

K β€ L means that K.faces β L.faces.

@[protected, instance]
def geometry.simplicial_complex.has_inf (π : Type u_1) (E : Type u_2) [ordered_ring π] [module π E] :

The complex consisting of only the faces present in both of its arguments.

Equations
@[protected, instance]
def geometry.simplicial_complex.semilattice_inf (π : Type u_1) (E : Type u_2) [ordered_ring π] [module π E] :
Equations
@[protected, instance]
def geometry.simplicial_complex.has_bot (π : Type u_1) (E : Type u_2) [ordered_ring π] [module π E] :
Equations
@[protected, instance]
def geometry.simplicial_complex.order_bot (π : Type u_1) (E : Type u_2) [ordered_ring π] [module π E] :
Equations
@[protected, instance]
def geometry.simplicial_complex.inhabited (π : Type u_1) (E : Type u_2) [ordered_ring π] [module π E] :
Equations
theorem geometry.simplicial_complex.faces_bot {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] :
theorem geometry.simplicial_complex.space_bot {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] :
theorem geometry.simplicial_complex.facets_bot {π : Type u_1} {E : Type u_2} [ordered_ring π] [module π E] :