The poset P is ranked if there exists an integer function r on the vertex set of P such that for each a and b in the poset if b covers a then r(b) - r(a) = 1.
i1 : n = 5; |
i2 : C = chain n; |
i3 : isRanked C o3 = true |
i4 : rankFunction C o4 = {0, 1, 2, 3, 4} o4 : List |
i5 : B = booleanLattice n; |
i6 : isRanked B o6 = true |
i7 : rankGeneratingFunction C 4 3 2 o7 = q + q + q + q + 1 o7 : ZZ[q] |
i8 : P = poset {{1,2}, {1,3}, {3,4}, {2,5}, {4,5}}; |
i9 : isRanked P o9 = false |