next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Posets :: chain

chain -- generates the chain poset on $n$ elements

Synopsis

Description

The chain poset on n elements is the total order on the integers 1..n.
i1 : n = 5;
i2 : C = chain n

o2 = Poset{cache => CacheTable{...16...}                }
           GroundSet => {1, 2, 3, 4, 5}
           RelationMatrix => | 1 1 1 1 1 |
                             | 0 1 1 1 1 |
                             | 0 0 1 1 1 |
                             | 0 0 0 1 1 |
                             | 0 0 0 0 1 |
           Relations => {{1, 2}, {2, 3}, {3, 4}, {4, 5}}

o2 : Poset
i3 : C == poset(toList(1..n), (a,b) -> a <= b)

o3 = true
It is also the divisorPoset of a prime p to the n-1 power.
i4 : C == divisorPoset(2^(n-1))

o4 = true

See also

Ways to use chain :