ece108: add set ops
This commit is contained in:
parent
93386a36ff
commit
8616a6086a
@ -354,3 +354,40 @@ $$\overline S$$
|
|||||||
The **universal set** is the set containing everything, and is the complement of the empty set.
|
The **universal set** is the set containing everything, and is the complement of the empty set.
|
||||||
|
|
||||||
$$\mathcal U=\overline\empty$$
|
$$\mathcal U=\overline\empty$$
|
||||||
|
|
||||||
|
### Set operations
|
||||||
|
|
||||||
|
A **subset** is inside another that is a **superset**.
|
||||||
|
|
||||||
|
$$
|
||||||
|
S\subseteq T \\
|
||||||
|
S\subseteq T\iff \forall x\in\mathcal U,(x\in S\implies x\in T)
|
||||||
|
$$
|
||||||
|
|
||||||
|
A **strict or proper subset** is a subset that is not equal to its **strict or proper superset**.
|
||||||
|
|
||||||
|
$$S\subset T$$
|
||||||
|
|
||||||
|
Two sets are equal if they are subsets of each other.
|
||||||
|
|
||||||
|
$$S=T\equiv (S\subseteq T)\wedge (T\subseteq S)$$
|
||||||
|
|
||||||
|
The **union** of two sets is the set that contains any element in either set.
|
||||||
|
|
||||||
|
$$S\cup T=\{x\in\mathcal U|(x\in S)\vee(x\in T)\}$$
|
||||||
|
|
||||||
|
The **intersection** of two sets is the set that only contains elements in both sets.
|
||||||
|
|
||||||
|
$$S\cap T=\{x\in\mathcal U|(x\in S)\wedge(x\in T)\}$$
|
||||||
|
|
||||||
|
The **difference** of two sets is the set that contains elements in the first but not the second. The remainder is dropped.
|
||||||
|
|
||||||
|
$$S-T=S\backslash T$$
|
||||||
|
|
||||||
|
The **complementary** set is every element not in that set.
|
||||||
|
|
||||||
|
$$
|
||||||
|
\overline S=\{x:x\not\in S\} \\
|
||||||
|
\overline S=\mathcal U-S
|
||||||
|
$$
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user