# [−][src]Trait gf::support::lattice::Lattice

A bounded lattice.

Bounded lattices *L* are required to uphold the following laws:

*a*∙*a*=*a*for*a*∈*L*and*∙*∈ {⊓, ⊔} (idempotency);*a*∙*b*=*b*∙*a*for*a*,*b*∈*L*and*∙*∈ {⊓, ⊔} (commutativity);*a*∙ (*b*∙*c*) = (*a*∙*b*) ∙*c*for*a*,*b*,*c*∈*L*and*∙*∈ {⊓, ⊔} (associativity);*a*⊓ (*a*⊔*b*) =*a*and*a*⊔ (*a*⊓*b*) =*a*for*a*,*b*∈*L*(absorption);*a*⊓ ⊤ =*a*and*a*⊔ ⊥ =*a*(identity).

## Required methods

`fn bottom() -> Self`

Return the bottom element, ⊥.

`fn top() -> Self`

Return the top element, ⊤.

`fn meet(a: Self, b: Self) -> Self`

Return `a`

⊓ `b`

.

`fn join(a: Self, b: Self) -> Self`

Return `a`

⊔ `b`

.

## Provided methods

`fn order_cmp(a: Self, b: Self) -> Option<Ordering>`

Compare `a`

and `b`

using the lattice-induced partial order ⊑.

The default implementation uses `meet`

to compare the elements. Debug
builds additionally verify that `join`

yields the same order, panicking
if not.