| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Some derivable properties of semilattices |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
open import Algebra.Lattice.Bundles using (Semilattice) |
| 10 |
|
| 11 |
module Algebra.Lattice.Properties.Semilattice |
| 12 |
{c ℓ} (L : Semilattice c ℓ) where |
| 13 |
|
| 14 |
open import Relation.Binary.Bundles using (Poset) |
| 15 |
import Relation.Binary.Lattice as B |
| 16 |
import Relation.Binary.Properties.Poset as PosetProperties |
| 17 |
open Semilattice L renaming (_∙_ to _∧_) |
| 18 |
|
| 19 |
open import Relation.Binary.Reasoning.Setoid setoid |
| 20 |
import Relation.Binary.Construct.NaturalOrder.Left _≈_ _∧_ |
| 21 |
as LeftNaturalOrder |
| 22 |
|
| 23 |
------------------------------------------------------------------------ |
| 24 |
-- Every semilattice can be turned into a poset via the left natural |
| 25 |
-- order. |
| 26 |
|
| 27 |
poset : Poset c ℓ ℓ |
| 28 |
poset = LeftNaturalOrder.poset isSemilattice |
| 29 |
|
| 30 |
open Poset poset using (_≤_; _≥_; isPartialOrder) |
| 31 |
open PosetProperties poset using (≥-isPartialOrder) |
| 32 |
|
| 33 |
------------------------------------------------------------------------ |
| 34 |
-- Every algebraic semilattice can be turned into an order-theoretic one. |
| 35 |
|
| 36 |
∧-isOrderTheoreticMeetSemilattice : B.IsMeetSemilattice _≈_ _≤_ _∧_ |
| 37 |
∧-isOrderTheoreticMeetSemilattice = record |
| 38 |
{ isPartialOrder = isPartialOrder |
| 39 |
; infimum = LeftNaturalOrder.infimum isSemilattice |
| 40 |
} |
| 41 |
|
| 42 |
∧-isOrderTheoreticJoinSemilattice : B.IsJoinSemilattice _≈_ _≥_ _∧_ |
| 43 |
∧-isOrderTheoreticJoinSemilattice = record |
| 44 |
{ isPartialOrder = ≥-isPartialOrder |
| 45 |
; supremum = B.IsMeetSemilattice.infimum |
| 46 |
∧-isOrderTheoreticMeetSemilattice |
| 47 |
} |
| 48 |
|
| 49 |
∧-orderTheoreticMeetSemilattice : B.MeetSemilattice c ℓ ℓ |
| 50 |
∧-orderTheoreticMeetSemilattice = record |
| 51 |
{ isMeetSemilattice = ∧-isOrderTheoreticMeetSemilattice |
| 52 |
} |
| 53 |
|
| 54 |
∧-orderTheoreticJoinSemilattice : B.JoinSemilattice c ℓ ℓ |
| 55 |
∧-orderTheoreticJoinSemilattice = record |
| 56 |
{ isJoinSemilattice = ∧-isOrderTheoreticJoinSemilattice |
| 57 |
} |