The poset $P$ is graded if all of its maximalChains are the same length.
Clearly, the $n$ chain and the $n$ booleanLattice are graded.
i1 : n = 5; |
i2 : isGraded chain n o2 = true |
i3 : isGraded booleanLattice n o3 = true |
However, the pentagon lattice is not graded.
i4 : P = poset {{1,2}, {1,3}, {3,4}, {2,5}, {4, 5}}; |
i5 : isGraded P o5 = false |
The object isGraded is a method function.