module Order.Diagram.Join.Reasoning {o β} {P : Poset o β} {_βͺ_ : β P β β β P β β β P β} (βͺ-joins : β x y β is-join P x y (x βͺ y)) where
Reasoning about joinsπ
This module provides syntax and reasoning combinators for working with partial orders that have all joins.
joins : β x y β Join P x y joins x y .lub = x βͺ y joins x y .has-join = βͺ-joins x y module joins {x} {y} = Join (joins x y) open joins renaming ( lβ€join to lβ€βͺ ; rβ€join to rβ€βͺ ; least to βͺ-universal) public
The join operation is idempotent and commutative.
abstract βͺ-idem : β {x} β x βͺ x β‘ x βͺ-idem = β€-antisym (βͺ-universal _ β€-refl β€-refl) lβ€βͺ βͺ-comm : β {x y} β x βͺ y β‘ y βͺ x βͺ-comm = β€-antisym (βͺ-universal _ rβ€βͺ lβ€βͺ) (βͺ-universal _ rβ€βͺ lβ€βͺ)
Furthermore, it is associative, and thus forms a semigroup.
βͺ-assoc : β {x y z} β x βͺ (y βͺ z) β‘ (x βͺ y) βͺ z βͺ-assoc = β€-antisym (βͺ-universal _ (β€-trans lβ€βͺ lβ€βͺ) (βͺ-universal _ (β€-trans rβ€βͺ lβ€βͺ) rβ€βͺ)) (βͺ-universal _ (βͺ-universal _ lβ€βͺ (β€-trans lβ€βͺ rβ€βͺ)) (β€-trans rβ€βͺ rβ€βͺ)) βͺ-is-semigroup : is-semigroup _βͺ_ βͺ-is-semigroup .has-is-magma .has-is-set = Ob-is-set βͺ-is-semigroup .associative = βͺ-assoc
Additionally, it respects the ordering on in each variable.
βͺβ€βͺ : β {x y x' y'} β x β€ x' β y β€ y' β (x βͺ y) β€ (x' βͺ y') βͺβ€βͺ p q = βͺ-universal _ (β€-trans p lβ€βͺ) (β€-trans q rβ€βͺ)
βͺβ€βͺl : β {x y x'} β x β€ x' β (x βͺ y) β€ (x' βͺ y) βͺβ€βͺl p = βͺβ€βͺ p β€-refl βͺβ€βͺr : β {x y y'} β y β€ y' β (x βͺ y) β€ (x βͺ y') βͺβ€βͺr p = βͺβ€βͺ β€-refl p
Finally, we note that the join operation determines the order on as witnessed by the following equivalence.
βͺβorder : β {x y} β x βͺ y β‘ y β x β€ y βͺβorder {x} {y} p = x β€β¨ lβ€βͺ β©β€ (x βͺ y) =β¨ p β©= y β€β orderββͺ : β {x y} β x β€ y β x βͺ y β‘ y orderββͺ p = β€-antisym (βͺ-universal _ p β€-refl) rβ€βͺ βͺβorder : β {x y} β (x βͺ y β‘ y) β (x β€ y) βͺβorder = prop-ext! βͺβorder orderββͺ