Lecture from: 21.10.2024  Video: Videos ETHZ
Partially Ordered Sets (Posets)
Example
The powerset of the set ${a,b,c}$, denoted as $P({a,b,c})$, forms a poset under the subset relation $⊆$.

Reflexivity:
 For any subset $S⊆{a,b,c}$, we need to show that: $S⊆S$
 By the definition of subset, every set is a subset of itself. Therefore, reflexivity holds for all subsets in the powerset.

Antisymmetry:
 Assume $S_{1}$ and $S_{2}$ are subsets of ${a,b,c}$ such that: $S_{1}⊆S_{2}andS_{2}⊆S_{1}$
 This implies that every element of $S_{1}$ is in $S_{2}$, and every element of $S_{2}$ is in $S_{1}$.
 Hence, $S_{1}$ and $S_{2}$ must contain exactly the same elements, which gives: $S_{1}=S_{2}$
 Thus, antisymmetry is satisfied.

Transitivity:
 Assume $S_{1}$, $S_{2}$, and $S_{3}$ are subsets of ${a,b,c}$ such that:$S_{1}⊆S_{2}andS_{2}⊆S_{3}$
 We need to show that:$S_{1}⊆S_{3}$
 By the definition of subset, if every element of $S_{1}$ is in $S_{2}$, and every element of $S_{2}$ is in $S_{3}$, then every element of $S_{1}$ must also be in $S_{3}$. Therefore, we have: $S_{1}⊆S_{3}$
 This confirms that transitivity holds.
Since the powerset $P({a,b,c})$ satisfies reflexivity, antisymmetry, and transitivity, it qualifies as a partially ordered set (poset) under the subset relation $⊆$.
Hasse Diagram
A Hasse diagram is a graphical representation of a partially ordered set (poset) that illustrates the relationships between its elements. In a Hasse diagram, the elements are represented as vertices, and the order relations are depicted as edges connecting these vertices. The diagram is drawn in such a way that if $a⪯b$ (meaning $a$ is less than or equal to $b$), then $a$ is placed lower than $b$ in the diagram.
Example: $(P({a,b,c}),⊆)$
For the poset $(P({a,b,c}),⊆)$, the Hasse diagram can be constructed as follows:
Diagram: The Hasse diagram is structured as follows:
In this diagram:
 The empty set $∅$ is at the bottom since it is a subset of all other sets.
 Each set is positioned above the sets it covers, illustrating the subset relationships.
Example: $({1,2,3,4,6,8,12,24},∣)$
Let us consider the set of all factors of 24, denoted as $S={1,2,3,4,6,8,12,24}$, with the relation of divisibility denoted by $∣$. This relation states that for elements $a$ and $b$ in $S$, we write $a∣b$ if $a$ divides $b$ without a remainder.
The Hasse diagram for this poset can be constructed by placing the elements in a vertical arrangement based on the divisibility relation. The diagram is structured as follows:
In this diagram:
 The number 1 is at the bottom since it divides all other numbers.
 Each number is placed above the numbers that it divides, illustrating the divisibility relationships.
 Lines connect the numbers to indicate direct divisibility, meaning that no other element in the set can be placed between them in the order.
Product of Posets
Let us define two posets and take their cross product.
Given two posets:
 $(A,⪯)$
 $(B,⊑)$
The product poset is defined as: $(A,⪯)×(B,⊑)=(A×B,≤)$
Where the relation $≤$ is defined as follows: $(a_{1},b_{1})≤(a_{2},b_{2})⟺def a_{1}⪯a_{2}∧b_{1}⊑b_{2}$
Explanation
 In this definition, the product poset consists of all ordered pairs formed by taking one element from $A$ and one element from $B$.
 The ordering of these pairs is determined by the individual orderings of the elements in each poset.
 Specifically, the pair $(a_{1},b_{1})$ is less than or equal to the pair $(a_{2},b_{2})$ if the first component $a_{1}$ is related to $a_{2}$ in poset $A$ and the second component $b_{1}$ is related to $b_{2}$ in poset $B$.
This construction allows us to combine the structures of the two posets into a new poset, preserving the order relations of both.
Visualization
Visually, we can imagine taking the cross product of two lines, each with two elements. This results in a diamond shape in the Hasse diagram.
For example, consider two posets:
 $A={a_{1},a_{2}}$
 $B={b_{1},b_{2}}$
