Booleans & Pairs
Advanced Logic Data
No booleans either — so they get built too. The idea: true and false are choosers. A boolean is a function of two options that returns one of them.
The choosers
IF TRUE a b unfolds to TRUE a b →
a. The boolean is the if-statement — no
if keyword required.
The connectives
Pairs: data at last
A pair is a function waiting for a chooser. The two values sit inside until you pass in TRUE or FALSE to fish one out:
if, logic gates, and a
data structure — enough to start building lists. All from the one
substitution rule. This is the moment the λ-calculus stops looking
like a toy and starts looking like a computer.
IF FALSE x y → ___
λx.λy.y encodes…
SND (PAIR a b) → ___
A Church boolean is best described as…
Next: recursion · Back: Church numerals