Macaulay2 » Documentation
Packages » AbstractSimplicialComplexes :: How to make abstract simplicial complexes
next | previous | forward | backward | up | index | toc

How to make abstract simplicial complexes -- Using the type AbstractSimplicialComplexs to represent abstract simplicial complexes

The type AbstractSimplicialComplex is a data type for working with abstract simplicial complexes with vertices supported on [n] = {1,...,n}. Here we illustrate some of the most basic ways to interact with this data type.

The simplicial complex that is generated by {1,2,3,4}, {2,3,5} and {1,5} can be constructed in the following way.

i1 : K = abstractSimplicialComplex({{1,2,3,4}, {2,3,5},{1,5}})

o1 = AbstractSimplicialComplex{-1 => {{}}                                                                   }
                               0 => {{1}, {2}, {3}, {4}, {5}}
                               1 => {{1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 3}, {2, 4}, {2, 5}, {3, 4}, {3, 5}}
                               2 => {{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, {2, 3, 5}}
                               3 => {{1, 2, 3, 4}}

o1 : AbstractSimplicialComplex

The simplex on the vertex set [4] can be constructed as

i2 : L = abstractSimplicialComplex(4)

o2 = AbstractSimplicialComplex{-1 => {{}}                                           }
                               0 => {{1}, {2}, {3}, {4}}
                               1 => {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}}
                               2 => {{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}}
                               3 => {{1, 2, 3, 4}}

o2 : AbstractSimplicialComplex

The faces and facets of such simplicial complexes can be accessed as

i3 : K_(-1)

o3 = {{}}

o3 : List
i4 : K_0

o4 = {{1}, {2}, {3}, {4}, {5}}

o4 : List
i5 : K_1

o5 = {{1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 3}, {2, 4}, {2, 5}, {3, 4}, {3, 5}}

o5 : List
i6 : K_2

o6 = {{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, {2, 3, 5}}

o6 : List
i7 : abstractSimplicialComplexFacets K

o7 = {{1, 5}, {2, 3, 5}, {1, 2, 3, 4}}

o7 : List
i8 : L_(-1)

o8 = {{}}

o8 : List
i9 : L_0

o9 = {{1}, {2}, {3}, {4}}

o9 : List
i10 : L_1

o10 = {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}}

o10 : List
i11 : L_2

o11 = {{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}}

o11 : List
i12 : L_3

o12 = {{1, 2, 3, 4}}

o12 : List
i13 : abstractSimplicialComplexFacets L

o13 = {{1, 2, 3, 4}}

o13 : List