The product poset $(A×B,≤)$ consists of the pairs:
${(a_{1},b_{1}),(a_{1},b_{2}),(a_{2},b_{1}),(a_{2},b_{2})}$The Hasse diagram for this product would look like a diamond:
In this diagram:
 Each pair represents an element of the product poset.
 The lines connect pairs according to the defined relation, illustrating how the elements are ordered based on the individual posets.
The Product is a Poset (Theorem 3.12)
Let us denote the two posets as $(A;⪯)$ and $(B;⊑)$. The product poset is defined as:
$(A;⪯)×(B;⊑)=(A×B;≤)$where the relation $≤$ is defined as: $(a_{1},b_{1})≤(a_{2},b_{2})iffa_{1}⪯a_{2}andb_{1}⊑b_{2}.$
We will prove that $(A×B,≤)$ satisfies the properties of a poset: reflexivity, antisymmetry, and transitivity.
Proof:

Reflexivity:
 For every element $(a,b)∈A×B$, we have:
 Since both $(A;⪯)$ and $(B;⊑)$ are posets, reflexivity holds for each individual element. Thus, reflexivity is satisfied for the product poset.

Antisymmetry:
 Assume $(a_{1},b_{1})≤(a_{2},b_{2})$ and $(a_{2},b_{2})≤(a_{1},b_{1})$.
 By definition of the product order, we have:
 From $(a_{1},b_{1})≤(a_{2},b_{2})$:
 From $(a_{2},b_{2})≤(a_{1},b_{1})$:
 Since $a_{1}⪯a_{2}$ and $a_{2}⪯a_{1}$, by the antisymmetry property of $(A;⪯)$, we conclude that $a_{1}=a_{2}$.
 Similarly, from $b_{1}⊑b_{2}$ and $b_{2}⊑b_{1}$, we conclude that $b_{1}=b_{2}$.
 Therefore, we have $(a_{1},b_{1})=(a_{2},b_{2})$, which proves antisymmetry.

Transitivity:
 Assume $(a_{1},b_{1})≤(a_{2},b_{2})$ and $(a_{2},b_{2})≤(a_{3},b_{3})$.
 By definition of the product order, we have:
 From $(a_{1},b_{1})≤(a_{2},b_{2})$:
 From $(a_{2},b_{2})≤(a_{3},b_{3})$:
 By the transitivity property of $(A;⪯)$:
 By the transitivity property of $(B;⊑)$:
 Therefore, we have:
which proves transitivity.
Since we have shown that reflexivity, antisymmetry, and transitivity hold for the relation $≤$ in the product poset $(A×B,≤)$, we conclude that the product of two posets is itself a poset.
Lexicographical Ordering
Lexicographical ordering is a way of ordering pairs of elements from two posets based on their individual orderings.
Given two posets $(A;≺)$ and $(B;⊑)$, we define the relation $≤_{lex}$ on the Cartesian product $A×B$ as follows:
$(a_{1},b_{1})≤_{lex}(a_{2},b_{2})⟺def a_{1}≺a_{2}∨(a_{1}=a_{2}∧b_{1}⊑b_{2}).$This means that the pair $(a_{1},b_{1})$ is less than or equal to the pair $(a_{2},b_{2})$ in lexicographical order if:
 The first element of the first pair, $a_{1}$, is less than the first element of the second pair, $a_{2}$.
 Alternatively, if the first elements are equal ($a_{1}=a_{2}$), then the second element $b_{1}$ must be less than or equal to $b_{2}$ in the poset $(B;⊑)$.
Proof that $≤_{lex}$ is a Poset:
To prove that $(A×B,≤_{lex})$ is a poset, we need to establish the three properties: reflexivity, antisymmetry, and transitivity.

Reflexivity:
 For any $(a,b)∈A×B$, we have:
 This holds true since both $≺$ and $⊑$ are reflexive relations.

