Crate order_theory

Crate order_theory 

Source
Expand description

Traits which describe basic concepts from order theory:

Beyond those traits, the ranges module exposes functionality for treating ranges as lattices (where the greatest_lower_bound of two ranges is their intersection, and the least_upper_bound is the smallest range containing all items contained in either of them).

Finally, the [property_checks] module (available when the dev feature is enabled) provides utilities for property testing for all the traits of this crate (and the traits in core::cmp).

Modules§

finite_range
Functionality for treating ranges as lattices.

Traits§

BoundedLattice
A bounded lattice is a type which is both a BoundedLowerSemilattice and a BoundedUpperSemilattice. Every bounded lattice is also a regular lattice.
BoundedLowerSemilattice
A LowerSemilattice with a least element.
BoundedUpperSemilattice
An UpperSemilattice with a greatest element.
GreatestElement
A partial order with a greatest element (which is necessarily unique).
Lattice
A lattice is a type which is both a LowerSemilattice and an UpperSemilattice.
LeastElement
A partial order with a least element (which is necessarily unique).
LowerSemilattice
A partial order in which for any two elements there exists a unique greatest lower bound.
Predecessor
A partial order where every element has a unique predecessor.
PredecessorExceptForLeast
A partial order where every element but the least element has a unique predecessor.
Successor
A partial order where every element has a unique successor.
SuccessorExceptForGreatest
A partial order where every element but the greatest element has a unique successor.
TryPredecessor
A partial order in which some elements have predecessors, i.e., unique greatest lesser values.
TrySuccessor
A partial order in which some elements have successors, i.e., unique least greater values.
UpperSemilattice
A partial order in which for any two elements there exists a unique least upper bound.