Documentation

Mathlib.Analysis.Convex.SimplicialComplex.Basic

Simplicial complexes #

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 #

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, 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.

structure Geometry.SimplicialComplex (π•œ : Type u_1) (E : Type u_2) [OrderedRing π•œ] [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.

  • faces : Set (Finset E)

    the faces of this simplicial complex: currently, given by their spanning vertices

  • not_empty_mem : βˆ… βˆ‰ self.faces

    the empty set is not a face: hence, all faces are non-empty

  • indep : βˆ€ {s : Finset E}, s ∈ self.faces β†’ AffineIndependent π•œ Subtype.val

    the vertices in each face are affine independent: this is an implementation detail

  • down_closed : βˆ€ {s t : Finset E}, s ∈ self.faces β†’ t βŠ† s β†’ t β‰  βˆ… β†’ t ∈ self.faces

    faces are downward closed: a non-empty subset of its spanning vertices spans another face

  • inter_subset_convexHull : βˆ€ {s t : Finset E}, s ∈ self.faces β†’ t ∈ self.faces β†’ (convexHull π•œ) ↑s ∩ (convexHull π•œ) ↑t βŠ† (convexHull π•œ) (↑s ∩ ↑t)
Instances For
    theorem Geometry.SimplicialComplex.ext {π•œ : Type u_1} {E : Type u_2} {inst✝ : OrderedRing π•œ} {inst✝¹ : AddCommGroup E} {inst✝² : Module π•œ E} {x y : Geometry.SimplicialComplex π•œ E} (faces : x.faces = y.faces) :
    x = y
    instance Geometry.SimplicialComplex.instMembershipFinset {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] :

    A Finset belongs to a SimplicialComplex if it's a face of it.

    Equations
    def Geometry.SimplicialComplex.space {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] (K : Geometry.SimplicialComplex π•œ E) :
    Set E

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

    Equations
    • K.space = ⋃ s ∈ K.faces, (convexHull π•œ) ↑s
    Instances For
      theorem Geometry.SimplicialComplex.mem_space_iff {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} {x : E} :
      x ∈ K.space ↔ βˆƒ s ∈ K.faces, x ∈ (convexHull π•œ) ↑s
      theorem Geometry.SimplicialComplex.convexHull_subset_space {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} {s : Finset E} (hs : s ∈ K.faces) :
      (convexHull π•œ) ↑s βŠ† K.space
      theorem Geometry.SimplicialComplex.subset_space {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} {s : Finset E} (hs : s ∈ K.faces) :
      ↑s βŠ† K.space
      theorem Geometry.SimplicialComplex.convexHull_inter_convexHull {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} {s t : Finset E} (hs : s ∈ K.faces) (ht : t ∈ K.faces) :
      (convexHull π•œ) ↑s ∩ (convexHull π•œ) ↑t = (convexHull π•œ) (↑s ∩ ↑t)
      theorem Geometry.SimplicialComplex.disjoint_or_exists_inter_eq_convexHull {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} {s t : Finset E} (hs : s ∈ K.faces) (ht : 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 {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] (faces : Set (Finset E)) (indep : βˆ€ s ∈ faces, AffineIndependent π•œ Subtype.val) (down_closed : βˆ€ s ∈ faces, βˆ€ t βŠ† s, t ∈ faces) (inter_subset_convexHull : βˆ€ s ∈ faces, βˆ€ t ∈ faces, (convexHull π•œ) ↑s ∩ (convexHull π•œ) ↑t βŠ† (convexHull π•œ) (↑s ∩ ↑t)) :

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

      Equations
      • Geometry.SimplicialComplex.ofErase faces indep down_closed inter_subset_convexHull = { faces := faces \ {βˆ…}, not_empty_mem := β‹―, indep := β‹―, down_closed := β‹―, inter_subset_convexHull := β‹― }
      Instances For
        @[simp]
        theorem Geometry.SimplicialComplex.ofErase_faces {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] (faces : Set (Finset E)) (indep : βˆ€ s ∈ faces, AffineIndependent π•œ Subtype.val) (down_closed : βˆ€ s ∈ faces, βˆ€ t βŠ† s, t ∈ 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 {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] (K : Geometry.SimplicialComplex π•œ 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
        • K.ofSubcomplex faces subset down_closed = { faces := faces, not_empty_mem := β‹―, indep := β‹―, down_closed := β‹―, inter_subset_convexHull := β‹― }
        Instances For
          @[simp]
          theorem Geometry.SimplicialComplex.ofSubcomplex_faces {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] (K : Geometry.SimplicialComplex π•œ E) (faces : Set (Finset E)) (subset : faces βŠ† K.faces) (down_closed : βˆ€ {s t : Finset E}, s ∈ faces β†’ t βŠ† s β†’ t ∈ faces) :
          (K.ofSubcomplex faces subset down_closed).faces = faces

          Vertices #

          def Geometry.SimplicialComplex.vertices {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] (K : Geometry.SimplicialComplex π•œ E) :
          Set E

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

          Equations
          • K.vertices = {x : E | {x} ∈ K.faces}
          Instances For
            theorem Geometry.SimplicialComplex.mem_vertices {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} {x : E} :
            x ∈ K.vertices ↔ {x} ∈ K.faces
            theorem Geometry.SimplicialComplex.vertices_eq {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} :
            K.vertices = ⋃ k ∈ K.faces, ↑k
            theorem Geometry.SimplicialComplex.vertices_subset_space {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} :
            K.vertices βŠ† K.space
            theorem Geometry.SimplicialComplex.vertex_mem_convexHull_iff {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} {s : Finset E} {x : E} (hx : x ∈ K.vertices) (hs : s ∈ K.faces) :
            x ∈ (convexHull π•œ) ↑s ↔ x ∈ s
            theorem Geometry.SimplicialComplex.face_subset_face_iff {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} {s t : Finset E} (hs : s ∈ K.faces) (ht : t ∈ K.faces) :
            (convexHull π•œ) ↑s βŠ† (convexHull π•œ) ↑t ↔ s βŠ† t

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

            Facets #

            def Geometry.SimplicialComplex.facets {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] (K : Geometry.SimplicialComplex π•œ E) :

            A facet of a simplicial complex is a maximal face.

            Equations
            Instances For
              theorem Geometry.SimplicialComplex.mem_facets {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [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 {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} :
              K.facets βŠ† K.faces
              theorem Geometry.SimplicialComplex.not_facet_iff_subface {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] {K : Geometry.SimplicialComplex π•œ E} {s : Finset E} (hs : s ∈ K.faces) :
              s βˆ‰ K.facets ↔ βˆƒ t ∈ K.faces, s βŠ‚ t

              The semilattice of simplicial complexes #

              K ≀ L means that K.faces βŠ† L.faces.

              instance Geometry.SimplicialComplex.instMin (π•œ : Type u_1) (E : Type u_2) [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] :

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

              Equations
              • One or more equations did not get rendered due to their size.
              instance Geometry.SimplicialComplex.instSemilatticeInf (π•œ : Type u_1) (E : Type u_2) [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] :
              Equations
              instance Geometry.SimplicialComplex.hasBot (π•œ : Type u_1) (E : Type u_2) [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] :
              Equations
              instance Geometry.SimplicialComplex.instOrderBot (π•œ : Type u_1) (E : Type u_2) [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] :
              Equations
              instance Geometry.SimplicialComplex.instInhabited (π•œ : Type u_1) (E : Type u_2) [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] :
              Equations
              theorem Geometry.SimplicialComplex.faces_bot {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] :
              theorem Geometry.SimplicialComplex.space_bot {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] :
              theorem Geometry.SimplicialComplex.facets_bot {π•œ : Type u_1} {E : Type u_2} [OrderedRing π•œ] [AddCommGroup E] [Module π•œ E] :