Examples.Classical.Semilattice¶
Worked Example: (Bool, _∧_) as a semilattice¶
This is the Examples.Classical.Semilattice module of the Agda Universal Algebra Library.
Booleans under conjunction form the canonical small semilattice — idempotent,
commutative, associative. Built directly from stdlib's ∧-assoc, ∧-comm,
∧-idem in Data.Bool.Properties.
Bool-meet-semilattice : Semilattice Bool-meet-semilattice = eqsToSemilattice Bool _∧_ ∧-assoc ∧-comm ∧-idem open Polymorphic.Semilattice-Op Bool-meet-semilattice using ( _∙_ ) ∙-is-∧-sl : ∀ (a b : Bool) → a ∙ b ≡ a ∧ b ∙-is-∧-sl a b = refl