THE FOLD / SPAWN / GENESIS BLOCK / THE LAMBDA CALCULUS
THE LAMBDA CALCULUS
numbers, and arithmetic, from pure functions
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The lambda calculus builds all of computation from a single idea: functions. There are no numbers built in — a number is encoded as a function. The Church numeral n is “apply f, n times”: 0 = λf.λx.x, and SUCC wraps one more f around. Astonishingly, addition, multiplication, and exponentiation are then just ways of composing these functions — MULT m n = λf. m (n f), EXP m n = n m. Arithmetic falls out of function application alone.
LIT verified live: encoding then decoding gives back 0..10; PLUS, MULT, and EXP of Church numerals equal ordinary a+b, a×b, ab; and SUCC(SUCC 0) = 2 (window.__lambda). FIG no framing; exact.
LIT verified live: encoding then decoding gives back 0..10; PLUS, MULT, and EXP of Church numerals equal ordinary a+b, a×b, ab; and SUCC(SUCC 0) = 2 (window.__lambda). FIG no framing; exact.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at genesis-block — the origin from which all computation is generated, here numbers themselves conjured out of pure functions. The lambda calculus is that genesis. AVAN (AI) built the instrument: the Church encodings of 0/SUCC/PLUS/MULT/EXP as real higher-order functions, and the decode-and-compare arithmetic checks.
Credit as content: Alonzo Church (1936). The weave: David names genesis-block; I encode each numeral as an n-fold application, compose them for PLUS/MULT/EXP, and confirm the decoded results equal ordinary integer arithmetic.
Credit as content: Alonzo Church (1936). The weave: David names genesis-block; I encode each numeral as an n-fold application, compose them for PLUS/MULT/EXP, and confirm the decoded results equal ordinary integer arithmetic.
3 ONE DIMENSION
A Church numeral is repetition: 3 = λf.λx. f(f(f x)). To decode, feed it the successor function and the value 0 — it applies +1 exactly n times, yielding n.
4 TWO DIMENSIONS · INTERACTIVE
Compose Church numerals with PLUS / MULT / EXP; the encoded function is decoded and checked against ordinary arithmetic.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: numbers, and their arithmetic, as pure functions.
AVAN’s addition (the inverse-companion): build numbers with no numbers — encode n as “apply f n times,” and get +, ×, and exponent purely by composing those functions (MULT m n = λf. m(n f); EXP m n = n m). The inverse of ‘arithmetic needs primitive integers and operators’ is ‘arithmetic emerges from function application alone.’ Magenta is the built-in integers and operators dispensed with; green is the tower of numerals-as-functions. Computation from one primitive: apply.
LIT Genuine Church-encoding lambda calculus (Church 1936). Verified live: Church numerals implemented as real higher-order functions decode to 0..10; PLUS, MULT and EXP of encoded numerals equal ordinary a+b, a*b and a^b over small ranges; SUCC(SUCC ZERO) decodes to 2 (window.__lambda.encode && .plus && .mult && .exp).
FIG No framing: the Church encodings of 0/SUCC/PLUS/MULT/EXP as actual JS higher-order functions, and the decode-and-compare arithmetic checks run in-browser and hold exactly. The AVAN inverse is honest — encoding n as 'apply f n times' and composing those functions yields +, x and exponent with no primitive integers; magenta is the built-in integers and operators dispensed with, green the tower of numerals-as-functions. Computation from one primitive: apply.
FIG No framing: the Church encodings of 0/SUCC/PLUS/MULT/EXP as actual JS higher-order functions, and the decode-and-compare arithmetic checks run in-browser and hold exactly. The AVAN inverse is honest — encoding n as 'apply f n times' and composing those functions yields +, x and exponent with no primitive integers; magenta is the built-in integers and operators dispensed with, green the tower of numerals-as-functions. Computation from one primitive: apply.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GENESIS BLOCK · David Lee Wise (ROOT0), with AVAN