The intersection of two sets A and B, written A ∩ B, is the set whose elements are exactly those belonging to both A and B. The symbol is read “A intersect B” or “A cap B.”
A 與 B 的 intersection(交集)A ∩ B,收「同時屬於 A 和 B」的一切元素——兩個條件都按下去之後留下的清單。條件式寫法:A ∩ B = {x : x ∈ A 且 x ∈ B}。
定義交集時,我們默默做了一個假設:任何兩個集合「交」出來的東西仍然是集合。可是如果 A 與 B 根本沒有共同元素呢?為了讓交集運算永遠有答案,必須承認一個沒有任何成員的集合。
1.4 DEFINITION
The set having no elements at all is called the empty (or void) set and is denoted by ∅. When A ∩ B = ∅, so that A and B share no element, the two sets are said to be disjoint.
沒有任何元素的集合稱為空集,記作 ∅。若 A ∩ B = ∅——兩份清單毫無交集——就稱 A 與 B disjoint(不相交)。
For any sets A, B, C:
(a) A ∩ A = A, A ∪ A = A (idempotent,冪等律)
(b) A ∩ B = B ∩ A, A ∪ B = B ∪ A (commutative,交換律)
(c) (A ∩ B) ∩ C = A ∩ (B ∩ C), (A ∪ B) ∪ C = A ∪ (B ∪ C) (associative,結合律)
(d) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C), A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) (distributive,分配律)
正例(拿具體集合驗 (d) 第一式):取 A = {1, 2}、B = {2, 3}、C = {3, 4}。左邊:B ∪ C = {2, 3, 4},於是 A ∩ (B ∪ C) = {2}。右邊:A ∩ B = {2}、A ∩ C = ∅,聯集是 {2}。兩邊吻合。對照(數的世界只給一半):乘法可分配進加法(a(b + c) = ab + ac),但加法分配進乘法一般不成立(a + bc ≠ (a + b)(a + c),取 a = b = c = 1 即見 2 ≠ 4);集合的 (d) 卻兩個方向都成立——比數的代數更對稱。
PROOF · 分配律第一式
以下證明 (d) 的第一條:A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)。其餘各條的證法完全相同,而且路徑更短,走過這一場就都會了。
Proof. Pick any x in A ∩ (B ∪ C). By the definition of intersection, x lies in A and also in B ∪ C; since membership in B ∪ C means x ∈ B or x ∈ C, there are two cases: (i) x ∈ A and x ∈ B, or (ii) x ∈ A and x ∈ C.
先走第一個包含方向。任取左邊集合的一個元素 x,把左邊的式子逐層拆開:因為 x 屬於交集 A ∩ (B ∪ C),依定義 1.2 它同時屬於 A 與 B ∪ C;而依定義 1.3,「屬於 B ∪ C」又拆成「屬於 B 或屬於 C」。於是 x 的處境只有兩種:在 A 也在 B,或者在 A 也在 C。拿上面 inst 的數字對照:x = 2 屬於 {1, 2} ∩ {2, 3, 4},它走的是情形 (i)——在 A 也在 B。
In case (i) we get x ∈ A ∩ B; in case (ii), x ∈ A ∩ C. Either way x belongs to (A ∩ B) ∪ (A ∩ C). Therefore A ∩ (B ∪ C) ⊆ (A ∩ B) ∪ (A ∩ C).
把兩種處境分別歸位:情形 (i) 正是「屬於 A ∩ B」的定義,情形 (ii) 正是「屬於 A ∩ C」的定義。因為 x 至少落入兩種情形之一,所以它屬於這兩個交集的聯集——右邊的集合。左邊任取的元素都屬於右邊,第一個方向的包含成立。
Conversely, pick any y in (A ∩ B) ∪ (A ∩ C); then y ∈ A ∩ B or y ∈ A ∩ C. In both cases y ∈ A, and y belongs to B or to C, so y ∈ B ∪ C. Hence y ∈ A ∩ (B ∪ C), which gives the reverse inclusion.
第二個方向反著走。任取右邊集合的元素 y,它至少屬於 A ∩ B 與 A ∩ C 之一。注意兩種情形有一個共同點:y 都屬於 A;而剩下的資訊——屬於 B 或屬於 C——依定義 1.3 恰好組回「屬於 B ∪ C」。因此 y 同時滿足「屬於 A」與「屬於 B ∪ C」兩個條件,第二個方向的包含也成立。
Since each of the two sets contains the other, Definition 1.1 shows they are equal.
收工步:兩個方向的包含合起來,正是定義 1.1 說的「元素完全相同」。所以兩邊是同一個集合。
分配律第一式成立:∩ 可以放心分配進 ∪。∎
這張圖在證分配律的另一條路:一個元素相對於 A、B、C 三個集合,處境恰有 2³ = 8 種——每個集合「在或不在」各二選一。逐塊核對:左邊 A ∩ (B ∪ C) 收的恰是紅色的 1、2、3 三塊,右邊 (A ∩ B) ∪ (A ∩ C) 收的也恰是這三塊。收的區域相同,集合就相等。