The areas / V22. Affine, Euclidean and convex geometry
Mathlib.Analysis.Convex.SimplicialComplex.Basic
41 declarations. Mathlib docs ยท Source
Simplicial complexes
In this file, we define simplicial complexes over ๐-modules.
A (pre-) abstract simplicial complex is a downwards-closed collection of nonempty finite sets,
and a simplicial complex is such a collection identified with simplices
closed by inclusion (of vertices) and intersection (of underlying 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
SimplicialComplex ๐ E: A simplicial complex in the๐-moduleE.SimplicialComplex.vertices: The zero-dimensional faces of a simplicial complex.SimplicialComplex.facets: The maximal faces of a simplicial complex.
Notation
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, SimplicialComplex.inter_subset_convexHull is an equivalent condition which works on the
vertices.
TODO
Simplicial complexes can be generalized to affine spaces once ConvexHull has been ported.
Vertices
Facets
The semilattice of simplicial complexes
K โค L means that K.faces โ L.faces.
theorem Geometry.SimplicialComplex.mk.injEq E0 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] (toPreAbstractSimplicialComplex : PreAbstractSimplicialComplex E)
(indep : โ {s : Finset E}, s โ toPreAbstractSimplicialComplex.faces โ AffineIndependent ๐ Subtype.val)
(inter_subset_convexHull :
โ {s t : Finset E},
s โ toPreAbstractSimplicialComplex.faces โ
t โ toPreAbstractSimplicialComplex.faces โ (convexHull ๐) โs โฉ (convexHull ๐) โt โ (convexHull ๐) (โs โฉ โt))
(toPreAbstractSimplicialComplex_1 : PreAbstractSimplicialComplex E)
(indep_1 : โ {s : Finset E}, s โ toPreAbstractSimplicialComplex_1.faces โ AffineIndependent ๐ Subtype.val)
(inter_subset_convexHull_1 :
โ {s t : Finset E},
s โ toPreAbstractSimplicialComplex_1.faces โ
t โ toPreAbstractSimplicialComplex_1.faces โ (convexHull ๐) โs โฉ (convexHull ๐) โt โ (convexHull ๐) (โs โฉ โt)),
({ toPreAbstractSimplicialComplex := toPreAbstractSimplicialComplex, indep := indep,
inter_subset_convexHull := inter_subset_convexHull } =
{ toPreAbstractSimplicialComplex := toPreAbstractSimplicialComplex_1, indep := indep_1,
inter_subset_convexHull := inter_subset_convexHull_1 }) =
(toPreAbstractSimplicialComplex = toPreAbstractSimplicialComplex_1)
theorem Geometry.SimplicialComplex.mk.inj E1 #
โ {๐ : Type u_1} {E : Type u_2} {inst : Ring ๐} {inst_1 : PartialOrder ๐} {inst_2 : AddCommGroup E}
{inst_3 : Module ๐ E} {toPreAbstractSimplicialComplex : PreAbstractSimplicialComplex E}
{indep : โ {s : Finset E}, s โ toPreAbstractSimplicialComplex.faces โ AffineIndependent ๐ Subtype.val}
{inter_subset_convexHull :
โ {s t : Finset E},
s โ toPreAbstractSimplicialComplex.faces โ
t โ toPreAbstractSimplicialComplex.faces โ (convexHull ๐) โs โฉ (convexHull ๐) โt โ (convexHull ๐) (โs โฉ โt)}
{toPreAbstractSimplicialComplex_1 : PreAbstractSimplicialComplex E}
{indep_1 : โ {s : Finset E}, s โ toPreAbstractSimplicialComplex_1.faces โ AffineIndependent ๐ Subtype.val}
{inter_subset_convexHull_1 :
โ {s t : Finset E},
s โ toPreAbstractSimplicialComplex_1.faces โ
t โ toPreAbstractSimplicialComplex_1.faces โ (convexHull ๐) โs โฉ (convexHull ๐) โt โ (convexHull ๐) (โs โฉ โt)},
{ toPreAbstractSimplicialComplex := toPreAbstractSimplicialComplex, indep := indep,
inter_subset_convexHull := inter_subset_convexHull } =
{ toPreAbstractSimplicialComplex := toPreAbstractSimplicialComplex_1, indep := indep_1,
inter_subset_convexHull := inter_subset_convexHull_1 } โ
toPreAbstractSimplicialComplex = toPreAbstractSimplicialComplex_1
def Geometry.SimplicialComplex.ctorIdx E1 #
{๐ : Type u_1} โ
{E : Type u_2} โ
{inst : Ring ๐} โ
{inst_1 : PartialOrder ๐} โ {inst_2 : AddCommGroup E} โ {inst_3 : Module ๐ E} โ Geometry.SimplicialComplex ๐ E โ โ
structure Geometry.SimplicialComplex E1 #
(๐ : Type u_1) โ
(E : Type u_2) โ [inst : Ring ๐] โ [PartialOrder ๐] โ [inst_2 : AddCommGroup E] โ [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.SimplicialComplex.disjoint_or_exists_inter_eq_convexHull. It is mostly useless, as
Geometry.SimplicialComplex.convexHull_inter_convexHull is enough for all purposes.
theorem Geometry.SimplicialComplex.ext E1 #
โ {๐ : Type u_1} {E : Type u_2} {inst : Ring ๐} {inst_1 : PartialOrder ๐} {inst_2 : AddCommGroup E}
{inst_3 : Module ๐ E} {x y : Geometry.SimplicialComplex ๐ E}, x.faces = y.faces โ x = y
theorem Geometry.SimplicialComplex.ext_iff E0 #
โ {๐ : Type u_1} {E : Type u_2} {inst : Ring ๐} {inst_1 : PartialOrder ๐} {inst_2 : AddCommGroup E}
{inst_3 : Module ๐ E} {x y : Geometry.SimplicialComplex ๐ E}, x = y โ x.faces = y.faces
abbrev Geometry.SimplicialComplex.toPreAbstractSimplicialComplex E1 #
{๐ : Type u_1} โ
{E : Type u_2} โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ
[inst_3 : Module ๐ E] โ Geometry.SimplicialComplex ๐ E โ PreAbstractSimplicialComplex E
ctor Geometry.SimplicialComplex.mk E0 #
{๐ : Type u_1} โ
{E : Type u_2} โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ
[inst_3 : Module ๐ E] โ
(toPreAbstractSimplicialComplex : PreAbstractSimplicialComplex E) โ
(โ {s : Finset E}, s โ toPreAbstractSimplicialComplex.faces โ AffineIndependent ๐ Subtype.val) โ
(โ {s t : Finset E},
s โ toPreAbstractSimplicialComplex.faces โ
t โ toPreAbstractSimplicialComplex.faces โ
(convexHull ๐) โs โฉ (convexHull ๐) โt โ (convexHull ๐) (โs โฉ โt)) โ
Geometry.SimplicialComplex ๐ E
theorem Geometry.SimplicialComplex.indep E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] (self : Geometry.SimplicialComplex ๐ E) {s : Finset E},
s โ self.faces โ AffineIndependent ๐ Subtype.val
the vertices in each face are affine independent: this is an implementation detail
theorem Geometry.SimplicialComplex.inter_subset_convexHull E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] (self : Geometry.SimplicialComplex ๐ E) {s t : Finset E},
s โ self.faces โ t โ self.faces โ (convexHull ๐) โs โฉ (convexHull ๐) โt โ (convexHull ๐) (โs โฉ โt)
theorem Geometry.SimplicialComplex.nonempty_of_mem_faces E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s : Finset E}, s โ K.faces โ s.Nonempty
theorem Geometry.SimplicialComplex.empty_notMem E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E}, โ
โ K.faces
def Geometry.SimplicialComplex.space E1 #
{๐ : Type u_1} โ
{E : Type u_2} โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ [inst_3 : Module ๐ E] โ Geometry.SimplicialComplex ๐ E โ Set E
The underlying space of a simplicial complex is the union of its faces.
theorem Geometry.SimplicialComplex.mem_space_iff E0 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {x : E}, x โ K.space โ โ s โ K.faces, x โ (convexHull ๐) โs
theorem Geometry.SimplicialComplex.convexHull_subset_space E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s : Finset E}, s โ K.faces โ (convexHull ๐) โs โ K.space
theorem Geometry.SimplicialComplex.subset_space E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s : Finset E}, s โ K.faces โ โs โ K.space
theorem Geometry.SimplicialComplex.convexHull_inter_convexHull E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s t : Finset E},
s โ K.faces โ t โ K.faces โ (convexHull ๐) โs โฉ (convexHull ๐) โt = (convexHull ๐) (โs โฉ โt)
theorem Geometry.SimplicialComplex.down_closed E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s t : Finset E},
s โ K.faces โ t โ s โ t.Nonempty โ t โ K.faces
theorem Geometry.SimplicialComplex.disjoint_or_exists_inter_eq_convexHull E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s t : Finset E},
s โ K.faces โ
t โ K.faces โ
Disjoint ((convexHull ๐) โs) ((convexHull ๐) โt) โจ
โ u โ K.faces, (convexHull ๐) โs โฉ (convexHull ๐) โt = (convexHull ๐) โu
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.SimplicialComplex.ofErase E1 #
{๐ : Type u_1} โ
{E : Type u_2} โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ
[inst_3 : Module ๐ E] โ
(faces : Set (Finset E)) โ
(โ s โ faces, AffineIndependent ๐ Subtype.val) โ
IsLowerSet faces โ
(โ s โ faces, โ t โ faces, (convexHull ๐) โs โฉ (convexHull ๐) โt โ (convexHull ๐) (โs โฉ โt)) โ
Geometry.SimplicialComplex ๐ E
Construct a simplicial complex by removing the empty face for you.
theorem Geometry.SimplicialComplex.ofErase_faces E0 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] (faces : Set (Finset E)) (indep : โ s โ faces, AffineIndependent ๐ Subtype.val)
(down_closed : IsLowerSet faces)
(inter_subset_convexHull :
โ s โ faces, โ t โ faces, (convexHull ๐) โs โฉ (convexHull ๐) โt โ (convexHull ๐) (โs โฉ โt)),
(Geometry.SimplicialComplex.ofErase faces indep down_closed inter_subset_convexHull).faces = faces \ {โ
}
def Geometry.SimplicialComplex.ofSubcomplex E1 #
{๐ : Type u_1} โ
{E : Type u_2} โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ
[inst_3 : Module ๐ E] โ
(K : Geometry.SimplicialComplex ๐ E) โ
(faces : Set (Finset E)) โ faces โ K.faces โ IsLowerSet faces โ Geometry.SimplicialComplex ๐ E
Construct a simplicial complex as a subset of a given simplicial complex.
theorem Geometry.SimplicialComplex.ofSubcomplex_faces E0 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] (K : Geometry.SimplicialComplex ๐ E) (faces : Set (Finset E)) (subset : faces โ K.faces)
(down_closed : IsLowerSet faces), (K.ofSubcomplex faces subset down_closed).faces = faces
def Geometry.SimplicialComplex.vertices E3 #
{๐ : Type u_1} โ
{E : Type u_2} โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ [inst_3 : Module ๐ E] โ Geometry.SimplicialComplex ๐ E โ Set E
The vertices of a simplicial complex are its zero-dimensional faces.
theorem Geometry.SimplicialComplex.mem_vertices E0 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {x : E}, x โ K.vertices โ {x} โ K.faces
theorem Geometry.SimplicialComplex.vertices_eq E0 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E}, K.vertices = โ k โ K.faces, โk
theorem Geometry.SimplicialComplex.vertices_subset_space E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E}, K.vertices โ K.space
theorem Geometry.SimplicialComplex.vertex_mem_convexHull_iff E0 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s : Finset E} {x : E},
x โ K.vertices โ s โ K.faces โ (x โ (convexHull ๐) โs โ x โ s)
theorem Geometry.SimplicialComplex.face_subset_face_iff E0 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s t : Finset E},
s โ K.faces โ t โ K.faces โ ((convexHull ๐) โs โ (convexHull ๐) โt โ s โ t)
A face is a subset of another one iff its vertices are.
def Geometry.SimplicialComplex.facets E3 #
{๐ : Type u_1} โ
{E : Type u_2} โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ [inst_3 : Module ๐ E] โ Geometry.SimplicialComplex ๐ E โ Set (Finset E)
A facet of a simplicial complex is a maximal face.
theorem Geometry.SimplicialComplex.mem_facets E0 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s : Finset E},
s โ K.facets โ s โ K.faces โง โ t โ K.faces, s โ t โ s = t
theorem Geometry.SimplicialComplex.facets_subset E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E}, K.facets โ K.faces
theorem Geometry.SimplicialComplex.not_facet_iff_subface E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E] {K : Geometry.SimplicialComplex ๐ E} {s : Finset E},
s โ K.faces โ (s โ K.facets โ โ t โ K.faces, s โ t)
instance Geometry.SimplicialComplex.instMin E0 #
(๐ : Type u_1) โ
(E : Type u_2) โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ [inst_3 : Module ๐ E] โ Min (Geometry.SimplicialComplex ๐ E)
The complex consisting of only the faces present in both of its arguments.
instance Geometry.SimplicialComplex.instSemilatticeInf E0 #
(๐ : Type u_1) โ
(E : Type u_2) โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ [inst_3 : Module ๐ E] โ SemilatticeInf (Geometry.SimplicialComplex ๐ E)
instance Geometry.SimplicialComplex.hasBot E0 #
(๐ : Type u_1) โ
(E : Type u_2) โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ [inst_3 : Module ๐ E] โ Bot (Geometry.SimplicialComplex ๐ E)
instance Geometry.SimplicialComplex.instOrderBot E0 #
(๐ : Type u_1) โ
(E : Type u_2) โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ [inst_3 : Module ๐ E] โ OrderBot (Geometry.SimplicialComplex ๐ E)
instance Geometry.SimplicialComplex.instInhabited E0 #
(๐ : Type u_1) โ
(E : Type u_2) โ
[inst : Ring ๐] โ
[inst_1 : PartialOrder ๐] โ
[inst_2 : AddCommGroup E] โ [inst_3 : Module ๐ E] โ Inhabited (Geometry.SimplicialComplex ๐ E)
theorem Geometry.SimplicialComplex.faces_bot E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E], โฅ.faces = โ
theorem Geometry.SimplicialComplex.space_bot E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E], โฅ.space = โ
theorem Geometry.SimplicialComplex.facets_bot E1 #
โ {๐ : Type u_1} {E : Type u_2} [inst : Ring ๐] [inst_1 : PartialOrder ๐] [inst_2 : AddCommGroup E]
[inst_3 : Module ๐ E], โฅ.facets = โ