Lambda Calculus Encodings
Booleans
The pure
Let us start by encoding constants and operators for booleans. That is, we want to define functions TRUE, FALSE, AND, NOT, IF, and other operators that behave as expected. For example:
Let’s start by defining TRUE and FALSE:
Thus, both TRUE and FALSE are functions that take two arguments; TRUE returns the first, and FALSE returns the second. We want the function IF to behave like
The definitions for TRUE and FALSE make this very easy.
Definitions of other operators are also straightforward.
Church numerals
Church numerals encode a number
In the definition for SUCC, the expression