Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

April 12, 2011

Homotopy Type Theory, V

Posted by Mike Shulman

I think posts I-IV have more or less covered the current state of the art in homotopy type theory. I omitted a few things, like the fact that univalence implies function extensionality (but see below). I also didn’t talk too much about what people have proven inside homotopy type theory so far, like the fact that Ω² is abelian. But overall I think I gave a relatively complete picture (although knowledgable readers should feel free to object!).

What’s next is necessarily more speculative. In a comment to the last post, Urs raised what I think is one of the central questions of current research in homotopy type theory. I would phrase it as what do we still need to add to homotopy type theory to obtain a complete internal language for (,1)(\infty,1)-topoi?

Before we start trying to answer that question, we have to clarify one minor point. Since type theory is elementary in the technical sense (“finitary first-order”), we shouldn’t expect it to distinguish Grothendieck (,1)(\infty,1)-toposes from “elementary” ones. There is not yet an accepted notion of “elementary (,1)(\infty,1)-topos”, but we can try to “elementarify” characterizations of Grothendieck (,1)(\infty,1)-topoi. For instance, by the “\infty-Giraud theorem”, Grothendieck (,1)(\infty,1)-topoi are the locally presentable (∞,1)-categories in which colimits are stable under pullback, coproducts are disjoint, and internal groupoids are effective. The latter two conditions can also be replaced by the existence of classifiers for κ\kappa-compact objects for all sufficiently large κ\kappa.

A different jumping-off point is that since higher topoi naturally point us in a predicative direction, we can try to generalize the axioms people have come up with for “predicative versions of topoi.” For instance, we can try to \infty-ize a Π-W-pretopos: a locally cartesian closed pretopos with W-types. It’s common in predicative mathematics to also assume some universes.

So what, of this, do we have already from homotopy type theory?

  • Intensional type theory with function extensionality corresponds (morally, anyway) to a locally cartesian closed (,1)(\infty,1)-category. Of course this implies that whatever colimits exist are stable under pullback (although as we saw in the comments it can take a bit of work to prove that in the type theory). In the locally presentable case, the converse follows from the adjoint functor theorem: if colimits are stable under pullback, then the category is locally cartesian closed.

  • Adding the univalence axiom, as we discussed last time, corresponds to having object classifiers, which are the (,1)(\infty,1)-categorical version of universes. Note, though, that instead of saying that the object classifiers classify “all κ\kappa-compact objects” as we usually do for Grothendieck (,1)(\infty,1)-topoi (for some external cardinal κ\kappa), we say that the objects they classify are closed under dependent sums and products. This is like having an inaccessible cardinal internal to the (,1)(\infty,1)-category.

    • A digression: Let me give you my three-sentence sketch of Voevodsky’s theorem that univalence (plus the “eta rule”) implies function extensionality. Ordinary dependent type theory, with “beta and eta rules”, gives a locally cartesian closed 1-category: we have (in the non-dependent case) functors XX×AX\mapsto X\times A and XX AX\mapsto X^A with transformations X(X×A) AX\to (X\times A)^A and X A×AXX^A\times A \to X, and the beta and eta rules are the two triangle identities. Function extensionality is about local cartesian closure of the (,1)(\infty,1)-category of types, i.e. an (,1)(\infty,1)-adjunction (×A)() A(-\times A) \dashv (-)^A—but the (,1)(\infty,1)-triangle identities are pointwise, so it suffices to ensure that the functors and natural transformations involved are (,1)(\infty,1)-functors and (,1)(\infty,1)-transformations, i.e. they respect homotopies. However, univalence ensures that all type-theoretic constructions are functorial on equivalences and homotopies between them; and by a path-object argument, that suffices to also make them functorial on homotopies between maps that aren’t equivalences.
  • Of course, W-types are already a type-theoretic notion which has been imported into set theory. In particular, the inductive types of Coq and Agda include W-types. (I think they are strictly more general; can any type-theorist in the audience tell me the 1-categorical structure which corresponds to extensional type theory with the inductive types of Coq/Agda?). Coq and Agda also have coinductive types, which should make David Corfield happy.

  • We concluded in the other thread that inductive types in type theory also include (finite) disjoint coproducts, even in the (,1)(\infty,1)-categorical sense.

So all that’s missing from the properties we considered above for “elementary (,1)(\infty,1)-topoi” is

  • (Some elementary shadow of) local presentability, and

  • Effectiveness of internal groupoids (i.e. “(,1)(\infty,1)-exactness”).

Perhaps the most obvious elementary shadow of local presentability is the existence of finite colimits. We could try to add these axiomatically, but it would be more satisfying to derive them from some more type-theoretic structure, the way inductive types give us coproducts. So let’s come back to that in a bit; for now let’s think about effectiveness of internal groupoids.


An internal groupoid in an (,1)(\infty,1)-category just means the ordinary notion of internal category together with inverses for morphisms, except that everything is “homotopified”. That is, we have an object-of-objects C 0C_0, an object-of-morphisms C 1C_1 with source and target maps C 1C 0C_1 \;\rightrightarrows\; C_0, a unit map C 0C 1C_0 \to C_1 and a composition map C 1× C 0C 1C 1C_1\times_{C_0} C_1 \to C_1, which are unital and associative up to all higher homotopies. There are various ways of making the latter precise, depending somewhat on your model for (,1)(\infty,1)-categories. For instance, Lurie uses internal simplicial objects which satisfy a homotopy version of the condition to be the nerve of a groupoid; see here.

Three examples of internal groupoids that you should keep in mind are:

  1. If XX is a set (a 0-type), and RR is an equivalence relation on XX (in the 1-category of 0-types), then RXR\;\rightrightarrows\; X is an internal groupoid.

  2. More generally, any internal groupoid, in the 1-categorical sense, in the 1-category of 0-types, is an internal groupoid.

  3. If GG is an internal group object (in particular, if it is a 1-group, i.e. a group in the 1-category of 0-types), then G1G\;\rightrightarrows\; 1 is an internal groupoid.

Now what does it mean for a groupoid to be effective? Any morphism f:ABf\colon A\to B has a kernel or Cech nerve A× BAAA\times_B A \;\rightrightarrows\; A, which is an internal groupoid in a straightforward way. If C 1C 0C_1 \;\rightrightarrows\; C_0 is an internal groupoid with C 0C_0, we say that descent data under CC for a morphism f:C 0Bf\colon C_0 \to B is a morphism of groupoids Cker(f)C \to ker(f) that is the identity on C 0C_0. A quotient of CC is an initial object quot:C 0Qquot\colon C_0 \to Q in the category of morphisms equipped with descent data. And finally, CC is effective if it has a quotient of which it is the kernel, i.e. so that the map Cker(quot)C \to ker(quot) is an equivalence.

