# 递归定理不动点

在可计算性理论中，**递归定理不动点**是指一个程序索引 \( n \)，使得某个全可计算函数 \( f \) 将其映射到同一个部分函数的索引，从而 \( \varphi_n = \varphi_{f(n)} \)。克林第二递归定理保证，每一个全可计算的程序变换都存在这样的不动点，它是可计算性理论中程序自引用的标准形式化。<sup>[1](https://home.csulb.edu/~tebert/teaching/lectures/419-519/recursion/recursion.pdf)</sup><sup> • </sup><sup>[2](https://plato.stanford.edu/archives/fall2022/entries/recursive-functions/)</sup>

| 关键事实 | 详情 |
|---|---|
| 陈述 | 对每个全可计算一元函数 \( f \)，存在数 \( n \in \mathbb{N} \) 使得 \( \varphi_n = \varphi_{f(n)} \)；称 \( n \) 为 \( f \) 的不动点<sup>[1](https://home.csulb.edu/~tebert/teaching/lectures/419-519/recursion/recursion.pdf)</sup> |
| 别名 | 递归定理有时也称为不动点定理<sup>[2](https://plato.stanford.edu/archives/fall2022/entries/recursive-functions/)</sup> |
| 证明要素 | s-m-n 定理提供一个全可计算的专门化函数，用于构造自引用程序<sup>[3](https://alphabetamath.cc/computability-theory/acceptable-numberings-smn-and-the-recursion-theorem)</sup> |
| 构造性证明 | 克林1938年的证明是构造性的，本质上构造了一个自复制程序<sup>[4](https://arxiv.org/abs/1309.5128)</sup> |
| 奎因应用 | 每个图灵完备的编程语言都允许奎因，即输出自身源代码的程序，而构造性证明给出显式的奎因<sup>[5](https://jdh.hamkins.org/wp-content/uploads/Computational-self-reference-and-the-universal-algorithm-QMUL-2019-1.pdf)</sup> |
| 逻辑类比 | 该定理是哥德尔-卡尔纳普不动点引理的可计算性类比，后者对每个公式 \( \varphi(x) \) 产生一个句子 \( \sigma \) 使得 \( \sigma \leftrightarrow \varphi(\ulcorner\sigma\urcorner) \)<sup>[5](https://jdh.hamkins.org/wp-content/uploads/Computational-self-reference-and-the-universal-algorithm-QMUL-2019-1.pdf)</sup> |
| 一般性 | 叶尔绍夫证明递归定理对任何预完备编号都成立，不仅限于标准哥德尔编号<sup>[6](https://arxiv.org/abs/1809.06233)</sup> |

## 陈述与含义

固定部分可计算函数的一个可接受编号 \( (\varphi_e)_{e \in \mathbb{N}} \)，使得每个自然数 \( e \) 命名一个计算 \( \varphi_e \) 的程序。一个可计算的**程序变换器**是一个全可计算函数 \( f \)，它接受索引 \( e \) 并返回新程序的索引 \( f(e) \)。克林第二递归定理指出，每个这样的变换器都有不动点：某个程序 \( n \) 计算的函数与经变换得到的程序 \( f(n) \) 完全相同。<sup>[1](https://home.csulb.edu/~tebert/teaching/lectures/419-519/recursion/recursion.pdf)</sup><sup> • </sup><sup>[3](https://alphabetamath.cc/computability-theory/acceptable-numberings-smn-and-the-recursion-theorem)</sup>

不动点是一个数，不是函数，而且不必唯一。关于该定理的一个练习要求证明存在无穷多个值 \( e \) 使得 \( \varphi_e(y) = f(e, y) \)，这表明不动点通常以无限族的形式出现。<sup>[1](https://home.csulb.edu/~tebert/teaching/lectures/419-519/recursion/recursion.pdf)</sup>

## 证明思路

标准证明使用一个**自引用**构造：编写一个能够引用自身哥德尔数的程序。给定全可计算函数 \( f \)，编写一个程序 \( P \)，它在输入 \( x \) 上首先计算 \( y = f(\text{self}) \)，然后模拟程序 \( P_y \) 在 \( x \) 上的运行并返回其输出。如果 \( e \) 是 \( P \) 的哥德尔数，那么 \( \varphi_y = \varphi_{f(\text{self})} = \varphi_{\text{self}} \)，所以 \( n = \text{self} \) 是 \( f \) 的不动点。<sup>[1](https://home.csulb.edu/~tebert/teaching/lectures/419-519/recursion/recursion.pdf)</sup>

自引用构造本身的存在性依赖于 s-m-n 定理，它给出一个全可计算的专门化函数：人们编写一个程序，其中提到自身索引的占位符，s-m-n 定理将其转换为一个索引，其中占位符被程序自身的编号填充。<sup>[3](https://alphabetamath.cc/computability-theory/acceptable-numberings-smn-and-the-recursion-theorem)</sup><sup> • </sup><sup>[7](https://saadquader.wordpress.com/2013/02/07/kleenes-recursion-theorem/)</sup>克林1938年对该定理的证明是构造性的，本质上构造了一个自复制程序。<sup>[4](https://arxiv.org/abs/1309.5128)</sup>

## 自引用与奎因

不动点 \( n \) 有效地引用了自身：变换后的程序 \( f(n) \) 可以显式引用 \( n \)，而由于 \( n \) 和 \( f(n) \) 计算相同的函数，程序 \( n \) 的行为就好像它能够访问自身的源代码一样。<sup>[5](https://jdh.hamkins.org/wp-content/uploads/Computational-self-reference-and-the-universal-algorithm-QMUL-2019-1.pdf)</sup>在该定理成立的编程系统中，对于任何预先指定的算法任务，都存在一个程序，它创建自身的副本，然后使用该自身副本执行该任务；这样的程序被称为具有可用的自知识。<sup>[8](https://journals.sagepub.com/doi/10.3233/FI-2011-564)</sup>

最著名的应用是**奎因**，即打印自身源代码的程序。要构造一个，令 \( f(e) \) 为输出 \( e \) 作为其结果的程序的索引。由递归定理，存在程序 \( e \) 使得 \( e \) 和 \( f(e) \) 给出相同的输出，因此程序 \( e \) 输出 \( e \)，即其自身的索引。由于该定理的证明是构造性的，这个论证产生显式的奎因，并且该论证在每个图灵完备语言中都有效；由于 TeX 是图灵完备的，它允许奎因。通过组合子逻辑对奎因构造的分类解释了为什么所有奎因程序，在任何语言中，都“几乎相同，除了无关紧要的细节”。<sup>[5](https://jdh.hamkins.org/wp-content/uploads/Computational-self-reference-and-the-universal-algorithm-QMUL-2019-1.pdf)</sup><sup> • </sup><sup>[9](https://arxiv.org/abs/2309.09931)</sup>

## 应用

**不可判定性证明。** 该定理统一了一系列有效的对角线论证，并提供了赖斯定理及相关结果的简短证明：人们编写一个程序，就自身的索引咨询假想的判定器，然后以与判定器的答案相矛盾的方式行动。同样的自引用方法表明，最小程序的哥德尔数集合 \( M \)（即同一函数没有更小索引的程序）不是递归可枚举的。<sup>[2](https://plato.stanford.edu/archives/fall2022/entries/recursive-functions/)</sup><sup> • </sup><sup>[1](https://home.csulb.edu/~tebert/teaching/lectures/419-519/recursion/recursion.pdf)</sup><sup> • </sup><sup>[1](https://home.csulb.edu/~tebert/teaching/lectures/419-519/recursion/recursion.pdf)</sup>

**复杂性理论。** 自引用构造给出了时间层次定理的一个相对简单的证明：对于可在 \( O(t(n)) \) 步内计算的可计算时间界 \( t(n) \geq n \log n \)，存在一个可在 \( O(t(n)) \) 步内判定但不能在 \( o(t(n)/\log n) \) 步内判定的判定问题。推论是，对于任何 \( k \geq 2 \)，某个问题可在 \( O(n^k) \) 步内判定但不能在 \( O(n^{k-1}) \) 步内判定，例如一个可在三次时间内判定但不能在二次时间内判定的问题。<sup>[1](https://home.csulb.edu/~tebert/teaching/lectures/419-519/recursion/recursion.pdf)</sup>

**递归定义。** 该定理允许定义引用计算它们的程序的函数，形式化了程序作用于自身描述的现象。在逻辑中，递归定理是哥德尔-卡尔纳普不动点引理的可计算性对应物，后者是哥德尔不完备定理背后的对角线化装置。<sup>[10](https://www.sciencedirect.com/topics/computer-science/primitive-recursion)</sup><sup> • </sup><sup>[5](https://jdh.hamkins.org/wp-content/uploads/Computational-self-reference-and-the-universal-algorithm-QMUL-2019-1.pdf)</sup>

## 第一与第二递归定理

克林证明了两个递归定理。**第二递归定理（SRT）**，即上述不动点陈述，适用于一阶设定。**第一递归定理（FRT）** 需要高阶设定，涉及泛函的不动点；它总是产生最小不动点，而 SRT 并非总是如此。在某些情况下两个定理都适用，罗杰斯的一个较早结果允许将高阶泛函重新定义为标准形式，从而弥合两个定理之间的差距。<sup>[11](https://arxiv.org/abs/1602.06220)</sup>

## 推广与局限

该定理在编号的选择下是稳健的。叶尔绍夫在其编号理论中表明，克林的递归定理对任何预完备编号都成立，而预完备编号的不动点定理推广了经典陈述。<sup>[6](https://arxiv.org/abs/1809.06233)</sup>它还刻画了不可解度：一个图灵度中存在对角非递归（DNR）函数等价于递归定理对该度失效，而用柯尔莫哥洛夫复杂度表述的结果刻画了那些不再允许使用该定理的度。<sup>[12](https://arxiv.org/abs/0901.3933)</sup>

给定全可计算函数 \( f \) 的索引，满足 \( \varphi_n \simeq \varphi_{f(n)} \) 的不动点索引 \( n \) 可以从该索引有效地计算出来；该定理在程序自引用文献中以不一定构造性的形式陈述，尽管克林原始的证明方法对给定的 \( f \) 是构造性的。<sup>[8](https://journals.sagepub.com/doi/10.3233/FI-2011-564)</sup><sup> • </sup><sup>[4](https://arxiv.org/abs/1309.5128)</sup><sup> • </sup><sup>[13](https://plato.stanford.edu/entries/recursive-functions/)</sup>

## References

1. [Theorem 4 (Kleene's Second Recursion Theorem), lecture notes, California State University, Long Beach](https://home.csulb.edu/~tebert/teaching/lectures/419-519/recursion/recursion.pdf)
2. [Recursive Functions, Stanford Encyclopedia of Philosophy (Fall 2022 Edition)](https://plato.stanford.edu/archives/fall2022/entries/recursive-functions/)
3. [Acceptable Numberings, the s-m-n Theorem, and Recursion, Alphabeta Math](https://alphabetamath.cc/computability-theory/acceptable-numberings-smn-and-the-recursion-theorem)
4. [A Swiss Pocket Knife for Computability, arXiv:1309.5128](https://arxiv.org/abs/1309.5128)
5. [Computational self-reference and the universal algorithm, Joel David Hamkins, lecture slides, Queen Mary University of London](https://jdh.hamkins.org/wp-content/uploads/Computational-self-reference-and-the-universal-algorithm-QMUL-2019-1.pdf)
6. [Fixed point theorems for precomplete numberings, arXiv:1809.06233](https://arxiv.org/abs/1809.06233)
7. [Kleene's Recursion Theorem: A Proof for Beginners, Saad Quader](https://saadquader.wordpress.com/2013/02/07/kleenes-recursion-theorem/)
8. [Properties Complementary to Program Self-Reference, John Case and Samuel E. Moelius III, Fundamenta Informaticae (2011)](https://journals.sagepub.com/doi/10.3233/FI-2011-564)
9. [Algebra of Self-Replication, arXiv:2309.09931](https://arxiv.org/abs/2309.09931)
10. [Primitive Recursion, ScienceDirect Topics overview](https://www.sciencedirect.com/topics/computer-science/primitive-recursion)
11. [Kleene's Two Kinds of Recursion, arXiv:1602.06220](https://arxiv.org/abs/1602.06220)
12. [Kolmogorov complexity and the Recursion Theorem, Kjos-Hanssen, Merkle, and Stephan, arXiv:0901.3933](https://arxiv.org/abs/0901.3933)
13. [Recursive Functions (Stanford Encyclopedia of Philosophy)](https://plato.stanford.edu/entries/recursive-functions/)

---
*Initially written Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › Formal logic and foundations › Computability theory › Recursion theorem and self-reference

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/recursion-theorem-fixed-point

English original: https://www.edgepedia.org/recursion-theorem-fixed-point
