module Order.Diagram.Glb.Reasoning {o β} (P : Poset o β) where
Reasoning about greatest lower boundsπ
This module provides syntax and reasoning combinators for working with partial orders that have all greatest lower bounds.
module Glbs {β : β {I : Type o} (f : I β Ob) β Ob} (β-glbs : β {I : Type o} (f : I β Ob) β is-glb P f (β f)) where glbs : β {I : Type o} (f : I β Ob) β Glb P f glbs f = record { glb = β f ; has-glb = β-glbs f } module glbs {I} {f : I β Ob} = Glb (glbs f) open glbs using () renaming (glbβ€fam to β-proj; greatest to β-universal) public
Performing two nested meets over and is the same as taking a single meet over
β-twice : β {I : Type o} {J : I β Type o} (f : (i : I) β J i β Ob) β β (Ξ» i β β Ξ» j β f i j) β‘ β {I = Ξ£ I J} (Ξ» p β f (p .fst) (p .snd)) β-twice f = β€-antisym (β-universal _ (Ξ» (i , j) β β€-trans (β-proj i) (β-proj {f = f i} j))) (β-universal _ Ξ» i β β-universal _ Ξ» j β β-proj (i , j))
Let and be a pair of families. If there is a map such that then the meet of is smaller than the meet of
ββ€β-over : β {I J : Type o} {f : J β Ob} {g : I β Ob} β (to : I β J) β (β i β f (to i) β€ g i) β β f β€ β g ββ€β-over to p = β-universal _ Ξ» i β β€-trans (β-proj (to i)) (p i)
As a corollary, if is smaller than for each then the meet of is smaller than the meet of
ββ€β : {I : Type o} {f g : I β Ob} β (β i β f i β€ g i) β β f β€ β g ββ€β p = ββ€β-over (Ξ» i β i) p
Taking the meet over a contractible family is equal the unique value of the family.
β-singleton : β {I : Type o} {f : I β Ob} β (p : is-contr I) β β f β‘ f (p .centre) β-singleton {f = f} p = β€-antisym (β-proj (p .centre)) (β-universal _ Ξ» i β β€-refl' (ap f (p .paths i)))
We also provide syntax for binary meets and top elements.
module _ (x y : Ob) where opaque private it : Meet P x y it = GlbβMeet (lower-glb (glbs _)) infixr 25 _β©_ _β©_ : Ob _β©_ = it .Meet.glb β©-meets : is-meet P x y _β©_ β©-meets = it .Meet.has-meet opaque has-top : Top has-top = GlbβTop (lower-glb (glbs (Ξ» ()))) open Meets β©-meets public open Top has-top using (top; !) public
There is a distributive law relating binary and infinitary meets.
β©-distrib-β-β€l : β {I : Type o} {x : Ob} {f : I β Ob} β x β© β f β€ β Ξ» i β x β© f i β©-distrib-β-β€l = (β-universal _ Ξ» i β β©-universal _ β©β€l (β€-trans β©β€r (β-proj i)))
If the infinitary meet is taken over a non-empty family, then the previous distributive law can be extended to an equality.
β©-distrib-nonempty-β-l : β {I : Type o} {x : Ob} {f : I β Ob} β β₯ I β₯ β x β© β f β‘ β Ξ» i β x β© f i β©-distrib-nonempty-β-l i = β€-antisym β©-distrib-β-β€l (rec! (Ξ» i β β©-universal _ (β€-trans (β-proj i) β©β€l) (ββ€β Ξ» _ β β©β€r)) i)
β-ap : β {I I' : Type o} {f : I β Ob} {g : I' β Ob} β (e : I β I') β (β i β f i β‘ g (e .fst i)) β β f β‘ β g β-ap e p = apβ (Ξ» I f β β {I = I} f) (ua e) (uaβ p) -- raised i for "index", raised f for "family" β-apβ± : β {I I' : Type o} {f : I' β Ob} (e : I β I') β β (Ξ» i β f (e .fst i)) β‘ β f β-apαΆ : β {I : Type o} {f g : I β Ob} β (β i β f i β‘ g i) β β f β‘ β g β-apβ± e = β-ap e (Ξ» i β refl) β-apαΆ p = β-ap (_ , id-equiv) p
Large meetsπ
Let be a poset. If has all meets of size then it has all meets, regardless of size.
is-completeβis-large-complete : (glbs : β {I : Type o} (f : I β Ob) β Glb P f) β β {β} {I : Type β} (F : I β Ob) β Glb P F is-completeβis-large-complete glbs {I = I} F = cover-preserves-glb (Ξ©-corestriction-is-surjective F) (glbs fst)
We also provide some notation for large meets.
module Large {β : β {I : Type o} (f : I β Ob) β Ob} (β-glbs : β {I : Type o} (f : I β Ob) β is-glb P f (β f)) where open Glbs β-glbs using (glbs) opaque βα΄Έ : β {β} {I : Type β} (F : I β Ob) β Ob βα΄Έ F = is-completeβis-large-complete glbs F .Glb.glb βα΄Έ-proj : β {β} {I : Type β} {F : I β Ob} (i : I) β βα΄Έ F β€ F i βα΄Έ-proj = Glb.glbβ€fam (is-completeβis-large-complete glbs _) βα΄Έ-universal : β {β} {I : Type β} {F : I β Ob} (x : Ob) β (β i β x β€ F i) β x β€ βα΄Έ F βα΄Έ-universal = Glb.greatest (is-completeβis-large-complete glbs _)
βα΄Έ-ap : β {β β'} {I : Type β} {I' : Type β'} {f : I β Ob} {g : I' β Ob} β (e : I β I') β (β i β f i β‘ g (e .fst i)) β βα΄Έ f β‘ βα΄Έ g βα΄Έ-ap {g = g} e p = β€-antisym (βα΄Έ-universal _ Ξ» i β β€-trans (βα΄Έ-proj (Equiv.from e i)) (β€-refl' (p _ β ap g (Equiv.Ξ΅ e i)))) (βα΄Έ-universal _ Ξ» i β β€-trans (βα΄Έ-proj (Equiv.to e i)) (β€-refl' (sym (p i)))) -- raised i for "index", raised f for "family" βα΄Έ-apβ± : β {β β'} {I : Type β} {I' : Type β'} {f : I' β Ob} (e : I β I') β βα΄Έ (Ξ» i β f (e .fst i)) β‘ βα΄Έ f βα΄Έ-apαΆ : β {β} {I : Type β} {f g : I β Ob} β (β i β f i β‘ g i) β βα΄Έ f β‘ βα΄Έ g βα΄Έ-apβ± e = βα΄Έ-ap e (Ξ» i β refl) βα΄Έ-apαΆ p = βα΄Έ-ap (_ , id-equiv) p