To make sense of that, let’s see what it means in the above three examples.

  1. For sets XX and YY, the kernel of a function f:XYf\colon X\to Y is the equivalence relation on XX defined by x 1x 2x_1 \sim x_2 if f(x 1)=f(x 2)f(x_1)=f(x_2). Thus, ff has descent data for an equivalence relation RXR\;\rightrightarrows\; X iff x 1Rx 2x_1 R x_2 implies f(x 1)=f(x 2)f(x_1)=f(x_2). Hence a quotient of RR is a coequalizer of RXR\;\rightrightarrows\; X, and RR is effective if it is the kernel of its coequalizer. This is the usual notion of exactness for 1-categories.

  2. If XX is a set, ZZ is a 1-groupoid, and f:XZf\colon X\to Z is a map, then ker(f)ker(f) is an internal groupoid in sets for which hom(x 1,x 2)=hom Z(f(x 1),f(x 2))hom(x_1,x_2) = hom_Z(f(x_1),f(x_2)). At least in the usual model where 1-groupoids are constructed in terms of sets, to give ff descent data under an internal groupoid X 1XX_1 \;\rightrightarrows\; X in sets just means to give a functor from that groupoid to ZZ which agrees with ff on objects. Thus, an effective quotient of a groupoid X 1XX_1 \;\rightrightarrows\; X is just that groupoid, regarded as an object of the category of groupoids rather than an internal groupoid in the category of sets.

  3. Finally, for any type XX and any morphism x:1Xx\colon 1 \to X, the kernel of xx is also called the loop object of XX based an xx, Ω xX\Omega_x X. Therefore, if GG is an internal group object, then an effective quotient of the internal groupoid G1G\;\rightrightarrows\; 1 is, in particular, a type BGB G with a morphism 1BG1 \to B G such that GΩ(BG)G \simeq \Omega(B G) as group objects.

    In other words, the classical homotopy-theoretic loop space recognition principle is a special case of effectiveness of internal groupoids. In particular, with effective internal groupoids we can construct “Eilenberg-Mac Lane” objects, and hopefully even “spectra.”

Effectiveness of internal groupoids should also be useful for constructing truncations. Suppose XX is any type, and consider the “codiscrete groupoid” X×XXX\times X \;\rightrightarrows\; X. An effective quotient of this groupoid is a (-1)-truncation π 1X=τ 1X\pi_{-1} X = \tau_{\le -1}X, a notion which we mentioned earlier that we might want to be able to construct. I believe we can go on and construct higher truncations in this way as well. For instance, an effective quotient of X 1XX_1 \;\rightrightarrows\; X, where X 1(x 1,x 2)=τ 1(Paths X(x 1,x 2))X_1(x_1,x_2) = \tau_{\le -1}(Paths_X(x_1,x_2)), should be a 0-truncation of XX, and so on.

Finally, we can also hope to construct colimits in this way. In the 1-categorical case, it’s a theorem that a Π\Pi-WW-pretopos has finite colimits: the idea is that we can construct a coequalizer of f,g:ABf,g\colon A \;\rightrightarrows\; B as the quotient of the equivalence relation generated by ff and gg. We need the Π\Pi and WW (or at least an exponentiable natural-numbers-object) to construct this equivalence relation. We can hope to “homotopify” this idea to construct “freely generated groupoids” in type theory with inductive types, and thereby construct colimits as the quotients of such groupoids. So if we can resolve the second missing axiom, it may resolve the first one for us.


So what’s the problem with adding “internal groupoids are effective” as an axiom to homotopy type theory? Well, it’s not elementary, at least not a priori. The “all higher homotopies” condition in the definition of an internal groupoid involves an infinite amount of data. Now we do have ways to talk about infinite collections of data in type theory, using inductive and coinductive types: a good example is the natural numbers, which are infinite and also one of the simplest inductive types. So we can hope to use inductive and/or coinductive types to define a notion of “internal groupoid” inside the type theory, so that we could then state the axiom “internal groupoids are effective.” Several groups of people are working in such directions, and I think the prospects are good for eventual success.

Let me also remark in passing that a good definition of “internal groupoid” should of course really be a special case of a notion of “internal category”, and perhaps even of “internal ω\omega-category”. In particular, we would need a notion of internal category (which, since it is internal to an (,1)(\infty,1)-category, is automatically itself “(,1)(\infty,1)”) in order to even state (let alone prove) something like “all finite diagrams have colimits,” although we could also rely on some externally known theorem like the constructibility of colimits from coproducts and pushouts.

On the other hand, the notion of “internal groupoid” we end up with may be fairly complicated, and it would be nice for the fundamental axioms to be simple and easily graspable, like (I think) univalence is. Thus we might hope to be able to derive exactness from something simpler.

Voevodsky has one idea for how to construct groupoid-quotients out of universes. Recall that the quotient of an equivalence relation RR on a set XX can be defined to be its set of equivalence classes, which is a subset of P(P(X))=Ω Ω XP(P(X)) = \Omega^{\Omega^X}, where Ω\Omega is the subobject classifier. The idea for the quotient of a groupoid C 1C 0C_1\;\rightrightarrows\; C_0, as I understand it, is to replace Ω Ω X\Omega^{\Omega^X} by U U C 0U^{U^{C_0}}, where UU is a (univalent) universe. Instead of a subset of this, we probably need to equip its points with extra structure corresponding to “descent data” under CC.

It seems to me that some additional axioms will be needed for this to work. The version for equivalence relations works because Ω\Omega is the set of all truth values, but UU is not of course the type of all types. It seems plausible to me that with this idea we can construct an object that has the correct universal property of the quotient with respect to all types in UU, but I don’t see immediately how to extend that to types not in UU. Moreover, the quotient constructed in this way will not, itself, be an element of UU.

Motivated by similar considerations, Voevodsky has been experimenting with a general class of axioms he calls resizing axioms, which are all of the form “a type XX, guaranteed only to belong to a universe UU, can actually be considered as belonging to some smaller universe.” At Oberwolfach he mentioned explicitly three such axioms:

  • “A (-1)-type can be considered as belonging to any universe at all.” This seems more or less the same as the existence of a subobject classifier.

  • “If XX belongs to some universe and YY is equivalent to XX, then YY can also be considered as belonging to the same universe as XX.” This seems innocuous, but it also seems like it might be quite difficult to construct a set-theoretic model of.

  • “If XX is an element of some universe UU, then the full sub-type of UU consisting of all types equivalent to XX is again an element of UU.” The latter is of course a version of BAut(X)B Aut(X), so this axiom is more or less a particular case of exactness.

