The Foundation of Sets
A set is an unordered collection of distinct objects, its elements. We write for elementhood and otherwise. Sets have no order () and no duplicates.
| Relation / Set | Symbol | Meaning | Example |
|---|---|---|---|
| Subset | Every element of is in | ||
| Empty Set | Has no elements; subset of all | ||
| Cardinality | Number of elements in |
Set Operations & Logic
Operations combine sets just like boolean logic (Union=OR, Intersection=AND, Complement=NOT).
| Operation | Notation | Definition | Logic Mirror |
|---|---|---|---|
| Union | In or (or both) | OR | |
| Intersection | In both and | AND | |
| Difference | In , not in | A AND NOT B | |
| Complement | In universe, not in | NOT |
De Morgan's laws: and .
Inclusion-exclusion: . Pitfall: Do not forget to subtract the overlap, or you count it twice.