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))