Skip to content

GreatestLowerBound ​

The meet of two values in a lattice: the greatest value at or below both.

GreatestLowerBound(a, b)The meet of two values in a lattice: the greatest value at or below both.
Typed signatures
TypePackageApplies
(any, any) -> unknownstructuresalways

Domain: Structures

Details
  • The Lattice protocol's member, and what Min folds when its arguments' type is a lattice.
  • In a linear order it is the smaller of the two; under dominance it takes the partial sums' pointwise minimum.

Examples

Basic #

In a linear order, the smaller of the two

live ↗
InGreatestLowerBound(3,5)\mathrm{GreatestLowerBound}(3, 5)Out33
Scope #

Under dominance, the meet of two incomparable partitions

live ↗
InGreatestLowerBound(IntegerPartition⁡([3,1,1,1]),IntegerPartition⁡([2,2,2]))\mathrm{GreatestLowerBound}({\operatorname{IntegerPartition}}([3, 1, 1, 1]), {\operatorname{IntegerPartition}}([2, 2, 2]))OutIntegerPartition⁡([2,2,1,1]){\operatorname{IntegerPartition}}([2, 2, 1, 1])
About
Examples2

See also: LeastUpperBound, Min, Compare