Definition 0.3.1: A set is a collection of objects called elements or
members. A set with no objects is the empty set, written ∅ (or {}).
Equations
- ElementCollection α = Set α
Instances For
The empty set from Definition 0.3.1 is mathlib's ∅.
Equations
Instances For
The book's notion of set coincides with mathlib's Set.
Definition 0.3.2: (i) A ⊆ B means every x ∈ A also satisfies x ∈ B; (ii) A = B
when each is a subset of the other (otherwise A ≠ B); (iii) A ⊂ B when A ⊆ B but
A ≠ B.
Equations
- subsetElementCollection A B = (A ⊆ B)
Instances For
The book's notion of subset is mathlib's ⊆.
The book's definition of equality of sets is mutual inclusion.
Book notion of a proper subset: contained but not equal.
Equations
- properSubsetElementCollection A B = (subsetElementCollection A B ∧ A ≠ B)
Instances For
The book's notion of proper subset coincides with mathlib's strict subset ⊂.
Example 0.3.3: Standard sets of numbers: the naturals ℕ, integers ℤ, rationals ℚ,
even naturals {2m}, and reals ℝ, with inclusions ℕ ⊆ ℤ ⊆ ℚ ⊆ ℝ.
Equations
- naturalsInReals = Set.range fun (n : ℕ) => ↑n
Instances For
Example 0.3.3 (continued).
Equations
- evenNaturalsInReals = Set.range fun (m : ℕ) => 2 * ↑m
Instances For
Example 0.3.3: The canonical embeddings realize the chain ℕ ⊆ ℤ ⊆ ℚ ⊆ ℝ.
Example 0.3.3 (continued).
Definition 0.3.4: (i) union A ∪ B = {x : x ∈ A ∨ x ∈ B}; (ii) intersection
A ∩ B = {x : x ∈ A ∧ x ∈ B}; (iii) relative complement (set difference) A \ B = {x : x ∈ A ∧ x ∉ B}; (iv) complement Bᶜ means the difference from the ambient universe or an
understood superset; (v) sets are disjoint when their intersection is empty.
Equations
- unionElementCollection A B = A ∪ B
Instances For
Equations
- relativeComplementElementCollection A B = A \ B
Instances For
Equations
Instances For
Theorem 0.3.5 (DeMorgan). For sets A, B, C,
(B ∪ C)ᶜ = Bᶜ ∩ Cᶜ and (B ∩ C)ᶜ = Bᶜ ∪ Cᶜ; more generally,
A \ (B ∪ C) = (A \ B) ∩ (A \ C) and A \ (B ∩ C) = (A \ B) ∪ (A \ C).