module Order.Diagram.Join whereJoinsđ
In the binary case, a least upper bound is called a join. A short computation shows that being a join is precisely being the lub of a family of two elements.
record is-join (P : Poset o â) (a b lub : â P â) : Type (o â â) where
no-eta-equality
open Poset P
field
lâ€join : a †lub
râ€join : b †lub
least : (ub' : Ob) â a †ub' â b †ub' â lub †ub'
record Join (P : Poset o â) (a b : â P â) : Type (o â â) where
no-eta-equality
field
lub : â P â
has-join : is-join P a b lub
open is-join has-join public
Has-joins : Poset o â â Type (o â â)
Has-joins P = â x y â Join P x y
open is-join is-joinâis-lub : â {a b lub} â is-join P a b lub â is-lub P (if_then a else b) lub
is-joinâis-lub join .famâ€lub true = join .lâ€join
is-joinâis-lub join .famâ€lub false = join .râ€join
is-joinâis-lub join .least ub' x = join .least ub' (x true) (x false)
is-lubâis-join : â {a b lub} â is-lub P (if_then a else b) lub â is-join P a b lub
is-lubâis-join lub .lâ€join = lub .famâ€lub true
is-lubâis-join lub .râ€join = lub .famâ€lub false
is-lubâis-join lub .least ub' a<ub' b<ub' = lub .least ub' λ where
true â a<ub'
false â b<ub'An important lemma about joins is that, if then the least upper bound of and is just
gtâis-join : â {a b} â a †b â is-join P a b b
gtâis-join aâ€b .lâ€join = aâ€b
gtâis-join aâ€b .râ€join = â€-refl
gtâis-join aâ€b .least ub' _ bâ€ub' = bâ€ub'
gt-join : â {a b l} â a †b â is-join P a b l â b ⥠l
gt-join aâ€b l = join-unique (gtâis-join aâ€b) lAs coproductsđ
Joins are the âthinningâ of coproducts; Put another way, when we allow a set of relators, rather than insisting on a propositional relation, the concept of join needs to be refined to that of coproduct.
open is-coproduct
open Coproduct
is-joinâcoproduct : â {a b lub : Ob} â is-join P a b lub â Coproduct (posetâcategory P) a b
is-joinâcoproduct lub .coapex = _
is-joinâcoproduct lub .Îčâ = lub .is-join.lâ€join
is-joinâcoproduct lub .Îčâ = lub .is-join.râ€join
is-joinâcoproduct lub .has-is-coproduct .[_,_] a<q b<q =
lub .is-join.least _ a<q b<q
is-joinâcoproduct lub .has-is-coproduct .[]âÎčâ = prop!
is-joinâcoproduct lub .has-is-coproduct .[]âÎčâ = prop!
is-joinâcoproduct lub .has-is-coproduct .unique _ _ = prop!