TL;DR
This paper develops a dependent type theory that models weak {}-categories, generalizing previous definitions and providing a formal, canonical framework with an implemented proof system.
Contribution
It introduces a type-theoretical framework for weak {}-categories based on globular presheaves and coherators, with a canonical characterization of pasting schemes and an implementation.
Findings
Provides a formal type-theoretical model of weak {}-categories.
Defines pasting schemes as derivable contexts within the type theory.
Includes an implemented proof system for the proposed framework.
Abstract
We introduce a dependent type theory whose models are weak {\omega}-categories, generalizing Brunerie's definition of {\omega}-groupoids. Our type theory is based on the definition of {\omega}-categories given by Maltsiniotis, himself inspired by Grothendieck's approach to the definition of {\omega}-groupoids. In this setup, {\omega}-categories are defined as presheaves preserving globular colimits over a certain category, called a coherator. The coherator encodes all operations required to be present in an {\omega}-category: both the compositions of pasting schemes as well as their coherences. Our main contribution is to provide a canonical type-theoretical characterization of pasting schemes as contexts which can be derived from inference rules. Finally, we present an implementation of a corresponding proof system.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
A Type-Theoretical Definition
of Weak -Categories
Eric Finster
Samuel Mimram
École Polytechnique
91192 Palaiseau France
Abstract
We introduce a dependent type theory whose models are weak -categories, generalizing Brunerie’s definition of -groupoids. Our type theory is based on the definition of -categories given by Maltsiniotis, himself inspired by Grothendieck’s approach to the definition of -groupoids. In this setup, -categories are defined as presheaves preserving globular colimits over a certain category, called a coherator. The coherator encodes all operations required to be present in an -category: both the compositions of pasting schemes as well as their coherences. Our main contribution is to provide a canonical type-theoretical characterization of pasting schemes as contexts which can be derived from inference rules. Finally, we present an implementation of a corresponding proof system.
I Introduction
I-A Weak -categories
In a strict -category, the axioms are designed to ensure that the composite of any collection of composable cells is uniquely defined. Whichever way we choose to compute this composite will always give rise to the same result. For instance, if we consider the situation where we have three sequentially composable cells, this forces composition to be associative. In a weak -category, our goal is to achieve a similar uniqueness, but without resorting to equality: two compositions of -cells should be related by an -cell (which should be unique up to -cells, etc.). We now have coherence cells, which themselves should have coherence cells, etc.
Achieving a reasonable definition of weak -categories is not an easy task. Many proposals now exist, each with its own geometric flavor and collection of techniques. Often these techniques pass through sophisticated categorical machinery, and making practical use of the definition can be challenging. In this paper, we take up the definition proposed by Grothendieck [9] for -groupoids (categories in which every cell is invertible), and later simplified and extended to a definition of -categories by Maltsiniotis [13]. This definition was studied in detail in Ara’s thesis [2] (who showed that it is equivalent to Batanin’s definition using contractible operads [3]). The first difficulty overcome by this proposal is the definition of what it means for a collection of cells to be “composable” via the introduction of what we will refer to as pasting schemes in what follows. From here, the definition mainly consists in formally iteratively adding composites for such pasting schemes while preserving previously defined compositions (although there are, of course, some subtleties here). Note that contrary to the usual, explicit definitions of low-dimensional weak -categories (e.g. bicategories or tricategories) which insist on having compositions generated by binary and nullary (identity) compositions, this definition is “unbiased” in the sense that compositions of all reasonable shapes are taken as primitive operations.
I-B A type-theoretical definition
The goal of this article is to reformulate this definition in type-theoretic terms, which is to say to present a type theory such that the (set-theoretic) models of the theory should be precisely weak -categories. The idea of formulating -categories in type theory dates back to Cartmell [6]. More recently, in his thesis [5], Brunerie has introduced a type-theoretical definition of weak -groupoids, with the aim of showing that types in homotopy type theory possess such a structure (see also [11, 17, 1] for other work in this direction). In this article, we generalize and extend his work in order to give a definition for -categories. The main contribution here is to characterize pasting schemes in type theory, a step which is not required for defining -groupoids.
There are a number of reasons why one might seek such a reformulation. First, it provides us with a syntax for -categories which can be quite convenient in practice: in particular, one can give meta-theoretic proofs by induction on the structure of terms. Second, it has didactic merits: our definition consists in only a few inference rules, and should be comprehensible to anyone with some experience in logic or type systems. That is, we keep the categorical prerequisites to a minimum. Third, it is compact lending itself to concrete computations. Finally, it is mechanizable meaning that one can give a typechecking algorithm for determining if a given term is a valid coherence in an -category. To our knowledge there are only two such tools for checking proofs in higher categories. The first one is Opetopic [8], based on opetopic categories, coming with a very different definition and tools. The second one is Globular [18], based on the theory of semi-strict categories. While this theory allows for much shorter proofs and has a very nice graphical interface for constructing them, a complete set of axioms which should be satisfied in high-dimensions is not known yet (not even whether there is a reasonable such set of axioms); on the other hand, our tool is based on a firm theory, but requires significantly more small-step manipulations in the proofs.
I-C Plan of the paper
We begin by introducing a type-theoretical definition of globular sets (Section II), then characterize and study pasting schemes among them (Section III) and use those to define weak -categories (Section IV). We finally briefly present an implementation (Section V) and conclude (Section VI).
The authors would like to thank Dimitri Ara for his helpful discussions on the topic of this paper. This work was supported by the CATHRE ANR grant ANR-13-BS02-0005-02.
II A type theory for globular sets
Before proceeding to the complete definition of -categories, we introduce first in this section a type theory whose models are precisely globular sets, see also [11, 17]. This simpler theory contains only the context and type formation rules, but we present it here and study it in detail in order to make our work easier when considering the complete system in Section IV.
II-A Globular sets
The definition of -categories which concerns us here is based on the notion of globular set. A globular set may be seen as an higher-dimensional generalization of a (directed) graph, consisting not only of edges, but of edges between edges and so on.
Definition 1**.**
A globular set consists of a family of sets together with two families of maps indexed by such that
[TABLE]
for every . A morphism between globular sets and consists of a family of functions such that and for every . We write for the resulting category.
In a globular set , the elements of are called -cells (cells whose dimension is ) and the functions and respectively associate to an -cell its source and target -cell. We say that a cell is top-dimensional when it is neither the source nor the target of another cell. We sometimes write for the iterated source function. The iterated target function, , is defined similarly.
The set of all cells of a globular set is denoted and the cardinal of is that of . We say that is finite when is finite, or equivalently when is finite for any and there is such that for every . The full subcategory on finite globular sets is denoted .
Example 2*.*
The diagram
\textstyle{x\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{f}$$\scriptstyle{g}$$\scriptstyle{\phantom{\alpha}\Downarrow\alpha}$$\textstyle{y}$$\textstyle{\ignorespaces\ignorespaces\ignorespaces\ignorespaces z}$$\scriptstyle{h}
depicts the globular set with , , and for , with , , , , etc.
Equivalently, the category of globular sets can be defined as the category of presheaves over the category whose objects are integers and morphisms are generated by , for , subject to relations which are dual of (1). As with any presheaf category, we are provided with the Yoneda embedding . Given an object , we write and call it the -disk: its set of -cells is for , for and otherwise:
[TABLE]
We also write (resp. ) for the canonical inclusion of an -disk as the source (resp. target) of an -disk.
Equivalently, globular sets can also be defined coinductively:
Definition 3**.**
A globular set consists of a set together with, for all elements , a globular set .
II-B Syntactic constructions
We suppose fixed an infinite countable set of variables . A term in the theory will always be a variable in this section. (The distinction between terms and variable will become meaningful starting from Section IV). A substitution is a list
[TABLE]
of terms , the empty substitution being denoted . The types are defined inductively as being either
[TABLE]
where is a type and and are terms. A context is a list
[TABLE]
of pairs consisting of a variable and a type , what we sometimes write , the empty context being denoted .
Definition 4**.**
The dimension of a type is the natural number defined inductively by
[TABLE]
Given a context , its dimension is .
The reader will observe that these definitions are standard for the construction of a dependent type theory. We would like, however, to emphasize the geometric intuition that this syntax naturally captures, specifically, that of a finite globular set: a variable corresponds to a cell and its type indicate its dimension (namely, ) as well as its source and its target. For instance, a variable corresponds to a [math]-cell and a variable corresponds to a -cell whose source is and target is .
Definition 5**.**
The set of free variables is defined
- •
on terms by
[TABLE]
- •
on substitutions by
[TABLE]
- •
on types by
[TABLE]
- •
on contexts by
[TABLE]
II-C Typing rules
As usual in dependent type theories, we consider four different kinds of judgments whose informal interpretation is the following:
- •
means is a context,
- •
means is a type in context ,
- •
means has type in context ,
- •
means that is a substitution of type in context .
A judgment holds when it is derivable using the following inference rules, which we call the globular type theory.
II-C1 Rules for types
[TABLE]
II-C2 Rules for terms
[TABLE]
where we suppose in the second rule
II-C3 Rules for contexts
[TABLE]
where we suppose in the second rule
II-C4 Rules for substitutions
[TABLE]
The notation for the application of substitutions is explained in next section.
Lemma 6**.**
The following can be shown.
- •
If holds then holds.
- •
If holds then holds.
- •
If holds then .
- •
*If holds then , with . *
Finally, the following lemma allows us to identify derivable judgments and their derivations.
Lemma 7**.**
A judgment can be derived in at most one way.
II-D Substitutions
Consider a context and a substitution such that holds. In this case, we necessarily have . Given a type we write for the type obtained from by replacing each variable by the term ; given a term , the term is defined similarly. More formally, we have
[TABLE]
on types, and
[TABLE]
on terms. Application of substitutions is compatible with typing:
Lemma 8**.**
The following rule is admissible:
[TABLE]
Given another substitution such that holds, we write for the composite substitution
[TABLE]
and given a context , the associated identity substitution is
[TABLE]
Lemma 9**.**
The following rules are admissible
[TABLE]
Moreover, composition is associative and admits identities as neutral elements.
II-E The syntactic category
We are now in position to define the category generated by this type theory.
Definition 10**.**
The syntactic category associated to this theory is the category whose
- •
objects are contexts such that holds,
- •
morphisms are substitutions such that holds.
The following proposition shows that, in fact, contexts can be considered as a notation for finite globular sets.
Proposition 11**.**
The category is equivalent to the category .
Proof.
We construct a functor as follows. Given a context , we define to be the globular set with (the second component ensures that two different instances of a variable in gives rise to two distinct cells). Given an -cell , the type of is of the form and we define its source and target as and . The fact that the globular identities (1) hold can be shown by induction on the derivation of .
Suppose given a morphism with and . The substitution is of the form and for every index with there is an index with such that . We then define . In order to formally account for the case where a same variable occurs multiple times in , this definition should in fact be performed by induction on the derivation of , in the expected way. By a similar induction, the morphism can be shown to be a morphism of globular sets.
The functor is faithful since a substitution can be recovered from : we have . The functor is also full since for any morphism , the substitution defined as previously can be shown to be such that holds, by induction on . Finally, the functor is essentially surjective: given a globular set and an enumeration of all cells compatible with dimensions (i.e. a total ordering of cells such that implies ), is isomorphic to the image of the context where if is a [math]-cell, and if is an -cell with and . ∎
Example 12*.*
The context corresponding to the globular set of Example 2 is
[TABLE]
Other contexts also correspond to this globular set (for instance the one obtained by permuting and ), but they are isomorphic to this one. The substitution corresponding to the only morphism
[TABLE]
is .
II-F Models
Let us briefly recall the notion of model for a dependent type theory in categories with families [7]. The category has families of sets as objects (the set is called the base and the set the fiber over ) and a morphism consists in functions and .
A category with families (or cwf) consists of a category together with a functor
[TABLE]
Given an object of , we write
[TABLE]
i.e. for the base of and for the fibers. Similarly, given a morphism in , we write and for the functions constituting its image. The category should moreover satisfy the following axioms: it should have a terminal object and a context comprehension operation which to an object of and an element associates an object , a morphism and an element , in a way such that for every morphism object , morphism and element there is a unique morphism such that and . A morphism between cwfs and consists of a functor and a natural transformation , preserving the terminal object and context comprehension on the nose. Given two morphisms and , a 2-morphism is a natural transformation such that .
Typically, the syntactic category is canonically a cwf when equipped with the functor such that for a context , we have the set of types such that and the set of terms such that (thus the notations above). The category is also canonically a cwf with the functor which to a set associates the family with being the collection of functions with as codomain and being the set of sections of .
A model of the globular type theory is a morphism of cwfs for some cwf . A set-theoretic model is a model where .
Proposition 13**.**
The category of set-theoretic models of is equivalent to the category .
III Pasting schemes
The main contribution of this article is to provide a simple description of pasting schemes, encoding a collection of composable cells. For instance, in a -category, we expect the diagram
[TABLE]
to give rise to a unique composite (it does not depend on the order in which the morphisms are pairwise composed), but diagrams such as
[TABLE]
are not expected to be composed. A formal description of these pasting schemes in higher dimensions is not easy. It was achieved, in the globular setting, by Grothendieck [9] using abstract categorical techniques and studied combinatorially by Batanin [3].
Example 14*.*
The following diagram is a pasting scheme in a - (or higher-) category:
[TABLE]
The pasting scheme above corresponds to a globular set, which can be obtained as the following colimit of disks, where the dotted arrows correspond to the obvious monomorphisms of globular sets:
[TABLE]
that is, to the colimit of the diagram
[TABLE]
of globular sets. The idea of Grothendieck’s definition [9] is that pasting schemes are precisely diagrams which can be obtained by such colimits, which are called globular sums. Our presentation given below is largely inspired of the work of Maltsiniotis [13] and Ara [2].
III-A Globular extensions
A globular category consists of a category together with a functor , i.e. it is a category equipped a notion of “disk”: we write for the image of and denote in the same way the morphisms in and their image. A morphism of is globular when it is the image of one in . A globular sum is the colimit of a diagram of the form
[TABLE]
in , with (the diagram cannot be empty). A globular category is a globular extension when all globular sums exist. The category of globular extensions is the subcategory of the slice category whose objects are globular extensions and morphisms are functors preserving globular sums.
By definition, there is a forgetful functor , sending a globular extension to the underlying globular category, which admits a left (2-)adjoint. In particular, there is a free globular extension on the globular category given by the identity functor : this category is called (and we have a functor ). Alternatively, it can be characterized as follows:
Definition 15**.**
The globular extension is the one such that for every globular extension there exists a morphism of globular extensions , which is unique up to isomorphism.
Intuitively, the category is the category obtained by considering formal disks and freely completing it under globular sums. Its objects thus correspond to pasting schemes, but we restrict this terminology to the alternative description of those objects as globular sets, given in next section.
III-B Pasting schemes
We now recall the more usual description of pasting schemes. As for any presheaf category (see [12]) the category of globular sets is the free cocompletion of the category , meaning that it is cocomplete and that for any functor , where is a cocomplete category, there exists a unique (up to isomorphism) functor which preserves colimits and makes the diagram
[TABLE]
commute, where is the Yoneda embedding. Note that this functor makes into a globular category. Since the category is only required to have globular sums (and not all colimits), we can expect to recover as a full subcategory of consisting of globular sums of representables:
Proposition 16** ([2, Proposition 2.2.1]).**
The category is the full subcategory of whose objects are globular sums of representables.
The globular sets which are the objects of , as described by the above proposition, are called pasting schemes.
Example 17*.*
The globular set corresponding to Example 14 is the globular set with
[TABLE]
and for , with source and targets as indicated on the figure.
Finally, we recall how the source and target of a pasting scheme can be described, see [13] for details.
Definition 18**.**
Suppose given a pasting scheme , which can be obtained as a globular sum of the form (2). Given an integer , its -boundary is the colimit of the diagram obtained from (2) by replacing each object (resp. ) by (resp. ). Moreover, there are two canonical morphisms exhibiting as the source and target of respectively.
Example 19*.*
Consider the following pasting scheme :
[TABLE]
Its -source and -target are respectively
[TABLE]
(both are , and are in particular isomorphic, but the different namings make clear the respective inclusions and ) and its [math]-source and [math]-target are respectively and .
III-C A characterization
We now introduce a characterization of pasting schemes, which is apparently new and turns out to be very convenient to work with in the following. First, note that since pasting schemes are finite colimits of disks, which are finite globular sets, and colimits are computed pointwise, we have
Lemma 20**.**
Pasting schemes are finite globular sets, i.e. is a full subcategory of .
We now introduce a relation which expresses when a cell is “before” another in a globular set. Similar relations have already been considered before, e.g. for pasting schemes [15].
Definition 21**.**
Given a globular set , we define the relation on its set of cells as the transitive closure of the relation such that for every -cell one has
[TABLE]
Example 22*.*
In the globular set of Example 14 (see Example 17), the relation is
[TABLE]
Example 23*.*
In the globular set of Example 2 (which is not a pasting scheme), the relation is
[TABLE]
(a partial order with as maximal element).
Example 24*.*
The relation on the globular set is
[TABLE]
Clearly, the relation is preserved by morphisms:
Lemma 25**.**
For every morphism of globular sets and cells such that , we have .
Theorem 26**.**
The pasting schemes are the non-empty finite globular sets which are -linear, meaning that for every cells ,
[TABLE]
This condition is equivalent to the reflexive closure of being a total order on the cells of .
Proof.
We first show that the pasting schemes satisfy the linearity condition, by recurrence on , the number of peaks in a diagram (2) whose colimit is the pasting scheme. We also show inductively that, if we call the colimit and the canonical arrow we have that the successors wrt of in are precisely
[TABLE]
where denotes the top-dimensional cell of : intuitively, this cell has its successors unchanged after applying , or equivalently its only successors are its iterated target faces. When the pasting scheme is a disk , the -linearity condition is satisfied, see Example 24, and the canonical colimiting arrow is the identity and thus satisfies (4). Otherwise, suppose given a diagram (2). Since this diagram is finite, connected and simply connected, its colimit can be computed using iterated pushouts [14]. We thus obtain a diagram of the form
[TABLE]
We thus consider the colimit of the subdiagram obtained by excluding and , with colimiting cocone formed by the morphisms . By induction hypothesis, the set is -linear and satisfies (4). The globular sum we are interested in is the pushout of and . Because of the order (3) of , one easily shows that the effect of the pushout is to “insert” the cells
[TABLE]
of in (4) between and , from which one concludes that the resulting globular set is -linear and (4) is satisfied.
Conversely, suppose given a -linear finite globular set . We write for the top-dimensional elements of in the order given by , i.e. . As any presheaf, can be obtained as the colimit of representables [12]:
[TABLE]
where denotes the category of elements of . A careful examination of this diagram shows, by recurrence on , that this colimit is the same as the one of the globular sum of the form (2), where is then dimension of the top-dimensional cell and is the greatest integer such that (such an integer necessarily exists because and are consecutive top-dimensional elements wrt ). ∎
Example 27*.*
From Example 22 (resp. 23), one sees that the globular set of Example 14 (resp. 2) is a pasting scheme (resp. not a pasting scheme).
Example 28*.*
To illustrate the first part of the proof, in the case of the globular sum of Example 14, the linear orders obtained by iteratively computing the colimit using pushouts are
[TABLE]
This result enables one to immediately draw some interesting consequences:
Lemma 29**.**
A morphism between pasting schemes is necessarily a monomorphism and the only automorphism of a pasting scheme is the identity.
Proof.
Suppose given a morphism between pasting schemes and consider two cells such that . If then, by Theorem 26, or and by Lemma 25 on has , which is excluded by Theorem 26. This argument is the reason why we did not define as a preorder, i.e. close it under reflexivity. The other property uses similar arguments. ∎
III-D Batanin trees
In order to make a connection with other works on the subject, we briefly recall here another representation of pasting schemes as trees introduced by Batanin [3]. The correspondence with pasting schemes is detailed in [4, 2], we recall it here in order to explain why the linear ordering of cells was to be expected. In this section, we consider finite planar rooted trees:
Definition 30**.**
A tree consists of a family of sets , whose elements are called -vertices, together with a family of functions and a total order on the set of children of , for any vertex , such that is a singleton and is finite.
Given a vertex , we write
[TABLE]
for the totally ordered set extended with a new minimal element and a new maximal element . A sector of consists in two consecutive elements of . To any tree , one can associate a finite globular set whose -cells are the sectors associated to its -vertices. The source of a sector of is the sector of , where is the preceding element of in ; targets are defined similarly.
By suitably defining the morphisms between trees (which is slightly more involved than one might expect), this operation extends to a functor from the category of trees to the category of pasting schemes, which can be shown to be an equivalence, i.e. pasting schemes can be represented as trees:
Proposition 31** ([4, 2]).**
The category is equivalent to the category of trees and suitable morphisms.
Example 32*.*
Consider the tree with , , , and :
[TABLE]
We have figured the sectors in small letters. For instance, the sectors associated to are and the one associated to is . The globular set is precisely the pasting scheme of Example 14. The order on cells
[TABLE]
is precisely the list of sectors encountered if we draw a line around the tree starting from the bottom left (think of a child drawing the contour of his hand).
This “duality” between trees and pasting schemes was nicely explained by Joyal in [10] where he additionally introduces a generalization of the category .
III-E A type-theoretic definition of pasting schemes
We have seen in Proposition 11 that contexts correspond to finite globular sets. Our aim is now to characterize those contexts which correspond to pasting schemes in a type-theoretic fashion, that is to say, using a system of inference rules. It turns out that this characterization yields canonical forms for pasting schemes: we have seen in Example 12 that multiple (isomorphic) contexts may correspond to a same pasting scheme, but our definition singles out exactly one. Our main tool is the linear order studied in Section III-C. The reader will notice, however, that this order does not give rise to a well formed context. For instance, consider the pasting scheme on the left below, whose relation is shown in the middle:
[TABLE]
A direct translation of this order as a “context” is shown on the right, but it is not a well-formed context since the variable has to be declared before whose type involves . We will therefore use another enumeration of the cells and the associated context will in fact be
[TABLE]
Note that would be another sensible representation for the pasting scheme, but our typing rules will only accept the first one.
We add two new kinds of judgments to our type theory:
- •
means is a context which is a pasting scheme,
- •
means is a partial pasting scheme (one which is being constructed), with as “free output”.
The rules for showing that a context is a pasting scheme are the following ones:
[TABLE]
[TABLE]
where on the bottom left we suppose . In the first line, the first rule allows one to conclude that a partial pasting scheme is in fact a pasting scheme, whereas the second one allows one to start constructing a pasting scheme with one [math]-cell. In the second line, the first rule allows one to attach a new cell to a pasting scheme, and the second rule to drop the possibility of attaching a cell to . A context such that holds is called a ps-context. Observe that every ps-context is of odd length.
Example 33*.*
The context corresponding to the pasting scheme
[TABLE]
is derived as follows:
[TABLE]
Graphically, it corresponds to constructing the pasting scheme in the following way
[TABLE]
Also, note that the variables occurring on the right precisely do so in the order when read from top to bottom:
[TABLE]
Finally, in Figure 1, we have figured for each sequent the relation (the height of each cell corresponding to its dimension), with the cell underlined.
Lemma 34**.**
Given a context such that holds, also holds.
Lemma 35**.**
There is at most one way to show a statement of the form or .
Previous example should make it clear that there is a tight correspondence between type ps-contexts and pasting schemes as previously defined. First note that in a ps-context, there is no variable clash:
Lemma 36**.**
In a ps-context , for every variables and such that we have .
For this reason, when associating a globular set to a ps-context , we can proceed in a simpler way than in the proof of Proposition 11 and define (no need to rename variables), which we will do in the following.
Proposition 37**.**
There is a bijection between pasting schemes which are such that the sets are disjoint subsets of the variables and ps-contexts.
Proof.
Suppose given a context such that holds. We can show by induction on its proof that for every sequent , the globular set associated to it is -linear and the cell corresponding to has its iterated targets as only greater elements wrt .
Conversely, suppose given a globular set satisfying the hypothesis, with cells such that . We can construct by recurrence on the length of a prefix of size (with ) a derivation of the form such that is the subcomplex of generated by (i.e. obtained by taking the closure under faces of this set).
Finally, the two operations can be checked to be mutually inverse. ∎
From this, we finally deduce:
Theorem 38**.**
The category is equivalent to the full subcategory of whose objects are pasting schemes.
Remark 39*.*
Note that, in fact, we have a tighter correspondence than an equivalence of categories since pasting schemes up to isomorphism are in bijection with ps-contexts up to -equivalence (as opposed to isomorphism), i.e. renaming of variables. Moreover, one can construct a variable-free presentation of the sequent calculus (using De Bruijn indices) which entirely removes the need for -equivalence.
III-F Boundaries
We now explain how to compute boundaries (see Definition 18) of ps-contexts. This is defined as a “meta-operation” on contexts.
Definition 40**.**
Given , we define the -source of a context as and as
[TABLE]
and the -target by , and as
[TABLE]
where is with the last element removed. By convention, we write
[TABLE]
Proposition 41**.**
Given a ps-context and , the contexts and are ps-contexts. Moreover, they correspond to Definition 18, in the sense that
[TABLE]
and the canonical inclusions and are respectively and .
III-G A non-canonical definition
To further emphasize the fact that the previous characterization of ps-contexts is canonical in the sense that each pasting scheme has a unique derivation, we provide here a second type theoretical characterization of pasting schemes which lacks this property.
We now consider judgments of the form
[TABLE]
The main modification wrt the previous definition is that is a context, i.e. we have a choice of multiple “free outputs”, whereas we only had one before. The rules are
[TABLE]
[TABLE]
where, in the last rule, and are fresh in .
Proposition 42**.**
For every context such that is derivable is a pasting scheme and conversely every pasting scheme is isomorphic to one of this form.
Proof.
In a derivation of , we can permute rules so that it corresponds (up to bookkeeping) to a derivation in the sense of Section III-E. ∎
The following example shows that there is however not a canonical ps-context associated to a pasting scheme with this variant.
Example 43*.*
The pasting scheme
[TABLE]
corresponds to both the contexts
[TABLE]
and
[TABLE]
for which we can derive that they are pasting schemes.
From a practical point of view, the main advantage of previous axiomatization of ps-contexts over this one is that it can be used to simply check whether a context is a pasting scheme or not, without having to provide a proof or run an complicated proof-search algorithm.
IV Weak -categories
In this section, we finally use our characterization of pasting schemes to give a type theoretic definition of weak -categories.
IV-A A type-theoretic definition of -groupoids
The basic idea in order to define an -category is that every pasting scheme should have a composition. We thus introduce a new family of terms to our syntax, called coherences, and denoted
[TABLE]
Each coherence is indexed by a context , a type and a substitution . Such a term should be thought of as a constant which takes a pasting scheme and produces a value of type , corresponding to its composition. The substitution corresponds to formally applying a substitution to it. By convention, we write instead of in the following, and we extend the rules for substitution (see Section II-D) by
[TABLE]
The free variables of a coherence are defined as
[TABLE]
Indeed, the coherence binds the variables of in . In practice, we will always have and thus . Note that, contrary to the situation in earlier sections, the addition of coherences means that terms are no longer necessarily variables, i.e. the distinction between the two syntactic classes is relevant.
Since, in an -category, one expects to have composites of all pasting schemes, a naive definition would simply assert their existence. For example, let us consider the consequences of the following rule:
[TABLE]
Remark 44*.*
The rule should in fact be written
[TABLE]
so that Lemma 8 still holds. Alternatively, one can add the rule of the lemma to the type theory. We will ignore this detail in what follows.
Example 45*.*
The following coherences are all derivable:
- •
Every object has an associated identity:
[TABLE]
- •
Every pair of composable morphisms have a composition:
[TABLE]
- •
There is a morphism witnessing that identities are neutral elements on the left (the left-unitor):
[TABLE]
where is a notation for the first derived coherence, and is a notation for the composite of and , defined using the second coherence. This morphism has a (weak) inverse:
[TABLE]
(this is an inverse only up to weakly invertible morphisms).
- •
Every triple of composable morphisms have a composition:
[TABLE]
- •
In fact, this system admits “partial composition” operations, ignoring some variables in the context. For instance, in a context as above, we can compose only and (and forget about ):
[TABLE]
- •
Every morphism admits a weak inverse:
[TABLE]
The last coherence should make it clear that the unrestricted composition rule above yields not a definition of an -category, but of an -groupoid. In fact, this definition is very close to Brunerie’s definition [5, Appendix A]: this is no accident since our work is largely inspired by his. The only difference between the two definitions of -groupoid is that Brunerie uses a more liberal notion of pasting scheme, which is called a contractible context, generated by the following rules:
[TABLE]
[TABLE]
where for the second one. As an illustration of the difference, the context
[TABLE]
is contractible but not a pasting scheme. We will see in next section that using our pasting schemes allows us to formulate a definition for -categories.
IV-B Type-theoretic definition of -categories
In order to characterize -categories, we will need to restrict the rule of the previous section in such a way that inverses are excluded, but such that all reasonable structural operations remain. In fact, the rule (5) will be replaced by two separate rules. Indeed, the “problem” with derivation of inverses (last point of Example 45) is that it exchanges source and target, so we add a side condition ensuring that this does not happen:
[TABLE]
whenever
[TABLE]
This rule allows one to derive all the “operations” required in an -category (e.g. composition and identities), but not their coherences (for instance, the witnesses for identity being a neutral element shown in previous section are not derivable). We therefore add another rule to compensate:
[TABLE]
whenever
[TABLE]
The side condition forbids “partial compositions”, which would allow for too many invertible operations otherwise (see previous section). With these two rules, we can derive the operations required to be present in an -category and only those. For instance, all the coherences of Example 45 can be derived excepting the last one. Some more practical illustrations are given in Section V.
Writing for the syntactic category (of contexts and substitutions) associated to the preceding type theory, with rules (6) and (7) for introducing coherences, we propose the following definition.
Definition 46**.**
An -category is a set-theoretic model of .
IV-C The Grothendieck-Maltsiniotis definition
In order to motivate our definition on the theoretical side, we briefly recall the Grothendieck-Maltsiniotis definition of -categories in next section and conjecture that it coincides with our definition, see [13] and [2] for details.
Fix a globular extension . A morphism in is algebraic when for every decomposition with globular, is an identity. From a proof-theoretic perspective, this means that cannot be obtained by non-trivially weakening another morphism , i.e. it “uses” all the cells in its source (requirements below that some morphisms should be algebraic will give rise to the side conditions of our rules). A pair of morphisms
[TABLE]
is parallel when implies
[TABLE]
A lifting for such a pair is a morphism such that and :
[TABLE]
A pair of parallel morphisms as above is admissible when either
there exist decompositions
[TABLE]
with and algebraic, or 2. 2.
and are algebraic.
The canonical coherator for -categories, written , is the colimit of the diagram of globular extensions
[TABLE]
where is the globular extension obtained from by formally adding a lifting for every admissible pair of arrows, and taking the globular extension freely generated by the resulting category (see Section III-A).
Definition 47** ([13]).**
An -category is a functor such that preserves globular sums.
The two rules (6) and (7) for introducing coherences in Section IV-B correspond precisely to formally adding lifting for admissible morphisms, with each rule corresponding to one of the conditions for being admissible. The details, however, are rather involved and left for future work.
Conjecture 48**.**
The category is equivalent to .
More precisely, we define the coherence depth of a term as the number of nested coherences, i.e. , , etc. Given , we conjecture that the subcategory of , with the same objects, morphisms being substitutions with coherence depth less than , is equivalent to . Finally, we conjecture that the situation wrt set-theoretic models described Section II-F generalizes as follows.
Conjecture 49**.**
*Type-theoretic -categories (Definition 46) correspond precisely to Grothendieck-Maltsiniotis -categories (Definition 47). *
V Implementation(s)
Since there are two authors for this paper, there are also two implementations of a type-checker for the theory. The first111https://github.com/ericfinster/catt is done in Haskell, following precisely the inference rules described in this article, while the other222https://github.com/smimram/catt is in OCaml and has some more experimental features (notably, the presence of implicit arguments making proofs much shorter but lacking theoretical justification for the moment). The second implementation may be tried online333https://smimram.github.io/catt.
In fact, our definition naturally lends itself to standard techniques for the implementation of a type checking algorithm for a dependent type theory, although in view of sparseness of the theory, these techniques appear in a rather simplified form. The Haskell implementation, for example, uses a simple bi-directional typechecking setup together with normalization by evaluation. Furthermore, while the theory lacks any notion of abstraction, the coherences are nonetheless assigned the type of a dependent product internally, allowing for substitution to propagate in the types. Indeed one sees immediately by inspection of the rules that each coherence can naturally be seen as a formal constant in the dependent product obtained by abstracting over all of the variables in the context (necessarily a pasting scheme) which defines it.
In our system, the user writes statements of the form
[TABLE]
and the typechecker automatically ensures that the judgment is derivable, or issues an error if it is not the case. In practice, coherences are written
[TABLE]
where allows the user to give a name to a coherence. Note that the order in which arguments are given is important, as it is used to determine whether the corresponding context is a ps-context or not. The arrow type is noted
[TABLE]
For instance, we can define identities on [math]-cells:
coh id (x : *) : * | x -> x ;
composition of -cells:
coh comp (x : *) (y : *) (f : * | x -> y) (z : *) (g : * | y -> z) : * | x -> z ;
left unitor:
coh unitl (x : *) (y : *) (f : * | x -> y) : * | x -> y | comp x x (id x) y f -> f ;
the “inverse” for left unitor:
coh unitl’ (x : *) (y : *) (f : * | x -> y) : * | x -> y | f -> comp x x (id x) y f ;
associativity of composition of -cells:
coh assoc (x : *) (y : *) (f : * | x -> y) (z : *) (g : * | y -> z) (w : *) (h : * | z -> w) : * | x -> w | comp x z (comp x y f z g) w h -> comp x y f w (comp y z g w h) ;
vertical composition of -cells:
coh vcomp (x : *) (y : *) (f : * | x -> y) (g : * | x -> y) (a : * | x -> y | f -> g) (h : * | x -> y) (b : * | x -> y | g -> h) : * | x -> y | f -> h ;
horizontal composition of -cells:
coh hcomp (x : *) (y : *) (f : * | x -> y) (g : * | x -> y) (a : * | x -> y | f -> g) (z : *) (h : * | y -> z) (k : * | y -> z) (b : * | y -> z | h -> k) : * | x -> z | comp x y f z h -> comp x y g z k ;
the exchange law:
coh ichg (x : *) (y : *) (f : * | x -> y) (g : * | x -> y) (a : * | x -> y | f -> g) (h : * | x -> y) (b : * | x -> y | g -> h) (z : *) (l : * | y -> z) (m : * | y -> z) (c : * | y -> z | l -> m) (n : * | y -> z) (d : * | y -> z | m -> n) : * | x -> z | comp x y f z l -> comp x y h z n | hcomp x y f h (vcomp x y f g a h b) z l n (vcomp y z l m c n d) -> vcomp x z (comp x y f z l) (comp x y g z m) (hcomp x y f g a z l m c) (comp x y h z n) (hcomp x y g h b z m n d) ;
Finally, and as expected, defining an “inverse” for an arbitrary -cell fails: the input
coh inv (x : *) (y : *) (f : * | x -> y) : * | y -> x ;
produces the following output:
Checking coherence: inv Valid tree context Src/Tgt check forced Source context: (x : *) Target context: (y : *) Failure: Source is not algebraic for y : *
meaning that the side conditions of the rule (6) are not fulfilled.
VI Conclusion and future work
We have presented a type theory designed to capture a well-known definition of -category, extending work on a similar definition for -groupoids. Most importantly, we have examined the relationship between pasting schemes represented as well-formed contexts, and their semantic counterparts (Batanin trees and globular sums). We conjecture that the models of this theory coincide with the definition of Maltsiniotis, but a detailed comparison will have to await further work.
We note also that the combinatorics of pasting schemes, as described by their -relation, seems promising. It quickly reminds one of the theory of Dyck words and we expect that interesting results can be obtained by applying similar methods.
Brunerie’s definition of -groupoids, upon which this work builds, was of course motivated by the view of types advocated in homotopy type theory. Since the introduction of homotopy type theory [16], many authors have wondered about the possibility of weakening the equality relation in order to obtain a theory in which types behave as categories or directed homotopy types. We feel that the theory presented in this paper serves as a small step in this direction, isolating the core system of coherences which one would like to have. In future work, we aim to see if other type theoretic constructions ( and types, for example) may be reasonably added to the theory, thus increasing its expressive power.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] T. Altenkirch and O. Rypacek, “A Syntactical Approach to Weak ω 𝜔 \omega -Groupoids,” in LIP Ics-Leibniz International Proceedings in Informatics , vol. 16. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2012.
- 2[2] D. Ara, “Sur les ∞ \infty -groupoïdes de Grothendieck et une variante ∞ \infty -catégorique,” Ph.D. dissertation, Université Paris Diderot, 2010.
- 3[3] M. A. Batanin, “Monoidal Globular Categories As a Natural Environment for the Theory of Weak n 𝑛 n -Categories,” Advances in Mathematics , vol. 136, no. 1, pp. 39–103, 1998.
- 4[4] C. Berger, “A cellular nerve for higher categories,” Advances in Mathematics , vol. 169, no. 1, pp. 118–175, 2002.
- 5[5] G. Brunerie, “On the homotopy groups of spheres in homotopy type theory,” Ph.D. dissertation, Université Nice Sophia Antipolis, Jun. 2016.
- 6[6] J. Cartmell, “Generalised algebraic theories and contextual categories,” Annals of Pure and Applied Logic , vol. 32, pp. 209–243, 1986.
- 7[7] P. Dybjer, “Internal type theory,” in International Workshop on Types for Proofs and Programs . Springer, 1995, pp. 120–134.
- 8[8] E. Finster, “Opetopic,” http://opetopic.net/ .