I don’t know whether these resizing axioms would guarantee that “quotients” constructed as above would lie in the same universe, or whether a different resizing axiom would be needed. If this construction does work, then there would undoubtedly be a certain elegance to it. But there are also other possible ways to construct quotients; my current plan is for the next post to discuss one such idea.

Posted at April 12, 2011 5:07 AM UTC

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/2382

41 Comments & 1 Trackback

Re: Homotopy Type Theory, V

The second question Urs asked in his comment on the last post was

Is it conceivable that one can add further properties to the ∞-toposes thus axiomatized?… I am wondering if the axioms of cohesive ∞-toposes in turn can be founded entirely formally in type theory.

In principle, I think the answer is surely yes. There are definitely places in 1-topos theory where people have made use of an “internal language” that refers not only to a single topos, but to a pair of topoi related by a functor or an adjunction. The word “modal” often appears in this connection. For instance, a topos equipped with a Lawvere-Tierney topology (which can be regarded as two toposes related by a geometric embedding) has a corresponding “modal operator” which acts on its internal logic. The double-negation topology on the effective topos plays an important role. There is also the Awodey-Kishida sheaf semantics for modal logic, which David Corfield keeps bringing up in other posts. And there are surely other examples.

So what is the best way to describe the structure on a cohesive (,1)(\infty,1)-topos induced by its “cohesiveness” over Gpd\infty Gpd (or over some other (,1)(\infty,1)-topos, for that matter)? We could assert a subcategory of “discrete objects” (via, for instance, a type constructor IsDiscrete(A)IsDiscrete(A) such that AIsProp(IsDiscrete(A))\forall_A IsProp(IsDiscrete(A))) which is both reflective and coreflective and closed under finite products. But there might be some hidden gotcha there; I haven’t thought at all about how that would interact with dependent types. And then there are the codiscrete objects to add as well.

Posted by: Mike Shulman on April 12, 2011 5:34 AM | Permalink | PGP Sig | Reply to this

Re: Homotopy Type Theory, V

Thanks for the replies!

Here is one more question. You write:

In particular, we would need a notion of internal category (which, since it is internal to an (∞,1)-category, is automatically itself “(∞,1)”) in order to even state (let alone prove) something like “all finite diagrams have colimits,”

I am not seeing clearly on this point. Having a notion of internal category does not seem to help with describing colimit diagrams in the ambient context, (does it?) because these are parameterized by external diagrams, so to say.

In the analogous 1-categorical situation of fully formal ETCS the analogous problem is avoided by using the (external) fact that the existence of all (finite) (co)limits is implied by existence over a few specific shapes, and only these are explicitly axiomatized.

I am not sure what an analogous (,1)(\infty,1)-categorical approach would look like.

Posted by: Urs Schreiber on April 12, 2011 8:14 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Of course we cannot prove internally something like “all finite diagrams have colimits” if by “all finite diagrams” we mean all external such. But we can also talk about internal diagrams, and since we have universes, we can talk about “all internal diagrams in some universe” and ask them to have colimits, in the appropriate internal sense. I would expect these internal colimits to also be external colimits, in the case when the internal diagram is an internalization of some external diagram.

Although, hmm, there might be problems with universes there. I guess the internal property of “having colimits” can only be stated with respect to a universe (unless we allow impredicative quantification over all types rather than just all types in some universe), so that the property of “being a colimit relative to one universe” might a priori not extend to all types. However, if the construction of the colimit and the proof of its universal property were known to be independent of the universe, then it seems that it would follow that we could do the same proof for any universe and thereby get the full external universal property.

Posted by: Mike Shulman on April 12, 2011 10:25 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

I think they are strictly more general; can any type-theorist in the audience tell me the 1-categorical structure which corresponds to extensional type theory with the inductive types of Coq/Agda?

As far as I know, W-types are sufficient to encode all inductive types so long as some other primitives are around, and everything works the right way. Some of the OTT work takes 00, 11, 22, Π\Pi, Σ\Sigma and WW as the only type formation operators in its base type theory. The other ingredients you need to encode inductive types are for functions to have extensional equality, and perhaps some ability to define sets by recursion (that is: large elimination). For instance, the definition of the natural numbers goes like:

T : 2 -> Set
T false = 0
T true = 1

N = W 2 T

zero = branch false 0-elim
suc n = branch true (const n)

Proving the induction principle for this representation relies on things like all functions with type 0W2T0 \to W 2 T being identical, though.

Anyhow, this is a poor way of representing inductive types on a machine, but it’s possible.

On the other hand, I’m not sure how far this gets you in other territory. Agda has inductive families, which are initial algebras for indexed families. And for instance, the identity type is a special case of inductive families. I believe it’s known that having identity types together with inductive types is sufficient to imply all other inductive families, though.

However, Agda goes one step further and has inductive-recursive definitions (Coq does not). Martin-loef’s universe a la Tarksi is essentially* a special case of such definitions. For instance:

data U : Set where
  n  : U
  fin : Nat -> U
  pi sg w : (s : U) -> (T s -> U) -> U
  i : (s : U) -> T s -> T s -> U

T : U -> Set
T n         = Nat
T (fin n)   = Fin n -- finite sets
T (pi s f)  = (x : T s) -> T (f x)
T (sg s f)  = (x : T s) × T (f x)
T (w s f)   = W(x : T s) (T (f x))
T (i s x y) = I (T s) x y

These are again initial algebras in some fancier related category, although I couldn’t tell you which exactly (you can look at work by Peter Dybjer if you care (Indexed Induction-Recursion and such); I’m not sure I have the chops to get through the category sections, let alone explain them). I have no idea what categorical structure is required to admit these sort of definitions in the internal language, though. I’m not sure anyone’s actually worked that sort of thing out. These definitions are a little exotic, though, so perhaps they’re worth ignoring for the moment.

[*] The potential difference between an inductive-recursive universe and the universe UU in Martin-Loef type theory is that the former actually has an induction principle. The obvious consequence of this is that U above is not univalent, because I can define, for instance:

f : U -> 2
f n = false
f _ = true

And then if we take pf : Id U n (fin 1 => n) because 1\mathbb{N} \simeq \mathbb{N}^1, we get cong f pf : Id 2 false true, which is a problem.

I discovered this not long ago, and thought it was a genuine difference between MLTT universes and induction-recursion, but I’ve been told that Martin-loef himself entertained the idea of an additional eliminator for the universe, although he also at times expressed that T above is the proper eliminator for U. Apparently he considered the distinction as between an ‘open’ universe (to which new formers could be added, and only T is given) and a ‘closed’ universe (for which all the formers have been listed above, and the additional induction principle is given). Obviously the latter doesn’t work for univalent purposes.

Inductive-recursive definitions are taken to be the closed variety. U above is homotopically a set, with a decoding into the actual universe, Set. And this isn’t obviously a bad decision, because there are i-r definitions that have nothing to do with universes for which we really want the induction principle; for instance, unique lists:

data Uniq (A : Set) : Set where
  nil : Uniq A
  cons : (x : A) -> (xs : Uniq A) -> x notIn xs -> Uniq A

_notIn_ : {A : Set} -> (x : A) -> (xs : Uniq A) -> Set
x notIn nil = True
x notIn (cons y ys _) = (x /= y) * x notIn ys

It’s likely unacceptable for the only eliminator for Uniq A to be _notIn_.

Posted by: Dan Doel on April 12, 2011 10:18 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

I thought Agda allowed non-uniform Set parameters in datatype declarations – doesn’t that take you outside what W-types can handle?

Posted by: Neel Krishnaswami on April 12, 2011 2:22 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Do you mean types like:

data Complete (A : Set) : Set where
  z : A -> Complete A
  s : Complete (A * A) -> Complete A

If so, then yes, Agda allows them (and I thought Coq started allowing them not long ago). I wasn’t really aware that they took you out of W-type territory, but I guess it isn’t surprising.

Although, eyeballing it, it seems like it might be possible to produce an isomorphic type that doesn’t have that form, given a rich enough ability to define types by recursion. For instance:

Expand : Nat -> Set -> Set
Expand z     A = A
Expand (s n) A = Expand n (A * A)

data Complete' (A : Set) : Nat -> Set where
  tip : {n : Nat} -> Expand n A -> Complete' A n
  branch : {n : Nat} -> Complete' A (s n) -> Complete' A n

Complete : Set -> Set
Complete A = Complete' A 0

Though I suppose MLTT doesn’t really have that, either (we’d need to make reference to a specific universe for A to define Expand).

Posted by: Dan Doel on April 12, 2011 9:22 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

One take on the difference I’ve found helpful is that an inductive-recursive universe is a not quite a universe of actual types, but of names for types. So it makes sense for it to be set-like, for certain predicates on it to be decidable, and so on.

(To make this idea precise, the syntax of names has to be taken not as finitary but as infinitary, because of the use of actual functions into U in the constructors for Π- and Σ-types; this is why for instance we shouldn’t expect, and don’t get, decidable equality on U.)

Overstating it a little: A univalent universe is where types actually live; an inductive-recursive universe is their telephone directory.

Posted by: Peter LeFanu Lumsdaine on April 12, 2011 5:40 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Thanks for the help; that is nice to hear. Of course “2” is also an inductive type, but it makes sense that we can get all “ordinary” inductive types from that and from W-types. Do you know a reference for the fact that identity types together with inductive types imply all inductive families? Are there other inductive families which are similarly “complete”? I’ve wondered from time to time whether homotopy type theory demands such a special role given to identity types, or whether it could be regarded as some more general viewpoint on inductive families.

I’m also surprised if no one has worked out the semantics of more sophisticated things like induction-recursion, since they seem like really important ideas to me. (I seem to continually find myself wanting induction-recursion and being frustrated that Coq doesn’t have it. But perhaps that is due to my ignorance of better ways to do the things I am trying to do.)

Posted by: Mike Shulman on April 13, 2011 5:38 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Do you know a reference for the fact that identity types together with inductive types imply all inductive families?

Off hand, I don’t know one for inductive families. However, this paper reports that all GADTs are reducible to existential quantification and the equality GADT (or, regular algebraic types augmented with those). Inductive families are the same as GADTs, except the latter are essentially indexed over a kind, instead of a type (Agda actually allows inductive families with large indices as well). And the equality GADT is the relevant identity type, and existential quantification is a special case of inductive definition. So it seems likely that the same construction would go through for inductive families, even if no one’s written it out.

I’ve wondered from time to time whether homotopy type theory demands such a special role given to identity types, or whether it could be regarded as some more general viewpoint on inductive families.

If I’m not mistaken, Dan Licata mused on what K/univalence has to do with inductive families in general over on the HTT blog. More or less, it’s an oddity in type theory that the elimination principle for identity types tells you that v : Id A x y has the form refl, but it doesn’t tell you the seemingly obvious fact that v : Id A x x also has that form. Similarly, the eliminator for finite sets tells you that v : Fin n is either fz or fs k, but it essentially doesn’t tell you that Fin 0 is empty (you need large elimination or universes I think).

One might think that’s a defect of inductive families, but homotopy seems to be the viewpoint that this is actually the correct state of affairs.

I’m also surprised if no one has worked out the semantics of more sophisticated things like induction-recursion, since they seem like really important ideas to me.

Well, I don’t know of any categorical constructs that encode induction-recursion. However, the Epigram folks have been working on internalizing inductive definitions closer to the way they’re typically written. So you have a type Desc of descriptions of strictly-positive functors, and then given D : Desc, Mu D is the initial algebra of the functor described by D. And they’ve actually worked out versions of this for inductive families and induction-recursion. (And an advantage of all this is that you can write generic programs by recursion over the description.)

However, that seems a lot more complicated than W-types, and it seems like it’d be much more difficult to describe what categorical structure is required to make all that work. That is, W-types have no need to talk about ‘strictly positive’ functors and whatnot while, for instance, Dybjer and Setzer’s semantics for induction-recursion do, and so does the above stuff. So it doesn’t seem correct to put ‘initial algebras of strictly positive functors on Fam(I)/DFam(I)/D’ on the same footing as ‘W-types.’

Posted by: Dan Doel on April 13, 2011 8:34 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Thanks!

Dan Licata mused on what K/univalence has to do with inductive families in general over on the HTT blog.

Yes, although I didn’t read that post as answering the question I had in mind here. Although perhaps that means I read it wrong! Are you suggesting that a similar behavior for all inductive families, rather than just for identity types, is the characteristic of homotopy type theory? It still seems to me that the identity types are basic to homotopy type theory, since they define the homotopies. Maybe a better way to phrase my question would be, can the homotopy theory of types be recovered from some inductive families other than identity types?

the elimination principle for identity types tells you that v : Id A x y has the form refl

Does it really? It tells you that in order to define a function on terms of type Id A x y, it suffices to define it on terms of the form refl, but that seems to me to be a subtly different thing.

W-types have no need to talk about ‘strictly positive’ functors

Hmm, but W-types do refer (at least implicitly) to dependent polynomial functors. Are strictly positive functors that much more complicated than dependent polynomials?

Posted by: Mike Shulman on April 13, 2011 8:19 PM | Permalink | PGP Sig | Reply to this

Re: Homotopy Type Theory, V

Yes, although I didn’t read that post as answering the question I had in mind here. Although perhaps that means I read it wrong! Are you suggesting that a similar behavior for all inductive families, rather than just for identity types, is the characteristic of homotopy type theory?

Well, it certainly has the potential to affect the behavior of all inductive families, inasmuch as inductive families can be desugared to regular inductive types containing identity types. The typical definition of finite sets as an inductive family is:

data Fin : Nat -> Set where
fz : {n : Nat} -> Fin (suc n)
fs : {n : Nat} -> Fin n -> Fin (suc n)

This can be encoded as:

data Fin (n : Nat) : Set where
fz : {m : Nat} -> Id Nat (suc m) n -> Fin n
fs : {m : Nat} -> Id Nat (suc m) n -> Fin m -> Fin n

And such a translation can generally be applied. So changes to the way Id works ripples through and potentially changes the way all inductive families work.

It still seems to me that the identity types are basic to homotopy type theory, since they define the homotopies. Maybe a better way to phrase my question would be, can the homotopy theory of types be recovered from some inductive families other than identity types?

I don’t know that any other set of inductive families is sufficient for this, and maybe identity types are always lurking in the background. However, I can tell you that Agda’s --without-K flag isn’t a restriction on something to do with identity types specifically. It’s a restriction on how pattern matching with inductive families works, because that is the primitive notion in Agda. So things that don’t involve `Id` at all may fail to work when --without-K is enabled. Maybe there’s a translation involving K justifying the pattern matching, but it seems like in Agda, you could interpret HTT as informing what sort of pattern matching you’re allowed to do with inductive families, at least inasmuch as K is banned.

Of course, I don’t know what the univalence axiom has to do with other inductive families off the top of my head

Does it really?

Arguably, no. But it’s sort of a traditional reading. One might read induction on the natural numbers as saying that all naturals are of the form SSS...ZSSS...Z. And I think that’s traditionally the intention of the rule. But that isn’t really what it says (hence the ‘non-standard’ models).

Hmm, but W-types do refer (at least implicitly) to dependent polynomial functors. Are strictly positive functors that much more complicated than dependent polynomials?

The categories involved are more complicated. Maybe it’s not really so different. Anyhow, the specification, “functors XΣ y:A(TyX)X \mapsto \Sigma_{y : A}(T y \to X) for all AA and TT have initial algebras,” seems easy and clean to me. The categorical semantics of induction-recursion seems to talk about polynomial functors on slices of categories of families, which is a lot more involved.

Perhaps some of that is just semantics of inductive families, though (Dybjer and Setzer’s semantics subsume those, instead of just inductive types). If you want to state directly that a category has inductive families, you’d probably have to state that polynomial functors over its slice categories have initial algebras. It’s sort of luck that identity types are sufficient for all other inductive families, so you may not have to talk about that at all.

If that sounds sufficient for you, though, then I’d recommend looking at Indexed Induction Recursion (the long version) by Peter Dybjer and Anton Setzer, as they have a whole workup of the categorical semantics of induction recursion.

Perhaps my real disconnect is this: W works like a quantifier, similar to Σ\Sigma and Π\Pi in type theory. And that quantifier, with enough base types, suffices for inductive types. Talking about the existence of initial algebras of polynomial functors, whether over the base category, or slices thereof, seems more external, and even if you work on being able to describe the admitted functors within the language, it ends up seeming different than W-types. Maybe that’s just a personal hangup, though.

Posted by: Dan Doel on April 14, 2011 1:34 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

…inductive families can be desugared to regular inductive types containing identity types.

What exactly does that mean? It’s not immediately obvious to me that the two versions of finite sets that you defined are “the same”. They have different-looking inductive principles, no? In what sense is the latter a “desugaring” of the former?

you could interpret HTT as informing what sort of pattern matching you’re allowed to do with inductive families, at least inasmuch as K is banned.

But HoTT is more than just banning K and its ilk; those are already missing in plain intensional type theory. I tend to think of HoTT as a viewpoint about what identity types mean, along with an inclination towards additional axioms like univalence that are in accord with that viewpoint.

One might read induction on the natural numbers as saying that all naturals are of the form SSS…Z. And I think that’s traditionally the intention of the rule. But that isn’t really what it says (hence the ‘non-standard’ models).

That’s an interesting point. I hadn’t thought before of non-extensional identity types being analogous to non-standard models of arithmetic.

I’d recommend looking at Indexed Induction Recursion

Okay, I will, when I get a moment. Thanks Neel also for the other reference, which is also near the top of my reading list.

Posted by: Mike Shulman on April 14, 2011 5:01 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

What exactly does that mean?

It means, at the least, that I’m reasonably sure I’ve seen proposals in which the former is only well-defined by virtue of it being interpreted internally as the latter (I’m thinking Epigram 2, if not currently, then in the past).

It’s not immediately obvious to me that the two versions of finite sets that you defined are “the same”. They have different-looking inductive principles, no?

They’re certainly superficially different. If you read the constructors like a type theorist and not a topologist, though, they say things like, “fz has type Fin (suc m) for some m,” versus, “fz has type Fin n where n is suc m for some m.” And those statements aren’t all that different.

Making that similarity rigorous is I think (part of) the topic of that GADT paper I linked to earlier.

But HoTT is more than just banning K and its ilk; those are already missing in plain intensional type theory.

That’s an interesting point. I hadn’t thought before of non-extensional identity types being analogous to non-standard models of arithmetic.

The thing is, to a traditional type theorist, the fact that those things are missing in intensional type theory looks like a defect (I know at least one who is on record saying that). It looks like we screwed up inductive definitions, because in the ‘standard model’ we have in mind, it’s obvious that every Id A x x is refl, because every Id A x y is.

So at least part of the intrigue of homotopy type theory for type theorists, I think, is that you can say, “hey, this ‘non-standard’ model might be just as good as the ‘standard’ one, and it means that inductive definitions aren’t actually screwed up.” My analogy to the naturals breaks down there, probably, because I don’t think many people look at non-standard naturals being just as good (maybe I’m wrong there).

Then of course you get to run with what additional axioms the univalent model suggests. I’m afraid I don’t know what implication they have for inductive families in general, so if that was your question, I can’t answer it.

Posted by: Dan Doel on April 14, 2011 11:11 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

“So at least part of the intrigue of homotopy type theory for type theorists, I think, is that you can say, hey, this non-standard model might be just as good as the standard one, and it means that inductive definitions aren’t actually screwed up. My analogy to the naturals breaks down there, probably, because I don’t think many people look at non-standard naturals being just as good (maybe I’m wrong there).”

I think the analogy is not so good, because under the homotopy interpretation, what you are calling the “non-standard” model is not only “just as good” – it’s actually the *only correct interpretation*. The so-called “standard model” in which e.g. K and UIP hold is not even compatible with the general homotopical interpretation.

Posted by: Steve Awodey on April 14, 2011 11:51 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

The so-called “standard model” in which e.g. K and UIP hold is not even compatible with the general homotopical interpretation.

I’m not sure exactly what you mean by “homotopical interpretation” here. One natural meaning of “homotopical interpretation” would be to refer to a class of models, and I think the “standard model” is definitely within that class—consider the weak factorization system whose left class is the isomorphisms and whose right class is all maps. K and UIP are incompatible with some axioms, like univalence or \infty-exactness, which are motivated by the homotopy viewpoint, but I wouldn’t say that the “homotopical interpretation” mandates the adoption of such axioms.

Posted by: Mike Shulman on April 15, 2011 5:02 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Making that similarity rigorous is I think (part of) the topic of that GADT paper I linked to earlier.

Is that true in intensional type theory, or only in extensional semantics?

Actually, I was unable to find the proof of that theorem in the cited paper; they state the theorem in the introduction but then where do they actually prove it?

to a traditional type theorist, the fact that those things are missing in intensional type theory looks like a defect

I thought the perspective of intensional type theory was that terms of an identity type represented proofs that two things are equal, so the lack of K just means that there might be more than the trivial way to prove that something is equal to itself. If we wanted to be proof-irrelevant, wouldn’t we work in extensional type theory instead (just assume K)?

Posted by: Mike Shulman on April 15, 2011 4:57 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

I don’t think many people look at non-standard naturals being just as good

Well, there are some nice things you can do with non-standard naturals, like Non-Standard Analysis.

What are some good examples of inductive families other than identity types that we could think about the homotopy meaning of?

Posted by: Mike Shulman on April 15, 2011 5:03 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Is that true in intensional type theory, or only in extensional semantics? Actually, I was unable to find the proof of that theorem in the cited paper

Hmm. I seem to be unable to access the paper right now. If it helps, I can tell you that GHC uses exactly this translation to implement GADTs, although the situation there seems more extensional (it has ‘equality constraints’ that can be attached to types, and are automatically used by the checker; so if the constraint a ~ b is in scope, a and b are essentially definitionally equal).

I also am away from Agda for a bit, but I can give you an unchecked implementation of the induction principle for finite sets, and I think it should hold even if we’re using --without-K:

data Fin (n : Nat) : Set where
  fz : {m : Nat} -> suc m = n -> Fin n
  fs : {m : Nat} -> Fin m -> suc m = n -> Fin n

fzero : {n : Nat} -> Fin (suc n)
fzero = fz {n} refl

fsuc : {n : Nat} -> Fin n -> Fin (suc n)
fsuc fn = fs fn refl

rec : (P : (n : Nat) -> Fin n -> Set)
    -> ((n : Nat) -> P (suc n) fzero)
    -> ((n : Nat) -> (fn : Fin n) -> P n fn -> P (suc n) (fsuc fn))
    -> (n : Nat) -> (fn : Fin n) -> P n fn
rec P pz ps .(suc n) (fz {n} refl)    = pz n
rec P pz ps .(suc n) (fs {n} fn refl) = ps n fn (rec P pz ps n fn)

I’m pretty sure those matches against refl are kosher.

I thought the perspective of intensional type theory was that terms of an identity type represented proofs that two things are equal, so the lack of K just means that there might be more than the trivial way to prove that something is equal to itself. If we wanted to be proof-irrelevant, wouldn’t we work in extensional type theory instead (just assume K)?

Lack of K would mean that. But that’s ‘obviously’ silly, because we’ve given all the possible ways to prove that anything is equal to anything else: refl. That’s what inductive definitions are supposed to mean, right? :)

And if we were mathematicians, maybe we could go with extensional type theory. For someone wanting things to run on a machine, though, an intensional theory with K has advantages like decidability of type checking

What are some good examples of inductive families other than identity types that we could think about the homotopy meaning of?

I was having a hard time coming up with anything, but a possible reason occurred to me. The homotopy interpretation doesn’t really get novel until you consider the identity type for a universe. Fin n is the same in HTT, and has K available

So, presumably, to see this crop up with other inductive types, you have to consider other U-indexed examples. And it’s not hard to come up with something contrived like:

data TypeRep : U -> Set where
  tynat : TypeRep Nat

In the non-homotopy interpretation, we essentially expect only TypeRep Nat to be inhabited; and if that were the case, it would sort of be a way of picking out particular sets in U, making it look discrete. In the homotopy interpretation, though, this is no longer true, because for any T isomorphic to Nat, we can get an inhabitant of TypeRep T via univalence and J.

This probably isn’t an interesting example, but maybe it’s the kind of thing you’re looking for, at least.

Posted by: Dan Doel on April 15, 2011 4:06 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Neil Ghani and Peter Hancock have a somewhat optimistically titled draft paper, Induction-Recursion for the Masses, about the categorical semantics of IR in (extensional) type theory.

Posted by: Neel Krishnaswami on April 13, 2011 9:33 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

I’ve wondered from time to time whether homotopy type theory demands such a special role given to identity types, or whether it could be regarded as some more general viewpoint on inductive families.

One possibly-answer-ish to this is that identity types are a special case of homotopy fiber types. That is, instead of defining hfiber in terms of Id, as we have been recently, one can define it directly as an inductive family. In pseudo-Coq,

Inductive hfiber {X Y : Type} (f : X -> Y) : Y -> Type :=
    | incl : forall x:X, hfiber (f x).

Then Id-types are a special case of hfiber; but what makes this interesting is that hfiber (with either definition of it) gives factorisations for a rather nice weak factorisation system, as shown by Nicola Gambino and Richard Garner. (In some sense, this is the (trivial cofibration; fibration) wfs.) So the following are approximately equivalent:

  • Id-types exist;
  • hfibers exist;
  • there is a wfs whose generating right maps are (dependent projections from) indexed families of types.

(“Approximately”: because in all of these, you can vary the strictness/coherence; in particular, the usual type-theoretic assmuption that the Id-types/hfibers and their eliminators are stable under substitution will correspond to some quite special structure on the wfs; I don’t know exactly what.)

So perhaps an argument could be made that general homotopy fibre types are just as fundamental to HoTT as identity types are?

Posted by: Peter LeFanu Lumsdaine on April 18, 2011 12:42 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

I had a very similar thought over the weekend!

Posted by: Mike Shulman on April 18, 2011 7:47 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Well, this is certainly timely! Here at CMU, we’re thinking about related stuff. In order to build higher-dimensional inductive types in a systematic way, it would be good to have the sort of effective groupoid quotients you discuss here. Could you please give a reference or two on (,1)(\infty, 1)-exactness?

Posted by: Steve Awodey on April 12, 2011 2:18 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Could you please give a reference or two on (∞,1)-exactness?

Section 6.1.2 in HTT.

