"free variable" 和 "free occurrence of a variable" 在 lambda 演算上下文中的区别

Difference between "free variable" and "free occurrence of a variable" in context of lambda calculus

在 lambda 演算的上下文中,自由变量和变量的自由出现之间有什么区别吗?如果是,那么请用一两个例子来解释。 实际上,我在查看 lambda 表达式的转换规则时遇到了以下行:

In stating the conversion rules the notation E[E'/V] is used to mean the result of substituting E' for each free occurrence of V in E

让我们以术语 T 为例:

t\q\p\ (t x (x\ q x) (p q x)

(其中 x\t 表示 lambda x.t - 这是 Lambda-Prolog 表示法)

一个个自由变量:x,还有四个个绑定变量,其中一个也叫x。但是这两个 "x" 是 而不是 相同的 变量(在这个意义上,该术语可以被 alpha 重命名为 t\q\p\ (t x (y\ q y) (p q x) 但不是,例如:t\q\p\ (t x (y\ q y) (p q y)

在上面的项 T 中,变量 x 有 两次 次自由出现,另一个变量(也称为 x)有一次出现。

现在,如果你的问题是 "can there be, in the same term, both free occurrences and bound occurrences of the same variable, be it bound or free?",我不这么认为。