module Order.Diagram.Meet whereMeetsđ
As mentioned before, in the binary case, we refer to glbs as meets: The meet of and is, if it exists, the greatest element satisfying and
record is-meet (P : Poset o â) (a b glb : â P â) : Type (o â â) where
  no-eta-equality
  open Poset P
  field
    meetâ€l   : glb †a
    meetâ€r   : glb †b
    greatest : (lb' : Ob) â lb' †a â lb' †b â lb' †glb
record Meet (P : Poset o â) (a b : â P â) : Type (o â â) where
  no-eta-equality
  field
    glb : â P â
    has-meet : is-meet P a b glb
  open is-meet has-meet public
open is-meet
Has-meets : Poset o â â Type (o â â)
Has-meets P = â x y â Meet P x yA shuffling of terms shows that being a meet is precisely being the greatest lower bound of a family of two elements.
  is-meetâis-glb : â {a b glb} â is-meet P a b glb â is-glb P (if_then a else b) glb
  is-meetâis-glb meet .glbâ€fam true = meet .meetâ€l
  is-meetâis-glb meet .glbâ€fam false = meet .meetâ€r
  is-meetâis-glb meet .greatest glb' x = meet .greatest glb' (x true) (x false)
  is-glbâis-meet : â {F : Bool â Ob} {glb} â is-glb P F glb â is-meet P (F true) (F false) glb
  is-glbâis-meet glb .meetâ€l = glb .glbâ€fam true
  is-glbâis-meet glb .meetâ€r = glb .glbâ€fam false
  is-glbâis-meet glb .greatest lb' lb'<a lb'<b = glb .greatest lb' λ where
    true  â lb'<a
    false â lb'<bAn important lemma about meets is that, if then the greatest lower bound of and is just
  leâis-meet : â {a b} â a †b â is-meet P a b a
  leâis-meet aâ€b .meetâ€l = â€-refl
  leâis-meet aâ€b .meetâ€r = aâ€b
  leâis-meet aâ€b .greatest lb' lb'â€a _ = lb'â€a
  le-meet : â {a b l} â a †b â is-meet P a b l â a ⥠l
  le-meet aâ€b l = meet-unique (leâis-meet aâ€b) lAs productsđ
When passing from posets to categories, meets become products: coming from the other direction, if a category has each a proposition, then products in are simply meets.
  open is-product
  open Product
  is-meetâproduct : â {a b glb : Ob} â is-meet P a b glb â Product (posetâcategory P) a b
  is-meetâproduct glb .apex = _
  is-meetâproduct glb .Ïâ = glb .is-meet.meetâ€l
  is-meetâproduct glb .Ïâ = glb .is-meet.meetâ€r
  is-meetâproduct glb .has-is-product .âš_,_â© q<a q<b =
    glb .is-meet.greatest _ q<a q<b
  is-meetâproduct glb .has-is-product .Ïââfactor = prop!
  is-meetâproduct glb .has-is-product .Ïââfactor = prop!
  is-meetâproduct glb .has-is-product .unique _ _ _ = prop!