module Order.Diagram.Meet where

MeetsšŸ”—

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 y

A 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'<b

An 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) l

As 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 .Ļ€ā‚āˆ˜āŸØāŸ© = prop!
  is-meetā†’product glb .has-is-product .Ļ€ā‚‚āˆ˜āŸØāŸ© = prop!
  is-meetā†’product glb .has-is-product .unique _ _ = prop!