Given appropriate encodings of TRUE, FALSE, and IF, which one of the following definitions correctly encodes the Boolean operator OR in the λ calculus?
OR = λp.λq.(((IF p) TRUE) q)
OR = λp.λq.(((IF p) FALSE) q)
OR = λp.λq.(((IF TRUE) p) q)
OR = λp.λq.(((IF FALSE) p) q)
OR = λp.λq.(((IF TRUE) q) p)
OR = λp.λq.(((IF FALSE) q) p)
Recall that, in the chosen encoding, TRUE is a curried function of two arguments that returns its first argument.
Similarly, FALSE is a curried function of two arguments that returns its second argument.
Observe that IF is a curried function of three arguments, namely a Boolean expression, the value of the then expression, and the value of the else expression, in this order.
Pick the expression that implements the semantics of the Boolean OR using appropriate function calls in the λ calculus, given the above conventions.