Set Theory
Set theory describes relationships between sets Set theory is not limited to Mathematics or numbers. I will however use numbers and formal notation to demonstrate.
Example Sets
$\emptyset = \{\}$ (the empty set)
$1 = \{1\}$ (everything is a set)
$S = \{1, 2, 3\}$ (sets contain sets)
$X = \{4, 5, 6\}$
$A = \{7, 8, 9\}$
$B = \{3, 3, 3, 2, 2, 1\} = \{3, 2, 1\}$ (duplicates don’t exist)
$C = \{\{1, 2, 3\}, \{4, 5, 6\}, \{7, 8, 9\}\}$ (sets can nest indefinetly)
Number Examples
$1 \in S$ (1 in S)
$1 \notin X$ (1 not in X)
$4 \in X$ (4 in X)
$4 \notin S$ (4 not in S)
Examples with Sets of Numbers
$\{1, 2\} \subset S$ ({1, 2} subset of S)
$\{4, 5\} \not \subset S$ ({4, 5} not subset of S)
$\{4, 5\} \setminus S$ ({4, 5} not subset of S)
$\{2, 3\} \setminus S$ ({2, 3} not subset of S)
Cardinality
$|\emptyset| = 0$ (amount of elements in the empty set)
$|B| = 3$ (amount of elements in set B)
$|S| = |B| = |X|$ (sets S, B and X have the same cardinality)
Equality
$S \not \subset S$ (S not subset of S)
$S \not \subset B$ (S not subset of B)
$S \subseteq S$ (S subset or equal to S)
$S \subseteq B$ (S subset or equal to B)
$B \subseteq S$ (B subset or equal to S)
$S = B$ (order is not a concept in sets and duplicates don’t exist)
Union
$A \cup \emptyset = \emptyset$
$A \cup A = A$ (Identity law)
$S \cup X = \{1, 2, 3, 4, 5, 6\}$ # The cup operator
$S \cup X = X \cup S$ (commutative)
Intersection
$S \setminus S = \{\}$ (S except for S)
$S \setminus X = \{1, 2, 3\}$ # {1, 2, 3} (S except for X)$
$S \setminus X = X \setminus S$ (commutative)
Complement
$\overline A = A^C = C \setminus A$ ($C$ means “complement” in $A^C$)
$\overline{\overline A} = A$
$A \cup \overline A = U$ (U means universal set)
$A \cap B = \emptyset$ (A and B are disjunct)
Shorting Similar to Algebra
$A \cup{(B \cap C)} = (A \cup B)$
Demorgan
$\overline{A \cup B} = \overline{A} \cap \overline{B}$
$\overline{A \cap B} = \overline A \cup \overline B$
DNF (Disjunctive Normal Form)
$(A \cap \overline B \cap C) \cup (A \cap B \cap \overline C) \cup (\overline A \cap \overline B \cap \overline C)$
Union outsite parenthesis and intersections within.
Potensmengde
$A = \{1, 2\}$
$P(A) = \{\emptyset, \{1\}, \{2\}, \{1, 2\}\}$
$|P(A)| = 2^{|A|}$