Some pointers are collected at groupoid object in an (,1)(\infty,1)-category and effective epimorphism in an (,1)(\infty,1)-category.

Posted by: Urs Schreiber on April 12, 2011 2:55 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

I guess I’m not the only one who thinks this is a central question! Are your “higher-dimensional inductive types” the same ones that I mentioned here (that’s what I’m planning for the next post to be about)? As you can tell from this post, I was thinking of constructing groupoid quotients out of higher inductive types, rather than vice versa.

Posted by: Mike Shulman on April 12, 2011 10:19 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

There is Voevodsky’s reduction (p55) of Coq’s inductive types to a sequence of definitions of forms unit, (Dependent) Sum, emptytype, (disjoint) Union, Eq and IP. Here IP is:


Inductive IP(A:Type)(Bf:forall a:A,Type)(Df:forall a:A, forall b: Bf a, Type)(q: forall a:A, forall
b: Bf a, forall d: Df a b, A) (a:A): Type :=
cip: forall b: Bf a, forall f: (forall d: Df a b, (IP A Bf Df q (q a b d))), (IP A Bf Df q a).

IP has a univalent interpretation.

Posted by: Bas Spitters on April 12, 2011 5:11 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

It seems like our most complete models to date for \infty-topoi are the models using quasi-categories. This this gets me wondering: have people tried to extract simplicial models of the “classifying” category of a homotopy type theory? For that matter, do we have simplicial models for types themselves, which one might hope ended up being Kan complexes? I guess most of the work so far has focused on globular sets, but it seems like it would be nice to have simplicial models as well.

One idea which occurs to me is to mimic the construction of the coherent nerve in some fashion. So for example, given a type A, the 0-simplices would be the closed terms of type A. Then the 1-simplices would be the closed terms of type x:A y:AId A(x,y)\sum_{x:A} \sum_{y:A} \mathrm{Id}_A(x,y) Next the 2-simplices would look like x:A y:A z:A f:Id(x,y) g:Id(y,z) h:Id(x,z)Id(gf,h)\sum_{x:A} \sum_{y:A} \sum_{z:A} \sum_{f:\mathrm{Id}(x,y)} \sum_{g:\mathrm{Id}(y,z)} \sum_{h:\mathrm{Id}(x,z)} \mathrm{Id}(gf,h) It gets unwieldy from here, obviously, but I think you can find the correct terms to sum over by looking at the incidence relations in the fattened version of [n][n] used for the coherent nerve. It seems pretty clear to me something like this will be a simplicial set: face maps will be appropriate projections from the dependent sums, and degenerices pick out canonical elements.

Probably something like this has occurred to others, so maybe this doesn’t go anywhere, but if not, I’d be curious to know why, and if there are any promising alternatives.

Posted by: Eric Finster on April 12, 2011 8:24 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Yes! In fact, I mentioned essentially that very construction in the last few paragraphs of the first post, on the level of the category of types with its weak factorization system rather than in type-theoretic language. I didn’t see how to get the degeneracies to satisfy their laws strictly (rather than merely up to propositional equality), but it’s possible I was thinking too abstractly and it does happen to work out in the type theory?

In any case, I am confident that you can at least get a “semi-simplicial resolution” of any type—and thereby a semi-simplicial set out of each type, which will certainly be a Kan complex that encodes at least all the “external data” about the homotopy theory of that type. One could also expect to enrich the category of types over semi-simplicial sets in this way and obtain a model for the (,1)(\infty,1)-category of types, then perhaps taking its coherent nerve to get a (semi-?) quasi-category, but I don’t know whether anyone has written any of this down.

Posted by: Mike Shulman on April 12, 2011 10:15 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Ah, yes, I see. That is roughly the same thing. You’d think, as a homotopy theorist, I would have been quicker to see the model-category theoretic version. :) In any case, I think it’s at least plausible that the right maps would give definitionally (is that the right word? intensionally?) equal terms. Here are some simple calculations. Let x,y:Ax,y : A and f:Id A(x,y)f : \mathrm{Id}_A(x,y) be closed terms. Then s 0(x)=x,x,r(x)s_0(x) = \langle x,x,r(x) \rangle s 0(x,y,f)=x,x,y,r(x),f,f,r(f)s_0(\langle x,y,f \rangle) = \langle x,x,y,r(x),f,f,r(f) \rangle s 1(x,y,f)=x,y,y,f,r(y),f,r(f)s_1(\langle x,y,f \rangle) = \langle x,y,y,f,r(y),f,r(f) \rangle So we have things like (s 1s 0)(x)=s 1(x,x,r(x))=x,x,x,r(x),r(x),r(x),rr(x)=s 0(x,x,r(x))=(s 0s 0)(x)(s_1 s_0)(x) = s_1(\langle x,x,r(x) \rangle) = \langle x,x,x,r(x),r(x),r(x),rr(x) \rangle = s_0(\langle x,x,r(x)) = (s_0 s_0)(x) And then (d 0s 0)(x,y,f)=d 0(x,x,y,r(x),f,f,r(f))=x,y,f(d_0 s_0)(\langle x,y,f \rangle) = d_0(\langle x,x,y,r(x),f,f,r(f) \rangle) = \langle x,y,f \rangle (d 1s 0)(x,y,f)=d 1(x,x,y,r(x),f,f,r(f))=x,y,f(d_1 s_0)(\langle x,y,f \rangle) = d_1(\langle x,x,y,r(x),f,f,r(f) \rangle) = \langle x,y,f \rangle So that d 0s 0=d 1s 0=idd_0 s_0 = d_1 s_0 = \mathrm{id}. I feel like this should continue, but obviously one has to be careful.
Posted by: Eric Finster on April 12, 2011 11:00 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Unfortunately, your first three lines contain a problem. Here is an Agda file illustrating.

The problem is that composition of identity proofs is biased. The compute rule for JJ is like J(refl,v)vJ(refl,v) \Rightarrow v. That gets you reflffrefl \circ f \Rightarrow f. However, there is no rule J(id,refl)idJ(id,refl) \Rightarrow id, which is necessary for the other side. Thus, it only holds up to propositional equality, via induction.

Posted by: Dan Doel on April 13, 2011 1:01 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Working further, it seems like the subsequent identities might still hold, though (perhaps I spoke too soon; the file should be updated). Although I do have a question: should it be: d 0s 0=idd_0 s_0 = id and d 1s 1=idd_1 s_1 = id? Because if it’s s 0s_0 for both, I don’t think it works.
Posted by: Dan Doel on April 13, 2011 1:21 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Hmm. Yeah, I wondered if I might be committing a type-theoretic no-no here by asking that I had strict identities on both sides. That’s frustrating.

