module Order.Instances.Upper where

Upper sets🔗

An upper set of a poset is a subset such that:

Equivalently, an upper set is a monotone map to the poset of propositions.

Upper-sets :  {o }  Poset o   Poset (o  ) o
Upper-sets P = Poset[ P , Props ]

Upper-set :  {o } (P : Poset o )  Type _
Upper-set P =   Upper-sets P 

Upper sets are the order-theoretic analog to functors and thus come with their own version of the covariant yoneda embedding which sends an element to the upper set

module _ {o } (P : Poset o ) where
  private module P = Order.Reasoning P

   :  P   Upper-set P
   x .hom a = elΩ (x P.≤ a)
   x .pres-≤ a≤b x≤a =  P.≤-trans x≤a (pure a≤b) 

  よcovₚ : Monotone (P ^opp) (Upper-sets P)
  よcovₚ .hom = 
  よcovₚ .pres-≤ y≤x a x≤a =  P.≤-trans (pure y≤x) x≤a 

Duality🔗

Upper sets are dual to lower sets; see that page for a proof.