Homotopy-initial W-types Nicola Gambino University of Palermo Joint work with Steve Awodey and Kristina Sojakova Manchester, Logic Colloquium 2012
Homotopy type theory Main fact: ◮ There is a new class of models for Martin-L¨ of’s type theories, in which types are interpreted as spaces. Main consequence: ◮ We have a new geometric intuition to work in type theory, which provides inspiration for new type-theoretic notions, theorems and axioms.
Aim of the talk Type theory Homotopy theory A : type A space a : A a ∈ A x : A ⊢ B ( x ) : type B → A fibration A [0 , 1] → A × A x : A, y : A ⊢ Id A ( x, y ) . . . . . . Inductive types ?
Overview Part I. Strictly initial W-types ◮ The type theories H and H ext ◮ W-types ◮ Characterisation of W-types over H ext Part II. Homotopy-initial W-types ◮ Contractibility ◮ Characterisation of weak W-types over H
Part I Strictly initial W-types
Type theories Forms of judgements Γ ⊢ A : type Γ ⊢ a : A Γ ⊢ A = B : type Γ ⊢ a = b : A Note ◮ Dependent types, e.g. n : Nat ⊢ List n ( A ) : type ◮ Definitional vs. propositional equality.
The type theory H ◮ Standard deduction rules for Id A ( a, b ) , (Σ x : A ) B ( x ) , (Π x : A ) B ( x ) , with which we can define A × B , A → B . ◮ The function extensionality principle, i.e. the type (Π x : A ) Id B ( x ) ( f ( x ) , g ( x )) → Id (Π x : A ) B ( x ) ( f, g ) is inhabited. Note ◮ The univalence axiom implies function extensionality ◮ H has models in Gpd , SSet and Set
The type theory H ext p : Id A ( a, b ) H ext = H + a = b : A Note - H ext has models in locally cartesian closed categories - Type-checking becomes undecidable
W-types Formation rule x : A ⊢ B ( x ) : type ( Wx : A ) B ( x ) : type Introduction rule a : A t : B ( a ) → W sup ( a, t ) : W where W = def ( Wx : A ) B ( x )
Elimination rule w : W ⊢ E ( w ) : type x : A , u : B ( x ) → W, v : (Π y : B ( x )) E ( u ( y )) ⊢ e ( x, u, v ) : E ( sup ( x, u )) w : W ⊢ rec ( w, e ) : E ( w ) Computation rule w : W ⊢ E ( w ) : type x : A , u : B ( x ) → W , v : (Π y : B ( x )) E ( u ( y )) ⊢ e ( x, u, v ) : E ( sup ( x, u )) x : A, u : B ( x ) → W ⊢ rec ( sup ( x, u ) , e ) = e ( x, u, . . . ) : E ( sup ( x, u ))
� � Polynomial functors and their algebras in H ext For x : A ⊢ B ( x ) : type let P : Types − → Types X (Σ x : A )( B ( x ) → X ) �− → Definition. ◮ P -algebra: � � X , s X : P ( X ) → X ◮ P -algebra morphism: P ( f ) � P ( Y ) P ( X ) s X s Y � Y X f
Characterisation over H ext Theorem (Dybjer, Moerdijk & Palmgren) . Over H ext the following are equivalent: 1. Every polynomial functor has an initial algebra 2. The deduction rules for W-types Note ◮ Induction vs. recursion ◮ Strict initiality
Part II Homotopy-initial W-types
� � � Problem Within H the deduction rules for W-types imply: ◮ Existence of P ( f ) P ( W ) P ( X ) s f s W s X � X W f � � where s f : Id f · s W , s X · P ( f ) ◮ But also propositional uniqueness of f (an η -rule), ◮ But also propositional uniqueness of the above proof . . . ◮ . . . How can we capture all this?
Contractibility Definition (Voevodsky) . A type X is contractible if iscontr( X ) = def (Σ x : X )(Π y : X ) Id X ( x, y ) is inhabited. Idea ◮ Existence and uniqueness Note ◮ X contractible ⇔ X ≃ 1 ◮ X contractible ⇒ Id X ( x, y ) contractible for all x, y : X
� � � P -algebras and weak P -algebra maps in H Given x : A ⊢ B ( x ) : type , let P ( X ) = def (Σ x : A )( B ( x ) → X ) Definition. ◮ P -algebra: ( X, s X : P ( X ) → X ) ◮ Weak P -algebra morphism: P ( f ) P ( X ) P ( Y ) s X s f s Y � Y X f where � � s f : Id f · s X , s Y · P ( f )
Homotopy-initial algebras Given P -algebras ( X, s X ) and ( Y, s Y ), we can define the type � � P -alg ( X, s X ) , ( Y, s Y ) of weak P -algebra morphisms between them. Definition. A P -algebra ( X, s X ) is homotopy-initial if for every P -algebra ( Y, s Y ) the type � � P -alg ( X, s X ) , ( Y, s Y ) is contractible.
Characterisation over H Theorem. Over H , the following are equivalent: 1. Every polynomial functor has a homotopy-initial algebra 2. The formation, introduction, elimination and propositional computation rules for W-types. Propositional computation rule . . . � � . . . ⊢ comp ( x, u, e ) : Id rec ( sup ( x, u ) , e ) , e ( x, u, . . . )
Remarks ◮ These are homotopy-invariant W-types ◮ Homotopy-initiality implies existence and uniqueness of weak P -algebra maps up to higher and higher identity proofs, since � P -alg ( X, s X ) , ( Y, s Y )] contractible ⇒ Id (( f, s f ) , ( g, s g )) contractible ⇒ Id (( α, s α ) , ( β, s β )) contractible . . . ◮ Similar analysis carries over to other inductive types ◮ In H weak W-types allow us to define weak versions of other inductive types.
� � � � � � � � � � Remarks Key Lemma. Equivalence between: ◮ Identity proofs between weak algebra maps ( f, s f ), ( g, s g ) ◮ Algebra 2-cells from ( f, s f ) to ( g, s g ), i.e. pairs ( α, s α ) where α : Id ( f, g ) and Pg Pg PX PY PX PY Pα s g s α ≃ s X s Y s X Pf s X g s f X α Y X Y f f
References Paper ◮ S. Awodey, N. Gambino, K. Sojakova Inductive Types in Homotopy Type Theory LICS 2012 Proofs ◮ Coq code on Github
Recommend
More recommend