Normal Form Bisimulation for Typed Calculi: Syntactic Minimal Invariance (Draft March 8, 2007) Soren B. Lassen Google, Inc. [email protected]

Paul Blain Levy University of Birmingham, U.K. [email protected]

This note uses the normal form bisimulation theory for recursively typed call-by-push-value (CBPV) [1] to prove a “syntactic minimal invariance” result. • SOREN: NEED TO CHANGE FUNCTION APPLICATION SYNTAX TO OPERAND-FIRST EVERYWHERE v c γΓ,U B = λx. return thunk(γΓ,B (x))

Given closed types A, B, we define the function types: def

c

v γA

v γΓ,1 = λh i.h i

def

B † = U B → B.

A† = A → F A, †

c

v v (x1 ) γΓ,A = λhx1 , x2 i. γΓ,A 1 ×A2 1 v to y1 . γΓ,A (x2 ) 2 to y2 . return hy1 , y2 i



c γB

and closed terms ` : A and ` : B . More generally, to deal with recursive types, we define in Figure , by structural induction on A and B, open terms: v Γ `c γΓ,A : A[Γ]† ,

v v γΓ,Σ = λ{hi, xi. γΓ,A (x) to y. return hi, yi}i∈I i i∈I Ai

c Γ `c γΓ,B : B[Γ]† .

v γΓ,X = force Xi i v v γΓ,RecX.A = recX. λfold x. γΓ,X:U (RecX.A)[Γ]† ,A (x) to y. return fold y

−−→ −−→ ~ : U A† , Y ~ : U B † (we take the liberty to use where Γ = X ~ and Y ~ as term identifiers in Γ, γ v , γ c and as type X Γ,B Γ,A ~ and B ~ are closed types; A and B identifiers in A and B); A ~ Y ~ `v A type, X, ~ Y ~ `c B type; and [Γ] are open types: X, ~ ~ B ~ ~ A denotes the type substitution [ /X , /Y ]. −v−→ −− v→ v v Proposition 1. γA[Γ] = γΓ,A [γA/X , γB/Y ] and −v−→ −− v→ c c = γΓ,B γB[Γ] [γA/X , γB/Y ].

c v γΓ,F A = λx. force x to y. γΓ,A (y) c v = λx. λy. γΓ,A (y) γΓ,A→B c to z. γΓ,B (thunk(force x(z))) c c γΓ,Π = λx. λ{i. γΓ,A (thunk(πi (force x)))}i∈I i i∈I v γΓ,Y = force Y i i v γΓ,RecY .B = recY . λx. fold c γΓ,Y :U (RecY .B)[Γ]† ,B (thunk(unfold(force x)))

Proof. By structural induction on A and B. So, for closed recursive types RecX.A, RecY .B, v

v γ v RecX.A = γX:(RecX.A),A [γRecX.A/X ], A[ /X ] v γ c RecY .B = γYv :(RecY .B),B [γRecY .B/Y ]. B[

v c Figure 1. Definitions of γΓ,A and γΓ,B

/Y ]

Observe that x : U B ` γUv B (x), nil



return x‡ , nil

x : U F A ` γFc A (x), K



force x, K ‡ 1

def

def

c v where x‡ = thunk(γB (x)) and K ‡ = to y. γA (y)::K, provided x is of type U B and K is from type F A. More generally: −−→ Lemma 2. If ~x : U B `v p(~x) : A and Γ | F A `k K : F C then

−−→ v (p(~x)), K Γ, ~x : U B ` γA



return p(x~‡ ), K

−→ and, if Γ `v V : U B, ~x : U A | B `k q(~x; K) : D, and Γ | F C `k K : D, −→ c Γ, ~x : U A ` γB (V ), q(~x; K)



force V, q(x~‡ ; K ‡ ).

Proof. By structural induction on p and q. Theorem 3 (Syntactic minimal invariance). For all closed value types A and closed computation types B, v `c γA h λz. return z : A† , c `c γB h λz. force z : B † .

Proof. The equations follow from v z : A `c γA (z) h return z : F A,

z : U B `c force z ‡ h force z : B, which we prove by the exhibiting the following normal form bisimulation R which relates −→ v (p(~x)), nil R p(~x), nil : F A ~x : U A ` γA −−→ ~y : U B, z : U B ` force z ‡ , q(~y ; nil) R force z, q(~y ; nil) : F C −→ −−→ whenever ~x : U A `v p(~x) : A and ~y : U B | B `k q(~y ; nil) : F C. By Lemma 2, R is a normal form bisimulation.

References [1] S. B. Lassen and P. B. Levy. Normal form bisimulation for typed calculi. Conference submission, 2007.

2

A

Proofs

Here are some of the cases in the proof of Lemma 2. Case A = A1 × A2 . Then there exist p1 , ~x1 , B~1 , p2 , ~x2 , and B~2 such that ~x = ~x1 , ~x2 , ~ ,B ~ , ~ =B B 1

2

p(~x) = hp1 (~x1 ), p2 (~x2 )i, −−→ ~xi : U B i `v pi (~xi ) : Ai , for i ∈ {1, 2}. We use the abbreviations M [V1 , V2 ] v γA (V ) to y . return hV1 , y2 i in the following calculation. 2 2 2 v γA (p(~x)), v γA , λhz1 , z2 i. M [z1 , z2 ], M [p1 (~x1 ), p2 (~x2 )], v (p1 (~x1 )), γA 1 ~ return p1 (x‡1 ), v γA (p2 (~x2 )), 2 ~ return p2 (x‡2 ), ~ ~ return hp1 (x‡1 ), p2 (x‡2 )i, return hp(x~‡ )i

