Detailed Discussion of Addition and Multiplication

The process of evaluating lambda-expressions is just the opposite of programming:

**Programming**consists mainly of- defining abstractions,
- referencing these abstractions and
- combining abstractions by performing a synthesis.

- In the process of
**evaluation**the essential steps are:- substituting references of abstractions by the abstractions themselves and
- performing a synthesis of these abstractions with their arguments.

- Addition of the numbers `two' and `three'
- Synthesis of `add' and `two three' (1)
- Abstraction `add' (1)
- Subsitution of `add' in [1]
- Synthesis of (lambda(m n) ... ) and `two three' in [3]
- Abstraction: `compose'
- Substitution of `compose' in [4]
- Synthesis of (lambda(f g) ...) and `(two f) (three f)' in [6]
- Abstraction `three'
- Substituting `three' in [7]
- Synthesis of (lambda(f) ...) and `f' in [9]
- Synthesis of (lambda(x) ...) and `x' in [10]
- Abstraction `two'
- Substituting `two' in [11]
- Synthesis of (lambda(f) ...) and `f' in [13]
- Synthesis of the inner (lambda(x) ...) and `(f (f (f x)))' in [14]

- Multiplication of the numbers `two' and `three'
- Synthesis of `mult' and `two three'
- Abstraction `mult'
- Substitution of `mult' in [17]
- Synthesis of (lambda(m n) ... ) and `two three' in [19]
- Abstraction `compose'
- Substitution of `compose' in [20]
- Synthesis of (lambda(f g) ...) and `two three' in [22]
- Abstraction `two'
- Abstraction `three'
- Substitution of `two' and `three' in [23]
- Synthesis of the inner (lambda(f) ...) and `x' in [26]
- Synthesis of (lambda(f) ...) and `(lambda(x0) ...)' in [28]
- Synthesis of the inner (lambda(x0) ...) and `x1'
- Synthesis of (lambda(x0) ...) and `(x(x(x x1)))'
- Renaming the variables: x - f und x1 - x

Georg P. Loczewski 2004-03-05