Solve exercise 4

This commit is contained in:
Manuel Thalmann 2024-06-17 00:20:32 +02:00
parent 14fdbdd074
commit 7b20e2a047

View file

@ -40,3 +40,32 @@ pretty x = case x of
-- (Lx.((x *z*) (Ly.(x y))))
-- ((Lx.(x *z*)) Ly.(*w* (Lw.(((w y) *z*) *x*))))
-- Lx.((x "y") (Lx.("y" x)))
--------------------
-- Exercise 4
--------------------
----------
-- 1.)
----------
-- (((Lz.z) (Ly.yy)) (Lx.xa))
-- ((Ly.yy) (Lx.xa))
-- (Lx.xa (Lx.xa))
-- (Lx.xa) a
-- (a a)
----------
-- 2.)
----------
-- (Lx.(x x))(Ly.(y x)) z
-- (Ly.(y x)) (Ly.(y x)) z
-- ((Ly.(y x)) x) z
-- (x x) z
-- x x z
----------
-- 3.)
----------
-- ((Lx.(x x))(Ly.y))(Ly.y)
-- ((Ly.y Ly.y))(Ly.y)
-- (Ly.y)(Ly.y)
-- (Ly.y)