# Data.Lattice

- Package
- purescript-lattice
- Repository
- Risto-Stevcev/purescript-lattice

### #JoinSemilattice Source

`class JoinSemilattice a where`

A `JoinSemilattice`

must satisfy the following laws:

- Associativity of join: forall a b c, join a (join b c) == join (join a b) c
- Commutativity of join: forall a b, join a b == join b a
- Idempotency of join: forall a, join a a == a

Join semilattices capture the notion of sets with a "least upper bound".

#### Members

`join :: a -> a -> a`

#### Instances

### #MeetSemilattice Source

`class MeetSemilattice a where`

A `MeetSemilattice`

must satisfy the following laws:

- Associativity of meet: forall a b c, meet a (meet b c) == meet (meet a b) c
- Commutativity of meet: forall a b, meet a b == meet b a
- Idempotency of meet: forall a, meet a a == a

Meet semilattices capture the notion of sets with a "greatest lower bound".

#### Members

`meet :: a -> a -> a`

#### Instances

### #BoundedJoinSemilattice Source

`class (JoinSemilattice a) <= BoundedJoinSemilattice a where`

A `BoundedJoinSemilattice`

must satisfy the following laws in addition to
`JoinSemilattice`

laws:

Bottom (Unitary Element): forall a, join a bottom == a

Join semilattices capture the notion of sets with a "least upper bound" equipped with a "bottom" element.

#### Members

`bottom :: a`

#### Instances

### #BoundedMeetSemilattice Source

`class (MeetSemilattice a) <= BoundedMeetSemilattice a where`

A `BoundedMeetSemilattice`

must satisfy the following laws in addition to
`MeetSemilattice`

laws:

- Top (Unitary Element): forall a, meet a top == a

Meet semilattices capture the notion of sets with a "greatest lower bound" equipped with a "top" element.

#### Members

`top :: a`

#### Instances

### #Lattice Source

`class (JoinSemilattice a, MeetSemilattice a) <= Lattice a `

A `Lattice`

must satisfy the following in addition to `JoinSemilattice`

and `MeetSemilattice`

laws:

- Absorbtion laws for meet and join: forall a b, meet a (join a b) == a forall a b, join a (meet a b) == a

#### Instances

### #BoundedLattice Source

`class (BoundedJoinSemilattice a, BoundedMeetSemilattice a) <= BoundedLattice a `

A `BoundedLattice`

must satisfy the following in addition to
`BoundedMeetSemilattice`

and `BoundedJoinSemilattice`

laws:

- Absorbtion laws for meet and join: forall a b, meet a (join a b) == a forall a b, join a (meet a b) == a

#### Instances

- Modules
- Data.
Lattice - Data.
Lattice. Verify