# 形式系统

形式系统是一个由公理构成的系统，配备有推理规则，使得新的定理能够被生成；公理须为有穷的，或至少是可判定的，也就是说，一个算法能够机械地判定某一给定语句是否为公理<sup>[1](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)</sup>。一种更为明确的规范列出了三项数据：一个公式集、该公式集中的一个公理集，以及一个推理规则集，并规定除这些之外任何东西都不得进入证明<sup>[2](https://calc-path.com/mathematical-logic/modules/formal-systems)</sup>。这种规范的要旨在于有效性：“是公式”“是公理”以及“可由该规则从这些前提推出”这些条件都是可判定的，因此一个推导可以由并不知道符号含义的人来检验<sup>[2](https://calc-path.com/mathematical-logic/modules/formal-systems)</sup>。形式系统是证明论、哥德尔不完备定理，以及机械地检验数学与软件的现代证明助手的舞台。

| 关键事实 | 详情 |
|---|---|
| 定义 | 公理加上有效的推理规则；公理集必须有穷或可判定（这样的理论便称为可公理化的）<sup>[1](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)</sup> |
| 推导 | 推导是一个有穷的公式序列，其中每个公式或为公理、或为假设、或为某规则的结论而其前提出现在序列中更早的位置；一个序列是否为证明是机械可判定的<sup>[2](https://calc-path.com/mathematical-logic/modules/formal-systems)</sup><sup> • </sup><sup>[1](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)</sup> |
| 一致性与完备性 | 如果一个系统不能同时推导出某个语句及其否定，则它是一致的；如果每个语句或其否定都可推导，则它是完备的<sup>[1](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)</sup> |
| 不完备性 | 任何一致的形式系统，只要其中能开展足够多的算术，就含有在该系统中既不可证明也不可反驳的语句，并且无法证明自身的一致性<sup>[1](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)</sup> |
| 证明风格 | 希尔伯特式公理化演算、自然演绎与相继式演算是组织证明系统规则的三种方式<sup>[3](https://math.stackexchange.com/questions/3005369/relationship-between-sequent-calculus-and-hilbert-systems-natural-deduction-et/3005976)</sup> |
| 机械化使用 | Lean、Isabelle 和 Coq 等证明助手实现形式系统以检验数学证明并验证软件，包括 CompCert 编译器和 seL4 微内核<sup>[4](https://lean-lang.org/doc/reference/latest/Introduction/)</sup><sup> • </sup><sup>[5](https://6826.csail.mit.edu/2017/papers/compcert-CACM.pdf)</sup><sup> • </sup><sup>[6](https://researchportalplus.anu.edu.au/en/publications/sel4-formal-verification-of-an-operating-system-kernel/)</sup> |

## 结构与有效性

从一组假设出发对一个公式的推导，是一个以目标公式结尾的有穷公式序列，其中每个成员或为公理、或为假设之一、或为某推理规则的结论而其前提全部出现在序列中更早的位置<sup>[2](https://calc-path.com/mathematical-logic/modules/formal-systems)</sup>。由于公理和规则是有效的，一个给定的有穷公式序列是否构成系统中真正的证明，总是可以被机械地判定<sup>[1](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)</sup>。正是这种可检验性把形式证明与非形式数学论证区分开来，也正是它使得定理集可以被机器枚举<sup>[2](https://calc-path.com/mathematical-logic/modules/formal-systems)</sup>。

有两条基本性质是纯粹用可推导性来定义的。一个形式系统是完备的，如果对其语言中的每个语句，该语句或其否定都能被推导出来；它是一致的，如果不存在某个语句及其否定都被推导出来的情况。只有一致的系统才值得关注，因为在不一致的系统中每个语句都可推导，系统便平凡地完备了<sup>[1](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)</sup>。

## 证明系统的风格

同一种逻辑可以以不同的方式打包。希尔伯特式系统，承袭弗雷格、罗素以及希尔伯特与贝尔奈斯的公理化演算传统，把推导的每一行都视为自身即一条逻辑真理；对同一种逻辑可以作出不同的公理选择<sup>[7](https://plato.stanford.edu/entries/proof-theory-development/)</sup><sup> • </sup><sup>[8](https://plato.stanford.edu/entries/natural-deduction/)</sup>。自然演绎以其引入规则和消去规则，从假设出发由外向内构建证明；而相继式演算则自下而上构建证明，可以被看作自然演绎中可推导关系的一种形式表示<sup>[3](https://math.stackexchange.com/questions/3005369/relationship-between-sequent-calculus-and-hilbert-systems-natural-deduction-et/3005976)</sup><sup> • </sup><sup>[7](https://plato.stanford.edu/entries/proof-theory-development/)</sup>。

格尔哈德·根岑（Gerhard Gentzen）在20世纪30年代引入了相继式演算，此前他发现自己无法为经典自然演绎证明一条正规化定理。他的演算 LJ 和 LK 把直觉主义演算作为经典演算的特例给出，并且他证明了切消定理，他称之为主定理：切规则的实例——切规则是唯一能使公式从推导中消失的规则——可以向上置换，直到被消除。相继式演算的所有逻辑规则都具有子公式性质，即前提中的每个公式都是结论的公式或子公式<sup>[7](https://plato.stanford.edu/entries/proof-theory-development/)</sup>。根岑利用主定理证明了直觉主义命题逻辑的可判定性<sup>[8](https://plato.stanford.edu/entries/natural-deduction/)</sup>。

## 历史发展

形式系统所由生长的公理化传统贯穿于戈特洛布·弗雷格（Gottlob Frege）1879年的《概念文字》及其《算术基本定律》——后者于1893年和1903年分两卷出版，其系统因罗素悖论而失效<sup>[9](https://frege.info/basiclaws/index.html)</sup>。阿尔弗雷德·诺思·怀特海（Alfred North Whitehead）与伯特兰·罗素（Bertrand Russell）的《数学原理》于1910年、1912年和1913年分三卷出版，写作目的是为逻辑主义辩护——即数学在某种重要意义上可归约为逻辑这一主张——并且为避免悖论而引入了分支类型论<sup>[10](https://plato.stanford.edu/entries/principia-mathematica/)</sup>。大卫·希尔伯特（David Hilbert）1899年的《几何基础》将公理化方法应用于几何学，并影响了20世纪整个数学界的思考<sup>[11](https://www.sciencedirect.com/science/chapter/edited-volume/abs/pii/B9780444508713501364)</sup>。

**希尔伯特纲领。** 为了一劳永逸地解决数学的基础问题，希尔伯特于1921年提出了一个分为两部分的计划：通过形式系统将经典数学公理化，然后仅以严格有穷的方法确立这些系统的一致性。<sup>[12](https://philsci-archive-dev.library.pitt.edu/2547/)</sup>希尔伯特认为，公理理论的首要要求是表明，在每一个知识领域内，基于底层公理系统的矛盾是绝对不可能的<sup>[13](https://plato.stanford.edu/archives/fall2019/entries/hilbert-program/)</sup>。在1917年至1921年的一系列课程中，希尔伯特在保罗·贝尔奈斯（Paul Bernays）和贝曼的协助下，对形式逻辑作出了重大贡献，奠定了现代数理逻辑及证明论这一新学科的基础<sup>[13](https://plato.stanford.edu/archives/fall2019/entries/hilbert-program/)</sup><sup> • </sup><sup>[14](https://www.cambridge.org/core/journals/bulletin-of-symbolic-logic/article/abs/hilberts-programs-19171922/FADF4352E1EB7424EF4D86721CC54352)</sup>。按这种观点，形式系统本身可以作为数学对象，由内容性的、有穷的理论来研究，这种进路有时被称为形式主义，有时被称为有穷主义<sup>[15](https://ndpr.nd.edu/reviews/hilbert-s-programs-and-beyond/)</sup>。

## 不完备性

1931年，哥德尔（Gödel）发表了一篇论文，在《数学原理》一致的假设下证明，算术的某些真语句在该形式系统内不可证明，而他的技巧可推广到任何含有适度算术的形式系统<sup>[16](https://plato.stanford.edu/archives/spr2026/entries/proof-theory/index.html)</sup>。根据第一不完备定理，每一个一致的形式系统 F，只要强到足以表达一定量的算术，就含有 F 的语言中的语句，这些语句在 F 中既不能被证明也不能被反驳。第二定理则断言，如果这样一个系统事实上是一致的，它就无法证明自身的一致性<sup>[1](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)</sup><sup> • </sup><sup>[21](https://plato.stanford.edu/entries/goedel-incompleteness/)</sup>。

一种常见的误解是把第一定理读作表明存在着完全无法证明的真理。这些定理关涉的是特定形式系统中的可推导性：对于在系统 F 中不可证明的任何语句，平凡地存在着其他系统使之可证明，只需把它取作公理即可。然而，确实存在甚至在 ZFC——集合论的标准公理系统——中也不可证明的算术真理，因此证明它们需要超出寻常数学公理的方法<sup>[1](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)</sup>。

第二定理在一个被认为非常可信的假设下——即有穷主义数学包含于算术、分析或集合论的某一形式理论之中——驳倒了希尔伯特纲领的总体抱负<sup>[16](https://plato.stanford.edu/archives/spr2026/entries/proof-theory/index.html)</sup>。哥德尔后来指出，使他确信自己的不完备定理完全具有普遍性、从而驳倒了希尔伯特纲领的，主要是图灵（Turing）的贡献——首先是图灵1937年所给出的关于形式系统的精确且无可争议地令人满意的定义。<sup>[17](https://plato.stanford.edu/entries/goedel/incompleteness-hilbert.html)</sup>第二定理的第一个详细证明出现在希尔伯特与贝尔奈斯1939年的著作中（主要由贝尔奈斯撰写），针对的是皮亚诺算术这一特定理论；如今标准的可推导性条件则由勒布（Löb）于1955年提出<sup>[18](https://plato.stanford.edu/archives/spr2026/entries/goedel-incompleteness/index.html)</sup>。

## 实践中的形式系统

机械可检验推导这同一观念如今贯穿于证明助手之中，即实现形式系统并对照它检验证明的软件。Isabelle 是一个通用证明助手，其主要应用是数学证明的形式化与形式验证，包括证明计算机硬件和软件的正确性<sup>[19](https://www.isabelle.in.tum.de/website-Isabelle2021/overview.html)</sup>。Lean 项目由 Leonardo de Moura 于2013年在微软研究院发起，Lean 0.1 于2014年6月16日发布；其目标是把一个小的、可独立实现的逻辑内核所提供的可信性与自动化工具的便利结合起来。Lean 4 于2023年9月8日发布，是自举的，其实现代码约90%用 Lean 写成，其社区库 Mathlib 于2023年移植到 Lean 4，已增长到超过150万行形式化数学<sup>[4](https://lean-lang.org/doc/reference/latest/Introduction/)</sup>。

在证明助手中构建的形式系统已被应用于软件本身。CompCert 是一个从 C 语言的一大子集到 PowerPC 汇编代码的编译器，用 Coq 证明助手开发并验证，带有机器检验的语义保持证明：生成的代码按照源程序语义所规定的方式运行<sup>[5](https://6826.csail.mit.edu/2017/papers/compcert-CACM.pdf)</sup>。seL4 微内核由8700行 C 代码和600行汇编代码组成，其功能正确性已被形式验证<sup>[6](https://researchportalplus.anu.edu.au/en/publications/sel4-formal-verification-of-an-operating-system-kernel/)</sup>。2025年的一篇立场论文主张，以能够验证推理正确性并提供自动反馈的证明助手为基础的形式数学推理，应当成为未来数学人工智能不可或缺的组成部分<sup>[20](https://proceedings.mlr.press/v267/yang25az.html)</sup>。

## References

1. [Gödel's Incompleteness Theorems, Stanford Encyclopedia of Philosophy](https://plato.stanford.edu/archives/sum2020/entries/goedel-incompleteness/)
2. [Mathematical Logic: Formal Systems and Proofs, calc-path.com](https://calc-path.com/mathematical-logic/modules/formal-systems)
3. [Relationship between sequent calculus and Hilbert systems, natural deduction, Mathematics Stack Exchange](https://math.stackexchange.com/questions/3005369/relationship-between-sequent-calculus-and-hilbert-systems-natural-deduction-et/3005976)
4. [The Lean Language Reference, Introduction](https://lean-lang.org/doc/reference/latest/Introduction/)
5. [Xavier Leroy, Formal verification of a realistic compiler, CACM](https://6826.csail.mit.edu/2017/papers/compcert-CACM.pdf)
6. [seL4: Formal verification of an operating-system kernel, ANU](https://researchportalplus.anu.edu.au/en/publications/sel4-formal-verification-of-an-operating-system-kernel/)
7. [The Development of Proof Theory, Stanford Encyclopedia of Philosophy](https://plato.stanford.edu/entries/proof-theory-development/)
8. [Natural Deduction Systems in Logic, Stanford Encyclopedia of Philosophy](https://plato.stanford.edu/entries/natural-deduction/)
9. [Basic Laws of Arithmetic, frege.info](https://frege.info/basiclaws/index.html)
10. [Principia Mathematica, Stanford Encyclopedia of Philosophy](https://plato.stanford.edu/entries/principia-mathematica/)
11. [David Hilbert, Grundlagen der Geometrie, first edition (1899), ScienceDirect](https://www.sciencedirect.com/science/chapter/edited-volume/abs/pii/B9780444508713501364)
12. [Hilbert's program then and now, PhilSci-Archive](https://philsci-archive-dev.library.pitt.edu/2547/)
13. [Hilbert's Program, Stanford Encyclopedia of Philosophy (Fall 2019)](https://plato.stanford.edu/archives/fall2019/entries/hilbert-program/)
14. [Wilfried Sieg, Hilbert's Programs: 1917–1922, Bulletin of Symbolic Logic](https://www.cambridge.org/core/journals/bulletin-of-symbolic-logic/article/abs/hilberts-programs-19171922/FADF4352E1EB7424EF4D86721CC54352)
15. [Review of Wilfried Sieg, Hilbert's Programs and Beyond, Notre Dame Philosophical Reviews](https://ndpr.nd.edu/reviews/hilbert-s-programs-and-beyond/)
16. [Proof Theory, Stanford Encyclopedia of Philosophy (Spring 2026)](https://plato.stanford.edu/archives/spr2026/entries/proof-theory/index.html)
17. [Did the Incompleteness Theorems Refute Hilbert's Program?, Stanford Encyclopedia of Philosophy](https://plato.stanford.edu/entries/goedel/incompleteness-hilbert.html)
18. [Gödel's Incompleteness Theorems, Stanford Encyclopedia of Philosophy (Spring 2026)](https://plato.stanford.edu/archives/spr2026/entries/goedel-incompleteness/index.html)
19. [Isabelle Overview](https://www.isabelle.in.tum.de/website-Isabelle2021/overview.html)
20. [Yang et al., Position: Formal Mathematical Reasoning—A New Frontier in AI, ICML 2025](https://proceedings.mlr.press/v267/yang25az.html)
21. [Gödel’s Incompleteness Theorems (Stanford Encyclopedia of Philosophy)](https://plato.stanford.edu/entries/goedel-incompleteness/)

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

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › Formal logic and foundations › Logical calculi and logical syntax

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/formal-system

English original: https://www.edgepedia.org/formal-system
