internal (co-)limit

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### $(\infty,1)$-Category theory
#### Limits and colimits
+--{: .hide}
[[!include infinity-limits - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

Speaking in the [[internal language]] of a given [[category]] $\mathbf{H}$, one may try to formulate [[universal constructions]] such as of [[limits]]/[[colimits]] internally.

Given the system of [[slice categories]] $\mathbf{H}_{/X}$ of $\mathbf{H}$ (or more generally any [[indexed category]] $X \mapsto \mathbf{H}_X$), then one may regard $X$ as the shape of a discrete [[internal diagram]] in $\mathbf{H}$, and regard the objects in the slice $\mathbf{H}_{/X}$ as discrete actual [[internal diagrams]] of this shape.

If $\mathbf{H}$ happens to have a (small) [[object classifier]] $\mathbf{h}$, then this is particularly evocative, as then (small) such slice objects $\hat F$ over $X$ [[equivalence|equivalent]] to morphisms $F \colon X \to \mathbf{h}$, hence are  directly analogous to external diagrams in the form of [[functors]] $\mathcal{X}\to \mathbf{H}$.

Now if $\mathbf{H}$ has good enough properties as a (self-)[[indexed category]] in that it is a [[hyperdoctrine]] with [[dependent sum]] $\underset{X \stackrel{f}{\to} Y}{\sum} \colon \mathbf{H}_{/X} \to \mathbf{H}_{/Y}$ and [[dependent product]] $\underset{X \stackrel{f}{\to} Y}{\prod} \colon \mathbf{H}_{/X} \to \mathbf{H}_{/Y}$ operations, then it makes sense to define the _internal colimit_ of a discrete diagram as above as

$$
  \underset{\longrightarrow}{\lim} F \coloneqq \underset{X}{\sum} \hat F
$$

and the _internal limit_ as

$$
  \underset{\longleftarrow}{\lim} F \coloneqq \underset{X}{\prod} \hat F
  \,.
$$

Of course with $X$ being, internally, a discrete diagram shape these are, so far, just internal [[coproducts]] and internal [[products]], respectively (which is of course the source of the terminology "dependent sum" and "dependent product").

It is more or less straightforward to extend the above from $\mathbf{H}$ to $Cat(\mathbf{H})$, the collection of [[internal categories]] in $\mathbf{H}$, then consider for a given internal category (hence [[internal diagram]] shape) $C \in Cat(\mathbf{H})$ the objects in $Cat(\mathbf{H})_{/C}$ as not-necessarily discrete diagrams, and proceed as before. For various specific choices of context $\mathbf{H}$, this is considered in ([Johnstone, below prop. B2.3.20](#Johnstone), [Pisani 09, p.18, p. 23](#Pisani09), [HoTTBook, section 6.12](#HoTTBook)).

To see internally the expected [[universal property]] of the above definition, consider the [[internal diagram|internal]] $X$-diagram constant on any $A \in \mathbf{H}$, namely $X^\ast A \in \mathbf{H}_{/X}$. If there is an [[object classifier]] $\mathbf{h}$ then this corresponds indeed to the [[constant map]]  $X \to \ast \stackrel{\vdash A}{\to} \mathbf{h}$. Accordingly an internal [[cone]] with tip $A$ over the diagram $F$ as above  is a morphism of $X$-diagrams (hence in $\mathbf{H}_{/X}$) of the fomr

$$
  X^\ast A \longrightarrow \hat F
  \,.
$$

Now by the defining [[adjunction]] $(X^\ast \dashv \underset{X}{\prod})$ of the [[dependent product]], such morphisms are equivalent to morphisms

$$
  A \longrightarrow \underset{X}{\prod} \hat F
$$

in $\mathbf{H}$, hence by the above definition to morphisms

$$
  A \longrightarrow \underset{\longleftarrow}{\lim} F
$$

from $A$ into the internal colimit.

This is clearly the internal version of the statement that is extrernally true [[Set]], that the [[limit]] of sets over a diagram is the set of all its [[cones]].

Dually, an internal [[cocone]] is a morphism

$$
  \hat F \longrightarrow X^\ast A
$$

in $\mathbf{H}_{/X}$, and by the defining [[adjunction]] $(\underset{X}{\sum} \dashv X^\ast)$ of the [[dependent sum]] this is equivalently a morphism

$$
  \underset{\longrightarrow}{\lim} F \longrightarrow A
$$

exhibiting internally the statement familiar externally from [[Set]] that maps out of colimits of a diagram are equivalently cocones under that diagram.

## Examples

### $\infty$-Groupoidal homotopy limits and colimits of $\infty$-groupoids
 {#ExamplesInfinityGroupoidal}

The small [[object classifier]] of the [[(∞,1)-topos]] [[∞Grpd]] is $Core(\infty Grpd_{small})$ itself. Hence an $\infty$-groupoidal-shaped diagram of [[∞-groupoids]] is _internally_ in [[∞Grpd]] a discrete diagram $ F \colon X\to Core(\infty Grpd_{small})$. The slice object classified by this is the pullback of the [[universal right fibration]], which is equivalently its [[(∞,1)-Grothendieck construction]] $\hat F = \int_X F$.

Accordingly the above gives the internal limits and colimits

$$
  \underset{\longleftarrow}{\lim} F = \underset{X}{\sum} \hat F
$$

and

$$
  \underset{\longrightarrow}{\lim} F = \underset{X}{\prod} \hat F
  \,.
$$

There are indeed also the correct external [[(∞,1)-colimits]] and [[(∞,1)-limits]], by the discussion [here](limit+in+a+quasi-category#WithValInooGrpd).

### Borel construction and homotopy-quotients, -invariants, -coinvariants
 {#BorelConstructionHomotopyQuotients}

For $\mathbf{H}$ an [[(∞,1)-topos]] and $G$ an [[∞-group]] object, consider $X = \mathbf{B}G$ its [[delooping]]. Externally this is in general highly non-discrete, but internally this, being $\infty$-groupoidal, is a disrete diagram shape.

An [[internal diagram]] of this shape

$$
  \rho \;\colon\;  \mathbf{B}G \longrightarrow \mathbf{h}
$$

is equivalently an [[∞-action]] of $G$ on the object $V$ named by

$$
  \ast \to\mathbf{B}G \longrightarrow \mathbf{h}
  \,.
$$

Now the internal colimit

$$
  \underset{\longrightarrow}{\lim} \rho = \underset{\mathbf{B}G}{\sum} \hat \rho
  \simeq
   V/\!/G
$$

is the [[homotopy quotient]] of $V$ by $G$, equivalently the object of [[homotopy coinvariants]]. In $\mathbf{H} = $ [[∞Grpd]] this is given by the [[Borel construction]].

Similarly, the internal limit

$$
  \underset{\longleftarrow}{\lim} \rho = \underset{\mathbf{B}G}{\prod} \hat\rho
  \simeq
   Ext_G(\ast, V)
$$

is the [[homotopy invariants]] of the action.

More generally, the internal left and right [[Kan extension]] give the [[induced representation]] and [[coinduced representation]] constructions. See at _[[∞-action]]_ for more on this.

## References

* [[Francis Borceux]], Chapter 8 in Vol 1 _Basic Category Theory_ of: _[[Handbook of Categorical Algebra]]_, Cambridge University Press (1994)  ([doi:10.1017/CBO9780511525858](https://doi.org/10.1017/CBO9780511525858))

* {#Johnstone} [[Peter Johnstone]], section B2 in _[[Sketches of an Elephant]]_

* {#Pisani09} [[Claudio Pisani]], _Balanced Category Theory II_ ([arXiv:0904.1790](http://arxiv.org/abs/0904.1790))

* {#HoTTBook} [[Univalent Foundations Project]], section 6.12 of _[[Homotopy Type Theory -- Univalent Foundations of Mathematics]]_

[[!redirects internal (co-)limits]]

[[!redirects internal limit]]
[[!redirects internal limits]]

[[!redirects internal colimit]]
[[!redirects internal colimits]]


internal antisymmetric relation

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

# Contents
* table of contents
{: toc}

## Idea

The notion of an *internal antisymmetric relation* is the generalization of that of *[[antisymmetric relations]]* as one passes from the ambient [[category of sets]] [[internalization|into]] more general ambient  [[categories]] with suitable properties.

## Definitions

In a [[finitely complete category]] $C$, an **internal antisymmetric relation** is an [[internal relation]] $R\stackrel{(s,t)}\hookrightarrow X \times X$ on an object $X$ with a [[monomorphism]] $\alpha:R \times_X R^\op \hookrightarrow X$ into the [[diagonal subobject]] $X$, where $R \times_X R^\op$ is the [[pullback]] of the [[internal relation]] $(s,t)$ and its [[opposite internal relation]] $(t,s)$.

## See also

* [[internal relation]]

* [[opposite internal relation]]

* [[partially ordered object]]

* [[antisymmetric relation]]

[[!redirects internal antisymmetric relations]]


internal category

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

#Contents#
* table of contents
{:toc}

## Idea

The notion of a [[category]] can be formulated [[internalization|internal]] to any other category with enough [[pullback|pullbacks]].

By regarding [[group|groups]] as [[pointed object|pointed]] [[n-connected object of an (infinity,1)-topos|connected]] ([[delooping]]) [[groupoid|groupoids]], this generalizes the notion of [[internal groups]].

An ordinary [[small category]] is a category internal to [[Set]].

There is a more general notion of an [[internal category in a monoidal category]], where the [[pullbacks]] are replaced by cotensor products.

## Definition

### Internal category

Let $A$ be a [[category]] with [[pullbacks]]. A **category internal to $A$** consists of

* an [[object]] _of objects_ $C_0 \in A$;

* an [[object]] _of morphisms_ $C_1 \in A$;

together with

* [[source]] and [[target]] [[morphisms]] $s,t: C_1 \to C_0$;

* an [[identity-assigning morphism]] $e: C_0 \to C_1$;

* a [[composition]] morphism $c: C_1 \times_{C_0} C_1 \to C_1$;

such that the following [[diagrams]] [[commuting diagram|commute]], expressing the usual category laws:

* laws specifying the source and target of identity morphisms:

$$
\array{
  C_0
  & \overset{e}{\longrightarrow}
  &
  C_1
  \\
  {}
  &
  \mathllap{{}_{1}}\searrow
  &
  \big\downarrow \mathrlap{{}^{s}}
  \\
  {}  & {} & C_0
}
\quad\quad\quad\quad
\array{
  C_0
  &
  \overset{e}{\longrightarrow}
  &
  C_1
  \\
  {}  & \mathllap{{}_{1}}\searrow &
  \big\downarrow \mathrlap{{}^{t}}
  \\
  {} & {} &
  C_0
}
$$

* laws specifying the [[source]] and [[target]] of composite morphisms:

$$
\array{
  C_1 \times_{C_0} C_1
  & \overset{c}{\longrightarrow} & C_1
  \\
  \mathllap{{}^{p_1}}\big\downarrow
  & {} &
  \big\downarrow \mathrlap{{}^{s}}
  \\
  C_1
  &
  \underset{s}{\longrightarrow}
  &
  C_0
}
\quad\quad\quad\quad
\array{
  C_1 \times_{C_0} C_1
  &
  \overset{c}{\longrightarrow}
  &
  C_1
  \\
  \mathllap{{}^{p_2}}\big\downarrow
  & {} &
  \big\downarrow\mathrlap{{}^{t}}
  \\
  C_1 &
  \underset{t}{\longrightarrow}
  &
  C_0
}
$$

* the [[associative law]] for [[composition]] of morphisms:

\begin{centre}

\begin{xymatrix@R10mm}

({C_1}\times_{{C_0}}{C_1})\times_{{C_0}}{C_1} \ar[d]_{\langle\pi_0\circ\pi_2,\pi_1\times1_{{C_1}}\rangle} \ar[r]^{~~~~~{c}\times_{_{_{{C_0}}}}1_{{C_1}}} \ar[r] & {C_1}\times_{{C_0}}{C_1} \ar[dd]^{{c}} \\
{C_1}\times_{{C_0}}({C_1}\times_{{C_0}}{C_1}) \ar[d]_{1_{{C_1}}\times_{_{_{{C_0}}}}{c}} \\
{C_1}\times_{{C_0}}{C_1} \ar[r]_{~~~~{c}} & {C_1}

\end{xymatrix}

\end{centre}

* the left and right [[unit laws]] for composition of morphisms:

$$
\array{
C_0 \times_{C_0} C_1  & \stackrel{e \times_{C_0} 1}{\to} &
 C_1 \times_{C_0} C_1 & \stackrel{1 \times_{C_0} e}{\leftarrow} & C_1 \times_{C_0} C_0 \\
{}                    & {}^{p_2}\searrow                 & \downarrow^{c}       & \swarrow^{p_1}                          & {} \\
{}                    & {}                               & C_1                  & {}                                      & {}
}
$$

The relevant [[pullbacks]] and [[universal property|uniquely induced]] [[isomorphisms]] are formed as below:

$$
\array{
  C_1 \times_{C_0} C_1
  &
  \overset{p_2}{\longrightarrow}
  &
  C_1
  \\
  \mathllap{{}^{p_1}}\big\downarrow
  & {} &
  \big\downarrow \mathrlap{{}^{s}}
  \\
  C_1 &
  \underset{t}{\longrightarrow}
  &
  C_0
}
$$

\begin{centre}

\begin{xymatrix@R10mm}

({C_1}\times_{{C_0}}{C_1})\times_{{C_0}}{C_1} \ar[r]^{~~~~~~~~~~\pi_3} \ar[d]_{\pi_2} & {C_1} \ar[d]^{{s}} \\ {C_1}\times_{{C_0}}{C_1} \ar[r]_{~~~{t}\circ{c}} & {C_0}

\end{xymatrix}

\begin{xymatrix@R10mm}

{C_1}\times_{{C_0}}({C_1}\times_{{C_0}}{C_1}) \ar[r]^{~~~~~~~\pi_5} \ar[d]_{\pi_4} & {C_1}\times_{{C_0}}{C_1} \ar[d]^{{s}\circ{c}} \\ {C_1} \ar[r]_{{t}} & {C_0}

\end{xymatrix}

\begin{xymatrix@R10mm}

({{C_1}}\times_{{C_0}}{{C_1}})\times_{{C_0}}{{C_1}} \ar[rr]^{~~~~~~~~~~\pi_3} \ar[dd]_{\pi_2} \ar@{-->}[rd]^{~~\pi_1\times_{{C_0}}1_{{C_1}}} & & {{C_1}} \ar[d]^{1_{{C_1}}} \\ & {{C_1}}\times_{{C_0}}{{C_1}} \ar[r]^{~~~\pi_1} \ar[d]_{\pi_0} & {{C_1}} \ar[d]^{{s}} \\ {{C_1}}\times_{{C_0}}{{C_1}} \ar[r]_{~~~\pi_1} & {{C_1}} \ar[r]_{~{t}} & {{C_0}}

\end{xymatrix}

\begin{xymatrix@R10mm}

({{C_1}}\times_{{C_0}}{{C_1}})\times_{{C_0}}{{C_1}} \ar@/^1pc/[rrd]^{\pi_1\times_{{C_0}}1_{{C_1}}} \ar[ddd]_{\pi_2} \ar@{-->}[rd]_{\langle\pi_0\circ\pi_2,\pi_1\times1_{{C_1}}\rangle~~~~}  \\ & {{C_1}}\times_{{C_0}}({{C_1}}\times_{{C_0}}{{C_1}}) \ar[r]^{~~~~~\pi_5} \ar[dd]_{\pi_4} & {{C_1}}\times_{{C_0}}{{C_1}} \ar[d]^{\pi_0} \\ & & {{C_1}} \ar[d]^{{s}} \\ {{C_1}}\times_{{C_0}}{{C_1}} \ar[r]_{~~~\pi_0} & {{C_1}} \ar[r]_{~~{t}} & {{C_0}}

\end{xymatrix}

\end{centre}

Notice that inherent to this definition is the assumption that the [[pullbacks]] involved actually exist. This holds automatically when the [[ambient category]] $A$ has finite [[limit|limits]], but there are some important examples such as $A =\,$ [[Diff]] where this is not the case.  Here it is helpful to assume simply that $s$ and $t$ have all [[pullbacks]]; in the case of $Diff$ this occurs if they are submersions.

### Internal groupoid

A [[groupoid]] internal to $A$ is all of the above

 * with a morphism
  $$
     C_1 \stackrel{i}{\to} C_1
  $$

 * such that
  $$
t = ( C_1 \stackrel{i}{\to} C_1 \stackrel{s}{\to} C_0 ),\;\;\;\;
s = ( C_1 \stackrel{i}{\to} C_1 \stackrel{t}{\to} C_0 ).
  $$

 * and
   $$
     \array{
     C_1 &\stackrel{diag}{\to}& C_1\;{}_t \times_{C_0}{}_t C_1 &\stackrel{Id \times i}{\to}& C_1\;{}_t \times_{C_0}{}_s C_1
     \\
     \downarrow^s &&&& \; \downarrow^c
     \\
     C_0 &&\stackrel{e}{\to}&& C_1
     }
   $$

 * and
   $$
     \array{
     C_1 &\stackrel{diag}{\to}& C_1\;{}_s \times_{C_0}{}_s C_1 &\stackrel{i \times Id}{\to}& C_1\;{}_t \times_{C_0}{}_s C_1
     \\
     \downarrow^t &&&& \; \downarrow^c
     \\
     C_0 &&\stackrel{e}{\to}&& C_1
     }
   $$

### Internal functors

[[functor|Functors]] between internal categories are defined in a similar fashion. See [[functor]].  But if the ambient category does not satisfy the [[axiom of choice]] it is often better to use [[anafunctor|anafunctors]] instead; this makes sense when $C$ is a [[superextensive site]].

### Alternative definition

If $A$ has all [[pullbacks]], then we can form the bicategory $Span(A)$ of [[span|spans]] in $A$.  A category in $A$ is precisely a [[monad]] in $Span(A)$.  The underlying 1-cell is given by the span $(s,t) : C_0 \leftarrow C_1 \to C_0$, and the [[pullback]] $C_1 \times_{C_0} C_1$ is the vertex of the composite span $(s,t) \circ (s,t)$.  The morphisms $e$ and $c$ are required to be morphisms of spans, which is equivalent to imposing the source and target axioms above.  Finally the unit and associativity axioms for monads imply those above.

This approach makes it easy to define the notion of [[internal profunctor]].

### Internal nerve

The notion of [[nerve]] of a [[small category]] can be generalised to give an *internal nerve* construction. For a small category, $D$, its [[nerve]], $N(D)$, is a simplicial set whose set of $n$-simplices is the set of sequences of composable morphisms of length $n$ in $D$. This set can be given by a (multiple) [[pullback]] of copies of $D_1$.  That description will carry across to give a nerve construction for an internal category.

If $C$ is an internal category in some category $A$, (which thus has, at least, the [[pullbacks]] required for the constructions to make sense),its nerve $N(C)$ (or if more precision is needed $N_{int}(C)$, or similar) is the [[simplicial object]] in $A$ with

 * $N(C)_0 = C_0$, the 'object of objects' of $C$;
 * $N(C)_1  = C_1$, the 'object of arrows' of $C$;
 * $N(C)_2 = C_1 \times_{C_0} C_1$ the object of [[composable pairs]] of arrows of $C$;
* $N(C)_3 = C_1 \times_{C_0} C_1\times_{C_0} C_1$, the object of composable triples of arrows;

and so on.  Face and degeneracy morphisms are induced from the structural moprhisms of $C$ in a fairly obvious way.

Internal functors between internal categories induce simplicial morphisms between the corresponding nerves.

### Internal category in homotopy type theory

Discussion in [[homotopy type theory]] is at _[[internal category in homotopy type theory]]_.

### Higher internal categories

One can also look at this in [[higher category theory]] and consider internal [[n-category|n-categories]]. See

* [[n-fold category]]

* [[internal infinity-groupoid]]

* [[internal (infinity,1)-category]]

* [[internal (infinity,n)-category]]

The general concept is that of an [[n-by-k category|$(n \times k)$-category]], which is an $n$-category internal to a $k$-category.

## Examples

A [[small category]] is a category internal to [[Set]].  In this case, $C_0$ is a set of objects and $C_1$ is a set of morphisms and the [[pullback]] is a [[subset]] of the [[Cartesian product]].

Historically, the motivating example was (apparently) the notion of [[Lie groupoids]]: a small Lie groupoid is a [[groupoid]] internal to the category [[Diff]] of [[smooth manifolds]]. This generalises immediately to a [[smooth category]]. Similarly, a [[topological groupoid]] is a groupoid internal to [[Top]]. (Warning: the term 'topological category' usually means a [[topological concrete category]], an unrelated notion. Sometimes a 'topological category' is defined to be a $Top$-[[enriched category]], which is a special case of the internal definition if it is interpreted [[strict category|strictly]] and the collection of objects is small.)  In these examples, $C_0$ is a "space of objects" and $C_1$ a "space of morphisms".

Further examples:

* A category internal to [[Set]] is a [[small category]]
* A groupoid internal to [[definable sets]] is a [[definable groupoid]].

* A groupoid internal to a [[category of presheaves]] is a [[presheaf of groupoids]].

* A groupoid internal to the [[opposite category|opposite]] of [[CRing]] is a [[commutative Hopf algebroid]].

* A pointed one-object category internal to [[Ho(Top)]] is an [[H-monoid]].

* A pointed one-object groupoid internal to [[Ho(Top)]] is an [[H-group]].

* A [[cocategory]] in $C$ is a category internal to $C^{op}$.
* A [[double category]] is a category internal to [[Cat]].
* A [[double bicategory]] is a category internal to [[Bicat]] (in a suitably weak sense).
* A [[crossed module]] is equivalent to a category internal to [[Grp]].
* A [[Baez-Crans 2-vector space]] is a category internal to [[Vect]].

* A [[2-group]] is an internal category in [[Grp]] and so has an internal nerve, which is a simplicial object in [[Grp]], that is  a [[simplicial group]].  If the 2-group corresponds to a [[crossed module]], $(C\stackrel{\delta}{\to}P)$, then the simplicial group nerve of $(C\stackrel{\delta}{\to}P)$ has [[Moore complex]] having $P$ in dimension 0, and $C$ in dimension 1, with the trivial group in all other dimensions. The only possible non-trivial boundary map from dimension 1 to dimension 0 is then the boundary $\delta$ of the crossed module.

## Properties
 {#Properties}

### In a cartesian closed category
 {#CartesianClosure}

If the ambient (finitely complete) category $\mathbf{E}$ is a [[cartesian closed category]], then the category $Cat(\mathbf{E})$ of categories internal to $\mathbf{E}$ is also cartesian closed. This was [proved](#BastianiEhresmann_69) [twice](#BastianiEhresmann_72) by [[Ehresmann|Charles]] and [[Andree Ehresmann|Andrée]] (under her maiden name Bastiani) Ehresmann using generalised sketches, or may be proven directly as follows (see also [Johnstone, remark after B2.3.15](#Johnstone)):

+-- {: .num_theorem}
###### Theorem
Let $\mathbf{E}$ be a finitely complete cartesian closed category. Then the category $Cat(\mathbf{E})$ of internal categories in $E$ is also finitely complete and cartesian closed.
=--

+-- {: .proof}
###### Proof
First suppose $\mathbf{E}$ is finitely complete. Then the category of directed graphs $\mathbf{E}^{\bullet \stackrel{\to}{\to} \bullet}$ is also finitely complete, and since $Cat(\mathbf{E})$ is monadic over $\mathbf{E}^{\bullet \stackrel{\to}{\to} \bullet}$, it follows that $Cat(\mathbf{E})$ is also finitely complete.

Now suppose that $\mathbf{E}$ is finitely complete and cartesian closed. Let $\Delta_3$ denote the category of nonempty ordinals up to and including the ordinal with 4 elements. We have a full and faithful embedding

$$N \colon Cat(\mathbf{E}) \to \mathbf{E}^{\Delta_3^{op}}$$

where the codomain category is cartesian closed. Indeed, the exponential of two objects $F$, $G$ in $\mathbf{E}^{\Delta_3^{op}}$ may be computed as an $\mathbf{E}$-enriched end

$$G^F(m) = \int_n \prod_{f \colon n \to m} G(n)^{F(n)}$$

when evaluated at $m \in Ob(\mathbf{E}^{\Delta_3^{op}})$, as is easily checked (see for instance [here](http://ncatlab.org/nlab/show/cartesian+closed+category#exponentials_of_cartesian_closed_categories_30)); note that this end is a finite limit diagram since $\Delta_3$ is finite.

If $C$, $D$ are internal categories in $\mathbf{E}$, seen as functors $\Delta_3^{op} \to \mathbf{E}$, the exponential $N C^{N D}$ defines the exponential in $Cat(\mathbf{E})$. To see this, it suffices to check that $N C^{N D}$, as defined by the end formula above, is a category $B$, i.e., is in the essential image of the nerve functor. For in that case, we have natural isomorphisms

$$\frac{
\frac{F \times D \to C \;\;\;\text{in}\; Cat(\mathbf{E})}
{N F \times N D \cong N(F \times D) \to N C \;\;\;\text{in}\; \mathbf{E}^{\Delta_3^{op}}}}
{\frac{N F \to N C^{N D} \;\;\;\text{in}\; \mathbf{E}^{\Delta_3^{op}}}
{F \to B \;\;\;\text{in}\; Cat(\mathbf{E})}}$$

whence $B$ satisfies the universal property required of an exponential.

Objects in the essential image of the nerve $N$ are characterized as functors $\Delta_3^{op} \to \mathbf{E}$ which take intervalic joins in $\Delta_3$ to [[pullbacks]] in $\mathbf{E}$, as given precisely by the [[Segal conditions]]. The remainder of the proof is then finished by the following lemma.
=--

+-- {: .num_lemma}
###### Lemma
If $C \colon \Delta_3^{op} \to \mathbf{E}$ satisfies the [[Segal conditions]] and $X \colon \Delta_3^{op} \to \mathbf{E}$ is any functor, then $C^X$ also satisfies the Segal conditions.
=--

+-- {: .proof}
###### Proof
For any $X$ we have the formula

$$C^X(m) = \int_k Hom(X k, \prod_{f \colon n \to k} \prod_{g \colon n \to m} C(n)).$$

Since the enriched [[end]] and the internal hom-functor $Hom(X k, -)$ both [[preserved limit|preserve]] [[pullbacks]], we are reduced to checking that

* If $C$ satisfies the [[Segal conditions]], then so does
$$\prod_{f \colon n \to k} \prod_{g \colon n \to m} C(n)$$
as a functor $\Delta_3^{op} \to \mathbf{E}$ in the argument $m$ (for each fixed $k$).

Note that the displayed statement is a proposition in the language of finitely complete categories (i.e., in finitary essentially algebraic logic). Since hom-functors $\mathbf{E}(e, -) \colon \mathbf{E} \to Set$ jointly preserve and reflect the validity of such propositions, it suffices to prove it for the case where $\mathbf{E} = Set$. But this is classical elementary category theory; it says precisely that if $C$ is a small (ordinary) category, then the usual functor categories $C^{\mathbf{2}}$, $C^{\mathbf{3}}$ are equivalently described by exponentials of (truncated) simplicial sets. This completes the proof.
=--

### In a topos
 {#InATopos}

If the ambient category is a [[topos]], then with the right kind of notion of internal functor, the internal groupoids form the corresponding [[(2,1)-topos]] of [[groupoid]]-valued stacks and the internal categories form the corresponding [[2-topos]] of [[category]]-valued stacks/[[2-sheaves]].

For the precise statement see at _[2-topos -- In terms of internal categories](2-topos#InTermsOfInternalCategories)_

## Internalization versus enrichment

See [[internalization versus enrichment]].

## Related concepts

* [[internal groupoid]]

* [[locally internal category]]

* [[internal category in a monoidal category]]

* [[weak equivalence of internal categories]]

* [[category object in an (infinity,1)-category]]

* [2-Topos -- In terms of internal categories](2-topos#InTermsOfInternalCategories)

  * [[2-sheaf]]

  * [[2-congruence]]

* [[(n × k)-category]]

* [[internal site]]

* [[internal logic]]

* [[enriched category]]

## References
 {#References}

The general definition of internal categories seems to have first been formulated in:

* {#Grothendieck61} [[Alexander Grothendieck]], p. 106 (9 of 21) of: [[FGA]] _Techniques de construction et théorèmes d'existence en géométrie algébrique III: préschémas quotients_, Séminaire Bourbaki: années 1960/61, exposés 205-222, Séminaire Bourbaki, no. 6 (1961), Exposé no. 212,   ([numdam:SB_1960-1961__6__99_0](http://www.numdam.org/item/?id=SB_1960-1961__6__99_0), [pdf](http://www.numdam.org/item/SB_1960-1961__6__99_0.pdf), [English translation](https://thosgood.com/fga/FGA-3-III.html#fga-3-iii-section-4))

following the general principle of [[internalization]] formulated in

* {#Grothendieck60} [[Alexander Grothendieck]], p. 370 (3 of 23) in: [[FGA]] *Technique de descente et théorèmes d'existence en géométrie algébriques. II: Le théorème d'existence en théorie formelle des modules*, Séminaire Bourbaki : années 1958/59 - 1959/60, exposés 169-204, Séminaire Bourbaki, no. 5 (1960), Exposé no. 195 ([numdam:SB_1958-1960__5__369_0](http://www.numdam.org/item/SB_1958-1960__5__369_0), [pdf](http://www.numdam.org/item/SB_1958-1960__5__369_0.pdf), [English translation](https://thosgood.com/fga/FGA-3-II.html))

The concept of [[topological groupoids]] and [[Lie groupoids]] goes back to

* [[Charles Ehresmann]], _Catégories topologiques et categories différentiables_, Colloque de Géométrie différentielle globale, Bruxelles, C.B.R.M., (1959) pp. 137-150 ([[EhresmannCategoriesTopologiques.pdf:file]], [zbMath:0205.28202](https://zbmath.org/?q=an:0205.28202))

and their understanding as categories internal to [[TopologicalSpaces]] and to [[SmoothManifolds]] is often attributed to

* [[Charles Ehresmann]], _Catégories structurées_, Annales scientifiques de l'École Normale Supérieure, Série 3, Tome 80 (1963) no. 4, pp. 349-426 ([numdam:ASENS_1963_3_80_4_349_0](http://www.numdam.org/item/ASENS_1963_3_80_4_349_0))

but it seems that the definition is not actually contained in there, certainly not in its simple and widely understood form due to [Grothendieck 61](#Grothendieck61).

The observation that (internal) categories are [[monads]] in the [[bicategory of spans]]:

* {#Bénabou67} [[Jean Bénabou]], §5.4.3 in: *Introduction to Bicategories*, Lecture Notes in Mathematics **47** Springer (1967) 1-77 [[doi:10.1007/BFb0074299](http://dx.doi.org/10.1007/BFb0074299)]

* [[Jean Celeyrette]], *Catégories internes et fibrations* & *Cohomologie de Gel'fand-Fuks*, PhD thesis, Paris (1975) [[pdf](/nlab/files/celeyrette-thesis-1975.pdf)]

On [[category]]-valued [[stacks]] ([[2-sheaves]]) as [[internal categories]] in a [[sheaf topos]], and on [[weak equivalences of internal categories]]:

* [[Marta Bunge]], [[Robert Paré]], _Stacks and equivalence of indexed categories_, [[Cahiers|Cahiers de Top. et Géom. Diff. Catég]] **20** 4 (1979) 373-399 [[numdam:CTGDC_1979__20_4_373_0](http://www.numdam.org/item?id=CTGDC_1979__20_4_373_0)]

* [[Marta Bunge]], *Stack completions and Morita equivalence for categories in a topos*, [[Cahiers|Cahiers de Top. et Géom. Diff. Catég]] **20** 4, (1979) 401-436 [[numdam](http://www.numdam.org/item?id=CTGDC_1979__20_4_401_0), [MR558106](http://www.ams.org/mathscinet-getitem?mr=558106)]

Establishing the [[canonical model structure on Cat|canonical model structure]] for internal categories in a [[Grothendieck topos]]:

* [[André Joyal]], [[Myles Tierney]], *Strong stacks and classifying spaces*, in: *Category Theory* ([[Como]], 1990), Lecture Notes in Mathematics **1488**, Springer (1991) 213-236 [[doi:10.1007/BFb0084222](https://doi.org/10.1007/BFb0084222)]

and in the further generality of [[finitely complete categories]]:

* [[Tomas Everaert]], [[Rudger W. Kieboom]], [[Tim Van der Linden]], _Model structures for homotopy of internal categories_, Theory and Applications of Categories,  **15** 3  (CT2004) 66-94 [[tac:15-03](http://www.tac.mta.ca/tac/volumes/15/3/15-03abs.html)]

Review of the basics of internal categories:

* [[Magnus Forrester-Barker]], *Group Objects and Internal Categories* [[arXiv:math/0212065](https://arxiv.org/abs/math/0212065)]

The notion of [[internal profunctors]] between internal categories (without recalling their definition) is due to:

* {#Benabou73} [[Jean Bénabou]], §5.1 of: *Les distributeurs*, Université Catholique de Louvain, Institut de Mathématique Pure et Appliquée,  rapport **33** (1973) [[pdf](http://www.entretemps.asso.fr/maths/DistributeursLouvain.pdf), [[Benabou-LesDistributeurs.pdf:file]]]

An early textbook account with explicit definitions of [[internal categories]], [[internal functors]] and [[internal profunctors]]:

* {#Johnstone77} [[Peter Johnstone]], Chapter 2 of: _Topos theory_, London Math. Soc. Monographs __10__, Acad. Press 1977, xxiii+367 pp. (Available as Dover Reprint, Mineola 2014)

Further textbook accounts:

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

* [[Francis Borceux]], Chapter 8 in Vol 1, _Basic Category Theory_ , of: _[[Handbook of Categorical Algebra]]_, Cambridge University Press (1994)  ([doi:10.1017/CBO9780511525858](https://doi.org/10.1017/CBO9780511525858))

* [[Bart Jacobs]], Chapter 7 in: *Categorical Logic and Type Theory*, Studies in Logic and the Foundations of Mathematics **141**, Elsevier (1998)  [[ISBN:978-0-444-50170-7](https://www.sciencedirect.com/bookseries/studies-in-logic-and-the-foundations-of-mathematics/vol/141), [pdf](https://people.mpi-sws.org/~dreyer/courses/catlogic/jacobs.pdf)]

and with emphasis on an ambient [[topos theory]]:

* {#Johnstone}[[Peter Johnstone]], Section B2.3 in: Vol. 1 of: _[[Sketches of an Elephant -- A Topos Theory Compendium]]_, Oxford University Press (2002)([ISBN:9780198534259](https://global.oup.com/academic/product/sketches-of-an-elephant-9780198534259))

* [[Saunders MacLane]], [[Ieke Moerdijk]], section V.7 of: _[[Sheaves in Geometry and Logic]]_ (1992)

Survey and introduction with an eye towards [[Lie theory]]:

* [[Jean Pradines]], _In [[Ehresmann]]'s footsteps: from Group Geometries to Groupoid Geometries_, Banach Center Publications, vol. 76, Warsawa 2007, 87-157 ([arXiv:0711.1608](http://arxiv.org/abs/0711.1608), [doi:10.4064/bc76-0-5 ](https://www.impan.pl/en/publishing-house/banach-center-publications/all/76/0/86184/in-ehresmann-s-footsteps-from-group-geometries-to-groupoid-geometries))

* [[John Baez]], [[Alissa Crans]], _[Higher-Dimensional Algebra VI: Lie 2-Algebras](http://arxiv.org/abs/math/0307263)_

The original proofs that the category of internal categories is [[cartesian closed category|cartesian closed]] when the ambient category is [[finitely complete category|finitely complete]] and [[cartesian closed category|cartesian closed]] are in

* {#BastianiEhresmann_69} [[Andrée Bastiani]], [[Charles Ehresmann]], _Catégories de foncteurs structurés_, Cahiers de Topologie et Géométrie Différentielle Catégoriques, 11 no. 3 (1969), p. 329-384 ([numdam:CTGDC_1969__11_3_329_0](http://www.numdam.org/item?id=CTGDC_1969__11_3_329_0))

* {#BastianiEhresmann_72} [[Andrée Bastiani]], [[Charles Ehresmann]], _Categories of sketched structures_, Cahiers de Topologie et Géométrie Différentielle Catégoriques, 13 no. 2 (1972), p. 104-214 ([Numdam](http://www.numdam.org/item?id=CTGDC_1972__13_2_104_0))

See also:

* [[Enrico Ghiorzi]], Section 1.2 of: *Complete internal categories* ([arXiv:2004.08741](https://arxiv.org/abs/2004.08741))

Discussion in terms of [[monads]] in [[spans]]:

* Renato Betti, _Formal theory of internal categories_, Le Matematiche Vol. LI (1996) Supplemento 35-52 [pdf](http://www.dmi.unict.it/ojs/index.php/lematematiche/article/view/456/427)

Discussion of the [[canonical model structure]] on categories of internal categories:

* [[Tomas Everaert]], [[Rudger W. Kieboom]], [[Tim Van der Linden]], _Model structures for homotopy of internal categories_, Theory and Applications of Categories,  Vol. 15, CT2004, No. 3, pp 66-94. ([tac:15-03](http://www.tac.mta.ca/tac/volumes/15/3/15-03abs.html)).

Discussion of [[localization]] and [[anafunctors]] between internal categories:

* [[David Roberts]], _Internal categories, anafunctors and localisations_, [[Theory and Applications of Categories]], Vol. 26, 2012, No. 29, pp 788-829, [tac:26-29](http://www.tac.mta.ca/tac/volumes/26/29/26-29abs.html), [arXiv:1101.2363](http://arxiv.org/abs/1101.2363)

An old discussion on variants of internal categories, crossed modules and 2-groups is archived [here](http://nforum.mathforge.org/discussion/621/internal-category/?Focus=29967#Comment_29967).

[[!redirects internal categories]]

[[!redirects category internal]]
[[!redirects categories internal]]

[[!redirects category object]]
[[!redirects category objects]]
[[!redirects internal nerve]]


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

# Contents
* table of contents
{: toc}

## Idea

The classical notion of an [[internal category]] in a category with [[pullbacks]], can be generalized by replacing [[pullbacks]] with [[cotensor products]] of [[comodules]] in a [[monoidal category]].

Applied to internal one-object [[groupoids]] this subsumes the notion of [[quantum groups]].

[[George Janelidze]] calls this *noncartesian internal category*, because when the [[tensor product]] is the [[cartesian product]] then the notion reduces to the traditional of [[internal categories]].

## Definition

One typically starts with a [[monoidal category]] $M = (M, \otimes, 1)$ which is _regular_ in the sense that it has [[equalizers]] which are [[preserved limit|preserved]] by the [[tensor product]] $\otimes$ on both sides. (The monoidal structure does _not_ need be [[symmetric monoidal category|symmetric]].)

There is a [[bicategory]] $Comod(M)$ of [[comonoids]] and _[[bicomodules]]_ in $M$: this is a special case of the bicategory $Mod(K)$ of [[monads]] and [[module over a monad|bimodules]] in a bicategory $K$, where in this case $K = \mathbf{B} M^{op} = (\mathbf{B} M)^{co}$.  Then an **internal category in $M$** is a [[monad]] in $Comod(M)$.

There are two kind of [[morphisms]] of noncartesian internal categories: [[functors]] and [[cofunctor|cofunctors]] (which here are *not* the same as [[contravariant functors]]).

## Examples

Because every [[set]] is canonically a comonoid with respect to the [[cartesian product]], a comonoid in [[Set]] is just a set and a bicomodule is a [[span]], and a monad in the bicategory of spans of sets is just a small category.  More generally, an internal category in the above sense in any category with finite cartesian products (and equalizers, of course, hence a [[finitely complete category]]) is just an [[internal category]] in the usual sense.

## Related concepts

* [[quantum group]]

## References

The main historical reference:

* [[Marcelo Aguiar]], *Internal categories and quantum groups*, PhD thesis, Cornell 1997 ([pdf](http://pi.math.cornell.edu/~maguiar/thesis2.pdf), [[Aguiar_InternalCategoriesAndQuantumGroups.pdf:file]])

[[!redirects internal category in a monoidal category]]
[[!redirects internal categories in a monoidal category]]
[[!redirects internal categories in monoidal categories]]

[[!redirects category in a monoidal category]]
[[!redirects categories in a monoidal category]]
[[!redirects categories in monoidal categories]]

[[!redirects noncartesian internal category]]
[[!redirects noncartesian internal categories]]


internal crossed module

Crossed modules of groups, [[differential crossed modules]], and crossed modules of crossed modules, are a special case of an (internal) crossed module in a [[semi-abelian category]] which is along with precrossed modules introduced in

* G. Janelidze, _Internal crossed modules_, Georgian Math. J. 10 (2003) 99114 ([journal](http://www.heldermann.de/GMJ/GMJ10/GMJ101/gmj1008.htm)).

In Mal'cev categories there is an article on precrossed modules

* T. Everaerta, M. Gran, _Precrossed modules and Galois theory_, J. Algebra __297__, no. 1 (2006) 292--309 [doi:10.1016/j.jalgebra.2005.06.034](http://dx.doi.org/10.1016/j.jalgebra.2005.06.034).

[[!redirects internal crossed modules]]
[[!redirects precrossed module]]


internal diagram

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Internal category theory
+--{: .hide}
[[!include internal infinity-categories contents]]
=--
=--
=--

# Internal diagrams
* table of contents
{: toc}

## Idea

Given a [[finitely complete category]] $E$, one can consider the [[bicategory]] $Cat(E)$ of [[internal categories]] in $E$, and thus [[internal functors]], which are the morphisms in $Cat(E)$. If $E = Set$ then one can consider not only functors among small categories but also functors of the type $F: C\to Set$ from a small category $C$ to a large category of sets. In that case one can describe $F$ as consisting of a $C_0$-indexed family of objects and an action of $C_1$ on the diagram.

Compare the ideas discussed on this page with those at [[internal profunctor]] and [[discrete fibration]].  All three notions intersect --- an internal diagram on $C$ is the same thing as an internal profunctor $C ⇸ 1$, which is the same thing as a discrete opfibration in $Cat(E)$.  The three generalize the basic idea in different ways.

## Definition

### In category theory

Given an [[internal category]] $C\in Cat(E)$, with the usual structure maps $s,t,i,c$, an **internal [[diagram]]** $F$ on $C$ (or, of type $C$) is given by

* a [[morphism]] $d : F_0\to C_0$ in $E$ together with
* a morphism $e : F_1= F_0\times_{C_0} C_1 \to F_0$

where $F_1$ is the [[pullback]]
\[
\array{
  F_0 \times_{C_0} C_1 & \to & F_0 \\
  \mathllap{s^* d} \downarrow & & \downarrow \mathrlap{d} \\
  C_1 & \underset{s}{\to} & C_0
}
\]
These data must satisfy the following conditions:

* $e$ respects the source and target maps of $C$, in that $d \circ e = t \circ s^* d$.  Equivalently, $e$ is a morphism from $s^* d$ to $t^* d$ in $E/C_1$.

* $e$ is an _action_ in the sense that $e \circ (1 \times i) = 1$ and $e(e \times 1) = e(1 \times c)$.

It is clear how to define [[homomorphisms]] of internal diagrams: a morphism $F \to G$ is given by an $E/C_0$-morphism $F_0 \to G_0$ that commutes with the actions $e$. Internal diagrams on $C$ in $E$ form a category denoted by $E^C$.

An internal diagram on $C^{op}$ is sometimes called an **[[internal presheaf]]** on $C$.

### In dependent type theory

Using the [[dependent type theory|language of]] [[dependent type|dependent types]], the map $d: F_0 \to C_0$ can be seen as the [[categorical semantics|interpretation]] of a dependent type $(X:C_0) \,\vdash\, (F(X):Type)$. The action of $C_1$ on $F_0$ can equivalently be given by the interpretation of a term in [[context]]:

$$ (X:C_0), (Y:C_0), (f:C_1(X,Y)), (a:F(X)) \;\vdash\; (p(X,Y,f,a) : F(Y)). $$

Here we consider $C_1$ to depend on $C_0 \times C_0$ by the canonical morphism $C_1 \to C_0 \times C_0$ induced by $s$ and $t$, as in the [[type-theoretic definition of category]].

If the ambient category $E$ is a [[locally cartesian closed category]], so that its internal type theory has [[dependent product types]], then this can be interpreted instead as a closed term

$$ p : \Pi_{X,Y:C_0} \Pi_{f:C_1(X,Y)} (F(X) \to F(Y)). $$

The axioms then take a particularly familiar form, also to be interpreted in the [[internal language]] of $E$:

* $(X:C_0), (a:F(X)) \;\vdash\; p(X,X,id_X,a) = a $
* $(X,Y,Z:C_0), (f:C_1(X,Y)), (g:C_1(Y,Z)), (a:F(X)) \;\vdash\; p(X,Z,g \circ f,a) = p(Y,Z,g,p(X,Y,f,a))$

## Properties

From an internal diagram $(F,C,\lambda,e)$ one can equip $F =(F_0,F_1)$ with a structure of an internal category over $C$. In other words, there is a forgetful functor $E^C\to Cat(E)/C$ (where $Cat(E)/C$ is the corresponding [[slice category]]). This functor is fully faithful and its essential image consists precisely of all objects in $Cat(E)/C$ which are [[discrete opfibrations]].  Similarly, the objects of $E^{C^{op}}$ are the [[discrete fibrations]] in $Cat(E)/C$.

There is a composite forgetful functor $U \colon E^C \to Cat(E)/C \to E/C_0$.  This functor $U$ is monadic --- its left adjoint takes $p \colon X \to C_0$ to $t \circ s^* p \colon X \times_{C_0} C_1 \to C_1 \to C_0$.

## Diagrams in an indexed category

An internal diagram as above may take values in any [[Grothendieck fibration]] over $E$.  Given a fibration in the guise of an [[indexed category]] $F : E^{op} \to Cat$, a **$C$-diagram in $F$** is given by

* an object $P \in F(C_0)$, together with
* a morphism $\phi : s^* P \to t^* P$ in $F(C_1)$

satisfying 'cocycle equations'

* $i^*\phi = 1_P$
* $c^*\phi = p_1^* \phi \circ p_2^* \phi$

modulo coherent isos, where the $p_i$ are the projections out of $C_2$.

By the [[Yoneda lemma for bicategories]], the object $P$ determines (up to canonical isomorphism) a pseudonatural $\alpha^0 : E(-,C_0) \to F_0$ in $[E^{op},Cat]$, where $E$ is considered as a locally discrete bicategory, and $F_0(X) = ob F X$ considered as a discrete category, such that $\alpha^0(f) \cong f^* P$.  Similarly, $\phi$ determines $\alpha^1 : E(-,C_1) \to F_1 = arr \circ F$, and $\alpha^1(g) \cong g^* \phi$.  It is not hard to check that the conditions above correspond to requiring that the $\alpha^i_X$ form a functor $E(X,C) \to F X$ for each $X$, and pseudonaturality then makes the $C$-diagram $(P,\phi)$ equivalent to an [[indexed functor]] $E(-,C) \to F$.  The category of $C$-diagrams in $F$ is then simply the hom-category $[E^{op},Cat](E(-,C),F)$.

### Examples

* An internal diagram on $C$ in the sense above is a $C$-diagram in the [[codomain fibration]] of $E$, that is the pseudofunctor $X \mapsto E/X$.

* If $E$ is equipped with a [[coverage]] and $C$ is the [[Cech nerve]] associated to a cover $p : U \to X$ in $E$, then the category of $C$-diagrams in $F$ is the [[descent]] category $Des_p(F)$.

## Related concepts

* [[diagram]], [[commuting diagram]], [[free diagram]]

* [[internal presheaf]], [[internal sheaf]]

* [[internal (co-)limit]]

## References

* [[P. T. Johnstone]], _Topos theory_, 1977, chapter 2

* [[Elephant]], B2.3

[[!redirects internal diagrams]]


internal hom

> This page discusses the general concept of mapping spaces and internal homs. For mapping spaces in topology, see at _[[compact-open topology]]_.

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

# Contents
* table of contents
{: toc}

## Idea

For $\mathcal{C}$ a [[category]] and $X, Y \in \mathcal{C}$ two [[objects]], the _internal hom_ $[X,Y] \in \mathcal{C}$ from $X$ to $Y$ is, if it exists, another [[object]] of $\mathcal{C}$ which behaves like the "object of [[morphisms]]" from $X$ to $Y$.
In other words it is, if it exists, an [[internalization|internal version]] of the ordinary [[hom set]]  $\mathcal{C}(X, Y) \in Set$ or more generally [[hom object]] $\mathcal{C}(X, Y) \in \mathcal{V}$ of a [[locally small category]] or $\mathcal{V}$-[[enriched category]].

One way to make this precise starts by mimicking a property of the [[function set]] $[X,Y] = \{f : X \to Y\}$ of [[functions]] between two [[sets]] $X$ and $Y$: this set is characterized by the fact that for any other set $S$, the functions $S \to [X,Y]$ are in [[natural bijection]] with the functions $S \times X \to Y$ out of the [[cartesian product]] of $S$ with $X$.
That is: for each set $X$, the [[functor]] $(-) \times X$ has a [[right adjoint]], given by the construction $[X,-]$.

One can verbalize this thus: *taking the cartesian product with the set $X$* is left-adjoint to *taking the set of all functions with domain $X$*.

This, then, is, generally, the definition of _internal hom_ in any [[cartesian monoidal category]] or in fact in any [[monoidal category]] $(\mathcal{C}, \otimes)$: the [[right adjoint]] $[X,-]$ to the given [[tensor product]] functor $(-)\otimes X$ for all objects $X$. It may or may not exist. If it exists, one says that $(\mathcal{C}, \otimes)$ is a _[[closed monoidal category|closed]]_ [[monoidal category]]. Explicity, the condition is that there is an [[isomorphism]]([[bijection]])
$$
  \mathcal{C}(A, [X,Z]) \stackrel{\simeq}{\to} \mathcal{C}(A \otimes X, Z)
$$
which is [[natural isomorphism|natural]] in all three [[variables]].  (The rightward map here is often called __[[currying]]__, especially in a [[closed monoidal category]] (and more especially for the $\lambda$-[[lambda-calculus|calculus]]).)

In particular this implies that in a closed monoidal category the external hom is re-obtained from the internal hom as its set of [[generalized elements]] out of the [[unit object|tensor unit]] $I \in \mathcal{C}$ in that

$$
  \frac{I \to [X,Y]}{X \to Y}
$$

using that $I \otimes X \simeq X$ by definition of the tensor unit.

Here "closed" in "[[closed monoidal category]]" is in the sense that forming "hom-sets" does not lead "out of the category". In fact the internal hom of a [[cartesian monoidal category]] is indeed the hom as seen in the _[[internal logic]]_ of that category (the _[[function type]]_).

More generally, one can consider objects that satisfy some basic [[universal properties]] that an internal hom should satisfy even in the absence of a [[monoidal category|monoidal structure]]. If such objects exist one speaks therefore just of a _[[closed category]]_. Every [[closed category]] may be seen as a category [[enriched category|enriched]] over itself.  Accordingly, an internal hom is after all a special case of a [[hom-object]], for the special case of this enrichment over itself.

## Definition

+-- {: .num_defn #ClosedMonoidalCategory}
###### Definition
**(internal hom)**

Let $(\mathcal{C}, \otimes)$ be a [[symmetric monoidal category|symmetric]] [[monoidal category]]. An **internal hom** in $\mathcal{C}$ is a [[functor]]

$$
  [-,-] : \mathcal{C}^{op} \times \mathcal{C} \to \mathcal{C}
$$

such that for every [[object]] $X \in \mathcal{C}$ we have a pair of [[adjoint functors]]

$$
  ((-) \otimes X \dashv [X, -]) : \mathcal{C} \to \mathcal{C}
  \,.
$$

If this exists, $(\mathcal{C}, \otimes)$ is called a _[[closed monoidal category]]_.

=--

+-- {: .num_remark}
###### Remark

If the monoidal category $\mathcal{C}$ in Def. \ref{ClosedMonoidalCategory} is not [[symmetric monoidal category|symmetric]], there is instead a concept of left- and right-internal hom.

=--

### Evaluation map
 {#EvaluationMap}

Let $(\mathcal{C}, \otimes)$ be a [[symmetric monoidal category|symmetric]] [[closed monoidal category]] (Def. \ref{ClosedMonoidalCategory}).

+-- {: .num_defn #EvalMap}
###### Definition

For $X,Y \in \mathcal{C}$ two [[objects]], the
**[[evaluation map]]**

$$
  eval_{X,Y} : [X,Y] \otimes X \to Y
$$

is the $((-)\otimes X \dashv [X,-])$-[[adjunct]] of the [[identity]] $id_{[X,Y]} : [X,Y] \to [X,Y]$.

=--

+-- {: .num_remark}
###### Remark

If $\mathcal{C}$ is specifically a [[locally cartesian closed category]], then in terms of the [[type theory]] [[internal language]] of $\mathcal{C}$
the [[evaluation map]] is the [[categorical semantics]] of the [[dependent type]] which in [[type theory]] [[syntax]] is

$$
  f \colon X \to Y,\; x \colon X
    \;\vdash\;
   f(x) \colon Y
  \,,
$$

with _[[function application]]_ on the right.

=--

### Composition map
 {#CompositionMap}

Let $(\mathcal{C}, \times)$ be a [[symmetric monoidal category|symmetric]] [[closed monoidal category]] (Def. \ref{ClosedMonoidalCategory})

+-- {: .num_defn #CompositionMorphism}
###### Definition

For $X, Y, Z \in \mathcal{C}$ three [[objects]], the
**[[composition]] morphism**

$$
  \circ_{X,Y,Z} :
  [Y, Z]
  \times
  [X, Y]
  \to
  [X, Z]
$$

is the $((-)\times X \dashv [X,-])$-[[adjunct]] of the following composite of two [[evaluation maps]], def. \ref{EvalMap}:

$$
  [Y, Z] \times ([X , Y] \times X)
    \stackrel{(id_{[Y,Z]}, eval_{X,Y})}{\to}
  [Y,Z] \times Y
    \stackrel{eval_{Y,Z}}{\to}
  Z
  \,.
$$

=--

## Properties

### Basic properties
 {#BasicProperties}

The internal homs in a [[symmetric monoidal category|symmetric]] [[closed monoidal category]] (Def. \ref{ClosedMonoidalCategory}) happen to share all the key abstract properties of ordinary ("external") [[hom-functors]], even though this is not completely manifest from Def. \ref{ClosedMonoidalCategory}:

+-- {: .num_prop #InternalHomBifunctor}
###### Proposition
**([[internal hom]] [[bifunctor]])**

Let $\mathcal{C}$ be a [[symmetric monoidal category]] such that for each object $X \in \mathcal{C}$ the  functor $X \otimes (-)$ has a [[right adjoint]] $[X,-]$. Then this is already equivalent to Def. \ref{ClosedMonoidalCategory}, in that there is a unique functor out of the [[product category]]of $\mathcal{C}$ with its [[opposite category]]

$$
  [-,-]
  \;\colon\;
  \mathcal{C}^{op} \times \mathcal{C}
    \longrightarrow
  \mathcal{C}
$$

such that for each $X \in \mathcal{C}$ it coincides with the [[internal hom]] $[X,-]$ as a functor in the second variable, and such that there is a [[natural isomorphism]]

$$
  Hom(X, [Y,Z])
  \;\simeq\;
  Hom(X \otimes Y, Z)
$$

which is natural not only in $X$ and $Z$, but also in $Y$.

=--

+-- {: .proof}
###### Proof

We have a natural isomorphism for each fixed $Y$, and hence in particular for fixed $Y$ and fixed $Z$. With this the statement follows directly by [this prop.](https://ncatlab.org/nlab/show/adjoint%20functor#AdjointFunctorFromObjectwiseRepresentingObject) at _[[adjoint functor]]_.

=--

In fact the 3-variable adjunction from Prop. \ref{InternalHomBifunctor} even holds internally:

+-- {: .num_prop #TensorHomAdjunctionIsoInternally}
###### Proposition
**(internal tensor/hom-adjunction)**

In a [[closed monoidal category]] (def. \ref{ClosedMonoidalCategory}) there are [[natural isomorphisms]]

$$
  [X \otimes Y, Z]
   \;\simeq\;
  [X, [Y,Z]]
$$

whose image under $Hom_{\mathcal{C}}(1,-)$  are the defining [[natural bijections]] of Prop. \ref{InternalHomBifunctor}.

=--

+-- {: .proof}
###### Proof

Let $A \in \mathcal{C}$ be any object. By applying the natural bijections from Prop. \ref{InternalHomBifunctor}, there are composite [[natural bijections]]

$$
  \begin{aligned}
    Hom_{\mathcal{C}}(A , [X \otimes Y, Z])
    & \simeq
    Hom_{\mathcal{C}}(A \otimes (X \otimes Y), Z)
    \\
    & \simeq
    Hom_{\mathcal{C}}((A \otimes X)\otimes Y, Z)
    \\
    & \simeq
    Hom_{\mathcal{C}}(A \otimes X, [Y,Z])
    \\
    & \simeq
    Hom_{\mathcal{C}}(A, [X, [Y,Z]])
  \end{aligned}
$$

Since this holds for all $A$, the [[fully faithful functor|fully faithfulness]] of the [[Yoneda embedding]] says that there is an isomorphism $[ X\otimes Y, Z ] \simeq [X, [Y,Z]]$. Moreover, by taking $A = 1$ in the above and using the left [[unitor]] isomorphisms $A \otimes (X \otimes Y) \simeq X \otimes Y$ and $A\otimes X \simeq X$  we get a [[commuting diagram]]

$$
  \array{
    Hom_{\mathcal{C}}(1, [X\otimes Y, Z ])
      &\overset{\simeq}{\longrightarrow}&
    Hom_{\mathcal{C}}(1, [X, [Y,Z]])
    \\
    {}^{\mathllap{\simeq}}\downarrow
      &&
    \downarrow^{\mathrlap{\simeq}}
    \\
    Hom_{\mathcal{C}}(X \otimes Y, Z)
     &\overset{\simeq}{\longrightarrow}&
    Hom_{\mathcal{C}}(X, [Y,Z])
  }
  \,.
$$

=--

Also the key respect of [[hom-functors]] for [[limits]] is inherited by [[internal hom]]-functors:

+-- {: .num_prop #InternalHomPreservesLimits}
###### Proposition
**([[internal hom-functor preserves limits]])**

Let $\mathcal{C}$ be a [[symmetric monoidal category|symmetric]] [[closed monoidal category]] with [[internal hom]]-[[bifunctor]] $[-,-]$ (Prop. \ref{InternalHomBifunctor}). Then this bifunctor preserves [[limits]] in the second variable, and sends colimits in the first variable to limits:

$$
  [X, \underset{\underset{j \in \mathcal{J}}{\longleftarrow}}{\lim} Y(j)]
  \;\simeq\;
  \underset{\underset{j \in \mathcal{J}}{\longleftarrow}}{\lim} [X, Y(j)]
$$

and

$$
  [\underset{\underset{j \in \mathcal{J}}{\longrightarrow}}{\lim} Y(j),X]
  \;\simeq\;
  \underset{\underset{j \in \mathcal{J}}{\longleftarrow}}{\lim} [Y(j),X]
$$

=--

+-- {: .proof}
###### Proof

For $X \in \mathcal{C}$ any object, $[X,-]$ is a [[right adjoint]] by definition, and hence preserves limits by _[[adjoints preserve (co-)limits]]_.

For the other case, let $Y \;\colon\; \mathcal{L} \to \mathcal{C}$ be a [[diagram]] in $\mathcal{C}$, and let $C \in \mathcal{C}$ be any object. Then there are isomorphisms

$$
  \begin{aligned}
    Hom_{\mathcal{C}}(C, [ \underset{\underset{j \in \mathcal{J}}{\longrightarrow}}{\lim} Y(j), X ] )
    & \simeq
    Hom_{\mathcal{C}}( C \otimes \underset{\underset{j \in \mathcal{J}}{\longrightarrow}}{\lim} Y(j), X )
    \\
    & \simeq
    Hom_{\mathcal{C}}( \underset{\underset{j \in \mathcal{J}}{\longrightarrow}}{\lim} (C \otimes Y(j)), X )
    \\
    & \simeq
    \underset{\underset{j \in \mathcal{J}}{\longleftarrow}}{\lim}
    Hom_{\mathcal{C}}( (C \otimes Y(j)), X )
    \\
    & \simeq
    \underset{\underset{j \in \mathcal{J}}{\longleftarrow}}{\lim}
    Hom_{\mathcal{C}}( C, [Y(j), X] )
    \\
    & \simeq
    Hom_{\mathcal{C}}( C, \underset{\underset{j \in \mathcal{J}}{\longleftarrow}}{\lim} [Y(j), X] )
  \end{aligned}
$$

which are [[natural isomorphism|natural]] in $C \in \mathcal{C}$, where we used that the ordinary [[hom-functor]] respects (co)limits as shown (see at _[[hom-functor preserves limits]]_), and that the [[left adjoint]] $C \otimes (-)$ preserves colimits (see at _[[adjoints preserve (co-)limits]]_).

Hence by the [[fully faithful functor|fully faithfulness]] of the [[Yoneda embedding]], there is an isomorphism

$$
  \left[ \underset{\underset{j \in \mathcal{J}}{\longrightarrow}}{\lim} Y(j), X \right]
  \overset{\simeq}{\longrightarrow}
  \underset{\underset{j \in \mathcal{J}}{\longleftarrow}}{\lim} [Y(j), X]
  \,.
$$

=--

### Relation to function types

The internal hom is the [[categorical semantics]] of what in [[type theory]] are [[function types]]

[[!include function type natural deduction - table]]

### Induced monad (state monad)

For each object $S$ the (internal hom $\dashv$ [[tensor product]])-[[adjunction]] induces a [[monad]] $[S, S \otimes (-)]$. In [[computer science]] this [[monad (in computer science)]] is called the _[[state monad]]_.

### Stable splitting
  {#StableSplitting}

In [[topology]] the [[stabilization]]/[[suspension spectrum]] $\Sigma^\infty  Maps(X,A)$ of  [[mapping spaces]] $Maps(X,A)$ between suitable [[CW-complexes]] $X, A$ happens to decompose as a [[direct sum]] of [[spectra]] in a useful way, related to the expression of the [[Goodwillie derivatives]] of the functor $Maps(X,-)$.

For more on this see at _[[stable splitting of mapping spaces]]_.

## Examples
 {#Examples}

### In sets

In the category [[Set]] of [[sets]], regarded as a [[cartesian monoidal category]], the internal hom is given by [[function sets]]. This exists, by the discussion there, as soon as the [[foundations|foundational]] [[axioms]] are strong enough, for instance as soon as there are [[power objects]], which is the special case of a function set into the 2-element set.

### In simplicial sets

In the category [[sSet]] of [[simplicial sets]], the internal hom between two [[simplicial sets]] $X,Y$ is given by the formula

$$
  [X,Y]_n = Hom_{sSet}(X\times \Delta[n],Y)
  \,,
$$

where $\Delta[n]$ is the simplicial [[n-simplex]]. This $[X,Y] \in sSet$ is also called the _[[function complex]]_ between $X$ and $Y$.

Since $sSet \simeq PSh(\Delta)$ is the  [[category of presheaves]] over the [[simplex category]], this is a special case of internal homs in sheaf toposes, discussed [below](#InASheafTopos).

### In a sheaf topos or $(\infty,1)$-sheaf $(\infty,1)$-topos
 {#InASheafTopos}

Let $C$ be a [[site]]. Let $\mathbf{H} = Sh(C)$ be the [[sheaf topos]]
over $C$ or in fact the [[(∞,1)-sheaf (∞,1)-topos]]. We discuss the internal hom of this regard as a [[cartesian monoidal category]]/[[cartesian monoidal (∞,1)-category]].

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

The sheaf topos $\mathbf{H}$ is a [[cartesian closed category]] / [[cartesian closed (∞,1)-category]]. In fact it is a [[locally cartesian closed category]] / [[locally cartesian closed (∞,1)-category]].

=--

Hence the internal hom exist.

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

For $X, Y \in \mathbf{H}$ two [[objects]], the internal hom-object

$$
  [X,Y] \in \mathbf{H}
$$

is the [[sheaf]]/[[(∞,1)-sheaf]] given by the assignment

$$
  [X,Y] : U \mapsto \mathbf{H}(U \times X, Y)
  \,,
$$

for all objects $U \in C$ which on the right we regard under the [[Yoneda embedding]]/[[(∞,1)-Yoneda lemma|∞-Yoneda embedding]] $U \in C \stackrel{Yoneda}{\hookrightarrow} \mathbf{H}$.

Here

* $U \times X \in \mathbf{H}$ is the [[cartesian product]] of $U$ with $X$

* $\mathbf{H}(-,-)$ is the [[hom set]]-[[functor]] / [[derived hom-space|hom space]]-[[(∞,1)-functor]] of $\mathbf{H}$.

=--

See also at _[[closed monoidal structure on presheaves]]_.

+-- {: .proof}
###### Proof

By the [[Yoneda lemma]]/[[(∞,1)-Yoneda lemma]] we have [[natural equivalences]]

$$
  [X,Y](U) \simeq \mathbf{H}(U , [X,Y])
$$

and by the defining $((-)\times X \vdash [X,-])$[[adjunction]] this is naturally equivalent to

$$
  \cdots \simeq \mathbf{H}(U \times X, Y)
  \,.
$$

=--

+-- {: .num_remark}
###### Remark

In the ([[homotopy type theory|homotopy]]-)[[type theory]] [[syntax]] of the [[internal language]] of $\mathbf{H}$ the internal hom $[X, Y] \in \mathbf{H}$ is the [[categorical semantics]] of the [[function type]]

$$
  \vdash (X \to Y) : Type
  \,.
$$

=--

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

For $X, Y \in \mathbf{H}$, the [[evaluation map]], def. \ref{EvalMap},

$$
  eval_{X,Y} : [X,Y] \times X \to Y
$$

is the morphism of sheaves which over each $U \in C$ sends a  morphism of sheaves $\theta : \mathbf{H}(-,U) \times X(-) \to Y(-)$ (which is the first component by prop. \ref{InternalHomInSheaves}) and an $x \in \mathbf{H}(U,X)$ to

$$
  eval_{X,Y}(U) : (\theta, x) \mapsto \theta_U(id_U, x) \in Y(U)
  \,.
$$

=--

See ([MacLane-Moerdijk, p. 46](#MacLane-Moerdijk)).

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

For $X, Y, Z \in \mathbf{H}$ three [[objects]] of $\mathbf{H}$, the canonical [[composition]] [[morphism]], def. \ref{CompositionMorphism},

$$
  \circ_{X,Y,Z} :
  [Y, Z] \times [X, Y] \to [X, Z]
$$

is given by the morphism of [[presheaves]]/[[(∞,1)-presheaves]] whose component over $U \in C$ is the morphism of [[sets]]/[[∞-groupoids]]

$$
  \circ_{X,Y,Z}(U)
  :
  \mathbf{H}(U \times X, Y)
  \times
  \mathbf{H}(U \times Y, Z)
  \to
  \mathbf{H}(U \times X, Z)
$$

which sends a pair $(f : U \times X \to Y, g : U \times Y \to Z)$ to the composite

$$
  \circ_{X,Y,Z}(U)(f,g)
  =
  U \times X
  \stackrel{(\Delta_U, id_X)}{\to}
  U \times U \times X
  \stackrel{(id_U, f)}{\to}
  U \times Y
  \stackrel{g}{\to}
  Z
  \,,
$$

where $\Delta_U : U \to U \times U$ is the [[diagonal]] morphism on $U$.

=--

+-- {: .proof}
###### Proof

By definition \ref{CompositionMorphism} the morphism is the [[adjunct]] of the double [[evaluation map]]

$$
  [Y,Z] \times [X,Y] \times X \to Z
  \,.
$$

Since the [[cartesian product]] of two sheaves $A, B \in \mathbf{H}$ is computed objectwise

$$
  A \times B : U \mapsto A(U) \times B(U)
$$

it follows that over each $U \in C$ this double evaluation map is the morphism of sets/$\infty$-groupoids

$$
  [Y,Z](U) \times [X,Y](U) \times X(U) \to Z(U)
$$

hence by prop. \ref{InternalHomInSheaves}

$$
  \mathbf{H}(U \times Y, Z) \times \mathbf{H}(U \times X, Y) \times
  \mathbf{H}(U,X) \to \mathbf{H}(U,Z)
  \,,
$$

where now by prop. \ref{...} this is the external evaluation.

=--

+-- {: .num_remark}
###### Remark

Intuitively this says that the composite of a $U$-parameterized family of maps $\{f(u) :  X \to Y| u \in U\}$ with a $U$-parameterized family of maps ${g(u) : Y \to Z| u \in U}$ is the $U$-family given by the parameter-wise composite $\{g(u)\circ f(u) | u \in U\}$.

=--

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

The internal [[automorphism group]]/[[automorphism ∞-group]] of an [[object]] $X \in \mathbf{H}$ is the [[subobject]]

$$
  \mathbf{Aut}(X) \hookrightarrow [X,X]
$$

of the internal hom which is maximal subject to the property that the composition of prop. \ref{CompositionOfInternalFunctionsInSheafTopos} becomes invertible.

The ([[homotopy type theory|homotopy]]-)[[type theory]] [[syntax]] for this is given by the [[type]] of [[equivalences in homotopy type theory]]

$$
  \vdash (X \stackrel{\simeq}{\to} X) : Type
  \,.
$$

=--

### In slice categories
 {#ExampleInSliceCategories}

Let $\mathbf{H}$ be a [[locally cartesian closed category]]. This means that for each object $X \in \mathbf{H}$ the [[slice category]] $\mathbf{H}_{/X}$ is a [[cartesian closed category]]. The [[product]] in the slice is given by the [[fiber product]] over $X$ computed in $\mathbf{H}$. Fairly detailed discussion of constructions of the internal hom in such slices $\mathbf{H}_{/X}$ is at _[locally cartesian closed category -- cartesian closure in terms of base change and dependent product](locally%20cartesian%20closed%20category#EquivalentCharacterizations)_.

We record some further properties

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

For $\mathcal{C}$ a [[locally cartesian closed category]] and $f \colon X \to Y$ any morphism in $\mathcal{C}$, the [[inverse image]] $f^*$ of the corresponding [[base change]] [[adjunction]]

$$
  \mathcal{C}_{/X}
   \stackrel{\overset{\sum_f}{\to}}{\stackrel{\overset{f^*}{\leftarrow}}{\underset{\prod_f}{\to}}}
  \mathcal{C}_{/Y}
$$

is a [[cartesian closed functor]].

=--

This is discussed in more detail at _[cartesian closed functor -- Examples](cartesian+closed+functor#Examples)_.

So for $A,B \in \mathcal{C}_{/Y}$ we have [[isomorphisms]]

$$
  f^* \left[A,B\right] \stackrel{\simeq}{\to} \left[f^* A , f^* B\right]
$$

between the image of the internal hom under $f^*$ and the internal hom of the images of $A$ and $B$ separately.

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

For $\mathbf{H}$ a [[locally cartesian closed category]], $f \colon X \to Y$ any [[morphism]], and $A, B \in \mathbf{H}_{/X}$ two objects in the slice over $X$, there is a natural morphism (not in general an isomorphism)

$$
  \prod_f \left[A,B \right] \to \left[ \sum_f A, \sum_f B\right]
  \,.
$$

=--

Here are two ways to get this morphism:

+-- {: .proof}
###### Proof/Construction 1

For any object $U \in \mathbf{H}_{/Y}$ we have a canonical morphism of [[hom sets]]

$$
  \begin{aligned}
     \mathbf{H}_{/Y}( U, \prod_f [A,B] )
     & \simeq
     \mathbf{H}_{/X}( f^* U, [A,B] )
     \\
     & \simeq
     \mathbf{H}_{/X}(f^* U \times A, B)
     \\
     & \stackrel{}{\to}
    \mathbf{H}_{/Y}( \sum_f( f^* U \times A ), \sum_f B )
    \\
     & \stackrel{Frob.Rec.}{\simeq}
     \mathbf{H}_{/Y}( U \times \sum_f A , \sum_f B )
     \\
     & \simeq
    \mathbf{H}_{/Y}(U, [\sum_f A , \sum_f B])
  \end{aligned}
$$

where the first and the last steps use [[adjunction]] properties, where the morphism in the middle is the component of the [[dependent sum]] functor, and where "Frob.Rec." is [[Frobenius reciprocity]].

Since this is [[natural transformation|natural]] in $U$, the [[Yoneda lemma]] implies the claimed morphism.

=--

+-- {: .proof}
###### Proof/Construction 2

There is the composite morphism

$$
  \left(f^\ast \prod_f [A, B]\right) \times A \stackrel{counit \times id_A}{\to} [A, B] \times A \stackrel{eval}{\to} B \stackrel{unit}{\to} f^\ast \sum_f B$$

of the [[unit of an adjunction|adjunction (co)units]] and the [[evaluation map]] of the internal hom. Its hom-[[adjunct]] is

$$
  A \to [f^\ast \prod_f [A, B], f^\ast \sum_f B] \cong f^\ast [\prod_f [A, B], \sum_f B]
  \,,
$$

using prop. \ref{InverseImageBaseChangeIsCartesianClosed} on the right. The hom-adjunct of that in turn is

$$\sum_f A \to [\prod_f [A, B], \sum_f B]$$

and by symmetry the morphism that we are after:

$$
  \prod_f [A, B] \to [\sum_f A, \sum_f B]
  \,.
$$

=--

+-- {: .num_remark #RememberingTopMorphismInHomInSlice}
###### Remark

If $Y$ is the [[terminal object]] (for simplicity), then the morphism of prop. \ref{MorphismFromDepProductOfFuncTypeToFuncTypeOfDepSum} can be understood as follows: a [[global element]] of the [[dependent product]] $\prod_f [A,B]$ is given by a [[commuting diagram]] in $\mathbf{H}$ of the form

$$
  \array{
    \sum_f A &&\to&& \sum_f B
    \\
     & \searrow && \swarrow
     \\
     && X
  }
  \,.
$$

The map in prop. \ref{MorphismFromDepProductOfFuncTypeToFuncTypeOfDepSum} picks out the top horizontal morphism in this diagram.

=--

### For smooth spaces and smooth $\infty$-groupoids

Consider the [[site]] $C = $ [[SmthMfd]] of [[smooth manifolds]] (and the [[open cover]] [[coverage]]) or equivalently over the [[dense subsite]] [[CartSp]] of [[Cartesian spaces]] and [[smooth functions]] between these.

The [[sheaf topos]]/[[(∞,1)-sheaf (∞,1)-topos]] $\mathbf{H} = Sh(C)$ is that of [[smooth spaces]]/[[smooth ∞-groupoids]]. So the discussion of internal homs here is a special case of the above discussion _[In a sheaf topos](#InASheafTopos)_.

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

For $X , Y \in SmthMfd \hookrightarrow \mathbf{H}$ two [[smooth manifolds]], the [[internal hom]] $[X,Y] \in \mathbf{H}$ is the [[mapping space]] between them regarded as a [[diffeological space]].

See at _[[manifold structure of mapping spaces]]_ for when this internal hom is [[representable functor|representable]] again by a [[smooth manifold]].

=--

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

For $X \in SmthMfd \hookrightarrow \mathbf{H}$ the internal automorphism group, example \ref{InternalAutomorphismGroup}, of $X$ is the [[diffeomorphism group]] of $X$, regarded as a [[diffeological space|diffeological]] group

$$
  \mathbf{Aut}(X) = \mathbf{Diff}(X)
  \,.
$$

=--

### For chain complexes

* [[internal hom of chain complexes]]

### For super vector spaces

The category $sVect$ of [[super vector spaces]] is the category of $\mathbb{Z}/2$-[[graded vector spaces]].  Thus, its objects are pairs of vector spaces $(V_+,V_-)$, with $V_+$ called the *even* part and $V_-$ the *odd* part.  The morphisms in $sVect$ are likewise pairs of linear maps, i.e. we define $sVect$ to be $Vect \times Vect = Vect^{\mathbb{Z}/2}$, as usual for any sort of graded object.  With this definition of the category $sVect$, we capture the concepts of superalgebra and so on in succinct categorical terms.

Because the morphisms in $sVect$ send even things to even things and odd things to odd things, they are sometimes called _even_ linear maps, and one may write
$$
 sVect(V, W) = Even Lin(V,W).
$$
Note that $sVect$ is [[enriched category|enriched]] over $Vect$, i.e. these hom-sets are vector spaces.

Occasionally, however, one does need to refer to the _odd_ linear maps, which send even things to odd things and odd things to even things.  That is, an odd linear map $V\to W$ is a pair of linear maps $V_+ \to W_-$ and $V_-\to W_+$.  The internal-hom in $sVect$ allows us to capture these as well: it is the following super vector space:
$$
  [V,W]_+ = Even Lin(V,W) \qquad
  [V,W]_- = Odd Lin(V,W).
$$
With this definition, $sVect$ becomes a [[closed monoidal category]].

We can equivalently regard a super vector spaces $(V_+,V_-)$ as being the [[direct sum]] vector space $V_+ \oplus V_-$ equipped with this direct sum decomposition.  If we view the internal-hom $[V,W]$ in this way as well, then we have
$$
 [V, W] = Even Lin(V,W) \oplus Odd Lin(V,W) = Lin(V,W).
$$
In other words, any linear map between these "summed" super vector spaces decomposes uniquely as the sum of an even linear map and an odd one.

### For Banach spaces

A similar thing happens in the category $Ban$ of [[Banach spaces]] and [[short linear operators]].  The external hom consists of only the *short* linear maps (those bounded by $1$):
$$ Ban(V,W) = \{ f\colon Lin(V,W) \;|\; {\|f\|} \leq 1 \} .$$
This definition of morphism recovers the most specific notion of [[isomorphism]] of Banach spaces, as well as defining the [[product]] and [[coproduct]] as the [[direct sum]] completed with $p = \infty$ or $p = 1$ respectively.

But the internal hom is the Banach space of *all* bounded linear maps:
$$ [V,W] = \{ f\colon Lin(V,W) \;|\; {\|f\|} \lt \infty \} .$$
This is a Banach space and makes $Ban$ into a [[closed category]].

## Related concepts

* [[hom-set]], [[hom-object]]

* [[hom-functor]]

* [[enriched hom-functor]]

* [[derived hom-functor]]

* [[function type]]

  * [[implication]], [[linear implication]]

* [[power object]], [[exponential object]]

* [[function monad]]

* [[exponential law for spaces]]

* [[closed category]], [[cartesian closed category]]

* [[strong adjoint functor]]

* [[mapping stack]]

* [[space of sections]]

* [[pointed mapping space]]

* [[distributions are the smooth linear functionals]]

* [[Sullivan model of mapping space]]

* [[residual]]

## References

See any reference on [[closed categories]] and [[closed monoidal categories]].

Also for instance:

* {#MacLaneMoerdijk} [[Saunders MacLane]], [[Ieke Moerdijk]], _[[Sheaves in Geometry and Logic]]_

[[!redirects internal homs]]
[[!redirects inner hom]]
[[!redirects inner homs]]
[[!redirects internal-hom]]
[[!redirects internal-homs]]

[[!redirects mapping object]]
[[!redirects mapping objects]]

[[!redirects exponential law]]
[[!redirects exponential laws]]

[[!redirects internal hom-functor]]
[[!redirects internal hom-functors]]
[[!redirects internal hom functor]]
[[!redirects internal hom functors]]


internal hom of algebras over a commutative monad

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Mapping spaces
+--{: .hide}
[[!include mapping space - contents]]
=--
#### Higher algebra
+--{: .hide}
[[!include higher algebra - contents]]
=--
#### Monoidal categories
+--{: .hide}
[[!include monoidal categories - contents]]
=--
#### 2-Category theory
+--{: .hide}
[[!include 2-category theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

[[algebra over a monad|Algebras]] over a [[commutative monad]], in many cases, admit an [[internal hom]] analogous to the one of [[modules]] over a [[commutative ring]].

On a [[monoidal closed category]], this internal hom is in many cases [[adjoint functor|right-adjoint]] to a [[tensor product of algebras over a commutative monad|tensor product]], giving a [[hom-tensor adjunction]] for the algebras too.
Again, this generalizes the case of [[modules]].

## Construction

Let $C$ be a [[closed category]] with [[equalizers]], denote its [[unit]] by $1$ and its [[internal homs]] by $[X,Y]$.
Let also $(T,\mu,\eta)$ be a [[commutative monad]] as defined for closed categories ([[commutative monad#on_closed_and_monoidal_closed_categories|here]]), with [[strong monad#strong_monads_are_enriched_monads|strength]] $t':[X,Y]\to [T X, T Y]$ and [[strong monad#costrength_and_pointwise_structure|costrength]] $s':T[X,Y]\to [X, T Y]$.

Let now $(A,a)$ and $(B,b)$ be $T$-[[algebra over a monad|algebras]]. Thanks to the costrength, the [[internal hom]] $[A,B]$ of $C$ has a canonical "pointwise" $T$-algebra structure,
$$
T[A,B] \to [A, T B] \to [A,B].
$$
(See [[strong monad#algebra_structure_on_the_internal_homs|here]] for the details.)

The **internal hom** of $A$ and $B$ in $C^T$ is defined to be the [[equalizer]] of the following parallel pair:
\begin{tikzcd}[%
nodes={scale=1.25}, arrows={thick},%
]
{[A,B]} \ar[bend right=10]{rr}[swap]{a^*} \ar{r}{t'} & {[TA, TB]} \ar{r}{b_*} & {[TA,B]}, \\
\end{tikzcd}
where $a^*:[A,B]\to [T A,B]$ is the internal precomposition with $a:T A\to A$, and $b_*:[T A,T B]\to [T A,B]$ is the internal postcomposition with $b:T B\to B$.

Denote this object by $[A,B]_T$.

(See [Brandenburg, Remark 6.4.1](#Brandenburg2014), as well as the original work [Kock '71, Section 2](#Kock71closed).)

+-- {: .num_theorem}
###### Theorem
([Kock '71, Theorem 2.2](#Kock71closed))
Let $C$ be a [[closed category]] with [[equalizers]], and $(T,\mu,\eta)$ a [[commutative monad]] on $C$.
Then $[-,-]_T$ makes the [[Eilenberg-Moore category]] $C^T$ itself a [[closed category]], with

* [[unit object]] given by the free algebra $T1$, where $1$ is the unit object of $C$;
* All the structure maps induced by those of $C$.
=--

### Interpretation

The internal hom $[A,B]$ of $A$ and $B$ in $C$ can be thought of as "containing all the morphisms $A\to B$ of $C$". However, not all those morphisms are necessarily [[algebra over a monad#morphisms_of_algebras|morphisms of $T$-algebras]]. A map $f:A\to B$ is a morphism of algebras if and only if $b\circ T f = f\circ a$. In terms of internal homs, this condition is exactly given by the parallel maps above. The equalizer of that pair can be thought of as of containing "all the maps satisfying that condition".

## Examples and implications

* The [[internal hom]] of [[modules]] over a [[commutative ring]] as the most prominent example. Note that the ring has to be commutative: this corresponds to the [[commutative monad|commutativity of the monad]].
* The [[vector space]] of [[linear maps]] between two given vector spaces is a particular example.

The fact that "linear maps form themselves a vector space" is a general phenomenon for [[commutative monads]] on categories with [[equalizers]]. For instance,

* For the case of the [[distribution monad]], this says that _convex combinations of affine functions are affine_;
* For the case of the [[power set]] monad, this says that _pointwise suprema of join-preserving maps between join-semilattices are join-preserving_.

## On monoidal closed categories

If the category $C$ is [[closed monoidal category|monoidal closed]], under some condition the internal hom of algebras is part of a closed monoidal structure on the algebras themselves. See [[tensor product of algebras over a commutative monad#for_monoidal_closed_categories|here]] for more information.

## See also

* [[monoidal monad]], [[commutative monad]], [[strong monad]], [[commutative algebraic theory]]
* [[tensor product of algebras over a commutative monad]]
* [[tensor product]], [[tensor product of modules]], [[multilinear map]], [[representable multicategory]]
* [[monoidal category]], [[closed category]], [[closed monoidal category]], [[internal hom]]

## References

* {#Brandenburg2014} [[Martin Brandenburg]], _Tensor categorical foundations of algebraic geometry_ ([arXiv:1410.1716](https://arxiv.org/abs/1410.1716))

* {#Keigher78} [[William Keigher]], _Symmetric monoidal closed categories generated by commutative adjoint monads_, Cahiers de Topologie et Géométrie Différentielle Catégoriques, 19 no. 3 (1978), p. 269-293  ([NUMDAM](http://www.numdam.org/numdam-bin/fitem?id=CTGDC_1978__19_3_269_0), [pdf](http://archive.numdam.org/article/CTGDC_1978__19_3_269_0.pdf))

* {#Kock70monads} [[Anders Kock]], _Monads on symmetric monoidal closed categories_, Arch. Math. 21 (1970), 1--10.

* {#Kock70closed} [[Anders Kock]], _Strong functors and monoidal monads_, Arhus Universitet, Various Publications Series No. 11 (1970).  [PDF](http://home.imf.au.dk/kock/SFMM.pdf).

* {#Kock71closed} [[Anders Kock]], _Closed categories generated by commutative monads_, 1971 ([[KockMonoidalMonads.pdf:file]])

* {#Seal12} Gavin J. Seal, _Tensors, monads and actions_ ([arXiv:1205.0101](http://arxiv.org/abs/1205.0101))


internal hom of chain complexes

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Homological algebra
+--{: .hide}
[[!include homological algebra - contents]]
=--
#### Monoidal categories
+--{: .hide}
[[!include monoidal categories - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A natural [[internal hom]] of [[chain complexes]] that makes the [[category of chain complexes]] into a [[closed monoidal category]].

## Definition

Let $R$ be a [[commutative ring]] and $\mathcal{A} = R$[[Mod]] the [[category]] of [[modules]] over $R$. Write $Ch_\bullet(\mathcal{A})$ for the [[category of chain complexes]] of $R$-modules.

+-- {: .num_defn #ExplicitDefinition}
###### Definition

For $X,Y \in Ch_\bullet(\mathcal{A})$ any two [[objects]], define a chain complex $[X,Y] \in Ch_\bullet(\mathcal{A})$ to have components

$$
  [X,Y]_n
    \,\coloneqq\,
  \prod_{i \in \mathbb{Z}} Hom_{R Mod}(X_i, Y_{i+n})
$$

(the collection of degree-$n$ maps between the underlying [[graded object|graded]] modules) and whose [[differential]] is defined on homogeneously graded elements $f \in [X,Y]_n$ by

$$
  d f
    \,\coloneqq\,
  d_Y \circ f - (-1)^{n} f \circ d_X
  \,.
$$

This defines a [[functor]]

$$
  [-,-]
   \;\colon\;
  Ch_\bullet(\mathcal{A})^{op}
   \times
  Ch_\bullet(\mathcal{A})
  \longrightarrow
  Ch_\bullet(\mathcal{A})
  \,.
$$

=--

## Properties
 {#Properties}

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

The internal hom $[-,-]$ (Def. \ref{ExplicitDefinition}) together with the [[tensor product of chain complexes]] $(\text{-})\otimes (\text{-})$ endow $Ch_\bullet(\mathcal{A})$ with the structure of a [[closed monoidal category]].

=--

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

The collection of [[cycles]] of the [[internal hom]] $[X,Y]$ in degree 0 coincides with the external [[hom functor]]

$$
  Z_0\big([X,Y]\big)
    \,\simeq\,
  Hom_{Ch_\bullet}(X,Y)
  \,.
$$

The [[chain homology]] of the [[internal hom]] $[X,Y]$ in degree 0 coincides with the [[homotopy classes]] of [[chain maps]].

=--

+-- {: .proof}
###### Proof

By Definition \ref{ExplicitDefinition} the 0-cycles in $[X,Y]$ are collections of morphisms $\{f_k \colon X_k \to Y_k\}$ such that

$$
  f_{k+1} \circ d_X \;=\; d_Y \circ f_k
  \,.
$$

This is precisely the condition for $f$ to be a [[chain map]].

Similarly, the [[boundaries]] in degree 0 are precisely the collections of morphisms of the form

$$
  \lambda_{k+1} \circ d_X + d_Y \circ \lambda_k
$$

for a collection of maps $\{\lambda_k : X_k \to Y_{k+1}\}$. This are precisely the [[null homotopies]].

=--

From the [remark](tensor+product+of+chain+complexes#CanonicalForgetfulFunctor) at *[[tensor product of chain complexes]]* we have that the canonical forgetful functor $U_{Ch} \coloneqq Ch_\bullet(\mathcal{A})(I_{Ch},-) \colon Ch_\bullet(\mathcal{A}) \to \mathcal{A}$ takes a chain complex to its 0-cycles.

Thus the description of the 0-cycles in the above proposition is equivalent to the statement $U_{Ch}([-,-]) \cong Ch_\bullet(\mathcal{A})(-,-)$, which is true in any closed category.

## Related concepts

* [[tensor product of chain complexes]]

## References

* {#EilenbergKelly65} [[Samuel Eilenberg]], [[G. Max Kelly]],  §IV.6 of: *Closed Categories*, in: *[[Proceedings of the Conference on Categorical Algebra - La Jolla 1965]]*, Springer (1966) 421-562 [[doi:10.1007/978-3-642-99902-4](https://doi.org/10.1007/978-3-642-99902-4)]

Textbook accounts:

* [[Charles Weibel]], _[[An Introduction to Homological Algebra]]_


internal infinity-categories contents

**[[category object in an (∞,1)-category]]**, [[groupoid object in an (infinity,1)-category|groupoid object]]

## In a 1-category

* [[congruence]]

* [[internal category]], [[internal groupoid]]

  [[weak equivalence of internal categories]]

* [[internal functor]], [[internal profunctor]]

* [[internal diagram]], [[internal presheaf]]

* [[n-fold category]], [[cat-n-group]]

## In a [[(2,1)-category]]

* [[2-congruence]]

## In [[∞Grpd]]

* [[semi-Segal space]], [[Segal space]], [[complete Segal space]],

* [[reduced Segal space]]

## In $Cat(Cat(\cdots Cat(\infty Grpd)))$

* [[higher Segal space]]

* [[n-fold complete Segal space]]

* [[Theta space]]

## In [[(n,r)-categories]]

* [[(n,r)-congruence]]

## Model category presentations

* [[model structure for complete Segal spaces]]

## Internal $n$-category

* [[n-category object in an (∞,1)-category]]

* [[Theta_n space]]

## Operadic case

* [[model structure for dendroidal complete Segal spaces]]


internal infinity-groupoid

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

#Contents#
* table of contents
{:toc}

## Idea {#Idea}

A notion of _internal [[∞-groupoid]]_ is a [[vertical categorification]] of [[internal groupoid]]. As described at that entry on [[vertical categorification]], there is some flexibility possible in exactly what one may mean by this, depending for instance on which of several definitions of ordinary [[groupoid]]s one starts with, and how one deals with the higher coherences that are introduced upon categorification.

One very general notion of internal $\infty$-groupoid is given by taking some standard definition of $\infty$-groupoid and writing it down internally to an [[(∞,1)-category]].  This is described below in the section

* [∞-groupoids internal to an (∞,1)-category](#KanInoo1Cat).

For various applications somewhat stricter or at least more rigidified models for this may be useful. Notably one may wish to speak of $\infty$-groupoids internal to an ordinary category.  In terms of [[Kan complexes]] as a model for ordinary [[∞-groupoids]], this is discussed below in the section

* [Kan complexes internal to an ordinary category](#KanIn1Cat).

Notice from the discussion there that these two aspects may and often do interplay: simplicial objects in [[Grothendieck topos|sheaf topos]]es may be used to [[presentable (infinity,1)-category|present]] [[(∞,1)-category|(∞,1)-categories]] inside of which one may be interested in $\infty$-groupoid objects in the first sense. For instance a Lie $\infty$-group object is usefully thought of as a _group object_ internal to the [[(∞,1)-topos]] presented by [[model structure on simplicial presheaves|a model of simplicial sets in]] the [[category of sheaves]] on [[Diff]].

Finally, a simplified version of [[∞-groupoid]] is often sufficient and useful: that given by [[strict omega-groupoid|strict ∞-groupoid]]s, equivalently [[crossed complexes]]. These may be straightforwardly [[internalization|internalized]] in any ordinary category with [[pullback]]s. This is discussed in

* [Internal strict $\infty$-groupoids](#Strict)

Under the internal [[omega-nerve]] operation this will embed into the definition of Kan complexes in an ordinary category mentioned before. Even if one is interested just in strict $\infty$-groupoids, this embedding is useful in order to understand what the right notion of morphisms between these objects is, and what the extra [[descent]] conditions are that a proper internal formulation turns out to require on top of the conditions known from the external formulation (all this is discussed below). For that purpose [[Dominic Verity]]'s theorem described at

* [[Verity on descent for strict omega-groupoid valued presheaves]]

is very useful.

## Internal $\infty$-groupoids in an $(\infty,1)$-category {#KanInoo1Cat}

The special case of internal *1-groupoids* in an (∞,1)-category, which are still only associative and unital up to higher homotopy, but which do not include "higher cells" as additional data, is discussed in detail at:

* [[groupoid object in an (∞,1)-category]].

The general case remains to be explored.

## Kan complexes in an ordinary category {#KanIn1Cat}

A standard model for general [[∞-groupoid]]s is given by [[simplicial set]]s that are [[Kan fibration|Kan fibrant]]: [[Kan complex]]es. It is straightforward to [[internalization|internalize]] the [[horn]]-filler condition that characterizes [[Kan complex]]es from the [[category]] [[SSet]] of [[simplicial object]]s in [[Set]] to one of [[simplicial objects]] in any category $C$ with a bit of suitable structure.

* This is described in [Internal horn filler condition](#InternalHornFillers), below.

But for the [[simplicial object]]s in question to be usefully identified as [[∞-groupoid]]s internal to $C$, the horn filler condition is -- while necessary -- typically not sufficient. At least one has to be a bit careful about what it is one wants to model.

A very well understood special case that serves to give some feeling for the general situation is that where $C$ is a [[Grothendieck topos]]. In that case [[simplicial object]]s in $C$ are [[simplicial presheaf|simplicial sheaves]]. There is a well developed theory of [[model structure on simplicial presheaves|model structures on simplicial sheaves]] that are known to be [[models for ∞-stack (∞,1)-toposes]].

* This is described in [Simplicial sheaves](#SimplicialSheaves), below.

In terms of this the true $\infty$-groupoids internal to $C$ are those simplicial sheaves that are fibrant objects in the given [[model category]]. These fibrant simplicial sheaves in particular satisfy the internal Kan filler conditon, but they are characterized by a much stronger condition: in addition they satisfy a [[descent]] condition.

* This is described in [Comparison](#Comparison), below.

Another issue highlighted by this example is that the right notion of morphisms of internal Kan complexes are not just the internal morphisms of simplicial objects: for the case of $C$ a Grothendieck topos and using the model structure on simplicial sheaves as above, the right notion of morphism between two internal Kan complexes $X$ and $A$ is a morphism of simplicial objects $\hat X \to A$ out of a cofibrant replacement of $X$, as discussed at [[derived hom space]]. So the right notion of morphisms of internal $\infty$-groupoids are $\infty$-[[anafunctor]]s.

A little bit of theory for this exists for the slightly more general case that $C$ is an arbitrary [[elementary topos]]. See [[model structure on simplicial objects in a topos]].

For more general $C$ not much is known.

### Definition

#### Internal horn filler condition {#InternalHornFillers}

The [[Kan complex]] definition of [[∞-groupoid]] may be [[internalization|internalized]] to more general categories. Namely:

*  We can define a [[simplicial object]] $X$ in any [[category]] $C$, as a [[contravariant functor]] to $C$ from the [[simplex category]] $\Delta$;
*  Given a simplicial object $X$, we define the object $X^{\Lambda^n_k}$ of $k$-horns of $n$-simplices of $X$ (if it exists) as the [[weighted limit]] of $X\colon \Delta^{op} \to C$ weighted by the standard horn (thought of as a simplicial set) $\Lambda^n_k\colon \Delta^{op} \to Set$.
*  If we have a distinguished class of 'surjections', then we require that each morphism $X_n \to X^{\Lambda^n_k}$ is 'surjective'.

In particular, if $C$ is a [[left exact category]] equipped with a [[Grothendieck pretopology]], then the limits in (2) exist and one can choose single arrow coverings as distinguished 'surjections'. So we define a __[[Kan object]]__ in such a $C$ to be a simplicial object in $C$ satisfying the Kan conditions (3).  Then we may define an __$\infty$-groupoid in $C$__ to be simply a Kan object in $C$.  (Recall that one way to define an ordinary $\infty$-groupoid is as a [[Kan complex]], that is a Kan object in [[Set]].)

Another, almost equivalent, way to describe the Kan conditions expressed in this way is by saying that "the Kan conditions are satisfied" is true in the [[internal logic]] of the [[site]] $C$, or equivalently the internal logic of its [[Grothendieck topos]] of sheaves (after applying the [[Yoneda embedding]] to obtain a simplicial object in this topos).  Of course, if $C$ is itself a Grothendieck topos, then it is equivalent to the topos of sheaves on itself for its [[canonical topology]].  (This is only "almost equivalent" if the Grothendieck pretopology is in fact a topology.)

#### In terms of simplicial sheaves {#SimplicialSheaves}

If the category $C$ is a [[Grothendieck topos]], i.e. a [[category of sheaves]] (of sets) $C = Sh(S)= Sh(S,Set)$ on some small [[site]], then [[simplicial object]]s in $C$ are the same as [[simplicial sheaves]] on $S$

$$
  [\Delta^{op}, C)] \simeq Sh(S, SSet)
  \,.
$$

There are various ([[Quillen equivalence|Quillen equivalent]]) [[model category]] structures on the categories of simplicial sheaves or presheaves on a small site; see [[model structure on simplicial presheaves]] and [[model structure on simplicial sheaves]] for more.  An $\infty$-groupoid in $C$ may be taken to be a fibrant object with respect to one of these model category structures.

#### Comparison {#Comparison}

The two definitions are *not* equivalent even when $C$ is a Grothendieck topos; the second is strictly stronger.  Consider, for instance, a Grothendieck topos $C = Sh(S)$ and an [[internal groupoid]] in $C$, i.e. a sheaf of groupoids on $S$, but which is not a [[stack]].  Then the [[nerve]] of this internal groupoid will satisfy the Kan conditions in the sense of the first definition (by repeating the usual proof that the nerve of a groupoid is a Kan complex in the internal logic), but it will not be fibrant as a simplicial sheaf (since it is not a stack).

On the other hand, it is true that every fibrant simplicial sheaf satisfies the Kan conditions in the internal logic, by the following argument:

1. The fibrant objects in any local [[model structure on simplicial sheaves]] in particular have the property that they are sheaves with values in Kan complexes.

   Here a reminder on why this is so. The local [[model structure on simplicial sheaves|model structures on simplicial sheaves]] are left [[Bousfield localization]]s of the injective or projective [[global model structure on functors]]. So their fibrant objects are in particular fibrant in $[S^{op},SSet]_{proj/inj}$. The fibrant objects in $[S^{op}, SSet]_{proj}$ are (by definition of projective fibrations) precisely the objectwise Kan complexes. The fibrant objects in $[S^{op},SSet]_{inj}$ are less, but still contained in the collection of objectwise Kan complexes.
So also the fibrant objects in $Sh(S,SSet)_{inj,proj}^{loc}$ are in particular Kan complex valued sheaves (that in addition satisfy a [[descent]] condition).

1. The [[weighted limit]]s over simplicial sheaves, or analogously the [[power]]ing of $Sh(S,SSet)$ over [[SSet]] works objectwise, so that for $X \in Sh(S,SSet)$ we have

   $$
     X^{\Lambda_k[n]} : U \mapsto SSet(\Lambda_k[n],X(U))
   $$

   and of course

   $$
     X_n = X^{\Delta[n]} : U \mapsto SSet(\Delta[n],X(U)) = X(U)_n
     \,.
   $$

Therefore fibrant $X \in Sh(S,SSet)$ have the property that for all $n, k$ the canonical morphism $X_n \to X^{\Lambda_k[n]}$ is a surjection when pulled back to any representable $U \to X$. In particular, the morphism is a [[stalk]]wise epimorphism, hence an [[epimorphism]] of sheaves.

Note that the local model structure on simplicial sheaves also contains information about the *cofibrant* objects, which (it can be argued) are necessary to get the right notion of *morphism* between "internal $\infty$-groupoids."  Every Kan complex in $Set$ is cofibrant, but the same cannot be expected to be true everywhere, and in general a (weak) "internal $\infty$-functor" should be expected to be a map out of a cofibrant replacement.

### Examples

Here are some examples of internal $\infty$-groupoids according to the first definition (that is, internal Kan complexes).

* A classical example consists of the __topological $\infty$-groupoids__. The [[nerve]] construction makes a topological $\infty$-groupoid from a [[topological groupoid]]. This is actually a characterization of topological groupoids among topological categories.

* In particular, if $G$ is a [[topological group]], then $N(\mathbf{B}G)$ is a topological $\infty$-groupoid. This is relevant to the construction of the [[classifying spaces]] for continuous [[principal bundles]].

* Another classical example consists of the [[∞-Lie groupoids]].

* [[topological infinity-groupoid]]

## Related concepts

* [[groupoid object in an (infinity,1)-category]]

* [[internal (infinity,1)-category]]

* [[Kan-fibrant simplicial manifold]]

* [[geometric infinity-stack]]

## References

Models for [[∞-stacks]]/[[(∞,1)-presheaves]] in [[higher geometry]] by local Kan complexes of objects in a given site (for instance locally Kan [[simplicial manifolds]] for [[higher differential geometry]]) are discussed in

* [[Thomas Nikolaus]], [[Urs Schreiber]], [[Danny Stevenson]], _Principal $\infty$-bundles - Presentations_ ([arXiv:1207.0249](http://arxiv.org/abs/1207.0249))
  {#NSSb}

[[!redirects Internal infinity-groupoid]]
[[!redirects Internal infinity-groupoids]]

[[!redirects Internal ∞-groupoid]]
[[!redirects internal ∞-groupoid]]
[[!redirects infinity-groupoid object]]
[[!redirects ∞-groupoid object]]
[[!redirects internal Kan complex]]
[[!redirects internal-infinity groupoids]]

[[!redirects internal infinity-groupoids]]