• Aucun résultat trouvé

Equivalence by permutationsEquivalence by permutations

N/A
N/A
Protected

Academic year: 2022

Partager "Equivalence by permutationsEquivalence by permutations"

Copied!
7
0
0

Texte intégral

(1)

Reductions and Causality (III)

jean-jacques.levy@inria.fr Tsinghua University,

November 7, 2011

http://pauillac.inria.fr/~levy/courses/tsinghua/reductions

Plan

properties of equivalence by permutations

beyond lambda-calculus

prefix ordering

properties of prefix ordering

the lattice of reductions

canonical reductions

Equivalence by permutations

Equivalence by permutations

Definition:

F1 F2

Gn Fm

G2 G1

σ

σ/ρ ρ/σ

ρ

⇢/ = ;

m

and /⇢ = ;

n

Let ⇢ and be 2 coinitial reductions. Then ⇢ is equivalent to by permutations, ⇢ ' , i↵:

Notice that

⇢ ' means that ⇢ and are cofinal

(2)

Equivalence by permutations

In this case, all coinitial&cofinal reductions are equivalent

























Equivalence by permutations

In this case, all coinitial&cofinal reductions are not equivalent

mid int ext

int

ext mid ext mid

?? mid

Equivalence by permutations

New reduction graph with equivalent reductions

( x .x )(( y .( x.x)a)b)

( y.( x .x )a)b ( x .x )(( y .a)b)

( x .x )(( x .x )a)

( x .x )a ( y .a)b

a ( x.x )a

mid int ext

Proposition

Proof

⇢ ' i↵ 8 ⌧ , ⌧ /⇢ = ⌧ /

⇢ ' i↵ ⌧ ; ⇢ ' ⌧ ;

⇢ t ' t ⇢

⇢ ' implies ⇢/⌧ ' /⌧

⇢ ' implies ⇢; ⌧ ' ; ⌧

(a) (b) (c) (d) (e)

(a)

⇢ ' means /⇢ = ;

n

. Therefore ⌧ /⇢ = (⌧ /⇢)/( /⇢).

That is ⌧ /⇢ = ⌧ /(⇢ t ). Similarly ⌧ / = ⌧ /( t ⇢).

But cube lemma says ⌧ /(⇢ t ) = ⌧ /( t ⇢). Therefore

⌧ /⇢ = ⌧ / .

Conversely take ⌧ = ⇢ and ⌧ = .

Properties of perm. equivalence (1/3)

(3)

Proof

(b) (d) (e)

Obvious by definition of residual.

(c)

(⇢/⌧ )/( /⌧ ) = ⇢/(⌧ t ) = ⇢/( t ⌧ )

= (⇢/ )/(⌧ / ) = ;

m

by (a) and (b).

Properties of perm. equivalence (2/3)

Proposition

⇢ ' i↵ 8 ⌧ , ⌧ /⇢ = ⌧ /

⇢ ' i↵ ⌧ ; ⇢ ' ⌧ ;

⇢ t ' t ⇢

⇢ ' implies ⇢/⌧ ' /⌧

⇢ ' implies ⇢; ⌧ ' ; ⌧

(a) (b) (c) (d) (e)

Properties of perm. equivalence (3/3)

Proposition

' is the smallest congruence containing F ; ( G / F ) ' G ; ( F / G )

0 ' ;

F G σ G/F F/G

1

2

'

1

2

'

1

2

σ

Beyond λ-calculus

Context-free languages

permutations of derivations in contex-free languages

S ! SS S ! a

S

a S S

a S a

S

S S

a S a

a S S

each parse tree corresponds to an equivalence class of derivations

(4)

Term rewriting

permutations of derivations are defined with critical pairs

critical pairs make conflicts

only 2nd definition of equivalence works for linear TRS [Boudol, 1982]

Process algebras

similar to TRS [Boudol-Castellani, 1988]

Weak memory models

speculative computations [Boudol-Petri, 2009]

Prefix ordering

Prefix ordering (1/4)

Definition:

F1 F2

Gn Fm

G2 G1

σ

ρ/σ σ/ρ

ρ

Notice that

⇢ v means that ⇢ t '

Let ⇢ and be 2 coinitial reductions. Then ⇢ is prefix of by permutations, ⇢ v , i↵ ⇢/ = ;

m

Properties of prefix ordering

Proposition

v is an ordering relation

⇢ v iff 9 ⌧, ⇢; ⌧ '

⇢ v iff ⇢ t '

⇢ ' ⇢

0

v

0

' implies ⇢ v

⇢ v v ⇢ iff ⇢ '

⇢ v implies ⇢/⌧ v /⌧

⇢ v iff ⌧ ; ⇢ v ⌧ ;

