Skip to content

Commit 22fd4d7

Browse files
paragraph on normal order reduction in Untyped chapter (#962)
The reduction strategy implemented by `progress` corresponds to the well-known normal order reduction. This PR proposes a few paragraph that discuss normal order reduction. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 4678abc commit 22fd4d7

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/plfa/part2/Untyped.lagda.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,19 @@ application.
576576

577577
# Evaluation
578578

579+
We already observed that reduction in the untyped lambda calculus is
580+
non-deterministic. However, the `progress` function is deterministic and
581+
thus it picks one particular reduction sequence out of many possible ones.
582+
In other words, `progress` implements a _reduction strategy_ that searches
583+
for the next redex in a top-down traversal of the term, visiting any subterms
584+
from left to right. It reduces the first redex that it encounters on this
585+
traversal.
586+
587+
The strategy implemented by `progress` is known as _normal order reduction_
588+
or _leftmost outermost reduction_. It has the pleasing property that
589+
if any reduction sequence terminates in a normal form, then
590+
normal order reduction terminates in the same normal form.
591+
579592
As previously, progress immediately yields an evaluator.
580593

581594
We relate gas to the number of steps in a reduction sequence.

0 commit comments

Comments
 (0)