差集
差集 | |
---|---|
术语名称 | 差集 |
英语名称 | difference |
别名 | 差, 相对补集, relative complement |
差集(difference)是对两个集合,由所有属于第一个集合但不属于第二个集合的元素构成的新的集合。
定义
差集 | |
---|---|
运算名称 | 差集 |
运算符号 | [math]\displaystyle{ \setminus }[/math],[math]\displaystyle{ - }[/math] |
Latex | \setminus , -
|
运算对象 | 集合 |
运算元数 | 2 |
运算结果 | 集合
|
对集合 [math]\displaystyle{ A }[/math] 、 [math]\displaystyle{ B }[/math] ,由所有属于集合 [math]\displaystyle{ A }[/math] 但不属于集合 [math]\displaystyle{ B }[/math] 的元素所构成的集合,叫做集合 [math]\displaystyle{ A }[/math] 与集合 [math]\displaystyle{ B }[/math] 的差集(difference)或 集合 [math]\displaystyle{ A }[/math] 在集合 [math]\displaystyle{ B }[/math] 中的相对补集(relative complement),简称差,记作 [math]\displaystyle{ A \setminus B }[/math],有时也记作 [math]\displaystyle{ A - B }[/math][1]。即: [math]\displaystyle{ A \setminus B = \left\{ x \mid x \in A \land x \notin B \right\} }[/math]。
∖ | |
---|---|
字符 | ∖ |
Unicode码位 | U+2216 Set Minus
|
Latex命令序列 | \setminus
|
性质
作为布尔代数的运算,差集可以定义为:[math]\displaystyle{ A \setminus B = A \cap B^\complement }[/math]
- 特殊值
- [math]\displaystyle{ A \setminus \varnothing = A }[/math]
- 空集是差集运算的右单位元。
- [math]\displaystyle{ \varnothing \setminus A = \varnothing }[/math]
- 空集是差集运算的左零元。
- [math]\displaystyle{ A \setminus A = \varnothing }[/math]
- [math]\displaystyle{ A \setminus U = \varnothing }[/math]
- [math]\displaystyle{ U \setminus A = A^\complement }[/math]
- [math]\displaystyle{ A \setminus \varnothing = A }[/math]
- 包含关系
- [math]\displaystyle{ A \subset B \implies C \setminus A \supset C \setminus B }[/math]
- [math]\displaystyle{ A \subseteq B \implies C \setminus A \supseteq C \setminus B }[/math]
- [math]\displaystyle{ A \supset B \setminus C \supset B \setminus A }[/math]
- [math]\displaystyle{ A \subset B \implies C \setminus A \supset C \setminus B }[/math]
- 和交并的关系
- 对于任意集合 [math]\displaystyle{ A }[/math] 和 [math]\displaystyle{ B }[/math],有 [math]\displaystyle{ A \cap (A \setminus B) = A \setminus B }[/math]、[math]\displaystyle{ A \cup (A \setminus B) = A }[/math]。
- 对于任意集合 [math]\displaystyle{ A }[/math] 、 [math]\displaystyle{ B }[/math] 和 [math]\displaystyle{ C }[/math],有 [math]\displaystyle{ A \setminus (B \cup C) = (A \setminus B) \cap (A \setminus C) }[/math] 、 [math]\displaystyle{ A \setminus (B \cap C) = (A \setminus B) \cup (A \setminus C) }[/math]。
- 对于任意集合 [math]\displaystyle{ A }[/math] 、 [math]\displaystyle{ B }[/math] 和 [math]\displaystyle{ C }[/math],有 [math]\displaystyle{ A \setminus (B \setminus C) = (A \cap C) \cup (A \setminus B) }[/math]。
- 对于任意集合 [math]\displaystyle{ A }[/math] 和 [math]\displaystyle{ B }[/math],有 [math]\displaystyle{ A \setminus (A \setminus B) = A \cap B }[/math]。
- 对于任意集合 [math]\displaystyle{ A }[/math] 、 [math]\displaystyle{ B }[/math] 和 [math]\displaystyle{ C }[/math],有 [math]\displaystyle{ (A \cap B) \setminus C = (A \setminus C) \cap B = A \cap (B \setminus C) = (A \setminus C) \cap (B \setminus C) }[/math]。
- 对于任意集合 [math]\displaystyle{ A }[/math] 、 [math]\displaystyle{ B }[/math] 和 [math]\displaystyle{ C }[/math],有 [math]\displaystyle{ (A \cup B) \setminus C = (A \setminus C) \cup (B \setminus C) }[/math]。
- 对于任意集合 [math]\displaystyle{ A }[/math] 、 [math]\displaystyle{ B }[/math] 和 [math]\displaystyle{ C }[/math],有 [math]\displaystyle{ (A \setminus B) \cup C = (A \cup C) \setminus (B \setminus C) }[/math]。
- ↑ 直接用减号,有时会造成和闵氏和对应的减法的歧义,即元素作差可能取值构成的集合。