nLab internal category in homotopy type theory

Contents

Context

Category theory

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logiccategory theorytype theory
trueterminal object/(-2)-truncated objecth-level 0-type/unit type
falseinitial objectempty type
proposition(-1)-truncated objecth-proposition, mere proposition
proofgeneralized elementprogram
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
cut elimination for implicationcounit for hom-tensor adjunctionbeta reduction
introduction rule for implicationunit for hom-tensor adjunctioneta conversion
logical conjunctionproductproduct type
disjunctioncoproduct ((-1)-truncation of)sum type (bracket type of)
implicationinternal homfunction type
negationinternal hom into initial objectfunction type into empty type
universal quantificationdependent productdependent product type
existential quantificationdependent sum ((-1)-truncation of)dependent sum type (bracket type of)
equivalencepath space objectidentity type/path type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
completely presented setdiscrete object/0-truncated objecth-level 2-type/set/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels

semantics

Contents

Idea

One may consider internal categories in homotopy type theory. Under the interpretation of HoTT in an (infinity,1)-topos, this corresponds to the concept of a category object in an (infinity,1)-category. The general idea is presented there at Homotopy Type Theory Formulation.

For internal 1-categories in HoTT (as opposed to more general internal (infinity,1)-categories) a comprehensive discussion was given in (Ahrens-Kapulkin-Shulman-13).

In some literature, the “Rezk-completeness” condition on such categories is omitted from the definition, and categories that satisfy it are called saturated or univalent.

Similarly to the univalence axiom we make two notions of sameness the same. This leads to some nice concequences.

Definition

In homotopy type theory, there are two notions of “sameness” for objects of a precategory. On one hand we have an isomorphism between objects aa and bb, on the other hand we have equality of objects aa and bb.

There is a special kind of category called a univalent category where these two notions of equality coincide and some very nice properties arise.

Lemma

If AA is a category and a,b:Aa,b:A, then there is a map

idtoiso:(a=b)(ab)idtoiso : (a=b) \to (a \cong b)

Proof

By induction on identity, we may assume aa and bb are the same. But then we have 1 a:hom A(a,a)1_a:hom_A(a,a), which is clearly an isomorphism. \square

The inverse of idtoisoidtoiso is denoted isotoidisotoid.

Examples

Note: All categories given can become univalent via the Rezk completion.

  • There is a category Set\mathit{Set}, whose type of objects is SetSet, and with hom Set(A,B)(AB)hom_{\mathit{Set}}(A,B)\equiv (A \to B). Under univalence this becomes a category. One can also show that any category of set-level structures such as groups, rings topologicial spaces, etc. is also univalent.

  • For any 1-type XX, there is a univalent category with XX as its type of objects and with hom(x,y)(x=y)hom(x,y)\equiv(x=y). If XX is a set we call this the discrete category on XX. In general, we call this a groupoid.

  • For any type XX, there is a category with XX as its type of objects and with hom(x,y)x=y 0hom(x,y)\equiv \| x= y \|_0. The composition operation

    y=z 0x=y 0y=z 0\|y=z\|_0 \to \|x=y\|_0 \to \|y=z\|_0

    is defined by induction on truncation from concatenation of the identity type. We call this the fundamental groupoid of XX.

  • There is a category whose type of objects is 𝒰\mathcal{U} and with hom(X,Y)XY 0hom(X,Y)\equiv \| X \to Y\|_0, and composition defined by induction on truncation from ordinary composition of functions. We call this the homotopy category of types.

Properties

Lemma

In a univalent category, the type of objects is a 1-type.

Proof

It suffices to show that for any a,b:Aa,b:A, the type a=ba=b is a set. But a=ba=b is equivalent to aba \cong b which is a set.

There is a canonical way to turn a category into a univalent category via the Rezk completion.

References

General

The relation between Segal completeness (now often “Rezk completeness”) for internal categories in HoTT and the univalence axiom had been pointed out in

A comprehensive discussion for 1-categories then appeared in:

Exposition:

Implementation in Coq:

Coq code formalizing this includes the following:

Generalization to (n,1)-categories is discussed in

and, by different means, in

Formalization of bicategories:

Lemmas and proofs are taken from

By coinduction

A formalization in HoTT-Agda of general (n,r)-categories for n,r{}n,r \in \mathbb{N} \sqcup \{\infty\}, defined as coinductive types of infinity-graphs, with operations defined by induction-coinduction, is implemented in


Last revised on June 21, 2022 at 01:21:19. See the history of this page for a list of all contributions to it.