M =def= Y (\m n. n m n)In fact the equation
M ([true] N P) = N M Nis satisfied if the equation
M N = N M Nis satisfied, and the latter is satisfied if is satisfied if the equation
M = (\m n. n m n) Mis satisfied. This is a fixpoint equation that can be solved by applying the fixpoint operator Y.
fibo = \x. if x = 0 then 1 else if x = 1 then 1 else fibo(x-1) + fibo(x-2)hence we can define
[fibo] =def= Y (\f x. [if_then_else] ([is_zero] x)
[1]
([if_then_else] ([is_zero] ([predecessor] x))
[1]
([plus] (f ([predecessor] x)) (f ([predecessor] ([predecessor] x))))
)
)
M -> M -> M -> ...Note: In the text which was distributed in class, by mistake I wrote M ->> M instead of M -> M (which was my intention and corresponds to the sentence "M is beta-reducible to itself"). Therefore the answers "false" here and in the last question of this exercise, with the motivation that ->> is reflexive, are also considered correct.
M -> \z.z
Note that T1 and T2 in general are not identical, because in the Curry system the same term can have different types.