def

=

v γA (V1 ) to y1 . N [y1 , V2 ] and N [V1 , V2 ] 1

K p(~x)::K hp1 (~x1 ), p2 (~x2 )i::K K to y1 . N [y1 , V2 ]::K

=

= ∗ ∗ ∗

by the I.H.



to y1 . N [y1 , p2 (~x2 )]::K ~ to y2 . return hp1 (x‡1 ), y2 i::K ~ to y2 . return hp1 (x‡1 ), y2 i::K K K

def



by the I.H.

=

−−→ Case A = Σi∈I Ai . Then there exist i ∈ I and p0 such that p(~x) = hi, p0 (~x)i and ~x : U B `v p0 (~x) : Ai . v (p(~x)), γA v γA , v λ{hi, xi. γA (x) to y. return hi, yi}i∈I , i v 0 γAi (p (~x)) to y. return hi, yi, v γA (p0 (~x)), i return p0 (x~‡ ), return hi, p0 (x~‡ )i, return p(x~‡ ),

K p(~x)::K hi, p0 (~x)i::K K to y. return hi, yi::K to y. return hi, yi::K K K

= ∗



by the I.H.

=

→ ~ :− Case B = Πi∈I Bi . Then there exist i ∈ I and q 0 such that q(~x; K) = i::q 0 (~x; K) and X U A | Bi `k q 0 (~x; K) : F C. ∗ c (V ), q(~x; K) γB c λ{i. γΓ,Bi (thunk(πi (force V )))}i∈I , q(~x; K) = c 0 λ{i. γΓ,B (thunk(π (force V )))} , i::q (~ x ; K) i i∈I i c ∗ γΓ,B (thunk(πi (force V ))), q 0 (~x; K) by the I.H. i 0 ~‡ ∗ force thunk(πi (force V )), q (x ; K) πi (force V ), q 0 (x~‡ ; K) force V, i::q 0 (x~‡ ; K) = force V, q(x~‡ ; K)

