module Order.Diagram.Top {o â„“} (P : Poset o â„“) where
open Order.Reasoning P
open is-glb
open Glb
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
: Ob → Type _
is-top = ∀ x → x ≤ top
is-top top
record Top : Type (o ⊔ ℓ) where
field
: Ob
top : is-top top
has-top
: ∀ {x} → x ≤ top
! = has-top _
!
: ∀ {glb} {f : ⊥ → _} → is-top glb → is-glb P f glb
is-top→is-glb .greatest x _ = is-top x
is-top→is-glb is-top
: ∀ {glb} {f : ⊥ → _} → is-glb P f glb → is-top glb
is-glb→is-top = glb .greatest x λ () is-glb→is-top glb x
: ∀ x → is-prop (is-top x)
is-top-is-prop _ = hlevel 1
is-top-is-prop
: ∀ {x y} → is-top x → is-top y → x ≡ y
top-unique = ≤-antisym (q _) (p _)
top-unique p q
: is-prop Top
Top-is-prop .Top.top =
Top-is-prop p q i (Top.has-top p) (Top.has-top q) i
top-unique .Top.has-top =
Top-is-prop p q i
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)
= prop-instance Top-is-prop
H-Level-Top
: ∀ {f : ⊥ → _} → Top → Glb P f
Top→Glb .Glb.glb = Top.top top
Top→Glb top .Glb.has-glb = is-top→is-glb (Top.has-top top)
Top→Glb top
: ∀ {f : ⊥ → _} → Glb P f → Top
Glb→Top .Top.top = Glb.glb glb
Glb→Top glb .Top.has-top = is-glb→is-top (Glb.has-glb glb)
Glb→Top glb
: ∀ {glb} {f} → is-equiv (is-top→is-glb {glb} {f})
is-top≃is-glb = biimp-is-equiv! _ is-glb→is-top
is-top≃is-glb
: ∀ {f} → is-equiv (Top→Glb {f})
Top≃Glb = biimp-is-equiv! _ Glb→Top Top≃Glb
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!
: ∀ {x} → is-top x → is-terminal (poset→category P) x
is-top→terminal .centre = is-top x
is-top→terminal is-top x .paths _ = ≤-thin _ _
is-top→terminal is-top x
: ∀ {x} → is-terminal (poset→category P) x → is-top x
terminal→is-top = terminal x .centre terminal→is-top terminal x