# dim(Complex) -- Compute the dimension of a complex or co-complex.

## Synopsis

• Function: dim
• Usage:
dim(C)
• Inputs:
• C, ,
• Outputs:
• an integer, bigger or equal to -1

## Description

Computes the dimension of a complex.

 i1 : R=QQ[x_0..x_4] o1 = R o1 : PolynomialRing i2 : addCokerGrading R o2 = | -1 -1 -1 -1 | | 1 0 0 0 | | 0 1 0 0 | | 0 0 1 0 | | 0 0 0 1 | 5 4 o2 : Matrix ZZ <--- ZZ i3 : C=simplex R o3 = 4: x x x x x 0 1 2 3 4 o3 : complex of dim 4 embedded in dim 4 (printing facets) equidimensional, simplicial, F-vector {1, 5, 10, 10, 5, 1}, Euler = 0 i4 : dim C o4 = 4 i5 : bC=boundaryOfPolytope C o5 = 3: x x x x x x x x x x x x x x x x x x x x 0 1 2 3 0 1 2 4 0 1 3 4 0 2 3 4 1 2 3 4 o5 : complex of dim 3 embedded in dim 4 (printing facets) equidimensional, simplicial, F-vector {1, 5, 10, 10, 5, 0}, Euler = -1 i6 : dim bC o6 = 3 i7 : dbC=dualize bC o7 = 0: v v v v v 0 1 2 3 4 o7 : co-complex of dim 0 embedded in dim 4 (printing facets) equidimensional, simplicial, F-vector {0, 5, 10, 10, 5, 1}, Euler = 1 i8 : dim dbC o8 = 0