Domanda

I have the following expression and need help doing the reduction. The left hand expression has to equal to the right hand expression.

  1. (λn.(λs.(s (λx.λy.y))n) λx.x)(λx.λy.y) = λx.x
  2. (λn.(λs.(s (λxy.y))n) λx.x)(λxy.y) = λx.x
È stato utile?

Soluzione

Here are the reduction steps for each:

(λn.(λs.(s (λx.λy.y))n) λx.x)(λx.λy.y)
(λs.(s (λx.λy.y)) λx.x)(λx.λy.y)
(λx.x (λx.λy.y))(λx.λy.y)
(λx.λy.y)(λx.λy.y)
λy.y

(λn.(λs.(s (λxy.y))n) λx.x)(λxy.y) 
(λs.(s (λxy.y)) λx.x)(λxy.y)
(λx.x (λxy.y))(λxy.y)
λxy.y (λxy.y) 
λy.y

Side note: 1 and 2 are equivalent since (λx.λy.y) = (λxy.y)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top