[Programming Languages And Lambda calculi] 1.4 Directed Assignment

1.4 Directed assignment

The "assignment" rule ≈r doesn't look particularly like an assignment. It allows us to prove that certain expressions are equal, but it does not tell us exactly how to get from an arbitrary B set element to t or f .

The simpler relationship r is actually more useful. In the definition of the r relationship, two given conditions both transform one expression into another simpler expression. And, for any expression of set B, the element of set B is either t or f, or the relation r relates the element of set B to at most one other expression. As a conclusion, we can r treated as single-step reduction (single-step reduction) behavior to help us understand the way an interpreter may be assigned to the work carried out by a single step before the final value.

We can define ~~ r to r reflexive relationship - pass closed, this way, we will get a multi-step reduction relation. Multi-step reduction of relations ~~r will transform (map) one expression into many other expressions. But it turns out that the multi-step reduction relationship will eventually transform the expression into either t or f .

It is sufficient to define ~~r as the "reflexive-transitive closure" of the r relationship. Another available definition is to expand the statute of r relations. The third method is a partial expansion statute, but the r relationship is used in the definition: the
Insert picture description here
r relationship and the ~~r relationship are intentionally asymmetric to show the directionality in the assignment process. For example, given the expression (f • (f • (t • f))) , we can make the following reduction:
Insert picture description here
the empty column on the left is the expression on the right of the previous line. Each line is a parameter in (f • (f • (t • f))) ~~rt .

Exercise 1.2

Proof of the relation of r with a single step reduction (f • (f • (f • f))) ~~rf

answer

(f • (f • (f • f))) r (f • (f • f)))

​					  r (f • f)

​					  r f

所以,(f • (f • (f • f))) ~~r f

Guess you like

Origin blog.csdn.net/qq_35714301/article/details/113755871