13. 2.1.7 Domain, Range
S T R
.
.
.domain
.
dom(R) = { s ∈ S | (s, t) ∈ R }
..
. .
.
.
range (codomain) .
..
range(R) = { t ∈ T | (s, t) ∈ R }
..
. .
.
() TaPL #2 2012 2 18 13 / 34
14. 2.1.8 Partial Function, Total
Function
.
partial function .
..
s ∈ S, t1 ∈ T, t2 ∈ T, (s, t1 ) ∈ R, (s, t2 ) ∈ R
t1 = t2 R S T partial
function
..
. .
.
.
.
.total function
.
partial function dom(R) = S R S
.. T total function function
. .
.
() TaPL #2 2012 2 18 14 / 34
15. 2.1.9 Defined, Undefined
.
.
.defined
.
S T partial function R s∈S
s∈R R s defined
defined undefined
f (χ) ↑ f (χ) =↑ f χ undefined
.. (χ) ↓
f
.
defined
.
.
( )
exception from S to T ∪ {f ail}
() TaPL #2 2012 2 18 15 / 34
16. 2.1.10 Preserved
.
preserved .
..
binary relation R S predicate P
sRs P (s) P (s ) P R
.. preserved
. .
.
() TaPL #2 2012 2 18 16 / 34
17. 2.2.1 Property of Binary Relation
S binary relation R
.
.
.reflexive
.
∀s∈S . sRs
..
. .
.
.
symmetric .
..
∀ s, t ∈ S . s R t → t R s
..
. .
.
.
.
.transitive
.
∀
.. s, t, u ∈ S . s R t ∧ t R u → s R u
. .
.
.
antisymmetric .
..
∀ s, t ∈ S . s R t ∧ t R s → s = t
..
. .
.
() TaPL #2 2012 2 18 17 / 34
18. 2.2.2 Preorder, Partial Order, Total
Order
.
preorder .
..
preorder R reflexive transitive preorder R
≤
preorderd set S S preorder R
..
. .
.
< s≤t∧s=t
() TaPL #2 2012 2 18 18 / 34
19. 2.2.2 Preorder, Partial Order, Total
Order
.
partial order .
..
partial order
.. preorder antisymmetric
. .
.
.
.
.total order
.
total order
.. partial order ∀ s, t ∈ S . s ≤ t ∨ t ≤ s
. .
.
() TaPL #2 2012 2 18 19 / 34
20. 2.2.3 Join, Meet
≤ S partial order s∈S t∈S
.
join least upper bound .
..
j∈S s t join
...
1 s≤j∧t≤j
.. ..
2. ∀ k ∈S . s≤k∧t≤k∧j ≤k
. .
.
.
meet greatest lower bound .
..
m∈S s t meet
...
1 m≤s∧m≤t
.. ...
.
2 ∀ n∈S . n≤s∧n≤t∧n≤m
.
.
() TaPL #2 2012 2 18 20 / 34
21. 2.2.4 Equivalence
.
equivalence .
..
S R equivalence R reflexive
transitive symmetric
..
. .
.
() TaPL #2 2012 2 18 21 / 34
22. 2.2.5
.
.
.reflexive closure
.
R
.. reflexive R
. .
.
.
.
.transitive closure
.
R
.. transitive R R+
. .
.
.
.
.reflexive and transitive closure
.
R
.. reflexive transitive R∗
. .
.
R∈R R ∀
Ri ∈ R . R ⊆ Ri
() TaPL #2 2012 2 18 22 / 34
23. 2.2.6 Exercise 2.2.6
S R R
R = R ∪ { (s, s) | s ∈ S }
R R reflexive closure
() TaPL #2 2012 2 18 23 / 34
24. 2.2.7 Exercise 2.2.7 -more
constructive definition of transitive
closure-
Ri
R0 = R
Ri+1 = Ri ∪ { (s, u) | ∃t ∈ R.(s, t) ∈ Ri ∧ (t, u) ∈ Ri }
R+ = Ri
i
() TaPL #2 2012 2 18 24 / 34
25. 2.2.8 Exercise 2.2.8
S binary relation R R preserved S
predicate P P R∗
preserved
() TaPL #2 2012 2 18 25 / 34
26. 2.2.9 Decreasing Chain
.
S preorder ≤ .
si ∈ S ∀ i ∈ N . si+1 < si
s1 , s2 , s3 , . . .
.. ≤ decreasing chain
. .
.
ex. ”5, 4, 3, 2, 1”
() TaPL #2 2012 2 18 26 / 34
27. 2.2.10 Well Founded
.
S preorder ≤ .
leq decresing chain ≤ well
founded
..
. .
.
ex.N < well founded
(0 < 1 < 2 < . . . )
ex.R not well founded
(· · · < −1 < 0 < 1 < . . . )
() TaPL #2 2012 2 18 27 / 34