简体   繁体   English

在lambda演算中“自由变量”和“变量的自由出现”之间的区别

[英]Difference between “free variable” and “free occurrence of a variable” in context of lambda calculus

Is there any difference between free variable and free occurrence of a variable in context of lambda calculus? 在lambda演算的上下文中,自由变量和变量的自由出现之间是否有区别? If yes, then please explain with an example or two. 如果是,请举例说明。 Actually I was going through the conversion rules for lambda expression where I came across the following line: 实际上,我正在经历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 在说明的转换规则,符号E[E'/V]用于指代的结果E'的每个自由出现VE

Let's take the term T: 我们以术语T:

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

(where x\\ t means lambda xt - this is Lambda-Prolog notation) (其中x \\ t表示lambda xt-这是Lambda-Prolog表示法)

There is one free variable: x, and four bound variables, one of which is also named x. 一个自由变量:x和四个绑定变量,其中一个也称为x。 But the two "x" are not the same variable (in the sense that the term can be alpha renamed to t\\q\\p\\ (tx (y\\ qy) (pqx) but not, for example, to: t\\q\\p\\ (tx (y\\ qy) (pqy) 但是两个“ x” 不是 相同的变量(在某种意义上,该术语可以用alpha重命名为t\\q\\p\\ (tx (y\\ qy) (pqx)但不能重t\\q\\p\\ (tx (y\\ qy) (pqx)为: t\\q\\p\\ (tx (y\\ qy) (pqy)

In the term T above, there are two free occurrences of the variable x and one bound occurrence of another variable, also named x. 在上面的术语T中,变量x有两个自由出现,另一个变量x也有一个绑定出现。

Now, if your question is "can there be, in the same term , both free occurrences and bound occurrences of the same variable, be it bound or free?", I don't think so. 现在,如果你的问题是“哪有,在同期 ,这两个自由出现和相同的变量绑定的事件,无论是绑定或免费的吗?”,我不这么认为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM