ebook img

Dynamic Games and Strategies PDF

0.68 MB·
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Dynamic Games and Strategies

Dynamic Games and 6 Strategies 1 0 2 n Norihiro Yamada a and J Samson Abramsky 6 1 [email protected] [email protected] ] O Department of Computer Science L University of Oxford . s c January 19, 2016 [ 1 v Abstract 7 4 Inthepresentpaper,weproposeavariantofgamesemanticstochar- 1 acterize the syntactic notion of reduction syntax-independently. For this 4 purpose,weintroducethenotionof“external” and“internal” movesand 0 theso-calledhidingoperation ingamesemantics,resultingina“dynamic” . variant of games and strategies. 1 Categorically,thedynamicgamesandstrategiesgiverisetoacartesian 0 6 closedbicategory[Oua97]whichisageneralizationofthecategoryofHO- 1 games andstrategies [HO00,McC98],whereall thestandardentitiesand : constructions in game semantics are accommodated. In formulating it, v weobtainedageneralization oftheexistingnotionsandestablished some i X algebraic laws which are newto the literature. r Asafuturework,weshallestablishtheexactcorrespondencebetween a thehidingoperationandreduction,whichisthemainaimofthedynamic variantofgamesemantics. Also,weareplanningtodevelopitasamath- ematical model of computation. Moreover, we shall consider connections with homotopy typetheory [V+13]. Contents 1 Introduction 3 2 Dynamic Games 5 2.1 Dynamic Games . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1.1 Dynamic Arenas . . . . . . . . . . . . . . . . . . . . . . . 6 1 2.1.2 Justified Sequences . . . . . . . . . . . . . . . . . . . . . . 7 2.1.3 Hiding Operation on Arenas and Justified Sequences . . . 8 2.1.4 Legal Positions and Threads . . . . . . . . . . . . . . . . 12 2.1.5 Dynamic Games . . . . . . . . . . . . . . . . . . . . . . . 16 2.2 Hiding Operation on Games . . . . . . . . . . . . . . . . . . . . . 20 2.3 Explicit Games and External Equality . . . . . . . . . . . . . . . 26 2.4 Constructions on Games . . . . . . . . . . . . . . . . . . . . . . . 26 2.4.1 Tensor Product . . . . . . . . . . . . . . . . . . . . . . . . 26 2.4.2 Linear Implication . . . . . . . . . . . . . . . . . . . . . . 29 2.4.3 Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.4.4 Exponential . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.4.5 Explicit Linear Implication . . . . . . . . . . . . . . . . . 34 2.4.6 External interaction . . . . . . . . . . . . . . . . . . . . . 35 2.4.7 Notation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.5 Subgames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.6 Homomorphism Theorem for Hiding on Games . . . . . . . . . . 46 2.6.1 Hiding Operation on External Interaction . . . . . . . . . 46 2.6.2 Homomorphism Theorem for Hiding on Games . . . . . . 49 3 Dynamic Strategies 54 3.1 Dynamic Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . 54 3.2 Hiding Operation on Strategies . . . . . . . . . . . . . . . . . . . 57 3.3 Normal Form and External Equality . . . . . . . . . . . . . . . . 62 3.4 Constructions on Strategies . . . . . . . . . . . . . . . . . . . . . 62 3.4.1 Copy-cat Strategies . . . . . . . . . . . . . . . . . . . . . 63 3.4.2 Non-hiding Composition . . . . . . . . . . . . . . . . . . . 63 3.4.3 Standard Composition . . . . . . . . . . . . . . . . . . . . 64 3.4.4 External Composition . . . . . . . . . . . . . . . . . . . . 64 3.4.5 Tensor Product . . . . . . . . . . . . . . . . . . . . . . . . 66 3.4.6 Paring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 3.4.7 Promotion. . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3.4.8 Dereliction . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.4.9 ParallelProduct . . . . . . . . . . . . . . . . . . . . . . . 70 3.4.10 Notation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 3.5 Homomorphism Theorem for Hiding on Strategies . . . . . . . . 73 4 Categorical Structures 76 4.1 Bicategory of Dynamic Games and Strategies . . . . . . . . . . . 76 4.2 Cartesian Closed Structure . . . . . . . . . . . . . . . . . . . . . 80 4.2.1 The Basic Idea of Cartesian Closed Bicategories . . . . . 81 4.2.2 The Bicategory CCD . . . . . . . . . . . . . . . . . . . . . 81 4.2.3 Biterminal Objects . . . . . . . . . . . . . . . . . . . . . . 84 4.2.4 Binary Biproducts . . . . . . . . . . . . . . . . . . . . . . 85 4.2.5 Biexponentials . . . . . . . . . . . . . . . . . . . . . . . . 89 4.3 Hiding Functor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 2 5 Game-semantic Computational Process 94 5.1 Algorithm SEQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 5.2 Algorithm HID . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 6 Future Works 96 A Proofs of Technical Lemmata 98 A.1 Independent View in Tensor Products . . . . . . . . . . . . . . . 98 A.2 View Lemma EI . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 1 Introduction Intheliteratureofgamesemantics,variousnotionsofgamesandstrategieshave been proposed to model different programmingfeatures [AJM00, HO00, Nic94, McC98, AM97, AM98, HY97, Lai97, AJ05, Hug00, AHM98, AGM+04, AM99]. However, such game-semantic models have been always “static” in the sense that the terms in a chain of (syntactic) reductions are interpreted as the same: If we have t →∗ t in syntax, then we only have an equation Jt K = Jt K in 1 2 1 2 game semantics. This is essentially because, for a composition of strategies in the existing game semantics, the “internal communication” is a priori hidden, andtheresultingstrategyisalways in“normalform”. Hence,theexistinggame semantics does not capture the dynamism of computation. Then, in order to model the dynamic computational process of reduction, we propose a variant of games and strategies in the present paper, in which a distinction between external and internal moves is made; internal moves are to be a posteriori hidden by an operation, so that the process of “hiding internal communication” is explicitly formulated. They are a generalization of the so- called HO-games [HO00] (in the style of [McC98]), and accommodates all the standardentities andconstructionsofgamesemanticsinthe literature. Wecall theresultingstructuredynamic gamesandstrategies. Importantly,thedynamic strategiesarenotalwaysin normalform,and the game-semanticinterpretation of normalization is established as the hiding operation. Thedynamicgamesandstrategiesgiverisetoanewmathematicalstructure, inwhichmanybeautifulalgebraiclawsareestablished. Categorically,theyform acartesian closed bicategory (intheformulationof[Oua97])CCD. We thenaim to developa game semantics in CCD, whichshould be called the dynamic game semantics. In the dynamic game semantics, reduction is interpreted as “hid- ing internal moves” in a strategy. This seems a natural phenomenon, because the Curry-Howardcorrespondencestatesthatreductioninthe typedλ-calculus corresponds to “eliminating detours” (i.e., proof normalization) in natural de- duction. That is, it seems another instance of computation as “eliminating redundant processes”. With this mathematical structure, we aim to obtain a fully semantic (i.e., syntax-independent) characterization of the syntactic notion of reduction, by establishing the “dynamic” correspondence between the hiding operation and 3 reduction (it will be explained in the final section of the paper). Furthermore, note that we have formulated an elementary operation of hiding, which was not captured previously; thus, by further going in this direction, i.e., making elementaryoperationsexplicit,weshalldevelopitasanewmathematicalmodel of computation, where intensionality in computation is formulated. Then, for instance,itwouldbeausefulcomputationalcomplexitymeasure. Moreover,we shall consider connections with homotopy type theory [V+13]. Overview of the present paper. The restofthe paper proceedsasfollows. InSection2,wedevelopthenotionofdynamic games,inwhichwedefinetheso- called hiding operation on them and accommodate all the standard games and constructions in the literature, plus some of the new constructions. In Section 3, we define strategies on dynamic games, called dynamic strategies, and the hiding operation on them. Again, all the standard strategies and constructions are accommodated, in which some of the generalizations are made. Then in Section 4, the climax of the paper, the categorical structures of the dynamic gamesand strategiesare studied; they in factform a cartesianclosedbicateogy [Oua97]. Finally,notethatourvariantofgamesandstrategiesarebasedonthe existing ones, specifically the HO-games [HO00] in the style of [McC98], so we mainly focus on explaining new structures and results; for the existing notions, see, e.g., the book [McC98]. 4 2 Dynamic Games The main aim of this paper is to formulate the syntactic notion of reduction syntax-independently in game semantics, namely as the process of “hiding in- ternal moves” in a strategy. In order to formulate this idea, we need to consider strategies in which a distinction between internal and external moves is made; internal moves are to be a posteriori hidden by some operation. We call this type of strategies dynamic strategies. Buttodefine dynamicstrategiessystematically,wefirstneedtoreformulate the existing universe of games (here we select the so-called HO-games [HO00] inthe styleof[McC98])insuchawaythatcanaccommodatethe new structure which dynamic strategies bring; we shall callsuch reformulatedgames dynamic games. Note that this is just the beginning of the story: As we shall see, this simple idea will introduce interesting mathematical structures and establish beautiful algebraic laws, generalizing the category of HO-games. We begin with defining the universe of dynamic games. 2.1 Dynamic Games Essentially,dynamicgames aretheso-calledHO-games[HO00,McC98]inwhich each move is either “internal” or “external” and the plays satisfy certain ad- ditional axioms. Conceptually internal moves are visible only for Player and invisible for Opponent, and so they are rather “unofficial” moves for the game andcanbeseenasdetaileddescriptions(oralgorithms)ofhowPlayercomputes the next “official” (i.e., external) move. On the other hand, external moves are visible for everyone and consist of the “official part” of the game. Naturally, since internal moves are invisible for Opponent and he cannot respondtothem,Playermust“playalone”fortheinternalpartofaplay. Thisis achievedby requiring that internalOpponent’s movesare alwaysdeterministic. This is the idea behind the definition of dynamic games. We first fix some notation: Notation 2.1.1. In game semantics, a play of a game is a certain sequence of “moves”. Thus, we fix some notational convention for sequences. • We use letters s,t,u,v,w, etc. to denote sequences. • We use letters a,b,c,d,e,m,n,p,q, etc. to denote elements of sequences. • A concatenationof sequences are represented by a juxtaposition of them. • We usually write as, tb, ucv for (a)s, t(b), u(c)v, respectively. • For readability, we sometimes write s.t for the concatenation st. • We write even{s} and odd{t} to mean that the sequences s and t are of even-length and odd-length, respectively. 5 • We write s(cid:22)t (resp. s≺t) if s is a (resp. strict) prefix of t. • We write s⊑t (resp. s⊏t) if s is a (resp. strict) subsequence of t. • Given a sequence s and a set X, we write s↾X for the subsequence of s which consists of elements in X. In practice, we often have s ∈ Z∗ with Z = X +Y for some set Y; in such a case, we abuse the notation: The operation deletes the “tags” for the disjoint union and s↾X ∈X∗. • For a function f :A→B and a subset S ⊆A, we define f↾S :S →B to be the restriction of f to S. 2.1.1 Dynamic Arenas LiketheusualHO-games,ournotionofgamesisbasedonapreliminaryconcept, calledarenas. Conceptually,anarenadefinesbasicelementsofagame: possible moves and their labels, as well as which moves are possible responses to each move. And then, in terms of its legal positions, the arena formulates minimum rulesofthe game(a playofthe gamewillbe definedas acertaintype ofa legal position). We call our variant of arenas dynamic arenas: Definition 2.1.2 (Dynamic arenas). A dynamic arena is a triple G=(M ,λ ,⊢ ) G G G where • M is a set, whose elements are called moves. G • λ is a function from M to {O,P}×{Q,A}×N, where O, P, Q, A are G G some distinguished symbols, and N is the set of natural numbers, called the labeling function. • ⊢ isasubsetoftheset({⋆}+M )×M ,where⋆isanarbitraryelement, G G G called the enabling relation, which satisfies the following conditions: (E1) If ⋆⊢ m, then λ (m)=OQ0 and n⊢ m⇔n=⋆ G G G (E2) If m⊢ n and λQA(n)=A, then λQA(m)=Q and λN(m)=λN(n) G G G G G (E3) If m⊢ n and m6=⋆, then λOP(m)6=λOP(n) G G G (E4) If m ⊢ n, m 6= ⋆ and λN(m) 6= λN(n), then λOP(m) = O and G G G G λOP(n)=P. G For the notation λQA,λOP,λN, see Notation 2.1.3 below. G G G We often call a dynamic arena just an arena. 6 The idea behind the notion of enabling relations is as follows: In a game, everynon-initialmovemismadeforapreviousmoven,andanenablingrelation designates, by n⊢ m, that m can be in fact made for n. G Note thatthe notionofadynamic arenais justanarenadefinedin[McC98] equipped with the EI (external/internal) label by natural numbers and some additional axioms. Notation 2.1.3. Given an arena G, we use the following notation: • λOP d=f.λ ;π :M →{O,P} G G 1 G • λQA d=f.λ ;π :M →{Q,A} G G 2 G • λN d=f.λ ;π :M →N G G 3 G • λ+n d=f.hλOP,λQA,λN;λx.(x+n)i G G G G x−n if x>n • λ⊖n d=f.hλOP,λQA,λN;λx.(x⊖n)i, where x⊖nd=f. G G G G (0 otherwise P if λOP(m)=O • λ d=f.hλOP,λQA,λNi , where λOP(m)d=f. G G G G G G (O otherwise • Md d=f.{m∈M | λN(m)=d} for each d∈N G G G • M♦d d=f.{m∈M | λN(m)♦d} for eachd∈N, where♦ is either <,6,> G G G or > A move m∈M is called G • initial if ⋆⊢ m G • an O-move if λOP(m)=O and a P-move if λOP(m)=P G G • a question if λQA(m) = Q and an answer if λQA(m) = A (moreover, a G G question m is said to be answered by an answer n if m⊢ n) G N N • external if λ (m)=0 and internal if λ (m)>0 G G • k-internal if λN(m) = k > 0; in particular, it is called immediately G internal if it is 1-internal 2.1.2 Justified Sequences Given an arena, we are interested in a certain kind of sequences of the moves, called the justified sequences. 7 Definition 2.1.4 (Justified sequences and justifiers [HO00, McC98]). A jus- tified sequence in an arena G is a finite sequence s ∈ M∗, in which each G non-initial move m is associated with (or points at) a move J (m), called the s justifier of m in s, that occurs previously in s and satisfies J (m) ⊢ m. We s G also say that m is justified by J (m). s We often drop the subscript s in J when s is clear. Note that the function s J is an essential structure of a justified sequence s, i.e., a justified sequence is s a sequence of moves equipped with justification relations. We sometimes call the relation of the pair (J (m),m) the pointer of (from) m to J (m). s s 2.1.3 Hiding Operation on Arenas and Justified Sequences We now define similar concepts from the “external point of view”. Definition 2.1.5(Externaljustifiers). Letsbeajustifiedsequenceinanarena G. Then each non-initial move m occurring in s has a sequence of justifiers J (m)=m ,J (m )=m ,...,J (m )=m ,J (m )=n s 1 s 1 2 s k−1 k s k where m ,...,m are immediately internal but n is not (note that k may be 1 k 0). Then n is said to be the 1-external justifier of m, and written J⊖1(m). s More in general, for any d∈N+, if m ,...,m are j-internal with j 6d but n 1 k is not, then n is saidto be the d-external justifierofm and writtenJ⊖d(m). s Moreover, n is called the external justifier of m and written J⊖ω(m) if it is s the d-external justifier of m for all d∈N+ (i.e., if n is external). Again, we often drop the subscript s. Definition 2.1.6 (External subsequences). Let s be a justified sequence in an arena G. For each d ∈ N+, the d-external subsequence of s, denoted by Hd(s), is the subsequence of s obtained by deleting the moves in s that are G j-internal with j 6 d, equipped with the pointer J⊖d, i.e., J d=f. J⊖d s Hd(s) s G (strictly speaking, J is a restriction of J⊖d). Moreover, the external Hd(s) s G subsequenceofs, writtenHω(s), isthe subsequenceofs obtainedby deleting G all the internal moves in s, equipped with the pointer J⊖ω. s Again, we often drop the subscript G. Definition 2.1.7(Hidingoperationonjustifiedsequences). LetGbeanarena. We usually write H (s) for H1(s), where s is a justified sequence in G, and G G regard H as an operation, called the hiding operation on the justified se- G quences in G. We now define the hiding operation on arenas: Definition 2.1.8 (Hiding operation on arenas). The hiding operation H on arenas is defined as follows: For an arena G, the arena H(G) is given by 8 • M d=f.{m∈M | λN(m)6=1} H(G) G G • λ d=f.λ⊖1↾M H(G) G H(G) • m⊢ n H(G) ⇔df.∃k ∈N.∃x ,...,x ∈M1.m⊢ x ,x ⊢ x ,...,x ⊢ x ,x ⊢ n 1 2k G G 1 1 G 2 2k−1 G 2k 2k G which includes the case where k =0 and m⊢ n G Of course, we need to establish: Lemma 2.1.9 (Closureofarenasunderhiding). ForanydynamicarenaG,the structure H(G) forms a well-defined dynamic arena. Proof. Clearly, the set of moves and the labeling function are well-defined. It remains to verify the axioms for the enabling relation. N • (E1)Notethatif⋆⊢ m,thenλ (m)=0,andsom∈M . Therefore G G H(G) ⋆⊢ m⇔⋆⊢ m H(G) G Thus, if ⋆⊢ m, then λ (m)=OQ0 and n⊢ m⇔n=⋆. H(G) H(G) H(G) • (E2) Assume that m ⊢ n and λQA (n) = A. Note that m 6= ⋆ and H(G) H(G) λQA(n)=λQA (n)=A. If m⊢ n, then G H(G) G λQA (m)=λQA(m)=Q H(G) G N N N N λ (m)=λ (m)⊖1=λ (n)⊖1=λ (n) H(G) G G H(G) If, for some k ∈N+ and x ,...,x ∈M1, we have 1 2k G m⊢ x ,x ⊢ x ,...,x ⊢ x ,x ⊢ n G 1 1 G 2 2k−1 G 2k 2k G theninparticularx ⊢ nbutλN(x )=16=0=λN(n),acontradiction. 2k G G 2k G That is, this case cannot happen. • (E3) Assume that m⊢ n and m6=⋆. If m⊢ n, then we have H(G) G λOP (m)=λOP(m)6=λOP(n)=λOP (n) H(G) G G H(G) If we have m⊢ x ,x ⊢ x ,...,x ⊢ x ,x ⊢ n G 1 1 G 2 2k−1 G 2k 2k G for some k ∈N+ and x ,...,x ∈M1, then 1 2k G λOP (m)=λOP(m) H(G) G =λOP(x )=λOP(x )=···=λOP(x )6=λOP(n)=λOP (n) G 2 G 4 G 2k G H(G) Thus in either case, the axiom holds. 9 • (E4) Assume m ⊢ n, m 6= ⋆, and λN (m) 6= λN (n). Then we H(G) H(G) H(G) have λN(m) 6= λN(n). Thus, if m ⊢ n, then it is trivial; so assume the G G G other case for m⊢ n. Then by the same argumentas that for (E3), it H(G) is easy to see that λOP (m)=O and λOP (n)=P. H(G) H(G) Thus, the structure H(G) forms a dynamic arena. Notation 2.1.10. We write Hi for i-times application of the hiding operation Honarenasforeachi∈N;inparticular,H0 denotes“nothingisapplied”. Also, we denote Hω for the countably-infinite times application of H. This notation applies also for the hiding operations on games, strategies, etc., which will be introduced later. Next, we establish another important fact: Lemma 2.1.11 (Preservation of justified sequences under hiding). For each justifiedsequencesinanarenaG,the1-externalsubsequenceH (s)isajustified G sequence in the arena H(G). Proof. Assume that m is a non-initial move that occurs in H (s); we have to G show that the justifier J (m) occurs earlier than m in H (s) and satisfies HG(s) G J (m) ⊢ m. Since s is a justified sequence in G and m is non-initial in G HG(s) as well, we may write s=s .n.s .m.s 1 2 3 where J (m)=n. s • If n ∈/ M1, then we have n ⊢ m by n ⊢ m, and by the definition, G H(G) G the pointer ofm in H (s) still points to n. Thus, J (m)=n andthe G HG(s) requirement is satisfied in this case. • If n ∈ M1, then n must be non-initial; so consider the justifier n of n G 1 in G. If n ∈ M1, then we can apply the same argument. Iterating this 1 G process, we obtain a sequence of enabling pairs with respect to ⊢ G n′ ⊢ n ,n ⊢ n ,...,n ⊢ n ,n ⊢ n,n⊢ m G 2k−1 2k−1 G 2k−2 2 G 1 1 G G where k ∈ N,n ,...,n ∈ M1,n′ ∈/ M1 by the axioms (E3) and (E4) 1 2k−1 G G forG. Thus,by the definition, n′ ⊢ m,andthe pointerofm inH (s) H(G) G must point to n′. So J (m) = n′ and the justification condition is HG(s) satisfied in this case too. As the notation suggests, we have the following: Proposition 2.1.12 (Inductive hiding on justified sequences). Let G be an arena, and s a justified sequence in G. Then for each i ∈ N, we have the following equation between justified sequences in the arena Hi+1(G): Hi+1(s)=H (Hi (s)) G Hi(G) G 10

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.