→ ~ :− Case B = RecY .B0 . Then there exists q 0 such that q(~x; K) = unfold::q 0 (~x; K) and X U A | B 0 `k q 0 (~x; K) : F C, def

where B 0 = B0 [B/Y ]. Observe that c γB = recY . λx. fold γYc :U B † ,B0 (thunk(unfold(force x)))

3

c

† c and γYc :U B † ,B0 [thunk(γB )/Y ] = γB 0 and, if L is a stack from type B , c ,L γB



c λx. fold γB 0 (thunk(unfold(force x))), L

c (V ), γB c , γB c λx. fold γB 0 (thunk(unfold(force x))), c fold γB 0 (thunk(unfold(force V ))), c fold γB 0 (thunk(unfold(force V ))), c γB 0 (thunk(unfold(force V ))),

force thunk(unfold(force V )), unfold(force V ), force V, force V,

4

q(~x; K) ∗ V ::q(~x; K) (1) V ::q(~x; K) q(~x; K) = unfold :: q 0 (~x; K) ∗ q 0 (~x; K) by the I.H. 0 ~‡ ‡ ∗ q (x ; K ) q 0 (x~‡ ; K ‡ ) unfold::q 0 (x~‡ ; K ‡ ) = q(x~‡ ; K ‡ )

(1)

Normal Form Bisimulation for Typed Calculi ... - Research at Google

Γ,A2. (x2) to y2. return 〈y1,y2〉 γv. Γ,ΣieI Ai = λ{〈i, x〉.γv. Γ,Ai (x) to y. return 〈i, y〉}i∈I γv. Γ,Xi = force Xi γv. Γ,RecX.A = recX. λfold x. γv. Γ,X:U(RecX.A)[Γ]t,A. (x) to y. return fold y γc. Γ,F A = λx. force x ... Γ,Ai (thunk(πi(force x)))}i∈I γv. Γ,Y i. = force Y i γv. Γ,RecY . ... bisimulation for typed calculi. Conference submission, 2007. 2 ...

136KB Sizes 0 Downloads 195 Views

Recommend Documents

Refinements of rationalizability for normal-form games - Springer Link
rationalizability for normal-form games on its own fails to exclude some implausible strategy choices. One example is the game given in Figure 1. It can be shown that fЕX1, Y1Ж, ЕX1, Y2Ж, ЕX2, Y1Ж, ЕX2, Y2Жg are all rationalizable; in other w

Refinements of rationalizability for normal-form games
earlier mentioned relationships between the re®nements in Section 4, and we show by means of examples in Section 5 that there are no other relationships. 2. Rationalizability and existing refinements. We consider a normal-form game q I, S, U , where

Strongly Rational Sets for Normal-Form Games
Sep 29, 2015 - probability measures with support in Bi: ∆(Bi) = {αi ∈ ∆(Ai) | αi(Bi)=1}. If. G ∈ G, that is, payoff functions are continuous and strategy sets ...

Normal form decomposition for Gaussian-to-Gaussian ...
Dec 1, 2016 - Reuse of AIP Publishing content is subject to the terms: ... Directly related to the definition of GBSs is the notion of Gaussian transformations,1,3,4 i.e., ... distribution W ˆρ(r) of a state ˆρ of n Bosonic modes, yields the func

Using conjunctive normal form for natural language ...
Jan 2, 2013 - occur are free and are implicitly universally bound. In addition, certain ... place a dot over Skolem variables. The interpretation ... the domain of the assignment includes not only individual variables but also. Skolem variables.

Submission form-Normal dogs.pdf
Stock Dog Conformation Pet Other ... Guide/Service work. Other ... recovery or in the time after an episode and estimate how long these abnormalities persisted.

Submission form-Normal dogs.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Submission form-Normal dogs.pdf. Submission form-Normal dogs.pdf. Open. Extract. Open with. Sign In. Main me

Partial Bisimulation
on the current definition of controllability of nondeterministic discrete-event systems, which ..... We define for each case a separate partial bisimulation relation R.

Partial Bisimulation
on the current definition of controllability of nondeterministic discrete-event systems, which ... Thus, the supervisor must always comply with the plant by synchro-.

Efficient Closed-Form Solution to Generalized ... - Research at Google
formulation for boundary detection, with closed-form solution, which is ..... Note the analytic difference between our filters and Derivative of Gaussian filters.

Optimising Typed Programs
Typed intermediate languages of optimising compilers are becoming increasingly recognised, mainly for two reasons. First, several type based optimisations and analyses have been suggested that cannot be done in an untyped setting. Such analyses and o

Backward Induction, Normal Form Perfection and ...
This notion has had a long history in game theory and dates back at least to Zermelo (1912) who used it to ..... If this is the case, and 1 believes this, then the only surviving strategy-pair for players 1 and 2 is ..... the players regardless of th

Mathematics at - Research at Google
Index. 1. How Google started. 2. PageRank. 3. Gallery of Mathematics. 4. Questions ... http://www.google.es/intl/es/about/corporate/company/history.html. ○.

Simultaneous Approximations for Adversarial ... - Research at Google
When nodes arrive in an adversarial order, the best competitive ratio ... Email:[email protected]. .... model for combining stochastic and online solutions for.

Asynchronous Stochastic Optimization for ... - Research at Google
Deep Neural Networks: Towards Big Data. Erik McDermott, Georg Heigold, Pedro Moreno, Andrew Senior & Michiel Bacchiani. Google Inc. Mountain View ...

SPECTRAL DISTORTION MODEL FOR ... - Research at Google
[27] T. Sainath, O. Vinyals, A. Senior, and H. Sak, “Convolutional,. Long Short-Term Memory, Fully Connected Deep Neural Net- works,” in IEEE Int. Conf. Acoust., Speech, Signal Processing,. Apr. 2015, pp. 4580–4584. [28] E. Breitenberger, “An

Asynchronous Stochastic Optimization for ... - Research at Google
for sequence training, although in a rather limited and controlled way [12]. Overall ... 2014 IEEE International Conference on Acoustic, Speech and Signal Processing (ICASSP) ..... Advances in Speech Recognition: Mobile Environments, Call.

UNSUPERVISED CONTEXT LEARNING FOR ... - Research at Google
grams. If an n-gram doesn't appear very often in the training ... for training effective biasing models using far less data than ..... We also described how to auto-.

Disambiguation of Ellsberg equilibria in 2x2 normal form games
Mar 2, 2016 - For player 1, strategy p is a best reply to q if U1(p, q) ≥ U1(p. ′ ..... level of ambiguity associated with the domain Pr. When kr = 0, density fr.

Disambiguation of Ellsberg equilibria in 2x2 normal form games ...
Mar 2, 2016 - Center for Mathematical Economics, Bielefeld University, ... to the Nash equilibria, new Ellsberg equilibria may arise in which players use.

Combinational Collaborative Filtering for ... - Research at Google
Aug 27, 2008 - Before modeling CCF, we first model community-user co- occurrences (C-U) ...... [1] Alexa internet. http://www.alexa.com/. [2] D. M. Blei and M. I. ...