module Order.Subposet where
Subposetsπ
Let be a poset, and be a predicate on We can form a subposet of by restricting to the elements of where holds.
module _ {o β} (A : Poset o β) where open Order.Reasoning A Subposet : β {β'} β (P : Ob β Prop β') β Poset (o β β') β Subposet P .Poset.Ob = β«β P Subposet P .Poset._β€_ (a , _) (b , _) = a β€ b Subposet P .Poset.β€-thin = β€-thin Subposet P .Poset.β€-refl = β€-refl Subposet P .Poset.β€-trans = β€-trans Subposet P .Poset.β€-antisym p q = Ξ£-prop-path! (β€-antisym p q)
Every subposet includes into the original order it was constructed from, and this inclusion is an order embedding.
module _ {o β β'} {A : Poset o β} (P : β A β β Prop β') where open Order.Reasoning A subposet-inc : Monotone (Subposet A P) A subposet-inc .hom = fst subposet-inc .pres-β€ p = p subposet-inc-is-order-embedding : is-order-embedding (Subposet A P) A (apply subposet-inc) subposet-inc-is-order-embedding = _ , id-equiv module _ {o β β'} {A : Poset o β} {P : β A β β Prop β'} where open Order.Reasoning A subposet-inc-inj : {x y : β«β P} β subposet-inc {A = A} P # x β‘ subposet-inc {A = A} P # y β x β‘ y subposet-inc-inj p = Ξ£-prop-path! p
Joins and Meets in Subposetsπ
If has joins or meets, and is closed under those joins and meets, then the subposet induced by also has those joins and meets.
open is-meet open is-join open is-lub subposet-has-top : β {x} β (px : x β P) β is-top A x β is-top (Subposet A P) (x , px) subposet-has-top px x-top (y , _) = x-top y subposet-has-bottom : β {x} β (px : x β P) β is-bottom A x β is-bottom (Subposet A P) (x , px) subposet-has-bottom px x-bottom (y , _) = x-bottom y subposet-has-meet : β {x y z} β (px : x β P) (py : y β P) (pz : z β P) β is-meet A x y z β is-meet (Subposet A P) (x , px) (y , py) (z , pz) subposet-has-meet px py pz z-meet .meetβ€l = z-meet .meetβ€l subposet-has-meet px py pz z-meet .meetβ€r = z-meet .meetβ€r subposet-has-meet px py pz z-meet .greatest (lb , _) = z-meet .greatest lb subposet-has-join : β {x y z} β (px : x β P) (py : y β P) (pz : z β P) β is-join A x y z β is-join (Subposet A P) (x , px) (y , py) (z , pz) subposet-has-join px py pz z-join .lβ€join = z-join .lβ€join subposet-has-join px py pz z-join .rβ€join = z-join .rβ€join subposet-has-join px py pz z-join .least (lb , _) = z-join .least lb subposet-has-lub : β {βα΅’} {I : Type βα΅’} β {k : I β Ob} {x : Ob} β (pk : β i β k i β P) β (px : x β P) β is-lub A k x β is-lub (Subposet A P) (Ξ» i β k i , pk i) (x , px) subposet-has-lub pk px has-lub .famβ€lub i = has-lub .famβ€lub i subposet-has-lub pk px has-lub .least ub famβ€ub = has-lub .least (ub .fst) famβ€ub
subposet-top : (has-top : Top A) β Top.top has-top β P β Top (Subposet A P) subposet-top has-top topβP .Top.top = Top.top has-top , topβP subposet-top has-top topβP .Top.has-top = subposet-has-top topβP (Top.has-top has-top) subposet-bottom : (has-bottom : Bottom A) β Bottom.bot has-bottom β P β Bottom (Subposet A P) subposet-bottom has-bottom bottomβP .Bottom.bot = Bottom.bot has-bottom , bottomβP subposet-bottom has-bottom bottomβP .Bottom.has-bottom = subposet-has-bottom bottomβP (Bottom.has-bottom has-bottom) subposet-meets : (has-meets : Has-meets A) β (meetβP : β {x y} β x β P β y β P β Meet.glb (has-meets x y) β P) β (β {x y} β (px : x β P) β (py : y β P) β Meet (Subposet A P) (x , px) (y , py)) subposet-meets has-meets meetβP {x} {y} xβP yβP .Meet.glb = Meet.glb (has-meets x y) , meetβP xβP yβP subposet-meets has-meets meetβP {x} {y} xβP yβP .Meet.has-meet = subposet-has-meet xβP yβP (meetβP xβP yβP) (Meet.has-meet (has-meets x y)) subposet-joins : (has-joins : Has-joins A) β (joinβP : β {x y} β x β P β y β P β Join.lub (has-joins x y) β P) β (β {x y} β (px : x β P) β (py : y β P) β Join (Subposet A P) (x , px) (y , py)) subposet-joins has-joins joinβP {x} {y} xβP yβP .Join.lub = Join.lub (has-joins x y) , joinβP xβP yβP subposet-joins has-joins joinβP {x} {y} xβP yβP .Join.has-join = subposet-has-join xβP yβP (joinβP xβP yβP) (Join.has-join (has-joins x y))