Reading preferences
Optional display controls need JavaScript. All reading content and navigation work without it.
Source file content/lambda-calculus/church-rosser/church-rosser.tex
Source file content/lambda-calculus/church-rosser/definitions-and-properties.tex
Definition and Properties
In this chapter we introduce the concept of Church--Rosser property and some common properties of this property.
Definition of the Church Rosser property
[Church--Rosser property, CR] A relation source on terms is said to satisfy the Church--Rosser property iff, whenever source and source, then there exists some source such that source and source.
We can view the lambda calculus as a model of computation in which terms in normal form are “values” and a reducibility relation on terms are the “calculation rules.” The Church--Rosser property states is that when there is more than one way to proceed with a calculation, there is still only a single value of the expression.
To take an example from elementary algebra, there's more than one way to calculate source. It can either be reduced to source (if we first reduce source to source) or to source (if we first reduce source using distributivity). Both of these, however, can be further reduced to source.
If we take source to be source-reduction, we easily see that a consequence of the Church--Rosser property is that if a term has a normal form, then it is unique. For suppose source can be reduced to source and source, both of which are normal forms. By the Church--Rosser property, there exists some source such that both source and source reduce to it. Since by assumption source and source are normal forms, the reduction of source and source to source can only be the trivial reduction, i.e., source, source, and source are identical. This justifies our speaking of the normal form of a term.
In viewing the lambda calculus as a model of computation, then, the normal form of a term can be thought of as the “final result” of the computation starting with that term. The above corollary means there's only one, if any, final result of a computation, just like there is only one result of computing source, namely source.
Church Rosser property passes to transitive closure
If a relation source satisfies the Church--Rosser property, and source is the smallest transitive relation containing source, then source satisfies the Church--Rosser property too.
Proof
Suppose
We will prove the theorem by constructing a grid source of terms of height is source and width source. We use source to denote the term in the source-th row and source-th column.
We construct source in such a way that source and source. It is defined as follows:
where source is a term such that source and source. By the Church--Rosser property of source, such a term always exists.
Now we have source and source. Note source is source and source is source. By definition of source the theorem follows.
Source file content/lambda-calculus/church-rosser/parallel-beta-reduction.tex
Parallel source-reduction
We introduce the notion of parallel source-reduction, and prove the it has the Church--Rosser property.
Four source rules for parallel beta reduction
[parallel source-reduction, source] Parallel reduction (source) of terms is inductively defined as follows:
Parallel source-reduction allows us to reduce any number of redices in a term in one step. It is different from source-reduction in the sense that we can only contract redices that occur in the original term, but not redices arising from parallel source-reduction. For example, the term source can only be parallel source-reduced to itself or to source, but not further to source, although it source-reduces to source, because this redex arises only after one step of parallel source-reduction. A second parallel source-reduction step yields source, though.
Reflexivity of parallel beta reduction
Proof
Exercise.
Exercise proving parallel beta reflexivity
Prove the theorem on reflexivity of parallel beta reduction.
Definition of beta complete development
[source-complete development] The source-complete development source of source is defined inductively as follows:
The source-complete development of a term, as its name suggests, is a “complete parallel reduction.” While for parallel source-reduction we still can choose to not contract a redex, for complete development we have no choice but to contract all of them. Thus the complete development of source is source, not itself.
Editorial
This definition has the problem that we haven't introduced how to define functions on (source-)terms recursively. Will fix in future.
Parallel beta reduction and substitution
Proof
By induction on the derivation of source.
The last step is the variable rule for parallel beta reduction: Exercise.
The last step is the abstraction rule for parallel beta reduction: Then source is source and source is source, where source. We want to prove that source, i.e., source. This follows immediately by the abstraction rule for parallel beta reduction and the induction hypothesis.
The last step is the application rule for parallel beta reduction: Exercise.
The last step is the contraction rule for parallel beta reduction: source is source and source is source. We want to prove that source, i.e., source. This follows by the contraction rule for parallel beta reduction and the induction hypothesis.
Exercise completing the parallel beta substitution proof
Complete the proof of the substitution compatibility lemma for parallel beta reduction.
Every parallel beta reduct reaches the complete development
Proof
By induction on the derivation of source.
The last rule is the variable rule for parallel beta reduction: Exercise.
The last rule is the abstraction rule for parallel beta reduction: source is source and source is source with source. We want to show that source, i.e., source by the abstraction equation for beta complete development. It follows by the abstraction rule for parallel beta reduction and the induction hypothesis.
The last rule is the application rule for parallel beta reduction:source is source and source is source for some source, source, source and source, with source and source. By induction hypothesis, we have source and source.
If source is source for some source and source, then source must be source for some source with source. By induction hypothesis we have source and source. Then source by the contraction rule for parallel beta reduction.
If source is not a source-abstract, then source by the application rule for parallel beta reduction, and the right-hand side is source by the non-redex application equation for beta complete development.
The last rule is the contraction rule for parallel beta reduction: source is source and source is source for some source, source, source, source, and source, with source and source. By induction hypothesis we know source and source. By the substitution compatibility lemma for parallel beta reduction we have source, the right-hand side of which is exactly source.
Exercise completing the beta complete development lemma
Complete the proof of the lemma that every parallel beta reduct reaches the complete development.
Church Rosser property for parallel beta reduction
source has the Church--Rosser property.
Proof
Immediate from the lemma that every parallel beta reduct reaches the complete development.
Source file content/lambda-calculus/church-rosser/beta-reduction.tex
source-reduction
One beta contraction is a parallel beta reduction
Proof
If source, then source is source, source is source, for some source, source, and source. Since source and source by the theorem on reflexivity of parallel beta reduction, we immediately have source by the definition of parallel beta reductionthe contraction rule for parallel beta reduction.
A parallel beta step can be serialized
Proof
By induction on the derivation of source.
The last rule is the variable rule for parallel beta reduction: Then source and source are just source, and source.
The last rule is the abstraction rule for parallel beta reduction: source is source and source is source for some source, source, source, where source. By induction hypothesis we have source. Then source (by the same series of source contractions as source).
The last rule is the application rule for parallel beta reduction: source is source and source is source for some source, source, source, source, where source and source. By induction hypothesis we have source and source. So source by the reduction sequence source followed by the reduction source.
The last rule is the contraction rule for parallel beta reduction: source is source and source is source for some source, source, source, source, source, where source and source. By induction hypothesis we get source and source. So source by source followed by source and finally contraction of source to source.
Beta reduction is the transitive closure of parallel beta reduction
source is the smallest transitive relation containing source.
Proof
Let source be the smallest transitive relation containing source.
source: Suppose source, i.e., source. By the lemma that one beta contraction is a parallel beta reduction, source. Since is source contains source and is transitive, source.
source: Suppose source, i.e., source. By the lemma serializing parallel beta reduction, source. Since source is transitive, source.
Church Rosser property for beta reduction
source satisfies the Church--Rosser property.
Proof
Immediate from the theorem that transitive closure preserves the Church Rosser property, the Church Rosser theorem for parallel beta reduction, and the lemma identifying beta reduction as the transitive closure of parallel beta reduction.
Source file content/lambda-calculus/church-rosser/parallel-beta-eta-reduction.tex
Parallel source-reduction
In this section we prove the Church-Rosser property for parallel source-reduction, the parallel reduction notion corresponding to source-reduction.
Five source rules for parallel beta eta reduction
[Parallel source-reduction, source] Parallel source-reduction (source) on terms is inductively defined as follows:
Reflexivity of parallel beta eta reduction
Proof
Exercise.
Exercise proving parallel beta eta reflexivity
Prove the theorem on reflexivity of parallel beta eta reduction.
Source definition of beta eta complete development
[source-complete development] The source-complete development source of source is defined as follows:
Parallel beta eta reduction and substitution
Proof
By induction on the derivation of source.
The first four cases are exactly like those in the substitution compatibility lemma for parallel beta reduction. If the last rule is the eta rule for parallel beta eta reduction, then source is source, source is source for some source and source where source, and source. We want to show that source, i.e., source. It follows by the definition of parallel beta eta reductionthe eta rule for parallel beta eta reduction and the induction hypothesis.
Source beta eta complete development lemma
Proof
By induction on the derivation of source.
The first four cases are like those in the lemma that every parallel beta reduct reaches the complete development. If the last rule is the eta rule for parallel beta eta reduction, then source is source and source is source for some source, source, source where source and source. We want to show that source, i.e., source, which is immediate by induction hypothesis.
Source Church Rosser theorem for parallel beta eta reduction
source has the Church-Rosser property.
Proof
Immediate from the source lemma that every parallel beta eta reduct reaches the complete development.
Source file content/lambda-calculus/church-rosser/beta-eta-reduction.tex
source-reduction
The Church--Rosser property holds for source-reduction (source).
One beta eta contraction is a parallel beta eta reduction
Proof
By induction on the derivation of source. If source by source-conversion (i.e., the earlier definition of eta contraction), we use the theorem on reflexivity of parallel beta eta reduction. The other cases are as in the lemma that one beta contraction is a parallel beta reduction.
A parallel beta eta step can be serialized
Proof
Induction on the derivation of source.
If the last rule is the eta rule for parallel beta eta reduction, then source is source and source is source for some source, source, source where source and source. Thus we can first reduce source to source by source-conversion, followed by the series of source steps that show that source, which holds by induction hypothesis.
Beta eta reduction is the transitive closure of parallel beta eta reduction
source is the smallest transitive relation containing source.
Proof
As in the lemma identifying beta reduction as the transitive closure of parallel beta reduction
Church Rosser property for beta eta reduction
source satisfies Church--Rosser property.
Proof
By the theorem that transitive closure preserves the Church Rosser property, the Church Rosser theorem for parallel beta eta reduction and the lemma identifying beta eta reduction as the transitive closure of parallel beta eta reduction.
Source disclosures
- TR044-SAR-001: Source caveat. The abstraction rule's premise is printed with an ordinary one step beta arrow, not a parallel beta arrow. Later proofs use a parallel beta premise. The displayed rule is preserved, not silently changed. source
- TR044-SAR-003: Source caveat. The earlier substitution definition is partial and excludes variable capture. This lemma does not state substitution-definedness assumptions, and its proof moves substitution under a binder without stating the needed fresh-variable conditions. The statement and proof are preserved without adding an unstated renaming convention. source
- TR044-SAR-002: Source caveat. The right side of this rewritten formula uses R, whereas the immediately preceding target uses R prime. The source's unprimed R is preserved in the displayed and spoken formula. source
- TR044-SAR-004: Source caveat. This proof treats an outermost beta redex. The earlier definition also permits a beta contraction inside an application or abstraction, so the written argument does not cover every compatible-context case. No missing cases are supplied here. source
- TR044-SAR-005: Source caveat. The abstraction premise is printed as ordinary one step beta reduction, not parallel beta eta reduction. The source arrow is retained, although the surrounding definition and later argument use a parallel beta eta relation. source
- TR044-SAR-006: Source caveat. The second and fifth defining equations both apply to an eta redex and can give different terms. No precedence or exclusion is stated. All five equations are preserved; this edition does not silently choose one as a replacement definition. source
- TR044-SAR-007: Source caveat. As in the beta substitution lemma, the earlier substitution operation is partial. The eta proof moves substitution under the binder x and applies the eta condition without stating all needed definedness and fresh-variable assumptions. The source claim is preserved without extending substitution to an unstated total operation. source
- TR044-SAR-008: Source caveat. The preceding assertion that the first four cases follow the beta proof leaves an additional interaction untreated: eta reduction can turn a lambda abstraction into a term that is not a lambda abstraction, unlike parallel beta reduction. The copied shape argument and the overlapping complete-development definition are not repaired here. source
- TR044-SAR-009: Source caveat. The eta case is printed with the beta-only one step arrow. The referenced definition is eta contraction. The original beta arrow remains visible and spoken, with this mismatch explicitly disclosed. source