Antisymmetry:
 Assume $(a_{1},b_{1})≤_{lex}(a_{2},b_{2})$ and $(a_{2},b_{2})≤_{lex}(a_{1},b_{1})$.
 From the definitions of $≤_{lex}$, we have two cases to consider:
 Case 1: If $a_{1}≺a_{2}$ and $a_{2}≺a_{1}$, then by the antisymmetry property of $≺$, we must have $a_{1}=a_{2}$.
 Case 2: If $a_{1}=a_{2}$ and $b_{1}⊑b_{2}$ and $b_{2}⊑b_{1}$, then by the antisymmetry property of $⊑$, we conclude that $b_{1}=b_{2}$.
 Thus, we have $(a_{1},b_{1})=(a_{2},b_{2})$, proving antisymmetry.

Transitivity:
 Assume $(a_{1},b_{1})≤_{lex}(a_{2},b_{2})$ and $(a_{2},b_{2})≤_{lex}(a_{3},b_{3})$.
 By the definition of $≤_{lex}$, we analyze the possible cases:
 Case 1: If $a_{1}≺a_{2}$ and $a_{2}≺a_{3}$, then by the transitivity property of $≺$, we have $a_{1}≺a_{3}$.
 Case 2: If $a_{1}≺a_{2}$ and $a_{2}=a_{3}$, then we must have $b_{2}⊑b_{3}$, which implies:
 Case 3: If $a_{1}=a_{2}$ and $b_{1}⊑b_{2}$, and $a_{2}≺a_{3}$, then by the transitivity of $≺$ we conclude:
 Case 4: If $a_{1}=a_{2}$ and $b_{1}⊑b_{2}$, and $b_{2}⊑b_{3}$, then we get:
 In all cases, we conclude that:
proving transitivity.
Since we have established reflexivity, antisymmetry, and transitivity for the relation $≤_{lex}$, we conclude that $(A×B,≤_{lex})$ is indeed a poset.
Special Elements in Posets
Let $(A;⪯)$ be a poset, and let $S⊆A$ be some subset of $A$. The following special elements exist:
Minimal and Maximal Elements
 An element $a∈A$ is a minimal element of $A$ if there exists no element $b∈A$ such that $b≺a$.
 An element $a∈A$ is a maximal element of $A$ if there exists no element $b∈A$ such that $a≺b$.
Least and Greatest Elements
 An element $a∈A$ is the least element of $A$ if $a⪯b$ for all $b∈A$.
 An element $a∈A$ is the greatest element of $A$ if $b⪯a$ for all $b∈A$.
Lower and Upper Bounds
 An element $a∈A$ is a lower bound of $S$ if $a⪯b$ for all $b∈S$.
 An element $a∈A$ is an upper bound of $S$ if $b⪯a$ for all $b∈S$.
Greatest Lower Bound and Least Upper Bound
 An element $a∈A$ is the greatest lower bound (also known as the infimum) of $S$ if $a$ is the greatest element of the set of all lower bounds of $S$.
 An element $a∈A$ is the least upper bound (also known as the supremum) of $S$ if $a$ is the least element of the set of all upper bounds of $S$.
Some interesting dualisms or parallels can be observed from these definitions:

Greatest Common Divisor (GCD):
 When we consider a poset on the set of natural numbers using the “divides” relation, the greatest lower bound (or infimum) corresponds to the greatest common divisor (GCD) of two numbers. For example, if we have two numbers $a$ and $b$, the GCD of $a$ and $b$ is the largest number that divides both $a$ and $b$.

Powerset and Set Operations:
 In the case of the powerset, where we consider the subset relationship, the infimum (greatest lower bound) of a collection of sets is represented by the intersection of those sets.
 Conversely, the least upper bound (or supremum) corresponds to the union of the sets. This means that the supremum of a collection of sets is the smallest set that contains all the sets in the collection.
Meet, Join, and Lattices
In the context of partially ordered sets (posets), we can define two important operations known as meet and join:

Meet: The meet of two elements $a$ and $b$ in a poset $(A,⪯)$, denoted as $a∧b$, is defined as the greatest lower bound (infimum) of $a$ and $b$. If $a$ and $b$ have an infimum, we call it their meet. This means that $c=a∧b$ if:
 $c≤a$ and $c≤b$, and
 for any other element $d$ such that $d≤a$ and $d≤b$, it follows that $d≤c$.

