--- title: "不动点组合子 (Y-Combinator)" type: concept tags: [lambda-calculus, recursion, computer-science, formalization] --- ## Definition 不动点组合子(fixed-point combinator)是 λ 演算中实现递归的经典构造。最常用的 Y 组合子定义为: $$Y \equiv \lambda f.(\lambda x.f(x,x))(\lambda x.f(x,x))$$ ## Core Insight Y 组合子允许用匿名函数(lambda)表达递归:用"将函数作为参数传入自身"的方式,绕过匿名函数无法直接引用自身名字的限制。 ## Application in Recursive Self-Optimizing Systems 在递归自优化生成系统中,Y 组合子用于形式化"用自身定义自身"的生成器: $$G^* \equiv Y\;\text{STEP}$$ 其中 $\text{STEP}$ 是单步更新函数: $$\text{STEP} \equiv \lambda G.\;(M\;G)\big((O\;(G\;I));\Omega\big)$$ 展开后: $$Y\;\text{STEP} = \text{STEP}\;(Y\;\text{STEP})$$ 这正是自引用不动点方程 $G^* = \Phi(G^*)$ 的 λ 演算实现。 ## Why It Matters - 传统编程:函数通过名字递归调用自己 - λ 演算/Y 组合子:递归是函数的内在属性,不依赖名字 - 自优化系统:生成器的"自我改进"能力通过不动点语义内化,无需外部引用 ## Source - [[A Formalization of Recursive Self-Optimizing Generative Systems]]