module Order.Diagram.Lub where
Least upper bounds🔗
A lub (short for least upper bound) for a family of elements is, as the name implies, a least elemnet among the upper boudns of the Being an upper bound means that we have for all Being the least upper bound means that if we’re given some other satisfying (for each then we have
The same observation about the naming of glbs vs meets applies to lubs, with the binary name being join.
record is-lub
{ℓᵢ} {I : Type ℓᵢ} (F : I → Ob) (lub : Ob)
: Type (o ⊔ ℓ ⊔ ℓᵢ)
where
no-eta-equality
field
: ∀ i → F i ≤ lub
fam≤lub : (ub' : Ob) → (∀ i → F i ≤ ub') → lub ≤ ub'
least
record Lub {ℓᵢ} {I : Type ℓᵢ} (F : I → Ob) : Type (o ⊔ ℓ ⊔ ℓᵢ) where
no-eta-equality
field
: Ob
lub : is-lub F lub
has-lub open is-lub has-lub public
Let be a family. If there is some such that for all then is the least upper bound of
fam-bound→is-lub: ∀ {ℓᵢ} {I : Type ℓᵢ} {F : I → Ob}
→ (i : I) → (∀ j → F j ≤ F i)
→ is-lub P F (F i)
.fam≤lub = ge
fam-bound→is-lub i ge .least y le = le i fam-bound→is-lub i ge
If is the least upper bound of a constant family, then must be equal to every member of the family.
lub-of-const-fam: ∀ {ℓᵢ} {I : Type ℓᵢ} {F : I → Ob} {x}
→ (∀ i j → F i ≡ F j)
→ is-lub P F x
→ ∀ i → F i ≡ x
{F = F} is-const x-lub i =
lub-of-const-fam
≤-antisym(fam≤lub x-lub i)
(least x-lub (F i) λ j → ≤-refl' (sym (is-const i j)))
Furthermore, if is a constant family and is merely inhabited, then has a least upper bound.
const-inhabited-fam→is-lub: ∀ {ℓᵢ} {I : Type ℓᵢ} {F : I → Ob} {x}
→ (∀ i → F i ≡ x)
→ ∥ I ∥
→ is-lub P F x
{I = I} {F = F} {x = x} is-const =
const-inhabited-fam→is-lub where
rec! mk-is-lub : I → is-lub P F x
mk-is-lub .is-lub.fam≤lub j = ≤-refl' (is-const j)
mk-is-lub i .is-lub.least y le =
mk-is-lub i
x =˘⟨ is-const i ⟩
F i ≤⟨ le i ⟩
y ≤∎
const-inhabited-fam→lub: ∀ {ℓᵢ} {I : Type ℓᵢ} {F : I → Ob}
→ (∀ i j → F i ≡ F j)
→ ∥ I ∥
→ Lub P F
{I = I} {F = F} is-const =
const-inhabited-fam→lub where
rec! mk-lub : I → Lub P F
mk-lub .Lub.lub = F i
mk-lub i .Lub.has-lub =
mk-lub i (λ j → is-const j i) (inc i) const-inhabited-fam→is-lub