Associativity in lambda calculus

I am working on exercise questions for the calculus of lambda . One of the issues that I'm stuck proves the following: Show that the application is not associative; in fact, x (yz) is not equal to (xy) z

Here is what I have worked so far:

Let x = λa.λb. ab
Let y = λb.λc. bc
Let z = λa.λc. ac

(xy)z => ((λa.λb. ab) (λb.λc. bc)) (λa.λc. ac)    
=> (λb. (λb.λc. bc) b) (λa.λc. ac)    
=> (λb.λc. bc) (λa.λc. ac)    
=> (λc. (λa.λc. ac) c)

x(yz) => (λa.λb. ab) ((λb.λc. bc) (λa.λc. ac))    
=> (λb. ((λb.λc. bc) (λa.λc. ac)) b)    
=> (λb. (λc. (λa.λc. ac) c) b)

It is right? Please help me understand.

+3
source share
4 answers

The findings seem accurate at a glance.

, , x, y z , , , . , x " 2", y " 2", "double". x (yz) = ' 2' (xy) z = ' 1'.

+1

, . , -:

x = λa.n y, z, :

(xy) z = > ((λa.n) y) z = > n z
x (yz) = > (λa.n) (y z) = > n

+3

, , , ?

, (xy) z = x (yz),

x = λa.λb. a     # x = const
y = λa. -a       # y = negate
z = 1            # z = 1

, ((xy) z) 0 ≠ (x (yz)) 0.

+1

, Barendregt, ( ), .

, x, y z , x (y z) =\xy.x (x y) z false =\xy.y

, . x =\z.true z = =\z.z(y ).

, ? , : , . , true = false, .

, M N, true = false,

                         true M N = false M N

true M N M, false M N N,

                              M = N

Therefore, if true = false, all members will be equal, and the calculus will be trivial. Since we can find non-trivial models of lambda calculus, such models can equate truth and falsehood (in a more general sense, this can refer to terms with different normal forms, which will require us to talk about the technique of battle).

0
source

Source: https://habr.com/ru/post/1750928/


All Articles