<<

Partial Orders — Basics

Edward A. Lee UC Berkeley — EECS EECS 219D — Concurrent Models of Computation Last updated: January 23, 2014 Outline

Sets Join (Least Upper Bound) Relations and Functions Meet (Greatest Lower Bound) Notation Example of Directed Sets, Bottom Partial Order What is Order? Strict Partial Order Complete Partial Order Chains and Total Orders Alternative Definition Quiz Example Partial Orders — Basics

Sets

Frequently used sets:

• B = {0, 1}, the of binary digits.

• T = {false, true}, the set of truth values.

• N = {0, 1, 2, ···}, the set of natural numbers.

• Z = {· · · , −1, 0, 1, 2, ···}, the set of .

• R, the set of real numbers.

• R+, the set of non-negative real numbers.

Edward A. Lee | UC Berkeley — EECS3/32 Partial Orders — Basics

Relations and Functions

• A binary from A to B is a of A × B.

• A partial f from A to B is a relation where (a, b) ∈ f and (a, b0) ∈ f =⇒ b = b0. Such a is written f : A*B.

• A total function or just function f from A to B is a partial function where for all a ∈ A, there is a b ∈ B such that (a, b) ∈ f.

Edward A. Lee | UC Berkeley — EECS4/32 Partial Orders — Basics

Notation • A : R ⊆ A × B.

• Infix notation: (a, b) ∈ R is written aRb.

• A symbol for a relation:

• ≤⊂ N × N • (a, b) ∈≤ is written a ≤ b.

• A function is written f : A → B, and the A is called its domain and the B its codomain. Rather than writing (a, b) ∈ f, we can equivalently write f(a) = b.

Edward A. Lee | UC Berkeley — EECS5/32 Partial Orders — Basics

Partial Order

A partial order on a set A is a relation from A to A satisfying the following properties. For all a, b, c ∈ A, the relation is

1. reflexive: a ≤ a

2. antisymmetric: a ≤ b and b ≤ a implies that a = b.

3. transitive: a ≤ b and b ≤ c implies that a ≤ c.

A or poset is (A, ≤), or (A, ≤A).

Edward A. Lee | UC Berkeley — EECS6/32 Partial Orders — Basics

What is Order? • 0 < 1 • 1 < ∞ • child < parent • child > parent • 11,000/3,501 is a better approximation to p than 22/7 • n is a of integer m. • Set A is a subset of set B. • I know more about x than about y.

Which of these are partial orders?

Edward A. Lee | UC Berkeley — EECS7/32 Partial Orders — Basics

Strict Partial Order

A poset (A, ≤) induces another relation < called the strict partial order relation: ∀ a, a0 ∈ A, a < a0 ⇔ a ≤ a0 and a 6= a0 . (A, <) is called a strict poset.

Edward A. Lee | UC Berkeley — EECS8/32 Partial Orders — Basics

Chains and Total Orders

1. If a, a0 ∈ A satisfy either a ≤ a0 or a0 ≤ a, then a and a0 are comparable. Otherwise, they are incomparable.

2. A chain C ⊆ A is a subset of a poset (A, ≤) where any two members of the subset are comparable.

3.A is a poset (A, ≤) where A itself is a chain.

Edward A. Lee | UC Berkeley — EECS9/32 Partial Orders — Basics

Quiz

1. Is the set of integers with the usual numerical ordering a well-ordered set? (A well-ordered set is a set where every non-empty subset has a least .)

2. Given a set A and its powerset (set of all ) ℘(A), is (℘(A), ⊆) a poset? A chain?

3. For A = {a, b, c} (an alphabet), find a well-ordered subset of (℘(A), ⊆).

Edward A. Lee | UC Berkeley — EECS 10/32 Partial Orders — Basics

Quiz 1. Is the set of integers with the usual numerical ordering a well-ordered set? No. The set itself is a chain with no least element.

2. Given a set A and its powerset (set of all subsets) ℘(A), is (℘(A), ⊆) a poset? A chain? It is a poset, but not a chain.

3. For A = {a, b, c} (an alphabet), find a well-ordered subset of (℘(A), ⊆). One possibility: {∅, {a}, {a, b}, {a, b, c}}.

Edward A. Lee | UC Berkeley — EECS 11/32 Partial Orders — Basics

Join (Least Upper Bound)

• Given a poset (A, ≤) and a subset B ⊆ A, an upper bound of B, if it exists, is an element a ∈ A such that for all b ∈ B, b ≤ a.

• A least upper bound or LUB, if it exists, is an upper bound a such that for all other upper bounds a0 we have a ≤ a0.

• If a set B ⊆ A has a least upper bound in the poset (A, ≤), then it is said to be joinable in (A, ≤).

• The LUB is called the of B and written W B.

Edward A. Lee | UC Berkeley — EECS 12/32 Partial Orders — Basics

Meet (Greatest Lower Bound)

