Game-theoretic Investigation of Intensional Equalities
aa r X i v : . [ c s . L O ] A p r Game-theoretic Investigation ofIntensional Equalities
Norihiro Yamada [email protected]
University of OxfordSeptember 4, 2018
Abstract
We present a game semantics for
Martin-L¨of type theory (
MLTT ) that interprets propositionalequalities in a non-trivial manner in the sense that it refutes the principle of uniqueness of iden-tity proofs (UIP) for the first time as a game semantics in the literature. Specifically, each of ourgames is equipped with (selected) invertible strategies representing (computational) proofs of(intensional) equalities between strategies on the game; these invertible strategies then interpretpropositional equalities in MLTT , which is roughly how our model achieves the non-trivialinterpretation of them. Consequently, our game semantics provides a natural and intuitiveyet mathematically precise formulation of the
BHK-interpretation of propositional equalities.From an extensional viewpoint, the algebraic structure of our model is similar to the classic groupoid model by Hofmann and Streicher, but the former is distinguished from the latter byits computational and intensional nature. In particular, our game semantics refutes the axiomof function extensionality (FunExt) and the univalence axiom (UA) . This provides a sharp con-trast to the recent cubical set model as well. Similar to the path from the groupoid model to the ω -groupoid models , the present work is also intended to be a stepping stone towards a gamesemantics for the infinite hierarchy of propositional equalities in MLTT . Contents
This paper presents a game semantics for
Martin-L¨of type theory (
MLTT ) that refutes the princi-ple of uniqueness of identity proofs (UIP) , the axiom of function extensionality (FunExt) and the univalence axiom (UA) . Our motivation is to give a computational and intensional explana-tion of MLTT , particularly its propositional equalities , in a mathematically precise and syntax-independent manner. This work is a continuation and an improvement of [Yam16].
MLTT [ML82, ML84, ML98] is an extension of the simply-typed λ -calculus that, under the Curry-Howard isomorphism (CHI) [Cur34, Ros67, How80], corresponds to intuitionistic predicatelogic, for which the extension is made by dependent types , i.e., types that depend on terms. It wasproposed by Martin-L ¨of as a foundation of constructive mathematics, but also it has been an ob-ject of active research in computer science because it can be seen as a programming language,and one may extract programs that are “correct by construction” from its proofs. Moreover,based on the homotopy-theoretic interpretation, an extension of
MLTT , called homotopy type the-ory (
HoTT ) , was recently proposed, providing new topological insights and having potential tobe a powerful and practical foundation of mathematics [Uni13].Conceptually, MLTT is based on the
BHK-interpretation of intuitionistic logic [TvD88] whichinterprets proofs as “constructions” . Note that the BHK-interpretation is informal in nature, andformulated syntactically as MLTT ; also it is reasonable to think of such constructions as somecomputational processes which must be an intensional concept. Thus, a semantic (or syntax-independent ) model of
MLTT that interprets proofs as some intensional constructions in a math-ematically precise sense should be considered as primarily important for clarification and justi-fication of
MLTT . Also, it may give new insights for meta-theoretic study of the syntax. Justfor convenience, let us call such a semantics a computational semantics for
MLTT . In particular, acomputational semantics would interpret a proof of a propositional equality a = A a as a compu-tational process which “witnesses” that the interpretations of a and a are equal processes. Game semantics [A +
97, AM99] refers to a particular kind of semantics of logics and programminglanguages in which types and terms are interpreted as “games” and “strategies” , respectively. One2f its distinguishing characteristics is to interpret syntax as dynamic interactions between two“players” of a game, providing a computational and intensional explanation of proofs and pro-grams in a natural and intuitive yet mathematically precise and syntax-independent manner.Remarkably, game semantics for
MLTT was not addressed until Abramsky et al. recentlyconstructed such a model in [AJV15] based on AJM-games [AJM00] and their extension [AJ05].Moreover, the present author developed another game semantics for
MLTT in the unpublishedpaper [Yam16] that particularly achieves an interpretation of the (cumulative hierarchy of) uni-verses as games. By the nature of game semantics described above, these game-theoretic modelsmay be seen as possible realizations of a computational semantics for
MLTT . However, although these game models [AJV15, Yam16] interpret large parts of
MLTT , neitherinterprets propositional equalities in a non-trivial manner in the sense that they both interpreteach propositional equality as an identity strategy, and so they validate
UIP [HS98]. This is aproblem as the groupoid model [HS98] proved that UIP is not derivable in
MLTT .On the other hand, propositional equalities have been a mysterious and intriguing concept;they recently got even more attentions by a new topological interpretation of them, namely as paths between points [Uni13]. In particular, it posed a central open problem: a “constructive jus-tification” of UA [Uni13]; a significant step towards this goal is taken in [BCH14], even leadingto new syntax for equalities called path types [CCHM16]. Nevertheless, the topological inter-pretation is a priori very different from the BHK-interpretation: It is spatial and extensional. Inparticular, it does not interpret proofs of a propositional equality as computational processes.Therefore we believe that it would lead to a better understanding of propositional equalitiesin MLTT to give a game semantics (or more generally a computational semantics) that interpretsthem in a non-trivial manner.
This paper solves the open problem mentioned above: It presents a game semantics for
MLTT that does refute UIP. Specifically, we refine the previous work [Yam16] by equipping each game G with a set = G of invertible strategies ρ between strategies σ, σ ′ : G , where ρ is regarded asa “ (computational) proof of the (intensional) equality ” between σ and σ ′ , and used as a computa-tional semantics for the corresponding propositional equality. To interpret various phenomenain MLTT , we require that the structure G = ( G, = G ) forms a groupoid , i.e., a category whosemorphisms are all isomorphisms. The primary contribution of this paper is to give a game semantics for
MLTT that refutes UIP.The algebraic structure of our game semantics is similar to the classic groupoid model[HS98] by Hofmann and Streicher; thus, our main technical contribution is to add intensional structures and operations in such a way that the operations preserve the structures. In fact, ourgame model stands in a sharp contrast to the groupoid model in its intensional nature: Thegame model refutes
FunExt [Uni13] and UA. Hence, it is also distinguished from the recentcubical set model [BCH14, CCHM16], and conceptually closer to the BHK-interpretation.Our hope is that their topological and our computational perspectives are complementaryand fruitful, rather than opposing, to each other. It is not necessarily the game-semantic sense but the category-theoretic one. .6 Structure of the Paper The rest of the paper proceeds as follows. First, Section 2.1 reviews necessary backgrounds ingame semantics, and Section 2.2 recalls the games and strategies in [Yam16]. Then we refine thisvariant in Sections 2.3, 2.4, leading to the central notion of games with equalities (GwEs) . Finally,we construct a model of
MLTT by GwEs in Section 3, and make a conclusion in Section 4.
This section presents our games and strategies. Let us first fix notation: ◮ We use bold letters s , t , u , v , etc. for sequences, in particular ǫ for the empty sequence , andletters a, b, c, d, m, n, p, q, x, y, z , etc. for elements of sequences. ◮ A concatenation of sequences is represented by a juxtaposition of them, but we write a s , t b , u c v for ( a ) s , t ( b ) , u ( c ) v , etc. We sometimes write s . t for st for readability. ◮ We write even ( s ) (resp. odd ( s ) ) if s is of even-length (resp. odd-length ). For a set S ofsequences, we define S even df . = { s ∈ S | even ( s ) } and S odd df . = { t ∈ S | odd ( t ) } . ◮ s (cid:22) t means s is a prefix of t , and pref ( S ) df . = { s |∃ t ∈ S. s (cid:22) t } . ◮ For a function f : A → B and a subset S ⊆ A , f ↾ S denotes the restriction of f to S . ◮ Given sets X , X , . . . , X n , π i : X × X × · · · × X n → X i denotes the i th -projection function ( x , x , . . . , x n ) x i for each i ∈ { , , . . . , n } . ◮ Let X ∗ df . = { x x . . . x n | n ∈ N , x i ∈ X } for each set X . ◮ Given a sequence s and a set X , s ↾ X denotes the subsequence of s that consists ofelements in X . When s ∈ Z ∗ with Z = X + Y for some set Y , we abuse notation: Theoperation deletes the “tags” for the disjoint union, so that s ↾ X ∈ X ∗ . ◮ For a poset P and a subset S ⊆ P , sup ( S ) denotes the supremum of S . As mentioned above, our game semantics is a refinement of the previous work [Yam16], whichis based on McCusker’s games and strategies [AM99, McC98]. Therefore let us begin with aquick review of McCusker’s variant, focusing mainly on basic definitions. See [AM99, McC98]for a more detailed treatment of this variant, and [A +
97, AM99, Hyl97] for a general introduc-tion to the field of game semantics. A game , roughly, is a certain kind of a rooted forest whose branches represent plays in the “gamein the ordinary sense” (such as chess) it represents. These branches are finite sequences of moves of the game; a play of the game proceeds as its participants alternately make moves. Thus,a game is what specifies possible interactions between the participants, and so it interprets a type in computation (resp. a proposition in logic) which specifies terms of the type (resp. proofsof the proposition). For our purpose, it suffices to focus on games between two participants,4 layer (who represents a “computer” or a “mathematician”) and Opponent (who represents an“environment” or a “rebutter”), where Opponent always starts a play.Technically, games are based on two preliminary concepts: arenas (Definition 2.1.1) and legalpositions (Definition 2.1.4). An arena defines the basic components of a game, which in turninduces legal positions that specify the basic rules of the game. ◮ Definition 2.1.1 (Arenas [AM99, McC98]) . An arena is a triple G = ( M G , λ G , ⊢ G ) , where M G isa set whose elements are called moves , λ G is a function M G → { O , P } × { Q , A } , where O , P , Q , A are some distinguished symbols, called the labeling function , and ⊢ G ⊆ ( { ⋆ } + M G ) × M G ,where ⋆ is some fixed element, is called the enabling relation , which satisfies: ◮ (E1) If ⋆ ⊢ G m , then λ G ( m ) = OQ and n ⊢ G m ⇔ n = ⋆ ◮ (E2) If m ⊢ G n and λ QA G ( n ) = A , then λ QA G ( m ) = Q ◮ (E3) If m ⊢ G n and m = ⋆ , then λ OP G ( m ) = λ OP G ( n ) in which λ OP G df . = π ◦ λ G : M G → { O , P } and λ QA G df . = π ◦ λ G : M G → { Q , A } . A move m ∈ M G is called initial if ⋆ ⊢ G m , an O-move if λ OP G ( m ) = O , a P-move if λ OP G ( m ) = P , a question if λ QA G ( m ) = Q , and an answer if λ QA G ( m ) = A . The symbols O , P , Q , A are calle labels . ◮ Definition 2.1.2 (J-sequences [HO00, AM99, McC98]) . A justified (j-) sequence in an arena G is a finite sequence s ∈ M ∗ G , in which each non-initial move m is associated with a move J s ( m ) , or written J ( m ) , called the justifier of m in s , that occurs previously in s and satisfies J s ( m ) ⊢ G m . We also say that m is justified by J s ( m ) , and there is a pointer from m to J s ( m ) . ◮ Notation.
We write J G for the set of all j-sequences in an arena G . ◮ Remark.
Given arenas
A, B and j-sequences s m ∈ J A , t n ∈ J B , the equation s m = t n means not only they are equal sequences but also their justification and labeling structures areidentical, i.e., s m = t n ⇒ λ A ( m ) = λ B ( n ) ∧ J s ( m ) = J t ( n ) , where J s ( m ) = J t ( n ) denotes notonly the equality of moves but also the equality of the positions of their respective occurrencesin s and t , i.e., J s ( m ) and J t ( n ) are the i th -elements of s and t , respectively, for some i ∈ N . ◮ Definition 2.1.3 (Views [HO00, AM99, McC98]) . For a j-sequence s in an arena G , we definethe Player (P-) view ⌈ s ⌉ G and the Opponent (O-) view ⌊ s ⌋ G by induction on the length of s : ◮ ⌈ ǫ ⌉ G df . = ǫ ◮ ⌈ s m ⌉ G df . = ⌈ s ⌉ G .m , if m is a P-move ◮ ⌈ s m ⌉ G df . = m , if m is initial ◮ ⌈ s m t n ⌉ G df . = ⌈ s ⌉ G .mn , if n is an O-move with J s m t n ( n ) = m ◮ ⌊ ǫ ⌋ G df . = ǫ , ⌊ s m ⌋ G df . = ⌊ s ⌋ G .m , if m is an O-move ◮ ⌊ s m t n ⌋ G df . = ⌊ s ⌋ G .mn , if n is a P-move with J s m t n ( n ) = m where justifiers of the remaining moves in ⌈ s ⌉ G (resp. ⌊ s ⌋ G ) are unchanged if they occur in ⌈ s ⌉ G (resp. ⌊ s ⌋ G ) and undefined otherwise. ◮ Definition 2.1.4 (Legal positions [AM99, McC98]) . A legal position in an arena G is a finitesequence s ∈ M ∗ G (equipped with justifiers) that satisfies the following conditions:5 (Justification) s is a j-sequence in G ◮ (Alternation) If s = s mn s , then λ OP G ( m ) = λ OP G ( n ) ◮ (Visibility) If s = t m u with m non-initial, then J s ( m ) occurs in ⌈ t ⌉ G if m is a P-move, andit occurs in ⌊ t ⌋ G if m is an O-move. ◮ Notation.
We write L G for the set of all legal positions in an arena G . ◮ Definition 2.1.5 (Threads [AM99, McC98]) . Let G be an arena, and s ∈ L G . Assume that m is an occurrence of a move in s . The chain of justifiers from m is a sequence m m . . . m k m ofjustifiers, i.e., m m . . . m k m ∈ M ∗ G that satisfies J ( m ) = m k , J ( m k ) = m k − , . . . , J ( m ) = m ,where m is initial. In this case, we say that m is hereditarily justified by m . The subsequenceof s consisting of the chains of justifiers in which m occurs is called the thread of m in s . Anoccurrence of an initial move is called an initial occurrence . ◮ Notation.
Let G be an arena, and s ∈ L G . InitOcc ( s ) denotes the set of all initial occurrencesin s . We write s ↾ I , where I ⊆ InitOcc ( s ) , for the subsequence of s consisting of threads ofinitial occurrences in I , but we rather write s ↾ m for s ↾ { m } .We are now ready to define the notion of games : ◮ Definition 2.1.6 (Games [AM99, McC98]) . A game is a quadruple G = ( M G , λ G , ⊢ G , P G ) suchthat the triple ( M G , λ G , ⊢ G ) forms an arena (also denoted by G ), and P G is a subset of L G whoseelements are called (valid) positions in G satisfying: ◮ (V1) P G is non-empty and “ prefix-closed ”: s m ∈ P G ⇒ s ∈ P G ◮ (V2) If s ∈ P G and I ⊆ InitOcc ( s ) , then s ↾ I ∈ P G .A play in G is a (finite or infinite) sequence ǫ , m , m m , . . . of positions in G . ◮ Convention.
For technical convenience, we assume, without loss of any important generality,that every game G is economical : Every move m ∈ M G appears in a position in G , and every“enabling pair” m ⊢ G n occurs as a non-initial move n and its justifier m in a position in G .Consequently, a game G is completely determined by the set P G of its positions.The following is a natural “substructure-relation” between games: ◮ Definition 2.1.7 (Subgames [Yam16]) . A subgame of a game G is a game H , written H E G ,that satisfies M H ⊆ M G , λ H = λ G ↾ M H , ⊢ H ⊆ ⊢ G ∩ (( { ⋆ } + M H ) × M H ) , and P H ⊆ P G .Later, we shall focus on games that satisfy the following two conditions: ◮ Definition 2.1.8 (Well-openness [AM99, McC98]) . A game G is well-opened (wo) if s m ∈ P G with m initial implies s = ǫ . ◮ Definition 2.1.9 (Well-foundness [CH10]) . A game G is well-founded (wf) if so is the enablingrelation ⊢ G , i.e., there is no infinite sequence ⋆ ⊢ G m ⊢ G m ⊢ G m . . . of “enabling pairs”.Next, let us recall the standard constructions on games. ◮ Notation.
For brevity, we usually omit the “tags” for disjoint union of sets of moves in thefollowing constructions, e.g., we write a ∈ A + B , b ∈ A + B if a ∈ A , b ∈ B , and givenrelations R A ⊆ A × A , R B ⊆ B × B , we write R A + R B for the relation on A + B such that ( x, y ) ∈ R A + R B df . ⇔ ( x, y ) ∈ R A ∨ ( x, y ) ∈ R B , and so on. However, in contrast, we explicitlydefine tags for certain disjoint union in Section 2.2 because they are a part of our proposedstructures and play an important role in this paper.6 Definition 2.1.10 (Tensor product [AM99, McC98]) . Given games
A, B , we define their tensorproduct A ⊗ B as follows: ◮ M A ⊗ B df . = M A + M B ◮ λ A ⊗ B df . = [ λ A , λ B ] ◮ ⊢ A ⊗ B df . = ⊢ A + ⊢ B ◮ P A ⊗ B df . = { s ∈ L A ⊗ B | s ↾ A ∈ P A , s ↾ B ∈ P B } where s ↾ A (resp. s ↾ B ) denotes the subsequence of s that consists of moves of A (resp. B )equipped with the justifiers in s . ◮ Definition 2.1.11 (Linear implication [AM99, McC98]) . Given games
A, B , we define their linear implication A ⊸ B as follows: ◮ M A ⊸ B df . = M A + M B ◮ λ A ⊸ B df . = [ λ A , λ B ] , where λ A df . = h λ OP A , λ QA A i and λ OP A ( m ) df . = ( P if λ OP A ( m ) = OO otherwise ◮ ⋆ ⊢ A ⊸ B m df . ⇔ ⋆ ⊢ B m ◮ m ⊢ A ⊸ B n ( m = ⋆ ) df . ⇔ ( m ⊢ A n ) ∨ ( m ⊢ B n ) ∨ ( ⋆ ⊢ B m ∧ ⋆ ⊢ A n ) ◮ P A ⊸ B df . = { s ∈ L A ⊸ B | s ↾ A ∈ P A , s ↾ B ∈ P B } . ◮ Definition 2.1.12 (Product [AM99, McC98]) . Given games
A, B , we define their product A & B as follows: ◮ M A & B df . = M A + M B ◮ λ A & B df . = [ λ A , λ B ] ◮ ⊢ A & B df . = ⊢ A + ⊢ B ◮ P A & B df . = { s ∈ L A & B | s ↾ A ∈ P A , s ↾ B = ǫ } ∪ { s ∈ L A & B | s ↾ A = ǫ , s ↾ B ∈ P B } . ◮ Definition 2.1.13 (Exponential [AM99, McC98]) . For any game A , we define its exponential ! A as follows: The arena ! A is just the arena A , and P ! A df . = { s ∈ L ! A |∀ m ∈ InitOcc ( s ) . s ↾ m ∈ P A } .In addition, [Yam16] has introduced “composition of games”, which is a natural generaliza-tion of the composition of strategies [AM99, McC98]: ◮ Definition 2.1.14 (Composition of games [Yam16]) . Given games
A, B, C , J E A ⊸ B [1] , K E B [2] ⊸ C , where the superscripts [1] , [2] are to distinguish two copies of B , we define their composition K ◦ J (or written J ; K ) by: ◮ M K ◦ J df . = ( M J ↾ A ) + ( M K ↾ C ) ◮ λ K ◦ J df . = [ λ J ↾ M A , λ K ↾ M C ] ⋆ ⊢ K ◦ J m df . ⇔ ⋆ ⊢ K m ◮ m ⊢ K ◦ J n ( m = ⋆ ) df . ⇔ m ⊢ J n ∨ m ⊢ K n ∨ ∃ b ∈ M B .m ⊢ K b [2] ∧ b [1] ⊢ J n ◮ P K ◦ J df . = { s ↾ A, C | s ∈ P J ‡ P K } where P J ‡ P K df . = { s ∈ ( M J + M K ) ∗ | s ↾ J ∈ P J , s ↾ K ∈ P K , s ↾ B [1] , B [2] ∈ pr B } , pr B df . = { s ∈ P B [1] ⊸ B [2] |∀ t (cid:22) s . even ( t ) ⇒ t ↾ B [1] = t ↾ B [2] } , b [1] ∈ M B [1] , b [2] ∈ M B [2] are b ∈ M B equippedwith respective tags for B [1] , B [2] , M J ↾ A df . = { m ∈ M J | m ↾ A = ǫ } , M K ↾ C df . = { n ∈ M K | n ↾ C = ǫ } , and s ↾ A, C is s ↾ M A + M C equipped with the pointer defined by m ← n in s ↾ A, C ifand only if ∃ m , m , . . . , m k ∈ M (( A ⊸ B [1] ) ⊸ B [2] ) ⊸ C \ M A ⊸ C .m ← m ← m ← · · · ← m k ← n in s ( s ↾ B [1] , B [2] is defined analogously).It has been shown in [AM99, McC98, Yam16] that these constructions are all well-defined. Let us turn our attention to strategies. A strategy on a game, roughly, is what tells Player whichmove she should make next at each of her turns in the game, and so in game semantics itinterprets a term of the type (resp. a proof of the proposition) which the game interprets.In conventional game semantics, a strategy on a game G is defined as a certain set of even-length positions in G [AM99, McC98]. However, it prevents us from talking about strategies without underlying games . To overcome this point, [Yam16] reformulates strategies as follows: ◮ Definition 2.1.15 (Strategies [Yam16]) . A strategy is a wo-game σ that is “ deterministic ”: s mn, s mn ′ ∈ P even σ implies s mn = s mn ′ . Given a wo-game G , we say that σ is on G and write σ : G if σ E G and P σ is “ O-inclusive ” with respect to P G : s ∈ P even σ ∧ s m ∈ P G implies s m ∈ P σ .This notion of strategies corresponds to conventional strategies on wo-games by the canon-ical bijection Φ : σ ∼ P even σ , and σ : G in the sense of Definition 2.1.15 if and only if Φ( σ ) : G inthe conventional sense [AM99, McC98], under the assumption that every game is economical(see [Yam16] for the proof of this fact). We need to focus on wo -games here since otherwise theinverse Φ − is not well-defined due to the axiom V2 of games (though in any case objects of thecartesian closed category of games are usually wo [AM99, McC98, AJM00, HO00]).Moreover, we may reformulate standard constraints and constructions on strategies: ◮ Definition 2.1.16 (Constraints on strategies [Yam16]) . A strategy σ : G is: ◮ innocent if s mn, t ∈ P even σ ∧ t m ∈ P G ∧ ⌈ t m ⌉ G = ⌈ s m ⌉ G implies t mn ∈ P σ ◮ well-bracketed (wb) if, whenever s q t a ∈ P even σ , where q is a question that justifies ananswer a , every question in ˜ t , where ⌈ s q t ⌉ G = ˜ s q ˜ t , justifies an answer in ˜ t ◮ total if s ∈ P even σ ∧ s m ∈ P G implies s mn ∈ P σ for some (unique) n ∈ M G ◮ noetherian if P σ does not contain any strictly increasing (with respect to (cid:22) ) infinite se-quence of P-views of positions in G . ◮ Definition 2.1.17 (Constructions on strategies [Yam16]) . The composition ◦ , tensor (product) ⊗ , pairing h , i and promotion ( ) † of strategies are defined to be the composition ◦ , tensorproduct ⊗ , product & and exponential ! of games, respectively.8 Definition 2.1.18 (Copy-cats and derelictions [Yam16]) . Given a game A , the copy-cat cp A isthe strategy on A ⊸ A whose arena is A ⊸ A and positions are given by P cp A df . = pr A . If A iswo, the dereliction der A : ! A ⊸ A is cp A up to tags for the disjoint union for ! A .These constrains and constructions on strategies coincide with the standard ones [AM99,CH10] with respect to the canonical bijection Φ ; see [Yam16] for the proofs.Note that MLTT is a total type theory, i.e., its computation terminates in a finite period oftime; thus it makes sense to focus on total strategies. However, it is well-known that totality ofstrategies is not preserved under composition due to the “ infinite chattering ” between strategies[CH10]. For this problem, we further impose noetherianity [CH10] on strategies.Nevertheless, the dereliction der A , the identity on each object A in our category of games, isin general not noetherian. This motivates us to focus on wf-games because: ◮ Lemma 2.1.19 (Well-defined derelictions [Yam16]) . For any wo-game A , the dereliction der A isan innocent, wb and total strategy on ! A ⊸ A . It is noetherian if A is additionally wf.Proof. We just show that der A is noetherian if A is wf, as the other statements are trivial. Forany s mm ∈ der A , it is easy to see by induction on the length of s that the P-view ⌈ s m ⌉ ! A ⊸ A isof the form m m m m . . . m k m k m , and there is a sequence ⋆ ⊢ A m ⊢ A m · · · ⊢ A m k ⊢ A m .Therefore if A is wf, then der A must be noetherian. (cid:4) In addition to totality and noetherianity, we shall later impose innocence and well-bracketing on strategies since
MLTT is a functional programming language [AM99].The following two lemmata are immediate consequences of our definitions and establishedfacts on (conventional) strategies in the literature. ◮ Lemma 2.1.20 (Well-defined composition [Yam16]) . Given strategies σ : A ⊸ B , τ : B ⊸ C ,their composition τ ◦ σ (or written σ ; τ ) forms a strategy on the game A ⊸ C . If σ and τ are bothinnocent, wb, total and noetherian, then so is τ ◦ σ . ◮ Lemma 2.1.21 (Well-defined pairing, tensor and promotion [Yam16]) . Given strategies σ : C ⊸ A , τ : C ⊸ B , λ : A ⊸ C , γ : B ⊸ D , φ : ! A ⊸ B , the pairing h σ, τ i , tensor λ ⊗ γ and promotion φ † form strategies on C ⊸ A & B , A ⊗ B ⊸ C ⊗ D and ! A ⊸ B , respectively. They are innocent (resp.wb, total, noetherian) if so are the respective component strategies. Now, we are ready to recall the variant of games and strategies in [Yam16] that has establisheda game semantics for
MLTT with the (cumulative hierarchy of) universes.
Let us first give a characterization of wo-games as sets of strategies with some constraint as itmotivates and justifies the notion of predicative games introduced in the next section.Then what constraint do we need? First, strategies on the same game must be consistent : ◮ Definition 2.2.1 (Consistency [Yam16]) . A set S of strategies is consistent if, for any σ, τ ∈ S ,(i) λ σ ( m ) = λ τ ( m ) for all m ∈ M σ ∩ M τ ; (ii) ⋆ ⊢ σ m ⇔ ⋆ ⊢ τ m and m ⊢ σ n ⇔ m ⊢ τ n for all m, n ∈ M σ ∩ M τ ; and (iii) s m ∈ P σ ⇔ s m ∈ P τ for all s ∈ ( P σ ∩ P τ ) even , s m ∈ P σ ∪ P τ .9uch a set S induces a game S S df . = ( S σ ∈S M σ , S σ ∈S λ σ , S σ ∈S ⊢ σ , S σ ∈S P σ ) thanks to thefirst two conditions. Conversely, S S is not well-defined if S does not satisfy either. The thirdcondition ensures the “consistency of possible O-positions” among strategies in S .However, some strategies on S S may not exist in S . For this, we further require: ◮ Definition 2.2.2 (Completeness [Yam16]) . A consistent set S of strategies is complete if, for anysubset A ⊆ S σ ∈S P σ that satisfies A 6 = ∅ ∧ ∀ s ∈ A . t (cid:22) s ⇒ t ∈ A , ∀ s mn, s mn ′ ∈ A even . smn = smn ′ , and ∀ s ∈ A even . s m ∈ S σ ∈S P σ ⇒ s m ∈ A , the strategy Φ − ( A even ) exists in S .Intuitively, the completeness of a set S of strategies means its closure under the “patchworkof strategies” A ⊆ S σ ∈S P σ . For example, consider a consistent set S = { σ, τ } of strategies σ = pref ( { ac, bc } ) , τ = pref ( { ad, bd } ) (for brevity, here we specify strategies by their positions).Then we may take a subset φ = pref ( { ac, bd } ) ⊆ σ ∪ τ , but it does not exist in S , showing that S is not complete. Note that there are total nine strategies on the game S S , and so we need toadd φ and the remaining six to S to make it complete.Now, we have arrived at the desired characterization: ◮ Theorem 2.2.3 (Games as collections of strategies [Yam16]) . There is a one-to-one correspondencebetween wo-games and complete sets of strategies:1. For any wo-game G , the set { σ | σ : G } is complete, and G = S { σ | σ : G } .2. For any complete set S of strategies, the strategies on S S are precisely the ones in S . Thus, any wo-game is of the form S S with its strategies in S , where S is complete. Impor-tantly, there is no essential difference between S S and Σ S defined by: ◮ M Σ S df . = { q S } ∪ S ∪ { ( m, σ ) | σ ∈ S , m ∈ M σ } , where q S is any element ◮ λ Σ S : q S OQ , ( σ ∈ S ) PA , ( m, σ ) λ σ ( m ) ◮ ⊢ Σ S df . = { ( ⋆, q S ) } ∪ { ( q S , σ ) | σ ∈ S } ∪ { ( σ, ( m, σ )) | σ ∈ S , ⋆ ⊢ σ m }∪ { (( m, σ ) , ( n, σ )) | σ ∈ S , m ⊢ σ n } ◮ P Σ S df . = pref ( { q S .σ. ( m , σ ) . ( m , σ ) . . . ( m k , σ ) | σ ∈ S , m .m . . . m k ∈ P σ } ) .A position in Σ S is essentially a position s in S S equipped with the initial two moves q S .σ and the tag ( , σ ) on subsequent moves, where σ is any (not unique) σ ∈ S such that s ∈ P σ ; thedifference between S S and Σ S is whether to specify such σ for each s ∈ P S S .Intuitively, a play in the game Σ S proceeds as follows. Judge of the game first asks Playerabout her strategy in mind, and Player answers a strategy σ ∈ S ; and then an actual playbetween Opponent and Player begins as in S S except that Player must follow σ .To be fair, the declared strategy should be “invisible” to Opponent, and he has to declarean “ anti-strategy ” beforehand, which is “invisible” to Player, and plays by following it as well.To be precise, an anti-strategy τ on a game G is a subgame τ E G that is “ P-inclusive ” (dualto “O-inclusive”) with respect to P G and “ deterministic ” on odd-length positions. Clearly, wemay achieve the “invisibility” of Player’s strategy to Opponent by requiring that anti-strategiescannot “depend on the tags” , i.e., any anti-strategy τ on Σ S must satisfy q S .σ . ( m , σ ) . ( m , σ ) . . . ( m k +1 , σ ) ∈ P τ ⇔ q S .σ . ( m , σ ) . ( m , σ ) . . . ( m k +1 , σ ) ∈ P τ for any σ , σ ∈ S , q S .σ i . ( m , σ i ) . ( m , σ i ) . . . ( m k , σ i ) ∈ P τ for i = 1 , , m k +1 ∈ M σ ∪ M σ .However, since the “spirit” of game semantics is not to restrict Opponent’s computational10ower at all, we choose not to incorporate the declaration of anti-strategies or their “invisibilitycondition” into games. Consequently, Player cannot see Opponent’s “declaration” either.Therefore we may reformulate any wo-game in the form Σ S , where S is a complete set ofstrategies. Moreover, Σ S is a generalization of a wo-game if we do not require the completenessof S ; such S may not have all the strategies on S S . Furthermore, since we take a disjoint unionof sets of moves for Σ S , it is trivially a well-defined game even if we drop the consistency of S ; then Σ S can be thought of as a “family of games” as its strategies may have different underlyinggames, in which Player has an additional opportunity to declare a strategy that simultaneouslyspecifies a component game to play (see Example 2.2.12 below).This is the idea behind the notion of predicative games : A predicative game, roughly, is a gameof the form Σ S , where S is a (not necessarily complete or consistent) set of strategies.However, assuming there is a name | G | of each game G and a strategy G given by P G df . = pref ( { q. | G |} ) , we may form a set P of strategies by P df . = { G | G is a game , ( | G | , G ) M G } .Then the induced game P df . = Σ P gives rise to a Russell-like paradox : If ( | P | , P ) ∈ M P , then ( | P | , P ) M P , and vice versa. Our solution is the ranks of games in the next section. Now, let us proceed to define the central notion of predicative games . ◮ Definition 2.2.4 (Ranked moves [Yam16]) . A move of a game is ranked if it is a pair ( m, r ) ofsome object m and a natural number r ∈ N , which is usually written [ m ] r . A ranked move [ m ] r is more specifically called an r th -rank move , and r is said to be the rank of the move. ◮ Notation.
For a sequence [ s ] r = [ m ] r . [ m ] r . . . [ m k ] r k of ranked moves and an element (cid:3) ,we define [ s ] (cid:3) r df . = [ m ] (cid:3) r . [ m ] (cid:3) r . . . [ m k ] (cid:3) r k df . = [( m , (cid:3) )] r . [( m , (cid:3) )] r . . . [( m k , (cid:3) )] r k .Our intention is as follows: A th -rank move is just a move of a game in the conventionalsense, and an ( r + 1) st -rank move is the name of another game (whose moves are all ranked)such that the supremum of the ranks of its moves is r : ◮ Definition 2.2.5 (Ranked games [Yam16]) . A ranked game is a game whose moves are allranked. The rank R ( G ) of a ranked game G is defined by R ( G ) df . = sup ( { r | [ m ] r ∈ M G } ) + 1 if M G = ∅ , and R ( G ) df . = 1 otherwise. G is particularly called an R ( G ) th -rank game . ◮ Definition 2.2.6 (Name of games [Yam16]) . The name of a ranked game G , written N ( G ) , isthe pair [ G ] R ( G ) of G (as a set) itself and its rank R ( G ) if R ( G ) ∈ N , and undefined otherwise. ◮ Remark.
As we shall see shortly, the rank of each predicative game is finite.The name of a ranked game can be a move of a ranked game, but that name cannot be amove of the game itself by its rank, which prevents the paradox described above. ◮ Definition 2.2.7 (Predicative games [Yam16]) . For each integer k > , a k -predicative game is a k th -rank game G equipped with a set st ( G ) of ranked strategies σ with M σ ⊆ ( N × { } ) ∪{N ( H ) | H is an l -predicative game , l < k } , that satisfies: ◮ M G = Σ σ ∈ st ( G ) M σ df . = { [ m ] σr | σ ∈ st ( G ) , [ m ] r ∈ M σ } ; λ G : [ m ] σr λ σ ([ m ] r ) ◮ ⊢ G = { ( ⋆, [ m ] σr ) | σ ∈ st ( G ) , ⋆ ⊢ σ [ m ] r } ∪ { ([ m ] σr , [ m ′ ] σr ′ ) | σ ∈ st ( G ) , [ m ] r ⊢ σ [ m ′ ] r ′ } ◮ P G = pref ( { q G . N ( σ ) . [ s ] σ r | σ ∈ st ( G ) , [ s ] r ∈ P σ } ) , where q G df . = [0] .11 predicative game is a k -predicative game for some k > . A strategy on a predicative game G is any element in st ( G ) , and σ : G denotes σ ∈ st ( G ) . ◮ Notation.
We write PG k (resp. PG k ) for the set of all k -predicative games (resp. i -predicativegames with i k ). Similar notations ST k , ST k are used for strategies.That is, predicative games G are essentially the games Σ st ( G ) inductively defined alongwith their ranks except that the elements g G , N ( σ ) are not included in M G . ◮ Remark.
Strictly speaking, a predicative game G is not a game because the elements q G , N ( σ ) are not counted as moves of G , they do not have labels, and N ( σ ) occurs in a position without ajustifier. We have defined G as above, however, for an “ initial protocol ” q G . N ( σ ) between Judgeand Player is not an actual play between Opponent and Player, and it should not appear in O-views. Also, it prevents the name N ( σ ) of a strategy σ : G from affecting the rank R ( G ) . Exceptthese points, G is a particular type of a ranked wo-game.Intuitively, a play in a predicative game G proceeds as follows. At the beginning, Player hasan opportunity to “declare” a strategy σ : G to Judge, and then a play between the participantsfollows, where Player is forced to play by σ . The point is that σ : G may range over strategies ondifferent games in the conventional game semantics sense, and so Player may choose an underly-ing game when she selects a strategy. As a consequence, a predicative game may be a “family ofgames” (see Ex. 2.2.12 below) and interpret type dependency.In light of Theorem. 2.2.3, we may generalize the subgame relation as follows: ◮ Definition 2.2.8 (Subgames of predicative games [Yam16]) . A subgame of a predicative game G is a predicative game H that satisfies st ( H ) ⊆ st ( G ) . In this case, we write H E G . ◮ Example 2.2.9.
The flat game flat ( A ) on a set A is given by: ◮ M N df . = { q } ∪ A , q df . = 0 ◮ λ N : q OQ , ( a ∈ A ) PA ◮ ⊢ N df . = { ( ⋆, q ) } ∪ { ( q, a ) | a ∈ A } ◮ P N df . = pref ( { qa | a ∈ A } ) .Then the natural number game N is defined by N df . = flat ( N ) , where N is the set of all naturalnumbers. For each n ∈ N , let n denote the strategy on N such that P n = pref ( { qn } ) . A maximalposition of the corresponding 1-predicative game N is of the form q N . N ( n ) . [ q ] n . [ n ] n where n is obtained from n by changing each move m to the th -rank move [ m ] . For readabil-ity, we usually abbreviate the play as q N . N ( n ) .q.n which is essentially the play qn in N . Below, we usually abbreviate N as N .Also, there are the unit game df . = flat ( { X } ) , the terminal game I df . = ( ∅ , ∅ , ∅ , { ǫ } ) , and the empty game df . = flat ( ∅ ) . We then define the obvious strategies X : , : I ⊥ : , where X and are total, while ⊥ is not. Again, abusing notation, we write , I, for the corresponding1-predicative games , I , , respectively. 12 Definition 2.2.10 (Parallel union [Yam16]) . For k > , S ⊆ PG k , the parallel union R S isgiven by: ◮ st ( R S ) df . = S G ∈S st ( G ) ; M R S df . = S G ∈S M G ; λ R S : ([ m ] r ∈ M G ) λ G ([ m ] r ) ◮ ⊢ R S df . = { ( ⋆, [ m ] r ) |∃ G ∈ S , ⋆ ⊢ G [ m ] r } ∪ { ([ m ] r , [ m ′ ] r ′ ) |∃ G ∈ S , [ m ] r ⊢ G [ m ′ ] r ′ } ◮ P R S df . = pref ( { q R S . N ( σ ) . s |∃ G ∈ S .q G . N ( σ ) . s ∈ P G } ) , where q R S df . = [0] . ◮ Definition 2.2.11 (Predicative union [Yam16]) . For k > , S ⊆ ST k , the predicative union H S is given by: ◮ st ( H S ) df . = S ; M H S df . = Σ σ ∈S M σ ; λ H S : [ m ] σr λ σ ([ m ] r ) ◮ ⊢ H S df . = { ( ⋆, [ m ] σr ) | σ ∈ S , ⋆ ⊢ σ [ m ] r } ∪ { ([ m ] σr , [ m ′ ] σr ′ ) | σ ∈ S , [ m ] r ⊢ σ [ m ′ ] r ′ } ◮ P H S df . = pref ( { q H S . N ( σ ) . [ s ] σ r | σ ∈ S . [ s ] r ∈ P σ } ) , where q H S df . = [0] .Clearly, parallel and predicative unions are well-defined predicative games. ◮ Example 2.2.12.
In the 1-predicative game H { , X , , ⊥} , a play proceeds as either of: H { , X , , ⊥} H { , X , , ⊥} H { , X , , ⊥} H { , X , , ⊥} q H { , X , , ⊥} q H { , X , , ⊥} q H { , X , , ⊥} q H { , X , , ⊥} N (100) N ( X ) N ( ) N ( ⊥ ) q q q X This game illustrates the point that a predicative game can be a “family of games”.Let us now define a particular kind of predicative games to interpret universes: ◮ Definition 2.2.13 (Universe games [Yam16]) . For each k ∈ N , we define the k th -universe game U k by U k df . = H { G | G ∈ PG k +1 } , where G df . = flat ( {N ( G ) } ) . A universe game is the k th -universegame U k for some k ∈ N , and we often write it by U when k ∈ N is not very important. ◮ Notation.
Given total µ : U , we write El ( µ ) for the predicative game such that El ( µ ) = µ As G ∈ PG k +1 ⇔ G : U k , U k is a “universe” of all i -predicative games with i k + 1 .Also, we obtain a cumulative hierarchy: U i : U j if i < j . An “actual play” in U starts with thequestion q “What is your game?” , followed by an answer N ( G ) , meaning “It is G !” . This section generalizes the existing constructions on games (in Section 2.1) so that they preserve predicativity of games, based on which we define the category
WPG of wf-predicative games.However, there is a technical problem for linear implication: The interpretation of a Π -type Π a : A B ( a ) must be a generalization of the implication A → B = ! A ⊸ B of games, where B maydepend on a strategy on A which Opponent chooses. Naively, it seems that we may interpretit by the subgame of A → R { B ( σ ) | σ : A } whose strategies f satisfy f ◦ σ † : B ( σ ) for all σ : A . Then the “initial protocol” bocomes q B .q A . N ( σ ) . N ( f ◦ σ † ) , and a play in the subgame σ → f ◦ σ † E σ → B ( σ ) follows. This nicely captures the phenomenon of Π -types, butimposes another challenge: The implication A → R { B ( σ ) | σ : A } no longer has a protocol sincethe second move q A is not the name of the strategy to follow.Our solution, which is one of the main achievements of the paper, is the following:13 Definition 2.2.14 (Products of PLIs [Yam16]) . A product of point-wise linear implications(PLIs) between predicative games A, B is a strategy of the form φ = & σ : A φ σ , where ( φ σ ) σ : A is afamily of strategies φ σ : σ ⊸ π φ ( σ ) with π φ ∈ st ( B ) st ( A ) that is “ uniform ”: s mn ∈ P φ σ ⇔ s mn ∈ P φ σ ′ for all σ, σ ′ : A, s m ∈ P odd φ σ ∩ P odd φ σ ′ , smn ∈ P φ σ ∪ P φ σ ′ , which is defined by: ◮ M & σ : A φ σ df . = { [ m ] σr | σ : A, [ m ] r ∈ M φ σ ∩ M σ } ∪ { [ m ] π φ ( σ ) r | σ : A, [ m ] r ∈ M φ σ ∩ M π φ ( σ ) } ◮ λ & σ : A φ σ : [ m ] σr λ σ ([ m ] r ) , [ m ] π φ ( σ ) r λ π φ ( σ ) ([ m ] r ) ◮ ⊢ & σ : A φ σ df . = { ( ⋆, [ m ] π φ ( σ ) r ) | σ : A, ⋆ ⊢ π φ ( σ ) [ m ] r } ∪ { ([ m ] π φ ( σ ) r , [ n ] π φ ( σ ) l ) | σ : A, [ m ] r ⊢ π φ ( σ ) [ n ] l } ∪ { ([ m ] σr , [ n ] σl ) | σ : A, [ m ] r ⊢ σ [ n ] l } ∪ { ([ m ] π φ ( σ ) r , [ n ] σl ) | σ : A, ⋆ ⊢ π φ ( σ ) [ m ] r , ⋆ ⊢ σ [ n ] l } ◮ P & σ : A φ σ df . = S σ : A { [ m ] φ (1) σ r [ m ] φ (2) σ r . . . [ m k ] φ ( k ) σ r k | [ m ] r [ m ] r . . . [ m k ] r k ∈ P φ σ } , where φ ( i ) σ df . = σ if [ m i ] r i ∈ M σ , and φ ( i ) σ df . = π φ ( σ ) otherwise, for i = 1 , , . . . , k . ◮ Notation.
The set of all products of PLIs from A to B is written PLI ( A, B ) .Clearly, products φ ∈ PLI ( A, B ) of PLIs are well-defined strategies. They are strategies onthe linear implication A ⊸ B defined in Definition 2.2.15 below. The basic idea is as follows.When Opponent makes an initial move in A ⊸ B , he needs to determine a strategy σ on A ,which together with Player’s declared strategy φ : A ⊸ B in turn determines her strategy π φ ( σ ) on B . Note that φ has to be uniform because she should not be able to see Opponent’schoice σ . In fact, by the uniformity, φ is a natural generalization of strategies on linear im-plication in the conventional game semantics: If A, B are complete, then there is a bijection φ ∈ PLI ( A, B ) ∼ S { φ σ | σ : A } : S st ( A ) ⊸ S st ( B ) , where note that S st ( A ) ⊸ S st ( B ) is theMC-game corresponding to A ⊸ B in Definition 2.2.15 below (see [Yam16] for the details).In this manner, the new linear implication overcomes the problem mentioned above: ◮ Definition 2.2.15 (Constructions on predicative games [Yam16]) . Given a family ( G i ) i ∈ I ofpredicative games, where I is { } or { , } , we define G ⊸ G . = H PLI ( G , G ) and ♣ i ∈ I G i df . = H {♣ i ∈ I σ i |∀ i ∈ I.σ i : G i } if ♣ is product & , tensor ⊗ , exponential ! or composition ◦ . ◮ Theorem 2.2.16 (Well-defined constructions [Yam16]) . Predicative games are closed under all theconstructions in Definition 2.2.15 except that tensor and exponential do not preserve well-openness.Proof.
Since constructions on predicative games are defined in terms of the corresponding oneson strategies, and predicative unions are well-defined, the theorem immediately follows, whereuniformity of strategies on linear implication is clearly preserved under composition. (cid:4)◮
Definition 2.2.17 (Copy-casts and derelictions [Yam16]) . The copy-cat cp G : G ⊸ G (resp. dereliction der G : ! G ⊸ G ) on a predicative game G is the product & σ : G cp σ (resp. & τ :! G der τ ⋆ )of PLIs, where der τ ⋆ : τ ⊸ τ ⋆ and τ ⋆ : G is obtained from τ : ! G by deleting positions withmore than one initial move.It is not hard to see that if predicative games G i correspond to MC-games, i.e., the sets st ( G i ) are complete, then the constructions defined above correspond to the usual constructions onMC-games [AM99, McC98] given in Seciton 2.1 (see [Yam16] for the proof). ◮ Example 2.2.18.
Consider the strategies
10 : N , succ , double : N ⊸ N whose plays are:14 N succ ⊸ N N double ⊸ Nq N q N ⊸ N q N ⊸ N N (10) N ( succ ) N ( double )[ q ] [ q ] n +1 , succ [ q ] m, double [0] [ q ] n, succ [ q ] m, double [ n ] n, succ [ m ] m, double [ n + 1] n +1 , succ [2 m ] m, double The tensor product ⊗ N ⊗ N and the composition succ ; double : N ⊸ N play as follows: N ⊗ N N succ ; double ⊸ Nq N ⊗ N q N ⊸ N N (0 ⊗ N ( succ ; double )[ q ] ⊗ [ q ] n +1) , succ ; double [0] ⊗ [ q ] n, succ ; double [ q ] ⊗ [ n ] n, succ ; double [1] ⊗ [2( n + 1)] n +1) , succ ; double ◮ Definition 2.2.19 (The category
WPG [Yam16]) . The category
WPG is defined as follows: ◮ Objects are wf-predicative games ◮ Morphisms A → B are innocent, wb, total and noetherian strategies on A → B df . = ! A ⊸ B ◮ The composition of morphisms φ : A → B , ψ : B → C is ψ • φ df . = ψ ◦ φ † : A → C ◮ The identity id A on each object A is the dereliction der A : A → A . ◮ Remark.
Anti-strategies do not have to be innocent, wb, total or noetherian (we have notformulated these notions, but it should be clear what it means). Thus, in particular, for anymorphism φ = & σ :! A φ σ : A → B in WPG , σ ranges over any strategies on ! A . ◮ Corollary 2.2.20 (Well-defined
WPG [Yam16]) . The structure
WPG forms a well-defined category.Proof.
By Lemmata 2.1.19, 2.1.20, 2.1.21 and Theorem 2.2.16. (cid:4)
We have reviewed all the preliminary concepts, and the main content of the paper starts fromthe present section. From now on, let games and strategies refer to predicative games andstrategies on them by default. ◮ Notation.
We write A ⇒ B for ! A ⊸ B , as well as A ∼ ⊸ B and A ∼ ⇒ B for their respectivesubgames whose strategies are invertible , and ψ • φ for the composition ψ ◦ φ † : A ⇒ C ofstrategies φ : A ⇒ B , ψ : B ⇒ C . We often present a strategy σ by just specifying the set P σ ofits positions whenever the other components are unambiguous, and write s ∈ σ for s ∈ P σ .Let us begin with a key observation (which is applied not only to predicative games but alsoto any conventional games): 15 Theorem 2.3.1 (Isom theorem) . There is an invertible strategy φ : A ∼ ⊸ B or ψ : A ∼ ⇒ B (withrespect to copy-cats or derelictions) if and only if there is a bijection f : P A ∼ → P B such that f ( ǫ ) = ǫ and f ( s m ) = t n ⇒ f ( s ) = t for all s m ∈ P A , t n ∈ P B .Proof. Assume φ : A ∼ ⊸ B ; the case ψ : A ∼ ⇒ B is analogous, and so we omit it. It is easy to seethat φ and the inverse φ − : B ⊸ A both “behave like copy-cats” in the sense that s b ∈ φ odd (resp. s b ∈ ( φ − ) odd ) with b ∈ M B implies s ba ∈ φ (resp. s ba ∈ φ − ) for some a ∈ M A , and t a ′ ∈ φ odd (resp. t a ′ ∈ ( φ − ) odd ) with a ′ ∈ M A implies t a ′ b ′ ∈ φ (resp. t a ′ b ′ ∈ φ − ) for some b ′ ∈ M B (since otherwise φ ◦ φ − or φ − ◦ φ would not be a copy-cat). Hence, we may define thefunction F ( φ ) : P A → P B that maps:1. ǫ ǫ
2. If a a . . . a n b b . . . b n and a b b a . . . a n − b n − b n a n a n +1 b n +1 ∈ φ − , then a a . . . a n +1 b b . . . b n +1
3. If a a . . . a n +1 b b . . . b n +1 and b a a b . . . b n +1 a n +1 a n +2 b n +2 ∈ φ , then a a . . . a n +2 b b . . . b n +2 . Analogously and symmetrically, we may define another function G ( φ ) : P B → P A . Byinduction on the length of input, it is easy to see that F ( φ ) and G ( φ ) are mutually inverses, andthey both satisfy the required two conditions.Conversely, if there is a bijection f : P A ∼ → P B satisfying the two conditions, then by “re-versing” the above procedure, we may construct an invertible strategy S ( f ) : A ∼ ⊸ B and itsinverse S ( f ) − : B ∼ ⊸ A from f and f − , completing the proof. (cid:4) Note that what essentially identifies a given game G is the set P G of its positions (since gamesare assumed to be economical and j-sequences contain information for labeling); however, it isnot an essential point what each of these positions really is as long as it is distinguished fromother positions in G . Hence, Theorem 2.3.1 can be read as:Isomorphic games are essentially the same “up to implementation of positions”.In other words, the category-theoretic point of view that identifies isomorphic objects makessense in game semantics as well, where note that a category of games and strategies usuallyconsists of games as objects and strategies between them as morphisms.Now, let us consider strategies on a fixed game G . Which strategies on G should be consid-ered to be essentially the same or equivalent ? Contrary to the case of games, “implementationof positions” in strategies matters as the underlying game G is already given. For instance, ifwe identify any isomorphic strategies on the natural number game N , then there would be justone total strategy on N , which clearly should not be the case if we want N to represent the set N of natural numbers. On the other hand, e.g., we may choose to identify strategies n , n : N exactly when n ≡ n mod 2 , so that the resulting game represents the set of natural numbersmodulo . Note that it is reasonable to require equivalent strategies to be isomorphic as a min-imal requirement since it guarantees as in the case of games that they are graph-theoreticallyisomorphic (i.e., isomorphic rooted forests ).Thus, it seems that we may define an equivalence between strategies σ , σ : G by equippingit with a set of selected invertible strategies ; the set must contain the identity strategies and be These strategies are not necessarily between σ , σ themselves as explained below. Also, they are invertible notnecessarily with respect to the composition of strategies but the composition of the underlying category. ◮ Definition 2.3.2 (GwEs) . A game with equality (GwE) is a groupoid whose objects are strate-gies on a fixed game and morphisms are invertible strategies. ◮ Notation.
We usually specify a GwE by a pair G = ( G, = G ) of an underlying game G and anassignment = G of a game σ = G σ . = H G ( σ , σ ) to each pair σ , σ : G , i.e., ob ( G ) = st ( G ) , G ( σ , σ ) = st ( σ = G σ ) . We often write ρ : σ = G σ rather than ρ ∈ G ( σ , σ ) , and call it a proof of the equality between σ and σ . Moreover, let the assignment = G turn into the game by = G df . = H S σ ,σ : G G ( σ , σ ) = R { σ = G σ | σ , σ : G } . Note, however, that the set st (= G ) isin general not the set of all morphisms in the GwE G since hom-sets of G may not be pairwisedisjoint, and so the domain or codomain of some morphism may not be recovered from st (= G ) .When we say games A, B or strategies σ : A , φ : A ⇒ B , etc., where A, B are GwEs, we referto the underlying games
A, B . A GwE A is defined to be wf if so are the games A, = A . ◮ Remark.
One may wonder if the relation σ = G σ E H { σ } ∼ ⇒ H { σ } or at least σ = G σ E G ∼ ⇒ G should hold; however, neither is general enough for Definition 2.4.5. Conceptually, thisis because a proof ρ : σ = G σ may “look at” relevant information for σ , σ but not necessarily σ , σ themselves. Nevertheless, in most games G , strategies ρ : σ = G σ satisfy ρ : σ ∼ ⇒ σ . ◮ Definition 2.3.3 (Ep-strategies) . A strategy φ : A ⇒ B , where A, B are GwEs, is equality-preserving (ep) if it is equipped with another strategy φ = : = A ⇒ = B , called its equality-preservation , such that the maps ( σ : A ) φ • σ , ( ρ : = A ) φ = • ρ respectively form theobject- and arrow-maps of the extensional functor fun ( φ ) : A → B induced by φ .Explicitly, an ep-strategy φ : A ⇒ B is a pair φ = ( φ, φ = ) of strategies φ : A ⇒ Bφ = : = A ⇒ = B that satisfies, for all σ , σ , σ : A , ρ : σ = A σ , ρ : σ = A σ , the following three conditions:1. φ = • ρ : φ • σ = B φ • σ φ = • ( ρ • ρ ) = ( φ = • ρ ) • ( φ = • ρ ) φ = • id σ = id φ • σ .We define φ = ( φ, φ = ) to be innocent (resp. total , wb , noetherian ) if so are both φ and φ = . ◮ Remark.
For any ep-strategy φ : A ⇒ B , φ = is not a family ( φ = σ ,σ ) σ ,σ : A of strategies φ = σ ,σ : σ = A σ ⇒ φ • σ = B φ • σ but a single strategy φ = : = A ⇒ = B . This is for φ to be accordance with the intensional and computational nature of game semantics in the sensethat φ = cannot extensionally access to the information for the domain and codomain of a giveninput strategies on = A . Notice that this formulation is not possible for conventional games andstrategies; it is possible due to our formulation of the relation “ σ : G ”, i.e., a strategy σ is defined independently of games, and we may determine if the relation σ : G holds for a given game G . In other words, we must identify = G as an assignment of σ = G σ or G ( σ , σ ) to each σ , σ : G ; the game = G or the set st (= G ) may lose the information for domain or codomain of some morphisms. G is a game G equipped with the set σ = G σ of “(computational)proofs of the (intensional) equality” between σ and σ for all σ , σ : G , and an ep-strategy φ : A ⇒ B is a strategy equipped with another one φ = that computes on proofs of equalitiesin A and B . Therefore one may say that GwEs and ep-strategies are groupoids and functorsbetween them equipped with the intensional structure of games and strategies.As expected, GwEs and ep-strategies form a category: ◮ Definition 2.3.4 (The category
PGE ) . The category
PGE is defined by: ◮ Objects are wf-GwEs ◮ Morphisms A → B are total, innocent, wb and noetherian ep-strategies φ : A ⇒ B ◮ The composition ψ • φ : A → C of morphisms φ : A → B , ψ : B → C is given by thecompositions of strategies ψ • φ , ( ψ • φ ) = df . = ψ = • φ = ◮ The identity id A is the dereliction der A equipped with ( der A ) = df . = der = A .The category PGE is basically the category
WPG of wf-games (Definition 2.2.19) equippedwith an “intensional groupoid structure” in the sense that
PGE forms a subcategory of thecategory of groupoids and functors [HS98]. Accordingly, it is straightforward to establish: ◮ Theorem 2.3.5 (Well-defined
PGE ) . The structure
PGE forms a well-defined category.Proof.
We first show that the composition is well-defined. Let φ : A → B , ψ : B → C be anymorphisms in PGE . By Lemma 2.1.20, ψ • φ : A ⇒ C and ψ = • φ = : = A ⇒ = C both formtotal, innocent, wb and noetherian strategies. Moreover, for all σ , σ , σ : A , ρ : σ = A σ , ρ : σ = A σ , they satisfy:1. ψ = • ( φ = • ρ ) : ψ • ( φ • σ ) = B ψ • ( φ • σ ) ⇔ ( ψ = • φ = ) • ρ : ( ψ • φ ) • σ = B ( ψ • φ ) • σ ( ψ = • φ = ) • ( ρ • ρ ) = ψ = • ( φ = • ( ρ • ρ )) = ψ = • (( φ = • ρ ) • ( φ = • ρ )) = ( ψ = • ( φ = • ρ )) • ( ψ = • ( φ = • ρ )) = (( ψ = • φ = ) • ρ ) • (( ψ = • φ = ) • ρ ) ( ψ = • φ = ) • id σ = ψ = • ( φ = • id σ ) = ψ = • id φ • σ = id ψ • ( φ • σ ) = id ( ψ • φ ) • σ .Therefore the composition ψ • φ = ( ψ • φ, ψ = • φ = ) is in fact a morphism A → C in PGE .Note that the associativity of composition in
PGE immediately follows from the associativity ofcomposition of strategies.Next, by Lemma 2.1.19, der A (resp. der = A ) is a total, innocent, wb and noetherian strategyon A ∼ ⇒ A (resp. = A ∼ ⇒ = A ) for each wf-GwE A . It is also easy to see that the pair der A =( der A , der = A ) satisfies the required functoriality, forming a morphism A → A in PGE . Finally,for any morphism φ : A → B in PGE , we clearly have der B • φ = φ , der = B • φ = = φ = , φ • der A = φ and φ = • der = A = φ = . Hence, these pairs der A = ( der A , der = A ) of derelictions satisfy the unitlaw, completing the proof. (cid:4) As explained in [Yam16], wf-games can be seen as “propositions” and total, innocent, wband noetherian strategies on them as “(constructive) proofs”. Thus, we say that an object A ∈PGE is true if there is some σ ∈ PGE ( I, A ) , called a proof of A , and it is false otherwise.18 .4 Dependent Games with Equalities This section gives constructions on GwEs to interpret Π -, Σ - and Id -types “ partially ” in the sensethat they are applied only to closed terms. The “full interpretation” of these types will be givenin Section 3.2.We begin with our game semantics for dependent types : ◮ Definition 2.4.1 (DGwEs) . A dependent game with equality (DGwE) over A ∈ PGE is afunctor B : A → PGE that is “ uniform ”: s ab ∈ B ( ρ ) τ ⇔ s ab ∈ B (˜ ρ ) ˜ τ t mn ∈ B ( ρ ) = ̺ ⇔ t mn ∈ B (˜ ρ ) =˜ ̺ for all γ, γ ′ , ˜ γ, ˜ γ ′ : Γ , ρ : γ = Γ γ ′ , ˜ ρ : ˜ γ = Γ ˜ γ ′ , τ, τ , τ : B ( γ ) , ˜ τ , ˜ τ , ˜ τ : B (˜ γ ) , ̺ : τ = B ( γ ) τ , ˜ ̺ : ˜ τ = B (˜ γ ) ˜ τ , s a ∈ B ( ρ ) odd τ ∩ B (˜ ρ ) odd ˜ τ , s ab ∈ B ( ρ ) τ ∪ B (˜ ρ ) ˜ τ , t m ∈ ( B ( ρ ) = ̺ ) odd ∩ ( B (˜ ρ ) =˜ ̺ ) odd , t mn ∈ B ( ρ ) = ̺ ∪ B (˜ ρ ) =˜ ̺ . ◮ Notation.
We write D ( A ) for the set of all DGwEs over A ∈ PGE . For each B ∈ D ( A ) , recallthat [Yam16] defined the dependent union ⊎ B by ⊎ B df . = R { B ( σ ) | σ : A } .The uniformity of DGwEs B : A → PGE ensures that the respective strategies B ( ρ ) , B ( ρ ) = ,where ρ ranges over morphisms in Γ , behave in the “uniform manner”. We need it in the proofof Theorems 3.2.2, 3.2.4. Also, DGwEs are a generalization of wf-GwEs since a wf-GwE can beequivalently presented as a DGwE B : I → PGE , where I is the discrete (i.e., morphisms areonly identities) wf-GwE on the terminal game I = ( ∅ , ∅ , ∅ , { ǫ , q I , q I N ( { ǫ } ) } ) .We are now ready to give a partial interpretation of Π -types: ◮ Definition 2.4.2 (Dependent function space) . Given a DGwE B : A → PGE , the dependentfunction space b Π( A, B ) from A to B is defined as follows: ◮ The game b Π( A, B ) is the subgame of A ⇒ ⊎ B whose strategies φ are equipped with anequality-preservation φ = : = A ⇒ ⊎ = B , where ⊎ = B df . = R { = B ( σ ) | σ : A } , that satisfy: φ • σ : B ( σ ) φ = • ρ : B ( ρ ) • φ • σ = B ( σ ′ ) φ • σ ′ φ = • ( ρ ′ • ρ ) = ( φ = • ρ ′ ) • ( B ( ρ ′ ) = • φ = • ρ ) φ = • id σ = id φ • σ for all σ, σ ′ , σ ′′ : A , ρ : σ = A σ ′ , ρ ′ : σ ′ = A σ ′′ ◮ For any φ , φ : b Π( A, B ) , the game φ = b Π( A,B ) φ consists of strategies µ : φ ∼ ⇒ φ , wherewe write φ i : b Π( A [ i ] , B [ i ] ) for i = 1 , to distinguish different copies of A , ⊎ B , that satisfy:1. even ( s ) implies even ( s ↾ A [1] , A [2] ) for all s ∈ µ µ ↾ A [2] ∈ σ implies µ ↾ A [1] ∈ σ for all σ : A µ σ df . = { s ↾ ⊎ B [1] , ⊎ B [2] | s ∈ µ, µ ↾ A [2] ∈ σ } : φ • σ = B ( σ ) φ • σ for all σ : A nat ( µ ) df . = { µ σ | σ : A } forms a natural transformation from fun ( φ ) to fun ( φ ) ◮ The composition, identities and inverses of morphisms are the ones for strategies.19n the game φ = b Π( A,B ) φ , Player (resp. Opponent) can control only P-moves in φ (resp.O-moves in φ ); thus, in µ : φ = b Π( A,B ) φ , a play is completely determined by O-moves in φ .The intuition behind the four axioms for µ : φ = b Π( A,B ) φ is as follows. The condition 1ensures that µ “witnesses” that φ and φ go back and forth between A and ⊎ B “in the sametiming”. The conditions 2, 3 guarantee that the extensional “input/output behaviors” of φ and φ are shown to be equal by µ . Finally, the condition 4, just as naturality in general, correspondsto the “uniformity” of µ σ , where σ ranges over strategies on A . ◮ Lemma 2.4.3 (Well-defined b Π ) . For any DGwE B : A → PGE , we have b Π( A, B ) ∈ PGE .Proof. First, it is easy to see that the games b Π( A, B ) , = b Π( A,B ) are wf thanks to “initial protocols”.For the composition • , let µ : φ = b Π( A,B ) φ , ν : φ = b Π( A,B ) φ . It is easy to see that the axioms1, 2 are satisfied by the composition ν • µ . Also, it is not hard to see that these two axioms imply ( ν • µ ) σ = ν σ • µ σ : φ • σ = B ( σ ) φ • σ for all σ : A (by induction on four consecutive positionswith a case analysis), and so nat ( ν • µ ) = { µ σ • q σ | σ : A } satisfies the naturality conditionas nat ( ν • µ ) is just the vertical composition nat ( ν ) ◦ nat ( µ ) of natural transformations. Thus, ν • µ : φ = b Π( A,B ) φ , and so the composition • is well-defined. Also, the identity id φ on each φ : b Π( A, B ) clearly satisfies the four axioms, and so id φ : φ = b Π( A,B ) φ . Note that the associativityof the composition and the unit law of the identities are just the corresponding properties of thecomposition and identities of strategies.Next, in light of Theorem 2.3.1, it is clear that the inverse µ − : φ ∼ ⇒ φ satisfies the first twoaxioms, and ( µ − ) σ = ( µ σ ) − : φ • σ = B ( σ ) φ • σ for all σ : A . Thus, nat ( µ − ) = nat ( µ ) − ,and so µ − satisfies the naturality condition as the inverse of any natural transformation does.Explicitly, given any σ, σ ′ : A , ρ : σ = A σ ′ , we have: φ =2 • ρ • µ σ = µ σ ′ • φ =1 • ρ by the nautrality of nat ( µ ) , whence µ − σ ′ • φ =2 • ρ • µ σ • µ − σ = µ − σ ′ • µ σ ′ • φ =1 • ρ • µ − σ , i.e., µ − σ ′ • φ =2 • ρ = φ =1 • ρ • µ − σ which completes the proof. (cid:4) The idea is best described by a set-theoretic analogy: b Π( A, B ) represents the space of func-tions f : A → S x ∈ A B ( x ) that satisfies f ( a ) ∈ B ( a ) for all a ∈ A . Again, the conditionson morphisms are an “intensional refinement” of those in the groupoid interpretation [HS98].However, we have to handle the case where A is a DGwE; so b Π is not general enough. In termsof the syntax, we can interpret (Π -F ORM ) Γ , x : A ⊢ B ( x ) type ⇒ Γ ⊢ Π x : A B ( x ) type only when Γ = ♦ (the empty context ) at the moment. We shall define a more general Π shortly. This appliesto the interpretation of Σ - and Id -types given below as well.Note that a function maps equal inputs to equal outputs, but it is not obvious if it is thecase for our computational equalities, i.e., morphisms in GwEs, since there are non-trivial ones.However, equality-preservations ensure the desired property: ◮ Proposition 2.4.4 (Dependent functionality) . Let A ∈ PGE , B ∈ D ( A ) , φ , φ : b Π( A, B ) . If thereare morphisms ̺ : φ = b Π( A,B ) φ , ρ : σ = A σ in PGE , then we have at least two morphisms ( φ =2 • ρ ) • ( B ( ρ ) = • ̺ σ ) , ̺ σ • ( φ =1 • ρ ) : B ( ρ ) • φ • σ = B ( σ ) φ • σ in PGE .
20n the other hand, for any φ , φ : b Π( A, B ) , each morphism on φ = b Π( A,B ) φ tracks the“dynamics” of φ and φ ; in particular, there is such a morphism only if φ and φ go back andforth between A and ⊎ B “in the same timing”. Therefore our game semantics refutes the axiomof function extensionality (FunExt) by the same argument as [AJV15, Yam16]. This intensional nature of our interpretation presents a sharp contrast to the groupoid model [HS98].We proceed to (partially) interpret Σ -types: ◮ Definition 2.4.5 (Dependent pair space) . Given a DGwE B : A → PGE , the dependent pairspace b Σ( A, B ) of A and B is defined as follows: ◮ The game b Σ( A, B ) is the subgame of A &( ⊎ B ) whose strategies h σ, τ i satisfy τ : B ( σ ) ◮ For any objects h σ, τ i , h σ ′ , τ ′ i : b Σ( A, B ) , the game h σ, τ i = b Σ( A,B ) h σ ′ , τ ′ i is given by: st ( h σ, τ i = b Σ( A,B ) h σ ′ , τ ′ i ) df . = {h ρ, ̺ i| ρ : σ = A σ ′ , ̺ : B ( ρ ) • τ = B ( σ ′ ) τ ′ } ◮ The composition h ρ , ̺ i • h ρ , ̺ i : h σ , τ i = b Σ( A,B ) h σ , τ i of morphisms h ρ , ̺ i : h σ , τ i = b Σ( A,B ) h σ , τ i , h ρ , ̺ i : h σ , τ i = b Σ( A,B ) h σ , τ i is given by: h ρ , ̺ i • h ρ , ̺ i df . = h ρ • ρ , ̺ ⊙ ̺ i where ̺ ⊙ ̺ is defined by: ̺ ⊙ ̺ . = ̺ • B ( ρ ) = • ̺ ◮ The identity id h σ,τ i on each object h σ, τ i : b Σ( A, B ) is the pairing h id σ , id τ i ◮ The inverse h ρ, ̺ i − of each morphism h ρ, ̺ i is given by: h ρ, ̺ i − . = h ρ − , ̺ ⊖ i where ̺ ⊖ is given by: ̺ ⊖ df . = B ( ρ − ) = • ̺ − . ◮ Remark.
A morphism between h σ, τ i , h σ ′ , τ ′ i : b Σ( A, B ) is not a strategy on h σ, τ i ∼ ⇒ h σ ′ , τ ′ i but a pairing h ρ, ̺ i of morphisms ρ : σ = A σ ′ , ̺ : B ( ρ ) • τ = B ( σ ′ ) τ ′ because it seems impossibleto organize ρ and ̺ into a strategy on h σ, τ i ∼ ⇒ h σ ′ , τ ′ i . This is the main motivation to define aGwE G = ( G, = G ) such that σ = G σ E G ∼ ⇒ G for all σ , σ : G does not necessarily hold. ◮ Lemma 2.4.6 (Well-defined b Σ ) . For any DGwE B : A → PGE , we have b Σ( A, B ) ∈ PGE .Proof. First, the games b Σ( A, B ) , = b Σ( A,B ) are clearly wf again by “initial protocols”. Also, it isstraightforward to see that the composition and the identities are well-defined, where note that B ( ρ ) = • ̺ : B ( ρ ) • B ( ρ ) • τ = B ( σ ) B ( ρ ) • τ ∧ B ( ρ ) • B ( ρ ) = B ( ρ • ρ ) id τ : id B ( σ ) • τ = B ( σ ) τ ∧ B ( id σ ) = id B ( σ ) for any τ : B ( σ ) , τ : B ( σ ) , τ : B ( σ ) , σ, σ , σ , σ : A , ρ : σ = A σ , ρ : σ = A σ , ̺ : B ( ρ ) • τ = B ( σ ) τ . 21or the associativity of the composition, additionally let τ : B ( σ ) , τ : B ( σ ) , σ : A , ̺ : B ( ρ ) • τ = B ( σ ) τ , ̺ : B ( ρ ) • τ = B ( σ ) τ ; it suffices to show ̺ ⊙ ( ̺ ⊙ ̺ ) = ( ̺ ⊙ ̺ ) ⊙ ̺ .Then observe that: ̺ ⊙ ( ̺ ⊙ ̺ ) = ̺ ⊙ ( ̺ • B ( ρ ) = • ̺ )= ̺ • B ( ρ ) = • ( ̺ • B ( ρ ) = • ̺ )= ̺ • ( B ( ρ ) = • ̺ ) • ( B ( ρ ) = • B ( ρ ) = • ̺ ) (by the functoriality of B ( ρ ) ) = ( ̺ • B ( ρ ) = • ̺ ) • ( B ( ρ ) = • B ( ρ ) = ) • ̺ = ( ̺ ⊙ ̺ ) • B ( ρ • ρ ) = • ̺ (by the functoriality of B ) = ( ̺ ⊙ ̺ ) ⊙ ̺ . For the unit law of the identities, it suffices to show ̺ ⊙ id τ = ̺ and id τ ⊙ ̺ = ̺ . Thenobserve that: ̺ ⊙ id τ = ̺ • B ( ρ ) = • id τ = ̺ • id = B ( ρ ) • τ = ̺ as well as: id τ ⊙ ̺ = id τ • B ( id σ ) = • ̺ = id = B ( σ ) • ̺ = ̺ . Finally, ̺ ⊖ for any morphism ̺ : B ( ρ ) • τ = B ( σ ′ ) τ ′ , where σ, σ ′ : A , τ : B ( σ ) , τ ′ : B ( σ ′ ) , ρ : σ = A σ ′ , satisfies: ̺ ⊖ = B ( ρ − ) = • ̺ − : B ( ρ − ) • τ ′ = B ( σ ) τ where note that ̺ − is the inverse of ̺ in B ( σ ′ ) . In fact, ̺ ⊖ is the inverse of ̺ with respect to ⊙ : ̺ ⊖ ⊙ ̺ = B ( ρ − ) = • ̺ − • B ( ρ − ) = • ̺ = B ( ρ − ) = • ( ̺ − • ̺ ) (by the functoriality of B ( ρ − ) ) = B ( ρ − ) = • ( id B ( ρ ) • τ )= id B ( ρ − ) • B ( ρ ) • τ (by the functoriality of B ( ρ − ) ) = id B ( ρ − • ρ ) • τ (by the functoriality of B ) = id B ( id σ ) • τ = id id B ( σ ) • τ (by the functoriality of B ) = id τ and ̺ ⊙ ̺ ⊖ = ̺ • B ( ρ ) = • B ( ρ − ) = • ̺ − = ̺ • B ( ρ • ρ − ) = • ̺ − (by the functoriality of B ) = ̺ • B ( id σ ′ ) = • ̺ − = ̺ • id = B ( σ ′ ) • ̺ − (by the functoriality of B ) = ̺ • ̺ − = id τ ′ . From this, it follows that the pairing h ρ − , ̺ ⊖ i is a well-defined morphism from h σ, τ i to h σ ′ , τ ′ i ,and it is in fact the inverse of h ρ, ̺ i , completing the proof. (cid:4) By a set-theoretic analogy, b Σ( A, B ) represents the space of pairs ( a, b ) , where a ∈ A , b ∈ B ( a ) .As in the case of Π -types, b Σ is an “intensional refinement” of the groupoid interpretation of Σ -types [HS98].At the end of the present section, we give a (partial) interpretation of Id -types:22 Definition 2.4.7 (Identity space) . Given G ∈ PGE , σ , σ : G , the identity space b Id G ( σ , σ ) between σ and σ is the discrete groupoid with the underlying game σ = G σ . ◮ Lemma 2.4.8 (Well-defined b Id ) . For any G ∈ PGE , σ , σ : G , we have b Id G ( σ , σ ) ∈ PGE .Proof. Straightforward. (cid:4)
Note that we simply “truncate” higher morphisms as the groupoid model [HS98]. To over-come this point, we may generalize the extensional structure of GwEs to ω -groupoids , and definethe construction b Id to “ascend by one-step” the infinite hierarchy of the ω -groupoid structure.Nevertheless, we leave this point as future work. This section is the climax of the paper: It gives an interpretation of
MLTT by GwEs. Specifically,we equip the category
PGE with the structure of a category with families (CwF) in Section 3.1, andfurther game-theoretic Π -, Σ - and Id -types in Section 3.2. CwFs [Dyb96, Hof97] are an abstract semantics for
MLTT . Roughly, a CwF is a category C withadditional structures to interpret judgements common to all types as: ⊢ Γ ctx Γ ∈ C Γ ⊢ A type A ∈ Ty (Γ) Γ ⊢ a : A a ∈ Tm (Γ , A ) where Ty (Γ) , Tm (Γ , A ) are assigned sets indexed by Γ ∈ C , A ∈ Ty (Γ) . To interpret specifictypes such as Π -, Σ - and Id -types, we need to equip C with the corresponding semantic typeformers [Hof97]. By the soundness of CwFs [Hof97], this suffices to give a model of MLTT in C ,i.e., each context, type and term is interpreted in C , and each judgmental equality is reflectedby the corresponding semantic equality; see [Hof97] for the details. We employ this frameworkbecause it is in general easier to prove that a structure forms a CwF than to directly show that itis a model of MLTT .We first recall the definition of CwFs; our presentation follows that of [Hof97]. ◮ Definition 3.1.1 (CwFs [Dyb96, Hof97]) . A category with families (CwF) is a structure C =( C , Ty , Tm , { } , T, . , p , v , h , i ) , where: ◮ C is a category of contexts and context morphisms ◮ Ty assigns, to each object Γ ∈ C , a set Ty (Γ) of types in the context Γ ◮ Tm assigns, to each pair of a context Γ ∈ C and a type A ∈ Ty (Γ) , a set Tm (Γ , A ) of terms of type A in the context Γ ◮ For each morphism φ : ∆ → Γ in C , { } induces a function { φ } : Ty (Γ) → Ty (∆) and afamily ( { φ } A : Tm (Γ , A ) → Tm (∆ , A { φ } )) A ∈ Ty (Γ) of functions, called the substitutions ◮ T ∈ C is a terminal object 23 . assigns, to each pair of a context Γ ∈ C and a type A ∈ Ty (Γ) , a context Γ .A ∈ C , calledthe comprehension of A ◮ p associates each pair of a context Γ ∈ C and a type A ∈ Ty (Γ) with a morphism p ( A ) :Γ .A → Γ in C , called the first projection associated to A ◮ v associates each pair of a context Γ ∈ C and a type A ∈ Ty (Γ) with a term v A ∈ Tm (Γ .A, A { p ( A ) } ) , called the second projection associated to A ◮ h , i assigns, to each triple of a morphism φ : ∆ → Γ in C , a type A ∈ Ty (Γ) and a term τ ∈ Tm (∆ , A { φ } ) , a morphism h φ, τ i A : ∆ → Γ .A in C , called the extension of φ by τ that satisfies the following axioms: ◮ Ty-Id. A { id Γ } = A ◮ Ty-Comp. A { φ ◦ ψ } = A { φ }{ ψ } ◮ Tm-Id. ϕ { id Γ } = ϕ ◮ Tm-Comp. ϕ { φ ◦ ψ } = ϕ { φ }{ ψ } ◮ Cons-L. p ( A ) ◦ h φ, τ i A = φ ◮ Cons-R. v A {h φ, τ i A } = τ ◮ Cons-Nat. h φ, τ i A ◦ ψ = h φ ◦ ψ, τ { ψ }i A ◮ Cons-Id. h p ( A ) , v A i A = id Γ .A for all Γ , ∆ , Θ ∈ C , A ∈ Ty (Γ) , φ : ∆ → Γ , ψ : Θ → ∆ , ϕ ∈ Tm (Γ , A ) , τ ∈ Tm (∆ , A { φ } ) .We now give our CwF of game-semantic groupoids and functors: ◮ Definition 3.1.2.
The CwF
PGE = (
PGE , Ty , Tm , { } , I, p , v , h , i ) is defined by: ◮ The underlying category
PGE has been defined in Definition 2.3.4. ◮ Given Γ ∈ PGE , Ty (Γ) df . = D (Γ) , and given A ∈ D (Γ) , Tm (Γ , A ) df . = st ( b Π(Γ , A )) . ◮ For each φ : ∆ → Γ in PGE , the function { φ } : D (Γ) → D (∆) is defined by: A { φ } df . = A ◦ fun ( φ ) i.e., the composition of functors for all A ∈ D (Γ) , and the function { φ } A : st ( b Π(Γ , A )) → st ( b Π(∆ , A { φ } )) for each A ∈ D (Γ) is defined by: ϕ { φ } df . = ϕ • φϕ { φ } = df . = ϕ = • φ = for all ϕ : b Π(Γ , A ) . ◮ I is the discrete GwE on the terminal game I = ( ∅ , ∅ , ∅ , { ǫ , q I , q I N ( { ǫ } ) } ) .24 Γ .A df . = b Σ(Γ , A ) , and p ( A ) : b Σ(Γ , A ) → Γ , v A : b Π( b Σ(Γ , A ) , A { p ( A ) } ) are defined by: p ( A ) df . = & h γ,σ i : b Σ(Γ ,A ) der γ p ( A ) = df . = & h ρ,̺ i : = b Σ(Γ ,A ) der ρ v A df . = & h γ,σ i : b Σ(Γ ,A ) der σ v = A df . = & h ρ,̺ i : = b Σ(Γ ,A ) der ̺ up to tags for disjoint union. ◮ Given τ : b Π(∆ , A { φ } ) , the extension h φ, τ i A : ∆ → b Σ(Γ , A ) is the pairing h φ, τ i equippedwith the equality preservation h φ, τ i = df . = h φ = , τ = i . ◮ Theorem 3.1.3 (Well-defined
PGE ) . The structure
PGE forms a well-defined CwF.Proof.
By lemmata 2.4.3, 2.4.6, it is immediate to see that each component of
PGE is well-definedexcept the substitution of terms and the extension. Let Γ , ∆ ∈ PGE , A ∈ D (Γ) , φ : ∆ → Γ , ϕ : b Π(Γ , A ) . It has been shown in [Yam16] that ϕ { φ } = ϕ • φ forms a strategy on the game b Π(∆ , A { φ } ) . The equality-preservation ϕ { φ } = = ϕ = • φ = : = ∆ ⇒ ⊎ = A satisfies: ϕ = • ( φ = • ϑ ) : A ( φ = • ϑ ) • ( ϕ • ( φ • δ )) = A ( φ • δ ′ ) ϕ • ( φ • δ ′ ) i.e., ( ϕ • φ ) = • ϑ : A { φ } ( ϑ ) • (( ϕ • φ ) • δ ) = A ( φ • δ ′ ) ( ϕ • φ ) • δ ′ for all δ, δ ′ : ∆ , ϑ : δ = ∆ δ ′ . Therefore we may conclude that ϕ { φ } = ( ϕ • φ, ϕ = • φ = ) : b Π(∆ , A { φ } ) ,showing that the substitution of terms is well-defined.Next, for the context extension, let τ : b Π(∆ , A { φ } ) . Again, it has been shown in [Yam16] thatthe pairing h φ, τ i forms a strategy on the game ∆ ⇒ b Σ(Γ , A ) ; thus, it remains to show that it isep. Then for any δ, δ ′ : ∆ , ϑ : δ = ∆ δ ′ , we have: h φ, τ i = • ϑ = h φ = , τ = i • ϑ = h τ = • ϑ, τ = • ϑ i where φ = • ϑ : φ • δ = Γ φ • δ ′ , τ = • ϑ : A ( τ = • ϑ ) • ( τ • δ ) = A ( τ • δ ′ ) τ • δ ′ , whence h φ, ψ i = • ϑ : h φ, τ i • δ = b Σ(Γ ,A ) h φ, τ i • δ ′ which shows that h φ, τ i = preserves domain and codomain. It also preserves composition: h φ, τ i = • ( ϑ ′ • ϑ ) = h φ = • ( ϑ ′ • ϑ ) , τ = • ( ϑ ′ • ϑ ) i = h ( φ = • ϑ ′ ) • ( φ = • ϑ ) , ( τ = • ϑ ′ ) • ( A { φ } ( ϑ ′ ) = • τ = • ϑ ) i = h ( φ = • ϑ ′ ) • ( φ = • ϑ ) , ( τ = • ϑ ′ ) • ( A ( φ = • ϑ ′ ) = • τ = • ϑ ) i = h ( φ = • ϑ ′ ) • ( φ = • ϑ ) , ( τ = • ϑ ′ ) ⊙ ( τ = • ϑ ) i = h φ = • ϑ ′ , τ = • ϑ ′ i • h φ = • ϑ, τ = • ϑ i = ( h φ, τ i = • ϑ ′ ) • ( h φ, τ i = • ϑ ) for any δ ′′ : ∆ , ϑ ′ : δ ′ = ∆ δ ′′ . Of course, it preserves identities as well: h φ, τ i = • id δ = h φ = • id δ , τ = • id δ i = h id φ • δ , id τ • δ i = id h φ • δ,τ • δ i = id h φ,τ i• δ δ : ∆ . Therefore the pair h φ, τ i = ( h φ, τ i , h φ = , τ = i ) is a morphism ∆ → b Σ(Γ , A ) in PGE ,showing that the extension is well-defined.Finally, we verify the required equations. Let Γ , ∆ , Θ ∈ PGE , A ∈ D (Γ) , φ : ∆ → Γ , ψ : Θ → ∆ , ϕ : b Π(Γ , A ) , τ : b Π(∆ , A { φ } ) . ◮ Ty-Id. A { id Γ } = A ◦ fun ( der Γ ) = A ◮ Ty-Comp. A { φ • ψ } = A ◦ fun ( φ • ψ ) = A ◦ ( fun ( φ ) ◦ fun ( ψ )) = ( A ◦ fun ( φ )) ◦ fun ( ψ ) = A { φ } ◦ fun ( ψ ) = A { φ }{ ψ } ◮ Tm-Id. ϕ { id Γ } = ϕ • der Γ = ϕ ∧ ϕ { id Γ } = = ϕ = • der =Γ = ϕ = • der = Γ = ϕ = ◮ Tm-Comp. ϕ { φ • ψ } = ϕ • ( φ • ψ ) = ( ϕ • φ ) • ψ = ϕ { φ }{ ψ } ∧ ϕ { φ • ψ } = = ϕ = • ( φ • ψ ) = = ϕ = • ( φ = • ψ = ) = ( ϕ = • φ = ) • ψ = = ϕ { φ } = • ψ = = ϕ { φ }{ ψ } = ◮ Cons-L. p ( A ) • h φ, τ i = φ ∧ p ( A ) = • h φ, τ i = = p ( A ) = • h φ = , τ = i = φ = ◮ Cons-R. v A {h φ, τ i} = v A • h φ, τ i = τ ∧ v A {h φ, τ i} = = v = A • h φ, τ i = = v = A • h φ = , τ = i = τ = ◮ Cons-Nat. h φ, τ i • ψ = h φ • ψ, τ • ψ i ∧ h φ, τ i = • ψ = = h φ = , τ = i • ψ = = h φ = • ψ = , τ = • ψ = i = h ( φ • ψ ) = , τ { ψ } = i = h φ • ψ, τ { ψ }i = ◮ Cons-Id. h p ( A ) , v A i = der b Σ(Γ ,A ) ∧ h p ( A ) , v A i = = h p ( A ) = , v = A i = der = b Σ(Γ ,A ) which completes the proof. (cid:4) As stated before, a CwF gives only an interpretation of the syntax common to all types. Thus, fora “full interpretation” of
MLTT , we need to equip
PGE with semantic type formers . We addressthis point in the present section.
We begin with Π -types. First, we recall the general, categorical interpretation of Π -types. ◮ Definition 3.2.1 (CwFs with Π -types [Hof97]) . A CwF C supports Π -types if: ◮ Π -Form. For any Γ ∈ C , A ∈ Ty (Γ) , B ∈ Ty (Γ .A ) , there is a type Π( A, B ) ∈ Ty (Γ) . ◮ Π -Intro. If ϕ ∈ Tm (Γ .A, B ) , then there is a term λ A,B ( ϕ ) ∈ Tm (Γ , Π( A, B )) . ◮ Π -Elim. If κ ∈ Tm (Γ , Π( A, B )) , τ ∈ Tm (Γ , A ) , then there is a term App
A,B ( κ, τ ) ∈ Tm (Γ , B { τ } ) where τ df . = h id Γ , τ i A : Γ → Γ .A . ◮ Π -Comp. For all ϕ ∈ Tm (Γ .A, B ) , τ ∈ Tm (Γ , A ) , App
A,B ( λ A,B ( ϕ ) , τ ) = ϕ { τ } . Π -Subst. For any ∆ ∈ C , φ : ∆ → Γ in C , Π( A, B ) { φ } = Π( A { φ } , B { φ + } ) where φ + df . = h φ ◦ p ( A { φ } ) , v A { φ } i A : ∆ .A { φ } → Γ .A . ◮ λ -Subst. For all ϕ ∈ Tm (Γ .A, B ) , λ A,B ( ϕ ) { φ } = λ A { φ } ,B { φ + } ( ϕ { φ + } ) ∈ Tm (∆ , Π( A { φ } , B { φ + } )) where note that Π( A { φ } , B { φ + } ) ∈ Ty (∆) . ◮ App-Subst.
Under the same assumption,
App
A,B ( κ, τ ) { φ } = App A { φ } ,B { φ + } ( κ { φ } , τ { φ } ) ∈ Tm (∆ , B { τ ◦ φ } ) where note that κ { φ } ∈ Tm (∆ , Π( A { φ } , B { φ + } )) , τ { φ } ∈ Tm (∆ , A { φ } ) , and φ + ◦ τ { φ } = h φ ◦ p ( A { φ } ) , v A { φ } i A ◦ h id ∆ , τ { φ }i A { φ } = h φ, τ { φ }i A = h id Γ , τ i A ◦ φ = τ ◦ φ .Furthermore, C supports Π -types in the strict sense if it additionally satisfies the following: ◮ λ -Uniq. For all µ : b Π( b Σ(Γ , A ) , Π( A, B ) { p ( A ) } ) , λ A { p ( A ) } ,B { p ( A ) + } ( App A { p ( A ) } ,B { p ( A ) + } ( µ, v A )) = µ. Note that it corresponds to the rule Π -Uniq or η -rule in MLTT .Let us now give our game-semantic interpretation of Π -types: ◮ Theorem 3.2.2 (Game-semantic Π -types) . The CwF
PGE supports Π -types.Proof. Let Γ ∈ PGE , and A : Γ → PGE , B : b Σ(Γ , A ) → PGE be DGwEs. Π -F ORM . For each γ : Γ , we define a DGwE B γ : A ( γ ) → PGE by: B γ ( σ ) df . = B ( h γ, σ i ) ∈ PGE B γ ( ̺ ) df . = B ( h id γ , ̺ i ) : B ( h γ, σ i ) → B ( h γ, ˜ σ i ) for all σ, ˜ σ : A ( γ ) , ̺ : σ = A ( γ ) ˜ σ . B γ is clearly well-defined since the functoriality and uniformityof B γ follow from those of B . We usually write B ( γ, σ ) , B ( id , ̺ ) for B ( h γ, σ i ) , B ( h id γ , ̺ i ) ,respectively.For each ρ : γ = Γ γ ′ , we may define a natural transformation nat ( B ρ ) : B γ ⇒ B γ ′ { A ( ρ ) } : A ( γ ) → PGE whose components are defined by: nat ( B ρ ) σ df . = B ( ρ, id A ( ρ ) • σ ) : B ( γ, σ ) → B ( γ ′ , A ( ρ ) • σ ) for all σ : A ( γ ) . In fact, nat ( B ρ ) is natural in A ( γ ) : Given σ , σ : A ( γ ) , ̺ : σ = A ( γ ) σ , thediagram B γ ( σ ) nat ( B ρ ) σ ✲ B γ ′ { A ( ρ ) } ( σ ) B γ ( σ ) B γ ( ̺ ) ❄ nat ( B ρ ) σ ✲ B γ ′ { A ( ρ ) } ( σ ) B γ ′ { A ( ρ ) } ( ̺ ) ❄ B γ ′ { A ( ρ ) } ( ̺ ) • nat ( B ρ ) σ = B ( id γ ′ , A ( ρ ) = • ̺ ) • B ( ρ, id A ( ρ ) • σ )= B ( ρ, id A ( ρ ) • σ ) • B ( id γ , ̺ )= nat ( B ρ ) σ • B γ ( ̺ ) . By the uniformity of B , we may organize strategies { nat ( B ρ ) σ | σ : A ( γ ) } into a single strategy B ρ : ⊎ B γ ⇒ ⊎ B γ ′ { A ( ρ ) } , and similarly { nat ( B ρ ) = σ | σ : A ( γ ) } into B = ρ : ⊎ = B γ ⇒ ⊎ = B γ ′ { A ( γ ) } .We then define a DGwE Π( A, B ) : Γ → PGE by: Π( A, B )( γ ) df . = b Π( A ( γ ) , B γ )Π( A, B )( ρ ) df . = ρ Π( A,B ) : b Π( A ( γ ) , B γ ) → b Π( A ( γ ′ ) , B γ ′ ) for all γ, γ ′ : Γ , ρ : γ = Γ γ ′ , where ρ Π( A,B ) : b Π( A ( γ ) , B γ ) → b Π( A ( γ ′ ) , B γ ′ ) is the ep-strategy ρ Π( A,B ) df . = & φ : b Π( A ( γ ) ,B γ ) φ ⇆ A ( ρ − ) † ; φ † ; B ρ : b Π( A ( γ ) , B γ ) ⇒ b Π( A ( γ ′ ) , B γ ′ ) for which we define: φ ⇆ A ( ρ − ) † ; φ † ; B ρ df . = { s ↾ φ [1] , A ( γ ′ ) , ⊎ B γ ′ | s ∈ φ [1] ∼ ⇒ A ( ρ − ) † ‡ ( φ [2] ) † ‡ B ρ , ∀ t mn (cid:22) s . even ( t ) ∧ m ∈ M φ ⇒ ( t ↾ φ [1] , φ [2] ) .mn ∈ der φ } where clearly φ † ; B ρ : b Π( A ( γ ) , B γ ′ { A ( ρ ) } ) , whence A ( ρ − ) † ; φ † ; B ρ : b Π( A ( γ ′ ) , B γ ′ ) . Also, ρ Π( A,B ) is uniform since its components φ ⇆ A ( ρ − ) † ; φ † ; B ρ solely depend on the “behavior” of φ .Therefore it follows that ρ b Π( A,B ) is a well-defined strategy on b Π( A ( γ ) , B γ ) ⇒ b Π( A ( γ ′ ) , B γ ′ ) . Forbrevity, from now on, let us write φ ⇆ B ρ • φ • A ( ρ − ) for φ ⇆ A ( ρ − ) † ; φ † ; B ρ .The equality-preservation ρ =Π( A,B ) : ( b Π( A ( γ ) [1] , B [1] γ ) ∼ ⇒ b Π( A ( γ ) [2] , B [2] γ )) ∼ ⇒ ( b Π( A ( γ ′ ) [1] , B [1] γ ′ ) ∼ ⇒ b Π( A ( γ ′ ) [2] , B [2] γ ′ )) is defined by: ρ =Π( A,B ) df . = & φ ,φ : b Π( A ( γ ) ,B γ ) ,ν : φ = b Π( A ( γ ) ,Bγ ) φ ν ⇆ B ( ρ ) = • ν • A ( ρ − ) = . As an illustration, given φ , φ : b Π( A ( γ ) , B γ ) , ν : φ = b Π( A ( γ ) ,B γ ) φ , the strategy ν ⇆ B ( ρ ) = • ν • A ( ρ − ) = : φ = b Π( A ( γ ) ,B γ ) φ ∼ ⇒ ρ Π( A,B ) • φ = b Π( A ( γ ′ ) ,B γ ′ ) ρ Π( A,B ) • φ ν and ρ =Π( A,B ) • ν in the following diagram: A ( γ ′ ) [1] A ( ρ − ) ✲ A ( γ ) [1] φ ✲ ⊎ B [1] γ B ρ ✲ ⊎ B [1] γ ′ A ( γ ) [1] φ ✲ i d A ( γ ) ✲ ✛ .................................... ρ = Π ( A , B ) ν ⊎ B [1] γ ..................................................... ρ = Π ( A , B ) ✲ i d ⊎ B γ ✲ A ( γ ′ ) [2] ρ =Π( A,B ) • ν ❄ ................................... A ( ρ − ) ✲ A ( γ ) [2] ❄ ............ φ .......... ✲ ⊎ B [2] γ ν ❄ B ρ ✲ ⊎ B [2] γ ′ ρ =Π( A,B ) • ν ❄ .................................. A ( γ ) [2] ν ❄ ................................. φ ✲ i d A ( γ ) ✲ ✛ .................................... ρ = Π ( A , B ) ⊎ B [2] γ ν ❄ ..................................................... ρ = Π ( A , B ) ✲ i d ⊎ B γ ✲ where the strategies on dotted arrows indicate that they do not “control” the play in the dia-gram, but rather they “occur” as the result of the play. It is immediate from the diagram that ρ =Π( A,B ) preserves composition and identities. Also, it is obvious that ρ =Π( A,B ) • ν satisfies thefirst two axioms for morphisms between dependent functions (see Definition 2.4.2).For the third axiom, let σ ′ : A ( γ ′ ) , φ , φ : b Π( A ( γ ) , B γ ) , ν : φ = b Π( A ( γ ) ,B γ ) φ be fixed; wehave to show ( ρ =Π( A,B ) • ν ) σ ′ : ( ρ Π( A,B ) • φ ) • σ ′ = B γ ′ ( σ ′ ) ( ρ Π( A,B ) • φ ) • σ ′ . By the definition,we have ν A ( ρ − ) • σ ′ : φ • A ( ρ − ) • σ ′ = B γ ( A ( ρ − ) • σ ′ ) φ • A ( ρ − ) • σ ′ , whence the definition of ρ =Π( A,B ) implies the desired property: ( ρ =Π( A,B ) • ν ) σ ′ = B = ρ • ν A ( ρ − ) • σ ′ : B ρ • φ • A ( ρ − ) • σ ′ = B γ ′ ( σ ′ ) B ρ • φ • A ( ρ − ) • σ ′ . Now, we show the fourth axiom or the naturality of ρ =Π( A,B ) • ν . Let σ ′ , σ ′ : A ( γ ′ ) , ̺ ′ : σ ′ = A ( γ ′ ) σ ′ ; we have to show that the following diagram commutes: ( ρ Π( A,B ) • φ ) • σ ′ ( ρ =Π( A,B ) • ν ) σ ′ ✲ ( ρ Π( A,B ) • φ ) • σ ′ ( ρ Π( A,B ) • φ ) • σ ′ ( ρ Π( A,B ) • φ ) = • ̺ ′ ❄ ( ρ =Π( A,B ) • ν ) σ ′ ✲ ( ρ Π( A,B ) • φ ) • σ ′ ( ρ Π( A,B ) • φ ) = • ̺ ′ ❄ (( ρ Π( A,B ) • φ ) = • ̺ ′ ) • ( ρ =Π( A,B ) • ν ) σ ′ = ( B ρ • φ • A ( ρ − )) = • ̺ ′ • B = ρ • ν A ( ρ − ) • σ ′ = B = ρ • ( φ =2 • A ( ρ − ) = • ̺ ′ ) • B = ρ • ν A ( ρ − ) • σ ′ = B = ρ • ( φ =2 • A ( ρ − ) = • ̺ ′ • ν A ( ρ − ) • σ ′ ) (by the functoriality of B ρ ) = B = ρ • ( ν A ( ρ − ) • σ ′ • φ =1 • A ( ρ − ) = • ̺ ′ ) (by the naturality of ν ) = ( B = ρ • ν A ( ρ − ) • σ ′ ) • ( B = ρ • φ =1 • A ( ρ − ) = • ̺ ′ ) (by the functoriality of B ρ ) = ( ρ =Π( A,B ) • ν ) σ ′ • (( ρ Π( A,B ) • φ ) = • ̺ ′ ) . By the definition, the strategies ρ Π( A,B ) , ρ =Π( A,B ) are clearly both total and wb. Also, since B ρ , A ( ρ − ) are both invertible and “copy-cat-like”, so are ρ Π( A,B ) , ρ =Π( A,B ) . Therefore they areinnocent and noetherian as well just by the same reason as copy-cats (and derelictions).Hence, we have shown that the pair ρ Π( A,B ) = ( ρ Π( A,B ) , ρ =Π( A,B ) ) is a morphism b Π( A ( γ ) , B γ ) → b Π( A ( γ ′ ) , B γ ′ ) in the category PGE . It remains to establish that Π( A, B ) preserves compositionand identities. For composition, let ρ : γ = Γ γ ′ , ρ : γ ′ = Γ γ ′′ . Then observe that: ( ρ ′ • ρ ) Π( A,B ) = & φ : b Π( A ( γ ) ,B γ ) φ ⇆ B ρ ′ • ρ • φ • A (( ρ ′ • ρ ) − )= & φ : b Π( A ( γ ) ,B γ ) φ ⇆ B ρ ′ • B ρ • φ • A ( ρ − ) • A ( ρ ′− )= (& φ ′ : b Π( A ( γ ′ ) ,B γ ′ ) φ ′ ⇆ B ρ ′ • φ ′ • A ( ρ ′− )) • (& φ : b Π( A ( γ ) ,B γ ) φ ⇆ B ρ • φ • A ( ρ − ))= ρ ′ Π( A,B ) • ρ Π( A,B ) where note that: B ρ ′ • ρ = & σ : A ( γ ) ,τ : B γ ( σ ) B ( ρ ′ • ρ, id A ( ρ ′ • ρ ) • σ ) τ = & σ : A ( γ ) ,τ : B γ ( σ ) B ( ρ ′ • ρ, id A ( ρ ′ • ρ ) • σ • A ( ρ ′ ) = • id A ( ρ ) • σ ) τ = & σ : A ( γ ) ,τ : B γ ( σ ) B ( ρ ′ • ρ, id A ( ρ ′ • ρ ) • σ ⊙ id A ( ρ ) • σ ) τ = & σ : A ( γ ) ,τ : B γ ( σ ) B (( ρ ′ , id A ( ρ ′ ) • A ( ρ ) • σ ) • ( ρ, id A ( ρ ) • σ )) τ = & σ : A ( γ ) ,τ : B γ ( σ ) ( B ( ρ ′ , id A ( ρ ′ ) • A ( ρ ) • σ ) • B ( ρ, id A ( ρ ) • σ )) τ = (& σ ′ : A ( γ ′ ) ,τ ′ : B γ ′ ( σ ′ ) B ( ρ ′ , id A ( ρ ′ ) • σ ′ ) τ ′ ) • (& σ : A ( γ ) ,τ : B γ ( σ ) B ( ρ, id A ( ρ ) • σ ) τ )= B ρ ′ • B ρ . To see ( ρ ′ • ρ ) =Π( A,B ) = ρ ′ =Π( A,B ) • ρ =Π( A,B ) , it suffices to observe that the outer part of the digram A ( γ ′′ ) [1] A (( ρ ′ • ρ ) − ) ✲ A ( γ ) [1] .... φ ✲ ⊎ B [1] γ B ρ ′ • ρ ✲ ⊎ B [1] γ ′′ A ( γ ′′ ) [2] ( ρ ′ • ρ ) =Π( A,B ) • ν ❄ ....... A (( ρ ′ • ρ ) − ) ✲ A ( γ ) [2] ν ❄ .... φ ✲ ⊎ B [2] γ ν ❄ B ρ ′ • ρ ✲ ⊎ B [2] γ ′′ ( ρ ′ • ρ ) =Π( A,B ) • ν ❄ ......30s equal to that of the diagram A ( γ ′′ ) [1] A ( ρ ′− ) ✲ A ( γ ′ ) [1] A ( ρ − ) ✲ A ( γ ) [1] .... φ ✲ ⊎ B [1] γ B ρ ✲ ⊎ B [1] γ ′ B ρ ′ ✲ ⊎ B [1] γ ′′ A ( γ ′′ ) [2] ( ρ ′ • ρ ) =Π( A,B ) • ν ❄ ....... A ( ρ ′− ) ✲ A ( γ ′ ) [2] ρ =Π( A,B ) • ν ❄ ....... A ( ρ − ) ✲ A ( γ ) [2] ν ❄ .... φ ✲ ⊎ B [2] γ ν ❄ B ρ ✲ ⊎ B [2] γ ′ ρ =Π( A,B ) • ν ❄ ...... B ρ ′ ✲ ⊎ B [2] γ ′′ ( ρ ′ • ρ ) =Π( A,B ) • ν ❄ ......for all φ , φ : b Π( A ( γ ) , B γ ) , ν : φ = b Π( A ( γ ) ,B γ ) φ .For identities, let γ : Γ . Then, we have: Π( A, B )( id γ ) = ( id γ ) Π( A,B ) = & φ : b Π( A ( γ ) ,B γ ) φ ⇆ B id γ • φ • A ( id − γ )= & φ : b Π( A ( γ ) ,B γ ) φ ⇆ id B γ • φ • id A ( γ ) = & φ : b Π( A ( γ ) ,B γ ) φ ⇆ φ = id b Π( A ( γ ) ,B γ ) = id Π( A,B )( γ ) as well as: Π( A, B )( id γ ) = = ( id γ ) =Π( A,B ) = & φ ,φ : b Π( A ( γ ) ,B γ ) ,ν : φ = b Π( A ( γ ) ,Bγ ) φ ν ⇆ B = id γ • ν • A ( id − γ ) = = & φ ,φ : b Π( A ( γ ) ,B γ ) ,ν : φ = b Π( A ( γ ) ,Bγ ) ν ⇆ id = B γ • ν • id = A ( γ ) = & φ ,φ : b Π( A ( γ ) ,B γ ) ,ν : φ = b Π( A ( γ ) ,Bγ ) ν ⇆ ν = id = b Π( A ( γ ) ,Bγ ) = id =Π( A,B )( γ ) Therefore Π( A, B ) in fact preserves composition and identities. Π -I NTRO . As in the previous work [Yam16], we have the obvious correspondence ob ( b Π( b Σ(Γ , A ) , B )) ∼ = ob ( b Π(Γ , Π( A, B ))) between objects. Moreover, we may extend this correspondence to morphisms in the obviousway. Given an ep-strategy ψ : b Π( b Σ(Γ , A ) , B ) , let us write λ A,B ( ψ ) : b Π(Γ , Π( A, B )) for the corre-sponding ep-strategy. In fact, it is straightforward to see that: λ A,B ( ψ ) • γ : b Π( A ( γ ) , B γ ) λ A,B ( ψ ) = • ρ : ρ Π( A,B ) • λ A,B ( ψ ) • γ = b Π( A ( γ ′ ) ,B γ ′ ) λ A,B ( ψ ) • γ ′ λ A,B ( ψ ) = • ( ρ ′ • ρ ) = ( λ A,B ( ψ ) = • ρ ′ ) • (( ρ ′ ) =Π( A,B ) • λ A,B ( ψ ) = • ρ ) λ A,B ( ψ ) = • ( id γ ) = id λ A,B ( ψ ) • γ for all γ, γ ′ , γ ′′ : Γ , ρ : γ = Γ γ ′ , ρ ′ : γ ′ = Γ γ ′′ . 31 -E LIM . Given ϕ : b Π(Γ , Π( A, B )) , α : b Π(Γ , A ) , we define App
A,B ( ϕ, α ) : b Π(Γ , B { α } ) by: App
A,B ( ϕ, α ) df . = λ − A,B ( ϕ ) • α App
A,B ( ϕ, α ) = df . = λ − A,B ( ϕ ) = • α = where α df . = h der Γ , α i : Γ → b Σ(Γ , A ) . I.e., we define App
A,B ( ϕ, α ) df . = λ − A,B ( ϕ ) { α } , and so App
A,B ( ϕ, α ) : b Π(Γ , B { α } ) by Theorem 3.1.3. Π -C OMP . By a simple calculation, we have:
App
A,B ( λ A,B ( ψ ) , α ) = λ − A,B ( λ A,B ( ψ )) { α } = ψ { α } . Π -S UBST . Given ∆ ∈ PGE , φ : ∆ → Γ in PGE , we have: Π( A, B ) { φ } ( δ ) = b Π( A ( φ • δ ) , B φ • δ )= b Π( A { φ } ( δ ) , B { φ + } δ )= Π( A { φ } , B { φ + } )( δ ) for all δ : ∆ , where φ + df . = h φ • p ( A { φ } ) , v A { φ } i : b Σ(∆ , A { φ } ) → b Σ(Γ , A ) and B { φ + } ∈ D ( b Σ(∆ , A { φ } )) . Note that B φ • δ = B { φ + } δ : A { φ } ( δ ) → PGE because B φ • δ ( σ ) = B ( φ • δ, σ )= B { φ + } ( δ, σ )= B { φ + } δ ( σ ) for all σ : A { φ } ( δ ) , and similarly B φ • δ ( ̺ ) = B ( id φ • δ , ̺ )= B { φ + } ( id δ , ̺ )= B { φ + } δ ( ̺ ) for all σ, σ ′ : A { φ } ( δ ) , ̺ : σ = A { φ } ( δ ) σ ′ . Since δ was arbitrary, we have shown that the object-maps of Π( A, B ) { φ } and Π( A { φ } , B { φ + } ) coincide.Furthermore, we have: Π( A, B ) { φ } ( ϑ ) = ( φ = • ϑ ) Π( A,B ) : b Π( A ( φ • δ ) , B φ • δ ) → b Π( A ( φ • δ ′ ) , B φ • δ ′ )= & ϕ : b Π( A ( φ • δ ) ,B φ • δ ) ϕ ⇆ B φ = • ϑ • ϕ • A (( φ = • ϑ ) − )= & ϕ : b Π( A { φ } ,B { φ + } )( δ ) ϕ ⇆ B { φ + } ϑ • ϕ • A { φ } ( ϑ − )= ϑ Π( A { φ } ,B { φ + } ) = Π( A { φ } , B { φ + } )( ϑ ) for all δ, δ ′ : ∆ , ϑ : δ = ∆ δ ′ . Also, it is completely analogous to establish: Π( A, B ) { φ } ( ϑ ) = = Π( A { φ } , B { φ + } )( ϑ ) = . I.e., Π( A, B ) { φ } ( ϑ ) and Π( A { φ } , B { φ + } )( ϑ ) are the same ep-strategy. Since δ, δ ′ : ∆ , ϑ : δ = ∆ δ ′ were arbitrarily chosen, it implies that the arrow-maps of Π( A, B ) { φ } and Π( A { φ } , B { φ + } ) coincide, which establishes the equality between functors Π( A, B ) { φ } = Π( A { φ } , B { φ + } ) :∆ → PGE . 32 -S UBST . For any ψ : b Π( b Σ(Γ , A ) , B ) , it is not hard to see that: λ A,B ( ψ ) { φ } = λ A,B ( ψ ) • φ = λ A { φ } ,B { φ + } ( ψ • h φ • p ( A { φ } ) , v A { φ } i ) = λ A { φ } ,B { φ + } ( ψ { φ + } ) λ A,B ( ψ ) { φ } = = λ A,B ( ψ ) = • φ = = λ A { φ } ,B { φ + } ( ψ = • h φ • p ( A { φ } ) , v A { φ } i = ) = λ A { φ } ,B { φ + } ( ψ { φ + } ) = showing that λ A,B ( ψ ) { φ } and λ A { φ } ,B { φ + } ( ψ { φ + } ) are the same ep-strategy. A PP -S UBST . Moreover, it is easy to see that:
App
A,B ( ϕ, α ) { φ } = ( λ − A,B ( ϕ ) • h der Γ , α i ) • φ = λ − A,B ( ϕ ) • ( h der Γ , α i • φ )= λ − A,B ( ϕ ) • h φ, α • φ i = λ − A { φ } ,B { φ + } ( ϕ • φ ) • α • φ = App A { φ } ,B { φ + } ( ϕ { φ } , α { φ } ) as well as: App
A,B ( ϕ, α ) { φ } = = ( λ − A,B ( ϕ ) = • h der Γ , α i = ) • φ = = λ − A,B ( ϕ ) = • ( h der =Γ , α = i • φ = )= λ − A,B ( ϕ ) = • h φ = , α { φ } = i = λ − A { φ } ,B { φ + } ( ϕ • φ ) = • α { φ } = = App A { φ } ,B { φ + } ( ϕ { φ } , α { φ } ) = where τ { φ } df . = h der ∆ , τ { φ }i : b Σ(∆ , A { φ } ) . Thus, we have shown that App
A,B ( ϕ, α ) { φ } and App A { φ } ,B { φ + } ( ϕ { φ } , α { φ } ) are the same ep-strategy. λ -U NIQUE . Finally, if µ : b Π( b Σ(Γ , A ) , Π( A, B ) { p ( A ) } ) in PGE , then we clearly have: λ ( App ( µ, v A )) = λ ( λ − ( µ ) • h der b Σ(Γ ,A ) , v A i ) = λ ( λ − ( µ )) = µλ ( App ( µ, v A )) = = λ ( λ − ( µ ) = • h der = b Σ(Γ ,A ) , v = A i ) = λ ( λ − ( µ = )) = µ = showing that λ ( App ( µ, v A )) and µ are the same ep-strategy. (cid:4) Next, we consider Σ -types. Again, we begin with the general, categorical definition: ◮ Definition 3.2.3 (CwFs with Σ -types [Hof97]) . A CwF C supports Σ -types if: ◮ Σ -Form. For any Γ ∈ C , A ∈ Ty (Γ) , B ∈ Ty (Γ .A ) , there is a type Σ( A, B ) ∈ Ty (Γ) . ◮ Σ -Intro. There is a morphism in C Pair
A,B : Γ .A.B → Γ . Σ( A, B ) . Σ -Elim. For any P ∈ Ty (Γ . Σ( A, B )) , ψ ∈ Tm (Γ .A.B, P { Pair
A,B } ) , there is a term R Σ A,B,P ( ψ ) ∈ Tm (Γ . Σ( A, B ) , P ) . ◮ Σ -Comp. R Σ A,B,P ( ψ ) { Pair
A,B } = ψ for all ψ ∈ Tm (Γ .A.B, P { Pair
A,B } ) . ◮ Σ -Subst. For any ∆ ∈ C , φ : ∆ → Γ in C , we have: Σ( A, B ) { φ } = Σ( A { φ } , B { φ + } ) where φ + df . = h φ ◦ p ( A { φ } ) , v A { φ } i A : ∆ .A { φ } → Γ .A . ◮ Pair-Subst.
Under the same assumption, we have: p (Σ( A, B )) ◦ Pair
A,B = p ( A ) ◦ p ( B ) φ ∗ ◦ Pair A { φ } ,B { φ + } = Pair
A,B ◦ φ ++ where φ ∗ df . = h φ ◦ p (Σ( A, B ) { φ } ) , v Σ( A,B ) { φ } i Σ( A,B ) : ∆ . Σ( A, B ) { φ } → Γ . Σ( A, B ) and φ ++ df . = h φ + ◦ p ( B { φ + } ) , v B { φ + } i B : ∆ .A { φ } .B { φ + } → Γ .A.B . ◮ R Σ -Subst. Finally, under the same assumption, we have: R Σ A,B,P ( ψ ) { φ ∗ } = R Σ A { φ } ,B { φ + } ,P { φ ∗ } ( ψ { φ ++ } ) . Moreover, C supports Σ -types in the strict sense if it additionally satisfies: ◮ R Σ -Uniq. If any ψ ∈ Tm (Γ .A.B, P { Pair
A,B } ) , ϕ ∈ Tm (Γ . Σ( A, B ) , P ) satisfy the equa-tion ϕ { Pair
A,B } = ψ , then ϕ = R Σ A,B,P ( ψ ) .We now present our interpretation of Σ -types: ◮ Theorem 3.2.4 (Game-semantic Σ -types) . The CwF
PGE supports Σ -types.Proof. Let Γ ∈ PGE , and A : Γ → PGE , B : b Σ(Γ , A ) → PGE be DGwEs. Σ -F ORM . Similarly to the case of Π -types, we define the DGwG Σ( A, B ) : Γ → PGE by: Σ( A, B )( γ ) df . = b Σ( A ( γ ) , B γ )Σ( A, B )( ρ ) df . = ρ Σ( A,B ) : b Σ( A ( γ ) , B γ ) → b Σ( A ( γ ′ ) , B γ ′ ) for all γ, γ ′ : Γ , ρ : γ = Γ γ ′ , where ρ Σ( A,B ) is the ep-strategy defined by: ρ Σ( A,B ) df . = & h σ,τ i : b Σ( A ( γ ) ,B γ ) h σ, τ i ⇆ h A ( ρ ) • σ, B ρ • τ i ρ =Σ( A,B ) df . = & h σ ,τ i , h σ ,τ i : b Σ( A ( γ ) ,B γ ) , h ̺,ϑ i : h σ ,τ i = b Σ( A ( γ ) ,Bγ ) h σ ,τ i h ̺, ϑ i ⇆ h A ( ρ ) = • ̺, B = ρ • ϑ i . It is straightforward to show the functoriality of ρ Σ( A,B ) : Let h σ , τ i , h σ , τ i , h σ , τ i : b Σ( A ( γ ) , B γ ) , h ̺ , ϑ i : h σ , τ i = b Σ( A ( γ ) ,B γ ) h σ , τ i , h ̺ , ϑ i : h σ , τ i = b Σ( A ( γ ) ,B γ ) h σ , τ i .34. As A ( ρ ) = • ̺ : A ( ρ ) • σ = A ( γ ′ ) A ( ρ ) • σ and B = ρ • ϑ : B γ ′ { A ( ρ ) } ( ̺ ) • B ρ • τ = B γ ′ ( σ ) B ρ • τ ,we have h A ( ρ ) = • ̺ , B = ρ • ϑ i : h A ( ρ ) • σ , B ρ • τ i = b Σ( A ( γ ′ ) ,B γ ′ ) h A ( ρ ) • σ , B ρ • τ i , i.e., ρ =Σ( A,B ) • h ̺ , ϑ i : ρ Σ( A,B ) • h σ , τ i = b Σ( A ( γ ′ ) ,B γ ′ ) ρ Σ( A,B ) • h σ , τ i . Thus, ρ Σ( A,B ) respects domain and codomain.2. ρ Σ( A,B ) respects composition: ρ =Σ( A,B ) • ( h ̺ , ϑ i • h ̺ , ϑ i ) = ρ =Σ( A,B ) • h ̺ • ̺ , ϑ ⊙ ϑ i = h A ( ρ ) = • ( ̺ • ̺ ) , B = ρ • ( ϑ ⊙ ϑ ) i = h ( A ( ρ ) = • ̺ ) • ( A ( ρ ) = • ̺ ) , ( B = ρ • ϑ ) ⊙ ( B = ρ • ϑ ) i = h A ( ρ ) = • ̺ , B = ρ • ϑ i • h A ( ρ ) = • ̺ , B = ρ • ϑ i = ( ρ =Σ( A,B ) • h ̺ , ϑ i ) • ( ρ =Σ( A,B ) • h ̺ , ϑ i ) . ρ Σ( A,B ) respects identities: ρ =Σ( A,B ) • id h σ ,τ i = ρ =Σ( A,B ) • h id σ , id τ i = h A ( ρ ) = • id σ , B = ρ • id τ i = h id A ( ρ ) • σ , id B ρ • τ i = id h A ( ρ ) • σ ,B ρ • τ i = id ρ Σ( A,B ) •h σ ,τ i . Note that ρ Σ( A,B ) , ρ =Σ( A,B ) are both total, innocent, wb and noetherian by the same argument asthe case of ρ Π( A,B ) , ρ =Π( A,B ) . Therefore we have shown that ρ Σ( A,B ) is a well-defined morphism b Σ( A ( γ ) , B γ ) → b Σ( A ( γ ′ ) , B γ ′ ) in PGE .Now, we show the functoriality of Σ( A, B ) . Let γ, γ ′ , γ ′′ : Γ , ρ : γ = Γ γ ′ , ρ ′ : γ ′ = Γ γ ′′ .We have already seen that Σ( A, B ) respects domain and codomain. It remains to verify that Σ( A, B ) respects composition and identities. For all h σ , τ i , h σ , τ i : b Σ( A ( γ ) , B γ ) , h ̺, ϑ i : h σ , τ i = b Σ( A ( γ ) ,B γ ) h σ , τ i , we have: ( ρ ′ • ρ ) =Σ( A,B ) • h ̺, ϑ i = h A ( ρ ′ • ρ ) = • ̺, B = ρ ′ • ρ • ϑ i = h A ( ρ ′ ) = • A ( ρ ) = • ̺, B = ρ ′ • B = ρ • ϑ i = ρ ′ Σ( A,B ) • h A ( ρ ) = • ̺, B = ρ • ϑ i = ρ ′ =Σ( A,B ) • ( ρ =Σ( A,B ) • h ̺, ϑ i ) as well as: ( id γ ) =Σ( A,B ) • h ̺, ϑ i = h A ( id γ ) = • ̺, B = id γ • ϑ i = h id = A ( γ ) • ̺, id = B γ • ϑ i = h id = A ( γ ) • ̺, id = Bγ • ϑ i = h ̺, ϑ i . Thus, we have shown that Σ( A, B ) is a well-defined DGwE over Γ .35 -I NTRO . As shown in [Yam16], there is the obvious correspondence: ob ( b Σ( b Σ(Γ , A ) , B )) ∼ = ob ( b Σ(Γ , Σ( A, B )))
We may extend this correspondence to morphisms as well in the obvious way. Accordingly, wemay define the ep-strategy
Pair
A,B : b Σ( b Σ(Γ , A ) , B ) → b Σ(Γ , Σ( A, B )) to be the identity morphism in the category PGE up to tags for disjoint union. Σ -E LIM . Given P ∈ Ty ( b Σ(Γ , Σ( A, B ))) , ψ : b Π( b Σ( b Σ(Γ , A ) , B ) , P { Pair
A,B } ) , we define: R Σ A,B,P ( ψ ) df . = ψ { Pair − A,B } : b Π( b Σ(Γ , Σ( A, B )) , P ) . Σ -C OMP . We then have: R Σ A,B,P ( ψ ) { Pair
A,B } = ψ { Pair − A,B }{ Pair
A,B } = ψ { Pair − A,B • Pair
A,B } = ψ { id b Σ( b Σ(Γ ,A ) ,B ) } = ψ. Σ -S UBST . Completely analogous to the case of Π -types. P AIR -S UBST . As shown in [Yam16], we clearly have p (Σ( A, B )) • Pair
A,B = p ( A ) • p ( B ) , and: φ ∗ • Pair A { φ } ,B { φ + } = h φ • p (Σ( A, B ) { φ } ) , v Σ( A,B ) { φ } i • Pair A { φ } ,B { φ + } = h φ • p (Σ( A { φ } , B { φ + } )) • Pair A { φ } ,B { φ + } , v Σ( A,B ) { φ } • Pair A { φ } ,B { φ + } i = h φ • p ( A { φ } ) • p ( B { φ + } ) , v Σ( A { φ } ,B { φ + } ) • Pair A { φ } ,B { φ + } i = Pair
A,B • hh φ • p ( A { φ } ) , v A { φ } i • p ( B { φ + } ) , v B { φ + } i = Pair
A,B • h φ + • p ( B { φ + } ) , v B { φ + } i = Pair
A,B • φ ++ where φ ∗ df . = h φ • p (Σ( A, B ) { φ } ) , v Σ( A,B ) { φ } i , φ ++ df . = h φ + • p ( B { φ + } ) , v B { φ + } i .It is completely analogous to establish the equations on equality-preservations: ( p (Σ( A, B )) • Pair
A,B ) = = ( p ( A ) • p ( B )) = ( φ ∗ • Pair A { φ } ,B { φ + } ) = = ( Pair
A,B • φ ++ ) = . R Σ -S UBST . Clearly, we have: R Σ A,B,P ( ψ ) { φ ∗ } = ψ • Pair − A,B • h φ • p (Σ( A, B ) { φ } , v Σ( A,B ) { φ } i = ( ψ • h φ + • p ( B { φ + } ) , v B { φ + } i ) • Pair − A { φ } ,B { φ + } = R Σ A { φ } ,B { φ + } ,P { φ ∗ } ( ψ • h φ + • p ( B { φ + } ) , v B { φ + } i )= R Σ A { φ } ,B { φ + } ,P { φ ∗ } ( ψ { φ ++ } ) . And again, it is similar to show the equality of equality-preservations: R Σ A,B,P ( ψ ) { φ ∗ } = = R Σ A { φ } ,B { φ + } ,P { φ ∗ } ( ψ { φ ++ } ) = . Σ -U NIQ . If ψ ∈ Tm (Γ .A.B, P { Pair
A,B } ) and ϕ ∈ Tm (Γ . Σ( A, B ) , P ) satisfy ϕ { Pair
A,B } = ψ , i.e., ϕ • Pair
A,B = ψ and ϕ = • Pair = A,B = ψ = , then ϕ = ψ • Pair − A,B = R Σ A,B,P ( ψ ) ϕ = = ψ = • ( Pair = A,B ) − = R Σ A,B,P ( ψ ) = . (cid:4) Next, we consider identity types. Again, we first review the general, categorical interpretation. ◮ Definition 3.2.5 (CwFs with identity types [Hof97]) . A CwF C supports identity types if: ◮ Id-Form.
For any Γ ∈ C , A ∈ Ty (Γ) , there is a type Id A ∈ Ty (Γ .A.A + ) where A + df . = A { p ( A ) } ∈ Ty (Γ .A ) . ◮ Id-Intro.
There is a morphism in C Refl A : Γ .A → Γ .A.A + . Id A . ◮ Id-Elim.
For each B ∈ Ty (Γ .A.A + . Id A ) , τ ∈ Tm (Γ .A, B { Refl A } ) , there is a term R Id A,B ( τ ) ∈ Tm (Γ .A.A + . Id A , B ) . ◮ Id-Comp. R Id A,B ( τ ) { Refl A } = τ for all τ ∈ Tm (Γ .A, B { Refl A } ) . ◮ Id-Subst.
For any ∆ ∈ C , φ : ∆ → Γ in C , we have: Id A { φ ++ } = Id A { φ } ∈ Ty (∆ .A { φ } .A { φ } + ) where A { φ } + df . = A { φ }{ p ( A { φ } ) } ∈ Ty (∆ .A { φ } ) , φ + df . = h φ ◦ p ( A { φ } ) , v A { φ } i A : ∆ .A { φ } → Γ .A , and φ ++ df . = h φ + ◦ p ( A + { φ + } ) , v A + { φ + } i A + : ∆ .A { φ } .A + { φ + } → Γ .A.A + . ◮ Refl-Subst.
Under the same assumption, the following equation holds
Refl A ◦ φ + = φ +++ ◦ Refl A { φ } : ∆ .A { φ } → Γ .A.A + . Id A where φ +++ df . = h φ ++ ◦ p ( Id A { φ ++ } ) , v Id A { φ ++ } i Id A : ∆ .A { φ } .A + { φ + } . Id A { φ } → Γ .A.A + . Id A .Note that Id A { φ ++ } = Id A { φ } , A + { φ + } = A { φ } + . ◮ R Id -Subst. R Id A,B ( τ ) { φ +++ } = R Id A { φ } ,B { φ +++ } ( τ { φ + } ) under the same assumptionNow, let us give our interpretation of Id -types: ◮ Theorem 3.2.6 (Game-semantic Id-types) . The CwF
PGE supports Id -types.Proof. Let Γ ∈ PGE , A : Γ → PGE , A + df . = A { p ( A ) } ∈ Ty ( b Σ(Γ , A )) .37 d -F ORM . We define the DGwE Id A : b Σ( b Σ(Γ , A ) , A + ) → PGE by: Id A (( γ, σ ) , ˜ σ ) df . = b Id A ( γ ) ( σ, ˜ σ ) Id A (( ρ & ̺ )& ˜ ̺ ) df . = & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ ˜ ̺ • ( A ( ρ ) = • α ) • ( ̺ − ) for all γ, γ ′ : Γ , ρ : γ = Γ γ ′ , σ, ˜ σ : A ( γ ) , σ ′ , ˜ σ ′ : A ( γ ′ ) , ̺ : A ( ρ ) • σ = A ( γ ′ ) σ ′ , ˜ ̺ : A ( ρ ) • ˜ σ = A ( γ ′ ) ˜ σ ′ ,where & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ ˜ ̺ • ( A ( ρ ) = • α ) • ( ̺ − ) : b Id A ( γ ) ( σ, ˜ σ ) → b Id A ( γ ′ ) ( σ ′ , ˜ σ ′ ) is an ep-strategyequipped with the trivial equality-preservation. Following the same pattern as before, it is easyto see that & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ ( ρ − ) † ; ( α † ; A ( ρ ) = ) † ; ˜ ̺ is a strategy on b Id A ( γ ) ( σ, ˜ σ ) → b Id A ( γ ′ ) ( σ ′ , ˜ σ ′ ) ;and then it is trivially ep.We now show the functoriality of Id A . Let γ, γ ′ , γ ′′ : Γ , ρ : γ = Γ γ ′ , ρ ′ : γ ′ = Γ γ ′′ , σ, ˜ σ : A ( γ ) , σ ′ , ˜ σ ′ : A ( γ ′ ) , σ ′′ , ˜ σ ′′ : A ( γ ′′ ) , ̺ : A ( ρ ) • σ = A ( γ ′ ) σ ′ , ˜ ̺ : A ( ρ ) • ˜ σ = A ( γ ′ ) ˜ σ ′ , ̺ ′ : A ( ρ ′ ) • σ ′ = A ( γ ′′ ) σ ′′ , ˜ ̺ ′ : A ( ρ ′ ) • ˜ σ ′ = A ( γ ′′ ) ˜ σ ′′ . First, Id A clearly respects domain and codomain. It is also easy to seethat Id A respects composition: Id A ((( ρ ′ & ̺ ′ )& ˜ ̺ ′ ) • (( ρ & ̺ )& ˜ ̺ ))= Id A ((( ρ ′ • ρ )&( ̺ ′ ⊙ ̺ ))&(˜ ̺ ′ ⊙ ˜ ̺ ))= & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ (˜ ̺ ′ ⊙ ˜ ̺ ) • ( A ( ρ ′ • ρ ) = • α ) • ( ̺ ′ ⊙ ̺ ) − = & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ ˜ ̺ ′ • ( A ( ρ ′ ) = • ˜ ̺ ) • ( A ( ρ ′ ) = • A ( ρ ) = • α ) • ( ̺ ′ • ( A ( ρ ′ ) = • ̺ )) − = & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ ˜ ̺ ′ • ( A ( ρ ′ ) = • (˜ ̺ • ( A ( ρ ) = • α ))) • ( A ( ρ ′ ) = • ̺ − ) • ̺ ′− = & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ ˜ ̺ ′ • ( A ( ρ ′ ) = • (˜ ̺ • ( A ( ρ ) = • α ) • ̺ − )) • ̺ ′− = & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ Id A (( ρ ′ & ̺ ′ )& ˜ ̺ ′ ) • ( Id A (( ρ & ̺ )& ˜ ̺ ) • α ))=(& α ′ : b Id A ( γ ′ ) ( σ ′ , ˜ σ ′ ) α ′ ⇆ ˜ ̺ ′ • ( A ( ρ ′ ) = • α ′ ) • ( ̺ ′− )) • (& α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ ˜ ̺ • ( A ( ρ ) = • α ) • ( ̺ − ))= Id A (( ρ ′ & ̺ ′ )& ˜ ̺ ′ ) • Id A (( ρ & ̺ )& ˜ ̺ ) where note that the case for equality-preservation is trivial. Similarly, Id A respects identities: Id A ( id hh γ,σ i , ˜ σ i ) = Id A (( id γ & id σ )& id ˜ σ )= & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ id ˜ σ • ( A ( id γ ) = • α ) • id − σ = & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ id = A ( γ ) • α = & α : b Id A ( γ ) ( σ, ˜ σ ) α ⇆ α = id b Id A ( γ ) ( σ, ˜ σ ) = id Id A (( γ,σ ) , ˜ σ ) . Id -I NTRO . The ep-strategy
Refl A : b Σ(Γ , A ) → b Σ( b Σ( b Σ(Γ , A ) , A + ) , Id A ) is defined by: Refl A df . = & h γ,σ i : b Σ(Γ ,A ) h γ, σ i ⇆ hhh γ, σ i , σ i , σ i Refl = A df . = & h γ,σ i , h γ ′ ,σ ′ i : b Σ(Γ ,A ) ,ρ & ̺ : h γ,σ i = b Σ(Γ ,A ) h γ ′ ,σ ′ i ρ & ̺ ⇆ (( ρ & ̺ )& ̺ )& ̺. We omit the verification of the functoriality of
Refl A as it is just straightforward. Note that Refl A has its inverse Refl − A , which is just the identity up to tags for disjoint union.38 d -E LIM . Given ψ : b Π( b Σ(Γ , A ) , B { Refl A } ) , we define: R Id A,B ( ψ ) df . = ψ { Refl − A } : b Π( b Σ( b Σ( b Σ(Γ , A ) , A ) , Id A ) , B ) . Id -C OMP . Then we have: R Id A,B ( ψ ) { Refl A } = ψ { Refl − A }{ Refl A } = ψ { Refl − A • Refl A } = ψ { id b Σ(Γ ,A ) } = ψ. Id -S UBST . For any game ∆ ∈ WPG and strategy φ : ∆ → Γ in WPG , we have: Id A { φ ++ } = { b Id A ( σ, σ ′ ) |hh γ, σ i , σ ′ i : b Σ( b Σ(Γ , A ) , A + ) }{ φ ++ } = { Id A { φ } ( φ ++ • hh δ, τ i , τ ′ i ) |hh δ, τ i , τ ′ i : b Σ( b Σ(∆ , A { φ } ) , A { φ } + ) } = { Id A { φ } ( h φ • δ, τ i , τ ′ i ) |hh δ, τ i , τ ′ i : b Σ( b Σ(∆ , A { φ } ) , A { φ } + ) } = { b Id A { φ } ( τ, τ ′ ) |hh δ, τ i , τ ′ i : b Σ( b Σ(∆ , A { φ } ) , A { φ } + ) } = Id A { φ } where φ + df . = h φ • p ( A { φ } ) , v A { φ } i : b Σ(∆ , A { φ } ) → b Σ(Γ , A ) , φ ++ df . = h φ + • p ( A + { φ + } ) , v A + { φ + } i : b Σ( b Σ(∆ , A { φ } ) , A + { φ + } ) → b Σ( b Σ(Γ , A ) , A + ) . Note that φ ++ • hh δ, τ i , τ ′ i = h φ + • p ( A + { φ + } ) , v A + { φ + } i • hh δ, τ i , τ ′ i = h φ + • p ( A + { φ + } ) • hh δ, τ i , τ ′ i , v A + { φ + } • hh δ, τ i , τ ′ ii = hh φ • δ, τ i , τ ′ i . R EFL -S UBST . Also, the following equation holds:
Refl A • φ + = Refl A • h φ • p ( A { φ } ) , v A { φ } i = hhh φ • p ( A { φ } ) , v A { φ } i • p ( A + { φ + } ) • p ( Id A { φ ++ } ) , v A + { φ + } • p ( Id A { φ ++ } ) i , v Id A { φ ++ } i • Refl A { φ } = hh φ + • p ( A + { φ + } ) , v A + { φ + } i • p ( Id A { φ ++ } ) , v Id A { φ ++ } i • Refl A { φ } = h φ ++ • p ( Id A { φ ++ } ) , v Id A { φ ++ } i • Refl A { φ } = φ +++ • Refl A { φ } where φ +++ df . = h φ ++ • p ( Id A { φ ++ } ) , v Id A { φ ++ } i .39 Id -C OMP . Finally, we have: R Id A,B ( τ ) { φ +++ } = ( τ • Refl − A ) • hhh φ • p ( A { φ } ) , v A { φ } i • p ( A + { φ + } ) , v A + { φ + } i • p ( Id A { φ ++ } ) , v Id A { φ ++ } i = τ • h φ • p ( A { φ } ) , v A { φ } i • Refl − A { φ } = R Id A { φ } ,B { φ +++ } ( τ • h φ • p ( A { φ } ) , v A { φ } i )= R Id A { φ } ,B { φ +++ } ( τ • φ + )= R Id A { φ } ,B { φ +++ } ( τ { φ + } ) . (cid:4) Our interpretation of Id -types accommodates non-identity morphisms in the same manneras the groupoid model [HS98], and so it refutes UIP essentially by the same argument as follows.Recall that UIP states: For any type A , the following type can be inhabited Π a , a : A Π p , q : a = a p = q . Consider the GwE B whose positions are prefixes of the sequences q tt . tt , q ff . ff with all isomor-phism strategies between strategies on B as morphisms. Let us write • : B for the unique totalstrategy. Explicitly, the morphisms are the dereliction der • and the “reversing” strategy rv • . Wethen have der • = • = B • rv • because morphisms in • = B • are only the trivial ones.Since the “atomic games” such as the natural number game N can be seen as discrete wf-GwEs, we may inherit the results in [Yam16] so that PGE supports N - - and -types as well asuniverses. By the soundness of CwFs, we have established: ◮ Corollary 3.2.7.
There is a (sound) model of
MLTT with Π - Σ - Id - N - - and -types as well asuniverses in the CwF PGE of wf-GwEs and ep-strategies.
In the light of UA, however, universe games U should not be discrete. Note that as PGE hasno higher morphisms, its interpretation of UA is: For any
A, B ∈ PGE , there is an isomorphism ua : ( A ∼ = B ) ∼ ⇒ ( A = U B ) . As Theorem 2.3.1 indicates, we may fix an isomorphism φ : A ∼ ⇒ B and represent any φ : A ∼ ⇒ B by φ = β • φ • α − , where α : A ∼ ⇒ A , β : B ∼ ⇒ B . This suggestsa solution to refine the notion of a GwE by equipping it with an order on its maximal positionsof the same length , writing A ≡ A ′ if A, A ′ ∈ PGE are the same up to the order, and define st ( A = U B ) df . = S A ′ ≡ A,B ′ ≡ B st ( A ′ ∼ ⇒ B ′ ) if A ∼ = B and st ( A = U B ) df . = ∅ otherwise, where thename N ( A ) of each A ∈ PGE incorporates the order on positions in A .Nevertheless, from a computational viewpoint, even this equality in U challenges UA. Thedirection ua − : ( A = U B ) ∼ ⇒ ( A ∼ = B ) is no problem as ua − may learn the given α : A ∼ ⇒ A , β : B ∼ ⇒ B from the domain and construct β • φ • α − : A ∼ ⇒ B . In contrast, ua : ( A ∼ = B ) ∼ ⇒ ( A = U B ) would be intractable as it needs to determine the given A ′ ∼ = A , B ′ ∼ = B by a finite interaction with them. In any case, since UA implies FunExt [Uni13] and our model refutesFunExt, it must refute UA as well. ◮ Corollary 3.2.8 (Intensionality) . The model in
PGE refutes UIP, FunExt and UA. But the argument below holds even if
PGE has higher morphisms. Conclusion and Future Work
We have presented the first game semantics for
MLTT that refutes UIP. Its algebraic structure isvery similar to the groupoid model [HS98], but in contrast it is intensional, refuting FunExt andUA. Hence, in some sense, we have given a negative answer to the computational nature of UA.This view stands in a sharp contrast to the cubical set model [BCH14, CCHM16] that interpretspropositional equalities as paths and validates UA.For future work, we plan to generalize the notion of GwEs to ω -groupoids in order to in-terpret higher equalities in a non-trivial manner. Moreover, it would be interesting to see con-nections between our game model and the cubical set model, which may shed a new light onrelations between computation and topology. Acknowledgements
The author was supported by Funai Overseas Scholarship. Also, he is grateful to SamsonAbramsky for fruitful discussions.
References [A +
97] Samson Abramsky et al. Semantics of Interaction: An Introduction to Game Seman-tics.
Semantics and Logics of Computation, Publications of the Newton Institute , pages1–31, 1997.[AJ05] Samson Abramsky and Radha Jagadeesan. A Game Semantics for Generic Poly-morphism.
Annals of Pure and Applied Logic , 133(1):3–37, 2005.[AJM00] Samson Abramsky, Radha Jagadeesan, and Pasquale Malacaria. Full Abstractionfor PCF.
Information and Computation , 163(2):409–470, 2000.[AJV15] Samson Abramsky, Radha Jagadeesan, and Matthijs V´ak´ar. Games for DependentTypes. In
Automata, Languages, and Programming , pages 31–43. Springer, 2015.[AM99] Samson Abramsky and Guy McCusker. Game Semantics. In
Computational logic ,pages 1–55. Springer, 1999.[BCH14] Marc Bezem, Thierry Coquand, and Simon Huber. A Model of Type Theory inCubical Sets. In , volume 26, pages 107–128, 2014.[CCHM16] Cyril Cohen, Thierry Coquand, Simon Huber, and Anders M ¨ortberg. Cubicaltype theory: a constructive interpretation of the univalence axiom. arXiv preprintarXiv:1611.02108 , 2016.[CH10] Pierre Clairambault and Russ Harmer. Totality in Arena Games.
Annals of pure andapplied logic , 161(5):673–689, 2010.[Cur34] Haskell B Curry. Functionality in Combinatory Logic.
Proceedings of the NationalAcademy of Sciences , 20(11):584–590, 1934.[Dyb96] Peter Dybjer. Internal Type Theory. In
Types for Proofs and Programs , pages 120–134.Springer, 1996. 41HO00] J Martin E Hyland and C-HL Ong. On Full Abstraction for PCF: I, II, and III.
Infor-mation and computation , 163(2):285–408, 2000.[Hof97] Martin Hofmann. Syntax and Semantics of Dependent Types. In
Extensional Con-structs in Intensional Type Theory , pages 13–54. Springer, 1997.[How80] William A Howard. The Formulae-as-types Notion of Construction.
To HB Curry:essays on combinatory logic, lambda calculus and formalism , 44:479–490, 1980.[HS98] Martin Hofmann and Thomas Streicher. The Groupoid Interpretation of Type The-ory.
Twenty-five years of constructive type theory (Venice, 1995) , 36:83–111, 1998.[Hyl97] Martin Hyland. Game Semantics.
Semantics and logics of computation , 14:131, 1997.[McC98] Guy McCusker.
Games and Full Abstraction for a Functional Metalanguage with Recur-sive Types . Springer Science & Business Media, 1998.[ML82] Per Martin-L ¨of. Constructive Mathematics and Computer Programming.
Studies inLogic and the Foundations of Mathematics , 104:153–175, 1982.[ML84] Per Martin-L ¨of.
Intuitionistic Type Theory: Notes by Giovanni Sambin of a series oflectures given in Padova, June 1980 . 1984.[ML98] Per Martin-L ¨of. An Intuitionistic Theory of Types.
Twenty-five years of constructivetype theory , 36:127–172, 1998.[Ros67] J Barkley Rosser. Curry Haskell B. and Feys Robert. combinatory Logic. volumei. with Two Sections by William Craig. Studies in Logic and the Foundations ofMathematics. north-holland publishing company, amsterdam 1958, xvi+ 417 pp.
The Journal of Symbolic Logic , 32(02):267–268, 1967.[TvD88] Anne Sjerp Troelstra and Dirk van Dalen. Constructivism in mathematics. two vol-umes.
NorthHolland, Amsterdam , 1988.[Uni13] The Univalent Foundations Program.
Homotopy Type Theory: Univalent Foundationsof Mathematics . https://homotopytypetheory.org/book , Institute for AdvancedStudy, 2013.[Yam16] Norihiro Yamada. Game Semantics for Martin-L ¨of Type Theory. arXiv preprintarXiv:1610.01669arXiv preprintarXiv:1610.01669