(a) (b) (c) (d) (e) (f) (g)

'

σ

unique

(5)

Properties of prefix ordering

Proposition [lattice of reductions]

⇢ v ⇢ t v ⇢ t

⇢ v ⌧ , v ⌧ implies ⇢ t v ⌧

σ

⌧ /⇢ ⇢/

unique also named a push-out

Properties of prefix ordering

Proposition [lattice of reductions]

⇢ v ⇢ t v ⇢ t

⇢ v ⌧ , v ⌧ implies ⇢ t v ⌧

Proof First two, already proved.

Let ⇢ v ⌧ , v ⌧ . Then (⇢ t )/⌧

= (⇢/⌧ ); (( /⇢)/(⌧ /⇢))

= ;

m

; /(⇢ t ⌧ )

= ;

m

; /(⌧ t ⇢)

= ;

m

; ( /⌧ )/ ...

= ;

m

; ;

n

/ ... = ;

m

; ;

n

Standard reductions

Standard reductions (1/6)

• When R is a single redex, we write freely R / F for { R } / F or F /R for F / { R } .

Proposition:

Let R be a redex to the left of F . Then R / F is a singleton.

Definition: The following reduction is standard

⇢ : M = M

0 R1

M

1 R2

M

2

· · ·

Rn

M

n

= N

i↵ for all i and j , i < j, then R

j

is not residual

along ⇢ of some R

j0

to the left of R

i

in M

i 1

.

(6)

Standard reductions (2/6)

























standard

Standard reductions (3/6)

Standardization thm[Curry 50]

Let M N . Then M

st

N .

Any reduction can be performed outside-in and left-to-right.

st

Standard reductions (4/6)

Standardization thm +

Any ⇢ has a unique standard equivalent by permutations.

Standard reductions are canonical representatives in their equivalence class by permutations.

8 ⇢, 9 !

st

, ⇢ '

st

'

unique st

Standard reductions (5/6)

Lemma (left-to-right creation) [O’Donnell]

Let R be redex to the left of redex S in M . Let M

S

N.

If T

0

is redex in N to the left of the residual R

0

of R, T

0

is residual of a redex T in M.

One cannot create a new redex across another left one.

R

R

R

M =· · ·(( x.· · ·S· · ·)B)· · · ·(( x.· · ·S0· · ·)B)· · ·=N M =· · ·(( x.A)(· · ·S· · ·))· · · ·(( x.A)(· · ·S0· · ·))· · ·=N

M =· · ·(( x.A)B)· · ·S· · · ·(( x.A)B)· · ·S0· · ·=N

(7)

Standard reductions (6/6)

Proof of unicity of standard reduction in each equivalence class

Let ⇢ and be standard and ⇢ ' .

They start with same reduction and di↵er at some point.

Say that ⇢ is more to the left than . Then at that point redex R contracted by ⇢ has (unique) residual by . Therefore ⇢ 6' .

Proof: application of previous lemma.

Lemma

If R to the left of R

1

and ⇢ is standard reduction starting with contracting R

1

. Then R /⇢ 6 = ; .

Exercices

Exercices

• Show that all reductions to normal form are equivalent.

• Show that there is inf-lattice of reductions in I-calculus.

• Draw lattice of reductions of ( = x.xx).

• What are standard reductions in derivations of context-free languages ?

• Show all standard reductions in the 2 reduction graphs of beginning of this class.

• Find an example where there is no greatest lower bound of 2 reductions. (Hint: you should use K -terms)

• Show that there is a single standard reduction to

normal form. What is that reduction ?

Références

Documents relatifs

Theorem 10 (Local commutation). Let p be a placement for which the A- and B-sequences do not coincide. overlined) letters correspond to the A-sequence (resp.. Moreover, all the

This is then used in Section 7, which contains our proposed definition for program equivalence as the satisfiaction of certain LTL formulas over an execution of the transition

In this paper, it is shown how a complete input equivalence class testing strategy developed by the second author can be effectively used for infinite-state model checking of

Indeed, to be an equivalence relation is a sufficient but not necessary condition with that respect (the fact that one can go from whatever equivalence relation to the partition

First, we obtain a criterion similar to Theorem 1.1 for the Witt group of a quadratic field extension equipped with its nontrivial automorphism:..

While minimality could be easily related to set inclusion of the transition sets of two standard Petri nets, the diculty for extended Petri nets with priorities is that

Formal concept analysis In its basic setting, formal concept analysis deals with input data in the form of a table with rows corresponding to objects and columns corresponding

In this paper, we propose a practical method, given a strict triangular norm with a convex additive generator, for deriving a fuzzy equivalence relation whose reflexivity