module Order.Instances.Props where
Propositionsπ
In the posetal world, what plays the role of the category of sets is the poset of propositions β our relations take values in propositions, much like the category of sets is where the functor takes values.
Unlike βtheβ category of sets, which is actually a bunch of categories (depending on the universe level of the types weβre considering), there is a single poset of propositions β this is the principle of propositional resizing, which we assume throughout.
Props : Poset lzero lzero Props .Poset.Ob = Ξ© Props .Poset._β€_ P Q = β£ P β£ β β£ Q β£ Props .Poset.β€-thin = hlevel 1 Props .Poset.β€-refl x = x Props .Poset.β€-trans g f x = f (g x) Props .Poset.β€-antisym = Ξ©-ua
The poset of propositions a top and bottom element, as well as all meets and joins.
Props-has-top : Top Props Props-has-top .Top.top = β€Ξ© Props-has-top .Top.has-top _ _ = tt Props-has-bot : Bottom Props Props-has-bot .Bottom.bot = β₯Ξ© Props-has-bot .Bottom.has-bottom _ () Props-has-joins : β P Q β is-join Props P Q (P β¨Ξ© Q) Props-has-joins P Q .is-join.lβ€join = pure β inl Props-has-joins P Q .is-join.rβ€join = pure β inr Props-has-joins P Q .is-join.least R l r = rec! [ l , r ] Props-has-meets : β P Q β is-meet Props P Q (P β§Ξ© Q) Props-has-meets P Q .is-meet.meetβ€l = fst Props-has-meets P Q .is-meet.meetβ€r = snd Props-has-meets P Q .is-meet.greatest R l r x = l x , r x module _ {β} {I : Type β} (Ps : I β Ξ©) where Props-has-glbs : is-glb Props Ps (βΞ© I Ps) Props-has-glbs .is-glb.glbβ€fam i = rec! (_$ i) Props-has-glbs .is-glb.greatest R k x = inc (Ξ» i β k i x) Props-has-lubs : is-lub Props Ps (βΞ© I Ps) Props-has-lubs .is-lub.famβ€lub i pi = inc (i , pi) Props-has-lubs .is-lub.least R k = rec! k
open is-meet-semilattice open is-join-semilattice Props-is-meet-slat : is-meet-semilattice Props Props-is-meet-slat ._β©_ x y = x β§Ξ© y Props-is-meet-slat .β©-meets = Props-has-meets Props-is-meet-slat .has-top = Props-has-top Props-is-join-slat : is-join-semilattice Props Props-is-join-slat ._βͺ_ x y = x β¨Ξ© y Props-is-join-slat .βͺ-joins = Props-has-joins Props-is-join-slat .has-bottom = Props-has-bot