Sets, Relations, and Functions
- Sets, Relations, and Functions
- Sets and Operations on Sets
- Relations
- Equivalence Relations
- Partial Order Relations
- Functions
- Countable and Uncountable Sets
Sets, Relations, and Functions
Sets and Operations on Sets
π‘ The number of elements of a finite set is called its cardinality and is denoted .
π‘
π For any and , .
π‘ The set is a subset of the set , denoted , if every element of is also an element of , i.e.,
π‘ .
π‘ . (transitivity of )
π‘ A set is called empty if it contains no elements and is ofent denoted as or . In other words, .
π There is only one empty set.
π The emtpy set is a subset of every set, i.e., .
π‘ The power set of a set , denoted , is the set of all subsets of :
π‘ The union of two sets and is defined as
and their intersection is defined as
π‘ For a given universe , the complement of a set , denoted , is
or simply .
π‘ The difference of sets and , denoted is the set of elements of without those that are elements of :
π For any sets , and , the following laws hold:
Idempotence: and
Commutativity: and
Associativity: and
Distributivity: and
Consistency:
π‘ The Cartesian product of two sets and is the set of all ordered pairs with the first component from and the second component from :
Relations
π‘ A (binary) relation from a set to a set (also called an -relation) is a subset of . If , then is called a relation on .
π‘ Instead of one usually writes
and sometimes we write if .
π‘ For any set , the identity relation on , denoted (or ), is the relation .
π‘ The inverse of a relation from to is the relation from to defined by
π‘ Let be a relation from to and let be a relation from to . Then the composition of and , denoted (or also ), is the relation from to defined by
The -fold composition of a relation on a set with itself is denoted .
π The composition of relations is associative, i.e., we have .
π Let be a relation from to and let be a relation from to . Then the inverse of is the relation .
π‘ A relation on a set is called reflexive if
is true for all , i.e., if
π‘ A relation on a set is called irreflexive if for all , i.e., if .
π‘ A relation on a set is called symmetric if
is true for all , i.e., if
π‘ A relation on a set is called antisymmetric if
is true for all , i.e., if
π‘ A relation on a set is called transitive if
is true for all .
π A relation is transitive if and only if .
π‘ The transitive closure of a relation on a set , denoted , is
Equivalence Relations
π‘ An equivalence relation is a relation on a set that is reflexive, symmetric and transitive.
π‘ For an equivalence relation on a set and for , the set of elements of that are equivalent to is called the equivalence class of and is denoted as :
π The intersection of two equivalence relations is an equivalence relation.
π‘ A partition of a set is a set of mutually disjoint subsets of that cover , i.e., a set of sets (for some index set ) satisfying
π‘ The set of equivalence classes of an equivalence relation , denoted by
is called the quotient set of by , or simply modulo , or .
π The set of equivalence classes of an equivalence relation on is a partition of .
Partial Order Relations
π‘ A partial order (or simply an order relation) on a set is a relation that is reflexive, antisymmetric, and transitive. A set together with a partial order on is called a partially ordered set (or simply poset) and is denoted as .
π‘ For a poset , two elements and are called comparable if or ; otherwise they are called incomparable.
π‘ If any two elements of a poset are comparable, then is called totally ordered (or linearly ordered) by .
π‘ In a poset an element is said to cover an element if and there exists no with and (i.e., between and ).
π‘ The Hasse diagram of a (finite) poset is the directed graph whose vertices are labeled with the elements of and where there is an edge from to if and only if covers .
π‘ For given posets and , their direct product, denoted , is the set with the relation (on ) defined by
π is a partial order relation.*
π For given posets and , the relation defined on by
is a partial order relation.
π‘ The relation is the so-called lexicographic order of pairs, usually considered when both posets are identical. The lexicographic order is useful because if both and are totally ordered (eq. the alphabetical order of the letters), then so is the lexicographic order on .
π‘ Let be a poset, and let be some subset of A. Then
- is a minimal (maximal) element of if there exists no with ().
- is the least (greatest) element of if () for all .
- is a lower (upper) bound of if () for all .
- is the greatest lower bound (least upper bound) of if is the greatest (least) element of the set of all lower (upper) bounds of .
π‘ A poset is well-ordered if it is totally ordered and if every non-empty subset of has a least element.
π‘ Let be a poset. If and (i.e., the set ) have a greatest lower bound, then it is called the meet of and , often denoted as . If and have a least upper bound, then it is called the join of and , often denoted .
π‘ A poset in which every pair of elements has a meet and a join is called a lattice.
Functions
π‘ A function from a domain to a codomain is a relation from to with the special properties (using the relation notation ):
- ( is totally defined)
- ( is well-defined).
π‘ The set of all functions is denoted as .
π‘ A partial function is a relation from to such that condition 2. above holds.
π‘ For a function and a subset of , the image of under , denoted , is the set
π‘ The subset of is called the image (or range) of and is also denoted .
π‘ For a subset of , the preimage of , denoted , is the set of values in that map into :
π‘ A function is called
- injective (or one-to-one or an injection) if for we have , i.e., no two distinct values are mapped to the same function value (there are no βcollisionsβ).
- surjective (or onto) if , i.e., if for every for some (every value in the codomain is taken on for some argument).
- bijective (or a bijection) if it is both injective or surjective.
π‘ For a bijective function , the inverse relation is called the inverse function of , usually denoted as .
π‘ A function between two finite sets of equal cardinality is injective if and only if it is surjective.
π‘ The composition of a function and a function , denoted by or simply , is defined by .
π Function composition is associative, i.e., .
π‘ A function is idempotent if for all
Countable and Uncountable Sets
π‘ Countability of Sets:
- Two sets amd are equinumerous, denoted , if there exists a bijection .
- The set dominates the set , denoted , if for some subset or, equivalently, if there exists an injective function .
- A set is called countable if , and uncountable otherwise.
π Transitivity:
- The relation is transitive: .
- .
π Bernstein-SchrΓΆder Theorem:
π A set is countable if and only if it is finite or if .
π The set of finite binary sequences is countable.
π The set () of ordered pairs of natural numbers is countable.
π The Cartesian product of two countable sets and is countable, i.e., .
π The rational numbers are countable.
π Let and for be countable sets.
- For any , the set of -tuples over is countable.
- The union of a countable list of countable sets is countable.
- The set of finite sequences of elements from is countable.
π‘ Let denote the set of semi-infinite binary sequences.
π The set is uncountable.
π‘ A function is called computable if there is a program that, for every , when given as input, outputs .
π There are uncomputable functions .