ebook img

Hypergames and full completeness for system F (rough draft) PDF

0.27 MB·English
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 Hypergames and full completeness for system F (rough draft)

Hypergames and full completeness for system F (ROUGH DRAFT) Dominic J. D. Hughes ∗ StanfordUniversity August25,2006 8 0 ThispaperreviewsthefullycompletehypergamesmodelofsystemF,presentedadecadeago 0 in the author’s thesis. Instantiating type variables is modelled by allowing “games as moves”. 2 The uniformity of a quantifiedtype variable ∀X is modelled by copycat expansion: X represents n anunkowngame,akindofblackbox,soalltheplayercandoiscopymovesbetweenapositive a occurrenceandanegativeoccurrenceofX. J Thispresentationisbasedonslidesforatalkentitled“Hypergamesemantics: tenyearslater” 5 givenatGamesforLogicandProgrammingLanguages,Seattle,August2006. 1 ] 1 Introduction O L Zwicker’sHypergame[Zwi87]isanalternatingtwo-playergame: oneplayerchoosesanyalternating . gameGwhichterminates1 (e.g.“O’s&X’s”orChess2),thenplayproceedsinG.3 h t a Hypergame m O’s&X’s Chess [ rmblkans opopopop 1 0Z0Z0Z0Z Z0Z0Z0Z0 v 0Z0Z0Z0Z Z0Z0Z0Z0 5 POPOPOPO SNAQJBMR 7 5 left centre Nf3 e4 2 . 1 rmblkans rmblkans 0 opopopop opopopop 0Z0Z0Z0Z 0Z0Z0Z0Z 8 X X Z0Z0Z0Z0 Z0Z0Z0Z0 0 0ZZ00ZZ00ZZN0ZZ0 0ZZ00ZZ0PZZ00ZZ0 v: PSONPAOQPJOBPZOR PSONPAOQ0JOBPMOR Xi top-left top right c5 Nf6 r a O O rompbZlpkoapnosp rompbolpkoap0osp 0Z0Z0Z0Z 0Z0Z0m0Z X X X O Z0o0Z0Z0 Z0Z0Z0Z0 0Z0ZPZ0Z 0Z0ZPZ0Z Z0Z0Z0Z0 Z0Z0Z0Z0 POPO0OPO POPO0OPO SNAQJBMR SNAQJBMR ∗Visitingscholar,ComputerScienceDepartment,StanfordUniversity,CA94305. 1Everylegalsequenceofmovesisfinite. 2Toensuretermination,assumeadrawisforceduponathreefoldrepetitionofaposition(avariantofastandardrule). 3Thequestion“DoesHypergameterminate?”,theHypergameparadox,amountstoahereditaryformofRussell’sparadox, knownasMirimanoff’sparadox[Mir17]: “Isthesetofwell-foundedsetswell-founded?”.(Each‘paradox’isillusory,being merelyduetothelackofformaldefinitionof“game”or“set”.) 1 At theImperialCollegeGamesWorkshopin1996, theauthorillustrated howhypergames—games in which games can be played as moves — can model languages with universal quantification. Originally implemented in [Hug97] for Girard’s system F [Gir71, GLT89], the idea is quite gen- eral, and has been successfully applied to affine linear logic [MO01, Mur01] and Curry-style type isomorphisms[dL06]. 1.1 Universallyquantifiedgames RecallthelittlegirlAnna-Louisewhowinsonepointoutoftwoina“simultaneousdisplay”against chessworldchampionsSpasskyandFischer[Con76,Theorem51]. ShefacesSpasskyasBlackand Fischer as White, and copies moves back and forth, indirectly playing one champion against the other. WhenSpasskyopenswiththeQueen’spawnd4,sheopensd4againstFischer;whenFischer respondswiththeKing’sknightNf6,sherespondsNf6againstSpassky,andsoon. Fischer Spassky rmblka0s RMBJQANS opopopop OPOPZPOP 0Z0Z0m0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0O0Z0 0Z0O0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0m0Z0Z0 POPZPOPO popopopo SNAQJBMR s0aklbmr d4 Nf6 Anna-Louise We shall write G→G for such a simultaneous display with a game G (so Anna-Louise played the gameChess→Chessabove,assecondplayer,againsttheFischer-Spasskyteam).4 Observing that her copycat strategy is not specific to chess, Anna-Louise declares that she will tackletheFischer-Spasskyteaminamoregrandiosespectacle: shewillgivethemanadditionalfirst move, to decide the game for simultaneous display. For example, the Fischer-Spassky team might choose Chess, thereby opting for the simultaneous display Chess→Chess, and play continues as above. OrtheymightchooseO’s&X’s,optingforthesimultaneousdisplayO’s&X’s→O’s&X’s,and openwithXinthecentreofSpassky’sgrid;Anna-LouisecopiesthatXaccrossasheropeningmove onFischer’sgrid;FischerrespondswithOin(his)top-left;AnnacopiesthisObacktoSpassky;and soon: 4Conwaywrites−G+G,orG−G[Con76,Chapter7]. Lateron,weshalladdaformofbacktrackingtoourgames sothatAnna-LouisemayrestartthegamewithFischerasmanytimesasshelikes,correspondingtotheintuitionismofthe arrow→ofsystemF,inwhichafunctionmayreaditsargumentanynumberoftimes[Lor60,Fel85,Coq91,HO00]. To maintainthefocusonuniversalquantification,hereintheintroductionweshallignoretheavailabilitybacktracking. 2 Fischer Spassky O X X O Xcentre Otop-left Anna-Louise Thekeynoveltyof[Hug97]wastodefinethisasaformalgame,ahypergameoruniversallyquanti- fiedgame,whichweshallwriteas ∀G.G→G The tree of ∀G.G → G is illustrated below. Similar in spirit to Zwicker’shypergame5, it differs in the fact that the first player not only chooses G but also plays an opening move m in G. We call suchacompoundmove(importingagame,andplayingamoveinagame)ahypermove. ∀G.G→G Chess,d4 O’s&X’s,left rmblkans RMBJQANS opopopop OPOPZPOP 0ZZ00ZZ00ZZ00ZZ0→0ZZ00ZZ00OZ00ZZ0 → X 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 POPOPOPO popopopo SNAQJBMR snaklbmr d4 Nf6 left top rompbolpkoapnosp ROMPBOJPQZAPNOSP rompbolpkoapnosp ROMPBOJPQZAPNOSP O 0ZZ00ZZ00ZZ00ZZ0→0ZZ00ZZ00OZ00ZZ0 0ZZ00ZZ00ZZ00ZZ0→0ZZ00ZZ00OZ00ZZ0 X → X → X 0Z0O0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 Z0m0Z0Z0 POPZPOPO popopopo POPOPOPO popopopo SNAQJBMR snaklbmr SNAQJBMR s0aklbmr f5 d5 top-left right rmblkans RMBJQANS rmblkans RMBJQANS opopo0op OPOPZPOP opo0opop OPOPZPOP 0ZZ00ZZ00ZZp0ZZ0→0ZZ00ZZ00OZ00ZZ0 0ZZ00ZZp0ZZ00ZZ0→0ZZ00ZZ00OZ00ZZ0 X → X O X → X 0Z0O0Z0Z 0Z0Z0Z0Z 0Z0O0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 POPZPOPO popopopo POPZPOPO popopopo O SNAQJBMR snaklbmr SNAQJBMR snaklbmr 1.2 Self-reference(withoutparadox) Inthetreeabove,wehaveshowntwocasesforinstantiatingGinthehypergameH = ∀G.G→G, eithertoChessortoO’s&X’s. ButitisalsopossibletoinstantiateGtoahypergame,orindeed,to Hitself. Weconsiderthiscasebelow. Theinitialstateis: 5TheauthorwasunawareofZwicker’sworkwhilepreparing[Hug97], hencethe lackofreferencetoZwickerinthat paper,andintheauthor’sthesis[Hug00]. 3 Fischer Spassky ∀G.G→G Anna-Louise FischerandSpasskybeginbyimportingagameforG,inthiscase,H = ∀G.G→Gitself,yielding asimultaneousdisplayofH: Fischer Spassky H → H Anna-Louise Inotherwords,wehave: Fischer Spassky ∀G .G →G → ∀G .G →G 1 1 1 2 2 2 Anna-Louise The local bound variable G is renamed in each component to clarify the evolution of the game below.6 AsinthesimultaneousdisplayChess→Chess,whereSpasskyopenedwithamoveonhis chessboard, here in H → H Spassky must complete the opening hypermoveby playing a move on his copy of H. Since H = ∀G .G → G is a hypergame, opening H requires importing another 2 2 2 game,instantiatingG . SupposehechoosesChessforG : 2 2 Fischer Spassky rmblkans RMBJQANS opopopop OPOPOPOP 0Z0Z0Z0Z 0Z0Z0Z0Z ∀G1.G1 →G1 → Z00ZZ00ZZ00ZZ00Z → Z00ZZ00ZZ00ZZ00Z Z0Z0Z0Z0 Z0Z0Z0Z0 POPOPOPO popopopo SNAQJBMR snaklbmr Anna-Louise 6Thescopeof∀G1inthediagramdoesnotextendpastthecentralarrow→.Inotherwords,formallythegameplayed byAnna-Louiseis(∀G1.G1→G1) → (∀G2.G2→G2). 4 NowSpasskyhashisownlocalsimultaneousdisplayChess→Chess. Tocompletehisopening(hy- per)moveontheoverallgame,hemustopenthischessdisplay. SupposeheplaysNf3(necessarily ontherightboard,whereitishisturnsincehehasWhite): Fischer Spassky rmblkans RZBJQANS opopopop OPOPOPOP 0Z0Z0Z0Z 0ZNZ0Z0Z ∀G1.G1 →G1 → Z00ZZ00ZZ00ZZ00Z → Z00ZZ00ZZ00ZZ00Z Z0Z0Z0Z0 Z0Z0Z0Z0 POPOPOPO popopopo SNAQJBMR snaklbmr Anna-Louise Now it is Anna-Louise’s turn. She has three options: (1) respond to Spassky as Black on the rightmost chess board, (2) respond to Spassky as White on the other chess board, or (3) play an opening move against Fischer in ∀G .G → G . We consider the last case, since it is the most 1 1 1 interesting. SupposeAnna-LouisechoosestoimportO’s&X’sforG : 1 Fischer Spassky rmblkans RZBJQANS opopopop OPOPOPOP 0Z0Z0Z0Z 0ZNZ0Z0Z → Z0Z0Z0Z0 Z0Z0Z0Z0 → → 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 POPOPOPO popopopo SNAQJBMR snaklbmr Anna-Louise Now Fischer has his own local simultaneous display O’s&X’s → O’s&X’s. For Anna-Louise to completeherhypermove,shemustplayamoveonO’s&X’s→O’s&X’s(necessarilyintherightof thetwogrids,theoneinwhichitherturn). SupposesheplaysherXtop-right: 5 Fischer Spassky rmblkans RZBJQANS opopopop OPOPOPOP X 0Z0Z0Z0Z 0ZNZ0Z0Z → Z0Z0Z0Z0 Z0Z0Z0Z0 → → 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 POPOPOPO popopopo SNAQJBMR snaklbmr Anna-Louise FischerrespondseitherwithanOinthesamegrid,orwithanXintheemptygrid,andplaycontinu- ousinthetwolocalsimultaneousdisplays,O’s&X’s→O’s&X’sagainstFischerandChess→Chess againstSpassky. Buttoremainconsistentwithhercopycatstrategy,Anna-LouisemustmimicSpassky. Insteadof importing O’s&X’s for G against Fischer, she must import Chess and open with the White move 1 Nf3,exactlyasSpasskydid: Fischer Spassky RMBJQANS rmblkans rmblkans RZBJQANS OPOPOPOP opopopop opopopop OPOPOPOP 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0ZNZ0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 → Z0Z0Z0Z0 Z0Z0Z0Z0 → → 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0ZNZ0 Z0Z0Z0Z0 Z0Z0Z0Z0 popopopo POPOPOPO POPOPOPO popopopo snaklbmr SNAQJBZR SNAQJBMR snaklbmr Chess,Nf3 Anna-Louise Fischermightnowopenhisotherboardwithe4,whichAnna-Louisewouldcopybacktothecorre- spondingboardagainstSpassky: 6 Fischer Spassky RMBJQANS rmblkans rmblkans RZBJQANS OPO0OPOP opopopop opopopop OPOPOPOP 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0ZNZ0Z0Z Z0ZPZ0Z0 Z0Z0Z0Z0 → Z0Z0Z0Z0 Z0Z0Z0Z0 → → 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0ZPZ0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0ZNZ0 Z0Z0Z0Z0 Z0Z0Z0Z0 popopopo POPOPOPO POPO0OPO popopopo snaklbmr SNAQJBZR SNAQJBMR snaklbmr e4 Anna-Louise Or perhaps Fischer responds with Black in the rightmost of his pair of boards, with d5, which Anna-LouisecopiestoSpassky: Fischer Spassky RMBJQANS rmblkans rmblkans RZBJQANS OPOPOPOP opo0opop opopopop OPOPOPOP 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0ZNZ0Z0Z Z0Z0Z0Z0 Z0ZpZ0Z0 → Z0Z0Z0Z0 Z0Z0Z0Z0 → → 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0ZpZ0Z Z0Z0Z0Z0 Z0Z0ZNZ0 Z0Z0Z0Z0 Z0Z0Z0Z0 popopopo POPOPOPO POPOPOPO popo0opo snaklbmr SNAQJBZR SNAQJBMR snaklbmr d5 Anna-Louise Eitherway,shecontinuestocopymovesbetweenthefourboardsaccordingtothefollowinggeom- etryofcopycatlinks: Fischer Spassky RMBJQANS rmblkans rmblkans RZBJQANS OPOPOPOP opopopop opopopop OPOPOPOP 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0ZNZ0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 → Z0Z0Z0Z0 Z0Z0Z0Z0 → → 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0ZNZ0 Z0Z0Z0Z0 Z0Z0Z0Z0 popopopo POPOPOPO POPOPOPO popopopo snaklbmr SNAQJBZR SNAQJBMR snaklbmr Anna-Louise 7 ThiscopycatstrategycorrespondstothepolymorphicidentitysystemFterm ΛG.λgG.g oftype∀G.G→G. 1.3 Uniformity Consideragain theoriginal Fischer-Spasskysimultaneous display,withchess. AddKasparovtothe team,playingBlack. Kasparov Fischer Spassky rmblkans rmblkans RMBJQANS opopopop opopopop OPOPOPOP 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 POPOPOPO POPOPOPO popopopo SNAQJBMR SNAQJBMR snaklbmr Anna-Louise Anna-Louisehastwodistinctwaystoguaranteepickingupapoint. Eithershecopiesmovesbetween SpasskyandFischer,asbefore,whileignoringKasparov(neverplayingamoveagainsthim), Kasparov Fischer Spassky rmblkans rmblka0s RMBJQANS opopopop opopopop OPOPZPOP 0Z0Z0Z0Z 0Z0Z0m0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0O0Z0 0Z0Z0Z0Z 0Z0O0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0m0Z0Z0 POPOPOPO POPZPOPO popopopo SNAQJBMR SNAQJBMR s0aklbmr d4 Nf6 Anna-Louise orshecopiesmovesbetweenSpasskyandKasparov,ignoringFischer: 8 Kasparov Fischer Spassky rmblkans rmblkans RMBJQANS opZpopop opopopop OPO0OPOP 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z Z0o0Z0Z0 Z0Z0Z0Z0 Z0ZPZ0Z0 0Z0ZPZ0Z 0Z0Z0Z0Z 0Z0Z0o0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 POPO0OPO POPOPOPO popopZpo SNAQJBMR SNAQJBMR snaklbmr e4 c5 Anna-Louise We shall write this triple simultaneous display as Chess → Chess → Chess, and more generally, foranygameG,asG→G→G.7 Nowconsidertheuniversallyquantifiedformofthisgame,thehypergame ∀G.G→G→G. Aswith∀G.G→Gdiscussedabove,theKasparov-Fischer-Spasskyteam,KFS,nowhastherightto choosethegameofthetriplesimultaneousdisplay,aspartoftheiropening(hyper)move. Weshall saythatAnna-Louise’sstrategyisuniforminthissettingif • irrespective of the game chosen by KFS, she always ignores the same player, Kasparov or Fischer. Otherwiseherstrategyisad hoc. Forexample,herstrategywouldbeadhocif,whenKFSchooses Chess, she ignores Kasparov and copies chess moves betweenFischer and Spassky, but when KFS chooses O’s & X’s, she ignores Fischer and copies X and O moves between Kasparov and Spassky. In this case the geometry of her move copying depends on the game imported by FKS: she is not treatingGasa“blackbox”. There are only two uniform strategies for Anna-Louise: either she always copies between Kas- parov and Spassky, ignoring Fischer, or she always copies between Fischer and Spassky, ignoring Kasparov. ThesecorrespondtothesystemFterms ΛG.λkG.λfG.k ΛG.λkG.λfG.f respectively,oftype ∀G.G→G→G, wherethevariablekcorrespondstoKasparovandfcorrespondstoFischer. Moregenerally,withmultiple bound∀variablesand morecomplicatedgame imports,weshall take uniformity to mean that the links Anna-Louise sets up between components (such as the Kasparov↔SpasskyorFischer↔Spasskylinksabove)mustbeindependentofthegamesimported bytheopposingteam: theseimportedgamesareimpenetrable“blackboxes”. 7Againwiththebacktrackingcaveat:seefootnote4. 9 Fixed links. Uniformity as independence from the particular games imported by the opposing team will include independence from the not only the identity of those games, but also from their state. ThiswillensurethatthegeometryofAnna-Louise’scopycatplayremainsconstantovertime: once she has committed to linking one component to another, she must stick with that link for the rest of the hypergame. To illustrate this aspect of uniformity, consider the quadruple chess simultaneous display with Kasparov and Fischer playing Black, and Karpov and Spassky playing White: Kasparov Fischer Karpov Spassky rmblkans rmblkans RMBJQANS RMBJQANS opopopop opopopop OPOPOPOP OPOPOPOP 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 POPOPOPO POPOPOPO popopopo popopopo SNAQJBMR SNAQJBMR snaklbmr snaklbmr Anna-Louise We shall write Chess×Chess → Chess×Chess for this simultaneous display.8 Suppose Spassky begins with e4. Anna-Louise, playing copycat, has a choice between copying this move to Fischer ortoKasparov. SupposeshecopiesittoFischer,whorespondswithc5,whichshedulycopiesback toSpassky: Kasparov Fischer Karpov Spassky rmblkans rmblkans RMBJQANS RMBJQANS opopopop opZpopop OPOPOPOP OPO0OPOP 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z 0Z0Z0Z0Z Z0Z0Z0Z0 Z0o0Z0Z0 Z0Z0Z0Z0 Z0ZPZ0Z0 0Z0Z0Z0Z 0Z0ZPZ0Z 0Z0Z0Z0Z 0Z0Z0o0Z Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 Z0Z0Z0Z0 POPOPOPO POPO0OPO popopopo popopZpo SNAQJBMR SNAQJBMR snaklbmr snaklbmr e4 c5 Anna-Louise SupposeKarpovopenshisgamewiththeverysamemoveasSpassky,e4,whichAnna-Louisecopies accrosstoKasparov(theonlydestinationwherethismovemakessense): 8Withthebacktrackingcaveat:seefootnote4. 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.