Cat

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Category theory
+--{: .hide}
[[!include category theory - contents]]
=--
#### Categories of categories
+--{: .hide}
[[!include categories of categories - contents]]
=--
#### 2-category theory
+--{: .hide}
[[!include 2-category theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

**Cat** is a name for the [[category]] or [[2-category]] of all [[category|categories]].

This is also the archetypical [[2-topos]].

## Definition

To avoid set-theoretic problems related to [[Russell's paradox]], it is typical to restrict $Cat$ to [[small category|small categories]].  But see [[CAT]] for alternatives.

To be explicit, define **Cat** to be the category with:

* [[small category|small categories]] as [[object|objects]],
* [[functor|functors]] as [[morphism|morphisms]];

* composition of morphisms the evident composition of functors.

This is probably the most common meaning of $Cat$ in the literature.

We more often use **Cat** to stand for the [[strict 2-category]] with:

* [[small category|small categories]] as [[object|objects]],
* [[functor|functors]] as [[morphism|morphisms]].
* [[natural transformation|natural transformations]] as [[2-morphism|2-morphisms]].

Here the [[vertical composition]] of 2-morphisms is the evident composition of component maps of natural transformations, whereas the [[horizontal composition]] is given by their [[Godement product]].

Finally, we can use **Cat** for the [[bicategory]] with:

* [[small category|small categories]] as [[object|objects]],
* [[anafunctor|anafunctors]] as [[morphism|morphisms]].
* [[ananatural transformation|ananatural transformations]] as [[2-morphism|2-morphisms]].

To be really careful, this version of $Cat$ is an [[anabicategory]].

## Properties

### Cartesian closed structure

The category $Cat$, at least in its traditional version comprising small categories only, is [[cartesian closed]]: the [[exponential objects]] are [[functor categories]].  Direct proofs can be found in:

* p. 98 of [[Categories Work]], 2nd ed.
* remark below Definition 4.3.9 in [[Category Theory in Context]]
* [[Steve Awodey]], *Category Theory*, Second Edition, Sections 7.5-7.7.

A more indirect proof could proceed by identifying $Cat$ via the [[nerve]] construction as a [[reflective subcategory]] of [[sSet]], which is cartesian closed as it is a [[presheaf category]], and showing that this subcategory is an [[exponential ideal]].

### Size issues

As a $2$-category, $Cat$ could even include (some) [[large category|large categories]] without running into Russell's paradox.  More precisely, if $U$ is a [[Grothendieck universe]] such that $\Set$ is the category of all $U$-small sets, then you can define $\Cat$ to be the 2-category of all $U'$-small categories, where $U'$ is some Grothendieck universe containing $U$.  That way, you have $\Set \in \Cat$ without contradiction.  (This can be continued to [[higher category theory|higher categories]].)

By the [[axiom of choice]], the two definitions of $Cat$ as a $2$-[[2-category|category]] are [[equivalence of categories|equivalent]].  In contexts without choice, it is usually better to use anafunctors all along; if necessary, use $Str Cat$ for the strict $2$-category.  Even without choice, a functor or anafunctor between categories is an [[equivalence]] in the anabicategory $Cat$ iff it is [[essentially surjective functor|essentially surjective]] and [[full and faithful functor|fully faithful]].  However, the weak inverse of such a functor may not be a functor, so it need not be an equivalence in $Str Cat$.  We can regard $Cat$ as obtained from $Str Cat$ using [[homotopy theory]] by "formally inverting" the essentially surjective and fully faithful functors as [[weak equivalences]].

### Limits and colimits

\begin{remark}\label{OrdinaryLimitsAndColimits}
*(ordinary limits and colimits of categories)*
\linebreak
  The [[1-category]] [[Cat]] of [[small categories]] is [[bicomplete category|bicomplete]]:

1. The [[limit]] of a [[diagram]] $\mathcal{C}_{(-)} \,\colon\, I \to Cat$ is computed componentwise: the sets of objects and of morphisms of the limiting category $\underset{\longleftarrow}{\lim} F$ are the limits in [[Set]] of $Obj(\mathcal{C}_{(-)}) \,\colon\, I \to Set$ and of $Mor(\mathcal{C}_{(-)}) \,\colon\, I \to Set$, respectively, equipped with the universally induced structure maps.

1. The [[colimit]] of a [[diagram]] $\mathcal{C}_{(-)} \,\colon\, I \to Cat$ is on [[objects]] still the colimit of the underlying diagram of sets of objects, but on morphisms it is more complicated, since in the naive colimit of sets of morphisms some morphisms may become composable that were not composable before.

   An exception is the case of [[coproducts]] of categories, which are just given componentwise by [[disjoint union]]. With this, it is (by [this Prop](colimit#ColimitsInTermsOfCoequalizers)) sufficient that [[coequalizers]] of functors exist.

   Explicit formulas for coequalizers of categories are given in [Bednarczyk, Borzyszkowski & Pawlowski 1999, §4](#BednarczykBorzyszkowskiPawlowski99).

   Moreover, formulas for [[pushouts]] in [[Cat]] of injective functors are discussed in [MacDonald & Scull 2009](#MacdonalScull09).

\end{remark}

See also discussion at [MO:q/272479](https://math.stackexchange.com/q/272479/58526).

## Related concepts

* [[elementary theory of the category of categories]]

* [[canonical model structure on Cat]]

[[!include categories of categories - contents]]

## References

The structure of the [[2-category]] of categories ([[vertical composition]], [[horizontal composition]] and [[whiskering]] of [[natural transformations]]) was first described in:

* {#Godement58} [[Roger Godement]], Appendix (pp. 269) of: *Topologie algébrique et theorie des faisceaux*, Actualités Sci. Ind. **1252**, Hermann, Paris (1958) [[webpage](https://www.editions-hermann.fr/livre/topologie-algebrique-et-theorie-des-faisceaux-roger-godement), [[Godement-TopologieAlgebrique.pdf:file]]]

(towards the goal of describing the [[standard resolution]] of [[abelian sheaves]]).

Dedicated discussion in the spirit of [[formal category theory]]:

* {#Law66} [[William Lawvere]], *The Category of Categories as a Foundation for Mathematics*, pp. 1-20 in: [[Samuel Eilenberg|S. Eilenberg]], [[D. K. Harrison]], [[S. MacLane]], [[H. Röhrl]] (eds.): *[[Proceedings of the Conference on Categorical Algebra - La Jolla 1965]]*, Springer (1966) [[doi:10.1007/978-3-642-99902-4](https://doi.org/10.1007/978-3-642-99902-4)]

* [[John Gray]], _[[Adjointness for 2-Categories|Formal category theory: adjointness for 2-categories]]_, Lecture Notes in Mathematics, **391**, Springer (1974) [[doi:10.1007/BFb0061280](https://doi.org/10.1007/BFb0061280)]

See also most references at _[[category]]_ and at _[[category theory]]_, such as:

* [[Horst Schubert]], §3 in: *Categories*, Springer (1972) [[doi:10.1007/978-3-642-65364-3](https://doi.org/10.1007/978-3-642-65364-3)]

  > (with size issues dealt with via [[Grothendieck universes]])

* [[Saunders MacLane]], §II.5 of: *[[Categories for the Working Mathematician]]*, Graduate Texts in Mathematics **5** Springer (1971, second ed. 1997) [[doi:10.1007/978-1-4757-4721-8](https://link.springer.com/book/10.1007/978-1-4757-4721-8)]

  > (size issues ignored by considering only the category of [[small categories]])

On [[colimits]] in the [[1-category]] of small categories:

[[coequalizers]]:

* {#BednarczykBorzyszkowskiPawlowski99} [[Marek A. Bednarczyk]], [[Andrzej M. Borzyszkowski]], [[Wieslaw Pawlowski]], Section 4 of: *Generalized congruences -- epimorphisms in $\mathcal{C}at$*, Theory and Applications of Categories **5** 11 (1999) 266-280 [[tac:5-11](http://www.tac.mta.ca/tac/volumes/1999/n11/5-11abs.html), [dml:120226](https://eudml.org/doc/120226?lang=fr&limit=5)]

certain [[pushouts]]:

* {#MacdonalScull09} [[John MacDonald]], [[Laura Scull]], _Amalgamations of categories_, Canad. Math. Bull. **52** 2 (2009) 273–284 [[pdf](http://faculty.fortlewis.edu/Scull_L/pushouts.pdf), journal:[pdf](https://www.cambridge.org/core/services/aop-cambridge-core/content/view/A414F5D3FA9FB08ACBBB72143C70FE28)]

Proof that the [[funny tensor product]] of [[categories]] is the only other [[symmetric closed monoidal category|symmetric closed monoidal structure]] on [[Cat]] besides the [[cartesian monoidal category|cartesian monoidal structure]]:

* {#FoltzLairKelly80} [[François Foltz]], [[Christian Lair]], [[G. M. Kelly]], *Algebraic categories with few monoidal biclosed structures or none*, Journal of Pure and Applied Algebra **17** 2 (1980) 171-177 [[pdf](https://core.ac.uk/download/pdf/82322397.pdf), doi:10.1016/0022-4049(80)90082-1]

category: category

[[!redirects category of categories]]
[[!redirects 2-category of categories]]


cat 2-group > history

< [[cat 2-group]]
[[!redirects cat 2-group -- history]]


CAT(X) > history

< [[CAT(X)]]


cat-1-group

#Idea#
Although just another way of writing down the axioms of a strict [[2-group]], the form of specification used for $cat^1$-groups, and, adapted for [[cat-n-group]]s, is very useful as it is in purely group theoretic terms and so is often easier to check than the more categorically phrased version, for instance, in deriving a $cat^1$-group structure from a [[simplicial group]], or a $cat^n$-group structure from an $n$-fold simplicial group.

The inclusion of this entry is to help the user move between the various forms used in the literature: see references below.

#Definition#

A **$cat^1$-group** is a triple, $(G,s,t)$, where
$G$ is a group and $s,t$ are [[endomorphism]]s of $G$ satisfying conditions

1. $s t = t$ and $t s = s$.

1. $[Ker\,s, \,Ker\,t ] = 1$ (where $[Ker\,s, \,Ker\,t ]$ is the group generated by the commutators $[x, y] =xyx^{-1} y^{-1}, x \in Ker\,s, y \in Ker\,t$)

#Discussion#

A cat$^1$-group is just a reformulation of an [[internal category]] in [[Grp]].  (The [[interchange law]] is given by the [[kernel]] [[commutator]] condition.)  As we know these latter objects are equivalent to [[crossed module]]s, we expect to be able to go between $cat^1$-groups and crossed modules without hindrance, and we can:

+--{.un_lemma}
######Lemma
**(Form of the Brown–Spencer theorem).**
The categories of $cat^1$-groups and crossed modules are equivalent.
=--

+--{.proof}
######Proof
Setting $M = Ker s$, $N = Im s$ and $\partial = t | M,$ then the action of $N$ on $M$ by [[conjugation]] within $G$ makes $\partial: M\to N$ into a crossed module.  Conversely if $\partial: M\to N$ is a crossed module, then setting $G = M \rtimes N$ and letting $s,t$ be defined by
$$
s(m,n) = (1,n)
$$
and
$$
t(m,n) = (1,\partial(m)n)
$$
for $m \in M$, $n \in N,$ we have that $(G,s,t)$ is a $cat^1$-group.

=--

#See also#

* [[single-sorted definition of a category]]

#References#

Loday introduced $cat^1$-groups in his work on the modelling of [[homotopy n-type]]s.

* J.-L. Loday, _Spaces with finitely many homotopy groups_, J.Pure Appl. Alg., 24, (1982), 179
– 202.


cat-2-group

#Idea#

A $cat^2$-group is a [[double groupoid]] (or, equivalently, [[double category]]) [[internal category|internal]] to the category [[Grp]] of groups. It is a $cat^1$-object in the category of $cat^1$-groups. It is a group with two _independent_ $cat^1$-group structures.

In the same 'mode' as the detailed algebraic definition of [[cat-1-group]] we have the following:

#Algebraic definition#

A **$cat^2$-group** is a quintuple, $(G,s_1,s_2, t_1,t_2)$, where $G$ is a [[group]] and $s_i,t_i$, $i = 1,2$, are [[endomorphism]]s of $G$ satisfying conditions

1. $s_i t_i = t_i$ and $t_i s_i = s_i$, for $i = 1,2$ whilst $s_i s_j = s_j s_i$, $t_i t_j = t_j t_i$ and $s_i t_j = t_j s_i$ for $i \neq j$;
1. $[Ker\,s_i, \,Ker\,t_i ] = 1$, for $i = 1,2$.

#Remarks#

$cat^2$-groups are equivalent to [[crossed square]]s.

* Note that to calculate a [[colimit]] it is better to work with crossed squares, but to prove something is a colimit, it is better to work with $cat^2$-groups.

* $cat^2$-groups are a special case of [[cat-n-group|cat-n-groups]], which are $n$-[[n-fold category|fold groupoids]] in the $Grp$.

* The use of $n$-fold groupoids in $Grp$ rather than $(n+1)$-[[n-groupoid|groupoids]] means that information contained in the 'model' is more 'spread out', but is often *repeated* in different forms in different parts of the model.

* The homotopical example found by Loday can be seen as follows. Let $(X;A,B)$ be a pointed triad, so that $A,B \subseteq X$. Let $\Phi$ be the space of maps $I^3 \to X$ which map the faces of direction $1$ to the base point, the faces of direction $2$ into $A$ and the faces of direction $3$ into $B$. Let $G = \Pi'(X;A,B)= \pi_1(\Phi,*)$. Then $G$ is certainly a group. The surprise is that the compositions of cubes in directions $2$ and $3$ are inherited by $G$ to make it a $cat^2$-group. The equivalent [[crossed square]] is the classical one $\Pi(X;A,B)$ involving triad homotopy groups.

Loday gives the more general description in terms of squares of spaces and the [[fundamental group]]s of the associated fibration sequences, and the proof of the $cat^2$-structure uses bisimplicial methods. This generalises nicely to the $n$-fold case.

It is not completely clear how best to deal with the many-pointed case, but working within categories of groupoids with a given set, $O$,  of objects is one possibility. There are then change of 'object' functors between the categories, leading to a [[fibered category]] situation.

#References#

* J.-L. Loday,  Spaces with finitely many homotopy groups,
J.Pure Appl.  Alg., 24 (1982), 179–202.

* R. Brown and J.-L. Loday,  Van Kampen theorems for diagrams of spaces,   Topology, 26 (1987), 311–337.

[[!redirects cat 2-group]]


cat-n-group

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Higher category theory
+--{: .hide}
[[!include higher category theory - contents]]
=--
#### Group Theory
+-- {: .hide}
[[!include group theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

Just as [[cat-1-group]]s (i) give models for connected [[homotopy 2-type]]s, (ii) are equivalent to [[crossed modules]], or [[2-group]]s,and are an algebraic encoding of [[internal category|internal categories]] within the category [[Grp]] of groups, so it is not surprising that higher dimensional analogues encode higher order homotopy information. This gives one the abstract definition:

##Abstract definition

A _$cat^n$-group_ is a strict [[n-fold category]] [[internal category|internal]] to [[Grp]].

Regarding a [[group]] as a [[groupoid]] with a single object, this is the same as an [[n-fold category|(n+1)-fold groupoid]] in which in one direction all morphisms are [[endomorphism]]s and there is corresponding notion of cat$^n$-groupoid.

As with the cases $n=1$ and 2, there is a neat purely group theoretic definition of these objects.

## Algebraic definition

A _cat$^n$-group_  is a [[group]] $G$ together with $2n$ [[endomorphism]]s $s_i, t_i, (1 \le i \le n)$ such that

$$s_i t_i = t_i, and  t_i s_i = s_i  for all  i, $$

$$ s_i s_j = s_j s_i,   t_i t_j = t_j t_i, s_i t_j = t_j s_i  for i\neq  j$$

and, for all $i$,

$$[ Ker\, s_i, Ker\, t_i] = 1.$$

Morphisms of cat$^n$-groups are the obvious things, morphisms of the groups compatible with the endomorphisms.

A cat$^{n}$-group is thus a group with $n$ independent cat$^{1}$-group structures on it.

## Special cases

* A $cat^0$-group is a group.

* A [[cat-1-group]] is a strict [[2-group]], viewed in a slightly different way.

## Homotopical example

 For simplicity, we describe  $\Pi X_{*}$   in a special
case, namely  when  the $n$-cube of spaces $X_{*}$   arises from a pointed  $(n +
1)$-ad  $ (X;X_1,\ldots ,X_n)$  by the  rule:  $X_{
\langle n \rangle}  = X$  and for  $A$  properly contained in
$\langle n \rangle$,   $X_A = \bigcap _{i \not\in A} X_i$, with
maps  the inclusions.  Let  $\Phi$   be the space of maps  $I^n
\to   X$  which take  the  faces of  $I^n$  in the  $i$th
direction into  $X_i$.  Notice that  $\Phi$  has the  structure
of $n$ compositions derived from the gluing of cubes in each
direction.  Let  $\bullet  \in  \Phi$   be the constant map at the
base point.   Then  $G = \pi_1(\Phi ,\bullet )$ is certainly a
group.  Gilbert, 1988, identifies   $G$ with  Loday's  $\Pi
X_{*}$, so that Loday's results, obtained by methods of
simplicial  spaces, show that  $G$  becomes a cat$^n$-group.  It
may also be shown that  the  extra groupoid structures are
inherited from the compositions on  $\Phi$.   It  is this
cat$^n$-group which is written  $\Pi X_*$   and is called
the  _fundamental  cat$^n$-group of the  $(n + 1)$-ad_.

See also [[crossed n-cube]] for an alternative description.

## Remarks

* Even though $cat^n$-groups are examples of strict [[n-fold category|(n+1)-fold categories]], Loday has shown that the [[homotopy category]] of $cat^{n-1}$-groups is equivalent to that of spaces which are pointed connected [[homotopy n-type]]s. Hence for $cat^n$-groups (thought of as $(n+1)$-fold groupoids) the [[homotopy hypothesis]] is true in this sense. See there for more details.

## Related concepts

* [[crossed n-cube]]

## References

The original proof of Loday's result is to be found in

* [[J.-L. Loday]], _Spaces with finitely many nontrivial homotopy groups_, J. Pure Appl. Alg., 24, (1982), 179--202.

This paper also uses the term n-cat-group, but later use favours the term cat$^n$-group to make it clearer that these were an [[n-fold category]] [[internalization|internal]] to [[Grp]]. There are one or two gaps in that proof and various patches and complete proofs were then given. The main one is in

* [[R. Steiner]], Resolutions of spaces by cubes of fibrations. J. London Math. Soc. (2) 34 (1986), 169--176.

A proof using $cat^n$-groups and a neat detailed analysis of multisimplicial groups and related topics was given in

* [[Manuel Bullejos]], [[Antonio M. Cegarra]], [[John W. Duskin]], *On cat$^n$ -groups and homotopy types*, J. Pure
Appl. Alg. **86** (1993) 135-154 \[doi:10.1016/0022-4049(93)90099-F]

A simple proof in terms of [[crossed n-cube|crossed n-cubes]]  using as little high-powered simplicial techniques as possible:

* [[Tim Porter|T. Porter]], _n-types of simplicial groups and crossed n-cubes_, Topology, 32, (1993), 5--24.

[[!redirects cat-n-groups]]


CatAdj

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Categories of categories
+--{: .hide}
[[!include categories of categories - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

There are different versions of what one may mean by a [[2-category]] of [[categories]] with [[adjoint functors]] as [[1-morphisms]], namely depending on which notion of [[transformation of adjoints]] one considers.

For example, the ([[very large category|very large]]) [[wide subcategory|wide]] [[locally full sub-2-category]] of [[Cat]]
\[
  \label{CatAdjInsideCat}
  Cat_{Adj} \longrightarrow Cat
\]
whose

* [[objects]] are categories,

* [[1-morphisms]] are [[left adjoint]] [[functors]],

* [[2-morphisms]] are [[natural transformations]] which are [[conjugate transformations of adjoints]].

[[MacLane (1971), p. 103](#MacLane71)]

## Properties

### Relation to bifibrations
 {#RelationToBifibrations}

\begin{proposition}
  Under the [[Grothendieck construction]], the [[Grothendieck fibrations]] which arise from [[pseudofunctors]] $\mathcal{B} \longrightarrow Cat$ that factor through $Cat_{Adj}$ (eq:CatAdjInsideCat) are equivalently the [[bifibrations]].
\end{proposition}
\begin{proof}
A Grothendieck construction on a pseudofunctor yielding a bifibration is fairly immediately equivalent to all base change functors having an adjoint on the respective side (e.g. [Jacobs (1998), Lem. 9.1.2](bifibration#Jacobs98)). By the fact that $Cat_{adj} \to Cat$ is a [[locally full sub-2-category]] ([this Prop.](transformation+of+adjoints#UniqueConjugateMate)) this already means that the given pseudofunctor factors through  $Cat_adj$, and essentially uniquely so.
\end{proof}
See also [Harpaz & Prasma (2015), Prop. 2.2.1](#HarpazPrasma15).

## Related concepts

* [[2-category of adjunctions]]

* [[ModCat|2-category of model categories]]

* [[bifibration]]

* [[adjoint (infinity,1)-functor#category_of_adjunctions|
∞-category of adjunctions]]

## References

* {#MacLane71} [[Saunders MacLane]], p. 102 of: _[[Categories Work|Categories for the working mathematician]]_, Graduate Text in Mathematics, Springer (1971) [[doi:10.1007/978-1-4757-4721-8](https://link.springer.com/book/10.1007/978-1-4757-4721-8)]

See also:

* {#HarpazPrasma15} [[Yonatan Harpaz]], [[Matan Prasma]], Section 2.2. of: _The Grothendieck construction for model categories_, Advances in Mathematics **281** (2015) 1306-1363 [[arXiv:1404.1852](https://arxiv.org/abs/1404.1852), [10.1016/j.aim.2015.03.031](https://doi.org/10.1016/j.aim.2015.03.031)]

  > (in the context of [[model structures on Grothendieck constructions]])


Catalan number

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Combinatorics
+-- {: .hide}
[[!include combinatorics - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

Catalan numbers are a specific sequence of [[negative number|nonnegative]] [[integers]], here denoted $C_n$, with a ubiquitous [[combinatorics|combinatorial]] interpretations. In terms of [[binomial coefficients]] they are given by

$$
  C_n = \frac{1}{n+1}\binom{2 n}{n} = \frac1{2n+1}\binom{2n+1}{n} = \frac{(2n)!}{n!(n+1)!}
  \,.
$$

The Catalan numbers $C_n$ count a myriad of different families of objects, including:

* nonisomorphic (rooted planar) binary [[trees]] with $n$ internal [[vertices]];

* ways of unambiguously defining the product of elements $x_0,\dots,x_n$ within an arbitrary (not necessarily [[associative]]) [[magma]], or equivalently, ways of fully parenthesizing a string of $n+1$ letters;

* elements of the free magma $Mag(x)$ generated by a singleton $x$ (called _words_) that have $n+1$ instances of the letter $x$;

* nonisomorphic rooted planar [[trees]] with $n$ [[edges]];

* strings consisting of $n$ well-balanced pairs of parentheses (also known as "Dyck words"), or equivalently, [[surjective]] [[monotone functions]] $w : (n) + (n) \to (2n)$ such that $w(\iota_1 j) \le w(\iota_2 j)$ for all $1 \le j \le n$ (where we write $(k)$ for the finite [[ordinal]] $(k) = \{1,\dots,k\}$);

* monotonic lattice paths in an $n\times n$ grid which do not cross below the diagonal, or equivalently, [[injective]] [[monotone functions]] $p : [2n] \to [n] \times [n]$ such that $\pi_1 p(i) \le \pi_2 p(i)$ for all $0 \le i \le 2n$ (where we write $[k]$ for the non-empty finite [[ordinal]] $[k] = \{0,\dots,k\}$);

* [[monotone functions]] $f : [n] \to [n]$ such that $f(0) = 0$ and $x \le f(x)$ for all $0 \le x \le n$, or in other words, 1-cells $f : [n] \to [n]$ in $\Delta_\bot$ (the sub-2-category of the [[simplex category|simplex 2-category]] $\Delta$ spanned by the first-element-preserving functions) which are _pointed_ in the sense of being equipped with a 2-cell $\id_{[n]} \Rightarrow f$;

* "mountain ranges", i.e., functions $f: [2n] \to \mathbb{N}$ such that $f(0) = 0 = f(2n)$ and $f(j+1) - f(j) \in \{1, -1\}$ for $0 \leq j \lt 2n$ (so called because graphs of such depict mountain ranges);

* "stay-ahead races", i.e., functions $f: [2n] \to \{1, -1\}$ such that $\sum_{i=0}^j f(i) \gt 0$ for $0 \leq j \leq 2n$, and $\sum_{i=0}^{2n} f(i) = 1$ (see below for explanation of terminology);

and many, many more besides (see the [Stanley](#Stanley2015) references and OEIS [A000108](#a000108)).

## Some structural bijections

In this section we describe some "canonical" isomorphisms between various structures named above. Most of these can be seen as isomorphisms between various [[species]] of structures, which collectively might be called "the Catalan species".

### Rooted planar binary trees and magma words

Each (finite) rooted planar binary tree $T$ with $n$ internal vertices (i.e., vertices that have a left child and a right child) either consists of only a root (the case $n=0$), or has a left subtree $T_l$ and a right subtree $T_r$ adjacent to the root. The associated magma word $m(T) \in Mag(x)$ is defined recursively according to these cases:

* $m(T) = x$ in the case $n=0$;

* $m(T) = m(T_l) m(T_r)$ [expressing the magma product by simple juxtaposition] in the case $n \gt 0$.

Put slightly differently, the collection of isomorphism classes of rooted planar binary trees carries a magma structure, defined by $(T_l, T_r) \mapsto T$ using the notation above, and we have the following result.

+-- {: .num_prop}
###### Proposition
The mapping $T \mapsto m(T)$ defines a bijection from the set $Bin_n$ of isomorphism clases of rooted planar binary trees with $n$ internal vertices to the set $Mag(x)_n$ of magma words with $n+1$ instances of $x$.
=--

The inverse is given by the unique magma map $Mag(x) \to Bin$ that takes $x$ to the isomorphism class of trees consisting of just a root.

### Magma words and rooted planar trees

It is often suggestive to use exponential notation to denote the magma operation: $(x, y) \mapsto x^y$. For each element $a$ of the free magma $Mag(x)$, there is thus an unary operation $(-)^a$. If $Mag(x)^\ast$ denotes the free monoid on the set $Mag(x)$, there is a unique monoid map

$$\phi: Mag(x)^\ast \to \hom(Mag(x), Mag(x))$$

that carries $a \in Mag(x)$ to the unary operation $(-)^a$. For $a \in Mag(x)$, it is reasonable to denote the composite

$$Mag(x)^\ast \stackrel{\phi}{\to} \hom(Mag(x), Mag(x)) \stackrel{eval_a}{\to} Mag(x)$$

by $w \mapsto a^w$. Denote the monoid product in $Mag(x)^\ast$ by simple juxtaposition. Under these conventions, we have for $a, b, c \in Mag(x)$ the exponential equation

$$(a^b)^c = a^{b c}.$$

If we regard the right-hand side of the exponential equation as a reduction of the left-hand side, then for any formal magma expression $a^d$, either $a = x$, or we may write $a = b^c$ and then reduce $a^d$ to $b^{c d}$.

Continuing recursively in this manner, every word $a \in Mag(x)$ can be eventually expressed as a "reduced form" (where no further reductions are possible), where we formally define a **reduced form** as follows:

* The expression $x$ is a reduced form;

* If $w_1, w_2, \ldots, w_n$ are reduced forms, then so is $x^{w_1 w_2 \ldots w_n}$.

The reader who is following where this is going will have observed that this recursive description of reduced forms matches precisely the recursive description of rooted planar trees, formalized by saying the set $Tree$ of isomorphism classes of rooted planar trees is the least fixed point, or [[initial algebra of an endofunctor|initial algebra]], of the [[endofunctor]] $T \mapsto T^\ast$ on $Set$.

To put it more visually: let us designate the term $x$ appearing as the base of a reduced form $x^{w_1 \ldots w_n}$ as the root of a corresponding tree. (If the reduced form is just $x$, then that $x$ is designated the root of a tree consisting of only a root.) The reduced forms $w_i$ themselves have roots, and we draw an edge connecting those roots to the root $x$ appearing in the base. Continuing this pattern, we climb recursively up the stacked exponentials, eventually obtaining a structure of rooted planar tree from a reduced form, whose vertices are just the instances of $x$ appearing in the reduced form.

In fact, there is no harm in identifying rooted planar trees with reduced forms, and we will repeatedly use this identification below.

Letting $Red(w)$ denote the reduced form of a magma word $w \in Mag(x)$, we thus have the following result.

+-- {: .num_prop}
###### Proposition
The mapping $w \mapsto Red(w)$ defines a bijection from $Mag(x)_n$ to $Tree_n$, i.e., from magma words having $n+1$ instances of $x$ to isomorphism classes of rooted planar trees with $n$ edges.
=--

The inverse takes a reduced form $x^w = x^{w_1 w_2 \ldots w_n}$ to the magma word $\mu(x^w)$ defined recursively by

$$(\ldots ((x^{\mu(w_1)})^{\mu(w_2)})\ldots )^{\mu(w_n)}$$

and $\mu(x) = x$.

### Rooted planar trees and mountain ranges

To each rooted planar tree or reduced form $x^{w_1 \ldots w_n}$ with $k$ edges, we associate a mountain range $f: [2k] \to \mathbb{N}$ as follows.

In the first place, there is a monoid structure on the set of mountain ranges, essentially given by juxtaposition. Formally, if $f: [2m] \to \mathbb{N}$ and $g: [2n] \to \mathbb{N}$ are mountain ranges, then their product

$$f \ast g: [2(m+n)] \to \mathbb{N}$$

is defined by $j \mapsto f(j)$ if $0 \leq j \leq 2m$, and $j \mapsto g(j-2m)$ if $2m \leq 2(m+n)$, noting that $(f \ast g)(2m) = 0$ in either case by definition of mountain range ($f(2m) = 0 = g(0)$).

We define $Moun: Tree^\ast \to Range$, from the free monoid on trees to mountain ranges, by the following recursive rules:

* $Moun(x): \{0\} \to \mathbb{N}$ takes the value $0$.

* If $Moun(w_1), \ldots Moun(w_n)$ have been defined for reduced forms $w_1, \ldots, w_n$, then

  * $Moun(w_1 \ldots w_n) = Moun(w_1) \ast \ldots \ast Moun(w_n)$, as a function $[2k] \to \mathbb{N}$ for some $k$, in which case

  * $Moun(x^{w_1 \ldots w_n}): [2(k+1)] \to \mathbb{N}$ takes $j$ for $1 \leq j \leq 2k+1$ to $1 + Moun(w_1 \ldots w_n)(j-1)$.

Then define $\rho: Tree \to Range$ to be the mapping that takes a tree $T = x^w$ to $Moun(w)$.

+-- {: .num_prop}
###### Proposition
The mapping $T \mapsto \rho(T)$ defines a bijection from $Tree_n$ to $Range_n$ , consisting of mountain ranges of the form $f: [2n] \to \mathbb{N}$.
=--

The inverse mapping can be described as follows. For each mountain range $f: [2n] \to \mathbb{N}$, we may subdivide the interval $[2n]$ into subintervals according to subdivision points $2n_k$ where $f(2n_k) = 0$. If there is at least one internal subdivision point given by an $n_k$ such that $0 \lt n_k \lt n$, then the restriction of $f$ to the subintervals (before and after $n_k$) gives mountain ranges $f_1, f_2$, which by strong induction on $n$ have assigned reduced trees $x^{w_1} = \rho^{-1}(f_1), x^{w_2} = \rho^{-1}(f_2)$, and then we put $\rho^{-1}(f) = x^{w_1 w_2}$. If there are no internal subdivision points, then $f \geq 1$ on the subinterval $\{1, 2, \ldots, 2n-1\}$. Notice moreover that $f(1) = 1 = f(2n-1)$, using the mountain range conditions $f(0) = 0 = f(2n)$ and $f(j+1) - f(j) \in \{1, -1\}$. This means the function $g = f-1$ defines a mountain range over the subinterval $\{1, \ldots, 2n-1\}$; by induction this has an assigned reduced tree $T = \rho^{-1}(g)$, and then we define $\rho^{-1}(f) = x^T$. This completes the description of the inverse mapping.

### Mountain ranges and stay-ahead races

The terminology "stay-ahead" race is suggested by the following scenario: a poll race is held between a proponent P and an opponent O. A vote for P is indicated by the value $1$, a vote for O by $-1$. Votes are counted one after another (tracked by a function $f: [2n] \to \{1, -1\}$) and partial tallies are recorded. The stay-ahead conditions are that each partial tally has P ahead of O (i.e., $\sum_{i=0}^j f(i) \gt 0$ for each $j \in [2n]$), and that P wins in the end by just one vote: $\sum_{i=0}^{2n} f(i) = 1$.

To each stay-ahead race $f: [2n] \to \{1, -1\}$ we associate a mountain range $g = \Sigma(f): [2n] \to \mathbb{N}$ by defining $g(j) = -1 + \sum_{i=0}^j f(i)$.

+-- {: .num_prop}
###### Proposition
The mapping $f \mapsto \Sigma(f)$ defines a bijection $Race_n \to Range_n$ from stay-ahead races $[2n] \to \{1, -1\}$ to mountain ranges $[2n] \to \mathbb{N}$.
=--

The inverse mapping takes a mountain range $g: [2n] \to \mathbb{N}$ to the stay-ahead race defined by the function $j \mapsto g(j) - g(j-1)$ for $0 \leq j \leq 2n$, making use of a nonce convention $g(-1) \coloneqq -1$.

### Mountain ranges and monotonic lattice paths

A mountain range $f: [2n] \to \mathbb{N}$ (or more precisely, the graph of a mountain range) can easily be converted, by a linear transformation, to an injective poset mapping $g = (g_1, g_2): [2n] \to [n] \times [n]$ satisfying the diagonal conditions $g(0) = (0, 0)$, $g(2n) = (n, n)$, and $g_1 \leq g_2$.

To wit: we remark that for a mountain range $f$, each value $f(j)$ has the same parity as $j$, and $f(j) \leq j$ for all $j \in [2n]$. (Both are simple consequences of the mountain range conditions.) Define

* $g_1(j) = \frac1{2}(j - f(j))$,

* $g_2(j) = \frac1{2}(j + f(j))$.

Denote the poset map $g = (g_1, g_2)$ thus defined by $\lambda(f)$. Let $Path_n$ denote the set of monotonic lattice paths satisfying the diagonal conditions.

+-- {: .num_prop}
###### Proposition
The mapping $f \mapsto \lambda(f)$ defines a bijection $Range_n \to Path_n$.
=--

The inverse mapping takes an element $(g_1, g_2) \in Path_n$ to the mountain range defined by $j \mapsto g_2(j) - g_1(j)$. The injectivity of $g = (g_1, g_2)$ forces each step of the path to go just one step (or block) north or just one block east, corresponding to the fact that the difference between $g_2(j+1) - g_1(j+1)$ and $g_2(j) - g_1(j)$ always lies in $\{1, -1\}$.

### Monotonic lattice paths and pointed inflationary maps

Each injective map $g = (g_1, g_2): [2n] \to [n] \times [n]$ determines and is determined by a map $f = \phi(g): [n] \to [n]$ defined as follows: if $0 \leq j \leq n$, then $f(j) = \min \{g_2(k): g_1(k) = j\}$. (The injectivity of $g$ implies that the lattice path crosses each line $x = j$.)

+-- {: .num_prop}
###### Proposition
The mapping $g \mapsto \phi(g)$ defines a bijection from $Path_n$ to the set $PtInf_n$ consisting of maps $f: [n] \to [n]$ such that $f(0) = 0$ and $j \leq f(j)$ for all $j \in [n]$.
=--

Indeed, the pointed inflationary conditions on $f$ are direct consequences of the diagonal conditions on $g$. The inverse mapping takes such a function $f$ to the lattice path that proceeds north and east, interpolating through the points

$$(0, 0)\;\; (0, f(1))\;\; (1, f(1))\;\; (1, f(2))\;\; \ldots\;\; (n, n).$$

## Structural enumeration

The bijections of the last section indicate that all of the structures named above are counted by the same quantity $C_n$. There are several ways of establishing the binomial expressions for $C_n$ mentioned above.

### Method 1

A tried-and-true approach (explained in [Baez-Dolan](#bd)) is by means of generating functions. To enumerate rooted planar binary trees with $n$ internal indices, use the fact that there is just one such tree where $n=0$ (i.e., $C_0 = 1$), and that in the case $n \gt 0$, each tree $T$ is determined by a pair $(T_l, T_r)$ consisting of a left tree and right tree adjacent to the root; if $T_l$ has $n_l$ internal vertices and $T_r$ has $n_r$ internal vertices, then $n = n_l + n_r + 1$. Hence for $n \geq 0$ we have the recursive equation

$$C_{n+1} = \sum_{j + k = n} C_j C_k.$$

Letting $C(x) = \sum_{n \geq 0} C_n x^n$ be the generating function (really a [[formal power series]]), the recursion leads to

$$C(x) = 1 + x C(x)^2$$

which we solve as $C(x) = \frac{1 - \sqrt{1 - 4x}}{2x}$ in the formal power series sense. Starting with the [[binomial theorem]] to expand $(1 - 4x)^{1/2}$ as a power series, a series of (somewhat tedious and unilluminating) manipulations eventually leads to the calculation

$$C_n = \frac1{n+1}\binom{2n}{n}.$$

### Method 2

A more structural derivation can be obtained by counting stay-ahead races, in the following manner. Let $S_n$ be the set of functions $f: [2n] \to \{1, -1\}$ for which $\sum_{i=0}^{2n} f(i) = 1$. Each such $f$ takes the value $1$ a total of $n+1$ times, and the value $-1$ a total of $n$ times, so the cardinality of $S_n$ is $\binom{2n+1}{n}$.

We let the [[cyclic group]] $\mathbb{Z}/(2n+1)$ [[group action|act]] on $S_n$, by precomposing functions $f: [2n] \to \{1, -1\}$ with powers of the cyclic [[permutation]]

$$\tau = (0\; 1\; \ldots\; 2n): [2n] \to [2n].$$

The number of stay-ahead races in $Race_n$ is seen to be $C_n = \frac1{2n+1}\binom{2n+1}{n}$, as soon as we establish the following result.

+-- {: .num_prop}
###### Proposition
Each [[orbit]] of the cyclic group action on $S_n$ contains exactly one stay-ahead race, and has exactly $2n+1$ elements.
=--

+-- {: .proof}
###### Proof
Given $f \in S_n$, form the unique extension $\tilde{f}: \mathbb{Z} \to \{1, -1\}$ that is periodic with period $2n+1$. Let $g = \sigma(f)$ be the unique function such that $g(0) = 0$ and

$$g(j+1) - g(j) = \tilde{f}(j)$$

for all $j \in \mathbb{Z}$. For example, $g(j) = \sum_{0 \leq i \lt j} \tilde{f}(i)$ for all $j \geq 0$.

Observe that $g(j+2n+1) = g(j)+1$ for all $j$, so that the line $L_{g, j}$ with slope $\frac1{2n+1}$ that passes through $(j, g(j))$ also passes through $(j+2n+1, g(j+2n+1))$, but passes through no other $(k, g(k))$ for $j \lt k \lt j+2n+1$ since $g(k)$ is integral but $L_{g, j}(k)$ is not, being strictly between $g(j)$ and $g(j)+1$. This implies that the lines $L_{g, j}$ for $j$ ranging over a period block $\{j, j+1, \ldots, j+2n\}$ are all distinct, i.e., the cyclic group action on these $L_{g, j}$ according to the formula $\tau L_{g, j} = L_{g, j+1}$ is faithful.

Pick $j$ so that the line $L_j$ is "lowest"; all the lines have the same slope $\frac1{2n+1}$, so lowest just means $L_j(0)$ is minimal. Minimality implies that that for every other $k \neq j$ within a periodic block, the point $(k, g(k))$ lies above the line $y = L_j(x)$. Translating this picture horizontally by $j$ by considering $g \circ \tau^j$, and then vertically by subtracting $g(j) = (g \circ \tau^j)(0)$, i.e., putting $h = \sigma(f \circ \tau^j)$, this means that all points $(k, h(k))$ for $k = 1, \ldots, 2n+1$ stay above the line $y = L_{h, 0}(x) = \frac1{2n+1}(x)$. In other words, these values $h(k)$ are all positive and $h(2n+1) = 1$: precisely the stay-ahead conditions for $f \circ \tau^j$. Thus the orbit of any $f \in S_n$ contains a stay-ahead race. Moreover, this is the only stay-ahead race in the orbit since the stay-ahead positivity condition is equivalent to the minimality condition on $L_j$, and all the $L_j$ are distinct.

Finally, the stabilizer of $f$ must be trivial, else we would have $L_{g, j} = L_{g, j+k}$ for $k$ a non-multiple of $2n+1$: as we saw before, this can't happen.
=--

### Method 3

Yet another proof of the formula is based on Jean-Luc Rémy's algorithm for generating binary trees uniformly at random [(see Knuth TACP 4A, Section 7.2.1.6)](#KnuthTACP4a), which can be described as $n$ iterations of the following simple rule:

* Pick any edge of the tree.

* Create a new internal node by splitting the edge in two and budding off a freshly-labelled leaf, either to the left or to the right of the new internal node.

Starting from the trivial binary tree (containing no internal nodes and a single leaf labelled "0"), this algorithm will generate a binary tree with $n$ internal nodes, together with a labelling of its leaves by distinct labels in $0 \dots n$.
Moreover, it does so exhaustively and without repetition, that is, every binary tree equipped with a permutation of its leaves will be generated exactly once.
(An easy way to see this is by thinking of applying the algorithm "in reverse" to an arbitrary leaf-labelled binary tree, repeatedly pruning off the leaf with the largest label while recording whether it is a left leaf or a right leaf, until only the root edge remains.)

Since at the $k$th iteration of the algorithm there are exactly $(2k-1)\cdot 2$ possible choices of an edge and a direction, after $n$ iterations we obtain the identity:

$$C_n\cdot (n+1)! = (2n-1)!! \cdot 2^n$$

(where $(2n-1)!! = (2n-1)(2n-3)\cdots 1 = \frac1{2^n} \frac{(2n)!}{n!}$ is the [[double factorial]]), which implies that

$$C_n = (2n-1)!! \cdot 2^n/(n+1)! = \frac{(2n)!}{n!(n+1)!} \,.$$

## Relation to cyclic objects

As pointed out for example in [Kapranov-Voevodsky](#KV), another description of a Catalan species is by way of subdivisions of a regular polygon with $n+2$ points (labeled by elements in $[n+1]$ in clockwise order) into $n$ triangles. Thus there are $2$ distinct subdivisions of a square, $5$ possible subdivisions of a pentagon, and in general $C_n$ possible subdivisions of an $(n+2)$-gon.

(To be continued.)

## Related concepts

* [[associahedron]]

## References

General references:

* Wikipedia, _[Catalan number](https://en.wikipedia.org/wiki/Catalan_number)_
* [[Richard P. Stanley]], _Catalan addendum_, (to problems in Chapter 6 of _Enumerative Combinatorics_, vol. 2) 96 pp. [pdf](http://www-math.mit.edu/~rstan/ec/catadd.pdf)
* {#Stanley2015} [[Richard P. Stanley]], _Catalan numbers_, 215 pp., Cambridge University Press 2015

Other references:

* {#KnuthTACP4a} [[Donald E. Knuth]], _The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1_, Addison-Wesley, 2011. See Section 7.2.1.6 on "Generating all trees" (also available as a [pre-fascicle](http://www.cs.utsa.edu/~wagner/knuth/fasc4a.pdf)).

* {#a000108} Sequence [A000108](https://oeis.org/A000108) in the [OEIS](https://oeis.org/)

For an interpretation in terms of [[species]] (or *structure types*) see

* {#bd} [[John Baez]], [[James Dolan]], _From Finite Sets to Feynman Diagrams_, ([arXiv:math/0004133](https://arxiv.org/abs/math/0004133), p. 19).

[[!redirects Catalan numbers]]


catamorphism

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Algebra
+--{: .hide}
[[!include higher algebra - contents]]
=--
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

In the study of [[recursion schemes]], a *catamorphism* is the simple case of a *fold* over an [[inductive type|inductive]] [[data type]]. In [[category theory|category theoretic]] terms, this is simply the unique [[homomorphism]] out of an [[initial algebra]].

## Definition

Given an [[endofunctor]] $F$ such that the [[category]] of [[algebra for an endofunctor|$F$-algebras]] has an [[initial object]] $(\mu F, in)$, the *catamorphism* for an $F$-algebra $(A, \varphi)$ is the unique [[homomorphism]] from the [[initial algebra of an endofunctor | initial $F$-algebra]] $(\mu F, in)$ to $(A, \varphi)$. The unique morphism between the carriers is also denoted $cata \varphi \colon \mu F \rightarrow A$.

From the [[commuting square]] of the homomorphism, we have $(cata \varphi) \circ in = \varphi \circ F (cata \varphi)$. By [[initial algebra of an endofunctor#LambeksTheorem|Lambek's theorem]], $\mathit{in}$ has an [[inverse]] $\mathit{out}$, so the catamorphism can be [[recursion|recursively]] defined by $cata \varphi = \varphi \circ F (cata \varphi) \circ out$.

\begin{centre}
\begin{tikzcd}
F (\mu F)
  \arrow[r, "F (\textrm{cata}\:\varphi)"]
  \arrow[d, "\textrm{in}"] &
F A
  \arrow[d, "\varphi"] \\
\mu F
  \arrow[r, "\textrm{cata}\:\varphi"] &
A
\end{tikzcd}
\end{centre}

## Properties

### Fusion law

\begin{lemma}
Let $h \colon A \rightarrow B$ be a homomorphism between two $F$-algebras $\varphi \colon F A \rightarrow A$ and $\psi \colon F B \rightarrow B$ so that $h \circ \varphi = \psi \circ F h$. Then $h \circ cata \varphi = cata \psi$.
\end{lemma}

\begin{centre}
\begin{tikzcd}
F (\mu F)
  \arrow[r, "F (\textrm{cata}\:\varphi)"]
  \arrow[d, "\textrm{in}"] &
F A
  \arrow[r, "F h"]
  \arrow[d, "\varphi"] &
F B
  \arrow[d, "\psi"] \\
\mu F
  \arrow[r, "\textrm{cata}\:\varphi"] &
A \arrow[r, "h"] &
B
\end{tikzcd}
\end{centre}

## As a recursion scheme

If $\mu F$ is an [[inductive type]], then the catamorphism is a fold over the type. Some [[recursive functions]] can then be implemented in terms of a catamorphism.

### Example: Natural numbers

Let $F$ be the functor $F X = 1 + X$ so that the naturals $\mathbb{N} = \mu F$ are represented by the fixed point of $F$ (i.e. the carrier of the initial F-algebra). The recursor for the naturals can then be defined by a catamorphism.

$$
\begin{array}{l l}
natrec &: \forall A. A \rightarrow (A \rightarrow A) \rightarrow \mathbb{N} \rightarrow A \\
natrec & A z s = cata \varphi, where \\
& \varphi (inl \ast) = z \\
& \varphi (inr n) = s n
\end{array}
$$

## References

* HaskellWiki, *[Catamorphisms](https://wiki.haskell.org/Catamorphisms)*

* Wikipedia, *[Catamorphism](https://en.wikipedia.org/wiki/Catamorphism)*

* {#BirdMoor1997} Richard Bird, Oege de Moor (1997), [_Algebra of Programming_](http://www.cs.ox.ac.uk/publications/books/algebra/), Prentice Hall

* {#Fokkinga1992} Maarten M. Fokkinga (1992), [_Law and Order in Algorithmics_](https://research.utwente.nl/en/publications/law-and-order-in-algorithmics), PhD thesis, University of Twente

* {#BackhouseBruinMalcolmVoermansWoude1991} Roland C. Backhouse, Peter J. de Bruin, Ed Voermans, Jaap van der Woude (1991), [_Relational Catamorphisms_](https://research.tue.nl/en/publications/relational-catamorphisms-2), Computing Science Notes, Vol. 9111, Technische Universiteit Eindhoven

[[!redirects catamorphisms]]


catastrophe

Rene Thom

* Theodor Bröcker, L. Lander, _Differentiable Germs and Catastrophes_, London Mathematical Society Lecture Note Series 17, Cambridge University Press 1975


categorial grammar

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Linguistics
+-- {: .hide}
[[!include linguistics - contents]]
=--
=--
=--

# Contents
* table of contents
{:toc}

## Idea

**Categorial grammar** is a tradition in formal [[linguistics]] which draws inspiration from [[category theory]].

## Some History

Syntactic "calculus" for categorial grammars was introduced by Lambek formalizing the function [[type theory|type]] constructors.  Derivation trees can nowadays be encoded by [[string diagrams]].

A seminal article, inspired by the structure of a (non-symmetric) [[biclosed monoidal category]] is:

* [[Joachim Lambek]], _The mathematics of sentence structure_, Amer. Math. Monthly __65__, 154–170 (1958) [MR0106170](http://www.ams.org/mathscinet-getitem?mr=106170) [doi](http://dx.doi.org/10.2307/2310058) [jstor](http://www.jstor.org/stable/2310058)

The connection to biclosed monoidal categories is made explicit in:

* Lambek, J. (1988). Categorial and categorical grammars. In Categorial grammars and natural language structures (pp. 297-317). Springer Netherlands.

[[pregroup grammar|Pregroup grammar]] is a refinement of this, and categorifies to (non-symmetric) [[rigid monoidal categories]].

* Preller, A. (2005). Category theoretical semantics for pregroup grammars. In Logical aspects of computational linguistics (pp. 238-254). Springer Berlin Heidelberg.

* Preller, A., & Lambek, J. (2007). Free compact 2-categories. Mathematical Structures in Computer Science, 17(2), 309-340.

A contemporary thesis in this area:

* Matteo Capelletti, _The non-associative Lambek calculus_, Logic, Linguistic and Computational Properties, thesis, Bologna, [pdf](http://amsdottorato.cib.unibo.it/321/1/TesiBo.pdf)

* Wikipedia: [categorial grammar](http://en.wikipedia.org/wiki/Categorial_grammar), [combinatory categorial grammar](http://en.wikipedia.org/wiki/Combinatory_categorial_grammar)

* Mati Pentus, _Lambek calculus and formal grammars_, Amer. Math. Soc. Transl. 1997

* Michael Moortgat, _Categorial type logics_, [pdf](http://www.let.uu.nl/~Michael.Moortgat/personal/Courses/CG08/Docs/lola-ch2.pdf) (ch. 2 in _Handbook of logic and language_, Elsevier 1997)

Research along similar lines is sometimes described as **typelogical grammar** (See the link below!).

## Related Concepts

* [[linguistics]]
* [[type theory]]
* [[context-free grammar]]
* [[lambda calculus]]

## Links

* [Wikipedia](http://en.wikipedia.org/wiki/Categorial_grammar)

* [SEP: typelogical grammar](http://plato.stanford.edu/entries/typelogical-grammar/
)

## References

* Daniel J. Dougherty, _Closed Categories and Categorial Grammar_ , Notre Dame Journal of Formal Logic **34** no.1 (1993) pp.36-49. ([pdf](http://web.cs.wpi.edu/~dd/publications/ndjfl93.pdf))

* Philippe de Groote, Towards Abstract Categorial Grammars, In: _Association for Computational Linguistics, 39th Annual Meeting and 10th Conference of the European Chapter, Proceedings of the Conference_, pages 148–155, Toulouse, France, 2001. ([pdf](http://www.loria.fr/~degroote/papers/acl01.pdf))

[[!redirects categorial grammar]]
[[!redirects categorial grammars]]
[[!redirects Categorial grammar]]
[[!redirects categorical grammars]]
[[!redirects categorical grammar]]
[[!redirects Lambek calculus]]


categorical algebra

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Categorical algebra
+-- {: .hide}
[[!include categorical algebra -- contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

Broadly speaking, _categorical algebra_ is _[[algebra]]_ seen from and generalized via the point of view of [[category theory]].
Thus it studies those aspects of categorical and category-like constructions which are in the spirit of pure algebra.

First and foremost this includes the study of [[monoidal category]] theory, and the corresponding [[internalization|internal]] notions of [[monoid objects]], [[module objects]], etc.

More generally, it is about the study of

1. [[Lawvere theory|algebras over]]$\,$ [[algebraic theories]],

1. [[algebra over a monad|algebras over]]$\,$ [[monads]],

1. [[algebra over an operad|algebras over]]$\,$ [[operads]].

An account of the basics may be found at _[[geometry of physics -- categories and toposes]]_ in the section _[Basic notions of categorical algebra](geometry+of+physics+--+categories+and+toposes#BasicNotionsOfCategoricalAlgebra)_.

## Related concepts

* [[universal algebra]]

## References

Some references use "categorical algebra" much as a synonym for [[category theory]] as such:

* [[Samuel Eilenberg]], [[G. Max Kelly]], *Closed Categories*, pp. 421-562 in:  [[Samuel Eilenberg|S. Eilenberg]], [[D. K. Harrison]], [[S. MacLane]], [[H. Röhrl]] (eds.): *[[Proceedings of the Conference on Categorical Algebra - La Jolla 1965]]*, Springer (1966) [[doi:10.1007/978-3-642-99902-4](https://doi.org/10.1007/978-3-642-99902-4)]

* [[Francis Borceux]], _[[Handbook of Categorical Algebra]]_, Encyclopedia of Mathematics and its Applications **50** Cambridge University Press (1994)

Discussion more focused on actual [[universal algebra]]:

* [[R. F. C. Walters]], *A categorical approach to universal algebra*, Ph.D. Thesis (1970) [[anu:1885/133321](https://openresearch-repository.anu.edu.au/handle/1885/133321)]

* [[Martin Hyland]], [[John Power]], *The Category Theoretic Understanding of Universal Algebra: Lawvere Theories and Monads*, Electronic Notes in Theor. Comp. Sci. **172** (2007) 437-458 [[doi:10.1016/j.entcs.2007.02.019](https://doi.org/10.1016/j.entcs.2007.02.019), [preprint](https://www.dpmms.cam.ac.uk/~martin/Research/Publications/2007/hp07.pdf)]

Exposition of basics of [[monoidal categories]] and [[categorical algebra]]:

* _[[geometry of physics -- categories and toposes]]_, Section 2: _[Basic notions of categorical algebra](geometry+of+physics+--+categories+and+toposes#BasicNotionsOfCategoricalAlgebra)_

See also

* Wikipedia, _[Categorical algebra](https://en.wikipedia.org/wiki/Categorical_algebra)_


categorical algebra -- contents

[[category theory]]+[[algebra]]

**[[internalization]] and [[categorical algebra]]**

* [[monoid object]]

* [[group object]]

* [[ring object]]

* [[algebra object]] (associative, [[Lie algebra object|Lie]], ...)

* [[module object]]/[[action object]]

* [[internal locale]]

* [[internal category]] ($\to$ [[internal infinity-categories contents|more]])

  * [[internal groupoid]]

  * [[internal site]]

  * [[internal diagram]]

**[[universal algebra]]**

* [[algebra over a Lawvere theory|algebras over]]$\,$ [[algebraic theories]]

* [[algebra over a monad|algebras over]]$\,$ [[monads]]

* [[algebra over an operad|algebras over]]$\,$ [[operads]]

**[[categorical semantics]]**

* [[internal logic]], [[internal language]]

* [[relation between category theory and type theory]]


categorical analysis

# Categorical/functorial analysis
* table of contents
{: toc}

## Idea

One can base analysis on functional analysis, i.e.,  on the use of
topological vector spaces of (generalized) functions.
Completeness hypothesis give theorems like the fixed point
theorem, the implicit function theorem which are fundamental tools to prove the existence and unicity of perturbatively small (small parameter) solutions of non-linear problems (e.g., partial differential equations). One also sometimes (more rarely) use related methods (compactness, etc...) to extend the local solutions to global ones. However, functional analytic methods introduce sometimes too much technical restrictions on the allowed
functionals, which makes hard the presentation to mathematicians of the physicists' methods in quantum field theory.

Another approach to analysis is given by functorial analysis, that is
based on the functor of point approach to differential geometry on functional spaces. The basic idea of this approach is to use a very general class
of partially defined function on functional spaces. It has the advantage of
being adaptable to any non-linear (also fermionic) situation and seems particularly well suited to the study of non-perturbative quantum field theories.

The flexibility of this approach does not mean that one can avoid
writing down inequalities and estimates, like in standard analysis:
these are exactly the necessary steps to compute the definition domains
of the objects in play.

A lot of works of physicists use a yoga of the type of categorical analysis, without computing the definition domains of the functionals in play: they just write down the formulas and compute with them. This could be a reason why mathematician often think that (perturbative) quantum field theory is not well grounded mathematically.

## Example

Consider spaces modeled on smooth open subsets $U\subset \R^n$ for varying $n$, given by sheaves $U\mapsto X(U)$.
Let $\pi:C=\R^3\times [0,1]\to [0,1]=M$ be a trivial bundle with coordinates $(t,x)$ corresponding to euclidean time and space coordinates. Let $L(t,x_\alpha)$ be a lagrangian density.
The formula
$$S(x_u)=\int_M L(t,x_{\alpha,u}(t))dt$$
defines a partially defined functional
$$S:\Gamma(M,C)\to \R$$
whose definition domain $D\subset \Gamma(M,C)$ is given by Lebesgue's dominated derivation theorem
$$D(U):=\{x_u\in \Gamma(M,C)(U),\;locally on U, there exists g\in L^1(M),\;|L(t,x_{\alpha,u}(t))|\leq g(t)\}$$
that is imposed to make
$u\mapsto S(x_u)$
a smooth function of the parameter $u\in U$.

## Related concepts

[[functor of points|Functor of points]]

## References

* [[Frédéric Paugam]]: see the related chapter of
[Towards the mathematics of quantum field theory](http://people.math.jussieu.fr/~fpaugam/documents/enseignement/master-mathematical-physics.pdf).


categorical compositional distributional semantics

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
#### Linguistics
+-- {: .hide}
[[!include linguistics - contents]]
=--
=--
=--

# Contents
* table of contents
{:toc}

## Idea

Categorical compositional distributional semantics, also known as **DisCoCat** for short, uses category theory to combine the benefits of two very different approaches to [[linguistics]]: [[categorial grammar]] and [[distributional semantics]].

Specifically, it uses the fact that [[pregroups]] and the category of finite-dimensional real [[vector space|vector spaces]] are both examples of [[rigid monoidal category|rigid monoidal categories]]. Semantics for [[pregroup grammars]] may then be given as a strong [[monoidal functor]], which allows sentence meanings to be computed from word meanings by linear algebra, compositionally on the grammatical structure of the sentence.

DisCoCat was first introduced in [Coecke, Sadrzadeh and Clark 2010](#Coecke10).

There is a curious (if probably shallow) analogy between DisCoCat and [[topological quantum field theory]], in that both concern strong monoidal functors from a free ([[rigid monoidal category|rigid monoidal]] or [[compact closed category|compact closed]]) category to a category of vector spaces.

## Simple example

Consider a very simple fragment of English consisting of nouns and verbs. Write $n$ for the type of nouns, and $s$ for the type of sentences. Let $\mathcal{C}$ be the free pregroup generated by $n$ and $s$. In $\mathcal{C}$, a noun will be assigned the type $n$ and a reflexive verb will be assigned the type $n^{r} s n^{l}$, since it will produce a sentence if provided with nouns on the left and right. Now given nouns such as "Alice" and "Bob" and reflexive verbs such as "loves" and "hates", the grammaticality of a sentence such as "Alice hates Bob" is witnessed by the fact that
\[ n n^{r} s n^{l} n \leq s \]
in the free pregroup.

A strong monoidal functor $F : \mathcal{C} \to FVect_{\mathbb{R}}$ is completely determined by where it sends the generators $n$ and $s$. The vector spaces $F (n)$ and $F (s)$ are called the _noun space_ and the _sentence space_, and their choice is a matter of linguistic modelling. A common approach is to pick a large set $n$ of _basis words_, say $n = 1000$ (or as many as your sparse matrix implementation can handle), and take $F (n) = \mathbb{R}^{1000}$. The choice of $F (s)$ is not well understood, but $F (s) = \mathbb{R}^{2}$ is a common choice, with the standard basis vectors interpreted as "true" and "false".

Given a grammatical parsing such as $n n^{r} s n^{l} n \leq s$, we automatically get a linear map
\[ F (n n^{r} s n^{l} n) : F (n) \otimes F (n) \otimes F (s) \otimes F (n) \otimes F (n) \to F (s) \]
given by appropriate tensor contractions.

The final ingredient we need are _word vectors_. We need to pick vectors $[\![ Alice ]\!], [\![ Bob ]\!] \in F (n)$ and $[\![ loves ]\!] \in F (n) \otimes F (s) \otimes F (n)$. The choice of these vectors is also a matter for linguistics, but a common idea is to count how often Alice (for example) appears in a corpus (for example the full text of Wikipedia) close to each of the chosen basis words.

Finally, we obtain a sentence-vector
\[ F (n n^{r} s n^{l} n \leq s) ([\![ Alice ]\!] \otimes [\![ loves ]\!] \otimes [\![ Bob ]\!]) \in F (s) \]

## Relative pronouns and Frobenius algebras

## Free pregroups vs free rigid monoidal categories

All earlier papers on DisCoCat use free pregroups for the grammar category, building on earlier work by [[Joachim Lambek]] on pregroup grammars. Unfortunately, in [Preller 2014, fact 1](#Preller14) it is proven that any strong monoidal functor from a free pregroup to $FVect$ is necessarily trivial, in the sense that it sends every generator to the monoidal unit.
One should instead use a free [[rigid monoidal category]], a kind of [[categorification]]. Morphisms in the free autonomous category can be viewed as [[proof relevance|proof relevant]] grammatical reductions.
They may be encoded as [[string diagrams]], see [[pregroup grammar]].

This allows a slightly more elegant reformulation of our basic example. Let $\mathcal{C}$ be the free autonomous category on the objects $n, s$ and the morphisms $Alice : 1 \to n$, $Bob : 1 \to n$ and $loves : 1 \to n^{r} s n^{l}$. Then a sentence such as "Alice loves Bob", together with its grammaticality, is witnessed by a morphism $f : 1 \to s$. Now the word-vectors $[\![ Alice ]\!] = F (Alice)$, $[\![ Bob ]\!] = F (Bob)$ and $[\![ loves ]\!] = F (loves)$ become part of the data defining $F : \mathcal{C} \to FVect$, and the resulting sentence vector is simply $F (f)$.

## The Category of DisCoCat Models

One criticism of DisCoCat is that a single model is unlikely to be complex enough to capture the intricacies of a [[natural language]]. A response to this criticism is that DisCoCat models should only model a given fragment of language with some level of detail. These models can then be combined or updated to represent more complex fragments of [[natural language]]. Indeed, in _[Translating and Evolving: Towards a Model of Language Change in DisCoCat](https://arxiv.org/abs/1811.11041)_ the authors construct a category $DisCoCat$ of DisCoCat models where

* objects are [[strong monoidal functors]]
$$ F \colon (J,*) \to (FVect,\otimes) $$
where $(J,*)$ is a category which is freely monoidal on some set of grammatical types. In practice $J$ might be freely equipped with an [[rigid monoidal category|rigid]] structure or a [[Frobenius algebra]] on each object.

* A morphism from a language model $F \colon J \to FVect$ to a language model $F' \colon J' \to FVect$ is a tuple $(j , \alpha)$ where $j$ is a [[monoidal functor]] $i \colon J \to J'$ and $\alpha \colon F \Rightarrow F' \circ j$ is a [[monoidal natural transformation]] filling the following triangle
\begin{centre}
  \begin{xymatrix}
   J\ar[r]^F \ar[d]_j& FVect \\
   J' \ar[ur]^{F'}\ &
   \end{xymatrix}
\end{centre}
Morphisms in $DisCoCat$ are called translations because they represent ways of changing your semantic interpretations of grammatical types in a way which is coherent with a change in grammar.

### The Product Space Representation

In [_Mathematical foundations for a compositional distributional model of meaning_](https://arxiv.org/abs/1003.4394) a different description of a DisCoCat model was described. Let $J$ be a free [[autonomous category]] representing grammar and assume that you have an assignment $V_a$ of each grammatical type $a$ to a finite dimensional vector space. Then grammatical computations of meaning can be performed in the [[product category]] $J \times FVect$. Let $a_1 \cdot \ldots \cdot a_n$ be an object in $J$ and let $v \in V_{a_1} \otimes \ldots \otimes V_{a_n}$ be its semantic meaning. Then a grammatical reduction $f \colon a \to b$ built from the units and counits in $J$ can be paired with the corresponding structure maps in $FVect$. This pairing allows you to apply the structure maps corresponding to $f$ to the vector $v$ to get a new semantic meaning. In essence, this approach identifies an autonomous subcategory of $J \times FVect$ where meaning computations can occur.

This product space representation can be related to monoidal functor perspective via the [[category of elements]]. Using the forgetful functor $i \colon FVect \to Set$ the product space of a language model $F \colon J \to FVect$ can be defined as the category of elements $\int i \circ F$. The product space representation is useful for equipping a language model with a specific set of words. If $W$ is a set of words then a map $W \to \int i \circ F$ describes an assignment of each word to a grammatical type and semantic meaning.

## Variations

DisCoCat is relatively easy to modify by replacing the semantic category $FVect$ with some other category with the appropriate structure. Examples include

* [[relation|Relations]], which yields a semantics in [[regular logic]], closely related to [[cartesian bicategory|Cartesian bicategories]], see [Felice, Meichanetzidis and Toumi 2019](#Felice19)

* [[density matrix|Density matrices]] to model semantic ambiguity such as "financial bank" vs "river bank"

* Convex relations (i.e. [[relation|relations]] in the category of [[convex space|convex spaces]]) to model cognition ([Bolt et al 2016](#Bolt16))

* [[game theory|Games]] to model dialogue and Wittgenstein's [[language game|language games]] ([Hedges and Lewis 2018](#Hedges18))

## Related entries

* [[DisCoPy]]

# References

* [Linguistics using category theory](https://golem.ph.utexas.edu/category/2018/02/linguistics_using_category_the.html) on the n-category café

* [Cognition, convexity and category theory](https://golem.ph.utexas.edu/category/2018/03/cognition_convexity_and_catego.html) on the n-category café

* [Meeting the Dialogue Challenge](https://golem.ph.utexas.edu/category/2019/06/meeting_the_dialogue_challenge.html) on the n-category café

* {#Coecke10} [[Bob Coecke]], [[Mehrnoosh Sadrzadeh]] and Stephen Clark, _Mathematical foundations for a compositional distributional model of meaning_. Lambek Festschrift, special issue of Linguistic Analysis, 2010. ([arXiv:1003.4394](https://arxiv.org/abs/1003.4394))

* {#Preller14} Anne Preller, _From logical to distributional methods_. QPL 2013. ([arXiv:1412.8527](https://arxiv.org/abs/1412.8527))

* {#Bolt16} Josef Bolt, [[Bob Coecke]], Fabrizio Genovese, Martha Lewis, Daniel Marsden and Robin Piedeleu, _Interacting conceptual spaces I: Grammatical composition of concepts_, SLPCS 2016 ([arXiv:1703.08314](https://arxiv.org/abs/1703.08314)

* {#Felice19} Giovanni de Felice, Konstantinos Meichanetzidis and [[Alexis Toumi]], _Functorial Question Answering_, ACT 2019. ([arXiv:1905.07408](https://arxiv.org/abs/1905.07408)])

* {#Hedges18} [[Jules Hedges]] and Martha Lewis, _Towards functorial language-games_, CAPNS 2018. ([arXiv:1807.07828](https://arxiv.org/abs/1807.07828))

The category $DisCoCat$ and it's relationship to the product space representation is discussed in:

* [[Tai-Danae Bradley]], Martha Lewis, [[Jade Master]], and Brad Theilman
_Translating and Evolving: Towards a Model of Language Change in DisCoCat_ [arXiv:1811.11041](https://arxiv.org/abs/1811.11041)

[[!redirects DisCoCat]]


categorical distribution

## Idea

A *categorical distribution* is the generic distribution of a random variable with finite image.

## Definition

+-- {: .num_defn}
###### Definition
A random variable $X$ whose image consists of precisely $n\in \mathbb{N}_0$ elements is called to obey a *categorical distribution*.
=--

By definition every random variable with finite image is categorically distributed.

A Bernoulli distribution is precisely a categorical distribution of a random variable whose image-size is $2$.

A categorical distribution is precisely a multinomial distribution $B(n,p_1,...,p_k)$ with $n=1$

Categorical distribution is to multinomial distribution like Bernoulli distribution is to binomial distribution.

The  possible probabilities of a random variable with image-cardinalty $n$ are precisely the points of the standard $(n-1)$-[[nLab:simplex]] embedded into $\mathbb{R}^n$ since we have $1=\sum_{i=0}^{n-1} p_i$. From this viewpoint we see that for a time-homogenous Markov-chain with finite state space the exists  a stationary distribution $\pi$ which is a fixed point of the linear (hence continuous) transformation on the unit simplex associated to the transition matrix $P$ of the chain since any continuous transformation in the unit simplex has a fixed point.

## References

* [wikipedia](http://en.wikipedia.org/wiki/Markov_chain#Finite_state_space)


Categorical dynamics

This page provides some links related to the talk

* [[William Lawvere]],

  _Categorical dynamics_

  1967 Chicago lectures

  pp. 1-28 in

  [[Anders Kock]] (ed.),

  _Topos Theoretic Methods in Geometry_, Aarhus Univ. Var. Pub. Ser. 30 (1979).

  [PDF file](https://dmitripavlov.org/scans/kock.pdf)

  ([pdf abstract](http://www.mat.uc.pt/~ct2011/abstracts/lawvere_w.pdf))

  _Categorical Dynamics Revisited_, talk at _Sets Within Geometry_, Nancy, France 26-29 July 2011 ([recording](https://www.youtube.com/watch?v=sXATg9_6iWE))

which together with _[[Toposes of laws of motion]]_ forms the beginning of the theory of [[synthetic differential geometry]] and its use in the [[foundations]] of [[continuum physics]].

category: reference


categorical Galois theory

#Contents#
* table of contents
{:toc}

## Idea

The flavor of _[[Galois theory]]_ called _categorical Galois theory_ is a variant of [[Grothendieck's Galois theory]] as generalised by [[George Janelidze]].

## References

The main reference is the monograph

* [[F. Borceux]], [[G. Janelidze]], _[[Galois theories]]_, Cambridge Studies in Adv. Math. __72__, 2001. xiv+341 pp.

## Articles

* G. Janelidze, _Magid's theorem in categories_, Bull. Georgian Acad.
Sci. 114, 3, 1984, 497-500 (in Russian)

* [[G. Z. Dzhanelidze]], _The fundamental theorem of Galois theory_, Mat. Sb. (N.S.) __136__(178) (1988), no. 3, 361--376, 431, [pdf](http://www.mathnet.ru/php/getFT.phtml?jrnid=sm&paperid=1747&volume=178&year=1988&issue=3&fpage=361&what=fullt&option_lang=eng); translation in
Math. USSR Sbornik __64__ (2), 1989, 359-374, [MR89k:18008](http://www.ams.org/mathscinet-getitem?mr=959487)

* {#Jan90} [[George Janelidze|G. Janelidze]], _Pure Galois theory in categories_, J. Algebra __132__ (2), 1990, 270-286, [MR91k:18004](http://www.ams.org/mathscinet-getitem?mr=1061480), doi

* G. Janelidze, _Precategories and Galois theory_, Proc. [[Como]], Springer Lect. Notes in Math. __1488__, 1991, 157-173, [MR93h:18011](http://www.ams.org/mathscinet-getitem?mr=1173010), [doi](http://dx.doi.org/10.1007/BFb0084218)

* G. Janelidze, D. Schumacher, R. Street, _Galois theory in
variable categories_, Applied Categorical Structures __1__, 1993, 103-110

category:Galois theory


The _categorical geometric Langlands conjecture_ is a categorical version of the [[geometric Langlands conjecture]].  It is formulated as an equivalence of [[stable (infinity,1)-categories]] of

* [[D-modules]] on the [[derived stack]] of [[G-bundles]] on a [[curve]] $X$,

and

* [[ind-coherent sheaves]] on the [[derived stack]] of $G^\vee$-equivariant [[local systems]] on $X$,

where $X$ is a smooth complete [[curve]] over a [[field]] of [[characteristic zero]], and $G$ is a [[reductive group]] and $G^\vee$ is its [[Langlands dual]].

## References

* Gurbir Dhillon, _An informal introduction to categorical representation theory and the local geometric Langlands program_ ([arXiv:2205.14578](https://arxiv.org/abs/2205.14578))

* [[Dennis Gaitsgory]], _[[Notes on geometric Langlands]]_, [web](http://www.math.harvard.edu/~gaitsgde/GL/).

* [[D. Gaitsgory]], [[N. Rozenblyum]], _[[A study in derived algebraic geometry]]_.

* [[D. Gaitsgory]] et. al., _Geometric representation theory_, graduate seminar, Fall 2009--Spring 2010, [web](http://www.math.harvard.edu/~gaitsgde/grad_2009/).

* [MO/56571](http://mathoverflow.net/questions/56571/a-precise-statement-of-the-categorical-version-of-geometric-langlands-conjecture), _A precise statement of the categorical version of geometric Langlands conjecture_.


categorical homotopy groups in an (infinity,1)-topos

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### $(\infty,1)$-Topos Theory
+--{: .hide}
[[!include (infinity,1)-topos - contents]]
=--
#### Homotopy theory
+--{: .hide}
[[!include homotopy - contents]]
=--
=--
=--

This is a sub-entry of [[homotopy groups in an (∞,1)-topos]].

For the other notion of homotopy groups see [[geometric homotopy groups in an (∞,1)-topos]].

#Contents#
* table of contents
{:toc}

## Definition
 {#Definition}

Since an [[(∞,1)-topos]] $\mathbf{H}$ has all [[limits in a quasi-category|$(\infty,1)$-limits]],  it is
[powered over ∞Grpd](limit+in+a+quasi-category#Tensoring) (see at *[Powering of $\infty$-toposes over $\infty$-groupoids](infinity1-topos#PoweringOfInfinityToposesOverInfinityGroupoids)*):

$$
  (-)^{(-)}
  \;\colon\;
  \infty Grpd^{op} \times \mathbf{H}
    \longrightarrow
  \mathbf{H}
  \,.
$$

Let $S^n  \,\coloneqq\, \partial \Delta[n+1]$ (or  $S^n \coloneqq Ex^\infty \partial \Delta[n+1]$) be the ([[Kan fibrant replacement]]) of the [[boundary of a simplex|boundary of the (n+1)-simplex]], i.e. the model in [[∞Grpd]] of the [[pointed object|pointed]] [[n-sphere]].

Then for $X \in \mathbf{H}$ an [[object]], the [[powering|power object]] $X^{S^n} \,\in\, \mathbf{H}$ plays the role of the space of of maps from the $n$-sphere into $X$, as in the definition of [[simplicial homotopy groups]], to which this reduces in the case that $\mathbf{H} = $ [[∞Grpd]].

Moreover, [[powering]] of the canonical morphism $ i_n \colo * \to S^n$ induces a morphism

$$
  X^{i_n} \;\colon\; X^{S^n} \longrightarrow X
$$

which is restriction to the basepoint. This morphism may be regarded as an object of the [[slice (∞,1)-topos]] $\mathbf{H}_{/X}$.

### Of objects

+-- {: .num_defn}
###### Definition
**(categorical homotopy groups)**

For $n \in \mathbb{N}$ define

$$
  \pi_n(X)
    \;\coloneqq\;
  \tau_{\leq 0} X^{i_n}
  \;\;\;\in\;
  \mathbf{H}_{/X}
$$

to be the [[n-truncated object of an (infinity,1)-topos|0-truncation]] of the [[powering|power object]] $X^{i_n}$.

=--

Passing to the 0-truncation here amounts to dividing out the [[homotopy|homotopies]] between maps from the $n$-sphere into $X$. The [[n-truncated object of an (infinity,1)-topos|0-truncated]] objects in $\mathbf{H}_{/X}$ have the interpretation of [[sheaf|sheaves]] on $X$. So in the world of [[∞-stacks]] a homotopy [[group object]] is a [[sheaf]] of groups.

To see that there is indeed a group structure on these _homotopy sheaves_ as usual, notice from the general properties of [[power]]ing we have that

$$
  X^{S^k \coprod_* S^l}
  \simeq
  X^{S_k} \times_X X^{S_l}
  \,.
$$

From the discussion of properties of truncation we have that $\tau_{\leq n} : \mathbf{H} \to \mathbf{H}$ preserves such finite [[product]]s so that also

$$
  \tau_{\leq 0} X^{* \to S^k \coprod_* S^l}
  \simeq
  (\tau_{\leq 0} X^{* \to S^k} ) \times
  (\tau_{\leq 0}) X^{* \to S^k}
  \,.
$$

Therefore the [[cogroup]] operations $S^n \to S^n \coprod_* S^n$ induce group operations

$$
  \pi_n(X) \times \pi_n(X) \to \pi_n(X)
$$

in the [[sheaf topos]] $\tau_{\leq 0} \mathbf{H}_{/X}$. By the usual argument about [[homotopy group]]s, these are trivial for $n = 0$ and [[abelian group|abelian]] for $n \geq 2$.

### Of morphisms

It is frequently useful to speak of homotopy groups of a [[morphism]] $f : X \to Y$ in an $(\infty,1)$-topos

+-- {: .num_defn}
###### Definition
**(homotopy groups of morphisms)**

For $f : X \to Y$ a [[morphism]] in an [[(∞,1)-topos]] $\mathbf{H}$, its _homotopy groups_ are the homotopy groups in the above sense of $f$ regarded as an object of the [[over quasi-category|over (∞,1)-category]] $\mathbf{H}_{/Y}$.

=--

So the homotopy sheaf $\pi_n(f)$ of a morphism $f$ is an object of the [[over quasi-category|over (∞,1)-category]] $Disc((\mathbf{H}_{/Y})_{/f}) \simeq Disc(\mathbf{H}_{/f})$. This in turn is equivalent to $\cdots \simeq \mathbf{H}_{/X}$ by the map that sends an object

$$
  \array{
    && Q
    \\
    & \swarrow && \searrow
    \\
    X &&\stackrel{f}{\to}&& Y
  }
$$

in $\mathbf{H}_{/f}$ to

$$
  \array{
    && Q
    \\
    & \swarrow
    \\
    X
  }
  \,.
$$

The intuition is that the homotopy sheaf $\pi_n(f) \in Disc(\mathbf{H}_{/X})$ over a basepoint $x : * \in X$ is the homotopy group of the [[nLab:homotopy fiber]] of $f$ containing $x$ at $x$.

+-- {: .num_example}
###### Example

If $Y = *$ then there is an essentially unique morphism $f : X \to *$ whose [[homotopy fiber]] is $X$ itself. Accordingly $\pi_n(f) \simeq \pi_n(X)$.

=--

+-- {: .num_example}
###### Example

If $X = *$ then the morphism $f : * \to Y$ is a point in $Y$ and the single [[homotopy fiber]] of $f$ is the [[loop space object]] $\Omega_f Y$.

=--

## Properties

### In $\infty Grpd$

For the case that $\mathbf{H} = $ [[∞Grpd]] $\simeq$ [[Top]], the $(\infty,1)$-topos theoretic definition of categorical homotopy groups in $\mathbf{H}$ reduces to the ordinary notion of [[homotopy group]]s in [[Top]]. For $\infty Grpd$ modeled by [[Kan complex]]es or the standard [[model structure on simplicial sets]], it reduces to the ordinary definition of [[simplicial homotopy group]]s.

### Of homotopy groups of morphisms

The  definition of the homotopy groups of a morphism $f : X \to Y$
is equivalent to the following recursive definition

+-- {: .num_defn}
###### Definition/Proposition
**(recursive homotopy groups of morphisms)**

For $n \geq 1$ we have

$$
  \pi_n(f) \simeq \pi_{n-1}(X \to X \times_Y X)
  \;\;\;
  \in
  Disc(\mathbf{H}_{/X})
  \,.
$$

=--

This is [[Higher Topos Theory|HTT, remark 6.5.1.3]].

This is the generalization of the familiar fact that [[loop space object]]s have the same but shifted homotopy groups: In the special case that $X = *$ and $f$ is $f : * \to Y$ we have $X \times_Y X = \Omega_f Y$ and $X \to X \times_Y X$ is just $* \to \Omega_f Y$, so that

$$
  \pi_n(f) = \pi_n(Y)
$$

and

$$
  \pi_{n-1}(X \to X \times_Y X) \simeq \pi_{n-1} \Omega_f Y
  \,.
$$

+-- {: .num_prop }
###### Proposition

Given a sequence of morphisms $X \stackrel{f}{\to}Y \stackrel{g}{\to} Z$ in $\mathbf{H}$, there is a [[long exact sequence]]

$$
  \cdots
  \to
  f^* \pi_{n+1}(g) \stackrel{\delta_{n+1}}{\to}
  \pi_n(f)
  \stackrel{g \circ f}{\to}
  \to
  f^* \pi_n(g)
  \stackrel{\delta_n}{\to}
  \pi_{n-1}(f)
  \to
  \cdots
$$

in the [[topos]] $Disc(\mathbf{H}_{/X})$.

=--

This is [[Higher Topos Theory|HTT, remark 6.5.1.5]].

### Behaviour under geometric morphisms

+-- {: .num_prop }
###### Proposition

Geometric morphisms of $(\infty,1)$-topos preserve homotopy groups.

If $k : \mathbf{H} \to \mathbf{K}$ is a [[geometric morphism]] of $(\infty,1)$-toposes then for $f : X \to Y$ any morphism in $\mathbf{H}$ there is a canonical [[isomorphism]]

$$
  k^* (\pi_n(f)) \simeq \pi_n(k^* f)
$$

in $Disc(\mathbf{H}_{/k^* Y})$.

=--

This is [[Higher Topos Theory|HTT, remark 6.5.1.4]].

### Connected and truncated objects

Let $X \in \mathbf{H}$.

* The object $X$ is **$n$-[[truncated]]** if it is a [[n-truncated object in an (∞,1)-category|k-truncated object]] for some $k \gt n$ and if all its categorical homotopy groups above degree $n$ vanish.

  Every object decomposes as a sequence of $n$-truncated objects: the
  [[Postnikov tower in an (∞,1)-category]].

* The object $X$ is **$n$-[[connected]]** if the terminal morphism
  $X \to *$ is an [[effective epimorphism]] and if all categorical homotopy groups below degree $n$ are trivial.

* The object $X$ is an **[[Eilenberg-MacLane object]]** of degree $n$ if it is both $n$-connected and $n$-truncated.

## Models

When the [[(∞,1)-topos]] $\mathbf{H}$ is [[presentable (∞,1)-category|presented]] by a [[model structure on simplicial presheaves]] $[C^{op}, sSet]_{loc}$, then since this is an [[sSet]]-[[enriched model category]] structure the [[power]]ing by $\infty Grpd$ is modeled, as described at, $(\infty,1)$-limit -- Tensoring -- Models by the ordinary powering

$$
  sSet^{op} \times [C^{op}, sSet] \to [C^{op}, sSet]
  \,,
$$

which is just objectwise the [[internal hom]] in [[sSet]]. Therefore the $(\infty,1)$-topos theoretical homotopy sheaves of an object in $([C^{op}, sSet]_{loc})^\circ$ are given by the following construction:

For $X \in [C^{op}, sSet]$ a presheaf, write

* $\pi_0(X) \in [C^{op},Set]$ for the presheaf of connected components;

* $\pi_n(X) = \coprod_{[x] \in \pi_0(X)} \pi_n(X,x)$ for the presheaf of [[simplicial homotopy group]]s with $n \geq 1$;

* $\bar \pi_n(X) \to \bar \pi_0(X)$ for the [[sheafification]] of these presheaves.

Then these $\bar \pi_n(X) \to \bar \pi_0(X)$ are the sheaves of categorical homotopy groups of the object represented by $X$.

This definition of homotopy sheaves of [[simplicial presheaves]] is familiar from the Joyal-Jardine [[local model structure on simplicial presheaves]]. See for instance [page 4](http://www.math.uwo.ca/~jardine/papers/Fields-01.pdf#page=4) of [Jard07](http://www.math.uwo.ca/~jardine/papers/Fields-01.pdf).

> this needs more discussion

## Related concepts

* [[long exact sequence of homotopy groups]]

## References

The intrinsic $(\infty,1)$-theoretic description is the topic of section 6.5.1 in:

* [[Jacob Lurie]], _[[Higher Topos Theory]]_ .

The model in terms of the [[model structure on simplicial presheaves]] is duscussed for instance in

* [[J. F. Jardine]], _Simplicial presheaves_ ([page 4](http://www.math.uwo.ca/~jardine/papers/Fields-01.pdf#page=4))

[[!redirects categorical homotopy groups in an (∞,1)-topos]]

[[!redirects homotopy sheaf]]
[[!redirects homotopy sheaves]]

[[!redirects categorical homotopy groups in an infinity-topos]]
[[!redirects categorical homotopy groups in an infinity1-topos]]

[[!redirects categorical homotopy groups]]


Categorical Homotopy Theory

This page collects pointers related to the textbook

* [[Emily Riehl]],

  _Categorical Homotopy Theory_

  Cambridge University Press, 2014

  ([pdf](http://www.math.jhu.edu/~eriehl/cathtpy.pdf), [doi:10.1017/CBO9781107261457](https://doi.org/10.1017/CBO9781107261457))

on ([[simplicial homotopy theory|simplicial]]) [[homotopy theory]] and [[(∞,1)-category theory]] with emphasis on tools from [[category theory]] and [[2-category]] theory.

Related references

* {#RiehlVerity16} [[Emily Riehl]], [[Dominic Verity]], _Infinity category theory from scratch_, 2016 ([pdf](http://www.math.jhu.edu/~eriehl/scratch.pdf))

* [[Jacob Lurie]], _[[Higher Topos Theory]]_

* [[Jacob Lurie]], _[[Kerodon]]_

category: reference


categorical properties of Frölicher spaces

* tic
{: toc}

### Idea ###

On this page we shall record those aspects of the theory of Frölicher spaces that are particularly categorical in nature.

### Colimits ###

+-- {: .num_prop #colim}
###### Proposition
Every Frölicher space is functorially the colimit of a diagram of manifolds.  In fact, it is a colimit of a diagram in the full subcategory consisting of the single object $\mathbb{R}$.
=--

+-- {: .proof}
###### Proof
Let $(X,C,F)$ be a Frölicher space.  Let $\mathcal{C}$ be the category whose objects are the elements of $C$ and the morphisms $c \to c'$ correspond to the smooth functions $g \colon \mathbb{R} \to \mathbb{R}$ with $c' \circ g = c$.  Note that for a fixed curve $c'$ and a smooth function $g \colon \mathbb{R} \to \mathbb{R}$ then from the definition of a Frölicher space there is a curve $c \in C$ such that $g$ defines a morphism $c \to c'$ (take $c = c' \circ g$).

Define a functor $G \colon \mathcal{C} \to Fro$ by sending each object to $\mathbb{R}$ and sending each morphism $c \to c'$ to the corresponding smooth function.
We claim that $(X,C,F)$ is the colimit of this functor.  The morphism $G(c) \to (X,C,F)$ is simply $c$ (note that $C = Hom_{Fro}(\mathbb{R},X)$ so $c$ is a morphism in $Fro$).

Now suppose that we have suitable morphisms $g_c \colon G(c) \to (Y,C_Y,F_Y)$.  For each $x \in X$, there is a constant curve $c_x \colon \mathbb{R} \to X$ at $x$ (these are characterised by the fact that if $h \colon c \to c_x$ is a morphism in $\mathcal{C}$ then $c = c_x$).  Consider $g_{c_x} \colon \mathbb{R} \to Y$.  We shall show that this is a constant curve in $Y$.  Let $h \in C^\infty(\mathbb{R},\mathbb{R})$ and examine $g_{c_x} \circ h$.  As the $g_c$ are compatible, $g_{c_x} \circ h = g_{c_x \circ h}$.  But as $c_x$ is constant, $c_x \circ h = c_x$ so $g_{c_x} \circ h = g_{c_x}$ and thus $g_{c_x}$ is constant.

Define $h \colon X \to Y$ by $h(x) = g_{c_x}(0)$.  This is a set map, let us show that it lifts to Frölicher spaces.  To do this, we look at $h \circ c$ for a smooth curve $c \in C$.  Let $t \in \mathbb{R}$ and let $x = c(t)$ in $X$.  Then $(h \circ c)(t) = h(x) = g_{c_x}(0)$.  Let $f_t \colon \mathbb{R} \to \mathbb{R}$ be the constant function at $t$.  Then $c \circ f_t = c_x$ and so $g_c \circ f_t = g_{c_x}$.  Thus $g_{c_x}(0) = (g_c \circ f_t)(0) = g_c(t)$.  Hence $h \circ c = g_c$.  As $g_c \colon \mathbb{R} \to (Y,C_Y,F_Y)$ is a morphism in the category of Frölicher spaces with source $\mathbb{R}$, it is an element of $C_Y$.  Hence $h$ takes smooth curves in $X$ to smooth curves in $Y$ and so is a morphism of Frölicher spaces.

This also establishes $(X,C,F)$ as the colimit since we have the factorisation $g_c = h \circ c$.
=--


categorical resolution of singularities

## Definition

Given a [[dg-algebra]] $B$ a categorical resolution of the derived category $D(B)$ of $B$-modules is a pair $(A,X)$ of a dg-algebra $A$ and a dg-$B^{op}\otimes A$-module $X$ such that the restriction of the left derived functor

$$
(-)\stackrel{L}\otimes_B X : D(B)\to D(A)
$$
to the subcategory $Perf(B)$ of [[perfect complex]]es is full and faithful.

## Literature

It is introduced in

* [[Valery Lunts]], _Categorical resolution of singularities_, J. Algebra __323__:10 (2010) 2977-3003 [doi](https://doi.org/10.1016/j.jalgebra.2009.12.023) [math.AG/0905.4566](https://arxiv.org/abs/0905.4566)
* [[Alexander Kuznetsov]], V. Lunts, _Categorical resolutions of irrational singularities_, [arXiv:1212.6170](https://arxiv.org/abs/1212.6170)
* [[Alexander I. Efimov]], _Homotopy finiteness of some DG categories from algebraic geometry_, [arXiv:1308.0135](https://arxiv.org/abs/1308.0135)

category: algebraic geometry


categorical semantics

[[!redirects functorial perspective]]
[[!redirects functorial semantics]]

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Categorical algebra
+-- {: .hide}
[[!include categorical algebra -- contents]]
=--
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

One may interpret mathematical _[[logic]]_ as being a formal language for talking about the collection of [[monomorphisms]] into a given [[object]] of a given [[category]]: the [[poset of subobjects]] of that object.

More generally, one may interpret [[type theory]] and notably [[dependent type theory]] as being a formal language for talking about [[slice categories]], consisting of all morphisms into a given object.

Conversely, starting with a given theory of logic or a given type theory, we say that it has a _categorical semantics_ if there is a category such that the given theory is that of its slice categories, if it is the _[[internal logic]]_ of that category.

## Definition

For the general idea, for the moment see at _[[type theory]]_ the section _[An introduction for category theorists](type+theory#CategoricalSemantics)_ and see at _[[relation between type theory and category theory]]_.

### Of dependent type theory

We discuss how to interpret judgements of [[dependent type theory]] in a given [[category]] $\mathcal{C}$ with [[finite limits]]. For more see _[[categorical model of dependent types]]_.

Write $cod : \mathcal{C}^I \to \mathcal{C}$ for its [[codomain fibration]], and write

$$
  \chi : \mathcal{C}^{op} \to Cat
$$

for the corresponding [[Grothendieck construction|classifying functor]], the self-[[indexed category|indexing]]

$$
  \chi : \Gamma \mapsto \mathcal{C}_{/\Gamma}
$$

that sends an [[object]] of $\mathcal{C}$ to the [[slice category]] over it, and sends a morphism $f : \Gamma \to \Gamma'$ to the [[pullback]]/[[base change]] functor

$$
  f^\ast : \mathcal{C}_{/\Gamma'}
  \to
  \mathcal{C}_{/\Gamma}
  \,.
$$

We give now rules for choices "$[x y z]$" that associate with every string "$x y z$" of symbols in [[type theory]] objects and morphisms in $\mathcal{C}$. A collection of such choices following these rules is _an interpretation_ / a choice of _categorical semantics_ of the type theory in the category $\mathcal{C}$.

#### Contexts and type judgements
 {#ContextsAndTypeJudgements}

1. The empty [[context]] $()$ in [[type theory]] is interpreted as the [[terminal object]] of $\mathcal{C}$

   $$
     [ () ] := *
     \,.
   $$

1. If $\Gamma$ is a context which has already been given an interpretation $[\Gamma] \in Obj(\mathcal{C})$, then a judgement of the form

   $$
     \Gamma \vdash A : Type
   $$

   is interpreted as an object in the slice over $[\Gamma]$

   $$
     [\Gamma \vdash A : Type] \in Obj(\mathcal{C}_{/\Gamma})
     \,,
   $$

   hence as a choice of morphism

   $$
     \array{
       [(\Gamma, x : A)]
       \\
       \downarrow^{\mathrlap{[\Gamma \vdash A : Type]}}
       \\
       [\Gamma]
     }
   $$

   in $\mathcal{C}$.

1. If a judgement of the form $\Gamma \vdash A : Type$ has already found an interpretation, as above, then an extended [[context]] of the form $(\Gamma, x : A)$ is interpreted as the domain object $[(\Gamma, x : A)]$ of the above choice of morphism.

#### Terms

Assume for a context $\Gamma$ and a judgement $\Gamma \vdash A : Type$ we have already chosen an interpretation  $[\Gamma, x : A] \stackrel{[\Gamma \vdash A : Type]}{\to} [\Gamma]$ as above.

A judgement of the form $\Gamma \vdash a : A$ (a [[term]] of [[type]] $A$) is to be interpreted as a [[section]] of this morphism, equivalently as a morphism in $\mathcal{C}_{/[\Gamma]}$

$$
  [\Gamma \vdash a : A] : * \to [\Gamma, x : A]
$$

from the [[terminal object]] to $[\Gamma \vdash A : Type]$, which in $\mathcal{C}$ is a [[commuting diagram|commuting triangle]]

$$
  \array{
    [\Gamma] &&\stackrel{[(\Gamma \vdash a : A)]}{\to}&&
    [\Gamma, x : A]
    \\
    & {}_\mathllap{\mathrm{id}_{[\Gamma]}}\searrow
    &&
    \swarrow_{\mathrlap{[\Gamma \vdash A : Type]}}
    \\
    && [\Gamma]
  }
  \,.
$$

#### Variables

For a term $\Gamma \vdash  a : A$ the context $\Gamma$ is the collection of [[free variables]] in $a$.

(...)

#### Substitution

Assume that interpretations for judgements

$$
  \Gamma , x : A \vdash B(x) : Type
$$

and

$$
  \Gamma \vdash  a : A
$$

have been given as above. Then the substitution judgement

$$
  \Gamma  \vdash B[a/x] : Type
$$

is to be interpreted as follows. The interpretation of the first two terms corresponds to a diagram in $\mathcal{C}$ of the form

$$
  \array{
    &&&& [(\Gamma, x : A, y : B(x))]
    \\
    &&&&
    \downarrow^{\mathrlap{[\Gamma, x : A \vdash B(x) : Type]}}
    \\
    [\Gamma] &&\stackrel{[\Gamma \vdash a : A]}{\to}&&
     [(\Gamma, x : A)]
    \\
    & {}_{id}\searrow && \swarrow_{\mathrlap{[\Gamma \vdash A : Type]}}
    \\
    && [\Gamma]
  }
$$

The interpretation of the substitution statement is then [[generalized the|the]] [[pullback]]

$$
  [\Gamma \vdash B[a/x] : Type]
  :=
  [\Gamma \vdash a : A]^* [\Gamma, x : A \vdash B(x) : Type]
  \,,
$$

hence the morphism in $\mathcal{C}$ that universally completes the above diagram as

$$
  \array{
    [(\Gamma, y : B[x/a])]
    &&\to&& [(\Gamma, x : A, y : B(x))]
    \\
    {}^{\mathllap{[\Gamma \vdash B[a/x] : Type]
}}\downarrow
    &&&&
    \downarrow^{\mathrlap{[\Gamma, x : A \vdash B(x) : Type]}}
    \\
    [\Gamma] &&\stackrel{[\Gamma \vdash a : A]}{\to}&&
     [(\Gamma, x : A)]
    \\
    & {}_{id}\searrow && \swarrow_{\mathrlap{[\Gamma \vdash A : Type]}}
    \\
    && [\Gamma]
  }
$$

### Of homotopy type theory

See _[[categorical semantics of homotopy type theory]]_.

## Examples

* [[models in presheaf toposes]]

## Terminology
 {#Terminology}

Most usage in [[mathematics]] of the adjective "categorical" in relation to [[category theory]] is a shorthand, and arguably an unfortunate one, for "category theoretic", i.e. for  "as seen through the lens of, hence as treated with the concepts and tools of category theory".

Compare to "numerical" versus "number theoretic": The interest of number theory is not in numerical methods! Numerical statements are made by engineers. For category theorists it's worse: Their profession is not to do _categorical arguments_, not in the dictionary sense of "categorical" as "unambiguous, absolute, unqualified".

While the careful dictionaries list a secondary sense of "categorical", as "relating to a category", they hardly have the categories of Kant in mind here, much less those of Eilenberg & MacLane; instead they refer to _categorization_: Merriam-Webster [offers](https://www.merriam-webster.com/dictionary/categorical) "categorical systems for classifying books" as an example for what "categorical" could refer to, in this secondary sense, in common language. Therefore it does not seem to help much that this secondary common sense of "categorical"  is [offered](https://www.merriam-webster.com/dictionary/categorial) as the primary sense of "categorial" (without the second "c"!). But this is probably the rationale behind a more widespread use of "categorial semantics" over "categorical semantics" in the field of formal logic.

All this notwithstanding, the use in mathematics of "categorical", as in _[[categorical semantics]]_ is wide-spread, even standard. Since unfortunate choice of terminology in mathematics is rather common (compare "perverse schobers"!), and since the primary purpose of mathematical terminology is communication rather than, yes, proper categorization, there may not be much gain in opposing this trend, and not much success to doing so by replacing unfortunate terminology with something that looks like the same unfortunate terminology but with a typo in it.

## Related pages

* [[relation between type theory and category theory]]

* [[categorical model of dependent types]]

* [[initiality conjecture]]

* [[Awodey's conjecture]]

## References

A standard textbook reference for categorical semantics of logic is section D1.2 of

* [[Peter Johnstone]], _[[Sketches of an Elephant]]_

The categorical semantics of [[dependent type theory]] in [[locally cartesian closed categories]] is essentially due to

* {#Seely} [[R. A. G. Seely]], _Locally cartesian closed categories and type theory_, Math. Proc. Camb. Phil. Soc. (1984) 95 ([pdf](http://www.math.mcgill.ca/rags/LCCC/LCCC.pdf))

For more references on this see at _[[relation between category theory and type theory]]_.

See also:

* {#Pavlovic1990} [[Duško Pavlović]], *Predicates and Fibrations*, PhD thesis, Utrecht (1990) [[pdf](https://dusko.org/wp-content/uploads/2020/03/1990-proefschrift-dusko.pdf), [[Pavlovic-PredicatesAndFibrations.pdf:file]]]

Lecture notes on this include for instance.

* [[Martin Hofmann]], _Syntax and semantics of dependent types_, Semantics and Logics of Computation (P. Dybjer and A. M. Pitts, eds.), Publications of the Newton Institute, Cambridge University Press, Cambridge, (1997) pp. 79-130. ([web](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.36.8985), )

* [[Roy L. Crole]], *Categories for types*, Cambridge University Press (1994) [[doi:10.1017/CBO9781139172707](https://doi.org/10.1017/CBO9781139172707)]

See also section B.3 of

* [[Michael Warren]], _Homotopy Theoretic Aspects of Constructive Type Theory_ ([pdf](http://www.andrew.cmu.edu/user/awodey/students/warren.pdf))

A comprehensive definition of semantics of [[homotopy type theory]] in [[type-theoretic model categories]] is in section 2 of

* {#Shulman12} [[Michael Shulman]], _Univalence for inverse diagrams and homotopy canonicity_, Mathematical Structures in Computer Science, Volume 25, Issue 5 ( _From type theory and homotopy theory to Univalent Foundations of Mathematics_ ) June 2015 ([arXiv:1203.3253](https://arxiv.org/abs/1203.3253), [doi:/10.1017/S0960129514000565](https://doi.org/10.1017/S0960129514000565))