Files
nexus/wiki/concepts/不动点组合子-Y-Combinator.md

1.3 KiB
Raw Blame History

title, type, tags
title type tags
不动点组合子 (Y-Combinator) concept
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