module Order.Diagram.Top {o β} (P : Poset o β) where
Top elementsπ
A top element in a partial order is an element that is larger than any other element in This is the same as being a greatest lower bound for the empty family
is-top : Ob β Type _ is-top top = β x β x β€ top record Top : Type (o β β) where field top : Ob has-top : is-top top ! : β {x} β x β€ top ! = has-top _ is-topβis-glb : β {glb} {f : β₯ β _} β is-top glb β is-glb P f glb is-topβis-glb is-top .greatest x _ = is-top x is-glbβis-top : β {glb} {f : β₯ β _} β is-glb P f glb β is-top glb is-glbβis-top glb x = glb .greatest x Ξ» ()
is-top-is-prop : β x β is-prop (is-top x) is-top-is-prop _ = hlevel 1 top-unique : β {x y} β is-top x β is-top y β x β‘ y top-unique p q = β€-antisym (q _) (p _) Top-is-prop : is-prop Top Top-is-prop p q i .Top.top = top-unique (Top.has-top p) (Top.has-top q) i Top-is-prop p q i .Top.has-top = is-propβpathp (Ξ» i β is-top-is-prop (top-unique (Top.has-top p) (Top.has-top q) i)) (Top.has-top p) (Top.has-top q) i instance H-Level-Top : β {n} β H-Level Top (suc n) H-Level-Top = prop-instance Top-is-prop TopβGlb : β {f : β₯ β _} β Top β Glb P f TopβGlb top .Glb.glb = Top.top top TopβGlb top .Glb.has-glb = is-topβis-glb (Top.has-top top) GlbβTop : β {f : β₯ β _} β Glb P f β Top GlbβTop glb .Top.top = Glb.glb glb GlbβTop glb .Top.has-top = is-glbβis-top (Glb.has-glb glb) is-topβis-glb : β {glb} {f} β is-equiv (is-topβis-glb {glb} {f}) is-topβis-glb = biimp-is-equiv! _ is-glbβis-top TopβGlb : β {f} β is-equiv (TopβGlb {f}) TopβGlb = biimp-is-equiv! _ GlbβTop
As terminal objectsπ
Bottoms are the decategorifcation of terminal objects; we donβt need to require the uniqueness of the universal morphism, as weβve replaced our hom-sets with hom-props!
is-topβterminal : β {x} β is-top x β is-terminal (posetβcategory P) x is-topβterminal is-top x .centre = is-top x is-topβterminal is-top x .paths _ = β€-thin _ _ terminalβis-top : β {x} β is-terminal (posetβcategory P) x β is-top x terminalβis-top terminal x = terminal x .centre