(Ie a Natural Model) Closed Under a Particular Connec
Total Page:16
File Type:pdf, Size:1020Kb
CONNECTIVES IN SEMANTICS OF TYPE THEORY JONATHAN STERLING Abstract. Some expository notes on the semantics of inductive types in Awodey’s nat- ural models [Awo18]. Many of the ideas explained are drawn from the work of Awodey [Awo18], Streicher [Str14], Gratzer, Kavvos, Nuyts, and Birkedal [Gra+20], and Sterling, Angiuli, and Gratzer [SAG20]. When is a model of type theory (i.e. a natural model) closed under a particular connec- tive? And what is a general notion of connective? Leing C be a small category with a terminal object and E = Pr¹Cº be its logos1 of presheaves, a natural model is a representable natural transformation TÛ τ T : E [Awo18]. j Connectives that commute with the Yoneda embedding C E (such as dependent product and sum) may be specied in a particularly simple way. ! F ! (1) First, one denes an endofunctor Ecart Ecart taking a family (viewed as a uni- verse) to the generic family for that connective. e intuition for this family is that the upstairs part carries the data of its introduction rule, and the downstairs part carries the data of its formation rule. For instance, one may take F to be the endofunctor that takes a map f to the functorial action of the polynomial endofunctor Pf on f itself. In this case, one has the notion of a dependent product type. (2) en, one requires a cartesian mapF¹τº τ, i.e. a pullback square of the following kind: Û @0¹F¹τºº T F¹τº τ @1¹F¹τºº T In the case of our example, the downstairs map becomes a code for the depen- dent product type, and the upstairs map becomes a constructor for λ-abstraction. e universal property of the pullback implements the elimination form (applica- tion) together with its computation and uniqueness rules. 1. Inductive types in the semantics of type theory e account above, which works for essentially all connectives that can be understood by means of mapping-in universal properties, does not extend to either strict or weak inductive types; it is most common in the literature to account for these by means of in- ternal orthogonality conditions and stable liing structures respectively [Awo18; Gra+20; SAG20]. 1I am following the convention of Anel and Joyal [AJ19] in referring to the formal algebraic dual of a topos as a logos, by analogy with frames and locales. 1 2 JONATHAN STERLING 1.1. Example: the empty coproduct. Let us rst gain some intuitions for why the na¨ıve approach would fail to express the closure of TÛ τ T under strict coproducts; it will suce to consider the empty coproduct. We begin by dening an endofunctor F; on the ! f cartesian arrow category Ecart. We will have F; take a map A B to the universal map g α F;¹f º = ;E 1E; xing C D and a cartesian square f g, we take F;¹αº to the following cartesian square: ;E ;E 1E 1E Na¨ıvely, we might assume that the right thing to do next is ask for a cartesian map α τ F;¹τº τ. But we can see that such a thing cannot exist; because TÛ T is a repre- sentable map, the top-le corner of the following diagram must be representable: @ ¹αº 0 Û ;E T τ j¹1Cº 1E T @1¹αº But the initial object of E = Pr¹Cº cannot be representable: E is the free cocomple- tion. Generally speaking, for this approach to work, we would need the endofunctor F to preserve representable maps, which F; clearly does not. We will show, however, an appropriate way to express the closure of TÛ τ T under a strict empty type using orthog- onality. α (1) First, we demand a code 1E T (the formation rule). (2) en, we consider the following canonical (but not cartesian) square: Û ;E T τ 1 T E α e cartesian gap map of this square is the homomorphism of spans induced by the actual pullback of τ along α [Ane+17]: ;E Û Û T ×T 1E T α ∗τ τ 1 T E α CONNECTIVES IN SEMANTICS OF TYPE THEORY 3 (3) en, we require that the cartesian gap map ;E τ»α¼ shall be internally le orthogonal to TÛ τ T in E. is means, for each Z : E, a unique ller to any square of the following shape: Û Z × ;E T Z × ! 9! τ Û Z × T ×T 1E T Û A We have required a unique element of each type Z × T ×T 1E T; blowing up Z into a colimit of representables j¹Zi º, we obtain exactly the intended notion: a unique element of any type in each inconsistent context. ! F ! 1.2. Strict connectives via orthogonality. We x an endofunctor Ecart Ecart; we will now describe what it takes for TÛ τ T to be closed under the corresponding strict connective. For notational expediency, we will use the language of the codomain bration E! @1 E rather than taking pullbacks in E. (1) First, we demand a commuting square F¹τº α τ : E!, not necessarily cartesian. Here, @1¹αº is the “formation rule” and @0¹αº is the “introduction rule”. What remains is to express the elimination rule (and its computation and uniqueness principles). (2) We form the cartesian gap map for the diagram above: F¹τº α α¯ ∗ y ! @1¹αº τ @1¹αº τ τ E @1¹F¹τºº T E @1¹αº (3) For the elimination rule, we require that the gap map α¯ be internally le orthogonal ∗ @1¹F¹τºº τ in the slice category C/@1¹F¹τºº. (4) A large elimination may additionally be accomodated by requiring the gap map ∗ α¯ be internally le orthogonal to @1¹F¹τºº ¹T 1Eº in C/@1¹F¹τºº. ! F ! Û τ Denition 1.1. Let Ecart Ecart be a functor, and T T a natural model over C, writing E for Pr¹Cº.A strict F-structure for TÛ τ T is a commuting square F¹τº α τ : ! α¯ ∗ E such that the cartesian gap map F¹τº @1¹αº τ is is internally le orthogonal to ∗ @1¹F¹τºº τ in C/@1¹F¹τºº. ¦ ! F⊕ ! Example 1.2 (Strict coproducts). We dene an endofunctor Ecart Ecart capturing the f generic binary coproduct situation for a given family. Given A B, we let @1¹F⊕¹f ºº = ∗ ∗ B × B, to dene the rest of the family F⊕¹f º to be the coproduct π2 f + π1 f in E/B×B . 4 JONATHAN STERLING g Next, we x C D and a cartesian square f α g; we must exhibit a cartesian square F⊕¹αº F⊕¹f º F⊕¹gº: @0¹F⊕¹f ºº @0¹F⊕¹gºº ∗ ∗ ∗ ∗ π2 f + π1 f π2g + π1g B × B C × C h Let B × B D × D be the obvious map @1¹αº × @1¹αº; rephrasing into the language of the codomain bration, we may investigate the cartesian li of this map: ∗ ∗ ∗ ∗ ∗ h ¹π2g + π1gº π2g + π1g B × B D × D h By the universality of colimits, we may commute the pullback h∗ into the coproduct: ∗ ∗ ∗ ∗ ∗ ∗ h π2g + h π1g π2g + π1g B × B D × D h ∗ ∗ ∗ It remains to show that h πi g πi f . Because πi ◦ h = @1¹αº ◦ πi , we may factor the ∗ ∗ cartesian map h πi g g into the following composite of cartesian maps: ∗ ∗ ∗ πi f h πi g f g B × B B D D × D ! F⊕ ! Û τ We have now dened the endofunctor Ecart Ecart; given a natural model T T, a strict F⊕-structure F⊕¹τº τ equips τ with a coproduct connective, suitable introduction rules, and an elimination rule equipped with computation and uniqueness principles. ¦ 1.3. Comparing strict F-structures and cartesian squares. ! F ! α Lemma 1.3. Let Ecart Ecart be a functor, and let F¹τº τ be a cartesian map: then α is also a strict F-structure for TÛ τ T. Proof. Fixing Z : E/@1¹F¹τºº, we must check that squares of the following kind have unique lis: a ∗ Û Z × F¹τº @1¹F¹τºº T ∗ Z × α¯ 9! @1¹F¹τºº τ ∗ ∗ Z × @1¹αº τ @1¹F¹τºº T A CONNECTIVES IN SEMANTICS OF TYPE THEORY 5 Because α is cartesian, the vertical gap map α¯ is an isomorphism. erefore, Z × α¯ is also an isomorphism: a ∗ Û Z × F¹τº @1¹F¹τºº T × β ¹F¹ ºº∗ β Z α¯ a ◦ @1 τ τ ∗ ∗ Z × @1¹αº τ @1¹F¹τºº T A Lemma 1.4 (Caution). It is not necessarily the case that, supposing F¹τº is a representable map and α is a strict F-structure for τ, then α is cartesian. Proof. Suppose this were the case. (1) Let C be a small category, and let TÛ τ T : E be a representable natural transfor- mation, writing E for Pr¹Cº. ! (2) Let F; be the constant endofunctor on Ecart from our earlier example, sending any family to ;E 1E. α τ (3) Suppose that F;¹τº τ is a strict F-structure for TÛ T. ! (4) Dene Fj¹;º to be the constant endofunctor on Pr¹Eºcart sending any family to j¹;Eº j¹1Eº. (5) j¹τº is obviously a representable map in Pr¹Eº and so is Fj¹;º¹j¹τºº. α j¹αº Û τ (6) eF;-structureF;¹τº τ lis to aFj¹;º-structureFj¹;º¹j¹τºº j¹τº for T T, using the fact that the Yoneda embedding is dense and fully faithful.