cocompleteness of varieties of algebras

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

# Contents
* the following line creates the automatic table of contents
{: toc}

## Idea ##
The purpose of this summary is to show that the category $\langle
\Omega,E\rangle-\mathbf{Alg}$ (a [[variety of algebras]]) is cocomplete, using the general [[adjoint functor theorem]].  For a different proof in the context of Lawvere theories, see [[algebra over a Lawvere theory|here]].

## Notation ##
Let us first fix some notation and recall the required facts on
varieties of algebras. We assume the foundations of [[Categories Work]]
(ZFC plus one fixed universe).  Let $\Omega$ be a small signature
consisting only of function symbols (this set is assumed to be
equipped with an arity function $\Omega\to \mathbb{N}$), let $\Lambda$
be the set of $\Omega$-terms (also called derived operators), and let
$E\subset \Lambda^2$ be a set of identities.

Recall that a $\langle\Omega,E\rangle$-algebra is just an
$\Omega$-structure (that is, a pair $\langle S,A\rangle$ where $S$ is
a set and $A$ is a function $A\colon \Omega\to\bigcup_n
S^{S^n}$ which assigns to each operator $\omega$ of arity $n$
a function $\omega_A\colon S^n\to S$) that is a model for
$\mu=\lambda$ for any possible interpretation of the variables, for
all $\langle\mu,\lambda \rangle\in E$.

A morphism $f\colon\langle S,A\rangle\to \langle S',A'\rangle$ is
a function $f:S\to S'$ that satisfies $f\circ \omega_A = \omega_{A'}\circ f^n$
for all $n$ and all $\omega\in \Omega$ of arity $n$.  The category $\langle
\Omega,E\rangle-\mathbf{Alg}$ consists of all small
$\langle\Omega,E\rangle$-algebras with the above morphisms as arrows.

There is an obvious forgetful functor
$G:\langle\Omega,E\rangle-\mathbf{Alg}\to \mathbf{Set}$, and it can be
verified directly that this functor creates small limits (in fact,
this functor is monadic and hence creates _all_ limits). Consequently
$\langle \Omega,E\rangle-\mathbf{Alg}$ is small complete.

## Cocompleteness of $\langle\Omega,E\rangle-\mathbf{Alg}$##

Before proving cocompleteness, some preparations are required.
Let us write $C:=\langle\Omega,E\rangle-\mathbf{Alg}$ for
short. Let $J$ be a small category.  To prove cocompleteness, we will
use the general [[adjoint functor theorem]] to construct a left adjoint
for the [[diagonal functor]] $\Delta\colon C\to C^J$.
Since $C$ is locally small and small-complete and $\Delta$ is
continuous (as any diagonal functor), all that is required is a
solution set for each $F\in \operatorname{obj}(C^J)$.

Recall that given a functor $T\colon C\to X$ and an
object $c$ of $C$, an arrow $f\colon x\to T c$ of $X$ is said to
_span_ $c$ when, for all monic $i\colon c'\to c$, if $f$ factors through
$T i\colon T c'\to T c$, then $i$ is an isomorphism.

In our current context, we will replace ''monic''
in the above definition by a stricter notion: the underlying function
in $\mathbf{Set}$ is injective.