Join: The join of two elements $a$ and $b$, denoted as $a∨b$, is defined as the least upper bound (supremum) of $a$ and $b$. If $a$ and $b$ have a supremum, we call it their join. This means that $c=a∨b$ if:
 $a≤c$ and $b≤c$, and
 for any other element $d$ such that $a≤d$ and $b≤d$, it follows that $c≤d$.

Lattice: A poset $(A,⪯)$ in which every pair of elements has both a meet and a join is called a lattice. This means that for any elements $a$ and $b$ in the poset, both $a∧b$ (infimum) and $a∨b$ (supremum) exist within the set.
A lattice is a special type of poset where every pair of elements has both a meet and a join. In other words, for any $a,b∈A$, both $a∧b$ and $a∨b$ exist within the set.
Functions
A function is a special type of relation. A function $f:A→B$ from domain $A$ to codomain $B$ is defined by specific properties:
 For every $a∈A$, there exists a $b∈B$ such that $afb$ (i.e., $f$ is totally defined).
 For all $a∈A$ and for all $b,b_{′}∈B$, if $afb$ and $afb_{′}$, then $b=b_{′}$ (i.e., $f$ is welldefined).
In simpler terms:
 Totally defined: Every point in A maps to a point in B.
 Well defined: Every point in A maps to one and only one point in B.
A function $f$ can be understood as a mapping from $A$ to $B$, assigning to every $a∈A$ a unique element in $B$. This unique element is usually denoted as $f(a)$.
We write $f:A→B$ to indicate the domain and codomain of $f$, and we can define the function using the notation:
$f:a↦"expression ina"$For example, we can define a function as follows:
$f:a↦a_{2}or equivalentlyf:x↦x_{2}.$Injective, Surjective, Bijective
In the context of functions, we often classify them based on their properties of mapping elements between the domain and codomain. These classifications include:

Injective (OnetoOne): A function $f:A→B$ is called injective if for every $a_{1},a_{2}∈A$, whenever $f(a_{1})=f(a_{2})$, it follows that $a_{1}=a_{2}$. In other words, different elements in the domain map to different elements in the codomain.
$Iff(a_{1})=f(a_{2})⇒a_{1}=a_{2}$ 
Surjective (Onto): A function $f:A→B$ is called surjective if for every $b∈B$, there exists at least one $a∈A$ such that $f(a)=b$. This means that the function covers the entire codomain.
$For everyb∈B,∃a∈Asuch thatf(a)=b$ 
Bijective (OnetoOne and Onto): A function $f:A→B$ is called bijective if it is both injective and surjective. This means there is a perfect pairing between the elements of the domain and codomain; each element in the domain maps to a unique element in the codomain, and every element in the codomain is the image of some element in the domain.
$fis bijective if it is both injective and surjective.$
These classifications are essential in understanding the behavior of functions and their inverses.
Functions vs Relations
If we denote a relationship $f$ as $afb$ and state that this relationship is a function (i.e., it is totally defined and welldefined), then we can express it as:
$b=f(a)$In this case, $f$ assigns a unique element $b$ in the codomain to each element $a$ in the domain.
Similarly, if we have another function $g$, we can represent the composition of the functions $f$ and $g$ as:
$g(f(a))$This composition can also be denoted as $f∘g$ (if we look at it from the relation standpoint), which means that we first apply $f$ to $a$ and then apply $g$ to the result. For more details on the composition of relations, see Composition of Relations.
However: It’s common to write $g∘f$ for function compositions, even though this notation might seem illogical. In this case, we interpret $g$ as being applied to the output of $f$, which can sometimes lead to confusion. It’s important to clarify the order of application when discussing function compositions.
Cardinality of Sets and Countability
The concept of cardinality helps us measure the “size” of sets, particularly in distinguishing between countable and uncountable sets.
Definitions:

Equinumerous Sets: Two sets $A$ and $B$ are called equinumerous, denoted $A∼B$, if there exists a bijection (a onetoone and onto function) between $A$ and $B$. This means that both sets have the same cardinality, or the same “number” of elements.

Domination of Sets: A set $B$ dominates a set $A$, denoted $A⪯B$, if there exists an injective (onetoone) function from $A$ to $B$. Equivalently, $A$ is equinumerous with some subset $C$ of $B$. In this case, $B$ has at least as many elements as $A$. In simple terms: each point in A uniquely maps to a point in B, but not all points in B may map to a point in A. i.e B is at least as big as A. $A≺B⟺A⪯BandA≁B$.

