Take an infinite supply of variables and the two distinguished constants of combinatory logic, the K combinator and the S combinator. The combinatory logic terms are exactly the finite expressions generated byThus every variable and each distinguished constant is a combinatory logic term, and the application of two combinatory logic terms is a combinatory logic term. Nothing else is a combinatory logic term. Application associates to the left, so means ; it is not assumed to be associative. The I combinator can be used as the abbreviation , without adding a new primitive constant.
The basic equality is the least relation containing the two axiom schemesfor all combinatory logic terms , and closed under the rules of equational reasoning:The final rule permits replacing equal combinatory logic terms inside either side of an application; repeated use permits replacement at any depth. Uniform substitution of combinatory logic terms for variables preserves equality, either included as a rule or proved by induction on these derivations, since the displayed axioms are schemes. No rule equating two combinatory logic terms merely because they agree after an extra argument belongs to this basic theory. Its equality is the symmetric, reflexive and transitive closure of weak combinatory reduction.
Write for the paper's bracket abstraction and for the I combinator. Prove the result by structural induction following the three clauses of bracket abstraction.
For , the rules for the S combinator and the K combinator giveIf does not occur in , then substitution for leaves unchanged andThese two cases cover all variables and constants as well as applications not containing .
In the remaining case, and occurs in at least one of . The bracket abstraction clause, the rule for the S combinator, the induction hypotheses and compatibility of equality with application giveThe last line is the defining application clause of substitution. ThereforeThe conclusion is equality in combinatory logic; it need not be literal identity of strings. There are no binders in a combinatory logic term, so this substitution introduces no variable capture.
Again write for bracket abstraction. In combinatory logic, all variable occurrences are free variables. Under and , substitution for preserves the presence or absence of :An existing is not replaced because ; replacing cannot introduce an because contains none. This ensures that the same clause of bracket abstraction applies before and after substitution.
Use structural induction on , respecting those clauses. If , thenbecause substitution leaves the S combinator, the K combinator and unchanged.
If is absent from , it is also absent from . ThereforeThis includes : even when is a large application, the absence of means bracket abstraction still produces .
Finally, let with occurring in or . By the occurrence observation, also occurs in or , so the application clause applies on both sides. Apply the induction hypotheses:Every step uses the definitions of substitution and bracket abstraction, without applying the equality axioms for the S combinator or the K combinator. Thus the result is the stronger syntactic identityThe side condition on is essential for this identity. For example, substituting for in gives , whereas , a different string.
Successive bracket abstractions are processed from the inside out: . Retain only as a temporary abbreviation for the I combinator. Since is absent from , the first bracket abstraction isFor the outer bracket abstraction, is absent from and the S combinator, while it occurs in . HenceSubstituting upward and then expanding gives the following fully bracketed string, consisting solely of the S combinator, the K combinator and parentheses:For readability, the same result with the usual left association convention and the temporary abbreviation isThe syntactic result comes from the specified bracket abstraction algorithm. Replacing it by the shorter K combinator, despite agreement after two arguments, would not answer the requested computation. As a check using the result of part (b), applying the computed combinatory logic term to gives .
Articles by others on the same topic
There are currently no matching articles.