Chapter 2 mathematical preliminaries
Sets, Relations, and Functions
Sets and Numbers
Standard notation:
- Use for explicit lists or comprehension (e.g., ).
- denotes the empty set.
- denotes set difference (elements in but not in ).
- denotes the size of set .
- is the powerset (set of all subsets) of .
Natural numbers (): The set .
Countable: A set is countable if it has a one-to-one correspondence with .
Relations
n-place relation: An n-ary relation.
Predicate: A one-place (unary) relation on a set .
Written or regarding as a function mapping to truth values.
Binary relation: A two-place relation on sets and .
Often written instead of .
Mixfix syntax: For readability, relations with 3+ places often use symbols separating elements to form the name (e.g., ).
Domain & Codomain:
- Domain (): The set of elements such that for some .
- Codomain/Range (): The set of elements such that for some .
Preservation: A predicate is preserved by a relation if and implies .
Functions
Partial function: A relation where and implies .
- Defined: Written means .
- Undefined: Written or means .
Total function: A partial function where .
Failure: Distinct from divergence.
Formally, a function that may fail maps .
Ordered sets
Properties of binary relations
Given a relation on set :
- Reflexive: for all .
- Symmetric: implies .
- Transitive: and implies .
- Antisymmetric: and implies .
Types of orders
Preorder: A relation that is reflexive and transitive.
- Notation: Often written or .
- Strict inequality (): Means .
Partial order: A preorder that is also antisymmetric.
Total order: A partial order where for every , either or .
Equivalence: A relation that is reflexive, transitive, and symmetric.
Bounds and Closures
Join (Least upper bound ): An element is the join of and if , , and is less than or equal to any other upper bound .
Meet (Greatest lower bound ): An element is the meet of and if , , and is greater than or equal to any other lower bound .
Closures:
- Reflexive closure: The smallest reflexive relation containing .
- Transitive closure (): The smallest transitive relation containing .
- Reflexive and transitive closure (): The smallest relation containing that is both reflexive and transitive.
Chains and well-foundedness
Decreasing chain: A sequence where .
Well-founded: A preorder is well-founded if it contains no infinite decreasing chains.
- Example: Standard order on is well-founded; standard order on integers is not.
Sequences
Notation: Elements are separated by commas (e.g., ).
Cons and Append: The comma serves as both "cons" (adding an element) and "append" (joining sequences).
- Example: If , then is .
Range: abbreviates the sequence from to .
Length: denotes the length of sequence .
Empty sequence: Written as or a blank.
Permutation: A sequence containing the same elements as another, possibly in a different order.
Induction
Induction on natural numbers
Axiom: Principle of ordinary induction
If holds, and for all , then holds for all .
Axiom: Principle of complete induction
If showing is possible assuming for all , then holds for all .
Lexicographic induction
Lexicographic order: On pairs of numbers, iff OR ( and ).
Axiom: Principle of lexicographic induction
If showing is possible assuming for all , then holds for all pairs.
Usage: Generalized to triples, 4-tuples, etc. Useful for nested inductions.
Exercises
Exercise 2.2.6
Problem: Suppose we are given a relation on a set . Define the relation as follows:
That is, contains all the pairs in plus all pairs of the form .
Task: Show that is the reflexive closure of .
Solution
Take to be the reflexive closure of .
By definition:
- is reflexive.
- .
- For any reflexive relation such that , we have .
By the problem statement, is reflexive and .
Therefore, .
Now, it suffices to show that .
Take an element .
- If , then .
- If for some , then because is reflexive.
Therefore, .
In conclusion, or is the reflexive closure of .
Exercise 2.2.7
Problem: Here is a more constructive definition of the transitive closure of a relation . First, we define the following sequence of sets of pairs:
That is, we construct each by adding to all the pairs that can be obtained by "one step of transitivity" from pairs already in . Finally, define the relation as the union of all the : .
Task: Show that this is really the transitive closure of -i.e., that it satisfies the conditions given in Definition 2.2.5.
Problem
Take to be the transitive closure of .
By definition:
is transitive.
.
For any transitive relation such that , we have .
Prove that is transitive
Suppose there exist such that and but .
Because , there exists such that .
Similarly, there exists such that .
Therefore, we have and . Then, . This is a contradiction.
It's obvious that .
Therefore, .
Prove that
It's obvious that .
Suppose for for some .
We will prove that . This is trivial.
By induction, for any .
Therefore, .
In conclusion, .
Exercise 2.2.8
Problem: Suppose is a binary relation on a set and is a predicate on that is preserved by .
Task: Show that is also preserved by (the reflexive and transitive closure of ).
Problem
Because is a predicate on that is preserved by : For any such that , we have .
Take to be the reflexive closure of .
Then, is the transitive closure of .
Assume such that .
If , it's trivial that is preserved.
If but , then . Therefore, is also preserved.
If but , that means for some , with as defined in the previous exercise.
Assume is smallest such number.
must not be , else we would have , a contradiction.
Assume that if then .
We will prove that if then .
By assumption, .
Therefore, there exists such that and .
By the induction hypothesis, we have and .
It follows that, .
By induction, if for any , we have .
This concludes our proof.