Termination of lambda-calculus with the extra Call-By-Value rule known as assoc

In this paper we prove that any lambda-term that is strongly normalising for beta-reduction is also strongly normalising for beta,assoc-reduction. assoc is a call-by-value rule that has been used in works by Moggi, Joachimsky, Espirito Santo and othe…

Authors: Stephane Lengr, (LIX)

Termination of lambda-calculus with the extra Call-By-Value rule known   as assoc
T ermination of λ -alulus with an extra all-b y-v alue rule Stéphane Lengrand 1 , 2 1 CNRS, Eole P olyte hnique, F rane 2 Univ ersit y of St Andrews, Sotland LengrandLIX.Polytehnique. fr 26th No v em b er 2007 Notations and standard results are presen ted in App endix A. W e onsider the follo wing rule in λ -alulus: asso  ( λx.M ) (( λy.N ) P ) − → ( λy . ( λx .M ) N ) P ) W e w an t to pro v e Prop osition 1 SN β ⊆ SN asso  β . Lemma 1 − → asso  is terminating in λ - alulus. Pro of: Ea h appliation of the rule dereases b y one the n um b er of pairs of λ that are not nested. ✷ T o pro v e Prop osition 1 ab o v e, it w ould th us b e suien t to pro v e that − → asso  ould b e adjourned with resp et to − → β , in other w ords that − → asso  · − → β ⊆ − → β · − → ∗ asso  β (the adjournmen t te hnique leads diretly to the desired strong normalisation result). When trying to pro v e the prop ert y b y indution and ase analysis on the β -redution follo wing the asso  -redution to b e adjourned, all ases allo w the adjournmen t but one, namely: ( λx.M ) (( λy.N ) P ) − → asso  ( λy . ( λx .M ) N ) P − → β ( λy .  N  x  M ) P Hene, w e shall assume without loss of generalit y that the β -redution is not of the ab o v e kind. F or that w e need to iden tify a sub-relation of β -redution ֒ → su h that • − → asso  an no w b e adjourned with resp et to ֒ → • w e an justify that there is no loss of generalit y . F or this w e giv e ourselv es the p ossibilit y of marking λ -redexes and forbid redutions under their (mark ed) bindings, so that, if in the asso  -redution ab o v e w e mak e sure that ( λy . ( λx .M ) N ) P ) is mark ed, the problemati β -redution is forbidden. Hene w e use the usual notation for a mark ed redex ( λy .Q ) P , but w e an also see it as the onstrut let y = P in Q of λ C [Mog88 ℄ and other w orks on all-b y-v alue λ -alulus. W e start with a reminder ab out mark ed redexes. Denition 1 The syn tax of the λ -alulus is extended as follo ws: M , N ::= x | λx.M | M N | ( λx.M ) N 1 Redution is giv en b y the follo wing system β 12 : β 1 ( λx.M ) N − →  M  x  N β 2 ( λx.M ) N − →  M  x  N The forgetful pro jetion on to λ -alulus is straigh tforw ard: φ ( x ) := x φ ( λx.M ) := λx.φ ( M ) φ ( M N ) := φ ( M ) φ ( N ) φ (( λx.M ) N ) := ( λx.φ ( M )) φ ( N ) Remark 2 Clearly , − → β 12 strongly sim ulates − → β through φ − 1 and − → β strongly sim ulates − → β 12 through φ . Reduing under λ and erasing λ an b e strongly adjourned In this setion w e iden tify the redution notion ֒ → ( ⊆− → β 12 ) and w e argue against the loss of generalit y b y pro ving that − → β 12 · ֒ → ⊆ ֒ → · ( − → β 12 ∪ ֒ → ) + , a strong ase of adjournmen t, presen ted in App endix B, whose diret orollary is that, for ev ery sequene of β 12 -redution, there is also a sequene of ֒ → -redution of the same length and starting from the same term. W e th us split the redution system β 12 in to t w o ases dep ending on whether or not a redution thro ws a w a y an argumen t that on tains some markings: Denition 2 β κ  ( λx.M ) P − → M if x 6∈ FV ( M ) and there is a term ( λx.N ) Q ⊑ P ( λx.M ) P − → M if x 6∈ FV ( M ) and there is a term ( λx.N ) Q ⊑ P β κ  ( λx.M ) P − → M if x ∈ FV ( M ) or there is no term ( λx.N ) Q ⊑ P ( λx.M ) P − → M if x ∈ FV ( M ) or there is no term ( λx.N ) Q ⊑ P Remark 3 Clearly , − → β 12 = − → β κ ∪ − → β κ . No w e distinguish whether or not a redution o urs underneath a mark ed redex, via the follo wing rule and the follo wing notion of on textual losure: Denition 3 β ( λ x.M ) P − → ( λ x.N ) P if M − → β 12 N No w w e dene a w eak notion of on textual losure for a rewriting system i : i : M − → N M ⇀ i N M ⇀ i N λx.M ⇀ i λx.N M ⇀ i N M P ⇀ i N P M ⇀ i N P M ⇀ i P N M ⇀ i N ( λx.P ) M ⇀ i ( λx.P ) N Finally w e use the follo wing abbreviations: Denition 4 Let ֒ → := ⇀ β κ and ❀ 1 := ⇀ β κ and ❀ 2 := ⇀ β . Remark 4 Clearly , − → β 12 = ֒ → ∪ ❀ 1 ∪ ❀ 2 . Lemma 5 If ( λx.N ) Q ⊑ P , then ther e is P ′ suh that P ֒ → P ′ . 2 Pro of: By indution on P • The ase P = y is v auous. • F or P = λy .M , w e ha v e ( λx.N ) Q ⊑ M and the indution h yp othesis pro vides M ֒ → M ′ , so λy .M ֒ → λy .M ′ . • F or P = M 1 M 2 , w e ha v e either ( λx.N ) Q ⊑ M 1 or ( λx.N ) Q ⊑ M 2 . In the former ase the indution h yp othesis pro vides M 1 ֒ → M ′ 1 , so M 1 M 2 ֒ → M ′ 1 M 2 . The latter ase is similar. • Supp ose P = ( λy .M 1 ) M 2 . If there is a term ( λx ′ .N ′ ) Q ′ ⊑ M 2 , the indution h yp othesis pro vides M 2 ֒ → M ′ 2 , so ( λy .M 1 ) M 2 ֒ → ( λy .M 1 ) M ′ 2 . If there is no su h term ( λx ′ .N ′ ) Q ′ ⊑ M 2 , w e ha v e ( λy .M 1 ) M 2 ֒ →  M 2  y  M 1 . ✷ Lemma 6 ❀ 1 ⊆ ֒ → · ❀ 1 Pro of: By indution on the redution step ❀ 1 . F or the base ases ( λx.M ) P − → β κ M or ( λx.M ) P − → β κ M with x 6∈ FV ( M ) and ( λy .N ) Q ⊑ P , Lemma 5 pro vides the redution P ֒ → P ′ , so ( λx.M ) P ֒ → ( λx.M ) P ′ ❀ 1 M and ( λx.M ) P ֒ → ( λx.M ) P ′ ❀ 1 M . The indution step is straigh tforw ard as the same on textual losure is used on b oth sides (namely , the w eak one). ✷ Lemma 7 ❀ 2 · ֒ → ⊆ ֒ → · − → + β 12 Pro of: By indution on the redution step ֒ → . See app endix C. ✷ Corollary 8 − → β 12  an b e str ongly adjourne d with r esp e t to ֒ → . Pro of: Straigh tforw ard from the last t w o theorems, and Remark 4. ✷ asso  -redution W e in tro due t w o new rules in the mark ed λ -alulus to sim ulate asso  : asso  ( λx.M ) ( λy .N ) P − → ( λy . ( λx.M ) N ) P at ( λx.M ) N − → ( λx.M ) N Remark 9 Clearly , − → asso  at strongly sim ulates − → asso  through φ − 1 . Notie that with the let = in -notation, asso  and at are simply the rules of λ C asso  let x = ( let y = P in N ) in M − → let y = P in let x = N in M at ( λx.M ) N − → let x = N in M Lemma 10 − → asso  at · ֒ → ⊆ ֒ → · − → ∗ asso  at Pro of: By indution on the redution step ֒ → . See app endix C. ✷ 3 Lemma 11 − → ∗ asso  , at · − → β 12  an b e str ongly adjourne d with r esp e t to ֒ → . Pro of: W e pro v e that ∀ k , − → k asso  , at · − → β 12 · ֒ → ⊆ ֒ → · − → ∗ asso  , at · − → β 12 b y indution on k . • F or k = 0 , this is Corollary 8. • Supp ose it is true for k . By the indution h ypthesis w e get − → asso  , at · − → k asso  , at · − → β 12 · ֒ → ⊆ − → asso  , at · ֒ → · − → ∗ asso  , at · − → β 12 Then b y Lemma 10 w e get − → asso  , at · ֒ → · − → ∗ asso  , at · − → β 12 ⊆ ֒ → · − → asso  , at · − → ∗ asso  , at · − → β 12 ✷ Remark 12 Note from Lemma 5 that nf ֒ → ⊆ nf ❀ 1 ∪ ❀ 2 ⊆ nf − → β 12 ⊆ nf − → ∗ asso  , at ·− → β 12 . Theorem 13 BN ֒ → ⊆ BN − → ∗ asso  , at ·− → β 12 Pro of: W e apply Theorem 28, sine nf ֒ → ⊆ nf − → ∗ asso  , at ·− → β 12 and learly ( − → ∗ asso  , at · − → β 12 ) ∪ ֒ → = − → ∗ asso  , at · − → β 12 ✷ Theorem 14 BN β ⊆ BN − → ∗ asso  ·− → β Pro of: Sine − → β strongly sim ulates ֒ → through φ , w e ha v e φ − 1 ( BN β ) ⊆ BN ֒ → ⊆ BN − → ∗ asso  , at ·− → β 12 . Hene φ ( φ − 1 ( BN β )) ⊆ φ ( BN − → ∗ asso  , at ·− → β 12 ) . Sine φ is surjetiv e, BN β = φ ( φ − 1 ( BN β )) . Hene BN β ⊆ φ ( BN − → ∗ asso  , at ·− → β 12 ) . Also, − → ∗ asso  , at · − → β 12 strongly sim ulates − → ∗ asso  · − → β through φ − 1 , so φ ( BN − → ∗ asso  , at ·− → β 12 ) ⊆ BN − → ∗ asso  ·− → β . ✷ Theorem 15 SN β ⊆ SN asso  β Pro of: First, from Lemma 19, BN − → ∗ asso  ·− → β ⊆ SN − → ∗ asso  ·− → β . Then from Lemma 1, − → asso  is terminating and hene SN asso  is stable under − → β . Hene w e an apply Lemma 24 to get SN asso  β = SN − → ∗ asso  ·− → β . F rom the previous theorem w e th us ha v e BN β ⊆ SN asso  β . No w, notiing that β -redution in λ -alulus is nitely bran hing, Lemma 18 giv es BN β = SN β and th us SN β ⊆ SN asso  β . ✷ Referenes [Mog88℄ E. Moggi. Computational lam b da-alulus and monads. Rep ort ECS- LF CS-88-66, Univ ersit y of Edin burgh, Edin burgh, Sotland, Otob er 1988. 4 A Reminder: Notations, Denitions and Basi Re- sults Denition 5 (Relations) • W e denote the omp osition of relations b y · , the iden tit y relation b y Id , and the in v erse of a relation b y − 1 . • If D ⊆ A , w e write R ( D ) for { M ∈ B | ∃ N ∈ D , N R M } , or equiv alen tly S N ∈D { M ∈ B | N R M } . When D is the singleton { M } , w e write R ( M ) for R ( { M } ) . • W e sa y that a relation R : A − → B is total if R − 1 ( B ) = A . Remark 16 Comp osition is asso iativ e, and iden tit y relations are neutral for the omp osition op eration. Denition 6 (Redution relation) • A r e dution r elation on A is a relation from A to A . • Giv en a redution relation → on A , w e dene the set of → - r e duible forms (or just r e duible forms when the relation is lear) as rf → := { M ∈ A| ∃ N ∈ A , M → N } . W e dene the set of normal forms as nf → := { M ∈ A| 6 ∃ N ∈ A , M → N } . • Giv en a redution relation → on A , w e write ← for → − 1 , and w e dene → n b y indution on the natural n um b er n as follo ws: → 0 := Id → n +1 := → · → n (= → n · → ) → + denotes the transitiv e losure of → (i.e. → + := S n ≥ 1 → n ). → ∗ denotes the transitiv e and reexiv e losure of → (i.e. → ∗ := S n ≥ 0 → n ). ↔ denotes the symmetri losure of → (i.e. ↔ := ← ∪ → ). ↔ ∗ denotes the transitiv e, reexiv e and symmetri losure of → . • An e quivalen e r elation on A is a transitiv e, reexiv e and symmetri redution relation on A , i.e. a relation → = ↔ ∗ , hene denoted more often b y ∼ , ≡ . . . • Giv en a redution relation → on A and a subset B ⊆ A , the losur e of B under → is → ∗ ( B ) . Denition 7 (Finitely bran hing relation) A redution relation → on A is nitely br anhing if ∀ M ∈ A , → ( M ) is nite. Denition 8 (Stabilit y) Giv en a redution relation → on A , w e sa y that a subset T of A is → - stable (or stable under → ) if → ( T ) ⊆ T . Denition 9 (Strong sim ulation) Let R b e a relation b et w een t w o sets A and B , resp etiv ely equipp ed with the redution relations → A and → B . → B str ongly simulates → A thr ough R if ( R − 1 · → A ) ⊆ ( → + B · R − 1 ) . Remark 17 1. If → B strongly sim ulates → A through R , and if → B ⊆→ ′ B and → ′ A ⊆→ A , then → ′ B strongly sim ulates → ′ A through R . 5 2. If → B strongly sim ulates → A and → ′ A through R , then it also strongly sim- ulates → A · → ′ A through R . 3. Hene, if → B strongly sim ulates → A through R , then it also strongly sim ulates → + A through R . Denition 10 (P atriar hal) Giv en a redution relation → on A , w e sa y that • a subset T of A is → - p atriar hal (or just p atriar hal when the relation is lear) if ∀ N ∈ A , → ( N ) ⊆ T ⇒ N ∈ T . • a prediate P on A is p atriar hal if { M ∈ A| P ( M ) } is p atriar hal . Denition 11 (Normalising elemen ts) Giv en a redution relation → on A , the set of → -str ongly normalising elemen ts is SN → := \ T is patriar hal T Denition 12 (Bounded elemen ts) The set of → -b ounde d elemen ts is dened as BN → := [ n ≥ 0 BN → n where BN → n is dened b y indution on the natural n um b er n as follo ws: BN → 0 := nf → BN → n +1 := { M ∈ A| ∃ n ′ ≤ n, → ( M ) ⊆ BN → n ′ } Lemma 18 If → is nitely br anhing, then BN → is p atriar hal. As a  onse quen e, BN → = SN → . Lemma 19 1. If n < n ′ then BN → n ⊆ BN → n ′ ⊆ BN → . In p artiular, nf → ⊆ BN → n ⊆ BN → . 2. BN → ⊆ SN → . Lemma 20 1. SN → is p atriar hal. 2. If M ∈ BN → then → ( M ) ⊆ BN → . If M ∈ SN → then → ( M ) ⊆ SN → . Theorem 21 (Indution priniple) Given a pr e di ate P on A , supp ose ∀ M ∈ SN → , ( ∀ N ∈ → ( M ) , P ( N )) ⇒ P ( M ) . Then ∀ M ∈ SN → , P ( M ) . When we use this the or em to pr ove a statement P ( M ) for al l M in SN → , we just add ( ∀ N ∈ → ( M ) , P ( N )) to the assumptions, whih we  al l the indution h yp othesis . W e say that we pr ove the statement b y indution in SN → . Lemma 22 1. If → 1 ⊆→ 2 , then nf → 1 ⊇ nf → 2 , SN → 1 ⊇ SN → 2 , and for al l n , BN → 1 n ⊇ BN → 2 n . 6 2. nf → = nf → + , SN → = SN → + , and for al l n , BN → + n = BN → n . Notie that this result enables us to use a stronger indution priniple: in order to pro v e ∀ M ∈ SN → , P ( M ) , it no w sues to pro v e ∀ M ∈ SN → , ( ∀ N ∈ → + ( M ) , P ( N )) ⇒ P ( M ) This indution priniple is alled the tr ansitive indution in SN → . Theorem 23 (Strong normalisation b y strong sim ulation) L et R b e a r ela- tion b etwe en A and B , e quipp e d with the r e dution r elations → A and → B . If → B str ongly simulates → A thr ough R , then R − 1 ( SN → B ) ⊆ SN → A . Lemma 24 Given two r e dution r elations → 1 , → 2 , supp ose that SN → 1 is stable under → 2 . Then SN → 1 ∪→ 2 = SN → ∗ 1 ·→ 2 ∩ SN → 1 . B Strong adjournmen t Denition 13 Supp ose → A is a redution relation on A , → B is a redution relation on B , R is a relation from A to B . → B simulates the r e dution lengths of → A thr ough R if ∀ k , ∀ M , N ∈ A , ∀ P ∈ B , M → k A N ∧ M R P ⇒ ∃ Q ∈ B , P → k B Q Lemma 25 Supp ose → A is a r e dution r elation on A , → B is a r e dution r elation on B , R is a r elation fr om A to B . If → B str ongly simulates → A thr ough R , then → B simulates the r e dution lengths of → A thr ough R . Pro of: W e pro v e b y indution on k that ∀ k , ∀ M , N ∈ A 2 , ∀ P ∈ B , M → k A N ∧ M R P ⇒ ∃ Q, P → k B Q . • F or k = 0 : tak e Q := M = N . • Supp ose it is true for k and tak e M → A M ′ → k A N . The strong sim ulation giv es P ′ su h that P → + B P ′ and M ′ R P ′ . The indution h yp othesis giv es Q ′ su h that P ′ → k B Q ′ . Then it sues to tak e the prex P → k +1 B Q (of length k + 1 ) of P → + B P ′ → k B Q ′ . ✷ Lemma 26 ∀ n, ∀ M , ( ∀ k , ∀ N , M → k N ⇒ k ≤ n ) ⇐ ⇒ M ∈ BN → n Pro of: By transitiv e indution on n . • F or n = 0 : learly b oth sides are equiv alen t to M ∈ nf → . • Supp ose it is true for all i ≤ n . Supp ose ∀ k , ∀ N , M → k N ⇒ k ≤ n + 1 . Then tak e M → M ′ and assume M ′ → k ′ N ′ . W e ha v e M → k ′ +1 N ′ so from the h yp othesis w e deriv e k ′ + 1 ≤ n + 1 , i.e. k ′ ≤ n . W e apply the indution h yp othesis on M ′ and get M ′ ∈ BN → n . By denition of BN → n +1 w e get M ∈ BN → n +1 . Con v ersely , supp ose M ∈ BN → n +1 and M → k N . W e m ust pro v e that k ≤ n +1 . If k = 0 w e are done. If k = k ′ + 1 w e ha v e M → M ′ → k ′ N ; b y denition of BN → n +1 there is i ≤ n su h that M ′ ∈ BN → i , and b y indution h yp othesis w e ha v e k ′ ≤ i ; hene k = k ′ + 1 ≤ i + 1 ≤ n + 1 . ✷ 7 Theorem 27 Supp ose → A is a r e dution r elation on A , → B is a r e dution r elation on B , R is a r elation fr om A to B . If → B simulates the r e dution lengths of → A thr ough R , then ∀ n, R − 1 ( BN → B n ) ⊆ BN → A n ( ⊆ SN → A ) Pro of: Supp ose N ∈ BN → B n and M R N . If M → k A M ′ then b y sim ulation N → k B N ′ so b y Lemma 26 w e ha v e k ≤ n . Hene b y (the other diretion of ) Lemma 26 w e ha v e M ∈ BN → A n . ✷ Denition 14 Let → 1 and → 2 b e t w o redution relations on A . The relation → 1 an b e str ongly adjourne d with r esp e t to → 2 if whenev er M → 1 N → 2 P there exists Q su h that M → 2 Q ( → 1 ∪ → 2 ) + P . Theorem 28 L et → 1 and → 2 b e two r e dution r elations on A . If nf → 2 ⊆ nf → 1 and → 1  an b e str ongly adjourne d with r esp e t to → 2 then BN → 2 ⊆ BN → 1 ∪→ 2 . Pro of: F rom Theorem 27, it sues to sho w that → 2 sim ulates the redution lengths of → 1 ∪ → 2 through the iden tit y . W e sho w b y indution on k that ∀ k , ∀ M , N , M ( → 1 ∪ → 2 ) k N ⇒ ∃ Q, M → k 2 Q • F or k = 0 : tak e Q := M • F or k = 1 : If M → 2 N tak e Q := N ; if M → 1 N use the h yp othesis nf → 2 ⊆ nf → 1 to pro due Q su h that M → 2 Q . • Supp ose it is true for k + 1 and tak e M ( → 1 ∪ → 2 ) P ( → 1 ∪ → 2 ) k +1 N . The indution h yp othesis pro vides T su h that P → k +1 2 T , in other w ords P → 2 S → k 2 T . If M → 2 P w e are done. If M → 1 P w e use the h yp othesis of adjournmen t to transform M → 1 P → 2 S in to M → 2 P ′ ( → 1 ∪ → 2 ) + S . T ak e the prex P ′ ( → 1 ∪ → 2 ) k +1 R (of length k + 1 ) of P ′ ( → 1 ∪ → 2 ) + S → k 2 T , and apply on this prex the indution h yp othesis to get P ′ → k +1 2 R . W e th us get M → k +2 2 R . ✷ C Pro ofs Lemma 7 ❀ 2 · ֒ → ⊆ ֒ → · − → + β 12 Pro of: By indution on the redution step ֒ → . • F or the base ase where the β κ -redution is a β 2 -redution, w e ha v e M ❀ 2 ( λx.N ) P ֒ →  P  x  N with x ∈ FV ( N ) or P has no mark ed redex as a subterm. W e do a ase analysis on the redution step M ❀ 2 ( λx.N ) P . If M = ( λx.N ′ ) P ❀ 2 ( λx.N ) P b eause N ′ − → β 12 N then ( λx.N ′ ) P ֒ →  P  x  N ′ − → β 12  P  x  N . If M = ( λx.N ) P ′ ❀ 2 ( λx.N ) P b eause P ′ ❀ 2 P , then it means that P has a mark ed redex as a subterm, so w e m ust ha v e x ∈ FV ( N ) . Hene ( λx.N ) P ′ ֒ → n P ′  x o N − → + β 12  P  x  N . 8 • F or the base ase where the β κ -redution is a β 1 -redution, w e ha v e M ❀ 2 ( λx.N ) P ֒ →  P  x  N with x ∈ FV ( N ) or P has no mark ed redex as a subterm. W e do a ase analysis on the redution step M ❀ 2 ( λx.N ) P . If M = M ′ P ❀ 2 ( λx.N ) P b eause M ′ ❀ 2 λx.N then M ′ m ust b e of the form λx.M ′′ with M ′′ ❀ 2 N . Then ( λx.M ′′ ) P ֒ →  P  x  M ′′ (in ase P has a mark ed subterm, notie that x ∈ FV ( N ) ⊆ FV ( M ′′ ) ), and  P  x  M ′′ − → β 12  P  x  N . If M = ( λx.N ) P ′ ❀ 2 ( λx.N ) P b eause P ′ ❀ 2 P , then it means that P has a mark ed redex as a subterm, so w e m ust ha v e x ∈ FV ( N ) . Hene ( λx.N ) P ′ ֒ → n P ′  x o N − → + β 12  P  x  N . • The losure under λ is straigh tforw ard. • F or the losure under appliation, left-hand side, w e ha v e M ❀ 2 N P ֒ → N ′ P with N ֒ → N ′ . W e do a ase analysis on the redution step M ❀ 2 N P . If M = M ′ P ❀ 2 N P with M ′ ❀ 2 N , the indution h yp othesis giv es M ′ ֒ → · − → + β 12 N ′ and the w eak on textual losure giv es M ′ P ֒ → · − → + β 12 N ′ P . If M = N P ′ ❀ 2 N P with P ′ ❀ 2 P , w e an also deriv e N P ′ ֒ → N ′ P ′ − → β 12 N ′ P . • F or the losure under appliation, righ t-hand side, w e ha v e M ❀ 2 N P ֒ → N P ′ with P ֒ → P ′ . W e do a ase analysis on the redution step M ❀ 2 N P . If M = M ′ P ❀ 2 N P with M ′ ❀ 2 N , w e an also deriv e M ′ P ֒ → M ′ P ′ − → β 12 N P ′ . If M = N M ′ ❀ 2 N P with M ′ ❀ 2 P , the indution h yp othesis giv es M ′ ֒ → · − → + β 12 P ′ and the w eak on textual losure giv es N M ′ ֒ → · − → + β 12 N P ′ . • F or the losure under mark ed redex w e ha v e M ❀ 2 ( λx.P ) N ֒ → ( λx.P ) N ′ with N ֒ → N ′ . W e do a ase analysis on the redution step M ❀ 2 ( λx.P ) N . If M = ( λx .P ′ ) N ❀ 2 ( λx.P ) N b eause P ′ − → β 12 P , w e an also deriv e ( λx.P ′ ) N ֒ → ( λ x.P ′ ) N ′ − → β 12 ( λx.P ) N ′ . If M = ( λ x.P ) M ′ ❀ 2 ( λx.P ) N with M ′ ❀ 2 N , the indution h yp othesis giv es M ′ ֒ → Q − → + β 12 N ′ and the w eak on textual losure giv es ( λx.P ) M ′ ֒ → ( λx.P ) Q − → + β 12 ( λx.P ) N ′ . ✷ Lemma 10 − → asso  at · ֒ → ⊆ ֒ → · − → ∗ asso  at Pro of: By indution on the redution step ֒ → . • F or the rst base ase, w e ha v e M − → asso  at ( λx.N ) P ֒ →  P  x  N with x ∈ FV ( N ) or P has no mark ed subterm. Sine ro ot asso at -redution pro- dues neither λ -abstrations nor appliations at the ro ot, note that M has to b e of the form ( λx.N ′ ) P ′ , with either N ′ − → asso  at N (and P ′ = P ) or P ′ − → asso  at P (and N ′ = N ). In b oth ases, x ∈ FV ( N ) ⊆ FV ( N ′ ) or P ′ has no mark ed subterm, so w e also ha v e ( λx.N ′ ) P ′ ֒ → n P ′  x o N ′ − → ∗ asso  at  P  x  N . • F or the seond base ase, w e ha v e M − → asso  at ( λx.N ) P ֒ →  P  x  N with x ∈ FV ( N ) or P has no mark ed subterm. W e do a ase analysis on M − → asso  at ( λx.N ) P . 9 If M = ( λ x ′ .M 1 ) ( λx.M 2 ) P − → asso  ( λx. ( λx ′ .M 1 ) M 2 ) P with N = ( λx ′ .M 1 ) M 2 , w e also ha v e M = ( λx ′ .M 1 ) ( λx.M 2 ) P ֒ → ( λx ′ .M 1 )  P  x  M 2 =  P  x  N . If M = ( λx.N ) P − → at ( λx.N ) P then M ֒ →  P  x  N . If M = ( λx.N ′ ) P ′ − → asso  at ( λx.N ) P with either N ′ − → asso  at N (and P ′ = P ) or P ′ − → asso  at P (and N ′ = N ), w e ha v e, in b oth ases, x ∈ FV ( N ) ⊆ FV ( N ′ ) or P ′ has no mark ed subterm, so w e also ha v e ( λx.N ′ ) P ′ ֒ → n P ′  x o N ′ − → ∗ asso  at  P  x  N . • The losure under λ is straigh tforw ard. • F or the losure under appliation, left-hand side, w e ha v e Q − → asso  at M N ֒ → M ′ N with M ֒ → M ′ . W e do a ase analysis on Q − → asso  at M N . If Q = M ′′ N − → asso  at M N with M ′′ − → asso  at M , the indution h yp othesis pro vides M ′′ ֒ → · − → ∗ asso  at M ′ so M ′′ N ֒ → · − → ∗ asso  at M ′ N . If Q = M N ′ − → asso  at M N with N ′ − → asso  at N , w e also ha v e M N ′ ֒ → M ′ N ′ − → asso  at M ′ N . • F or the losure under appliation, righ t-hand side, w e ha v e Q − → asso  at M N ֒ → M N ′ with N ֒ → N ′ . W e do a ase analysis on Q − → asso  at M N . If Q = M ′ N − → asso  at M N with M ′ − → asso  at M , w e also ha v e M ′ N ֒ → M ′ N ′ − → asso  at M N ′ . If Q = M N ′′ − → asso  at M N with N ′′ − → asso  at N , the indution h yp oth- esis pro vides N ′′ ֒ → · − → ∗ asso  at N ′ so M N ′′ ֒ → · − → ∗ asso  at M N ′ . • F or the losure under mark ed redex, the ֒ → -redution an only ome from the righ t-hand side b eause of the w eak on textual losure ( ֒ → do es not redue under λ ), so w e ha v e Q − → asso  at ( λy .M ) P ֒ → ( λy .M ) P ′ with P ֒ → P ′ . W e do a ase analysis on Q − → asso  at ( λy .M ) P . If Q = ( λx.M ′ ) ( λy .N ) P − → asso  ( λy . ( λx.M ′ ) N ) P with M = ( λx.M ′ ) N , w e also ha v e Q = ( λx.M ′ ) ( λ y.N ) P ֒ → ( λx.M ′ ) ( λy .N ) P ′ − → asso  ( λy . ( λx.M ′ ) N ) P ′ . If Q = ( λy .M ) P − → at ( λy .M ) P , then w e also ha v e Q = ( λy .M ) P ֒ → ( λy .M ) P ′ − → at ( λy .M ) P ′ . ✷ 10

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment