Description
A face $F$ in an abstract simplicial complex $\Delta$ of cardinality $|F| = i + 1$ has dimension $i$. The dimension of $\Delta$ is the maximum of the dimensions of its faces or it is $-\infty$ if $\Delta$ is the void complex (which has no faces).
i1 : S = ZZ[a..e];
|
i2 : Δ = simplicialComplex {b*c*d*e, a*c*d*e, a*b*d*e, a*b*c*e, a*b*c*d}
o2 = simplicialComplex | bcde acde abde abce abcd |
o2 : SimplicialComplex
|
i3 : monomialIdeal Δ
o3 = monomialIdeal(a*b*c*d*e)
o3 : MonomialIdeal of S
|
i4 : dim Δ
o4 = 3
|
i5 : assert (dim Δ === 3 and numgens ideal Δ === 1 and isPure Δ)
|
i6 : R = ZZ/101[a..f];
|
i7 : Γ = simplicialComplex {b*c*d*e, a*c*d*e, a*b*d*e, a*b*c*e, a*b*c*d}
o7 = simplicialComplex | bcde acde abde abce abcd |
o7 : SimplicialComplex
|
i8 : monomialIdeal Γ
o8 = monomialIdeal (a*b*c*d*e, f)
o8 : MonomialIdeal of R
|
i9 : dim Γ
o9 = 3
|
i10 : assert (dim Γ === 3 and numgens ideal Γ === 2 and isPure Γ)
|
The abstract simplicial complex from Example 1.8 of Miller-Sturmfels' Combinatorial Commutative Algebra consists of a triangle (on vertices $a$, $b$, $c$), two edges (connecting $c$ to $d$ and $b$ to $d$), and an isolated vertex (namely $e$). It has six minimal nonfaces.
i11 : S' = QQ[a..e];
|
i12 : Δ' = simplicialComplex {e, c*d, b*d, a*b*c}
o12 = simplicialComplex | e cd bd abc |
o12 : SimplicialComplex
|
i13 : monomialIdeal Δ'
o13 = monomialIdeal (a*d, b*c*d, a*e, b*e, c*e, d*e)
o13 : MonomialIdeal of S'
|
i14 : dim Δ'
o14 = 2
|
i15 : assert (dim Δ' === 2 and not isPure Δ')
|
The irrelevant complex has the empty set as a facet whereas the void complex has no facets. The irrelevant complex has dimension $-1$ while the void complex has dimension $-\infty$.
i16 : irrelevant = simplicialComplex {1_S'};
|
i17 : dim irrelevant
o17 = -1
|
i18 : void = simplicialComplex monomialIdeal 1_S
o18 = simplicialComplex 0
o18 : SimplicialComplex
|
i19 : dim void
o19 = -infinity
o19 : InfiniteNumber
|
i20 : assert (dim irrelevant === -1 and dim void === -infinity)
|
To avoid repeating a computation, the package caches the result in the CacheTable of the abstract simplicial complex.
i21 : peek Δ.cache
o21 = CacheTable{dim => 3}
|