Cálculo Lambda
-
Escribir las siguientes expresiones con el menor número de paréntesis posible:
(λx.(λy.(λz.((x z) (y z)))))
(((a b) (c d)) ((e f) (g h)))
(λx.((λy.(y x)) (λv.v) z) u) (λw.w)
-
Restaurar todos los paréntesis descartados en las siguientes expresiones:
x x x x
λx.x λy.y
λx.(x λy.y x x) x
-
Para las siguientes expresiones lambda:
- Identificar las ocurrencias de variables libres y ligadas.
- Reducir a su forma normal aplicando las reglas alfa, beta y eta, utilizando orden normal y orden aplicativo, y comparar los resultados.
( λx.( ( λ y.y ) x ) ) z
( λx.λy.x y ) ( z y )
( λx.λy.x ) x y
( λx.( ( λ z.z x ) ( λ x.x ) ) ) y
( λx.( ( λ y.x y ) z ) ) ( λx.x y )
( ( λy.( λx.( ( λ x.λy.x ) x ) ) y ) M ) N
( λx.λy.λx.x y z ) (λx.λy.y) M N
( ( λx.( λy.λz.z ) x ) ( ( λ x.x x x ) ( λ x.x x x ) ) ) x
-
Probar que:
C I = λy z.z y
K I = O
S (K S) K = B
-
Definir en Cálculo Lambda las siguientes operaciones lógicas: NOR, NAND, XNOR, y verificar para cada una su tabla de verdad.
-
Verificar que:
Pred 5 = 4
IsZero 2 = False
Add 2 3 = 5
Sub 3 1 = 2
Mul 2 3 = 6
Div 6 2 = 3
Pow 2 3 = 8
Fibo 6 = 8
Fact 3 = 6
-
¿Por qué a
(Y K)
se lo conoce como el Pac-Man? Reducir(Y K) a b c d
usando la estrategia Call-by-name. -
Reducir
YO
y confirmar que se haya traducido al inglés.