• Given a poset (A, ≤) and a subset B ⊆ A, a lower bound of B, if it exists, is an element a ∈ A such that for all b ∈ B, a ≤ b.

• A greatest lower bound or GLB, if it exists, is a lower bound a such that for all other lower bounds a0 we have a0 ≤ a.

• If a set B ⊆ A has a GLB in the poset (A, ≤), the GLB is called the meet of B, written V B.

Edward A. Lee | UC Berkeley — EECS 13/32 Partial Orders — Basics

Example of Join and Meet

Given a set A and a poset (℘(A), ⊆), then for any B ⊆ ℘(A),

• W B = ∪B (the of subsets)

• V B = ∩B (the intersection of subsets)

Edward A. Lee | UC Berkeley — EECS 14/32 Partial Orders — Basics

Directed Sets, Bottom

• A nonempty subset D ⊆ A of poset (A, ≤) is a if every pair of elements in D has an upper bound in D.

• Equivalently, D is directed if every non-empty finite subset of D is joinable in D.

V • A pointed poset has a bottom element, often written ⊥A = A ∈ A, or simply ⊥.

Edward A. Lee | UC Berkeley — EECS 15/32 Partial Orders — Basics

Complete Partial Order

A complete partial order or CPO (A, ≤) is a pointed poset where every directed subset is joinable in A.

Examples:

• Every finite pointed poset is a CPO.

• (N, ≤) is not a CPO.

• (N ∪ {∞}, ≤) is a CPO.

Edward A. Lee | UC Berkeley — EECS 16/32 Partial Orders — Basics

Complete Partial Order Alternative Definition

A complete partial order or CPO (A, ≤) is a pointed poset where every chain has a LUB in A.

The equivalence of this definition is not trivial. See Davey and Priestly (2002), theorem 8.11.

The equivalence is trivial for some posets, where every directed set is a chain, such a prefix orders, which we will look at later.

Quiz: Is a pointed poset A where every chain is finite always a CPO?

Edward A. Lee | UC Berkeley — EECS 17/32 Partial Orders — Basics

Complete Partial Order Alternative Definition

A complete partial order or CPO (A, ≤) is a pointed poset where every chain has a LUB in A.

The equivalence of this definition is not trivial. See Davey and Priestly (2002), theorem 8.11.

The equivalence is trivial for some posets, where every directed set is a chain, such a prefix orders, which we will look at later.

Quiz: Is a pointed poset A where every chain is finite always a CPO? Yes

Edward A. Lee | UC Berkeley — EECS 18/32 Partial Orders — Basics

Example

Hasse diagram of a poset (A, ≤) where

A = {⊥, a, b, c, d, e, f, g, h}

Quiz: Is this a CPO?

Edward A. Lee | UC Berkeley — EECS 19/32 Partial Orders — Basics

Example

Hasse diagram of a poset (A, ≤) where

A = {⊥, a, b, c, d, e, f, g, h}

Quiz: Is this a CPO? Yes. Pointed and finite.

Edward A. Lee | UC Berkeley — EECS 20/32 Partial Orders — Basics

Example

Quiz: Is A well ordered?

Edward A. Lee | UC Berkeley — EECS 21/32 Partial Orders — Basics

Example

Quiz: Is A well ordered? No. E.g., D = {e, f} has no least element.

Edward A. Lee | UC Berkeley — EECS 22/32 Partial Orders — Basics

Example

Quiz: Does every pair of elements of A have a GLB?

Edward A. Lee | UC Berkeley — EECS 23/32 Partial Orders — Basics

Example

Quiz: Does every pair of elements of A have a GLB? Yes. Such a poset is a lower .

Edward A. Lee | UC Berkeley — EECS 24/32 Partial Orders — Basics

Example

Quiz: Does every pair of elements of A have a LUB?

Edward A. Lee | UC Berkeley — EECS 25/32 Partial Orders — Basics

Example

Quiz: Does every pair of elements of A have a GLB? No. Such a poset would be an upper semilattice. If it is both a lower and upper semilattice, then it is a .

Edward A. Lee | UC Berkeley — EECS 26/32 Partial Orders — Basics

Example

Quiz: Is D = {e, f} joinable in A?

Edward A. Lee | UC Berkeley — EECS 27/32 Partial Orders — Basics

Example

Quiz: Is D = {e, f} joinable in A? Yes. W D = a.

Edward A. Lee | UC Berkeley — EECS 28/32 Partial Orders — Basics

Example

Quiz: Is D = {e, f} joinable in D?

Edward A. Lee | UC Berkeley — EECS 29/32 Partial Orders — Basics

Example

Quiz: Is D = {e, f} joinable in D? No. No upper bound in D, so no least upper bound.

Edward A. Lee | UC Berkeley — EECS 30/32 Partial Orders — Basics

References

Davey, B. A. and H. A. Priestly, 2002: Introduction to Lattices and Order. Cambridge University Press, 2nd ed.

Edward A. Lee | UC Berkeley — EECS 31/32 Questions?