I guess d 1s 1d_1 s_1 will also be a relation, but certainly d 1s 0d_1 s_0 should be as well. So maybe we don’t get a real simplicial set this way.

Posted by: Eric Finster on April 13, 2011 1:42 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Actually, I think the definition of d 11d_{11} in your file should read

d 11(x,y,z,xy,yz,xz,coh)=(x,z,xz)d_{11} (x, y, z, xy, yz, xz, coh) = (x, z, xz)

since d 1d_1 is the face map which composes the arrows. Sorry, I should have been more explicit about what the face maps were. After making this change to your code, it seemed to type check okay for me.

Posted by: Eric Finster on April 13, 2011 2:01 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

All right. It was a complete guess on my part what the ds did, and I chose poorly (my knowledge here is 0). Do I at least have the other one right?

You’re correct that the stated identities check with the alternate d11 definition. In fact, everything is eta-friendly enough so that d is 0=idd_i s_0 = id holds definitionally in Agda.

Posted by: Dan Doel on April 13, 2011 4:02 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

The identities I was worried about are the ones that compose two degeneracy maps, like s 0s 0=s 1s 0s_0 s_0 = s_1 s_0. I have no doubt that the ones of the form d is j=d ks ld_i s_j = d_k s_l hold, because the degeneracy maps are basically defined so as to make them true (I like to think of the degeneracies are dependent functions into the type of nn-simplices regarded as indexed over the type of nn-boundaries).

It looks from your Agda file as though s 0s 0=s 1s 0s_0 s_0 = s_1 s_0 does hold definitionally as morphisms S 0S 2S_0 \to S_2. That might be a special case, though, because there all the paths involved are refl. Can you show the corresponding identities for composites of degeneracies S 1S 3S_1 \to S_3?

Posted by: Mike Shulman on April 13, 2011 5:54 AM | Permalink | PGP Sig | Reply to this

Re: Homotopy Type Theory, V

I’m afraid you’ll have to tell me what S 3S_3 is before I can answer that question.

x,y:A f,g,h:Id(x,y) ϕ:Id(f,g) ψ:Id(g,h) θ:Id(f,h)Id(ψϕ,θ) \sum_{x,y : A} \sum_{f,g,h : Id(x,y)} \sum_{\phi : Id(f,g)} \sum_{\psi : Id(g,h)} \sum_{\theta : Id(f,h)} Id (\psi \phi,\theta)

?

Posted by: Dan Doel on April 13, 2011 7:15 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

I’m afraid it’s much worse than this. It’ll probably be easier for me to add the definition to your file myself, rather than writing it out here, but I have a question for you:

I’m still not very good with this J-elimination. How do I compose two cells? For example, if I have f,g:Id A(x,y)f,g : \mathrm{Id}_A(x,y), α:Id Id A(x,y)(f,g)\alpha : \mathrm{Id}_{\mathrm{Id}_A(x,y)}(f,g) and h:Id A(y,z)h : \mathrm{Id}_A(y,z), I will need a morphism αh:Id Id A(x,z)(hf,hg)\alpha h : \mathrm{Id}_{\mathrm{Id}_A(x,z)}(hf, hg) which a category theorist would call the “horizontal composition” of α\alpha and r(h)r(h).

This composition will figure in the definition, so I need it before I can finish.

Posted by: Eric Finster on April 13, 2011 11:56 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Rats. I think I managed to figure out the 2-cell compositions from above, so I typed up the definition of S 3S_3 as I imagined it here. The trouble is it doesn’t type check. The problem seems to be the fact that composition is not strictly associative: by changing the infix binding of composition from left to right, one or the other factors of the cartesian product in the definition fails.

I think I could probably fix this by using an associator somehow, but it certainly dims my hopes that the definition is canonical enough for the degenerices to work out right, since it would break the inherent symmetry of the situation. I’ll keep playing with it, but I’d be happy to hear any suggestions for other approaches.

Aside: since I am fairly new to Agda, my definition of the 2-cell composition laws feels very ugly to me. If someone has suggestions for how to clean this up, I’m all ears.

Posted by: Eric Finster on April 13, 2011 4:26 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Horizontal composition looks okay. However, one simplification would be to notice that both are a special case of:

cong : {A B : Set} -> (f : A -> B) -> {x y : A} -> Id A x y -> Id B (f x) (f y)

Then left composition is just cong (h ∘) and the right one is cong (∘ h) (to steal Haskell’s sectioning notation). Also, you can skip listing a lot of {_} by using things like {f = f} to access Agda’s somewhat dubious keyword argument support (the left side is what you called it in the type, the right side is what you’re calling it in the function body, or a pattern).

Unfortunately I can’t help you much about composition not being definitionally associative.

Posted by: Dan Doel on April 14, 2011 12:44 AM | Permalink | Reply to this

Re: Homotopy Type Theory, V

Sorry. Typo in the link above, and I don’t know how to edit my comment. You can find the source here.

Posted by: Eric Finster on April 13, 2011 4:30 PM | Permalink | Reply to this

Re: Homotopy Type Theory, V

I think you’ve got the definition of composition exactly right, and yes, I think what’s missing to make S 3S_3 typecheck is definitely an associator.

For Dan and any other type-theorists who would like some help guessing what S 3S_3, S 4S_4, etc. are going to be, their elements are supposed to be pictures of simplices in the given type AA.

  • elements of S 0S_0 are 0-simplices, aka points: elements of AA.

  • elements of S 1S_1 are 1-simplices, aka intervals: two elements of AA connected by a path.

  • elements of S 2S_2 are 2-simplices, aka triangles: three paths in AA connecting three points in pairs, plus a path-of-paths lying in the middle (relating the composite of two of the paths to the third one).

  • elements of S 3S_3 are 3-simplices, aka tetrahedra: four triangles relating different trios of six paths that connect four points in all possible pairings, together with a path-of-paths-of-paths filling the center of the tetrahedron.

and so on.

Posted by: Mike Shulman on April 13, 2011 5:01 PM | Permalink | PGP Sig | Reply to this

Re: Homotopy Type Theory, V

Indeed, each type should give rise to a Kan complex and the category of types/contexts to a quasi-category. The idea has certainly occurred to people: Peter Lumsdaine and I have talked about (but not finished) one such construction, and Andre’ Joyal sketched a different one at Oberwolfach. It would be very nice to have it done – but no one has really done it yet. Have at it.

Posted by: steve Awodey on April 13, 2011 3:08 AM | Permalink | Reply to this
Read the post Axioms for Infinitesimal Cohesion
Weblog: The n-Category Café
Excerpt: Simple homotopy theoretic axioms for differential geometry/cohomology with explicit (synthetic) infinitesimals.
Tracked: April 12, 2011 9:02 PM

Post a New Comment