Countable Sets: A set $A$ is called countable if there exists an injective function from $A$ to the set of natural numbers $N$, meaning $A⪯N$. If no such function exists, the set is called uncountable.
Countable sets can be either finite or infinite, but the key is that they can be enumerated in some way. In contrast, uncountable sets cannot be fully enumerated, as their size exceeds that of the natural numbers.
Example: Prime Numbers vs Natural Numbers
The set of prime numbers $P={2,3,5,7,11,13,…}$ is countable because we can establish a bijection between the prime numbers and the natural numbers $N$.
A bijection $f:N→P$ can be defined by simply mapping each natural number $n∈N$ to the $n$th prime number. For example:
$f(1)=2,f(2)=3,f(3)=5,f(4)=7,f(5)=11,…$This function is injective (each $n$ maps to a unique prime) and surjective (every prime number appears as an image of some $n$). Therefore, the set of prime numbers $P$ is equinumerous with $N$, proving that the primes are countable.
Example: Integers are Countable
The set of integers $Z={…,−2,−1,0,1,2,…}$ is also countable. We know this because $Z∼N$, meaning the integers are equinumerous with the natural numbers.
A bijection $f:N→Z$ is given by the function:
$f(n)=(−1)_{n}⌈2n ⌉$ $f(0)=(−1)_{0}⌈20 ⌉=0$
 $f(1)=(−1)_{1}⌈21 ⌉=−1$
 $f(2)=(−1)_{2}⌈22 ⌉=1$
 $f(3)=(−1)_{3}⌈23 ⌉=−2$
 $f(4)=(−1)_{4}⌈24 ⌉=2$
This function maps the natural numbers to the integers by alternating between positive and negative values, starting from $0$. It ensures that every integer is paired with exactly one natural number, proving that the set of integers is countable.
Example: $(0,1)∼R$
The goal is to find a bijection between the open interval $(0,1)$ and the set of real numbers $R$. One way to understand this is through a geometric interpretation.
Imagine a line segment on the $xy$plane, starting at $(−1,1)$, passing through $(0,0)$, and ending at $(1,1)$. This line sits at $y=1$, and its $x$coordinates range from $−1$ to $1$.
Now, if we project lines from the point $(1,0)$ to every point on this segment, we can cover all points on the real number line $R$. This geometric mapping can be used to create a bijection between $(0,1)$ and $R$. Each point in $(0,1)$ corresponds uniquely to a point on the real line, ensuring that this projection reaches every real number.
This approach gives us a visual way of understanding the bijection, establishing that $(0,1)$ is equinumerous with $R$, or $(0,1)∼R$.
Example: $N×N∼N$
The Cartesian product $N×N$ represents the set of all ordered pairs of natural numbers, i.e., ${(a,b)∣a,b∈N}$. Even though $N×N$ seems “larger” than $N$, we can demonstrate that it is actually countable and has the same cardinality as $N$, i.e., $N×N∼N$.
To show this, we need to find a bijection between $N×N$ and $N$. One way to achieve this is by using a diagonalization argument (also known as Cantor’s pairing function).
Cantor’s Pairing Function
Cantor’s pairing function is a bijection $f:N×N→N$ that maps each pair $(a,b)$ of natural numbers to a single natural number. The function is defined as:
$f(a,b)=2(a+b)(a+b+1) +b$This function ensures that every pair of natural numbers $(a,b)$ is associated with a unique natural number. Here’s how the mapping works:
 $f(0,0)=0$
 $f(0,1)=2$
 $f(1,0)=1$
 $f(1,1)=4$
 $f(2,0)=3$, etc.
Imagine arranging the pairs $(a,b)$ in a grid, where $a$ corresponds to the row and $b$ to the column. By following a diagonal traversal of this grid, we can systematically list all pairs in a sequence that corresponds to a natural number, proving that $N×N$ is countable.
Thus, $N×N∼N$, showing that the product of two countably infinite sets is itself countably infinite.
Continue here: 11 Functions, Relations, Cardinality, Countability, Cantor’s Diagonalization Argument