From 7b84547cb90197652ab1b1b5efe992b7285f89b0 Mon Sep 17 00:00:00 2001 From: eggy Date: Mon, 23 Jan 2023 20:45:03 -0500 Subject: [PATCH] ece108: add set intro --- docs/1b/ece108.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++ docs/1b/math119.md | 1 + 2 files changed, 61 insertions(+) diff --git a/docs/1b/ece108.md b/docs/1b/ece108.md index c1bacdb..9c34c89 100644 --- a/docs/1b/ece108.md +++ b/docs/1b/ece108.md @@ -294,3 +294,63 @@ Induction can be applied to the whole set of integers by proving the following: Alternatively, some steps can be skipped in **strong induction** by proving that if for $k\in\mathbb N$, $P(i)$ holds for all $i\leq k$, so $P(k+1)$ holds. In other words, by assuming that the statement is true for all values before $k$. If strong induction is true, regular induction must also be true, but not vice versa. +## Sets + +!!! definition + - A **set** is an unordered collection of distinct objects. + - An **element/member** of a set is an object in that set. + - A **multiset** is an unordered collection of objects. + +Sets are expressed with curly brackets: + +$$\{s_1, s_2,\dots\}$$ + +Numbers are defined as sets of recursively empty sets: + +$$ +\begin{align*} +0&:=\empty \\ +1&:=\{\empty\} \\ +2&:=\{\empty,\{\empty\}\} +\end{align*} +$$ + +### Special sets + +- $\mathbb N$ is the set of **natural numbers** $\{1, 2, 3,\dots\}$ +- $\mathbb W$ is the set of **whole numbers** $\{0, 1, 2,\dots\}$ +- $\mathbb Z$ is the set of **integers** $\{\dots, -1, 0, 1, \dots\}$ +- $\mathbb Z^+_0$ is the set of **positive integers, including zero** — these modifiers can be applied to the set of negative integers and real numbers as well +- $2\mathbb Z$ is the set of **even integers** +- $2\mathbb Z + 1$ is the set of **odd integers** +- $\mathbb Q$ is the set of **rational numbers** +- $\mathbb R$ is the set of **real numbers** +- $\empty$ or $\{\}$ is the **empty set** with no elements + +### Set builder notation + +!!! definition + - The **domain of discourse** is the context of the current problem, which may limit the universal set (e.g., if only integers are discussed, the domain is integers only) + +$x$ is an element if $x$ is in $\mathcal U$ and $P(x)$ is true. + +$$\{x\in\mathcal U|P(x)\}$$ + +!!! example + All even numbers: $A=\{n\in\mathbb Z,\exists k\in\mathbb Z,n=2k\}$ + +$f(x)$ is an element if $x$ is in $\mathcal U$, and $P(x)$ is true: + +$$\{f(x)|\underbrace{x\in\mathcal U, P(x)}_\text{swappable, omittable}\}$$ + +!!! example + - All even numbers: $A=\{2k|k\in\mathbb Z\}$ + - All rational numbers: $\mathbb Q=\{\frac a b | a,b\in\mathbb Z,b\neq 0\}$ + +The **complement** of a set is the set containing every element **not** in the set. + +$$\overline S$$ + +The **universal set** is the set containing everything, and is the complement of the empty set. + +$$\mathcal U=\overline\empty$$ diff --git a/docs/1b/math119.md b/docs/1b/math119.md index d986b2a..dfaac20 100644 --- a/docs/1b/math119.md +++ b/docs/1b/math119.md @@ -244,3 +244,4 @@ Sample tree diagram: !!! warning If the function only depends on one variable, $\frac{d}{dx}$ is used. Multivariable functions must use $\frac{\partial}{\partial x}$ to treat the other variables as constant. +