# 闭包（数学）

**闭包**在数学中是指这样一种性质：对一个集合中的元素施加某种运算，所得结果仍然留在该集合之内；而在第二种更宽泛的意义上，**闭包算子**是指定义在某个集合的诸子集上的函数，它满足外延性、幂等性和保序性。

| | |
|---|---|
| 闭包算子公理 | 外延性（X ⊆ C(X)）、幂等性（C(C(X)) = C(X)）与保序性（X ⊆ Y ⇒ C(X) ⊆ C(Y)）<sup>[1](https://www.math.uwaterloo.ca/~snburris/htdocs/UALG/univ-algebra.pdf)</sup> |
| 闭集 | X 是闭集，当且仅当 C(X) = X<sup>[1](https://www.math.uwaterloo.ca/~snburris/htdocs/UALG/univ-algebra.pdf)</sup> |
| 拓扑特化 | 拓扑闭包还额外满足 Cl(∅) = ∅ 与 Cl(A ∪ B) = Cl(A) ∪ Cl(B)<sup>[3](https://ncatlab.org/nlab/show/Moore+closure)</sup> |
| 名称由来 | 闭集族被称为 Moore 族，得名于 E. H. Moore，他于 1911 年研究了闭包算子<sup>[2](https://api.pageplace.de/preview/DT0400.9788132333975_A34120933/preview-9788132333975_A34120933.pdf)</sup> |
| 典型例子 | 由集合生成的子群、关系的传递闭包、语言的 Kleene 闭包<sup>[3](https://ncatlab.org/nlab/show/Moore+closure)</sup><sup> • </sup><sup>[4](https://arxiv.org/html/2302.13081v7/)</sup> |
| 计数 | n 元集合上闭包算子的数目介于 2^(n 选 ⌊n/2⌋) 与 2^(2√2(n 选 ⌊n/2⌋)(1+o(1))) 之间；当 n = 7 时有 10^19 个 Moore 族<sup>[5](https://www.sciencedirect.com/science/article/pii/S0304397515011986)</sup><sup> • </sup><sup>[6](https://fabien.labernia.fr/media/recherche/Recursive%20definition%20of%20the%20lattice%20of%20Moore%20families.pdf)</sup> |
| 计算 | 数据库中的传递闭包由直接算法或图遍历算法计算，其性能优于迭代方法<sup>[7](https://dlnext.acm.org/doi/10.1145/88636.88888)</sup><sup> • </sup><sup>[8](https://ampersandtarski.github.io/ampersand/guides/transitive-closure)</sup> |

## 闭包算子与闭包系统

标准的公理化形式通常称为 Moore 闭包。集合 A 上的闭包算子是从 A 的幂集到自身的映射 C，满足三个条件：外延性，X ⊆ C(X)；幂等性，C(C(X)) = C(X)；以及保序性（也称单调性），即 X ⊆ Y 蕴涵 C(X) ⊆ C(Y)<sup>[1](https://www.math.uwaterloo.ca/~snburris/htdocs/UALG/univ-algebra.pdf)</sup><sup> • </sup><sup>[3](https://ncatlab.org/nlab/show/Moore+closure)</sup>。子集 X 是闭子集，当且仅当 C(X) = X<sup>[1](https://www.math.uwaterloo.ca/~snburris/htdocs/UALG/univ-algebra.pdf)</sup>。序集版本则把这三条公理表述为 a ≤ ā、单调性，以及双重闭包等于闭包<sup>[9](https://encyclopediaofmath.org/wiki/Closure_relation)</sup>。

**闭包系统**（或称 Moore 族）是从另一侧给出的等价图景：基础集 X 的一族子集 𝒞，它包含 X 本身，并且对任意交封闭<sup>[6](https://fabien.labernia.fr/media/recherche/Recursive%20definition%20of%20the%20lattice%20of%20Moore%20families.pdf)</sup><sup> • </sup><sup>[10](https://drops.dagstuhl.de/storage/00lipics/lipics-vol359-isaac2025/html/LIPIcs.ISAAC.2025.24/LIPIcs.ISAAC.2025.24.html)</sup>。这正是 Galois 连接对偶性的实用形式，Davey 与 Priestley 的《格与序导论》将其置于完全格与形式概念分析的基础地位，而形式概念分析是他们所描述的一种在社会科学中具有商业价值的数据分析方法<sup>[11](https://www.cambridge.org/core/books/introduction-to-lattices-and-order/946458CB6638AF86D85BA00F5787F4F4)</sup>。这种对偶性被广泛应用于逻辑学、组合学、计算机科学、关系数据库、数据分析与知识结构等领域<sup>[12](https://www.sciencedirect.com/science/article/pii/S0166218X02002093)</sup>。

**一个值得了解的定义分歧。** 闭包算子一词有多种定义方式。Burris 与 Sankappanavar 指出，他们的定义比拓扑定义更一般，因为它不要求两个闭子集的并仍然闭<sup>[1](https://www.math.uwaterloo.ca/~snburris/htdocs/UALG/univ-algebra.pdf)</sup>；而《数学百科全书》则在闭包运算的定义中直接给出 Kuratowski 闭包公理<sup>[13](https://encyclopediaofmath.org/wiki/Closure_space)</sup>。调和之道在于：三条 Moore 公理定义了一般概念，再加上 Cl(∅) = ∅ 以及有限并的保持性，就特化为拓扑闭包算子<sup>[3](https://ncatlab.org/nlab/show/Moore+closure)</sup><sup> • </sup><sup>[14](https://www.mdpi.com/2075-1680/10/3/198)</sup>。满足更强 Fréchet 条件的闭包空间称为 Fréchet V-空间，再满足下一个条件的便是拓扑空间<sup>[13](https://encyclopediaofmath.org/wiki/Closure_space)</sup>。

## 生成的子结构

在泛代数中，闭包正是子结构得以成立的关键。群 G 的诸子群构成一个 Moore 族，而子集 B 的闭包就是由 B 生成的子群<sup>[3](https://ncatlab.org/nlab/show/Moore+closure)</sup>。具有交换性质的有限型闭包算子称为拟阵<sup>[2](https://api.pageplace.de/preview/DT0400.9788132333975_A34120933/preview-9788132333975_A34120933.pdf)</sup>。

## 数学各领域的典型例子

**域的代数闭包。** 域 F 的代数闭包是 F 的一个代数扩张 E，且 E 是代数封闭的，即每个多项式 f(t) ∈ E[t] 在 E 中都有根，并可分解为线性因子<sup>[15](https://ericmoorhouse.org/handouts/algebraic_closures.pdf)</sup>。代数扩张这一条件意味着闭包中的每个元素都是某个以基域元素为系数的非零多项式的根<sup>[16](https://ncatlab.org/nlab/show/algebraically%20closed%20field)</sup>。两个熟悉的域之间的对比说明了代数条件为何重要：ℂ 是 ℝ 的代数闭包，因为由代数基本定理它是代数封闭的，且该扩张的次数有限，[ℂ : ℝ] = 2，从而是代数扩张；但 ℂ 不是 ℚ 的代数闭包，因为它包含 π 这样的在 ℚ 上超越的元素<sup>[15](https://ericmoorhouse.org/handouts/algebraic_closures.pdf)</sup>。

**关系的闭包。** 对于二元关系 R，自反传递闭包 R* 是包含 R 的最小预序，自反传递对称闭包 R≡ 是包含 R 的最小等价关系；这些都是重写理论中的标准工具<sup>[2](https://api.pageplace.de/preview/DT0400.9788132333975_A34120933/preview-9788132333975_A34120933.pdf)</sup>。关系或图的（自反）传递闭包被列为闭包算子最著名的例子之一<sup>[4](https://arxiv.org/html/2302.13081v7/)</sup>。

**语言闭包。** 语言的 Kleene 闭包（星号）与拓扑闭包、传递闭包并列为典型的闭包算子<sup>[4](https://arxiv.org/html/2302.13081v7/)</sup>。

## 逻辑与计算机科学中的闭包性质

对于语言类 K，闭包是按运算来定义的：若 L, L′ ∈ K 蕴涵 L ∪ L′ ∈ K，则称 K 对并封闭；对交、补、连接与星号运算类似<sup>[17](https://ai.dmi.unibas.ch/_files/teaching/fs25/theo/slides/theory-b05-handout.pdf)</sup>。正则语言对所有通常运算都封闭<sup>[17](https://ai.dmi.unibas.ch/_files/teaching/fs25/theo/slides/theory-b05-handout.pdf)</sup>。

闭包还通过极限把语言理论与拓扑学联系起来。关于自由投射有限半群内正则语言的拓扑闭包的研究，引出了 Ash 不可避免性定理（等价于 Ribes–Zalesskiĭ 定理），据此，存在一个群语言能分离两个正则语言，当且仅当这两个语言在自由群内的闭包不相交。<sup>[18](https://www.labri.fr/perso/zeitoun/research/pdf/2014_closure_profinite_topologies.pdf)</sup>

## 数字一览

闭包算子的组合计数规模庞大，目前只被部分刻画。Burosch 等人（1991）把 n 元集合上闭包算子的数目界定在 2^(n 选 ⌊n/2⌋) 与 2^(2√2(n 选 ⌊n/2⌋)(1+o(1))) 之间<sup>[5](https://www.sciencedirect.com/science/article/pii/S0304397515011986)</sup>。n 元集合上 Moore 族的计数没有已知的封闭公式<sup>[6](https://fabien.labernia.fr/media/recherche/Recursive%20definition%20of%20the%20lattice%20of%20Moore%20families.pdf)</sup>，而且数目增长极快：Colomb 等人发现当 n = 7 时有 10^19 个 Moore 族<sup>[6](https://fabien.labernia.fr/media/recherche/Recursive%20definition%20of%20the%20lattice%20of%20Moore%20families.pdf)</sup>。一个含有 2⁶ − 1 个对象的形式背景有 75,973,751,474 个外延；而对于七元集合上的闭包系统，获得一个随机闭包系统所需的平均循环迭代次数为 12,077,330,482,260,320,447<sup>[19](https://ceur-ws.org/Vol-959/paper21.pdf)</sup>。

枚举所有闭集的基准计时显示了这些数目在实践中的代价。当 n = 1000、闭集数为 38,558,373 时，Ganter 算法耗时 2 分 4 秒，Norris 算法耗时 2 分 48 秒，Co-Closure 算法耗时 31 分 52 秒；当 n = 3196、闭集数为 930,851,336 时，Ganter 算法耗时 2 小时 33 分钟<sup>[20](https://ceur-ws.org/Vol-959/paper9.pdf)</sup>。

## 与相关概念的比较

闭包的几种含义之间的区别在于允许哪些运算。一个闭包算子是拓扑的，当且仅当其闭集族对有限并封闭<sup>[2](https://api.pageplace.de/preview/DT0400.9788132333975_A34120933/preview-9788132333975_A34120933.pdf)</sup>。拓扑闭包还额外要求 Cl(∅) = ∅ 与 Cl(A ∪ B) = Cl(A) ∪ Cl(B)<sup>[3](https://ncatlab.org/nlab/show/Moore+closure)</sup>。

区分二者的一项经典定量标志是 Kuratowski 定理：在拓扑空间中，对一个给定集合反复施加闭包与补运算，最多只能产生 14 个不同的集合。该定理在形式语言理论中得到了重新审视，那里的闭包指的是 Kleene 星号或正闭包<sup>[21](https://www.academia.edu/2797894/Closures_in_formal_languages_and_Kuratowskis_theorem)</sup>。

## 闭包的计算：算法与复杂度

**数据库中的传递闭包。** 计算大型数据库关系传递闭包的直接算法，其终止不依赖于底层图中路径的长度，这与迭代式半朴素算法和对数算法不同；实验表明直接算法的性能一致地更好<sup>[7](https://dlnext.acm.org/doi/10.1145/88636.88888)</sup>。基于图的算法按逆拓扑序处理节点，由子节点的后代集合构造父节点的后代集合，在基于磁盘的环境中显著优于半朴素算法和 Warren 算法<sup>[22](https://dl.acm.org/doi/10.1145/155271.155273)</sup>。某些算法会丢失路径信息，因此要找出从给定节点可达的所有节点，可能需要计算整个传递闭包<sup>[23](https://www.madgik.di.uoa.gr/sites/default/files/2018-06/vldb88_pp382-394.pdf)</sup>。

工程系统直接应用了这些思想。Ampersand 规约工具在运行时用 Warshall 算法维护传递闭包，每当基础关系发生变化就重新计算 r⁺，并在项目管理中通过 dependsOn 关系检测任务之间的循环依赖<sup>[8](https://ampersandtarski.github.io/ampersand/guides/transitive-closure)</sup>。

**一般闭包的复杂度。** 总体图景是喜忧参半的。不存在一种统一的闭包算子表示法，其所需空间在闭包系统规模的多项式以内<sup>[5](https://www.sciencedirect.com/science/article/pii/S0304397515011986)</sup>；不同表示法之间的某些比较任务是可处理的，而另一些在 P ≠ NP 的假设下是 coNP 难的<sup>[5](https://www.sciencedirect.com/science/article/pii/S0304397515011986)</sup>。就成员判定而言，判断一个元素是否属于某个关系在一组运算下的闭包，对任意布尔运算集合都属于 P，但对某些定义在含有两个以上元素的域上的运算则变为 NP 难<sup>[24](https://dmtcs.episciences.org/en/articles/5549)</sup>。从积极的一面看，一组布尔向量在任意布尔多态运算集合下的闭包可以以多项式延迟生成<sup>[24](https://dmtcs.episciences.org/en/articles/5549)</sup>；对于无环蕴涵基，当度（即一个元素出现的蕴涵的最大数目）有界时，枚举不可约闭集是可处理的，运行时间为增量多项式时间<sup>[10](https://drops.dagstuhl.de/storage/00lipics/lipics-vol359-isaac2025/html/LIPIcs.ISAAC.2025.24/LIPIcs.ISAAC.2025.24.html)</sup>。

## 应用与近期进展

由有限蕴涵集计算出的闭包算子，反复施加直到没有新的元素被强制推出，其不动点构成一个闭包系统<sup>[25](https://arxiv.org/html/2607.18534)</sup>。Duquenne–Guigues（茎）基以伪闭集为前提；判断一个给定的集族是否等于某个闭包算子的伪闭集，即 PCF 问题，是 NP 完全的<sup>[26](https://link.springer.com/chapter/10.1007/978-3-032-34742-8_1)</sup>。基可以刻画为极小的，如 DG 基，或直接的，如典范直接单位基与 D 基<sup>[27](https://dl.acm.org/doi/10.1016/j.ijar.2025.109509)</sup>；一种较新的 E 基是 D 基的精细化，源自自由格，已被证明对半分配格是有效且最小的<sup>[28](https://dl.acm.org/doi/10.1007/978-3-032-03364-2_23)</sup>。在模糊形式概念分析中，直接蕴涵系统允许一趟而非多趟地计算闭包，模糊交换条件从代数上刻画了直接性，DirectOptimal 交错算法被证明是正确的且可终止的<sup>[29](https://link.springer.com/article/10.1007/s40314-026-03823-0)</sup>。在范畴论方面，Dubois–Prade 在形式概念分析中的八个可能性算子已被证明典范地来自底层布尔预函子的 Kan 扩展，其中形式概念分析闭包算子与 NΠ-对是唯一能产生形式概念的对称或非对称算子复合<sup>[30](https://arxiv.org/abs/2607.26776v1)</sup>。判定典范闭包表示的完全性已被证明是 coNP 完全的<sup>[25](https://arxiv.org/html/2607.18534)</sup>。

## References

1. [Burris, S., Sankappanavar, H. P. A Course in Universal Algebra](https://www.math.uwaterloo.ca/~snburris/htdocs/UALG/univ-algebra.pdf)
2. [Closure operator (reference preview)](https://api.pageplace.de/preview/DT0400.9788132333975_A34120933/preview-9788132333975_A34120933.pdf)
3. [Moore closure in nLab](https://ncatlab.org/nlab/show/Moore+closure)
4. [Isolated Suborders and their Application to Counting Closure Operators, arXiv](https://arxiv.org/html/2302.13081v7/)
5. [Succinctness and tractability of closure operator representations, Theoretical Computer Science](https://www.sciencedirect.com/science/article/pii/S0304397515011986)
6. [Recursive definition of the lattice of Moore families](https://fabien.labernia.fr/media/recherche/Recursive%20definition%20of%20the%20lattice%20of%20Moore%20families.pdf)
7. [Direct transitive closure algorithms: design and performance evaluation, ACM TODS](https://dlnext.acm.org/doi/10.1145/88636.88888)
8. [Computing Transitive Closures, Ampersand Documentation](https://ampersandtarski.github.io/ampersand/guides/transitive-closure)
9. [Closure relation, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Closure_relation)
10. [Enumerating the Irreducible Closed Sets of an Acyclic Implicational Base of Bounded Degree, ISAAC 2025, LIPIcs](https://drops.dagstuhl.de/storage/00lipics/lipics-vol359-isaac2025/html/LIPIcs.ISAAC.2025.24/LIPIcs.ISAAC.2025.24.html)
11. [Davey, B. A., Priestley, H. A. Introduction to Lattices and Order, 2nd ed., Cambridge University Press](https://www.cambridge.org/core/books/introduction-to-lattices-and-order/946458CB6638AF86D85BA00F5787F4F4)
12. [The lattices of closure systems, closure operators, and implicational systems on a finite set: a survey, Discrete Applied Mathematics](https://www.sciencedirect.com/science/article/pii/S0166218X02002093)
13. [Closure space, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Closure_space)
14. [Closure System and Its Semantics, Axioms (MDPI, 2021)](https://www.mdpi.com/2075-1680/10/3/198)
15. [Algebraic Closures, E. Moorhouse, lecture notes](https://ericmoorhouse.org/handouts/algebraic_closures.pdf)
16. [Algebraically closed field in nLab](https://ncatlab.org/nlab/show/algebraically%20closed%20field)
17. [Theory of Computer Science: Regular Languages, Closure Properties and Decidability, University of Basel](https://ai.dmi.unibas.ch/_files/teaching/fs25/theo/slides/theory-b05-handout.pdf)
18. [Closures of Regular Languages for Profinite Topologies, Almeida, Costa, Zeitoun](https://www.labri.fr/perso/zeitoun/research/pdf/2014_closure_profinite_topologies.pdf)
19. [Random extents and random closure systems, CEUR-WS](https://ceur-ws.org/Vol-959/paper21.pdf)
20. [A closure algorithm using a recursive decomposition of the set of Moore co-families, CEUR-WS](https://ceur-ws.org/Vol-959/paper9.pdf)
21. [Closures in Formal Languages and Kuratowski's Theorem](https://www.academia.edu/2797894/Closures_in_formal_languages_and_Kuratowskis_theorem)
22. [Transitive closure algorithms based on graph traversal, ACM TODS](https://dl.acm.org/doi/10.1145/155271.155273)
23. [Efficient Transitive Closure Algorithms, VLDB 1988](https://www.madgik.di.uoa.gr/sites/default/files/2018-06/vldb88_pp382-394.pdf)
24. [Efficient enumeration of solutions produced by closure operations, DMTCS](https://dmtcs.episciences.org/en/articles/5549)
25. [Completeness of Canonical Closure Representations Is coNP-Complete, arXiv](https://arxiv.org/html/2607.18534)
26. [Pseudo-Closed Family Verification is NP-Complete, Springer 2025](https://link.springer.com/chapter/10.1007/978-3-032-34742-8_1)
27. [A minimal base or a direct base? That is the question!](https://dl.acm.org/doi/10.1016/j.ijar.2025.109509)
28. [The E-Base of Finite Semidistributive Lattices](https://dl.acm.org/doi/10.1007/978-3-032-03364-2_23)
29. [Direct-optimal systems of attribute implications in fuzzy formal concept analysis, Computational and Applied Mathematics](https://link.springer.com/article/10.1007/s40314-026-03823-0)
30. [Possibilistic operators in Formal Concept Analysis as Kan extensions, arXiv](https://arxiv.org/abs/2607.26776v1)

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

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Algebraic structures › Universal algebra and category theory › Universal algebra foundations

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/closure-mathematics

English original: https://www.edgepedia.org/closure-mathematics
