module Order.Semilattice.Join.Subsemilattice where

Subsets of Join Semilattices🔗

Let be a predicate on a join semilattice If is closed under joins and the bottom element of then the subposet induced by is also a join semilattice.

module _ {o } {A : Poset o } (A-slat : is-join-semilattice A) where
  module A = Order.Semilattice.Join.Reasoning A-slat
  open is-join-semilattice
  open Join

  Subposet-is-join-semilattice
    :  {ℓ'} {P : A.Ob  Prop ℓ'}
     (∀ {x y}  x  P  y  P  (x A.∪ y)  P)
     A.bot  P
     is-join-semilattice (Subposet A P)
  Subposet-is-join-semilattice {P = P} ∪∈P bot∈P ._∪_ (x , x∈P) (y , y∈P) = record
    { fst = x A.∪ y
    ; snd = ∪∈P x∈P y∈P
    }
  Subposet-is-join-semilattice {P = P} ∪∈P bot∈P .∪-joins (x , x∈P) (y , y∈P) =
    subposet-has-join _ _ _ (A.∪-joins x y)
  Subposet-is-join-semilattice {P = P} ∪∈P bot∈P .has-bottom =
    subposet-bottom A.has-bottom bot∈P