# 补集（集合论）

在集合论中，一个集合的**补集**是指从某个约定的外围集合中选取的、不属于该给定集合的那些元素构成的汇集。由于“所有不在A中的东西”在标准公理理论中本身并不构成一个集合，补集总是相对于一个背景集合来定义的：或者是一个包含所讨论的一切集合的固定全集E，由此得到绝对补集；或者是一个明确给出的第二集合，由此得到相对补集A \ B。<sup>[1](https://luifrancgom.github.io/halmos_naive_set_theory_quarto/chapter_5.html)</sup><sup> • </sup><sup>[2](https://www.math.cmu.edu/~mradclif/teaching/127S19/Notes/Set%20Theory.pdf)</sup>

| 关键事实 | 细节 |
|---|---|
| 相对补集 | A \ B = {x ∈ A : x ∉ B}；B不必是A的子集，因为只移除B中那些位于A中的元素<sup>[1](https://luifrancgom.github.io/halmos_naive_set_theory_quarto/chapter_5.html)</sup><sup> • </sup><sup>[2](https://www.math.cmu.edu/~mradclif/teaching/127S19/Notes/Set%20Theory.pdf)</sup> |
| 绝对补集 | 若A ⊆ E，则A的补集为E \ A，写作A′、A<sup>c</sup>或\(\overline{A}\)；尚未形成单一的标准符号<sup>[1](https://luifrancgom.github.io/halmos_naive_set_theory_quarto/chapter_5.html)</sup><sup> • </sup><sup>[3](https://proofwiki.org/wiki/Definition%3ASet_Complement)</sup> |
| 基本恒等式 | (A′)′ = A；∅′ = E；E′ = ∅；A ∩ A′ = ∅；A ∪ A′ = E；A ⊆ B当且仅当B′ ⊆ A′<sup>[1](https://luifrancgom.github.io/halmos_naive_set_theory_quarto/chapter_5.html)</sup> |
| 德摩根律 | (A ∪ B)′ = A′ ∩ B′，且(A ∩ B)′ = A′ ∪ B′<sup>[4](https://interactivetextbooks.tudelft.nl/delftse-foundations-of-computation/content/sets/boolean-algebra.html)</sup> |
| 推广 | 这些定律可推广到任意多个集合的并与交，包括无穷多个集合<sup>[5](https://www.homepages.ucl.ac.uk/~ucahmto/0007/_book/1-1-set-theory.html)</sup> |
| 基础理论的限制 | 在策梅洛–弗兰克尔集合论中不存在所有集合的集合；全集类V是一个真类，因此无法形成无限制的补集<sup>[6](https://people.clas.ufl.edu/zapletal/files/notesset3.pdf)</sup> |
| 概率论中的应用 | 对于事件A，补集法则给出P(A<sup>c</sup>) = 1 − P(A)<sup>[7](https://lau.ucsd.edu/stat88-textbook/notebooks/Chapter_01/03_Fundamental_Rules.html)</sup> |

## 两种补集

**相对补集。** 若A和B是集合，则B在A中的相对补集，也称差集，为A \ B = {x : x ∈ A且x ∉ B}，通常读作“A减B”。该定义不要求B ⊆ A；B中位于A之外的元素直接被忽略，因此A \ B = A \ (A ∩ B)。<sup>[1](https://luifrancgom.github.io/halmos_naive_set_theory_quarto/chapter_5.html)</sup><sup> • </sup><sup>[2](https://www.math.cmu.edu/~mradclif/teaching/127S19/Notes/Set%20Theory.pdf)</sup> 有用的特例包括消去律A \ A = ∅和A \ ∅ = A，以及恒等式A \ (A \ B) = A ∩ B。<sup>[8](https://www.cs.ox.ac.uk/andrew.ker/docs/discretemaths-lecture-notes-mt2010.pdf)</sup>

**绝对补集。** 当一个问题中的所有集合都是某个固定集合E的子集时——E称为全集——A ⊆ E的补集就是E \ A，此时底层的全集可以在记号中隐含不写。<sup>[1](https://luifrancgom.github.io/halmos_naive_set_theory_quarto/chapter_5.html)</sup><sup> • </sup><sup>[8](https://www.cs.ox.ac.uk/andrew.ker/docs/discretemaths-lecture-notes-mt2010.pdf)</sup> 全集的选择至关重要：正偶数在正整数中的补集是正奇数，而在一个更大的全集中，补集还会包含许多别的东西，因此必须在取补集之前固定全集。<sup>[8](https://www.cs.ox.ac.uk/andrew.ker/docs/discretemaths-lecture-notes-mt2010.pdf)</sup>

## 代数定律

补运算满足一小组恒等式，它们与命题逻辑中的否定相对应：双重补运算还原为原集合，A与A′不相交且并集为E，补运算反转包含关系——A ⊆ B恰好当且仅当B′ ⊆ A′。<sup>[1](https://luifrancgom.github.io/halmos_naive_set_theory_quarto/chapter_5.html)</sup>

关于补集最重要的陈述是德摩根律，它描述了补运算如何与并、交相互作用：

\[ (A \cup B)' = A' \cap B', \qquad (A \cap B)' = A' \cup B'. \]

它们直接来自逻辑中的德摩根律，因为并对应“或”，交对应“且”，补对应“非”。<sup>[4](https://interactivetextbooks.tudelft.nl/delftse-foundations-of-computation/content/sets/boolean-algebra.html)</sup><sup> • </sup><sup>[2](https://www.math.cmu.edu/~mradclif/teaching/127S19/Notes/Set%20Theory.pdf)</sup> 第一条定律的证明按元素逐一进行：x属于A ∪ B的补集，恰好当x既不在A中也不在B中，而这恰好就是x同时属于A′和B′。<sup>[4](https://interactivetextbooks.tudelft.nl/delftse-foundations-of-computation/content/sets/boolean-algebra.html)</sup> 通过归纳法可将这些定律推广到任意有限多个集合，而且它们对无穷族的并与交同样成立：任意一族集合之并的补集等于各补集之交，反之亦然。<sup>[4](https://interactivetextbooks.tudelft.nl/delftse-foundations-of-computation/content/sets/boolean-algebra.html)</sup><sup> • </sup><sup>[5](https://www.homepages.ucl.ac.uk/~ucahmto/0007/_book/1-1-set-theory.html)</sup>

这些定律意味着集合论的定理成对出现。将每个集合替换为其补集、交换并与交、反转所有包含关系，就能把任何已证明的恒等式变为另一个已证明的恒等式，这一事实称为集合的对偶原理。<sup>[1](https://luifrancgom.github.io/halmos_naive_set_theory_quarto/chapter_5.html)</sup>

补运算与并、交一起，使固定集合E的所有子集构成一个布尔代数，其恒等式除补集律外还包括幂等律、交换律、结合律和分配律。<sup>[4](https://interactivetextbooks.tudelft.nl/delftse-foundations-of-computation/content/sets/boolean-algebra.html)</sup>

## 全集为何不能是集合

无限制的补集——“所有不在A中的东西构成的集合”——需要一个包含一切的通用集合。在策梅洛–弗兰克尔集合论（ZF）——现代集合论的标准公理系统——中，这样的集合不存在。全集类V = {z : z = z}是一个真类，即不是集合的类；如果V是集合，分离公理模式就允许人们构造集合{z ∈ V : z ∉ z}，罗素悖论便随之而来。<sup>[6](https://people.clas.ufl.edu/zapletal/files/notesset3.pdf)</sup> 同样的论证表明，在ZF中不存在以所有集合为元素的集合。<sup>[9](https://iep.utm.edu/set-theo/)</sup>

这就是为什么实践中每个补集都是相对的。从事数学研究的数学家会固定一个足够大、足以容纳当前问题的环境集合E，在E内部取补集毫无问题。另类基础理论对此有不同的处理：冯·诺伊曼–伯奈斯–哥德尔集合论承认类V是一个真类，而奎因的新基础通过限制哪些公式可以定义集合来允许通用集合的存在，不过该系统在展开普通数学时颇为笨重，主流实践中并不使用。<sup>[9](https://iep.utm.edu/set-theo/)</sup><sup> • </sup><sup>[6](https://people.clas.ufl.edu/zapletal/files/notesset3.pdf)</sup>

## 历史渊源

集合论中的补集源自19世纪40年代的逻辑代数。1847年末，奥古斯都·德摩根（Augustus De Morgan，1806–1871）出版了《形式逻辑》，乔治·布尔（George Boole）出版了《逻辑的数学分析》，各自奠定了一种对演绎推理的符号化处理。<sup>[10](https://plato.stanford.edu/entries/algebra-logic-tradition/)</sup> 布尔将逻辑表述为类的代数，其中加法是不相交类的并，减法是类差；通常的算术定律引导他把1当作全集、把1 − X当作X的补集，于是补运算在那里表现为从整体中做算术减法。<sup>[10](https://plato.stanford.edu/entries/algebra-logic-tradition/)</sup> 以德摩根命名的定律在现代集合记号中描述的正是同样的补运算行为。

## 应用

**概率论。** 在概率论中，结果空间Ω扮演全集的角色，事件A的补集是事件“A不发生”，写作A<sup>c</sup>。由于A与A<sup>c</sup>互斥且并集为Ω，柯尔莫哥洛夫公理给出补集法则P(A<sup>c</sup>) = 1 − P(A)，这是初等概率论中最常用的恒等式之一。<sup>[7](https://lau.ucsd.edu/stat88-textbook/notebooks/Chapter_01/03_Fundamental_Rules.html)</sup> 德摩根律可直接翻译为关于事件的陈述：“A或B发生”的补集是“A和B都不发生”。<sup>[4](https://interactivetextbooks.tudelft.nl/delftse-foundations-of-computation/content/sets/boolean-algebra.html)</sup>

**计算机科学。** 差集是关系代数——关系数据库底层的查询语言——的基本运算之一，其中两个相容关系的差是第一个关系中不属于第二个关系的那些元组构成的集合。<sup>[11](https://openstax.org/books/introduction-computer-science/pages/8-3-relational-database-management-systems)</sup> 在形式语言理论和自动机理论中，字母表上某个语言的补集是相对于该字母表上所有字符串构成的全集来定义的，这同样使全集的选择变得明确。<sup>[12](https://www.usna.edu/Users/cs/wcbrown/courses/F24SI342/lec/l06/lec.html)</sup>

## References

1. [Paul Halmos, *Naive Set Theory*, Chapter 5: Complements and Powers (annotated transcription)](https://luifrancgom.github.io/halmos_naive_set_theory_quarto/chapter_5.html)
2. [Set Theory lecture notes, Carnegie Mellon University (21-127)](https://www.math.cmu.edu/~mradclif/teaching/127S19/Notes/Set%20Theory.pdf)
3. [Definition: Set Complement, ProofWiki](https://proofwiki.org/wiki/Definition%3ASet_Complement)
4. [The Boolean Algebra of Sets, Delftse Foundations of Computation, TU Delft](https://interactivetextbooks.tudelft.nl/delftse-foundations-of-computation/content/sets/boolean-algebra.html)
5. [Set Theory, MATH0007 Algebra for Joint Honours Students, UCL](https://www.homepages.ucl.ac.uk/~ucahmto/0007/_book/1-1-set-theory.html)
6. [Zermelo–Fraenkel Set Theory lecture notes, University of Florida](https://people.clas.ufl.edu/zapletal/files/notesset3.pdf)
7. [Fundamental Rules, Stat 88 textbook, UC San Diego](https://lau.ucsd.edu/stat88-textbook/notebooks/Chapter_01/03_Fundamental_Rules.html)
8. [Discrete Mathematics lecture notes, Andrew Ker, University of Oxford](https://www.cs.ox.ac.uk/andrew.ker/docs/discretemaths-lecture-notes-mt2010.pdf)
9. [Set Theory, Internet Encyclopedia of Philosophy](https://iep.utm.edu/set-theo/)
10. [The Algebra of Logic Tradition, Stanford Encyclopedia of Philosophy](https://plato.stanford.edu/entries/algebra-logic-tradition/)
11. [Relational Database Management Systems, Introduction to Computer Science, OpenStax](https://openstax.org/books/introduction-computer-science/pages/8-3-relational-database-management-systems)
12. [Set operations, Function definitions, US Naval Academy SI342](https://www.usna.edu/Users/cs/wcbrown/courses/F24SI342/lec/l06/lec.html)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › Formal logic and foundations › Set theory › Elementary set theory

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/complement-set-theory

English original: https://www.edgepedia.org/complement-set-theory
