https://github.com/robrix/semilattices
join and meet semilattices, lower and upper bounds.
https://github.com/robrix/semilattices
Last synced: 11 months ago
JSON representation
join and meet semilattices, lower and upper bounds.
- Host: GitHub
- URL: https://github.com/robrix/semilattices
- Owner: robrix
- License: other
- Created: 2018-03-17T00:02:30.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-10-05T00:26:38.000Z (over 1 year ago)
- Last Synced: 2025-07-14T17:47:37.117Z (11 months ago)
- Language: Haskell
- Size: 157 KB
- Stars: 43
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.com/robrix/semilattices)
# `semilattices`
This Haskell package defines typeclasses for join- and meet-semilattices, and for upper and lower bounds, and a variety of instances for each.
## Usage
Semilattices are idempotent commutative semigroups, and come in two flavours: `Join` and `Meet`. This presentation of them doesn’t inherit from `Semigroup` however, since `Semigroup`s already exist and the relationships between the various classes here warrant their own operators.
Join semilattices can be combined using the `\/` operator (pronounced “lub,” for “least upper bound”). Meet semilattices can be combined with the `/\` operator (pronounced “glb,” for “greatest lower bound”). They have opposite relationships to `Lower` and `Upper` bounds (which are optional; in general, there are more lower bounds than upper ones).
## Related work
- [`lattices`](http://hackage.haskell.org/package/lattices) also offers join & meet semilattices, & their respective bounds. Relative to `lattices`, `semilattices` primarily offers a different class hierarchy, e.g. `Lower` & `Upper` do not have `Join` & `Meet` as superclasses. Relative to `semilattices`, `lattices` offers classes for lattices (both bounded and un-), partial orderings, a variety of operations for instances.