# Lecture 016

## Equivalence

### Fundamental Theorem of Equivalence Relations

Definition: Left S be a nonempty set

1. if R is equivalence relation on S, then S/R forms a partition of S
1. if F is a partition of S, then there exists an equivalence relation R on S such that S/R = F

Proof: 1. Homework 2. Let $F = \{S_i\}_{i\in I}$ be a partition of S. Define relation R on S By $(x, y) \in R \iff (\exists i \in I)(x \in S_i \land y \in S_i)$ - WTS R is equivalence relation and $S/R = F$ - Reflexive: $x \in S_i$ for some $i \in I$. Therefore $(x,x)\in R$ - Symmetric: Let $x, y \in S \land (x, y) \in R$. Then $x \in S_i \land y \in S_i$ (meaning they are in the same partition). Then $(y, x) \in R$ because conjunction is commutative. - Transitive: Let $x, y, z \in S \land (\exists i,j \in I)((x \in S_i \land y \in S_i)\land (y\in S_j \land z \in S_j))$ Because partition, $i = j$ must hold. Thus $x \in S_i \land z \in S_i$ and $(x, z) \in R$. - Show $S/R = F$ by double containment. - $[x]_R = \{y\in R | y \in S_i \}$ for precisely one $i \in I$, since $[x]_R = \{y\ \in S | y \in S_i\} = S_i$, (x\in S_i is not here because we already defined) therefore $[x]_R \in F$. - Let $S_i \in F$. Since partition, $S_i \neq \emptyset$. Fix $x \in S_i$, then for $i \neq j$, $S \notin S_j$. Then $[x]_R = \{y \in S | y \in S_i \}$ since $[x]_R = \{y\ \in S | y \in S_i\} = S_i$ (x\in S_i is not here because we already defined), therefore $S_i \in S/R$.

### Partition

Definition

• $(\forall [x]_R \in S/R)([x]_R \neq \emptyset)$

• $(\forall [x]_R, [y]_R \in S/R)([x]_R \neq [y]_R \implies [x]_R \cup [y]_R = \emptyset)$

• $\bigcup_{[x]_R \in S/R} [x]_R = S$

## Functions

Definition: Let A and B be set and let f be a binary relation between A and B. Then f is a function from A to B iff $(\forall a \in A)(\exists b \in B)(a, b \in f)$. And b exists for exactly 1 time. b = f(a)

• if $f:A \to B$, then A is the domain of f and B is codomain of f

• if $f \subseteq A \times B$, then A is the domain of f and B is codomain of f

Identity function: Let S be any set. We define identity function on S, denoted Ids (or Id) is the domain is clear from context. by $Id_S: S \to S \text{ s.t. } (\forall x \in S)(Id_S(x) = x)$ (Meaning that the identity function maps each element to itself)

Ill-defined: $f: \mathbb{Q} \to \mathbb{Z}$ by $f(\frac{p}{q} = p+q)$. Then one value is mapped to two different values. That's not a function.

Well-defined: A mapping $f: A \to B$ is a well-defined function iff f satisfy:

• $(\forall a \in A)(\exists b \in B)(f(a) = b)$

• $(\forall a, a' \in A)(a=a' \implies f(a)=f(a'))$

Function Equality: Let A and B be sets and $f : A\to B, g:A\to B$ be functions. f = g iff $(\forall a \in A)(f(a) = g(a))$. (since it's based on set equality, different rule may produce the same function)

• Example: $A = \{1, 2, 3\}, f:A\to \mathbb{Z}, g:A\to \mathbb{Z}$ by $f(x) = x^3-x^2-6 \land g(x) = 5x^2-11x$.

Table of Content