Macaulay2 » Documentation
Packages » Posets :: closedInterval
next | previous | forward | backward | up | index | toc

# closedInterval -- computes the subposet contained between two points

- Usage:
    `I = closedInterval(P, p, q)`
- Inputs:
  - P, an instance of the type Poset,
  - p, a thing, an element of the poset
  - q, a thing, an element of the poset
- Outputs:
  - I, an instance of the type Poset, the closed interval in $P$ between $p$ and $q$

## Description

The closed interval between $p$ and $q$ is the subposet of $P$ induced by the elements $z$ such that $p \leq z \leq q$. If $p$ and $q$ are incomparable, then an error is thrown.

    i1 : P = booleanLattice 3;

    i2 : closedInterval(P, "001", "111")

    o2 = Relation Matrix: | 1 1 1 1 |
                          | 0 1 0 1 |
                          | 0 0 1 1 |
                          | 0 0 0 1 |

    o2 : Poset

## See also

- openInterval -- computes the subposet contained strictly between two points

## Ways to use closedInterval:

- `closedInterval(Poset,Thing,Thing)`

## For the programmer

The object closedInterval is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Posets.m2:2546:0.