diff --git a/docs/1b/ece108.md b/docs/1b/ece108.md index fbece62..1b2dc58 100644 --- a/docs/1b/ece108.md +++ b/docs/1b/ece108.md @@ -407,7 +407,7 @@ $$[a,b)=\{x\in\mathcal U|a\leq x\wedge x|a\in A, b\in B,\dots,z\in Z\}$$ + +### Powersets + +!!! definition + - An **index set** $I$ is the set containing all relevant indices. + +A **partition** of a set $S$ is a set of **disjoint** sets that create the original set when unioned. + +$$S=\bigcup_{i\in I}A_i$$ + +!!! example + $\{\{1\},\{2,3\},\{4,\dots\}\}$ is a partition of $\mathbb N$. + +A **powerset** of a set $A$ is the set of all possible subsets of that set. + +$$\mathcal P(A)=\{X|X\subseteq A\}$$ + +The empty set is the subset of every set so is part of each powerset. The number of elements in a subset is equal to the the number of elements in the original set as a power of two. + +$$\dim(\mathcal P(A))=2^{\dim(A)}$$ + +!!! example + - $\mathcal P(\empty)=\empty$ + - $\mathcal P(\{1,2\})=\{\empty, \{1\}, \{2\}, \{1, 2\}\}$ + +By definition, any subset is an element in the powerset. + +$$A\subseteq B\equiv A\in\mathcal P(B)$$ + +- $\empty\in\mathcal P(A)$ +- $A\in\mathcal P(A)$ +- $A\subseteq B\implies (\mathcal P(A)\subseteq \mathcal P(B))$ +- $A\in C\implies (C-A\subseteq C)$ + +!!! example + To prove $A\subseteq B\implies \mathcalP(A)\subseteq \mathcal P(B)$: + + **Proof:** Let $A\subseteq B$ and $X\in\mathcal P(A)$. By definition, since $X\in\mathcal P(A), X\subseteq A$. Since $A\subseteq B$, it follows that $X\subseteq B$. Thus by the definition of the powerset, $X\in\mathcal P(B)$. + +## Functions + +!!! definition + - A **surjective** function has an equal codomain and range. + +A **function** a relation between two sets $f:X\to Y$ such that each $x\in X$ **maps to** a unique $f(x)\in Y$. + +$$ +\begin{align*} +f:\ &X\to Y \\ +&x\longmapsto f(x) +\end{align*} +$$ + +!!! example + Sample function with multiple cases and indices: + + $$ + \begin{align*} + f:\ &X\to Y \\ + &x_i\longmapsto \begin{cases} + y_1 & i\in\{1,2\} \\ + y_3 & i\in\{3,4,5\} + \end{cases} + \end{align*} + $$ + +The **domain** $\text{dom}(f)$ is the input set. + +$$X=\text{dom}(f)$$ + +The **codomain** $\text{cod}(f)$ is the output set. + +$$Y=\text{cod}(f)$$ + +The **range** $\text{rang}(f)$ is the subset of $Y$ that is actually mapped to by the domain. + +$$ +\begin{align*} +\text{rang}(f)&=\{y\in Y|\exists x\in X,y=f(x)\} \\ +&=\{f(x)|x\in X\} +\end{align*} +$$ + +The **pre-image** is the subset of the domain that maps to a specific subset $B$ of the codomain. + +$$\text{preimage}(f)=\{x\in X|\exists y\in B,y=f(x)\}$$ + +The **image** is the subset of the codomain that is mapped by a specific subset $A$ of the domain. + +$$\text{image}(f)=\{f(x)|\exists x\in A\}$$