In lambda calculus, the predecessor function is surprisingly difficult, of course when compared with the successor, addition or multiplication.
- we start with a g-pattern and we reduce it sequentially
- at each step we identify first all the LEFT patterns from the following moves: beta, DIST, FAN-IN, LOC PR
- we do the moves only from LEFT to RIGHT
- repeat until no move available OR until conflict.
… And there is no conflict in the predecessor reduction.
In the post “What reduction is this?” I asked some questions, let me answer:
- what kind of evaluation strategy is this? NO EVALUATION STRATEGY, BECAUSE THERE ARE NO VALUES
- are there reduction steps and self-multiplication steps? NO, THEY MIX WITH NO EXTERNAL CONTROL
- is this in lambda calculus? NO, IS INSPIRED FROM, BUT BETTER
- what can we learn from this particular example? THAT IT WORKS WITHOUT EVALUATION STRATEGY, WITHOUT EXTERNAL CONTROL AND WITHOUT SIGNALS-THROUGH-WIRES-AND GATES.
This is a streamlined version of the reduction hidden in
PRED(3) –> 2
where numbers appear as stacks of pair FO and A nodes. They are “bare” numbers, in the sense that all the currying has been eliminated.
Admire the mechanical, or should I say chemical precision of the process of reduction (in chemlambda, stupid sequential strategy). In the following figure I eliminated all the unnecessary nodes and arrows and we are left now with the pure phenomenon.
I find amazing that it works even with this stupidest strategy. Shows that chemlambda is much better than anything on the market.
Let me tell again: this is outside IT fundamental assumption that everything is reduced at signals send through wires, then processed by gates.
It is how nature works.