module Order.Displayed where

Displayed posetsπŸ”—

As a special case of displayed categories, we can construct displayed posets: a poset displayed over written is a type-theoretic repackaging β€” so that fibrewise information is easier to recover β€” of the data of a poset and a monotone map

record Displayed {β„“β‚’ β„“α΅£} β„“ β„“' (P : Poset β„“β‚’ β„“α΅£) : Type (lsuc (β„“ βŠ” β„“') βŠ” β„“β‚’ βŠ” β„“α΅£) where

  private module P = Pr P

    Ob[_]   : P.Ob β†’ Type β„“
    Rel[_]  : βˆ€ {x y} β†’ x P.≀ y β†’ Ob[ x ] β†’ Ob[ y ] β†’ Type β„“'
    ≀-refl' : βˆ€ {x} {x' : Ob[ x ]} β†’ Rel[ P.≀-refl ] x' x'
    ≀-thin' : βˆ€ {x y} (f : x P.≀ y) {x' y'} β†’ is-prop (Rel[ f ] x' y')
      : βˆ€ {x y z} {x' : Ob[ x ]} {y' : Ob[ y ]} {z' : Ob[ z ]}
      β†’ {f : x P.≀ y} {g : y P.≀ z}
      β†’ Rel[ f ] x' y' β†’ Rel[ g ] y' z'
      β†’ Rel[ P.≀-trans f g ] x' z'
      : βˆ€ {x} {x' y' : Ob[ x ]}
      β†’ Rel[ P.≀-refl ] x' y' β†’ Rel[ P.≀-refl ] y' x' β†’ x' ≑ y'

Analogously to a displayed category, where we can take pairs of an object and an object over to make a new category (the total space we can take total spaces of displayed posets to make a new poset.

∫ : βˆ€ {β„“ β„“' β„“β‚’ β„“α΅£} {P : Poset β„“β‚’ β„“α΅£} β†’ Displayed β„“ β„“' P β†’ Poset _ _
∫ {P = P} D = po where
  module D = Displayed D
  module P = Pr P

  po : Poset _ _
  po .Poset.Ob = Σ ⌞ P ⌟ D.Ob[_]
  po .Poset._≀_ (x , x') (y , y') = Ξ£ (x P.≀ y) Ξ» f β†’ D.Rel[ f ] x' y'
  po .Poset.≀-thin = Ξ£-is-hlevel 1 P.≀-thin Ξ» f β†’ D.≀-thin' f
  po .Poset.≀-refl = P.≀-refl , D.≀-refl'
  po .Poset.≀-trans (p , p') (q , q') = P.≀-trans p q , D.≀-trans' p' q'
  po .Poset.≀-antisym (p , p') (q , q') =
    Ξ£-pathp (P.≀-antisym p q) (D.≀-antisym-over p' q')

open Displayed