module Order.Semilattice.Join where

Join semilatticesπŸ”—

A join semilattice is a partially ordered set which has all finite joins. This means, in particular, that it has a bottom element, since that is the join of the empty family. Note that, even though join-semilattices are presented as being equipped with a binary operation aβˆͺba \cup b, this is not actual structure on the partially-ordered set: joins are uniquely determined, so β€œbeing a join-semilattice” is always a proposition.

record is-join-semilattice {o β„“} (P : Poset o β„“) : Type (o βŠ” β„“) where
  field
    _βˆͺ_     : ⌞ P ⌟ β†’ ⌞ P ⌟ β†’ ⌞ P ⌟
    βˆͺ-joins : βˆ€ x y β†’ is-join P x y (x βˆͺ y)
    has-bottom : Bottom P

Morphisms of join semilattices are monotone functions which additionally send joins to joins: we have f(βŠ₯)=βŠ₯f(\bot) = \bot, and f(aβˆͺb)=f(a)βˆͺf(b)f(a \cup b) = f(a) \cup f(b). Note that, since ff was already assumed to be order-preserving, it suffices to have f(aβˆͺb)f(a \cup b) less than f(a)βˆͺf(b)f(a) \cup f(b), with an inequality. This is because we always have the reverse direction by the universal property.

record
  is-join-slat-hom
    {P : Poset o β„“} {Q : Poset o' β„“'} (f : Monotone P Q)
    (P-slat : is-join-semilattice P)
    (Q-slat : is-join-semilattice Q) : Type (o βŠ” β„“')
  where
  field
    βˆͺ-≀   : βˆ€ x y β†’ f # (x Pβ‚—.βˆͺ y) Q.≀ (f # x) Qβ‚—.βˆͺ (f # y)
    bot-≀ : f # Pβ‚—.bot Q.≀ Qβ‚—.bot

The category of join-semilatticesπŸ”—

It is clear from the definition that join semilatice homomorphisms are closed under identity and composition: therefore, we can define the category of join-semilattices as a subcategory of that of posets. However, this subcategory is not full: there are monotone functions between semilattices that do not preserve joins.

id-join-slat-hom
  : (Pβ‚— : is-join-semilattice P)
  β†’ is-join-slat-hom idβ‚˜ Pβ‚— Pβ‚—

∘-join-slat-hom
  : βˆ€ {Pβ‚— Qβ‚— Rβ‚—} {f : Monotone Q R} {g : Monotone P Q}
  β†’ is-join-slat-hom f Qβ‚— Rβ‚—
  β†’ is-join-slat-hom g Pβ‚— Qβ‚—
  β†’ is-join-slat-hom (f βˆ˜β‚˜ g) Pβ‚— Rβ‚—