module Order.Diagram.Meet.Reasoning {o β} {P : Poset o β} {_β©_ : β P β β β P β β β P β} (β©-meets : β x y β is-meet P x y (x β© y)) where
Reasoning about meetsπ
This module provides syntax and reasoning combinators for working with partial orders that have all meets.
meets : β x y β Meet P x y meets x y .glb = x β© y meets x y .has-meet = β©-meets x y module meets {x} {y} = Meet (meets x y) open meets renaming ( meetβ€l to β©β€l ; meetβ€r to β©β€r ; greatest to β©-universal) public
The meet operation is idempotent and commutative.
abstract β©-idem : β {x} β x β© x β‘ x β©-idem = β€-antisym β©β€l (β©-universal _ β€-refl β€-refl) β©-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 _ (β©-universal _ β©β€l (β€-trans β©β€r β©β€l)) (β€-trans β©β€r β©β€r)) (β©-universal _ (β€-trans β©β€l β©β€l) (β©-universal _ (β€-trans β©β€l β©β€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 β©β€l p) (β€-trans β©β€r q)
β©β€β©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 meet operation determines the order on as witnessed by the following equivalence.
β©βorder : β {x y} β x β© y β‘ x β x β€ y β©βorder {x} {y} p = x =Λβ¨ p β©=Λ (x β© y) β€β¨ β©β€r β©β€ y β€β orderββ© : β {x y} β x β€ y β x β© y β‘ x orderββ© {x} {y} p = β€-antisym β©β€l (β©-universal _ β€-refl p) β©βorder : β {x y} β (x β© y β‘ x) β (x β€ y) β©βorder = prop-ext! β©βorder orderββ©