• Aucun résultat trouvé

A syntactical proof of the operational equivalence of two $\lambda$-terms

N/A
N/A
Protected

Academic year: 2021

Partager "A syntactical proof of the operational equivalence of two $\lambda$-terms"

Copied!
6
0
0

Texte intégral

(1)

HAL Id: hal-00381603

https://hal.archives-ouvertes.fr/hal-00381603

Submitted on 6 May 2009

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de

A syntactical proof of the operational equivalence of two λ-terms

René David, Karim Nour

To cite this version:

René David, Karim Nour. A syntactical proof of the operational equivalence of two λ-terms. Theo- retical Computer Science, Elsevier, 1997, 180, pp.371-375. �hal-00381603�

(2)

A syntactical proof of the operational equivalence of two λ-terms

Ren´e DAVID and Karim NOUR

Abstract In this paper we present a purely syntactical proof of the operational equivalence of I =λxx and the λ-term J that is the η -infinite expansion of I.

1 Introduction

Two λ-terms M and N are operationnely equivalent (M oper N) iff for all contextC : C[M] is solvable iffC[N] is solvable.

LetI=λxxandJ = (Y G) whereY is the Turing’s fixed point operator andG=λxλyλz(y(x z)).

J is the η-infinte expansion of I. His B˝ohm tree is in fact λxλx1(x λx2(x1 λx3(x2 λx4(x3....

The following Theorem is well known (see [1],[3]).

TheoremI oper J.

The usual proof is semantic : two λ-terms are operationnely equivalent iff they have the same interpretation in the modeleD .

We give below an elementary and a purely syntactical proof of this result. This proof analyses in a fine way the reductions ofC[I] andC[J] by distinguant the ”real” β -redex of ceux which come of the η-expansion.

This proof may be generalize to prove (this result is also well known) the operationnely equiva- lence of twoλ-terms where the B˝ohm tree are equal `aη - infinite expansion pr`es. The necessary technical tool is the directedλ-calculus (see [2]).

2 Definitions and notations

λx U represents a sequence of abstractions.

Let T, U, U1, ..., Un be λ-terms, the application of T to U is denoted by (T U) or T U. In the same way we writeT U1...Un orT U instead of (...(T U1)...Un).

Let us recall that a λ-term T either has a head redex [i.e. t= λx(λxU V) V, the head redex being (λxU V)], or is in head normal form [i.e. t=

lxx V].

(3)

The notation U t V (resp. U t V) means that V is obtained from U by one head reduction (resp. some head reductions).

A λ-term T is said solvable iff the head reduction of T terminates.

The following Lemma is well known.

Lemma 2.1 (U V) is solvable iff U is solvable (and has U as head normal form) and (U V) is solvable.

3 Proof of the Theorem

The idea of the proof is the following : we prove that, if we assimilate the reductions where I (resp J) are in head position, C[I] and C[J] reduse, by head reduction in the same way. For this we add a constante H (which represente either I or J). We define on those terms the I (resp J) head reduction, corresponding to the case whereH = I (resp J). To prove that the reductions are equivalent we prove that the terms obtained by ”removing” the constanteH are equal. This is the role of the extraction fonctionE.

3.1 λH-calculus and the application E

We add a new constante H to theλ-calculus and we call λH-terms the terms which we obtain.

We define (by induction) on the set of λH-terms the application E : E(x) =x ;E(H) =H ;E(λxU) =λxE(U) ;

E(U V) =E(U)E(V) if U 6=HU1U2...Un ; E(HU1U2...Un) =E(U1U2...Un) .

A λH-term is in head normal form if it is of the forme : λx H orλx xV.

Lemma 3.1 If T is a λH-term, then E(T) is of the forme λx H or λx xV or λx (λxU V)V. ProofBy induction onT. 2

Lemma 3.2 If T is a λH-term, then E(E(T)) =E(T).

ProofBy induction onT. 2

Lemma 3.3 Let T, U be λH-terms. E(T U) =E(E(T)E(U)).

ProofBy induction onT. We distinguish the cases: T 6=HV and T =HV. 2

(4)

Lemma 3.4 Let U, V be λH-terms and x a variable,E(U[V /x]) =E(E(U)[E(V)/x]) .

ProofBy induction on U. The only interesting case is U =xU. By Lemma 3.3, E(U[V /x]) = E(E(V)E(U[V /x])). Therefore, by induction hypothesis and Lemma 3.3,

E(U[V /x]) =E(E(V)E(E(U)[E(V)/x])) =E(E(U[E(V)/x]). 2

Lemma 3.5 Let U1, U2, V1, V2 be λH-terms such that E(U1) = E(U2) and E(V1) = E(V2).

E(U1[V1/x]) =E(U2[V2/x]).

ProofBy Lemma 3.4. 2

Lemma 3.6 Let U1, U2, V1, V2 be λH-terms. IfU1 tV1, U2 tV2, andE(U1) =E(U2), then E(V1) =E(V2).

ProofBy Lemmas 3.3 and 3.5. 2 3.2 The I-reduction

We define on theλH-terms a new head reduction : HU1...UnI U1U2...Un

We denote by I the reflexive and transitive closure ofI.

A λH-term U is I-t-solvable iff a finite sequence of I-reductions and t-reductions of U gives a head normal form.

Lemma 3.7 Let U, V be λH-terms. If U I V, then E(U) =E(V).

ProofBy induction on the reduction of U. 2 Lemma 3.8 Each I-reduction is finite.

ProofThe I-reduction decreases the complexity of aλH-term. 2 Lemma 3.9 Let U be λH-term. U is I-t-solvable iff U[I/H]is solvable.

ProofImmediate. 2

(5)

3.3 The J-reduction

We define on theλH-terms a new head reduction : HU1...UnJ U1(H U2)U3...Un

We denote by J the reflexive and transitive closure ofJ.

A λH-term U is J-t-solvable iff a finite sequence of J-reductions and t-reductions of U gives a head normal form.

Lemma 3.10 Let U, V be λH-terms. IfU J V, then E(U) =E(V).

ProofIt is enough to do the proof for one step ofJ-reduction. The only interesting case isU = (H)U1U2U. In this case U J U1(H U2)U, and, by induction hypothesis, E((U1(H U2)U) = E(V), therefore -by Lemma 3.3-E(U) =E(V). 2

Lemma 3.11 Let U, V be λH-terms. If U JV, then, for each sequence W =W1...Wn, there is a sequence W =W1...Wn such that U W J V W and for, all1kn, Wk J Wk. Proof By induction on the reduction of U. It enough to do the proof for one step of J- reduction. The only interesting case is U = HU and W = W1W. In this case V = U, U W1W J V(H W1)W and HW1 J W1. 2

Lemma 3.12 Each J-reduction is finite.

Proof By induction on U. The only interesting case is U = HV1...Vn (n 2). We prove, by recurrence on n, that if the reductions of V1, ..., Vn are finite, then so is for U = HV1...Vn. U J V1(H V2) V3...Vn and V1 J V1. By Lemma 3.11, U J V1W2W3...Wn where W2 J H V2 J V2 and WiJ Vi, therefore the reductions ofWi are finite.

- IfE(V1)6=H. V1 begin soit byλ, soit by aβ-redex, soit by a variable. Therefore, by Lemma 3.11, theJ-reduction of U is finite.

- If E(V1) = H. By Lemma 3.11, U J HW2...Wn and the recurrence hypothesis allows to conclude. 2

Lemma 3.13 Let U be a λH-term. U isJ-t-solvable iff U[J/H]) is solvable.

ProofThe only difficulty is to prove that : if U is J-t-solvable, thenU[J/H] is solvable.

We prove that by induction on the reduction of U. The only interesting case isU =λx HV. In this case, U J λx V and U[J/H] t λx λyV[J/H] (J y). By induction hypothesis V[J/H] is solvable, and, by Lemma 2.1, we may begin to reduse V[J/H] in λx λyV[J/H] (J y). If the head normal form of V[J/H] is not of the forme λxλz xW, the result is true. If not the head reduction ofU[J/H] gives λx λz (J y)W which is solvable. 2

(6)

3.4 The proof of the Theorem

U (I,k) V (resp. U (J,k) V) means that V is obtained from U by I-reductions (resp.

J-reductions) and k t-reductions.

Lemma 3.14 Let U1, U2, V1, V2 be λH-terms. If U1 (I,k) V1, U2 (J,k) V2, and E(U1) = E(U2), then E(V1) =E(V2).

ProofConsequence of Lemmas 3.6, 3.7 and 3.10. 2

Lemma 3.15 Let U be a λH-term. U isI-t-solvable iffU is J-t-solvable.

ProofConsequence of Lemmas 3.8, 3.12 and 3.14. 2

Proof of the Theorem Consequence of Lemmas 3.9, 3.13 and 3.15. 2

References

[1] H. BarendregtThe Lambda Calculus, its syntax and semantics North Holland, 1984

[2] R. David and K. Nour Storage operators and directed Lambda Calculus J. Symb. Logic, vol. 60, num. 4, pp.1054-1086, 1995.

[3] J.HylandA syntactic characterization of the equality in some models of the lambda calculus J. London Math. Soc. (2), 12, pp.361-370, 1976.

LAMA - Equipe de Logique - Universit´e de Chamb´ery - 73376 Le Bourget du Lac e-mail david,nour@univ-savoie.fr

Références

Documents relatifs

In the remainder of this paper, we will implicitly assume that all link diagrams are connected, and that a diagram is alternating within each twist region... Thurston [29,

In our very recent paper [36], we developed a time-domain finite element method to simulate a cylindrical cloak [52], and carried out some mathematical analysis for this model..

Feng, Strong solutions to a nonlinear parabolic system modeling compressible misci- ble displacement in porous media, Nonlinear Anal., Theory Methods Appl., 23 (1994), 1515–1531.

We will represent the floor of the museum as a polygon and provide an upper bound on the number of guards neccesary that depends on the number of walls in the museum, or

Mumford proves that the intermediate Jacobian of X is isomorphic, as polarized abelian variety, to a so-called Prym variety.. This last part of Mumford’s proof is

Note that we do not give the proof of Theorem 2 since it follows from the proof of Theorem 1 exactly as in the case of the semilinear heat equation 6 treated in [9].. We give

If W is a non-affine irreducible finitely generated Coxeter group, then W embeds as a discrete, C-Zariski dense subgroup of a complex simple Lie group with trivial centre, namely

In this note, we prove that the density of the free additive convolution of two Borel probability measures supported on R whose Cauchy transforms behave well at innity can be