Skip to content

LeastUpperBound ​

The join of two values in a lattice: the least value at or above both.

LeastUpperBound(a, b)The join of two values in a lattice: the least value at or above both.
Typed signatures
TypePackageApplies
(any, any) -> unknownstructuresalways

Domain: Structures

Details
  • The Lattice protocol's member, and what Max folds when its arguments' type is a lattice.
  • Set partitions under refinement: the finest common coarsening.
  • Permutations (right weak order): the transitive closure of the union of the inversion sets.

Examples

Basic #

In a linear order, the larger of the two

live ↗
InLeastUpperBound(3,5)\mathrm{LeastUpperBound}(3, 5)Out55
Scope #

Under dominance, the join of two incomparable partitions

live ↗
InLeastUpperBound(IntegerPartition⁡([3,1,1,1]),IntegerPartition⁡([2,2,2]))\mathrm{LeastUpperBound}({\operatorname{IntegerPartition}}([3, 1, 1, 1]), {\operatorname{IntegerPartition}}([2, 2, 2]))OutIntegerPartition⁡([3,2,1]){\operatorname{IntegerPartition}}([3, 2, 1])

Under refinement, the join is the finest common coarsening: blocks sharing an element are glued

live ↗
InLeastUpperBound(SetPartition⁡([[1,2],[3]]),SetPartition⁡([[1],[2,3]]))\mathrm{LeastUpperBound}({\operatorname{SetPartition}}([[1, 2], [3]]), {\operatorname{SetPartition}}([[1], [2, 3]]))OutSetPartition⁡([[1,2,3]]){\operatorname{SetPartition}}([[1, 2, 3]])

Known value · Sage SetPartition.sup

Under the right weak order the join takes the transitive closure of the union of the inversion pairs

live ↗
InLeastUpperBound(Permutation⁡([2,1,3]),Permutation⁡([1,3,2]))\mathrm{LeastUpperBound}({\operatorname{Permutation}}([2, 1, 3]), {\operatorname{Permutation}}([1, 3, 2]))OutPermutation⁡([3,2,1]){\operatorname{Permutation}}([3, 2, 1])

Known value · Sage LatticePoset of permutohedron_lequal join

About
Examples4

See also: GreatestLowerBound, Max, Compare