Definition: The domain of a relation R on sets S and T, written dom(R), is the set of elements s∈S such that (s,t)∈R for some t
Definition: The codomain or range of R , written range(R) is the set of elements t∈T such that (s,t)∈R for some s.
Definition: A relation R on sets S and T is called a partial function from S to T if, whenever (s,t1)∈R and (s,t2)∈R, we have t1=t2.
- in addition, if dom(R)=S then R is called a total function.
Definition: A partial function R from S to T is said to be defined on an argument s∈S if s∈dom(R) and undefined otherwise.
- we write f(x)=↑ to mean f is undefined on x
- we write f(x)=↓ to mean f is defined on x
We will also need to define functions that may fail on some inputs. It is important to distinguish failure (which is a legitimate, observable result) from divergence. (怎么没解释什么是 divergence 啊...
Definition: Suppose R is a binary relation on a set S and P is a predicate on S. We say that P is preserved by R if whenever we have sRs′ and P(s) we also have P(s′)
Definition: A binary relation R on a set S
- reflexive if R relates every element of S to itself - that is, sRs
- transitive sRt and tRu together implies sRu
- s ymmetric if sRt implies tRs
- antisymmetric sRt and tRs together implies s=t
Definition: A reflexive, transitive, and symmetric relation on a set S is called an equivalence on S.
Definition: A reflexive and transitive relation R on a set S is called a preorder on S.
- preorders are usually written using symbols like ≤. We write s<t (s is strictly less than t) to mean s≤t∧s=t.
Definition: A preorder (on a set S) that is also antisymmetric is called a partial order on S.
Definition: A partial order ≤ is called a total order if it also has the property that, for each s and t in S, either s≤t or t≤s.
Definition: Suppose R is a binary relation on a set S.
- The reflexive closure of R is the smallest reflexive relation R′ that contains R.
- The transitive closure of R is the smallest transitive relation R+ that contains R.
- The reflexive and transitive closure of R is the smallest reflexive and transitive relation R∗ that contains R.
Definition: Suppose we have a set S with a preorder ≤. We say that ≤ is well founded if it contains no infinite decreasing chains.
- For example, the usual order on the natural numbers, with 0<1<2<3<… is well founded, but the same order on the integers, ⋯<−3<−2<−1<0<1<2<3<… is not. (好像意思虽然序列的长度不是有界的,但是自然数下的这个关系,从任何元素开始,最小只能小到 0,而整数上的可以无限小下去?