+-- {: .num_lemma #cwm}
###### Lemma
**(CWM, p. 127)**. In a category $C$, suppose that
every set of subobjects of an object $c\in C$ has a pullback. Then if
$T\colon C\to X$ preserves all these pullbacks, every arrow $h\colon
x\to Tc$ factors as $Tg\circ f$ for some arrow $f\colon x\to Tc'$
which spans $c'$ and some $g\colon c'\to c$.
=--

It can be verified that this lemma still holds (in our context) if, in
the definition of subobject and spanning arrow, ''monic'' is replaced
by ''the underlying function is injective.''

+-- {: .num_lemma #spans}
###### Lemma
If a cone $\tau\colon F\stackrel{\cdot}{\to}\Delta\langle
S,A\rangle$ spans $\langle S,A\rangle$, then $\langle S,A\rangle$ is
generated by $\bigcup_j\tau_j(F_j)$.
=--

+-- {: .proof}
###### Proof
Let $\langle S',A'\rangle$ be the subalgebra of $\langle
S,A\rangle$ generated by $\bigcup_j\tau_j(F_j)$, and let $i:\langle
S',A'\rangle\to\langle S,A\rangle$ be the inclusion. Then we have the
cone $\tilde{\tau}\colon F\to\Delta\langle S',A'\rangle$ obtained by
restricting the codomains of the $\tau_j$, and $\tau$ splits as
$\Delta(i)\circ\tau'$. So $i$ is an isomorphism, and therefore must be
the identity.
=--

We can now finally prove
+-- {: .un_prop}
###### Proposition
$\langle\Omega,E\rangle-\mathbf{Alg}$ is small cocomplete.
=--

+-- {: .proof}
###### Proof
Let us fix some $F\in C^J$.  Define
$$
\mathcal{S}:= \{\langle S,A\rangle\in \operatorname{obj}(C)|\exists
\tau\colon F\stackrel{\cdot}{\to}\Delta\langle S,A\rangle(\tau \text{ spans
}\langle S,A\rangle)\}.
$$
We note that if $\langle S, A\rangle\in \mathcal{S}$, then by Lemma 2,
$|S|\leq|\mathbb{N}\cup X_{S,\tau}\cup \Omega|\leq |\mathbb{N}\cup
X\cup \Omega|$, where
$X_{S,\tau}:=\bigcup_j\tau_j(F_j)$ for some
$\tau:F\stackrel{\cdot}{\to}\Delta\langle S,A\rangle$ that spans
$\langle S,A\rangle$, and $X:=\bigsqcup_j F_j$. Since $J$ is small and
each $F_j$ is small, so is $X$ (in detail, $X$ may be written as
$\cup\operatorname{Im}(j\mapsto\{j\}\times F_j)$, and the
image of a function from a $U$-small set into the universe $U$ is
$U$-small). Now, as $X$ and $\Omega$ are small, so is
$\mathbb{N}\cup X\cup \Omega$, and therefore we see that the
underlying sets of all members of $\mathcal{S}$ have cardinal numbers
smaller than that of some fixed small set $X'$.

It follows that there exists a
_small_ set $\mathcal{S}'\subseteq \mathcal{S}$ including one
element from each isomorphism class of $\mathcal{S}$ (for example,
since $\mathcal{S}$ is closed under isomorphisms, each isomorphism
class includes an algebra whose underlying set is a subset of $X'$).

Now define
$$
\mathcal{F}:=\left\{\tau\in\operatorname{arr}(C^J)|\operatorname{dom}(\tau)=F\text{
and }\exists\langle S,A\rangle\in
\mathcal{S}'(\operatorname{cod}(\tau)=\Delta\langle S,A\rangle)\right\}
$$
(the set of all arrows $\tau\colon F\stackrel{\cdot}{\to}\Delta\langle
S,A\rangle$ for some $\langle S,A\rangle\in\mathcal{S}'$).  To see
that $\mathcal{F}$ is small, note that each $\tau\in\mathcal{F}$ is in
particular a function
$\operatorname{obj}(J)\to\bigcup_{j\in J,\langle
S,A\rangle\in\mathcal{S}'}\operatorname{hom}(F_j,\langle S,A\rangle)$,
and the set of all such functions is small (as any set of functions
between two small sets).

Clearly, if for all $\langle S,A\rangle\in C$ the set of subobjects is
small-indexed, then it follows from Lemma 1 that $\mathcal{F}$ is the
required solution set (since $C$ is small complete and $\Delta$ is
continuous), and we are done .  But two injections $f,g$ with codomain
$\langle S,A\rangle$ are equivalent iff they have the same image in
$S$, and hence there is a bijection between the subobjects of $\langle
S, A\rangle$ and the subalgebras of $\langle S, A\rangle$, as required
(recall that we replaced ''monic'' by ''injective as a function'' in
the definition of subobject).
=--

## Cocompleteness of algebras of monads over $Set$

First, the category of algebras of a monad $T$ on $Set$ has coequalizers; see the proof of proposition 3.4 (page 278 of 303) of [Toposes, Triples, and Theories](http://www.case.edu/artsci/math/wells/pub/pdf/ttt.pdf) by Barr and Wells. So we have only to prove the following.

+-- {: .un_prop}
######Proposition
The algebra category $Set^T$ has coproducts.
=--

+-- {: .proof}
######Proof
Let $U: Alg_T \to Set$ be the underlying functor, with left adjoint $F$. Given a family of $T$-algebras $\{A_i\}$, there are canonical coequalizers

$$F U F U A_i \stackrel{\overset{\varepsilon F U A_i}{\to}}{\underset{F U \varepsilon A_i}{\to}} F U A_i \to A_i$$

and since $F(\sum_i U A_i)$ is the coproduct $\sum_i F U A_i$ in the category of algebras, i.e., since coproducts of free algebras exist, the coproduct of the $A_i$ is constructed as a coequalizer of the pair

$$(\sum_i \varepsilon F U A_i, \sum_i F U \varepsilon A_i): \sum_i F U F U A_i \stackrel{\to}{\to} \sum_i F U A_i$$

obtained by summing over $i$ each of the parallel pairs.
=--

## Over a cocomplete cartesian closed category

If $T$ is a [[finitary monad]] defined on a cocomplete cartesian closed category $X$, then $T$ preserves [[reflexive coequalizer]]s (see the argument [here](http://nlab.mathforge.org/nlab/show/reflexive+coequalizer#applications_4)), and therefore the underlying functor

$$U: X^T \to X$$

reflects reflexive coequalizers (since the underlying functor reflects classes of colimits preserved by the monad). Since the parallel pairs in the proof of the preceding proposition are reflexive, we see by adapting that proof that $X^T$ has coproducts. It remains only to prove the following.

+-- {: .un_lem}
######Lemma
If a category has finite coproducts and reflexive coequalizers, then it has general coequalizers.
=--

+-- {: .proof}
######Proof
Given a parallel pair $f, g: A \stackrel{\to}{\to} B$, there is a reflexive parallel pair

$$(f, 1_B), (g, 1_B): A + B \stackrel{\to}{\to} B$$

whose coequalizer is the coequalizer of the pair $f, g$.
=--

See also [[cocompleteness of categories of algebras]].


cocompletion

While is "completion" a very general term for a number of notions in mathematics, many of them are in the sense of completions under some sort of limits. In that case, sometimes one uses the term __cocompletion__ for a dual case of completing under colimits. For example, [[free cocompletion]]
and [[ind-cocompletion]].

* R. Betti, _Cocompleteness over coverings_, J. Austral. Math. Soc. Ser. A, 39 (1985), pp. 169–177


cocone

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Category theory
+--{: .hide}
[[!include category theory - contents]]
=--
#### Limits and colimits
+--{: .hide}
[[!include infinity-limits - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A _cocone_ under a [[diagram]] is an [[object]] equipped with [[morphism]]s from each vertex of the diagram into it, such that all new diagrams arising this way commute.

A cocone which is [[universal property|universal]] is a [[colimit]].

The dual notion is _[[cone]]_ .

## Definition

Let $C$ and $D$ be [[category|categories]]; we generally assume that $D$ is [[small category|small]].  Let $f:D\to C$ be a [[functor]] (called a _[[diagram]]_ in this situation). Then a __cocone__ (or _inductive cone_) over $f$ is a pair $(e,u)$ of an object $e\in C$ and a [[natural transformation]] $u : f\to \Delta e$ (where $\Delta e$ is the [[constant functor|constant diagram]] $\Delta e:D\to C$, $x\mapsto e$, $x\in D$). In other words, a diagram as follows, together with a natural transformation going south west to north east.

\begin{tikzcd}
D \ar[r] \ar[dr, "f", swap] & 1 \ar[d, "e"] \\
& C
\end{tikzcd}

Note that a cocone in $C$ is precisely a [[cone]] in the [[opposite category]] $C^op$.

Terminology for [[natural transformation]]s can also be applied to cocones.  For example, a _component_ of a cocone is a component of the natural transformation $u$; that is, the component for each object $x$ of $D$ is the morphism $u(x): f(x) \to e$.

A __morphism of cocones__ $(e,u)\to (e',u')$ is a morphism $\gamma:e\to e'$ in $C$ such that $\gamma\circ u_x=u'_x$ for all objects $x$ in $D$ (symbolically $(\Delta \gamma)\circ u = u'$); the composition being the composition of underlying morphisms in $C$. Thus cocones form a category whose [[initial object]] if it exists is a [[colimit]] of $f$.

[[!redirects cocones]]
[[!redirects co-cone]]
[[!redirects co-cones]]


cocontinuous functor

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
#### Limits and colimits
+--{: .hide}
[[!include infinity-limits - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A [[functor]] is **cocontinuous** if it [[preserved colimit|preserves]] [[small category|small]] [[colimit|colimits]].

Typically one only considers cocontinuous functors whose [[domain]] and [[codomain]] are [[cocomplete categories]] (have all small colimits).

Note that $F\colon C \to D$ is cocontinuous if and only if the functor $F^{op}: C^{op} \to D^{op}$ between [[opposite categories]] is a [[continuous functor]].

## Examples

\begin{example}
Every [[left adjoint functor]] is contontinuous, since [[left adjoints preserve colimits]].
\end{example}

Not every functor is cocontinuous:
\begin{example}
A [[counterexample]] of a dis-cocontinuous functor is the [[forgetful functor]] $F \colon Set_* \rightarrow Set$ from the category of [[pointed sets]] to the category [[Set]] of [[sets]].
\end{example}

## Related concepts

* [[continuous functor]]

* [[cocomplete category]]

* [[adjoint functor theorem]]

[[!include properties of functors -- contents]]

## References

See the references at *[[continuous functor]]*.

[[!redirects cocontinuous functors]]


cocycle

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

#Contents#
* table of contents
{:toc}

## Idea

From the [[nPOV]], a [[cohomology]] set $H(X,A)$ of cohomology classes

1. on a [[domain]] [[object]] $X$

1. with [[coefficients]] in an [[object]] $A$

1. in an [[(∞,1)-topos]] $\mathbf{H}$

is the [[connected components]]/[[decategorification]] of

* the [[derived hom space|hom ∞-groupoid]] $\mathbf{H}(X,A)$ -- the [[cocycle space]].

The [[objects]] in this [[cocycle space]] [[∞-groupoid]] $\mathbf{H}(X,A)$ are called **cocycles**; the [[morphisms]] are called _[[coboundaries]]_.

For suitable choices of $\mathbf{H}$ this applies notably to cocycles in

* general [[abelian sheaf cohomology]]

* general [[nonabelian cohomology]]

and in particular to

* [[chain homology and cohomology|chain cohomology]]

* [[group cohomology]]

* [[nonabelian group cohomology]].

It also encompasses variations such as cocycles in

* [[equivariant cohomology]]

* [[twisted cohomology]]

* [[differential cohomology]].

For a detailed discussion of this and how it relates to various familiar realizations of cocycles, see [[cohomology]] and the links provided there.

## Realizations of cocycles

The objects in the [[derived hom space|hom ∞-groupoid]] $\mathbf{H}(X,A)$ are often expressed in terms of various 1-categorical models for $\mathbf{H}$, such as a [[homotopical category]] $C$ equipped with

* the extra structure of a [[calculus of fractions]],

* or with the structure of a [[category of fibrant objects]]

* or even with the full structure of a [[model category]].

In all of these cases, cocycles $c$ on $X$ with coefficients in $A$ may be modeled by [[span]]s of the form

$$
  \array{
    X &\stackrel{\in FW}{\leftarrow}& \tilde X \to A
  }
$$

in the ordinary [[category]] $C$, where the morphism on the left is taken from a special class of morphisms (for instance from the class of acyclic fibrations in the case that $C$ is a [[category of fibrant objects]]). In each case the relevant [[hom-set]] in the [[homotopy category]] $H(X,A) = \pi_0 \mathbf{H}(X,A)$ is given by the collection of cocycles module an [[equivalence relation]] given by coboundaries. In formulas

$$
  H(X,A) = colim_{\tilde X \stackrel{\in FW}{\to} X} Hom_{\pi C}(X,A)
  \,.
$$

For details see the respective discussion at [[homotopy category]], [[calculus of fractions]] and [[category of fibrant objects]].

## Terminology

In the existing literature on [[localization]]s, the spans $ X \stackrel{\in FW}{\leftarrow} \tilde X \to X$ are often not called by a dedicated special term. On the other hand, in the existing literature that explicitly uses the term "cocycle", often more pedestrian definitions are used and it is not made explicit that morphisms in a [[homotopy category]] are being represented.

An notable exception to this is the article

* Jardine, _Cocycle categories_ ([web](http://www.math.uiuc.edu/K-theory/0782/))

that makes both the abstract concept and the terminology of cocycles explicit and manifest. The author is mainly motivated from the [[model structure on simplicial presheaves]] and its variants, which in particular models cocycles and cohomology of [[abelian sheaf cohomology]]. But more generally it models [[nonabelian cohomology]]. Notably when the underlying space is the point, it models ordinary [[chain homology and cohomology|chain cohomology]] as well as [[group cohomology]] and [[nonabelian group cohomology]].

Notice that this article chooses to work with the full structure of a [[model category]] but presents constructions for cocycles entirely analogous to and in fact inspired by those used in a [[category of fibrant objects]] or in one equipped with a [[calculus of fractions]]. The author emphasizes that he can give a definition where the left leg of the cocycle spans are not required to be acyclic fibrations, but can be any weak equivalences. But all this is just a technical question of how exactly to model a cocycle, not a question of principle of concept. For instance in this context every cocycle defined with respect to a weak equivalence over its domain is cohomologous to one defined with respect to an acyclic fibration over its domain.

In the special case that the category $C$ is [[Cat]] equipped with the [[folk model structure on Cat]], cocycles out of acyclic fibrations -- which are [[k-surjective functor]]s for all $k$ in this case -- have been considered in

* Makkai, _[Avoiding the axiom of choice in general category theory](http://www.math.mcgill.ca/makkai/anafun/)_ .

There they are called **[[anafunctor]]s**.

One could take this as a suggestion to find a dedicated term for spans as above and call generally such a span an **anamorphism**. An anamorphism would be effectively the same as a cocycle, but the term _[[morphism]]_ in it would amplify the nature of cocycles as morphisms.

So

* a _cocycle_ on $X$ with coefficients in $A$

would correspond to

* an _anamorphism_ from $X$ to $Y$.

## Examples

### Cochain cocycles {#CochainCocycles}

The archetypical example of a notion of cocycles is that of [[chain homology and cohomology|chain cohomology]]:

a non-negatively graded [[chain complex]] $V_\bullet = (V_0 \stackrel{\partial_V}{\leftarrow} V_1 \stackrel{\partial_V}{\leftarrow} V_2 \stackrel{}{\leftarrow} \cdots)$ is given. An element $v \in V_n$ is a **chain**. A linear dual $\omega : V_n \to k$ on its elements is a **cochain**. The cochains arrange into the [[cochain complex]] $V^\bullet = (V^0 \stackrel{d_V}{\to} V^1 \to \stackrel{d_V}{\to} V^2 \to \cdots) := (V_0^* \stackrel{(\partial_V)^*}{\to} V_1^* \to \stackrel{(\partial_V)^*}{\to} V_2^* \to \cdots)$

A cochain $\omega \in V^n$ is a **cocycle** if it is closed with respect to the [[differential]] $d_V$ in that

$$
  d_V \omega = 0
  \,.
$$

One sees that such cocycles are in bijection to [[morphism]]s of [[chain complex]]es

$$
  \omega : V_\bullet \to (\mathbf{B}^n k)_\bullet
  \,,
$$

where on the right we have the [[Eilenberg-MacLane object]] of the ground field $k$, which is the chain complex trivial everywhere except in degree $n$, where it is $k$:

$$
  \mathbf{B}^n k = (0 \leftarrow \cdots \leftarrow 0 \leftarrow k \leftarrow 0 \leftarrow \cdots)
  \,.
$$

By definition such a morphism is a collection of morphisms $\omega_r : V_r \to (\mathbf{B}^n k)_r$, of which by definition only $\omega_n \in V_n^* = V^n$ can be nontrivial.

For the collection of these maps to be a morphism of chain complexes they have to make all squares in sight commute. The only nontrivial one in this case is the one

$$
  \array{
    V_{n+1} &\to& 0
    \\
    {}^{\mathllap{\partial_V}}\downarrow && \downarrow
    \\
    V_n &\stackrel{\omega}{\to}& k
  }
  \,.
$$

Its commutativity means in formulas that

$$
  \omega \circ \partial_V = d_V \omega = 0
  \,,
$$

which is the cocycle condition from above.

In most cases the morphism $\omega : V_\bullet \to \mathbf{B}^n k$ defined this way is already a morphism in the relevant [[(∞,1)-category]] $\mathbf{H}_{Ch_\bullet}$ of chain complexes: this is modeled for instance by the projective [[model structure on chain complexes]]. In this every object is fibrant, and the cofibrant objects are those consisting of projective $k$-[[module]]s. If we assume that all our modules are projective (for instance in the archetypical case that our modules are simply [[vector space]]s), then $\omega : V_\bullet \to \mathbf{B}^n k$ is a cocycle in $\mathbf{H}_{Ch_\bullet}$ from the above abstract nonsense point of view. For its cohomology class we may write

$$
  [\omega] \in H^n(V_\bullet,k) = \pi_0 \mathbf{H}_{Ch_\bullet}(V_\bullet, \mathbf{B}^n k)
  \,.
$$

## Objects classified by cocycles {#Classification}

One says for $\omega \in \mathbf{H}(X,A)$ a cocycle, that the object **classified by the cocycle** is its [[homotopy fiber]] $P \to X$ regarded as an object in the [[overcategory]] over $X$.

This homotopy fiber may be thought of as the internal [[principal ∞-bundle]] in $\mathbf{H}$ with classifying map $\omega$.

## Related concepts

[[!include chains and cochains - table]]

[[!redirects cocycles]]


cocycle space

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

#Contents#
* table of contents
{:toc}

## Idea

Given any kind of [[generalized cohomology theory]] $\mathbf{H}$, and a [[domain]] $X$ and [[coefficient]] $A$, the _cocycle space_ $\mathbf{H}(X,A)$ is the "space", or rather the the [[∞-groupoid]]/[[homotopy type]], whose

* [[elements]]/[[objects]] are [[cocycles]] in $\mathbf{H}$-[[generalized cohomology theory|cohomology theory]] on $X$ with [[coefficients]] in $A$ (hence [[maps]]/[[morphisms]] $X \to A$);

* [[edges]]/[[morphisms]] are [[coboundaries]] between these cocycles (i.e. [[homotopies]]/[[gauge transformations]])

* [[faces]]/[[2-morphisms]] are coboundaries between coboundaries;

* ...

* [[n-cells]]/[[n-morphisms]] are $n$th order coboundaries (i.h. [[higher homotopies]]/[[higher gauge transformations]]).

## Definition

Precisely: For $\mathbf{H}$ some [[(∞,1)-topos]], and $X,A \in \mathbf{H}$ two [[objects]], the _cocycle space_ of [[cocycles]] on $X$ with [[coefficients]] in $A$ is the [[(∞,1)-categorical hom-space]] $\mathbf{H}(X,A)$.

## Truncation to cohomology sets

The actual [[cohomology]] [[set]] $H(X,A)$ is the [[0-truncation]]/[[connected components]] of the cocycle space:

$$
  H(X,A) \;=\; \pi_0\big( \mathbf{H}(X,A) \big)
  \,.
$$

Similarly, if $A$ is equipped with the [[mathematical structure|structure]] of a [[pointed object]] $\ast \overset{a_0}{\to} A$, the cocycle space $\mathbf{H}(X,A)$ becomes canonically pointed by the [[constant morphism]] $const_{a_0} \colon X \to \ast \overset{a_0}{\to} A$ and the [[0-truncation]]/[[connected components]] of the corresponding [[based loop space]] of the cocucle space is the cohomoloy set in one degree lower:

$$
  H(X,\Omega A)
  \;\simeq\;
  \pi_1 \big( \mathbf{H}(X,A), const_{a_0} \big)
  \;\simeq\;
  \pi_0 \big(  \Omega_{const_{a_0}} \mathbf{H}(X,A) \big)
  \,.
$$

Etc.

## Related concepts

* [[hom-space]], [[space of maps]]

* [[Cohomotopy charge map]]

[[!include homotopy-homology-cohomology]]

[[!redirects cocycle spaces]]


cocyclic object

A __cocyclic object__ in a category $C$ is a [[cyclic object]] in $C^{\mathrm{op}}$, or equivalently, a copresheaf on [[Connes' cyclic category]] $\Lambda$ with values in $C$.


cocylinder

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Limits and colimits
+--{: .hide}
[[!include infinity-limits - contents]]
=--
#### Homotopy theory
+--{: .hide}
[[!include homotopy - contents]]
=--
=--
=--

# Cocylinders and mapping cocylinders
* table of contents
{: toc}

## Ideas

In [[algebraic topology]] and [[homotopy theory]], a **cocylinder** is a dual construction to a [[cylinder]].  In contexts where spatial intuition is involved, it is perhaps more often called a [[path space]]  $X^I$ or a [[path space object]]. In general, however, a cocylinder, $X^I$, may not involve any object $I$ nor use a mapping space in its construction, see [[cylinder functor]] for the discussion of the dual point.

## Definition (cocylinders and cocylinder functors)

These are the duals of [[cylinders]] and [[cylinder functors]] so can safely be left as an exercise.

## Ideas continued

Similarly, the **mapping cocylinder**, which is dual to the [[mapping cylinder]], is equally called the **mapping path space** or **mapping path fibration**.  It provides a canonical way to factor any map as a [[homotopy equivalence]] followed by a [[fibration]].

## Definition (mapping cocylinders)

### In category theory

For a [[topological space]] $X$, its **cocylinder** is simply the path space $X^{[0,1]}$.  More generally, in a [[cartesian closed category]] with an [[interval object]] $I$, the **cocylinder** of an object $X$ is the [[exponential object]] $X^I$.  Even more generally, in a [[model category]] the **cocylinder** of any object is the [[path space object]] --- the factorization of the [[diagonal morphism]] $X\to X\times X$ as an [[acyclic cofibration]] followed by a [[fibration]].

In any of these cases:

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

Given a [[morphism]] $f\colon X\to Y$, its **mapping cocylinder** (or **mapping path space** or **mapping path fibration**) is the [[pullback]]
$$
 \array{
   Cocyl(f)&\to& X\\
    \downarrow&&\downarrow f \\
    Y^I&\stackrel{ev_0}{\to}&Y
    \\
    \downarrow^{\mathrlap{ev_1}}
    \\
    Y
 }$$
where $Y^I$ is the cocylinder.

=--

The mapping cocylinder is sometimes denoted $M_f Y$ or $N f$.

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

If we interchange $ev_0$ and $ev_1$ then we have an upside-down version of a cylinder, sometimes called inverse (or inverted) mapping cocylinder; but usually it is clear just from the context which version is used.  They are homotopy equivalent, so usually it does not matter.

=--

### In type theory

In [[homotopy type theory]] the mapping cocylinder $Cocyl(f) \to Y$ is expressed as

$$
  y : Y \vdash \sum_{x  \in X} (f(x) = y)
$$

being the [[dependent sum]] over $x$ of the [[substitution]] of $f(x)$ for $y_1$ in the [[dependent type|dependent]] [[identity type]] $(y_1 = y)$. Equivalently this is the $y$-[[dependent type|dependent]] [[homotopy fiber]] of $f$ at $y$

$$
  y : Y \vdash hfiber(f,y)
  \,.
$$

## Examples

* In the case of [[topological spaces]], the mapping cocylinder is the subspace $Cocyl(f)\subset Y^I\times X$ whose elements are pairs $(s,x)$ such that $s(0)=f(x)$.

* In [[homotopy type theory]], cocylinders represent [[identity types]], and the mapping cocylinder represents the [[dependent type]] $y\colon Y \vdash hfiber(f,y)\colon Type$.  This is used crucially in the definition of [[equivalence in homotopy type theory]].

## Applications

* The mapping cocylinder is the central ingredient in the [[factorization lemma]].

* One usage is discussed at _[[Hurewicz connection]]_.

* The mapping path fibration is used in the construction of the [[Strøm model structure]] on topological spaces.

* The [[homotopy fiber]] can be constructed as the strict [[fiber]] of the mapping cocylinder.

## Related concepts

[[!include universal constructions of topological spaces -- table]]

## References

* [[George Whitehead]],  _Elements of homotopy theory_

Peter May's books use the terminology *mapping path space*.

[[!redirects cocylinder]]
[[!redirects cocylinders]]
[[!redirects mapping cocylinder]]
[[!redirects mapping cocylinders]]
[[!redirects mapping path space]]
[[!redirects mapping path spaces]]
[[!redirects mapping path fibration]]
[[!redirects mapping path fibrations]]


code loop

# Code loops
* table of contents
{: toc}

## Overview

A **code loop** is a certain sort of [[Moufang loop]] constructed as a [[central extension]] of certain [[vector spaces]] over the [[finite field]] $\mathbb{F}_2$. In particular, such vector spaces are taken to be doubly even [[binary linear codes]].

A general result about the existence of code loops is as follows.

+-- {: .num_theorem}
###### Theorem
([Griess](#Griess)).
Every doubly even binary code has a unique extension by a non-associative Moufang loop.
=--

This can be seen as a result about the cohomology used to define code loops, namely that it is isomorphic to $\mathbb{Z}/2$ (one always has the trivial extension, which is just a group).

Code loops were originally defined independently by Robert Griess and Richard Parker. A modern description is in ([Hsu](#Hsu)).

Parker's code loop was used by [[John Conway]] to construct the [[Monster group]], and arises from taking the binary code to be the [[binary Golay code]].

## References

* {#Griess} Robert Griess, _Code loops_, J. Algebra __100__ (1986), no. 1, 224–234. doi:[10.1016/0021-8693(86)90075-X](http://dx.doi.org/10.1016/0021-8693%2886%2990075-X)

* {#Hsu}  Tim Hsu, _Explicit constructions of code loops as centrally twisted products_, Math. Proc. Cambridge Philos. Soc. 128 (2000), no. 2, 223–232 ([journal](http://journals.cambridge.org/action/displayAbstract?fromPage=online&aid=37707&fulltextType=RA&fileId=S030500419900403X));

* Tim Hsu, _Moufang loops of class 2 and cubic forms_, Math. Proc. Camb. Phil. Soc. __128__ (2000), 197-222 (on the arXiv as [math.GR/9611214](http://arxiv.org/abs/math/9611214) under the title _Class 2 Moufang loops, small Frattini Moufang loops, and code loops_).

[[!redirects code loops]]


codense functor

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
=--
=--
# Contents
* automatic table of contents goes here
{:toc}

##Idea

The concept of a **codense functor** is the dual of [[dense functor]].

## Definition

Let $F\colon A \to B$ be a [[functor]] between [[categories]]. It is **codense** when for each $b \in B$ the following is true:

  $Lim((b \downarrow F) \to A \to B) = b$

(where $(b \downarrow F)$ is a [[comma category]] (in this case the [[under category]]) from $b$ to the functor $F$.

This notion is dual to the notion of [[dense functor]].

Equivalently, a functor $F$ is **codense** iff $Id_B$, together with identity natural transformation $Id_F\colon F \to F$, is the pointwise [[Kan extension]] of $F$ along $F$.

Also, $F$ is **codense** iff  its [[codensity monad]] is the identity.

A [[subcategory]] is **codense** if the inclusion functor is codense.

## Examples

*  Let $I$ denote the unit interval. Then the full subcategory of the category  of compact topological spaces $T$ whose only object is $I^2$ is a dense subcategory of $T$ ([Ulmer 68, p.80](#Ulmer68)).

## Related concepts

* [[dense]]

* [[dense functor]]

* [[codensity monad]]

## References

* {#Ulmer68} [[Friedrich Ulmer]], _Properties of Dense and Relative Adjoint Functors_, Journal of Algebra 8, 77-95 (1968)

* [[William Lawvere]], _John Isbell's Adequate Subcategories_, TopCom **11** no.1 2006. ([link](http://at.yorku.ca/t/o/p/d/65.htm))


codense subspace

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

#Contents#
* table of contents
{:toc}

## Definition

Given a [[topological space]]  $X$, a [[subspace]] $Y$ of $X$ is __codense__ if for each closed nonempty subset, $A$, of $X$, $A \cap Y \neq \emptyset$.

## Related entries

* [[codense functor]]
* [[codensity monad]]
* [[dense subspace]]


codensity monad

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

# Contents
* table of contents
{:toc}

## Idea
 {#Idea}

Recall (eg. from [here](monad#RelationBetweenAdjunctionsAndMonads)) that every [[right adjoint functor]] $F\dashv G \,\colon\, \mathcal{B}\to\mathcal{A}$ indues a [[monad]] on $\mathcal{A}$ whose [[underlying]] [[endofunctor]] is $G\circ F$.

The notion of the *codensity monad* $\mathbb{T}^G$ is a generalization of this construction to functors $G \colon \mathcal{B}\to\mathcal{A}$ that need not be [[right adjoints]] but do at least admit a right [[Kan extension]] $Ran_G G$ along themselves, such that both constructions agree when $G$ is in fact a [[right adjoint]].

The name 'codensity monad' stems from the fact that $\mathbb{T}^G$ reduces to the [[identity functor|identity]] monad iff $G \colon \mathcal{B}\to\mathcal{A}$ is a [[codense functor]]. Thus, in general, the codensity monad "measures the failure of $G$ to be codense".

The same idea applies to [[2-categories]] or [[bicategories]] more general than [[Cat]]: codensity monads can be defined whenever suitable right Kan extensions exist.

## Definition

\begin{definition}
\label{codensity_monad}
**(codensity monad)**
\linebreak
Let $G \colon \mathcal{B}\to\mathcal{A}$ be a [[functor]] whose [pointwise](Kan+extension#Pointwise) right [[Kan extension]] $Ran_G G \,\equiv\, (T^G,\;\alpha)$ along itself exists, with $\alpha \,\colon\, T^G \circ G \Rightarrow G$ denoting the corresponding [[universal construction|universal]] [[2-morphism]] on the [[underlying]] functor $T^G \colon \mathcal{A}\to\mathcal{A}$.

The _codensity monad_ of $G$ is the [[monad]]
$$
  \mathbb{T}^G
    \coloneqq
  \big\langle
    \;
    T^G
     \,\colon\,
    \mathcal{A} \to\mathcal{A}
    ,\;\;\;
    \eta^G \colon id_\mathcal{A}\Rightarrow T^G
    ,\;\;\;
   \mu^G \colon T^G\circ T^G \Rightarrow T^G
   \;
  \big\rangle
  \,,
$$
where

* the *[[monad unit]]* $\eta^G \colon id_\mathcal{A}\Rightarrow T^G$ is the [[natural transformation]] given by the [[universal property]] of $(T^G,\;\alpha)$ with respect to the pair $(id_\mathcal{A},\;1_G)\;$,

* the *monad multiplication* $\mu^G \colon T^G\circ T^G\Rightarrow T^G$ results from the [[universal property]] of $(T^G,\;\alpha)$ with respect to the pair $(T^G\circ T^G,\;\alpha\circ (1_{T^G}\ast\alpha))$.

\end{definition}

Concerning existence, $Ran_G G$ exists for $G \colon \mathcal{B}\to\mathcal{A}$, e.g. when $\mathcal{B}$ is [[small category|small]] and $\mathcal{A}$ is [[complete category|complete]].

In this circumstance, when $\mathcal{B}$ is small and $\mathcal{A}$ is complete, then the codensity monad is equivalently the one that [arises](monad#RelationToAdjunctionsAndMonadicity) from the [[adjoint functor|adjunction]]
\[

  \mathcal{A}
  \underoverset
    {\underset{}{\longleftarrow}}
    {\overset{hom(-,G)}{\longrightarrow}}
    {\bot}
  [\mathcal{B},Set]^{op}
  \,,
\]
where

* the [[left adjoint]]
$hom(\text{-},G) \,\colon\, \mathcal{A} \to [\mathcal{B},Set]^{op}$
takes any [[object]] $a$ to the [[hom-functor]] $Hom_{\mathcal{A}}\big(a, \,G(\text{-})\big) \colon \mathcal{B}\to Set$,

* the [[right adjoint]] $[\mathcal{B},Set]^{op}\to \mathcal{A}$ is the unique [[preserved limit|limit-preserving]] functor from the [[free completion]] of $\mathcal{B}$ to $\mathcal{A}$ which agrees on $\mathcal{B}$ with $G$.

(See also [[nerve and realization]]; the description of the adjunction above is a formal dual of a nerve-realization adjunction, and gives the right Kan extension $Ran_G G$ as a pointwise Kan extension. In the pointwise setting, $G$ is codense if and only if the left adjoint is [[full and faithful]].)

Even if $Ran_G G$ (assuming it exists) is not a pointwise Kan extension, Def. \ref{codensity_monad} indeed defines a [[monad]]. The proof may be given generally for any [[2-category]] in which the right Kan extension $Ran_G G$ exists for a 1-cell $G: \mathcal{B} \to \mathcal{A}$.

\begin{theorem}
$Ran_G G$, with the unit $\eta^G$ and multiplication $\mu^G$, is a monad.
\end{theorem}

\begin{proof}
The [[universal property]] of the [[Kan extension]] states that for any $H: \mathcal{A} \to \mathcal{B}$, there is a natural bijection

\[\hom(H, T^G) \cong \hom(H G, G);\]

let $\varepsilon: T^G G \to G$ be the 2-cell corresponding to $1_{T^G} \in \hom(T^G, T^G)$. Note that the bijection takes a 2-cell $\alpha: H \to T^G$ to the composite

\begin{tikzcd}
H G \ar[r, "\alpha G"] & T^G G \ar[r, "\varepsilon"] & G.
\end{tikzcd}

The 2-cell $\eta^G\colon 1 \to T^G$ is defined so that $(\varepsilon) (\eta^G G) = 1_G$, and the 2-cell $\mu^G \colon T^G T^G \to T^G$ is defined so that $(\varepsilon) (\mu^G G) = (\varepsilon)(T^G \varepsilon)$.

To check the monad unit law that says the triangle

\begin{tikzcd}
  T^G
  \ar[d, "\eta^G T^G"{swap}]
  \ar[dr, "1_{T^G}"]
  &
  \\
  T^G T^G
    \ar[r, "\mu^G"]
  &
  T^G
\end{tikzcd}

commutes, it suffices by universality to check that applying $G$ on the right, followed by $\varepsilon$, results in a commutative diagram. This follows from commutativity of the diagram

\begin{tikzcd}
  T^G G
  \ar[d, "\eta^G T^G G"]
  \ar[r, "\varepsilon"]
  &
  G \ar[d, "\eta^G G"{description}]
  \ar[dr, "1_G"]
  &
  \\
  T^G T^G G
  \ar[r, swap, "T^G \varepsilon"]
  &
  T^G G
  \ar[r, swap, "\varepsilon"]
  &
  G
\end{tikzcd}

(where the square commutes by 2-categorical interchange), together with commutativity of

\begin{tikzcd}
T^G G \ar[dr, "1_{T^G} G"] \ar[r, "\varepsilon"] & G \ar[dr, "1_G"] & \\
& T^G G \ar[r, swap, "\varepsilon"] & G.
\end{tikzcd}

To check the other monad unit law is even simpler, because it follows directly from the commutativity of

\begin{tikzcd}
T^G G \ar[d, swap, "T^G \eta^G G"] \ar[dr, "1"] & & \\
T^G T^G G \ar[r, swap, "T^G \varepsilon"] & T^G G \ar[r, swap, "\varepsilon"] & G
\end{tikzcd}

where commutativity of the triangle comes from how we introduced $\eta^G$ in this proof.

Monad associativity follows by showing that the maximal paths in

\begin{tikzcd}
T^G T^G T^G G \ar[r, "T^G \mu^G G"] \ar[d, swap, "\mu^G T^G G"] & T^G T^G G \ar[d, "T^G \varepsilon"] & \\
T^G T^G G \ar[r, swap, "T^G \varepsilon"] & T^G G \ar[r, swap, "\varepsilon"] & G
\end{tikzcd}

evaluate to the same 2-cell. By 2-categorical interchange, we may replace the composite "down, then right" to obtain the diagram

\begin{tikzcd}
T^G T^G T^G G
\ar[r, "T^G \mu^G G"] \ar[d, swap, "T^G T^G \varepsilon"] & T^G T^G G \ar[d, "T^G \varepsilon"] &
\\
T^G T^G G \ar[r, swap, "\mu^G G"]
& T^G G \ar[r, swap, "\varepsilon"] & G
\end{tikzcd}

and then use how we introduced $\mu^G$ in this proof to further replace "right, then down" by

\begin{tikzcd}
T^G T^G T^G G \ar[r, "T^G T^G \varepsilon"] \ar[d, swap, "T^G T^G \varepsilon"]
& T^G T^G G \ar[d, "T^G \varepsilon"] &
\\
T^G T^G G \ar[r, swap, "\mu^G G"]
& T^G G \ar[r, swap, "\varepsilon"]
& G,
\end{tikzcd}

and finally finish the proof by observing that $\varepsilon$ coequalizes $\mu^G G$, $T^G \varepsilon$.
\end{proof}

## Examples

\begin{example}
Every monad that is [induced](monad#RelationBetweenAdjunctionsAndMonads) by an adjunction $L \dashv R$ is the codensity monad of $R$. In particular, every [[enriched monad]] is a codensity monad (via its [[Kleisli category]]).
\end{example}

\begin{example}
Let $d$ be an object in a [[closed category]] $C$. Then the codensity monad of the [[constant functor]] $d : 1 \to C$ is the **double dualization monad** associated to $d$, given by $d^{d^{(-)}}$.

More conceptually, the codensity monad construction may be seen as a generalisation of the double dualisation construction analogous to the generalisation from [[algebras for a monad]] to [[modules over a monad]] (the latter is the perspective that is most natural 2-categorically).
\end{example}

\begin{example}
The [[Giry monad]] (as well as a finitely additive version) arise as codensity monads of forgetful functors from subcategories of the category of [[convex sets]] to the category of [[measurable spaces]] ([Avery 14](#Avery14)).
\end{example}

\begin{example}
The codensity monad of the inclusion [[FinSet]] $\hookrightarrow$[[Set]] is the [[ultrafilter]] monad. Its algebras are [[compact Hausdorff spaces]].
\end{example}

\begin{example}
The codensity monad of the inclusion $FinGrp \hookrightarrow$ [[Grp]], is the [[profinite completion of a group|profinite completion]] monad, whose algebras may be identified with [[profinite groups]] -- that is, [[topological groups]] whose underlying topological space is profinite ([Avery 17, Proposition 2.7.10](#Avery17)).
\end{example}

\begin{example}
The codensity monad of the inclusion $FinSet \to Top$
computes the [[Stone spectrum]] of the [[Boolean algebra]] of [[clopen subsets]]
of a [[topological space]].
Its algebras are precisely the [[Stone spaces]].
([Sipoș, Theorem 2](#Sipos)).
\end{example}

\begin{example}
The codensity monad of the inclusion $N \to Top$, where
$N$ denotes the [[full subcategory]] of [[Top]] consisting
of arbitrary [[small products]] of the [[Sierpinski space|Sierpiński space]],
is the [[localic spectrum]] of the [[frame]] of opens of a [[topological space]].
Its algebras are precisely the [[sober spaces]].
([Sipoș, Theorem 6](#Sipos))
\end{example}

\begin{example}
The codensity monad of the inclusion of [[countable sets]] in all sets, $Ctbl \hookrightarrow Set$, assigns to each set $X$ the set of ultrafilters on $X$ closed under countable intersections. This still holds for the inclusion of the full subcategory of $Ctbl$ on the single set $\mathbb{N}$.
\end{example}

\begin{example}
More generally, the codensity monad of the inclusion of sets of cardinality less than that of fixed $Y$, $Set_{\lt Y} \hookrightarrow Set$, assigns to each set $X$ the set of $Y$-complete ultrafilters on $X$.
\end{example}

\begin{example}
For the codensity monad induced by the inclusion of [[homotopy types with finite homotopy groups]] into all [[homotopy types]] see [there](homotopy+type+with+finite+homotopy+groups#CodensityMonadOfInclusionIntoAllHomotopyTypes).
\end{example}

\begin{example}
The codensity monad induced by the [[Yoneda embedding]] is isomorphic to the monad induced by the [[Isbell adjunction]].
\end{example}

\begin{example}
In the bicategory [[Rel]], the right Kan extension of a relation $T: A \to C$ along a relation $R: A \to B$ is the relation $T/R: B \to C$ such that $(b,c)\in T/R$ iff $\forall_{a: A}\; R(a, b) \Rightarrow T(a, c)$. In particular, $R/R$ reduces to the identity relation $id_B$ iff whenever $(b,b')$ is such that $\forall_{a:A}\; R(a,b)\Rightarrow R(a,b')$ then $b=b'\,$, in other words, iff $R^{-1}b\subseteq R^{-1}b'$ implies $b=b'$.
The codensity monad $R/R: B \to B$, being a monad in $Rel$, is a [[preorder]]. This construction frequently recurs; see for instance [[specialization order]] for a [[topological space|topology]].

\end{example}

## Properties

....

## Related entries

* [[codense functor]]

* [[dense]]

* [[dense functor]]

* [[shape theory]]

* [[Kan extension]]

* [[algebraic theory]]

* [[ultrafilter]]

* [[idempotent monad]]

## References

One of the first references is

* [[Anders Kock]], _Continuous Yoneda Representations of a Small Category_, Preprint Aarhus University (1966). ([pdf](http://home.math.au.dk/kock/CYRSC.pdf))

For the special case of double dualisation, see:

* [[Anders Kock]]. _On double dualization monads_, Mathematica Scandinavica 27.2 (1970): 151-165. ([JSTOR](https://www.jstor.org/stable/24489892))

Overview:

* [[Fred Linton]], *Codensity triples*, Section 8 in: *An outline of functorial semantics*, in *[[Seminar on Triples and Categorical Homology Theory]]*, Lecture Notes in Mathematics **80**, Springer (1969) 7-52 [[doi:10.1007/BFb0083080](https://doi.org/10.1007/BFb0083080)]

* {#Leinster13}[[Tom Leinster]], _Codensity and the Ultrafilter Monad_ , TAC **12** no.13 (2013) pp.332-370.  [[tac:28-13](http://www.tac.mta.ca/tac/volumes/28/13/28-13abs.html)]

See alos:

* nCafé blog 2012: *[Where do Monads come from?](https://golem.ph.utexas.edu/category/2012/09/where_do_monads_come_from.html)*

* MO-discussion [[Tim Campion]]: *[What is the point of pointwise Kan extensions?](https://mathoverflow.net/questions/220246/what-is-the-point-of-pointwise-kan-extensions)*

Codensity monads arising from subcategory inclusions are studied in

* {#diLiberti19} [[Ivan Di Liberti]], _Codensity: Isbell duality, pro-objects, compactness and accessibility_, arXiv:1910.01014 (2019). ([abstract](https://arxiv.org/abs/1910.01014))

The role in shape theory is discussed in

* Armin Frei, _On categorical shape theory_ , Cah. Top. Géom. Diff. **XVII** no.3 (1976) pp.261-294. ([numdam](http://www.numdam.org/item/?id=CTGDC_1976__17_3_261_0))

* D. Bourn, J.-M. Cordier, _Distributeurs et théorie de la forme_, Cah. Top. Géom. Diff. Cat. **21** no.2 (1980) pp.161-189. ([pdf](http://archive.numdam.org/ARCHIVE/CTGDC/CTGDC_1980__21_2/CTGDC_1980__21_2_161_0/CTGDC_1980__21_2_161_0.pdf))

* J.-M. Cordier, [[Tim Porter|T. Porter]], _Shape Theory: Categorical Methods of Approximation_ , (1989), Mathematics and its Applications, Ellis Horwood. Reprinted Dover (2008).

The dual concept of a "model-induced cotriple":

* [[Harry Applegate]], [[Myles Tierney]], *Categories with models*, in: [[Beno Eckmann]] (ed.) *[[Seminar on Triples and Categorical Homology Theory]]* Lecture Notes in Mathematics, **80**, Springer  (1969) 156-244   [[doi:10.1007/BFb0083086](https://doi.org/10.1007/BFb0083086), [pdf](https://link.springer.com/content/pdf/10.1007/BFb0083086)]

On possible uses in [[functional programming]]:

* Ralf Hinze, *Kan extensions for program optimisation - Or: Art and Dan explain an old trick*, in: Jeremy Gibbons, Pablo Nogueira (eds.), *11th International Conference on Mathematics of Program Construction (MPC '12)*, LNCS **7342** Springer (2012) 324–362. ([doi: 10.1007/978-3-642-31113-0_16](http://dx.doi.org/10.1007/978-3-642-31113-0_16), [pdf draft](https://www.cs.ox.ac.uk/ralf.hinze/publications/MPC12.pdf))

For a description of the [[Giry monad]] and other [[probability monads]] as codensity monads, see

* {#Avery14} [[Tom Avery]], _Codensity and the Giry monad_, Journal of Pure and Applied Algebra **220** 3 (2016) 1229-1251 [[arXiv:1410.4432](https://arxiv.org/abs/1410.4432), [doi:10.1016/j.jpaa.2015.08.017](https://doi.org/10.1016/j.jpaa.2015.08.017)]

* Ruben Van Belle, _Probability monads as codensity monads_. Theory and Applications of Categories 38 (2022), 811–842, ([tac](http://tac.mta.ca/tac/volumes/38/21/38-21abs.html))

Other references include

* {#Avery17} [[Tom Avery]], _Structure and Semantics_, ([arXiv:1708.01050](https://arxiv.org/abs/1708.01050))

* C. Casacuberta, A. Frei, _Localizations as idempotent approximations to completions_ , JPAA **142** (1999) no. 1 pp.25–33. ([draft](http://atlas.mat.ub.es/personals/casac/articles/cfre1.pdf))

* Yves Diers, _Complétion monadique_ , Cah. Top. Géom. Diff. Cat. **XVII** no.4 (1976) pp.362-379. ([numdam](http://www.numdam.org/item/?id=CTGDC_1976__17_4_363_0))

* S. Katsumata, T. Sato, [[Tarmo Uustalu|T. Uustalu]], _Codensity lifting of monads and its dual_ , arXiv:1810.07972 (2012). ([abstract](https://arxiv.org/abs/1810.07972))

* [[Joachim Lambek|J. Lambek]], B. A. Rattray, _Localization and Codensity Triples_ , Comm. Algebra **1** (1974) pp.145-164.

* [[Jiří Adámek]], [[Lurdes Sousa]], _D-Ultrafilters and their Monads_, ([arXiv:1909.04950](https://arxiv.org/abs/1909.04950))

* {#Sipos} [[Andrei  Sipoş]], _Codensity and Stone spaces_,  Mathematica Slovaca, 68 no. 1, p. 57–70, (2018). [doi:10.1515/ms-2017-0080](https://doi.org/10.1515/ms-2017-0080),  ([arXiv:1409.1370](https://arxiv.org/abs/1409.1370))

[[!redirects codensity monads]]
[[!redirects density comonad]]
[[!redirects density comonads]]
[[!redirects Codensity monad]]
[[!redirects Codensity monads]]
[[!redirects codensity triple]]


codependent type theory

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
#### Deduction and Induction
+-- {: .hide}
[[!include deduction and induction - contents]]
=--
#### Foundations
+-- {: .hide}
[[!include foundations - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

When attempting to define [[coinductive types]], there is an obstacle to the complete [[dualization]] of the usual rules for [[inductive types]] in [[dependent type theory]], including dualizing the [[induction principle]] to a “coinduction principle”. For this some form of “codependent types” would be needed. In the context of [[homotopy type theory]], Ahrens, Capriotti, and Spadotti write:

> The universal property defining (internal) coinductive types in HoTT is dual to the one defining (internal) inductive types.  One might hence assume that their existence is equivalent to a set of type-theoretic rules dual (in a suitable sense) to those given for external W-types...  However, the rules for external W-types cannot be dualized in a naïve way, due to some asymmetry of HoTT related to dependent types as maps into a “type of types” (a universe) ([ACS15](#ACS15))

Codependent type theory is a hypothetical type theory where one should be able to define codependent types, and coinductive types with a coinduction principle.

## Related concepts

* [[coinductive type]]

* [[locally cocartesian coclosed category]]

## References

* {#ACS15} Benedikt Ahrens, Paolo Capriotti, Régis Spadotti, _Non-wellfounded trees in Homotopy Type Theory_, ([arXiv:1504.02949](https://arxiv.org/abs/1504.02949))


coderivation

##Definition##

Given a (counital coassociative) $k$-[[coalgebra]] $(C,\Delta,\epsilon)$, a $k$-linear __coderivation__ is a $k$-module map $ D : C\to C$ satisfying the co-Leibniz rule

$$
\Delta \circ D = (D\otimes id + id \otimes D)\circ\Delta : C\to C\otimes C
$$

If the [[commutative ring]] $k$ is a [[field]] and $C$ is finite-dimensional, then the transposes of the coderivations on $C$ are the [[derivations]] of the $k$-algebra $Hom_k(C,k)$. With proper care of continuity conditions, this correspondence generalizes to other (for example infinite-dimensional) contexts.

##Examples##

The left translations of the elements of the [[universal enveloping algebra]] $H=U(L)$ of a [[Lie algebra]] $L$ on itself $L_h (g) = h g$ restricts to an action of $L$ on $U(L)$ by coderivations:
$$\Delta (h) = 1\otimes h + h \otimes 1,$$
hence
$$(L_h \otimes 1 + 1 \otimes L_h)(\Delta (g)) = \Delta(h)\cdot\Delta(g) = \Delta(h g) = (\Delta \circ L_h)(g).$$

[[!redirects coderivations]]


coderived category

Coderived category has been introduced by [[Bernhard Keller]] and in the thesis ([pdf](http://www.math.jussieu.fr/~keller/lefevre/TheseFinale/tel-00007761.pdf)) of his student [Kenji Lefèvre-Hasegawa](http://www.math.jussieu.fr/~keller/lefevre/publ.html) with the motivation to remove the unnatural finiteness conditions in the treatment of [[Koszul duality]].

* [[Bernhard Keller]], _Koszul duality and coderived categories_, [abstract](http://www.math.jussieu.fr/~keller/publ/kdcabs.html), [ps](http://www.math.jussieu.fr/~keller/publ/kdc.ps),[pdf](http://www.math.jussieu.fr/~keller/publ/kdc.pdf)

[[!redirects coderived categories]]


codescent object

Under construction! Please be patient.

## Motivation

The descent data of classical (Grothendieck's) [[descent theory]] are usually treated in the generality of [[fibered categories]]. They correspond to cartesian lifts to the total category of the simplicial objects in the base, which are typically produced from covers (in Čech picture; this is not fully general as it presupposes certain coproducts in the base). In 1-categorical situation these data depend essentially only of a 2-truncation of the simplicial set hence the lift in a total category presents a 2-truncated pseudo-simplicial object. Descent data organize into a category of descent data. This category may be co-represented in an appropriate 2-categorical sense by a category equipped with certain data. The same situation can happen without any direct reference to descent theory. We start with a 2-truncation of a pseudosimplicial object in a bicategory and consider additional object in that bicategory and 1-cells satisfying a universal property. It can be viewed as certain weighted colimit called a [[codescent object]]. The notion is dual to the notion of [[descent object]] as defined in

* [[Ross Street]], _Correction to “Fibrations in bicategories”_,
Cahiers de Topologie et Géométrie Différentielle Catégoriques __28__, no.1 (1987) 53--56 [numdam](http://www.numdam.org/item/?id=CTGDC_1987__28_1_53_0)

A bicolimit weakening of the notion of codescent object is a bicodescent object.

## Applications

The main example outside of descent theory is related to a comparison of the category of $T$-algebras for a 2-monad $T$ in strict 2-category to lax or pseudo-$T$-algebra. We ask if the inclusion of strict into lax or pseudoalgebras has a left 2-adjoint. 2-monad $T$ helps to define coherence data for a codescent object whose defining property is equivalent to the universal property of the 2-adjunction. Bicodescent objects were used in A. Corner's thesis to define an analogue of Day's convolution for monoidal bicategories.

## Literature

* [[Ross Street]], _Categorical and combinatorial aspects of descent theory_, [arXiv:math.CT/0303175](http://arxiv.org/abs/math.CT/0303175)
* [[Stephen Lack]], _Codescent objects and coherence_, Stephen Lack, J. Pure and Appl. Algebra __175__ (2002) 223-241 doi
* Alex Corner, _Codescent Objects and Coherence_, at Category Cafe [2014/06](https://golem.ph.utexas.edu/category/2014/06/codescent_objects_and_coherenc.html)
* A.S. Corner, _Day convolution for monoidal bicategories_, PhD thesis, (2016)
* A.S. Corner, _A universal characterisation of codescent objects_,
Theory and Applications of Categories 34 (24), 684-713 (2019)

[[!redirects codescent objects]]


CoDGCA

#Definition#

A _graded-cocommutative codifferential coalgebra_ is a cocommutative [[coalgebra|comonoid]] in the category of chain complexes (of modules over some ring).

We write $CoDGCA$ for the [[category]] of such codifferential coalgebras.

##Remarks##

* Codifferential coalgebras whose underlying graded-cocommutative coalgebra is free over a complex of vector spaces in positive degree are [[L-infinity-algebra|Lie infinity-algebra]]s.

#References#

* Ezra Getzler and Paul  Goerss, _A model category structure for differential graded coalgebras_ ([ps](http://www.math.northwestern.edu/~pgoerss/papers/model.ps))

#Blog resources#

* Todd Trimble, [_nice facts about CoDGCA_](http://golem.ph.utexas.edu/category/2007/11/on_bv_quantization_part_viii.html#c013516)

* Todd Trimble, [_Sketch of proof that CoDGCA is cartesian closed_](http://golem.ph.utexas.edu/category/2007/11/on_bv_quantization_part_viii.html#c013564)

category: category


codiagonal

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

#Contents#
* table of contents
{:toc}

## Definition

For an [[object]] $X$ in a [[category]] with [[coproducts]], the **codiagonal** of $X$ (or _fold morphism_) is the canonical [[morphism]]
$$
  \nabla : X \sqcup X \stackrel{[Id,Id] }{\to} X
$$
given by [[copairing]] the identity morphism with itself.
The dual concept is _[[diagonal]]_ . More generally, one can consider the iterated codiagonal
$$
  \nabla : X \sqcup X \sqcup \cdots \sqcup X \stackrel{[Id,Id,\ldots,Id]}{\to} X.
$$

In a [[cartesian bicategory]] $\mathbf{B}$, the pair of terms _diagonal_, _codiagonal_ refer to the canonical comultiplication $\Delta: X \to X \otimes X$ and the dual multiplication $\nabla = \Delta_*: X \otimes X \to X$ on any object. While the comultiplication is not a true diagonal (because $\otimes$ is not a cartesian product in $\mathbf{B}$), it is the diagonal when seen as belonging to the subcategory of _maps_ ([[left adjoints]]), where the restriction of $\otimes$ to $Map(\mathbf{B})$ becomes a [[2-limit|2-product]]. Similarly, $\nabla$ is not a true codiagonal on $\mathbf{B}$, but it becomes a codiagonal in the sense above when seen as belonging to $Map(\mathbf{B})^{op}$, the [[opposite 2-category|opposite]] obtained by reversing $1$-cells but not $2$-cells.

##Possible confusion

The term 'codiagonal' is also sometimes used in the context of the theory of [[bisimplicial sets]]. For this use see [[total simplicial set]], within that entry.

## Related concepts

* [[diagonal]]

* [[cylinder object]]

[[!redirects codiagonal]]
[[!redirects codiagonals]]
[[!redirects codiagonal morphism]]
[[!redirects codiagonal morphisms]]
[[!redirects codiagonal map]]
[[!redirects codiagonal maps]]

[[!redirects fold morphism]]
[[!redirects fold morphisms]]
[[!redirects fold map]]
[[!redirects fold maps]]


codiagonal comodule structure

"codiagonal comodule structure"


codimension

#Contents#
* table of contents
{:toc}

## Idea

A [[subobject]] of [[dimension]] $k$ inside an [[object]] of dimension $d$ is said to have _codimension_ $d-k$.

## Examples

* A [[submanifold]] of dimension 3 inside a manifold of dimension 5 has codimension 5-3.

* In [[algebraic geometry]] a [[subvariety]] of codimension 1 is called a _[[divisor (algebraic geometry)]]_.

[[!redirects codimensions]]


coding theory

#Contents#
* table of contents
{:toc}

## Idea

(...)

## Related entries

* [[error correcting codes]]

  * [[linear code]]

    * [[Hamming code]]

    * [[binary linear code]]

      * [[binary Golay code]], [[Mathieu group]], [[Leech lattice]]

* [[quantum error correcting code]]

  * [[stabilizer code]]

  * [[HaPPY code]]

  * [[Majorana dimer code]]

* [[combinatorial design]]

* [[adinkra]]

## References

* T. Etzion, L. Storme, _Galois geometries and coding theory_, Designs, Codes and Cryptography 78:1 (2016) 311-350 [doi](https://doi.org/10.1007/s10623-015-0156-5)

* [[Patrick J. Morandi]], _Error Correcting Codes and Algebraic Curves_ , lecture notes New Mexico State University 2001. ([pdf](http://www.math.nmsu.edu/~pmorandi/math601f01/LectureNotes.pdf))

* Jay A. Wood, _Spinor groups and algebraic coding theory_ , J.Combinatorial Th. Series A **51** (1989) pp.277-313. (available online)


codiscrete cofibration

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

# Contents
* automatic table of contents
{: toc}

## Idea

A [[2-category]] is a good context for doing a lot of category theory (including [[internal category]] theory), but there are some things that are hard to do there, such as to talk about [[weighted limits]] and colimits, and [[enriched category]] theory more generally.  This leads one to introduce the notion of a [[2-category equipped with proarrows]], which is a 2-category along with extra data that plays the role of [[profunctors]], allowing the definition of weighted limits and other aspects of category theory.

However, it would also be nice if the extra data in a proarrow equipment were somehow determined by the 2-category we started with.  This is especially so when talking about functors between equipments, since functors between 2-categories are often easier to construct.  It turns out that in many cases, including the most common ones, this is the case: we can construct the proarrows in terms of the underlying 2-category.  This was originally realized by Ross Street.

The idea is to identify a profunctor with its [[collage]], aka its [[cograph of a profunctor|cograph]], which is a special sort of [[cospan]] in $Cat$ (or $V Cat$, or whatever other 2-category one wants to start with).  One then simply has to characterize, in 2-categorical terms, which cospans are collages, and how to do things like compose them.  It turns out that in most cases the characterization is precisely that they are the **two-sided codiscrete cofibrations** --- i.e. the [[two-sided fibration|two-sided discrete fibrations]] in the [[opposite 2-category]].

## Definition

Suppose that $K$ is a 2-category with finite [[2-colimits]], and $A,C\in K$.  A [[cofibration]] from $A$ to $C$ is a [[cospan]] $A\to B \leftarrow C$ which is an [[two-sided fibration|internal two-sided fibration]] in $K^{op}$.  As remarked at [[fibration in a 2-category]], there is a [[2-monad]] on $Span_{K^{op}}(A,C)$ whose algebras are such fibrations.  In other words, there is a *2-comonad* on $Cospan_K(A,C)$ whose *coalgebras* are such fibrations.  This 2-comonad is defined by
$$ (A\to B \leftarrow C) \quad \mapsto\quad (A \to (A\times I) +_A B +_C (C\times I) \leftarrow C) $$
where $I$ is the [[interval category]] $(0\to 1)$ and $(-\times I)$ denotes the [[copower]] with $I$.  In the pushouts, the map $A\to A\times I$ is the inclusion at $0$ and $C\to C\times I$ is the inclusion at $1$.

A cospan $A\to B \leftarrow C$ in a 2-category $K$ is **codiscrete** if it is codiscrete in the 2-category $Cospan_K(A,C)\simeq (A+C)/K$.  This means that for any $X\in Cospan(A,C)$, the hom-category $Cospan(A,C)(B,X)$ is equivalent to a [[discrete category]].  Explicitly, it means that given any two morphisms $B \;\rightrightarrows\; X$ of cospans, if there exists a 2-cell from one to the other in $Cospan(A,C)$, then it is unique and invertible.

A **codiscrete cofibration** is a two-sided cofibration which is codiscrete as a cospan.

## Examples

### Enriched categories

We sketch a characterization of cofibrations in $V Cat$, where $V$ is any Bénabou [[cosmos]].  Let $A\overset{f}{\to} B \overset{g}{\leftarrow} C$ be a cospan and let $D = (A\times I) +_A B +_C (C\times I)$.  We claim that $D$ has the following description.

* Its objects are the disjoint union of those of $A$, $B$, and $C$, i.e. $ob(D) = ob(A) \sqcup ob(B) \sqcup ob(C)$.

* $A$ and $B$ and $C$ are (disjoint) full subcategories of $D$.

* There are no morphisms in $D$ from $A$ to $B$, or from $B$ to $C$, or from $A$ to $C$.  That is, for $a\in A$, $b\in B$, and $c\in C$ we have $D(a,b) = D(b,c) = D(a,c) = \emptyset$.

* If $a\in A$, $b\in B$, and $c\in C$, we have $D(b,a) = B(b,f a)$, $D(c,b) = B(g c, b)$, and $D(c,a) = B(g c, f a)$.

That $D$ is a $V$-category is immediate, and it is easy to check the universal property.  We write $A \overset{i}{\to} D \overset{j}{\leftarrow} C$ for the inclusions.

Now suppose that $B$ is a coalgebra for the 2-comonad in question.  Therefore, in particular we have a map $h\colon B\to D$ in $Cospan(A,C)$, so that $h f = i$ and $h g = j$ (or perhaps only isomorphic; it really makes no difference here).  Moreover, the counit of the comonad is the obvious map $k\colon D\to B$, so we must have $k h = 1_B$.

Since $i$ and $j$ are injective on objects and have disjoint images, so must be $f$ and $g$.  And since $i$ and $j$ are fully faithful $V$-functors, the action of $f$ and $g$ on homs must be split monic in $V$, and the action of $h$ on homs in $A$ and $B$ must be split epic.  But since $h k = 1_B$, the action of $h$ on homs must also be split monic, hence an isomorphism, and hence so must that of $f$ and $g$ be.  Therefore, $f$ and $g$ are fully faithful inclusions with disjoint images.

Clearly $h$ must take the images of $f$ and $g$ to the images of $i$ and $j$, respectively.  Because $k h = 1_B$, it must be that $h$ takes the rest of $B$ to itself, sitting in the canonical copy of $B$ inside $D$.  This uniquely defines $h$, as long as $B$ satisfies the condition that

* For $a\in A$, $c\in C$, and $b\in B \setminus (A\cup C)$, we have $B(a,b) = B(b,c) = B(a,c) = \emptyset$.

It is then easy to check that if $f$ and $g$ are fully faithful with disjoint images and this condition holds, then $B$ is in fact a coalgebra for the comonad in question, i.e. a two-sided cofibration from $A$ to $C$.

Note that such a cofibration from $A$ to $C$ can be identified with the following data: a category $B' = B\setminus (A\cup C)$, profunctors $m\colon A ⇸ B$, $n\colon B ⇸ C$, and $p\colon A ⇸ C$, and a morphism $n m \to p$ of profunctors.  Such a thing is sometimes called a **gamut** from $A$ to $C$.

Now a 2-cell in $Cospan(A,C)$ is simply a natural transformation between functors $B \;\rightrightarrows\; X$ whose components on the images of $A$ and $C$ are isomorphisms.  Thus, if $B$ is a cofibration as above with the property that $B \setminus (A\cup C)$ is empty, then it must be codiscrete.  The converse is easy to check, taking $X$ to be the ordinal $4 = (0\le 1 \le 2\le 3)$ as a category.  But a gamut with $B'=\emptyset$ is nothing but a profunctor $A ⇸C$; hence codiscrete cofibrations in $V Cat$ can be precisely identified with the collages of profunctors.

### Toposes

A codiscrete cofibration in the 2-category $Topoi$ of [[topoi]] can be identified with a [[left exact functor]].

### Double categories

Codiscrete cofibrations in the 2-category $Dbl$ of [[double categories]], [[double functors]], and [[horizontal transformations]] can be identified with [[double profunctors]].

## Construction of a proarrow equipment

The examples of profunctors suggest that given any 2-category $K$ with finite 2-colimits, we may try to canonically equip it with proarrows by defining the proarrows $A ⇸C$ to be the codiscrete cofibrations.  The sticky point is then how to define units and composition of such proarrows in order to obtain an equipment.

The unit is obvious: we should take the unit proarrow of $A$ to be the cospan $A\to A\times I \leftarrow A$, which is always a codiscrete cofibration.

Binary composition is subtler.  The obvious way to compose codiscrete cofibrations $A \to B \leftarrow C$ and $C\to D \leftarrow E$, of course, is to take a [[pushout]] $B +_C D$.  It is not hard to show (see references):

+-- {: .un_theorem}
###### Theorem
In any 2-category with finite 2-colimits, if $B$ and $D$ are cofibrations, then so is $B +_C D$.
=--

However, $B +_C D$ will not be codiscrete even if $B$ and $D$ are.  In $V Cat$, if $B$ and $D$ are collages of profunctors $m$ and $n$, then $B +_C D$ represents the gamut consisting of $m$, $n$, and the composite profunctor $n m$, with the middle category being $C$.  Thus, in order to obtain the correct composite, we need to forget about $C$ somehow.  The best way to do this seems to be using a [[factorization system in a 2-category]], akin the way in which we construct the [[bicategory of relations]] from any [[regular category]].

### Equippable 2-categories

We are looking for a [[factorization system in a 2-category|2-categorical factorization system]] $(\mathcal{E},\mathcal{M})$ in $K$ such that if we have a two-sided cofibration $A\to C\leftarrow B$ and we factor $A+B \to C$ into an $\mathcal{E}$-map and an $\mathcal{M}$-map, then the resulting cospan $A\to E \leftarrow B$ is a codiscrete cofibration.  Codiscreteness means in particular that the $\mathcal{E}$-map $A+B\to E$ should be codiscrete, i.e. representably cofaithful and co-conservative.  Moreover, if $A\to C\leftarrow B$ was already a codiscrete cofibration, then $A+B\to C$ should already be in $\mathcal{E}$.  This suggests the following definition.

+-- {: .un_defn}
###### Definition
A 2-category with finite 2-limits and 2-colimits is **pre-equippable** if it has a factorization system $(\mathcal{E},\mathcal{M})$ such that

* if $A\to C \leftarrow B$ is a codiscrete cofibration, then $A+B \to C$ is in $\mathcal{E}$, and
* every morphism in $\mathcal{E}$ is representably co-faithful and co-conservative.

It is **equippable** if in addition it satisfies:

* Morphisms in $\mathcal{M}$ are closed under pushout and tensors with $I$.
=--

Co-conservative morphisms are also called **liberal**.  Recall that by definition of codiscreteness, if $A\to C \leftarrow B$ is a codiscrete cofibration, then $A+B\to C$ is cofaithful and liberal; thus the first two conditions are compatible.

The example to keep in mind is $V Cat$, for any suitable $V$, where $\mathcal{E}$ is the class of essentially surjective $V$-functors and $\mathcal{M}$ is the class of $V$-fully-faithful functors.

+-- {: .un_prop}
###### Proposition
Any morphism which is right orthogonal to codiscrete cofibrations is [[fully faithful morphism|representably fully faithful]].  In particular, if $K$ is pre-equippable, then every morphism in $\mathcal{M}$ is representably fully faithful.
=--
+-- {: .proof}
###### Proof
For any $X$ in $K$, we have a codiscrete cofibration $X\to X \times I \leftarrow X$, and thus $X+X \to X\times I$ is in $\mathcal{E}$.  But orthogonality with respect to all such morphisms is precisely representable fully-faithfulness.
=--

+-- {: .un_prop}
###### Proposition
Any representably fully faithful morphism is right orthogonal to any [[cocomma object]].  In particular, $K$ is pre-equippable and every codiscrete cofibration is a cocomma object, then $\mathcal{M}$ is precisely the class of representably fully faithful morphisms.
=--
+-- {: .proof}
###### Proof
Maps out of a cocomma object are in canonical correspondence with 2-cells in $K$.  But representable fully-faithfulness means that 2-cells lift uniquely along such a map.  Hence so do maps out of a cocomma object, and hence any representably fully faithful map is right orthogonal to all cocomma cospans.
=--

+-- {: .un_prop}
###### Proposition
If $K$ is pre-equippable, then any [[inverter]] or [[equifier]] is in $\mathcal{M}$, and every morphism in $\mathcal{E}$ is cofaithful and liberal.
=--
+-- {: .proof}
###### Proof
Any inverter is always right orthogonal to any liberal morphism, and any equifier is always right orthogonal to any cofaithful morphism.
=--

### The construction

In an equippable 2-category, we can compose cofibrations in the desired way.

+-- {: .un_prop}
###### Proposition
If $K$ is equippable, $A\to E \leftarrow B$ is a two-sided cofibration, and $A+B \to F \to E$ is an $(\mathcal{E},\mathcal{M})$-factorization, then $A\to F \leftarrow B$ is a codiscrete cofibration.  In particular, the category $CodCofib(A,B)$ is coreflective in the 2-category $Cofib(A,B)$.
=--
+-- {: .proof}
###### Proof
Since $\mathcal{E}$-morphisms are cofaithful and liberal, $A\to F \leftarrow B$ is certainly codiscrete.  That it is a cofibration is proven as in (MB, 4.18).  Coreflectivity follows by orthogonality for the factorization system $(\mathcal{E},\mathcal{M})$, since all codiscrete cofibrations are in $\mathcal{E}$ by assumption.
=--

Therefore, in an equippable 2-category, we can define the composite of codiscrete cofibrations $A\to B\leftarrow C$ and $C\to D\leftarrow E$ to be the codiscrete coreflection of the cofibration $A \to B +_C D\leftarrow E$.

+-- {: .un_prop}
###### Proposition
If $K$ is equippable, there is a 2-category $CodCofib(K)$, with the same objects as $K$, and with codiscrete cofibrations as 1-morphisms.  Moreover, there is a [[locally fully faithful 2-functor|locally fully faithful]] identity-on-objects (pseudo) 2-functor $(-)_* K\to CodCofib(K)$ such that each 1-morphism $f_*$ has a right adjoint.  Therefore, $K$ is canonically a [[2-category equipped with proarrows]] (hence the term "equippable").
=--
+-- {: .proof}
###### Proof
This is essentially (MB, 4.20).
=--

One can then impose additional axioms on $K$ to get good behavior of this equipment, and try to characterize the equipments arising in this way; see (MB, section 5) and (PC).

### Canonical factorization systems

Note that since coreflections are determined by a universal property, the composite of codiscrete cofibrations is independent of the chosen factorization system $(\mathcal{E},\mathcal{M})$.  In fact, there are two different "extreme" ways that we might try to define an equippable factorization system; we could either

1. Define $\mathcal{E}$ to be the class of liberal and cofaithful morphisms, or
1. Define $\mathcal{E}$ to be generated by the class of codiscrete cofibrations.

In the second case we mean that $\mathcal{M}$ is the class of all morphisms right orthogonal to the morphisms $A+B\to C$ such that $A\to C \leftarrow B$ is a codiscrete cofibration, and then $\mathcal{E}$ is the class of all morphisms left orthogonal to $\mathcal{M}$.  This implies, of course, that $\mathcal{E}$ contains the codiscrete cofibrations.

Neither of the above choices is guaranteed to produce a factorization system (since the factorizations may not exist), but if either one does, then that factorization system is automatically pre-equippable.  In the first case this is obvious, since all codiscrete cofibrations are cofaithful and liberal, while in the second case, it follows since inverters and equifiers are then necessarily in $\mathcal{M}$, and anything left orthogonal to inverters and equifiers must be cofaithful and liberal.  Thus, a 2-category is equippable if either of these two choices produces a factorization system for which $\mathcal{M}$ is closed under pushout and tensors with $I$.

+-- {: .un_prop}
###### Proposition
The (essentially surjective, $V$-fully faithful) factorization system is generated by the codiscrete cofibrations, and is equippable.
=--
+-- {: .proof}
###### Proof
It suffices to show that a $V$-functor $f\colon A\to B$ is right orthogonal to codiscrete cofibrations if and only if it is $V$-fully faithful, i.e. each morphism $A(a,a') \to B(f a, f a')$ is an isomorphism in $V$.  For "if", it suffices to observe that $V$-fully faithful functors are right orthogonal to all essentially surjective ones, and any codiscrete cofibration is essentially surjective.  For "only if," suppose given $a,a'\in A$, let $X=Y=I$ be the unit $V$-category, consider the object $B(f a,f a')\in V$ as a $V$-profunctor $X \to Y$, and let $E$ be its [[collage]].  Then we have a square
$$\array{X\sqcup Y & \overset{[a,a']}{\to} & A\\
  \downarrow && \downarrow\\
  E & \underset{[f a, f a']}{\to} & B}$$
where the bottom arrow is the identity on the nontrivial hom-object $B(f a,f a')$.  A lifting in this square supplies a [[section]] of $A(a,a') \to B(f a, f a')$, and uniqueness of lifting against the collage of $A(a,a')$ (also as a profunctor $I\to I$) shows that it is an inverse isomorphism; hence $f$ is $V$-fully faithful.

Finally, it is straightforward to verify that $V$-fully-faithful functors are closed under pushout and tensors with $I$.
=--

+-- {: .un_prop}
###### Proposition
In $V Cat$, every liberal is automatically cofaithful, and there is a pre-equippable factorization system in which $\mathcal{E}$ is the class of liberal morphisms.  However, it is not equippable, even when $V=Set$.
=--
+-- {: .proof}
###### Proof
This is essentially (MB, 3.4).  In this case $\mathcal{M}$ consists of the $V$-fully faithful morphisms which are additionally closed under [[absolute colimits]], while $\mathcal{E}$ consists of the functors which are surjective up to absolute colimits ("Cauchy dense" functors).  When $V=Set$,  all absolute colimits are generated by retracts, and it is easy to construct an example of a fully faithful functor closed under retracts and a pushout of it which is no longer closed under retracts.
=--

An equippable 2-category with $\mathcal{E} =$ liberal cofaithfuls = liberals is called **faithfully co-conservational** in (MB).  This is the only case considered there, but the proofs generalize directly to any equippable 2-category.  Note that $V Cat$ is *not* faithfully co-conservational, since the above factorization system is only pre-equippable: $\mathcal{M}$ is not closed under pushout.  Its sub-2-category $V Cat_{cc}$ of [[Cauchy complete category|Cauchy complete]] $V$-categories is faithfully co-conservational, but this is arguably just because when restricted to $V Cat_{cc}$, the above factorization coincides with the other, better one.  Thus, it seems that perhaps in general it is better to consider the factorization system generated by the codiscrete cofibrations.

## References

* [[Ross Street]], "Fibrations in bicategories", [Numdam](http://www.numdam.org/item/?id=CTGDC_1980__21_2_111_0), and [correction](http://www.ams.org/mathscinet-getitem?mr=903151).

* [[Aurelio Carboni]] and [[Scott Johnson]] and [[Ross Street]] and [[Dominic Verity]], "Modulated bicategories" (MB) [MR](http://www.ams.org/mathscinet-getitem?mr=1285544).

* [[Bob Rosebrugh]] and [[Richard Wood]], "Proarrows and cofibrations" (PC), [MR](http://www.ams.org/mathscinet-getitem?mr=961365)

* [[Bob Rosebrugh]] and [[Richard Wood]], "Gamuts and cofibrations". Cahiers de topologie et geometrie differentielle categoriques 31.3 (1990): 197-211. [Numdam](http://www.numdam.org/item/CTGDC_1990__31_3_197_0/)

* [[Bob Rosebrugh]] and [[Richard Wood]], "Pullback preserving functors". Journal of Pure and Applied Algebra 73.1 (1991): 73-90.

[[!redirects codiscrete cofibrations]]
[[!redirects two-sided cofibration]]
[[!redirects two-sided cofibrations]]
[[!redirects two-sided codiscrete cofibration]]
[[!redirects two-sided codiscrete cofibrations]]
[[!redirects gamut]]
[[!redirects gamuts]]
[[!redirects conservational bicategory]]
[[!redirects conservational bicategories]]
[[!redirects faithfully conservational bicategory]]
[[!redirects faithfully conservational bicategories]]
[[!redirects co-conservational bicategory]]
[[!redirects co-conservational bicategories]]
[[!redirects faithfully co-conservational bicategory]]
[[!redirects faithfully co-conservational bicategories]]
[[!redirects modulated bicategory]]
[[!redirects modulated bicategories]]
[[!redirects comodulated bicategory]]
[[!redirects comodulated bicategories]]


codiscrete groupoid

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Category theory
+-- {: .hide}
[[!include category theory - contents]]
=--
#### Discrete and concrete objects
+-- {: .hide}
[[!include discrete and concrete objects - contents]]
=--
=--
=--

# Contents
* table of contents
{:toc}

## Idea

The _codiscrete groupoid_ on a [[set]] is the [[groupoid]] whose [[objects]] are the elements of the [[set]] and which has a _unique [[morphism]]_ for every ordered pair of objects.

This is also called the **pair groupoid** of $X$ and sometimes also the __chaotic groupoid__ (this is explained [below](#Adjointness)), __indiscrete groupoid__, or __coarse groupoid__ on $X$, in older literature also [[Brandt groupoid]].

## Definition

\begin{definition}\label{CodiscreteGroupoid}
**(codiscrete groupoid)** \linebreak
For $X \in Set$, the **codiscrete groupoid** of $X$ is the [[groupoid]]

$$
  Codisc(X)
  \;\coloneqq\;
  X \times X
    \underoverset
      {pr_2}
      {pr_1}
      {\rightrightarrows}
  X
$$

whose object of objects is

* $Obj(X) = X$,

whose objects of morphisms is the [[Cartesian product]] of $X$ with itself

* $Mor(X) = X \times X$,

whose [[source]] and [[target]] morphism are the two canonical [[projections]] out of the product, and whose [[composition]] operation is the unique one compatible with this:

$$
  X \times X \times X
  \xrightarrow{\; (pr_1, pr_3) \; }
  X \times X
$$

\end{definition}

\begin{remark}
Def. \ref{CodiscreteGroupoid} manifestly makes sense in the generality of [[internal groupoids]] [[internalization|internal]] to any category with [[finite limits]] (in fact only [[finite products]] are involved in the definition of codiscrete groupoids).
\end{remark}

## Properties

### General

* Every codiscrete groupoid on an [[inhabited set]] is [[contractible space|contractible]]: [[equivalence of categories|equivalent]] to the [[terminal groupoid]] (the [[point]]). More generally, any codiscrete groupoid is equivalent to a [[truth value]].

* For $X$ a [[finite set]] of [[cardinality]] $n \gt 0$, the [[category algebra]] of $Codisc(X)$ is the algebra of $n\times n$ matrices. The contractibility of $Codisc(X)$ is reflected in the fact that this algebra is [[Morita equivalence|Morita equivalent]] to the [[ground ring]], which is the category algebra of the [[point]].

  This maybe serves to illustrate: even though codiscrete groupoids are pretty trivial, they are not too trivial to be entirely without interest. Often it is useful to have big puffed-up versions of the point available (see [[cofibrant resolution]]).

*  The [[underlying]] [[directed graph]] of a codiscrete groupoid is a [[complete graph]] (in that there is one *and only one* edge between any ordered pair of vertices).

### Adjointness
 {#Adjointness}

The [[1-category]] [[Grpd]] of [[groupoids]] is related to [[Set]] by an [[adjoint quadruple]] of [[functors]]

\begin{tikzcd}
  \mathrm{Grpd}
  \ar[
    rr,
    shift left=26pt,
    "{
      \pi_0
    }"{description}
  ]
  \ar[
    rr,
    "{
      (-)_0
    }"{description}
  ]
  &&
  \mathrm{Set}
  \ar[
    ll,
    shift right=13pt,
    "{
      \mathrm{Disc}
    }"{description}
  ]
  \ar[
    ll,
    shift left=13pt,
    "{
      \mathrm{Codisc}
    }"{description}
  ]
\end{tikzcd}

Here

$$
  (-)_0
  \;\;
  \colon
  \;\;
  \big(
    X_1
    \rightrightarrows
    X_0
  \big)
  \;\;\;
    \mapsto
  \;\;\;
  X_0
$$

sends a groupoid to its set of [[objects]].

The [[right adjoint]] to this functor sends a set to its codiscrete groupoid according to Def. \ref{CodiscreteGroupoid}. To see this, observe the [hom-isomorphism](adjoint+functor#InTermsOfHomIsomorphism) that reflects this adjunction:

For $\mathcal{X} = \big( \mathcal{X}_1 \rightrightarrows \mathcal{X}_0\big)\,\in\,$ [[Grpd]] and for $S \,\in\, $ [[Set]], a [[morphism]] of groupoids (i.e. a [[functor]]) of the form

$$
  \mathcal{X}
    \xrightarrow{\;\; F \;\;}
  CoDisc(S)
$$

is uniquely determined as soon as its component function

$$
  \mathcal{X}_0
    \xrightarrow{\;\; F_0 \;\;}
  CoDisc(S) = S
$$

is chose, because for every morphism $(x \xrightarrow{f} y) \,\in\,\mathcal{X}_1$  there is one and only one morphism $F_0(x) \to F_0(y)$ that it may be sent to, and making this unique choice for each $f$ does constitute a functor $F$ for every choice of $F_0$.

This association there gives a [[natural bijection]] of [[hom-sets]]

$$
  Grpd
  \big(
    \mathcal{X}
    ,\,
    CoDisc(S)
  \big)
  \;\;
  \simeq
  \;\;
  Set
  \big(
    \mathcal{X}_0
    ,\,
    S
  \big)
$$

and hence witnesses the claimed [[adjunction]]

$$
  CoDisc
    \;\; \dashv  \;\;
  (-)_0
  \,.
$$

It has been argued in [Lawvere 1984](chaos#Lawvere84) that such [[codiscrete object]]-constructions, [[right adjoint]] to [[forgetful functors]], deserve to be called "chaotic".

Correspondingly, [[nerves]] of codiscrete groupoids are precisely the [[codiscrete objects]] in [[sSet]], regarded as a [[cohesive topos]] over [[Set]].

## Examples
 {Example}

\begin{example}\label{UniversalGPrincipalBundle}
**(chaotic groupoids as models for [[universal principal bundles]])**
\linebreak
  For $G \in Grp(Set)$ a [[group]], the [[pair groupoid]] on $G$ is [[isomorphism|isomorphic]]

$$
  \big(
    G \times G
    \underoverset
      {pr_2}
      {pr_1}
      {\rightrightarrows} G
  \big)
  \;\;
   \simeq
  \;\;
  \mathbf{E}G
$$

to the [[action groupoid]] of the right (say) [[group action]] of $G$ on itself by right group-multiplication:

$$
  \mathbf{E}G
  \;\coloneqq\;
  G \times G
  \underoverset
    {(-) \cdot (-)}
    {pr_1}
    {\rightrightarrows}
  G
$$

The [[nerve]] of the latter is *equal* to the standard incarnation (since we chose right action) of the [[universal principal simplicial complex]] $W G \, \in \, sSet$:

$$
  N(\mathbf{E}G)
  \;\;
  =
  \;\;
  W G
  \,.
$$

The residual left multiplication action of $G$ on itself makes $\mathbf{E}G$ a $G$-[[action object]] [[internalization|internal to]] [[Grpd]]

$$
  \mathbf{E}G
  \;\;\;
  \in
  \;
  G Act(Grpd)
  \,.
$$

Since the nerve operation is a [[right adjoint]] ([this Prop.](nerve+and+realization#NerveAndRealizationAreAdjoint)) it [[preserved limit|preserves]] [[action objects]], and the result

$$
  W G
  \;=\;
  N(\mathbf{E}G)
  \;\;\;
  \in
  \;
  G Act(sSet)
$$

is the standard $G$-action on the [[universal principal simplicial complex]] of $G$.

The [[quotient]] of the group action on $\mathbf{E}G$ yields the [[delooping groupoid]] $\mathbf{B}G$ of $G$

\[
  \label{CoprojectionFromEGToBG}
  \mathbf{E}G
  \xrightarrow{\;\;}
  (\mathbf{E}G)/G
  \;=\;
  \mathbf{B}G
  \,.
\]

While the [[nerve]] operation does not in general preserve [[colimits]] ([this Exp.](nerve#NervesDoNotPreserveQuotientOfDeloopingByNormalSubgroup)) it does preserve (by [this Exp.](nerve#NerveDoesPreserveQuotientOfPairGroupoidOfGroupByGroupAction)) this particular colimit [[coprojection]] \eqref{CoprojectionFromEGToBG}. The resulting [[Kan fibration]]

$$
  N(\mathbf{E}G)
  \;=\;
  W G
  \xrightarrow{\;\;}
  (W G)/G
  \;=\;
  \overline{W}G
  \;=\;
  N(\mathbf{B}G)
  \;=\;
  N\big((\mathbf{E}G)/G\big)
$$

is the [[universal simplicial principal bundle]] with [[structure group]] $G \,\in\, Grp(Set) \xhookrightarrow{Disc} Grp(sSet)$ regarded as a [[simplicial group]].

Finally, the [[geometric realization]] of this into [[compactly generated topological spaces|compactly generated]] [[topological spaces]] is the standard model for the [[universal principal bundle]] of $G$:

$$
  E G
    \;=\;
  \big\vert
    N(\mathbf{E}G)
  \big\vert
    \xrightarrow{\;\;}
  \big\vert
    N(\mathbf{B}G)
  \big\vert
    \;=\;
  B G
$$

over its [[classifying space]] $B G \simeq K(G,1)$ (which here is an [[Eilenberg-MacLane space]], since $G$ was assumed to be [[discrete group]] -- but this was just for simplicitiy of exposition, the analogous discussion applies to the chaotic [[topological groupoid]] of a [[topological group]] $G$).

\end{example}

## Related concepts

* [[delooping groupoid]]

* [[discrete groupoid]]

* [[indiscrete category]]

* [[category enriched in a bicategory]]

[[!redirects codiscrete groupoid]]
[[!redirects codiscrete groupoids]]

[[!redirects codiscrete category]]
[[!redirects codiscrete categories]]

[[!redirects pair groupoid]]
[[!redirects pair groupoids]]

[[!redirects chaotic groupoid]]
[[!redirects chaotic groupoids]]


codiscrete object

[[!redirects codiscrete objects]]

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Discrete and concrete objects
+-- {: .hide}
[[!include discrete and concrete objects - contents]]
=--
#### Category Theory
+-- {: .hide}
[[!include category theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Definition

For $\Gamma \colon \mathcal{E} \to \mathcal{B}$ a [[functor]] we say that it _has [[codiscrete object]]s_ if it has a  [[full and faithful functor|full and faithful]] [[right adjoint]] $coDisc : \mathcal{B} \hookrightarrow \mathcal{E}$.

An object in the [[essential image]] of $coDisc$ is called a **codiscrete object.

This is for instance the case for the [[global section]] [[geometric morphism]] of a [[local topos]] $ (Disc \dashv \Gamma \dashv coDisc) \mathcal{E} \to \mathcal{B}$.

If one thinks of $\mathcal{E}$ as a [[category]] of [[spaces]], then the codiscrete objects are called [[codiscrete spaces]].

The dual notion is that of _[[discrete objects]]_.

## Examples

* [[codiscrete topology]]

* [[codiscrete groupoid]]

## Properties

\begin{prop}
$\Gamma$ is a [[faithful functor]] on [[morphisms]] whose [[codomain]] is concrete.
\end{prop}

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

If $\mathcal{E}$ has a [[terminal object]] that is preserved by $\Gamma$, then $\mathcal{E}$ has concrete objects.

=--

This is ([Shulman, theorem 1](#Shulman)).

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

If $\mathcal{E}$ has codiscrete objects and has [[pullbacks]] that are preserved by $\Gamma$ and , then $\Gamma$ is a [[Grothendieck fibration]].

=--

This is ([Shulman, theorem 2](#Shulman)).

## Related concepts

* [[chaos]]

[[!include cohesion - table]]

## References

* {#Shulman} [[Mike Shulman]], _Discreteness, Concreteness, Fibrations, and Scones_ ([blog post](http://golem.ph.utexas.edu/category/2011/11/discreteness_concreteness_fibr.html))

[[!redirects concrete objects]]


codiscrete space

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Discrete and concrete objects
+-- {: .hide}
[[!include discrete and concrete objects - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

Given a [[category]] $Sp$ of [[spaces]] equipped with a [[forgetful functor]] $\Gamma : Sp \to Set$ to [[Set]] thought of as producing for each space its underlying set of points, a **codiscrete space** ([[codiscrete object]]) $Codisc(S)$ on a [[set]] $S$ is, if it exists, the image under the [[right adjoint]] $Codisc : Set \to Sp$ of $\Gamma$.

Sometimes the codiscrete topology is also called the _chaotic topology_.

The [[adjoint modality|dual]] concept is that of [[discrete space]]. For their relation see at _[[discrete and codiscrete topology]]_.

## Examples

### Codiscrete topological spaces

For $\Gamma : Top \to Set$ the obvious  forgetful functor from [[Top]], a codiscrete space is a set with [[codiscrete topology]].

### Codiscrete cohesive spaces

A general axiomatization of the notion of space is as an object in a [[cohesive topos]]. This comes by definition with an underlying-set-functor (or similar) and a [[left adjoint]] that produces discrete cohesive structure. See there for details.

## References

The terminology _chaotic topology_ is motivated (see also at _[[chaos]]_) in

* {#Lawvere84} [[William Lawvere]], _Functorial remarks on the general concept of chaos_ IMA preprint #87, 1984 ([pdf](http://www.ima.umn.edu/sites/default/files/87s.pdf))

via footnote 3 in

* [[William Lawvere]],  _Categories of spaces may not be generalized spaces, as exemplified by directed graphs_, preprint, State University of New York at Buffalo, (1986) Reprints in Theory and Applications of Categories, No. 9, 2005, pp. 1–7 ([tac:tr9](http://www.tac.mta.ca/tac/reprints/articles/9/tr9abs.html), [pdf](http://www.tac.mta.ca/tac/reprints/articles/9/tr9.pdf))

and appears for instance in

* [[The Stacks Project]], _[Example 7.6.6](https://stacks.math.columbia.edu/tag/07GE)_

[[!redirects codiscrete space]]
[[!redirects codiscrete spaces]]

[[!redirects codiscrete spaces]]

[[!redirects indiscrete space]]
[[!redirects indiscrete spaces]]

[[!redirects indiscrete topological space]]
[[!redirects indiscrete topological spaces]]

[[!redirects antidiscrete topological space]]
[[!redirects antidiscrete topological spaces]]

[[!redirects antidiscrete space]]
[[!redirects antidiscrete spaces]]