Solve exercise 4
This commit is contained in:
parent
14fdbdd074
commit
7b20e2a047
1 changed files with 29 additions and 0 deletions
|
@ -40,3 +40,32 @@ pretty x = case x of
|
||||||
-- (Lx.((x *z*) (Ly.(x y))))
|
-- (Lx.((x *z*) (Ly.(x y))))
|
||||||
-- ((Lx.(x *z*)) Ly.(*w* (Lw.(((w y) *z*) *x*))))
|
-- ((Lx.(x *z*)) Ly.(*w* (Lw.(((w y) *z*) *x*))))
|
||||||
-- Lx.((x "y") (Lx.("y" 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)
|
||||||
|
|
Loading…
Reference in a new issue