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

# isLattice -- determines if a poset is a lattice

- Usage:
    `i = isLattice P`
- Inputs:
  - P, an instance of the type Poset,
- Outputs:
  - i, a Boolean value, whether $P$ is a lattice

## Description

The poset $P$ is a lattice if every pair of vertices has a unique least upper bound and a unique greatest lower bound, i.e., every pair of vertices has a unique meet and a unique join. Equivalently, the poset $P$ is a lattice if it is both a lower semilattice and an upper semilattice.

Clearly, the $n$ chain and the $n$ booleanLattice are lattices.

    i1 : n = 4;

    i2 : isLattice chain n

    o2 = true

    i3 : B = booleanLattice n;

    i4 : isLattice B

    o4 = true

The middle ranks of the $n$ booleanLattice are not lattices.

    i5 : isLattice flagPoset(B, {1,2,3})

    o5 = false

## See also

- isBounded -- determines if a poset is bounded
- isLowerSemilattice -- determines if a poset is a lower (or meet) semilattice
- isUpperSemilattice -- determines if a poset is an upper (or join) semilattice
- joinExists -- determines if the join exists for two elements of a poset
- meetExists -- determines if the meet exists for two elements of a poset

## Ways to use isLattice:

- `isLattice(Poset)`

## For the programmer

The object isLattice is a method function.

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