free cocompletion

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

#Contents#
* table of contents
{:toc}

## Idea

Passing from a [[category]] $C$ to its [[presheaf]] category $PSh(C) := [C^{op},Set]$ may be regarded as the operation of
"freely adjoining [[colimits]] to $C$".

A slightly more precise version of this statement is that the [[Yoneda embedding]]

$$
  Y : C \hookrightarrow PSh(C)
$$

is the **[[free construction|free]] [[cocomplete category|cocompletion]]** of $C$.

The [[universal property]] of the [[Yoneda embedding]] is expressed in terms of the [[Yoneda extension]] of any [[functor]] $F : C \to D$ to a category $D$ with colimits.

There is also an alternative construction of the free cocomplete category, given by the [[free strict cocompletion]].

## Technical details

The rough statement is that the [[Yoneda embedding]]

$$y_S: S \to Set^{S^{op}}$$

of a [[small category]] $S$ into the category $Set^{S^{op}}$ of [[presheaf|presheaves]] on $S$ is universal among functors from $S$ into [[cocomplete category|cocomplete categories]]. Technically, this should be understood in an appropriate [[2-category|2-categorical]] sense: given a [[functor]] $F: S \to D$ where $D$ is ([[small colimit|small]]-)cocomplete, there exists a unique (up to [[isomorphism]]) [[cocontinuous functor|cocontinuous]] [[extension]]
$$\hat{F}: Set^{S^{op}} \to D,$$
called the [[Yoneda extension]],
meaning that $\hat{F} y_S \cong F$ and $\hat{F}$ [[preserved limit|preserves]] [[small colimits]].

Put slightly differently: let $Cocomp$ denote the 2-category of cocomplete categories, cocontinuous functors, and natural transformations between them. Then for cocomplete $D$, the Yoneda embedding $y S: S \to Set^{S^{op}}$ induces by restriction a functor

$$res_{y S} D: Cocomp(Set^{S^{op}}, D) \to Cat(S, D)$$

that is an [[equivalence of categories|equivalence]] for each $D$, one that is [[2-natural transformation|2-natural]] in $D$. In fact we show that the Yoneda extension $F \mapsto \hat{F}$ gives a functor $ext_{y S}D: Cat(S, D) \to Cocomp(Set^{S^{op}}, D)$ that is a left adjoint to $res_{y S}D$, giving a 2-natural adjoint equivalence.

As a first step, we construct the desired extension $\hat{F}$ as a [[adjoint functor|left adjoint]] to the functor

$$D \to Set^{S^{op}}: d \mapsto \hom_D(F-, d).$$

Being a left adjoint, $\hat{F}$ is cocontinuous.

An explicit formula for the left adjoint is given by the [[weighted colimit]], [[end|coend]], or [[tensor product of functors]] formula
$$\hat{F}(X) = X \otimes_S F = \int^{s: S} X(s) \cdot F(s)$$
where $S \cdot d$ is notation for [[power|copowering]] (or tensoring) an object $d$ of $D$ by a set $S$ (in this case, a coproduct of an $S$-indexed set of copies of $D$). This formula recurs frequently throughout this wiki; see also [[nerve]], [[Day convolution]].

This "free cocompletion" property generalizes to [[enriched category]] theory. If $V$ is complete, cocomplete, symmetric monoidal closed, and $S$ is a small $V$-enriched category, then the enriched presheaf category $V^{S^{op}}$ is a free $V$-cocompletion of $S$. The explicit meaning is analogous to the case where $V = Set$, where all ordinary category concepts are replaced by their $V$-enriched analogues; in particular, the notion of "$V$-cocontinuous functor" refers to preservation of enriched weighted colimits (not just ordinary conical colimits).

If $C$ is not small, then its free cocompletion still exists, but it is not the category of all presheaves on $C$.  Rather, it is the category of [[small presheaves]] on $C$, i.e. presheaves that are small colimits of representables.

### Proofs

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

For $\mathcal{C}$ a [[small category]], its [[Yoneda embedding]] $\mathcal{C} \overset{y}{\hookrightarrow} [\mathcal{C}^{op}, Set]$ exhibits the [[category of presheaves]] $[\mathcal{C}^{op}, Set]$ as the _free co-completion_ of $\mathcal{C}$, in that it is a [[universal morphism]] (as in [this Def.](adjoint+functor#UniversalArrow)  but "up to natural isomorphism") into a [[cocomplete category]], in that:

1. for $\mathcal{D}$ any [[cocomplete category]];

1. for $F \;\colon\; \mathcal{C} \longrightarrow \mathcal{D}$ any [[functor]];

there is a [[functor]] $\widetilde F \;\colon\; [\mathcal{C}^{op}, Set] \longrightarrow \mathcal{D}$, unique up to [[natural isomorphism]], such that

1. $\widetilde F$ [[preserved limit|preserves]] all [[colimits]],

1. $\widetilde F$ [[extension|extends]] $F$ through the [[Yoneda embedding]], in that the following [[commuting diagram|diagram commutes]], up to [[natural isomorphism]]:

$$
  \array{
    && \mathcal{C}
    \\
    & {}^{y}\swarrow &\swArrow& \searrow^{\mathrlap{F}}
    \\
    \mathrlap{ \!\!\!\!\!\!\!\!\!\!\!\!\! [\mathcal{C}^{op}, Set] }
      && \underset{ \widetilde F }{\longrightarrow} &&
    \mathcal{D}
  }
$$

=--

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

The last condition says that $\widetilde F$ is fixed on [[representable presheaves]], up to isomorphism, by

\[
  \label{YonedaRestriction}
  \widetilde F( y(c) ) \simeq F(c)
\]

and in fact [[natural isomorphism|naturally]] so:

\[
  \label{FunctorialYonedaRestriction}
  \array{
    c_1&&
    \widetilde F( y(c_1) ) &\simeq& F(c_1)
    \\
    {}^{\mathllap{f}}\big\downarrow
     && {}^{\mathllap{ F(y(f)) }}\big\downarrow && \big\downarrow^{\mathrlap{ F(f) }}
    \\
    c_2 && \widetilde F (y(c_2)) &\simeq& F(c_2)
  }
\]

But the [[co-Yoneda lemma]] expresses every [[presheaf]] $\mathbf{X} \in [\mathcal{C}^{op}, Set]$ as a [[colimit]] of [[representable presheaves]]

$$
  \mathbf{X} \;\simeq\; \int^{c \in \mathcal{C}} y(c) \cdot \mathbf{X}(c)
  \,.
$$

Since $\tilde F$ is required to preserve any colimit and hence these particular colimits, (eq:YonedaRestriction) implies that $\widetilde F$ is fixed to act, up to isomorphism, as

$$
  \begin{aligned}
    \widetilde F(\mathbf{X})
    & =
    \widetilde F
    \left(
      \int^{c \in \mathcal{C}} y(c) \cdot \mathbf{X}(c)
    \right)
    & \coloneqq
    \int^{c \in \mathcal{C}} F(c) \cdot \mathbf{X}(c)
    \;\;\;\;\in \mathcal{D}
  \end{aligned}
$$

(where the colimit (a [[coend]]) on the right is computed in $\mathcal{D}$!).

=--

## Free cocompletion of large categories

In general, given a locally small (but possibly large) category $\mathcal{A}$, we can define a locally small category of _small presheaves_ on $\mathcal{A}$ as the full subcategory of the functor category $Fun(\mathcal{A}^{\mathrm{op}},\operatorname{Set})$ spanned by those functors  that are colimits of small diagrams of representables.  Equivalently, a _small presheaf_ is a functor $F:\mathcal{A}^{\mathrm{op}} \to \operatorname{Set}$ such that there exists a functor $\gamma:\mathcal{C} \to \mathcal{A}$ with $\mathcal{C}$ small and a presheaf $F': \mathcal{C}^{\mathrm{op}}\to \operatorname{Set}$ such that

$$F=\operatorname{Lan}_{\gamma} F'.$$

This process of free cocompletion defines a functor $L$ from the 2-category

$$ CAT = [locally \; small \; categories, \; functors, \; natural \; transformations ] $$

to the 2-category

$$ Cocomp = [locally \; small \; cocomplete \; categories, \; cocontinuous \; functors, natural \; transformations ] $$

where, just to be clear, 'cocomplete' means having all *small* colimits, as usual.   Moreover, this functor $L$ is part of a [[pseudoadjunction]] where the right adjoint $R: Cocomp \to CAT$ assigns each locally small coccomplete category its underlying category, and so on.

In the case where $\mathcal{A}^{\mathrm{op}}$ is [[locally presentable]], the category of small presheaves on $\mathcal{A}$ is equivalent to the category of [[accessible functors]] $\mathcal{A}^{\mathrm{op}}\to \operatorname{Set}$. In this situation, the category of small functors has many nice properties and is often said to be _almost a topos_. In particular, under this assumption, the category of small presheaves is complete, cocomplete, and Cartesian-closed.

See [Day-Lack](#DayLack) for more details on all these matters. They handle the more general case of enriched categories.

## Free cocompletion as a pseudomonad

[[David Corfield]]: So is this 'free cocompletion' part of  an adjunction between the category of categories and the category of cocomplete categories (modulo size worries?).  Or should we think of it as part of a [[pseudoadjunction]] between _2-categories_?  (I would start a page on that, but how are naming conventions going in this area?)

[[John Baez]]:  Equations between functors tends to hold only up to natural isomorphism.  So, your first guess should not be that there's an _adjunction_ between the _categories_ $CAT$ and $Cocomp$, but rather, a _pseudoadjunction_ between the _2-categories_ $CAT$ and $Cocomp$.

This means there's a forgetful 2-functor:

$$ R: Cocomp \to CAT $$

together with a 'free cocompletion' 2-functor:

$$  L: CAT \to Cocomp $$

And, it mean there's an equivalence of categories

$$ hom_{Cocomp} (F C, D) \simeq
   hom_{CAT} (C, U D)  $$

for every $C \in CAT$, $D \in Cocomp$.  And finally, it means that this equivalence is [[pseudonatural transformation|pseudonatural]] as a function of $C$ and $D$.

If we have a pseudonatural equivalence of categories

$$ hom_{Cocomp} (F C, D) \simeq
   hom_{CAT} (C, U D)  $$

instead of a natural isomorphism of sets, then we say we have a 'pseudoadjunction' instead of an adjunction.   A pseudoadjunction is the right generalization of adjunction when we go to 2-categories; if we were feeling in a modern mood we might just say 'adjunction' and expect people to know we meant 'pseudo'.

The details have been worked out by [Day-Lack](#DayLack) in even more generality: they consider enriched categories.  Note that the free cocompletion of a *small* category $C$ is the category of all presheaves on $C$, but for a more general *locally small* category it's just the category of small presheaves.

In [their work on species](http://www.lacim.uqam.ca/~gambino/species.pdf), Fiore, Gambino, Hyland and Winskel confronted the size issues in another way.  In one draft of this paper they had a very artful and sophisticated device for dealing with this size problem.  In the latest draft they seem to have sidestepped it entirely: you'll see they discuss the 'free symmetric monoidal category on a category' pseudomonad, but never the 'free cocomplete category on a category' pseudomonad, even though they _do_ use the $\widehat{C}$ construction all over the place.  Somehow they've managed to avoid the need to consider this construction as a pseudomonad!

Fiore, Gambino, Hyland and Winskel later exhibited the free cocompletion of a small category as a [[relative pseudomonad]] from the 2-category Cat of small categories into the 2-category CAT of locally-small categories (via the 2-category COC of locally-small cocomplete categories). See [FGHW](#FGHW) for more details.

## In higher category theory

One can ask for the notion of free cocompletion in the wider context of [[higher category theory]].

* for [[(∞,1)-category]] theory there is [[free (∞,1)-cocompletion]].

## Related concepts

* free cocompletions

  * [[free strict cocompletion]]

  * [[free coproduct completion]]

  * [[idempotent completion]], [[Karoubi envelope]]

  * [[Cauchy completion]]

* [[free completion]]

* [[free bicompletion]]

* [[conservative cocompletion]]

## References

* {#DayLack} [[Brian Day]], [[Steve Lack]], _Limits of small functors_ ([web](https://arxiv.org/abs/math/0610439))

* {#FGHW} Fiore, Gambino, Hyland and Winskel, _Relative pseudomonads, Kleisli bicategories, and substitution monoidal structures_, ([web](https://arxiv.org/pdf/1612.03678.pdf))

* {#PT} [[Paolo Perrone]], [[Walter Tholen]], *Kan extensions are partial colimits*, Applied Categorical Structures, 2022. ([arXiv:2101.04531](https://arxiv.org/abs/2101.04531))

On [[strict free cocompletions]]:

* Erwan Beurier, Dominique Pastor, and René Guitart. _Presentations of clusters and strict free-cocompletions_. [[Theory and Applications of Categories]] 36.17 (2021): 492-513. ([link](http://www.tac.mta.ca/tac/volumes/36/17/36-17abs.html))

This reference might also give helpful clues:

* [[Daniel Dugger]], _Sheaves and Homotopy Theory_ ([web](http://www.uoregon.edu/~ddugger/cech.html), [pdf](http://ncatlab.org/nlab/files/cech.pdf))

A pedagogical explanation of the universal property of the [[Yoneda embedding]] is given starting on page 7.
On page 8 there's an explanation with lots of pictures how a presheaf is an "instruction for how to build a colimit".
Then on p. 9 the universal morphism that we are looking for here is identified as the one that "takes the instructions for building a colimit and actually _builds_ it".

(This text, by the way, contains various other gems. A pity that it is left unfinished.)

An early paper on free completions:

* [[Věra Trnková]]. _Limits in categories and limit-preserving functors_, Commentationes Mathematicae Universitatis Carolinae 7.1 (1966): 1-73.

[[!redirects free cocompletions]]

[[!redirects free colimit completion]]
[[!redirects free colimit completions]]

[[!redirects free co-completion]]
[[!redirects free co-completions]]


free commutative monoid

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

# Contents
* table of contents
{: toc}

## Idea

The _free commutative monoid_ $\mathbb{N}[S]$ on a [[set]] $S$ is the [[commutative monoid]] whose elements are _formal $\mathbb{N}$-[[linear combinations]]_ of elements of $S$.

## Definition
 {#Definition}

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

Let

$$
  U \colon CMon \longrightarrow Set
$$

be the [[forgetful functor]] from the category [[CMon]] of commutative monoids, to the category [[Set]] of sets. This has a [[left adjoint]] [[free construction]]:

$$
  \mathbb{N}[-] \colon Set \longrightarrow CMon
  \,.
$$

This is the _free commutative monoid functor_. For $S \in $ [[Set]], the **free commutative monoid** $\mathbb{N}[S] \in $ [[CMon]] is the [[free object]] on $S$ with respect to this [[free-forgetful adjunction]].

=--

Of course, this notion is meant to be invariant under isomorphism: it doesn't depend on the left adjoint chosen. Thus, if a functor of the form $\hom_{Set}(S, U-): CMon \to Set$ is [[representable functor|representable]] by
a commutative monoid $M$, then we may say $M$ is a free commutative monoid on $S$. A specific choice of isomorphism

$$\hom_{CMon}(M, -) \cong \hom_{Set}(S, U-)$$

corresponds, via the [[Yoneda lemma]], to a function $S \to U M$ which exhibits $S$, or rather its image under this function, as a specific [[basis]] of $M$. If $M$ is so equipped with such a universal arrow $S \to U M$, then it is harmless to call $M$ "the" free commutative monoid on $S$.

Explicit descriptions of free commutative monoid are discussed [below](#Properties).

## Properties
 {#Properties}

### In terms of formal linear combinations

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

A **formal linear combination** of elements of a set $S$ is
a [[function]]

$$
  a : S \to \mathbb{N}
$$
such that only finitely many of the values $a_s \in \mathbb{N}$ are non-zero.

Identifying an element $s \in S$ with the function
$S \to \mathbb{N}$ which sends $s$ to $1 \in \mathbb{N}$ and all other elements to 0, this is written as

$$
  a = \sum_{s \in S} a_s \cdot s
  \,.
$$

In this expression one calls $a_s \in \mathbb{N}$ the [[coefficient]] of $s$ in the formal linear combination.

=--

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

Definition \ref{FormalLinearCombination} of formal linear combinations makes sense with  [[coefficients]] in any [[commutative monoid]] $M$, not necessarily the
natural numbers.

$$
  M[S] \coloneqq \mathbb{N}[S] \otimes M
  \,.
$$

=--

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

For $S \in $ [[Set]], the __monoid of formal linear combinations__ $\mathbb{N}[S]$ is the
[[monoid]] whose underlying [[set]] is that of formal linear combinations,
def. \ref{FormalLinearCombination}, and whose monoid operation is
the pointwise addition in $\mathbb{N}$:

$$
  (\sum_{s \in S} a_s \cdot s)
  +
  (\sum_{s \in S} b_s \cdot s)
  =
  \sum_{s \in S} (a_s + b_s) \cdot s
  \,.
$$

=--

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

The free commutative monoid on $S \in Set$ is, up to [[isomorphism]], the
monoid of formal linear combinations, def. \ref{MonoidOfFormalLinearCombinations}, on $S$.

=--

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

For $S$ a set, the free commutative monoid $\mathbb{N}[S]$ is the [[biproduct]] in [[CMon]] of ${|S|}$-copies of $\mathbb{N}$ with itself:

$$
  \mathbb{N}[S] \simeq \oplus_{s \in S} \mathbb{N}
  \,.
$$

=--

## Examples

* For $R$ a [[rig]] and $S$ a set, the [[tensor product of commutative monoids]]
  $\mathbb{N}[S] \otimes R$ is the [[free module]] over $R$ on the [[basis]] $S$.

* For $R$ a rig, the [[tensor product of commutative monoids]]  $\mathbb{N}[\mathbb{N}]\otimes R$ is the commutative monoid underlying the [[rig]] of [[polynomials]] over $R$.

## Related concepts

* [[free monoid]]

* [[free abelian group]]

[[!redirects free commutative monoid]]
[[!redirects free commutative monoids]]

[[!redirects free commutative monoid functor]]
[[!redirects free commutative monoid functors]]

[[!redirects formal linear combination]]
[[!redirects formal linear combinations]]

[[!redirects formal sum]]
[[!redirects formal sums]]


free completion

+-- {: .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

For a [[small category]] $S$, just as the [[presheaf category]]  $Set^{S^{op}}$ is the [[free cocompletion]] of $S$, by [[formal duality]] the [[opposite category]] $(Set^S)^{op}$ of the category of presheaves on $S^{op}$ is the **[[free construction|free]] [[complete category|completion]]** of $S$.

This means that any [[functor]] $S\to C$ where $C$ is [[complete category|complete]] factors uniquely (up to [[isomorphism]]) through the "opposite [[Yoneda embedding]]" $S\to (Set^S)^{op}$ via a [[continuous functor]] $(Set^S)^{op}\to C$.

## Properties

The operation of completion is a [[2-monad]] which is [[colax idempotent 2-monad|colax idempotent]] but not (even weakly) [[idempotent monad|idempotent]].  In analogy with the general concept of [[completion]], we might call the operation of *any* colax idempotent monad on a $2$-category a 'free completion'.  See discussion at [[completion]].

## Related concepts

* [[free cocompletion]]

* [[free bicompletion]]

* [[free construction]]

* [[free coproduct completion]]

* [[idempotent completion]], [[Karoubi envelope]], [[Cauchy completion]]

[[!redirects free completions]]


free construction > history

< [[free construction]]


free coproduct completion

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

#Contents#
* table of contents
{:toc}

## Idea

Given a [[category]] $\mathcal{C}$, its *free coproduct completion* (or *free sum completion*) is [[generalized the|the]] category $PSh_{\sqcup}(\mathcal{C})$ (often denoted $Fam(\mathcal{C})$, for *[[families]]* in $\mathcal{C}$) obtained by [[free construction|freely]] adjoining [[coproducts]] of all [[objects]] of $\mathcal{C}$.

## Definitions
 {#Definitions}

Here are a few concrete realizations of free coproduct completions.

### Via indexed sets of objects
 {#ViaIndexedSetsOfObjects}

The following explicit description of the coproduct completion is pretty immediate and seems to be part of [[category theory]] [[folklore]] (for instance the way it is referred to in [Carboni, Lack & Walters (1993), Proof of Prop. 2.4](#CarboniLackWalters93)). Early references include [Bénabou (1985), §3](#Bénabou1985), see also [Hu & Tholen (1995), p. 281, 286](#HuTholen95).

An explicit description of the free coproduct completion $PSh_{\sqcup}(\mathcal{C})$ of a category $\mathcal{C}$ is:

* Its [[objects]] are [[dependent pair|dependent]] [[pairs]] consisting of

  1. an index [[set]] $I \in $ [[Set]]

  1. an $I$-[[indexed set]] $\big( X_i  \in \mathcal{C} \big)_{i \in I}$ of [[objects]] of $\mathcal{C}$.

* Its [[morphisms]] $\big( X_i \big)_{i \in I} \xrightarrow{ \; ( \phi_i )_{i \in I} \; } \big( Y_j \big)_{j \in J} $ [[pairs]] consisting of

  * a [[function]] of index sets $f \,\colon\, I \to J$.

  * an $I$-[[indexed set]] of [[morphisms]] $\phi_i \,\colon\, X_i \xrightarrow{\;} Y_{f(j)}$ in $\mathcal{C}$.

* The [[composition]]-law and [[identity morphisms]] are the evident ones.

### As a Grothendieck construction
 {#AsAGrothendieckConstruction}

The following is also pretty immediate and essentially discussed in [Bénabou (1985), §3](#Bénabou1985) (though without mentioning of the term "[[Grothendieck construction]]").

The free coproduct completion of a category $\mathcal{C}$ is equivalently the [[Grothendieck construction]]

$$
  PSh_{\sqcup}(\mathcal{C})
  \;\;
    \simeq
  \;\;
  \underset
    { S \,\in\, Set }
    { \textstyle{\int} }
  \;
  \underset{s \in S}{\textstyle{\prod}}
  \mathcal{C}
$$

on the [[contravariant functor|contravariant]] [[pseudofunctor]] on [[Set]] which sends a set $S$ to the $S$-indexed [[product category]] of $\mathcal{C}$ with itself (equivalently: to the [[functor category]] into $\mathcal{C}$ out of the [[discrete category]] on $S$):

$$
  \array{
    Set^{op} &\longrightarrow& Cat
    \\
    S
      &\mapsto& Func(S,\mathcal{C})
      & \simeq \;\underset{s \in S}{\prod} \mathcal{C}
    \\
    \Big\downarrow\mathrlap{{}^{f}}
    &&
    \Big\uparrow\mathrlap{{}^{f^\ast}}
    \\
    T
      &\mapsto& Func(T,\mathcal{C})
      &
    \simeq \;\underset{t \in T}{\prod} \mathcal{C}
    \mathrlap{\,,}
  }
$$
where the [[base change]]-[[functors]] $f^\ast$ are given (on [[functor categories]] by [[precomposition]] with $f$, hence) by:
\[
  \label{PullbackFunctorBetweenProductCategories}
  f \,\colon\, S \longrightarrow T
  \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;
  \vdash
  \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;
  \array{
    \underset{t \in T}{\prod} \mathcal{C}
    &\xrightarrow{\;\; f \;\;}&
    \underset{s \in S}{\prod} \mathcal{C}
    \\
    \big(
      X_t
    \big)_{t \in T}
    &\mapsto&
    \big(
      X_{f(s)}
    \big)_{s \in S}
    \,.
  }
\]

Namely, by definition of the [[Grothendieck construction]]

1. its [[objects]] are [[dependent pair|dependent]] [[pairs]] of the form

   $$
     X_S
     \;\equiv\;
     \big(
       S \in Set
       ,\,
       (X_s \in \mathcal{C})_{s \in S}
     \big)
   $$

1. its [[morphisms]]

   $$
     \phi_f \;\colon\; X_S \longrightarrow Y_T
   $$

   are [[dependent pair|dependent]] [[pairs]] consisting of a [[map]]

   $$
     f \,\colon\, S \longrightarrow T
   $$

   and a morphism in $\underset{s \in S}{\prod} \mathcal{C}$ of the form

   $$
     \phi \,\colon\, X_S \longrightarrow f^\ast Y_T
     \,.
   $$

   where, by definition (eq:PullbackFunctorBetweenProductCategories) of $f^\ast$ and the nature of [[product categories]], the latter is an $S$-[[indexed set]] $(\phi_s)_{s \in S}$ of [[morphisms]] in $\mathcal{C}$ of the form

   $$
     \phi_s \,\colon\, X_s \longrightarrow Y_{f(s)}
     \,.
   $$

But this is manifestly the same as the explicit description of $PSh_{\sqcup}(\mathcal{C})$ [above](#ViaIndexedSetsOfObjects).

### Via coproducts of presheaves
 {#ViaCoproductOfPresheaves}

The free coproduct completion of $\mathcal{C}$ is [[equivalence of categories|equivalently]] the [[full subcategory]]

$$
  PSh_{\sqcup}(\mathcal{C})
  \xhookrightarrow{\;}
  PSh(\mathcal{C})
$$

of the [[category of presheaves]] over $\mathcal{C}$ on those which are [[coproducts]] of [[representables]]. The latter is the [[free cocompletion]] of $\mathcal{C}$ under *all* [[small colimit|small]] [[colimits]].

The [[Yoneda embedding]] hence factors through the free coproduct completion

$$
  y
  \;\colon\;
  \mathcal{C}
  \xhookrightarrow{\;}
  PSh_{\sqcup}(\mathcal{C})
  \xhookrightarrow{\;}
  PSh(\mathcal{C})
$$

Notice that the first inclusion here does *not* [[preserved colimit|preserve]] [[coproducts]] (coproducts are freely adjoined irrespective of whether $\mathcal{C}$ already had some coproducts), but the second does. Both inclusions [[preserved limit|preserve]] those [[limits]] that exist.

## Properties

Fairly immediate from the explicit definition [above](#ViaIndexedSetsOfObjects) is:

\begin{proposition}\label{CategoriesOfCoproductsOfConnectedObjects}
  A [[category]] $\mathcal{B}$ with small-indexed [[coproducts]] is [[equivalence of categories|equivalent]] to a [[free coproduct completion]] $PSh_{\sqcup}(\mathcal{C})$ for a [[small category]] $\mathcal{C}$ if

1. $\mathcal{C} \xhookrightarrow{\;} \mathcal{B}$ is a [[full subcategory]] of [[connected objects]],

   i.e. $X \,\in\, \mathcal{C} \hookrightarrow \mathcal{B}$ means that the [[hom-functor]] $\mathcal{B}(X,-) \,\colon\, \mathcal{B} \to Set$ [[preserved colimit|preserves]] [[coproducts]]

   (which when $\mathcal{C}$ is [[extensive category|extensive]] means equivalently that if $X$ is a coproduct, then one of the summands is [[initial object|initial]], by [this Prop.](InExtensiveCategoryCOnnectedObjectsArePrimitiveUnderCoproduct));

1. each object of $\mathcal{B}$ is a [[coproduct]] of objects in $\mathcal{C} \hookrightarrow \mathcal{B}$.

\end{proposition}
([Carboni & Vitale 1998, Lem. 42](#CarboniVitale98))
\begin{proof}
  Since, by assumption, the objects of $\mathcal{B}$ are already presented by [[indexed sets]] $\big(X_s\big)_{s \in S}$ of objects in $\mathcal{C}$, it is sufficient to see that under this presentation the morphisms
$$
  \phi
  \,\colon\,
  \big(\underset{s \in S}{\coprod} X_s\big)
  \longrightarrow
  \big(\underset{t \in T}{\coprod} Y_t\big)
$$
in $\mathcal{B}$ correspond bijectively to indexed sets of morphisms in $\mathcal{C}$ according to the explicit description of the free coproduct completion [above](#ViaIndexedSetsOfObjects). Indeed, using

1. the [[hom-functors preserve limits|general fact]] that [[hom-functors]] take [[coproducts]] in the first argument to [[products]]

1. the defining property that the resulting hom-functors out of connected objects take coproducts in the second argument to coproducts,

we obtain the following sequence of [[natural bijections]]
$$
\begin{array}{ll}
  Hom_{\mathcal{C}}\big(
    \coprod_s X_s
    ,\,
    \coprod_t Y_t
  \big)
  \\
  \;\simeq\;
  \prod_s
  Hom_{\mathcal{C}}\big(
     X_s
    ,\,
    \coprod_t Y_t
  \big)
  \\
  \;\simeq\;
  \underset{s \in S}{\prod}
  \underset{t_s \in T}{\coprod}
  Hom_{\mathcal{C}}\big(
    X_s
    ,\,
    Y_{t_s}
  \big)
  \\
  \;\simeq\;
  \underset{f \colon S \to T}{\coprod}
  \underset{s \in S}{\prod}
  Hom_{\mathcal{C}}\big(
    X_s
    ,\,
    Y_{f(s)}
  \big)
  \,.
\end{array}
$$
\end{proof}

\begin{proposition}
\label{FCCOfAccessibleCatIsAccesible}
  The free coproduct completion of an [[accessible category]] is itself accessible.
\end{proposition}
([Makkai & Paré (1989), Cor. 5.3.6](#MakkaiParé1989))

\begin{prop}
\label{FreeCoproductCompletionIsExtensive}
  Any free coproduct completion is an [[extensive category]].
\end{prop}
(e.g. [Carboni, Lack & Walters 1993](#CarboniLackWalters93))

\begin{proposition}
\label{CoproductCompletionOfCategoryWithProducts}
  For $\mathcal{C}$ a category with all [[Cartesian products]], its free coproduct completion $PSh_{\sqcup}(\mathcal{C})$ also has [[products]] and they [[distributive category|distribute]] over the [[coproducts]].
\end{proposition}
\begin{proof}
  This is readily seen by component inspection, but it may be instructive to see it from more abstract reasoning:

Namely, with the free cocompletion understood as a [[Grothendieck construction]], $PSh_{\sqcup}(\mathcal{C}) \,\simeq\, \int_{S \in Set} \mathcal{C}^S$ discussed [above](#AsAGrothendieckConstruction), its cartesian produducts are computed by the general formula for limits in Grothendieck constructions ([here](Grothendieck+construction#CoLimitsInAGrothendieckConstruction)) as the "[[external tensor product|external]] [[cartesian product]]" ([here](Grothendieck+construction#CartesianProductInGrothendieckConstruction), we now show binary products only, just for ease notation):
$$
  X_S,\, Y_T \,\in\, \textstyle{\int}_{S \in Set} \mathcal{C}
  \;\;\;\;\;\;\;\;\;
  \vdash
  \;\;\;\;\;\;\;\;\;
  X_S \times Y_T
  \;\simeq\;
  \Big(
  \big(
    (pr_S)^\ast X
  \big)
    \times_{S \times T}
  \big(
    (pr_T)^\ast Y
  \big)
  \Big)_{S \times T}
  \,.
$$
Of course this comes down to the expected component formula
$$
  \begin{array}{ll}
  \big(
    X_S \times Y_T
  \big)_{s,t}
  \\
  \;\simeq\;
  \Big(
  \big(
    (pr_S)^\ast X
  \big)
    \times_{S \times T}
  \big(
    (pr_T)^\ast Y
  \big)
  \Big)_{s,t}
  &
  \text{by the above}
  \\
  \;\simeq\;
  \{(s,t)\}^\ast
  \Big(
  \big(
    (pr_S)^\ast X
  \big)
    \times_{S \times T}
  \big(
    (pr_T)^\ast Y
  \big)
  \Big)
  &
  \text{by definition}
  \\
  \;\simeq\;
  \Big(
  \big(
    \{(s,t)\}^\ast
    (pr_S)^\ast X
  \big)
    \times_{\{(s,t)\}}
  \big(
    \{(s,t)\}^\ast
    (pr_T)^\ast Y
  \big)
  \Big)
  &
  \text{pullback is right adjoint}
  \\
  \;\simeq\;
  \big(
    \{s\}^\ast
    X
  \big)
    \times_{\{(s,t)\}}
  \big(
    \{t\}^\ast
    Y
  \big)
  &
  \text{by commuting diagram below}
  \\
  \;\simeq\;
  X_s \times Y_t
  &
  \text{by definition}
  \end{array}
$$
$$
  \array{
    \{s\} &\simeq& \{(s,t)\} &\simeq& \{t\}
    \\
    \Big\downarrow && \Big\downarrow && \Big\downarrow
    \\
    S &\underset{pr_S}{\longleftarrow}& S \times T &\underset{pr_T}{\longrightarrow}& T
  }
$$
Similarly, the component formula for the free coproduct is
$$
  \big(
    Y_T \amalg Y'_{T'}
  \big)_{\tau}
  \;\simeq\;
  \left\{
  \begin{array}{lll}
    Y_\tau &\vert& \tau \in T
    \\
    Y'_{\tau} &\vert& \tau \in T'
  \end{array}
  \right.
  \,.
$$
Using all this, distributivity is verified as follows:
$$
  \begin{array}{ll}
    \Big(
    X_S
      \times
    \big(
      Y_T \sqcup Y_{T'}
    \big)
    \Big)_{s, \tau}
    \\
    \;\simeq\;
    X_s
      \times
    \big(
      Y_T \sqcup Y_{T'}
    \big)_\tau
    \\
    \;\simeq\;
    \left\{
    \begin{array}{lll}
      X_s  \times Y_\tau &\vert& \tau \in T
      \\
      X_s \times Y'_{\tau} &\vert& \tau \in T'
    \end{array}
    \right.
    \\
    \;\simeq\;
    \left\{
    \begin{array}{lll}
      (X_S \times Y_T)_{s, \tau} &\vert& \tau \in T
      \\
      (X_S \times Y'_{T'})_{s, \tau} &\vert& \tau \in T'
    \end{array}
    \right.
    \\
    \;\simeq\;
    \Big(
    \big(
      X_S \times Y_T
    \big)
    \sqcup
    \big(
      X_S \times Y'_{T'}
    \big)
    \Big)_{s,\tau}
    \,.
  \end{array}
$$
\end{proof}

\begin{remark}\label{FreeDistributiveCategoryMonad}
It seems plausible, that,
more abstractly, Prop. \ref{CoproductCompletionOfCategoryWithProducts} follows
because the [[2-monad]] for [[free product completion]] would [[distributive law|distribute]] over the 2-monad for free coproduct cocompletion; the composite 2-monad would exhibit the [[free construction|free]] [[distributive category]]-construction. We don't currently have a proof or reference for these statements, though.
\end{remark}

## Examples
 {#Examples}

### Coproduct completion of connected objects

The following examples follow as special cases of Prop. \ref{CategoriesOfCoproductsOfConnectedObjects}:

\begin{example}
The category [[Set]] is the [[free coproduct completion]] of the [[terminal category]].
\end{example}

\begin{example}\label{SkeletalGroupoids}
**([[skeletal groupoids]] form the free coproduct completion of [[groups]])**
\linebreak
  The [[1-category]] of [[skeletal groupoids]] among that of all [[strict groupoids]] is the free coproduct completion of the category of 1-object [[delooping groupoids]] which (*as [[1-categories]]*) is equivalently the category of [[groups]]:
$$
  PSh_{\sqcup}\big(
    Grp
  \big)
  \;\;
    \simeq
  \;\;
  PSh_{\sqcup}\big(
    Grpd_{(Obj = \ast)}
  \big)
  \;\;
    \simeq
  \;\;
  Grpd_{skl}
  \,.
$$
\end{example}

\begin{example}\label{GActionsAndGOrbits}
**([[G-set|$G$-sets]] are the [[free coproduct completion]] of [[orbit category|$G$-orbits]])**
\linebreak
  Let $G \,\in\, Grp(Set)$ be a [[discrete group]]. Write

* [[G-set|$G Set$]] for its category of [[group actions]] on [[sets]],

* $G Orbt \xhookrightarrow{\;} G Set$ for its [[orbit category]], the [[full subcategory]] on the [[transitive actions]], hence the [[coset space|sets of cosets]] $G/H$, for [[subgroups]] $H \subset G$.

Since every [[G-set]] $X$ decomposes as a [[disjoint union]] of [[transitive actions]], namely of [[orbits]] of [[elements]] of $X$, this inclusion exhibits $G Set$ as the [[free coproduct completion]] of [[orbit category|G Orbt]].
\end{example}

### Coproduct compeletion of extensive categories

\begin{example}\label{CoproductCompletionOfExtensiveCategories}
**(coproduct completion of extensive categories)**
\linebreak
  While Prop. \ref{FreeCoproductCompletionIsExtensive} says that every free coproduct completion is extensive, if a category $\mathcal{C}$ is already extensive to start with then its free coproduct completion may equivalently be described as the category of $\mathcal{C}$-[[bundles]] over [[sets]], the latter regarded as objects of $\mathcal{C}$ via the unique [[coproduct]]-[[preserved colimit|preserving]] [[functor]] $\iota_{Set} \,\colon\, Set \longrightarrow \mathcal{C}$, hence as the [[comma category]] $\mathcal{C}_{Set} \,\coloneqq\, \big(id_{\mathcal{C}}, \iota_{Set}\big)$:
\[
  \label{AsACategoryOfBundles}
  \mathcal{X}\;\text{extensive}
  \;\;\;\;\;\;\;\;\;\;
    \vdash
  \;\;\;\;\;\;\;\;\;\;
  PSh_{\sqcup}(\mathcal{C})
  \;\;
    \simeq
  \;\;
  \mathcal{C}_{Set}
  \;\;
    =
  \;\;
  \left\{
  \array{
    \underset{s \in S}{\coprod} X_s
    &\overset{\phi}{\longrightarrow}&
    \underset{t \in T}{\coprod} Y_t
    \\
    \Big\downarrow
    &&
    \Big\downarrow
    \\
    S &\underset{f}{\longrightarrow}& T
    \,,
  }
  \right\}
\]
where on the right we are indicating a generic [[morphism]] of such [[bundles]].

Namely, since every [[set]] is the [[coproduct]] of [[singleton sets]] indexed by its [[elements]], and due to the defining property of an [[extensive category]] that the coproduct functors are [[equivalence of categories|equivalences]] between ([[product category|products]] of) [[slice categories]]
$$
  \mathcal{C}_{/ \iota(S)}
  \;\;
  \simeq
  \;\;
  \underset{s \in S}{\prod}
    \mathcal{C}_{/\iota(s)}
$$
it follows that:

1. every object $X_S$ of $\mathcal{C}_{\iota(S)}$ is of the form shown in (eq:AsACategoryOfBundles) hence determined by a family $(X_s)_{s \in S}$,

1. morphisms as shown in (eq:AsACategoryOfBundles) are equivalently (by the [[universal property]] of the [[pullback]]) morphisms of the form

   $$
   \array{
     \underset{s \in S}{\coprod}
     X_s
     &\overset{\phi}{\longrightarrow}&
     \underset{s \in S}{\coprod} Y_{f(s)}
     \\
     \Big\downarrow
     &&
     \Big\downarrow
     \\
     S &\underset{\;\;\; id_S \;\;\;}{\longrightarrow}& S
     \,,
   }
   $$

   (where we used [[universal colimit|pullback stability of coproducts]] in an extensive category, see [there](extensive+category#DisjointAndPullbackStableCoproducts), to deduce that $f^\ast Y_S \,\simeq\, \underset{s \in S}{\coprod} f^\ast(Y_S)_s \,\simeq\, \underset{s \in S}{\coprod} Y_{f(s)}$)

   which by extensitivity are equivalently $S$-indexed families $\phi_s\,\colon\, X_s \longrightarrow Y_{f(s)}$.

This is again manifestly the explicit description of the free coproduct completion from [above](#ViaIndexedSetsOfObjects).

Conversely this gives a sense that if a category $\mathcal{C}$ is *not* extensive, so that the notion of [[bundles]] with total spaces and fibers in $\mathcal{C}$ does not make sense,  its free coproduct completion may be understood as the closest stand-in for that category of $\mathcal{C}$-bundles over sets.
\end{example}

## Related concepts

* [[free cocompletion]], [[idempotent completion]], [[Cauchy completion]]

* [[free cartesian category]]

## References

Early discussion of the concept:

* {#Bénabou1985} [[Jean Bénabou]], §3.3 in: *Fibered Categories and the Foundations of Naive Category Theory*,  The Journal of Symbolic Logic, Vol. **50** 1 (1985) 10-37 [[doi:10.2307/2273784](http://dx.doi.org/10.2307/2273784)]

On [[accessible category|accessibility]] of free coproduct completions:

* {#MakkaiParé1989} [[Michael Makkai]], [[Robert Paré]],  §5.2.2 (pp. 116) in: _Accessible categories: The foundations of categorical model theory_,  Contemporary Mathematics **104**, American Mathematical Society (1989) [[ISBN:978-0-8218-7692-3](https://bookstore.ams.org/conm-104)]

On [[limits]] in free coproduct completions:

* {#HuTholen95} [[Hongde Hu]], [[Walter Tholen]], *Limits in  free  coproduct completions*, Journal of  Pure  and  Applied  Algebra 105 (1995) 277-291 (doi:10.1016/0022-4049(94)00153-7, [pdf](https://core.ac.uk/download/pdf/82604415.pdf))

In the context of [[regular and exact completions]]:

* {#CarboniVitale98} [[Aurelio Carboni]], [[Enrico Vitale]], *Regular and exact completions*, Journal of Pure and Applied Algebra **125** 1–3  (1998) 79-116 (doi:10.1016/S0022-4049(96)00115-6)

In the general context of [[extensive categories]]:

* {#CarboniLackWalters93} [[Aurelio Carboni]], [[Stephen Lack]], [[Bob Walters|R. F. C. Walters]], _Introduction to extensive and distributive categories_, JPAA **84** (1993) pp. 145-158 [doi:10.1016/0022-4049(93)90035-R]

As [[categorical semantics]] for [[dependent linear type theories]] (in the context of [[quantum programming languages]] with "[[dynamic lifting]]", such as proto-[[Quipper]]), the free coproduct completion of [[symmetric monoidal category|symmetric]] [[closed monoidal categories]] is considered in

* [[Francisco Rios]], [[Peter Selinger]], §3.2 in: *A Categorical Model for a Quantum Circuit Description Language*, EPTCS **266** (2018) 164-178 [[arXiv:1706.02630](https://arxiv.org/abs/1706.02630), [doi:10.4204/EPTCS.266.11](https://doi.org/10.4204/EPTCS.266.11)]

* {#FuKishidaSelinger20} [[Peng Fu]], [[Kohei Kishida]], [[Peter Selinger]], _Linear Dependent Type Theory for Quantum Programming Languages_, LICS '20: Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer ScienceJuly 2020 Pages 440–453 ([arXiv:2004.13472](https://arxiv.org/abs/2004.13472), [doi:10.1145/3373718.3394765](https://dl.acm.org/doi/10.1145/3373718.3394765), [pdf](https://depend.cs.uni-saarland.de/lics-icalp/papers/B5.F), [video](https://www.youtube.com/watch?v=GUT8j4V6Nzg))

and its [followups](Quipper#ReferencesDependentLinearTypesAndCategoricalSemantics).

[[!redirects free coproduct completions]]

[[!redirects free coproduct cocompletion]]
[[!redirects free coproduct cocompletions]]

[[!redirects free coproduct-cocompletion]]
[[!redirects free coproduct-cocompletions]]

[[!redirects free sum completion]]
[[!redirects free sum completions]]


free crossed module

In this exposition we will follow the book listed below in writing crossed modules with operations on the right. Thus a [[crossed module]] is in the first instance a morphism $\mu: M \to  P$ of groups together with an operation of the group $P$ on the right of the group $M$ written $(m,p) \mapsto
m^p$, satisfying the following two axioms:

CM1) $ \mu (m^p)= p(\mu m)p^{-1}$;

CM2) $ mnm^{-1} = n^{\mu m} $;

for all $m,n \in M, p \in P$.

The notion of _free crossed module_ was developed by J.H.C. Whitehead in the period 1941-1949 to model algebraically the structure of the second relative homotopy group  of an adjunction space
$\pi_2(A \cup \{e^2_\lambda\}_{\lambda \in \Lambda},A,x)$ considered as a crossed module over $\pi_1(A,x)$. This work is also related to independent work of Peiffer and Reidemeister on Identities among relations.

It can also be considered as arising from the notion of a resolution for a group, by analogy with resolutions for modules, but in a nonabelian framework. So in combinatorial group theory we consider a presentation $ \langle X \mid R \rangle $ of a group $G$. Thus $X$ is a set of generators of the group $G$ and $R$ is a set of relators, that is, $R$ is a subset of $F(X)$, the free group on the set $X$. So we have an  epimorphism $\phi: F(X) \to G$ with kernel $N$, say, a normal subgroup of $F(X)$, and $N$ is the normal closure of $R$ in $F(X)$. All this reflect the fact that if $\phi (u) =1$, where $u \in F(X)$, then
$\phi (pup^{-1} ) = 1$ for all $p \in F(X)$.

Let  $P=F(X)$, and write $\langle R\rangle^P$ for the normal closure of the set $R$ in $P$. The elements of $\langle R\rangle^P$ are all _consequences_ of
$R$ in $P$, namely all products

 $$ c=(r_{1}^{\epsilon _{1}})^{p_{1}} \dots (r_{m}^{\epsilon
_{m}})^{p_{m}}$$

where $r_{i} \in R$, $\epsilon _{i} = \pm 1$,
$p_{i} \in P$ and $m \geq 1$, and $u^p = pup^{-1}$. An important point is that if
$\phi \colon P \to Q$ is any morphism of groups  such that $\phi
(R)=\{1\} $, then $\phi (\langle R\rangle^P) =\{1\}$, since Ker $
\phi$ is normal. Thus $\phi$ factors as $P \to P/\langle R\rangle^P
\to Q$ where the first morphism is the quotient morphism.

It is also convenient to allow for repeated relators, which, as we shall see, corresponds to attaching several cells by the same map. So we replace the subset $R$ of $P=F(X)$ by a function $\omega: R \to P$.

We now drop the assumption that $P$ is free. We form the free $P$-group $F^P(R)$ on the set $R$: this is the free group on elements $(r,p) \in R \times P$, and has an action of the group $P$ determined  by
$(r,p)^q=(r,pq)$. There is a morphism of groups $\theta : F^P(R) \to P$ given by $\theta (r,p)= (\omega(r))^p$. Then $\theta $ is a $P$-morphism: $\theta (w^p)= \theta (w)^p$ for all $w \in F^P(R), p \in P$.

We now define for $u,v \in F^P(R)$ the _Peiffer commutator_ to be the element

 $$ [\! [ u,v]\! ] = uvu^{-1}(v^{\theta u})^{-1}.$$

 Note that $\theta([ \! [ u,v] \! ] )=1 \in F^P(R)$. It may be proved that the Peiffer commutators generate a normal subgroup called the Peiffer group  of $\theta$, and written $ [ \! [ F^P(R), F^P(R)]\! ] $. The quotient group $F^P(R)/ [\! [ F^P(R),F^P(R) ]\! ] $ is written $FC(\omega)$ and there is an induced morphism

$$\delta : FC(\omega) \to P$$

with image $\langle(\omega(R))\rangle^P$. This construction is called the _free crossed module_ on $\omega: R \to P$. The kernel of $\delta$ is actually a $P$-module, and is called the _module of identities among relations_.

A useful fact is that this free crossed module may also be described as the pushout in the category of crossed modules

 $$\begin{matrix}(1 \to F(R))&\to & (1 \to P) \\ \downarrow&& \downarrow \\ (F(R) \to F(R)) &\to& (FC(\omega) \to P)\end{matrix}$$

where the morphism of groups $i:F(R) \to FC(\omega)$ is given by $i(w) = [(w,1)]$, the class of $(w,1)$ in $FC(\omega)$. This shows the relevance of a Seifert-Van Kampen Theorem for second relative homotopy groups, since the above pushout comes from applying the fundamental crossed module functor $\Pi_2$ on based pairs given by

$$\Pi_2(X,A,x)= (\delta: \pi_2(X,A,x) \to \pi_1(A,x))$$

to the  pushout of pairs of spaces defining the based pair $(A \cup \{e^2_\lambda\}_{\lambda \in \Lambda}, A,x)$. This theorem  also shows that we can generalise this situation to a pushout of crossed modules

 $$\begin{matrix}(1 \to S)&\to & (1 \to P) \\ \downarrow&& \downarrow \\ (S \to S) &\to& ( M \to P)\end{matrix}$$

where $S$ is now any group; the crossed module $M \to P$ then gives the fundamental crossed module of the pair $(A \cup CY,A,x)$ determined by a map $f: Y \to A$ and where $S=\pi_1(Y,y)$. Note that $(A \cup CY,A)$  arises in a pushout diagram of the form
$$\begin{matrix}(Y,Y)&\to & (A,A) \\ \downarrow&& \downarrow \\ (CY,Y) &\to& (A \cup CY,A)\end{matrix}$$

This generalisation of Whitehead's theorem on free crossed modules was discovered as a consequence of the 2-dimensional Seifert-van Kampen Theorem. It has been used to give explicit computations of the crossed module $\pi_2(A \cup CY,A,x)\to \pi_1(A,x)$ in the case the map $Y \to A$ is the map of classifying spaces $ BG \to BP $ induced by a morphism $\phi: G \to P$ of groups. It may also be proved that if $G,P$ are finite groups, so also is the group $M$. This gives impetus to calculations, and some of these are best done with a computer.

For more information on these topics see Part I of the book on "Nonabelian algebraic topology" listed below.

It is convenient to generalise the above to crossed modules over groupoids, to model the situation of attaching cells at different points. So we assume given $\mu: M \to P$ where $M,P$ are groupoids, $\mu$ is the identity on objects, $M$ is a union of groups $M(x), x \in P_0 = Ob(P)$ and the operation of $P$ on $M$ is such that if $p \in P(x,y), m \in M(x)$, then $m^p \in M(y)$, with the obvious axioms.

## References##

* Whitehead, J. H.~C., "Combinatorial homotopy. II". _Bull. Amer. Math. Soc._ 55 (1949) 453--496.

* Brown, R. and Higgins, P.J., "On the connection between the second
relative homotopy groups of some related spaces", _Proc.
London Math.  Soc._ (3) 36 (1978) 193--212.

* R. Brown, P.J. Higgins, R. Sivera,  _Nonabelian algebraic
topology: filtered spaces, crossed complexes, cubical homotopy
groupoids_, EMS Tracts in Mathematics Vol. 15, 703 pages. (August
2011).


free diagram

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

#Contents#
* table of contents
{:toc}

## Idea

A _free diagram_ in a [[category]] $\mathcal{C}$ is a particularly simple special case of the general concept of a _[[diagram]]_ $X_\bullet \;\colon\; \mathcal{I} \to \mathcal{C}$, namely the case where the shape $\mathcal{I}$ of the diagram is a [[free category]].

Many important types of [[limits]] and [[colimits]] are over free diagrams, for instance [[products]]/[[coproducts]], [[equalizers]]/[[coequalizers]], [[pullbacks]]/[[pushouts]], [[sequential limits]]/[[sequential colimits]].

Due to the simplicity of the concept of free diagrams, these types of [[limits]] and [[colimits]] may be discussed in a very low-brow way, without even making the concept of _[[category]]_ and _[[functor]]_ explicit. For this see the _[Exposition](#Exposition)_ below.

## Definition

Recall that

+-- {: .num_defn #Diagram}
###### Definition
**([[diagram]])**

For $\mathcal{C}$ a [[category]], then a _[[diagram]] in $\mathcal{C}$_ is

1. a [[small category]] $\mathcal{I}$ , the _shape_ of the diagram;

1. a [[functor]] $X_\bullet \;\colon\; \mathcal{I} \to \mathcal{C}$.

=--

+-- {: .num_defn #FreeCategory}
###### Definition
**([[free category]])**

There is a [[free-forgetful adjunction]]

$$
  Cat
    \underoverset
      {\underset{Underlying}{\longrightarrow}}
      {\overset{Free}{\longleftarrow}}
      {\bot}
  DirGraph
$$

between the [[1-categories]] of [[categories]] and that of [[directed graphs]].

A _[[free category]]_ is one in the [[image]] of this [[left adjoint]] functor $Free \colon DirGraph \to Cat$ (sometimes called a "[[path category]]").

=--

+-- {: .num_defn #FreeDiagram}
###### Definition
**(free diagram)**

A _[[free diagram]]_ in a [[category]] $\mathcal{C}$ is a [[diagram]] in $\mathcal{C}$ (def. \ref{Diagram}) whose shape is a [[free category]] (def. \ref{FreeCategory}).

In other words, a free diagram in $\mathcal{C}$ is

1. a [[directed graph]] $I$;

1. a [[functor]] of the form $X_\bullet \;\colon\; Free(I) \to \mathcal{C}$.

=--

## Examples

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

Types of free diagrams that are commonly encountered in practice, as well as the names of the [[limits]]/[[colimits]] over them are shown in the following table

[[!include free diagrams -- table]]

=--

## Exposition
 {#Exposition}

We give an exposition of free diagrams, and their [[cones]] and [[limits]], intentionally avoiding abstract category-theoretic language, expressing everything just in components. See also at _[[limits and colimits by example]]_.

For concreteness, we speak only of diagrams of [[sets]] and of [[topological spaces]] in the following:

+-- {: .num_defn #Diagram}
###### Definition
**([[free diagram]] of [[sets]]/[[topological spaces]])**

A _[[free diagram]]_ $X_\bullet$ of [[sets]] or of [[topological spaces]] is

1. a [[set]] $\{ X_i \}_{i \in I}$ of [[sets]] or of [[topological spaces]], respectively;

1. for every [[pair]] $(i,j) \in I \times I$ of labels, a [[set]]
   $\{ X_i \overset{ f_\alpha }{\longrightarrow} X_j\}_{\alpha \in I_{i,j}}$ of [[functions]] of of [[continuous functions]], respectively, between these.

=--

+-- {: .num_example #DiscreteDiagram}
###### Example
**([[discrete category|discrete]] [[diagram]] and [[empty diagram]])**

Let $I$ be any [[set]], and for each $(i,j) \in I \times I$ let $I_{i,j} = \emptyset$
be the [[empty set]].

The corresponding [[free diagrams]] (def. \ref{Diagram})
are simply a set of sets/topological spaces with no specified (continuous) functions between them.
This is called a _[[discrete category|discrete]] [[diagram]]_.

For example for $I = \{1,2,3\}$ the set with 3-elements, then such a diagram looks like this:

$$
  X_1 \phantom{AAA} X_2 \phantom{AAA} X_3
  \,.
$$

Notice that here the index set may be [[empty set]], $I = \emptyset$, in which case the
corresponding diagram consists of no data. This is also called the _[[empty diagram]]_.

=--

+-- {: .num_defn #ParallelMorphisms}
###### Definition
**([[parallel morphisms]] [[diagram]])**

Let $I = \{a, b\}$ be the [[set]] with two elements, and consider the sets

$$
  I_{i,j}
    \;\coloneqq\;
  \left\{
    \array{
      \{ 1,2 \} & \vert & (i = a) \,\text{and}\, (j = b)
      \\
      \emptyset & \vert & \text{otherwise}
    }
  \right\}
  \,.
$$

The corresponding [[free diagrams]] (def. \ref{Diagram}) are called _[[pairs of  parallel morphisms]]_.
They may be depicted like so:

$$
  X_a
    \underoverset
      {\underset{f_2}{\longrightarrow}}
      {\overset{f_1}{\longrightarrow}}
      {\phantom{AAAAA}}
  X_b
  \,.
$$

=--

+-- {: .num_example #SpanDiagram}
###### Example
**([[span]] and [[cospan]] [[diagram]])**

Let $I = \{a,b,c\}$ the set with three elements, and set

$$
  I_{i ,j}
   =
  \left\{
    \array{
      \{f_1\} & \vert \, (i = c) \,\text{and}\, (j = a)
      \\
      \{f_2\} & \vert \, (i = c) \,\text{and}\, (j = b)
      \\
      \emptyset & \vert \, \text{otherwise}
    }
  \right.
$$

The corresponding [[free diagrams]] (def. \ref{Diagram}) look like so:

$$
  \array{
    && X_c
    \\
    & {}^{\mathllap{f_1}}\swarrow && \searrow^{\mathrlap{f_2}}
    \\
    X_a && && X_b
  }
  \,.
$$

These are called _[[span]] [[diagrams]]_.

Similary, there is the _[[cospan]]_ diagram of the form

$$
  \array{
    && X_c
    \\
    & {}^{\mathllap{f_1}}\nearrow && \nwarrow^{\mathrlap{f_2}}
    \\
    X_a && && X_b
  }
  \,.
$$

=--

+-- {: .num_example}
###### Example
**([[tower]] [[diagram]])**

Let $I = \mathbb{N}$ be the set of [[natural numbers]] and consider

$$
  I_{i,j}
   \;\coloneqq\;
  \left\{
    \array{
      \{f_{i,j}\} & \vert & i \leq j
      \\
      \emptyset & \vert & \text{otherwise}
    }
  \right.
$$

The corresponding [[free diagrams]] (def. \ref{Diagram}) are called _[[tower]] [[diagrams]]_.
They look as follows:

$$
   X_0
     \overset{\phantom{A}f_{0,1} \phantom{A} }{\longrightarrow}
   X_1
     \overset{\phantom{A} f_{1,2} \phantom{A} }{\longrightarrow}
   X_2
     \overset{\phantom{A} f_{2,3} \phantom{A} }{\longrightarrow}
   X_3
     \overset{}{\longrightarrow}
   \cdots
   \,.
$$

Similarly there are co-tower diagram

$$
   X_0
     \overset{\phantom{A} f_{0,1} \phantom{A} }{\longleftarrow}
   X_1
     \overset{\phantom{A} f_{1,2} \phantom{A}}{\longleftarrow}
   X_2
     \overset{\phantom{A} f_{2,3} \phantom{A}}{\longleftarrow}
   X_3
     \overset{}{\longleftarrow}
   \cdots
   \,.
$$

=--

$\,$

+-- {: .num_defn #Cone}
###### Definition
**([[cone]] over a [[free diagram]])**

Consider a [[free diagram]] of sets or of topological spaces (def. \ref{Diagram})

$$
  X_\bullet
    \,=\,
  \left\{
    X_i \overset{f_\alpha}{\longrightarrow} X_j
  \right\}_{i,j \in I, \alpha \in I_{i,j}}
  \,.
$$

Then

1. a _[[cone]]_ over this diagram is

   1. a [[set]] or [[topological space]] $\tilde X$ (called the _tip_ of the cone);

   1. for each $i \in I$ a [[function]] or [[continuous function]] $\tilde X \overset{p_i}{\longrightarrow} X_i$

   such that

   * for all $(i,j) \in I \times I$ and all $\alpha \in I_{i,j}$ then the condition

     $$
       f_{\alpha} \circ p_i = p_j
     $$

     holds, which we depict as follows:

     $$
       \array{
         && \tilde X
         \\
         & {}^{\mathllap{p_i}}\swarrow && \searrow^{\mathrlap{p_j}}
         \\
         X_i
           && \underset{f_\alpha}{\longrightarrow} &&
         X_j
       }
     $$

1. a _[[co-cone]]_ over this diagram is

   1. a set or topological space $\tilde X$ (called the _tip_ of the co-cone);

   1. for each $i \in I$ a function or continuous function $q_i \colon X_i \longrightarrow \tilde X$;

   such that

   * for all $(i,j) \in I \times I$ and all $\alpha \in I_{i,j}$ then the condition

     $$
       q_j \circ f_{\alpha} = q_i
     $$

     holds, which we depict as follows:

     $$
       \array{
         X_i && \overset{f_\alpha}{\longrightarrow} && X_j
         \\
         & {}_{\mathllap{q_i}}\searrow && \swarrow_{\mathrlap{q_j}}
         \\
         && \tilde X
       }
       \,.
     $$

=--

+-- {: .num_example #ConeIncarnationOfSolutionsToEquations}
###### Example
**([[solutions]] to [[equations]] are [[cones]])**

Let $f,g \colon \mathbb{R} \to \mathbb{R}$ be two [[functions]] from the [[real numbers]] to themselves, and consider the
corresponding [[parallel morphism]] [[diagram]] of sets (example \ref{ParallelMorphisms}):

$$
  \mathbb{R}
    \underoverset
      {\underset{f_2}{\longrightarrow}}
      {\overset{f_1}{\longrightarrow}}
      {\phantom{AAAAA}}
  \mathbb{R}
  \,.
$$

Then a [[cone]] (def. \ref{Cone}) over this free diagram with tip the [[singleton]] set $\ast$ is a _[[solution]]_ to
the [[equation]] $f(x) = g(x)$

$$
  \array{
    && \ast
    \\
    & {}^{\mathllap{const_x}}\swarrow && \searrow^{\mathrlap{const_y}}
    \\
    \mathbb{R}
      &&
      \underoverset
        {\underset{f_2}{\longrightarrow}}
        {\overset{f_1}{\longrightarrow}}
        {\phantom{AAAAA}}
      &&
    \mathbb{R}
  }
  \,.
$$

Namely the components of the cone are two functions of the form

$$
  cont_x, const_y \;\colon\; \ast \to \mathbb{R}
$$

hence equivalently two [[real numbers]], and the conditions on these are

$$
  f_1 \circ const_x = const_y
  \phantom{AAAA}
  f_2 \circ const_x = const_y
  \,.
$$

=--

+-- {: .num_defn #LimitingCone}
###### Definition
**([[limit|limiting cone]] over a [[diagram]])**

Consider a [[free diagram]] of sets or of topological spaces (def. \ref{Diagram}):

$$
  \left\{
    X_i \overset{f_\alpha}{\longrightarrow} X_j
  \right\}_{i,j \in I, \alpha \in I_{i,j}}
  \,.
$$

Then

1. its _[[limit|limiting cone]]_ (or just _[[limit]]_ for short, also "[[inverse limit]]", for historical reasons) is
   [[generalized the|the]] [[cone]]

   $$
     \left\{
     \array{
       && \underset{\longleftarrow}{\lim}_k X_k
       \\
       & {}^{\mathllap{p_i}}\swarrow && \searrow^{\mathrlap{p_j}}
       \\
       X_i
         && \underset{f_\alpha}{\longrightarrow} &&
       X_j
     }
     \right\}
   $$

   over this diagram (def. \ref{Cone}) which is _[[universal property|universal]]_ among all possible cones,
   in that for

   $$
     \left\{
     \array{
       && \tilde X
       \\
       & {}^{\mathllap{p'_i}}\swarrow && \searrow^{\mathrlap{p'_j}}
       \\
       X_i
         && \underset{f_\alpha}{\longrightarrow} &&
       X_j
     }
     \right\}
   $$

   any other [[cone]], then there is a unique function or continuous function, respectively

   $$
     \phi \;\colon\; \tilde X \overset{}{\longrightarrow} \underset{\longrightarrow}{\lim}_i X_i
   $$

   that factors the given cone through the limiting cone, in that for all $i \in I$ then

   $$
     p'_i = p_i \circ \phi
   $$

   which we depict as follows:

   $$
     \array{
       \tilde X
       \\
       {}^{\mathllap{ \exists !\, \phi}}\downarrow & \searrow^{\mathrlap{p'_i}}
       \\
       \underset{\longrightarrow}{\lim}_i X_i
       &\underset{p_i}{\longrightarrow}&
       X_i
     }
   $$

1. its _[[colimit|colimiting cocone]]_ (or just _[[colimit]]_ for short, also "[[direct limit]]", for historical reasons) is
   [[generalized the|the]] [[cocone]]

   $$
     \left\{
     \array{
       X_i
         && \overset{f_\alpha}{\longrightarrow} &&
       X_j
       \\
       & {}^{\mathllap{q_i}}\searrow && \swarrow^{\mathrlap{q_j}}
       \\
       \\
       && \underset{\longrightarrow}{\lim}_i X_i
     }
     \right\}
   $$

   under this diagram (def. \ref{Cone}) which is _[[universal property|universal]]_ among all possible co-cones,
   in that it has the property that for

   $$
     \left\{
     \array{
       X_i
         && \overset{f_\alpha}{\longrightarrow} &&
       X_j
       \\
       & {}^{\mathllap{q'_i}}\searrow && \swarrow_{\mathrlap{q'_j}}
       \\
       && \tilde X
     }
     \right\}
   $$

   any other [[cocone]], then there is a unique function or continuous function, respectively

   $$
     \phi \;\colon\;  \underset{\longrightarrow}{\lim}_i X_i \overset{}{\longrightarrow} \tilde X
   $$

   that factors the given co-cone through the co-limiting cocone, in that for all $i \in I$ then

   $$
     q'_i = \phi \circ q_i
   $$

   which we depict as follows:

   $$
     \array{
       X_i
       &\overset{q_i}{\longrightarrow}&
       \underset{\longrightarrow}{\lim}_i X_i
       \\
       & {}_{q'_i}\searrow & \downarrow^{\mathrlap{\exists ! \phi}}
       \\
       && \tilde X
     }
   $$

=--

$\,$

All the limits and colimits over the free diagram in the above list of examples have special names:

[[!include free diagrams -- table]]

+-- {: .num_example #TerminalInitialObject}
###### Example
**([[initial object]] and [[terminal object]])**

Consider the [[empty diagram]] (def. \ref{DiscreteDiagram}).

1. A [[cone]] over the empty diagram is just an object $X$, with no further structure or condition.
The [[universal property]] of the [[limit]] ``$\ast$'' over the empty diagram is hence that
for every object $X$, there is a unique map of the form $X \to \ast$. Such an object $\ast$ is called a _[[terminal object]]_.

1. A [[co.cone]] over the empty diagram is just an object $X$, with no further structure or condition.
The [[universal property]] of the [[colimit]] ``$0$'' over the empty diagram is hence that
for every object $X$, there is a unique map of the form $0 \to X$. Such an object $\ast$ is called a _[[initial object]]_.

=--

+-- {: .num_example #CoProduct}
###### Example
**([[Cartesian product]] and [[coproduct]])**

Let $\{X_i\}_{i \in I}$ be a [[discrete category|discrete]] [[diagram]] (example \ref{DiscreteDiagram}),
i.e. just a set of objects.

1. The [[limit]] over this diagram is called the _[[Cartesian product]]_, denoted $\underset{i \in I}{\prod} X_i$;

1. The [[colimit]] over this diagram is called the _[[coproducts]]_, denoted $\underset{i \in I}{\coprod} X_i$.

=--

+-- {: .num_example #Equalizer}
###### Example
**([[equalizer]])**

Let

$$
  X_1
    \underoverset
      {\underset{\phantom{AA}f_2\phantom{AA}}{\longrightarrow}}
      {\overset{\phantom{AA}f_1\phantom{AA}}{\longrightarrow}}
      {}
  X_2
$$

be a [[free diagram]] of the shape "[[pair of parallel morphisms]]" (example \ref{ParallelMorphisms}).

A [[limit]] over this diagram according to def. \ref{LimitingCone} is also called the _[[equalizer]]_ of the maps $f_1$ and $f_2$.
This is a set or topological space $eq(f_1,f_2)$ equipped with a map $eq(f_1,f_2) \overset{p_1}{\longrightarrow} X_1$,
so that $f_1 \circ p_1 = f_2 \circ p_1$ and such that if $Y \to X_1$ is any other map with this property

$$
  \array{
    && Y
    \\
    && \downarrow & \searrow
    \\
    eq(f_1,f_2)
      &\overset{p_1}{\longrightarrow}&
    X_1
      &
        \underoverset
          {\underset{\phantom{AA}f_2\phantom{AA}}{\longrightarrow}}
          {\overset{\phantom{AA}f_1\phantom{AA}}{\longrightarrow}}
          {}
      &
    X_2
  }
$$

then there is a unique factorization through the equalizer:

$$
  \array{
    && Y
    \\
    &{}^{\mathllap{\exists !}}\swarrow& \downarrow & \searrow
    \\
    eq(f_1,f_2)
      &\overset{p_1}{\longrightarrow}&
    X_1
      &
        \underoverset
          {\underset{f_2}{\longrightarrow}}
          {\overset{f_1}{\longrightarrow}}
          {}
      &
    X_2
  }
  \,.
$$

In example \ref{ConeIncarnationOfSolutionsToEquations} we have seen that a cone over
such a pair of parallel morphisms is a _[[solution]]_ to the equation $f_1(x) = f_2(x)$.

The equalizer above is the _space of all solutions_ of this equation.

=--

+-- {: .num_example #Pushout}
###### Example
**([[pullback]]/[[fiber product]] and [[coproduct]])**

Consider a [[cospan]] [[diagram]] (example \ref{SpanDiagram})

$$
  \array{
     && Y
     \\
     && \downarrow^{\mathrlap{f}}
     \\
     X
       &\underset{g}{\longrightarrow}&
     Z
  }
  \,.
$$

The [[limit]] over this diagram is also called the _[[fiber product]]_ of $X$ with $Y$ over $Z$, and denoted
$X \underset{Z}{\times}Y$. Thought of as equipped with the projection map to $X$, this is also called the
_[[pullback]]_ of $f$ along $g$

$$
  \array{
     X \underset{X}{\times} Z
       &\longrightarrow&
     Y
     \\
     \downarrow &(pb)& \downarrow^{\mathrlap{f}}
     \\
     X
       &\underset{g}{\longrightarrow}&
     Z
  }
  \,.
$$

[[formal duality|Dually]], consider a [[span]] [[diagram]] (example \ref{SpanDiagram})

$$
  \array{
    Z
      &\overset{g}{\longrightarrow}&
    Y
    \\
    {}^{\mathllap{f}}\downarrow
    \\
    X
  }
$$

The [[colimit]] over this diagram is also called the [[pushout]] of $f$ along $g$, denoted $X \underset{Z}{\sqcup}Y$:

$$
  \array{
    Z
      &\overset{g}{\longrightarrow}&
    Y
    \\
    {}^{\mathllap{f}}\downarrow &(po)& \downarrow
    \\
    X &\longrightarrow& X \underset{Z}{\sqcup} Y
  }
$$

=--

$\,$

Here is a more explicit description of the limiting cone over a diagram of sets:

+-- {: .num_prop #SetLimits}
###### Proposition
**([limits and colimits of sets](limits+and+colimits+by+example#limcoliminset))**

Let $\left\{ X_i \overset{f_\alpha}{\longrightarrow} X_j \right\}_{i,j \in I, \alpha \in I_{i,j}}$
be a [[free diagram]] of sets  (def. \ref{Diagram}). Then

1. its [[limit|limit cone]] (def. \ref{LimitingCone}) is given by
   the following [[subset]] of the [[Cartesian product]]
   $\underset{i \in I}{\prod} X_i$
   of all the [[sets]] $X_i$ appearing in the diagram

   $$
     \underset{\longleftarrow}{\lim}_i X_i
     \,\overset{\phantom{AAA}}{\hookrightarrow}\,
     \underset{i \in I}{\prod} X_i
   $$

   on those [[tuples]] of elements which match the [[graphs]] of the functions appearing in the diagram:

   $$
     \underset{\longleftarrow}{\lim}_{i} X_i
     \;\simeq\;
     \left\{
       (x_i)_{i \in I}
       \,\vert\,
       \underset{ {i,j \in I} \atop { \alpha \in I_{i,j} } }{\forall}
       \left(
         f_{\alpha}(x_i) = x_j
       \right)
     \right\}
   $$

   and the projection functions are $p_i \colon (x_j)_{j \in I} \mapsto x_i$.

1. its [[colimit|colimiting co-cone]] (def. \ref{LimitingCone}) is given by the [[quotient set]] of the [[disjoint union]] $\underset{i \in I}{\sqcup} X_i$ of all the [[sets]] $X_i$ appearing in the diagram

   $$
     \underset{i \in I}{\sqcup} X_i
       \,\overset{\phantom{AAA}}{\longrightarrow}\,
     \underset{\longrightarrow}{\lim}_{i \in I} X_i
   $$

   with respect to the [[equivalence relation]] which is generated from the [[graphs]] of the functions in the diagram:

   $$
     \underset{\longrightarrow}{\lim}_i X_i
     \;\simeq\;
     \left(
       \underset{i \in I}{\sqcup} X_i
     \right)/
     \left(
       (x \sim x')
         \Leftrightarrow
       \left(
         \underset{ {i,j \in I} \atop { \alpha \in I_{i,j} } }{\exists}
         \left(
           f_\alpha(x) = x'
         \right)
       \right)
     \right)
   $$

   and the injection functions are the evident maps to [[equivalence classes]]:

   $$
     q_i \;\colon\; x_i \mapsto [x_i]
     \,.
   $$

=--

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

We dicuss the proof of the first case. The second is directly analogous.

First observe that indeed, by consturction, the projection maps $p_i$ as given do make a cone over the free diagram,
by the very nature of the relation that is imposed on the tuples:

$$
  \array{
     &&
     \left\{
       (x_k)_{k \in I}
       \,\vert\,
       \underset{ {i,j \in I} \atop { \alpha \in I_{i,j} } }{\forall}
       \left(
         f_{\alpha}(x_i) = x_j
       \right)
     \right\}
    \\
    & {}^{\mathllap{p_i}}\swarrow && \searrow^{\mathrlap{p_j}}
    \\
    X_i && \underset{f_\alpha}{\longrightarrow} && X_j
  }
  \,.
$$

We need to show that this is universal, in that any other cone over the free diagram factors universally
through it. First consider the case that the tip of a give cone is a singleton:

$$
  \array{
    && \ast
    \\
    & {}^{\mathllap{p'_i}}\swarrow && \searrow^{\mathrlap{p'_j}}
    \\
    X_i
      && \underset{f_\alpha}{\longrightarrow} &&
    X_j
  }
  \,.
$$

This is hence equivalently for each $i \in I$ an element $x'_i \in X_i$, such that for all $i, j \in I$ and $\alpha \in I_{i,j}$
then $f_\alpha(x'_i) = x'_j$. But this is precisely the relation used in the construction of the limit above and hence there
is a unique map

$$
  \ast
    \longrightarrow
     \left\{
       (x_k)_{k \in I}
       \,\vert\,
       \underset{ {i,j \in I} \atop { \alpha \in I_{i,j} } }{\forall}
       \left(
         f_{\alpha}(x_i) = x_j
       \right)
     \right\}
$$

such that for all $i \in I $ we have

$$
  \array{
    \ast
    \\
    \downarrow & \searrow^{\mathrlap{p'_i}}
    \\
     \left\{
       (x_k)_{k \in I}
       \,\vert\,
       \underset{ {i,j \in I} \atop { \alpha \in I_{i,j} } }{\forall}
       \left(
         f_{\alpha}(x_i) = x_j
       \right)
     \right\}
     &\underset{p_i}{\longrightarrow}&
     X_i
  }
$$

namely that map is the one that picks the element $(x'_i)_{i \in I}$.

This shows that every cone with tip a singleton factors uniquely through the claimed limiting cone. But
then for a cone with tip an arbitrary set $Y$, this same argument applies to all the single elements of $Y$.

=--

## Related concepts

* [[diagram]]

* [[commuting diagram]]

* [[internal diagram]]

[[!redirects free diagrams]]


free diagrams -- table

**shapes of [[free diagrams]] and the names of their [[limits]]/[[colimits]]**

| [[free diagram]] | [[limit]]/[[colimit]] |
|------------------|-----------------------|
| [[empty diagram]]| [[terminal object]]/[[initial object]] |
| [[discrete category|discrete diagram]] | [[product]]/[[coproduct]] |
| [[parallel morphisms]] | [[equalizer]]/[[coequalizer]] |
| [[span]]/[[cospan]] | [[pullback]],[[fiber product]]/[[pushout]] |
| [[tower]]/[[cotower]] | [[sequential limit]]/[[sequential colimit]] |


free field

> This entry is about the concept in [[algebra]]. For the concept of the same name in [[physics]] see at [[free field theory]].

***

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

## Idea

Any commutative unital [[integral domain|domain]] can be embedded into a smallest [[field]] in a unique way, its [[field of fractions]]. For noncommutative domains, both the existence and uniqueness (of a smallest [[skew field]]) do not need to hold, and are difficult to decide.

A classical theorem guarantees the existence for a class of [[Ore domain]]s that is the domains for which the subset of regular elements is an [[Ore subset]]; then the corresponding [[Ore localization]] is a skewfield and the localization map is an injection. Another important case is the case of free [[associative algebras]]; in that case the solution is not unique and the first embedding was constructed by Amitsur, and by a different procedure by P. M. Cohn. This skewfield is called the __free field__. It has been more recently used in formulating the theory of [[quasideterminants]].

+-- {: .query}
I\'ve moved this to simply [[free field]], on the grounds that (as with [[field]] itself) the algebraic mathematical meaning is likely to be our default here.  But I might be wrong.  ---Toby
=--

[[!redirects free field (algebra)]]


free field theory

> This entry is about the concept in [[physics]]. For the concept in [[algebra]] see at _[[free field]]_.

***

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Physics
+-- {: .hide}
[[!include physicscontents]]
=--
#### Fields and quanta
+--{: .hide}
[[!include fields and quanta - table]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

A [[field (physics)|field]] [[theory (physics)|theory]] in [[physics]] is called a _free field theory_ if it describes standard [[dynamics]] of fields without any [[interaction]]. Otherwise it is called an _[[interacting field theory]]_.

There is some freedom in formalizing precisely what this means. At the very least the [[equations of motion]] of a free field theory should be [[linear differential equations]]. In [[relativistic field theory]] over a [[Lorentzian manifold|Lorentzian]] [[spacetime]] one typically requires that the [[linear differential equation]] [[equation of motion|of motion]] is, after [[gauge fixing]], in fact the [[wave equation]] or [[Klein-Gordon equation]].

## Definition

### In covariant phase space geometry/multisymplectic geometry

We describe free field theory in the language of [[covariant phase spaces]] of [[local Lagrangians]] and their [[multisymplectic geometry]].

Let $\Sigma = (\mathbb{R}^{d-1;1}, \eta)$ be [[Minkowski spacetime]].
Write the canonical [[coordinates]] as

$$
  \sigma^i \;\colon\; \Sigma \longrightarrow \mathbb{R}
  \,.
$$

Let $(X,g)$ be a [[vector space]] $X$ equipped with a [[bilinear form]] $g$ that makes it a [[Riemannian manifold]]. Write its canonical coordinates as

$$
  \phi^a \;\colon\; X \longrightarrow \mathbb{R}
  \,.
$$

Let then $X \times \Sigma \to \Sigma$ be the [[field bundle]].
Its first [[jet bundle]] then has canonical coordinates

$$
  \{ \sigma^i \}, \{\phi^a\}, \{\phi^a_{,i}\} \;\colon\; j_\infty^1(\Sigma \times X) \longrightarrow X
  \,.
$$

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

The [[local Lagrangian]] for [[free field theory]] with this [[field bundle]] is

$$
  L
   \coloneqq
  \left(
     \frac{1}{2} g^{i j} \eta_{a b} \phi^a_{,i} \phi^a_{,j}
  \right)
  \wedge
  \mathbf{d}\sigma^1 \wedge \cdots \wedge \mathbf{d}\sigma^d
  \,.
$$

=--

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

The [[canonical momentum]]-densities  for the free field local Lagrangian of def. \ref{FreeFieldLocalLagrangian} are

$$
  \begin{aligned}
    p_a^i \wedge \mathbf{d}\sigma^1 \wedge \cdots \wedge \mathbf{d}\sigma^d
      & \coloneqq
    \frac{\partial}{\partial u^a_i} L
    \\
      & =
    \left(
       g^{i j} \eta_{a b} \phi^a_{,j}
    \right)
    \wedge
    \mathbf{d}\sigma^1 \wedge \cdots \wedge \mathbf{d}\sigma^d
  \end{aligned}
$$

=--

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

So the boundary term $\theta$ in [[variational calculus]],
(see [this remark](covariant+phase+space#CanonicalThetaDensityInLocalCoordinates) at _[[covariant phase space]]_ ) is

$$
  \begin{aligned}
    \mathbf{d}u^a
     \wedge
    \iota_{\partial_i}
    \left(
      \frac{\partial}{\partial \phi^a_{,i}}L
    \right)
     & =
    p^i_a \wedge (\iota_{\partial_{\sigma^i}} vol) \wedge \mathbf{d}u^a
    \\
    & =  p^i_a \wedge dq_i^a
    \,,
  \end{aligned}
$$

where in the last line we adopted the notation of [this remark](#multisymplectic+geometry#CanonicalFormInGoodCoordinates) at _[[multisymplectic geometry]]_.

This shows that the canonical [[multisymplectic form]]
is the "covariant symplectic potential current density"
which is induced by the free field Lagrangian.

=--

### In BV-formalism

#### Kinematics and dynamics

In the formalization of [[perturbation theory]] via [[BV-quantization]] as in ([Costello-Gwilliam](#CostelloGwilliam)), a free field theory is given by a [[BV-complex]] that arises from the following data.

The following appears for instance as ([Gwilliam 2.6.2](#Gwilliam)).

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

A **free field theory** ([[local quantum field theory|local]], [[Lagrangian]]) is the following data

**[[kinematics]]**:

* A [[smooth manifold]] $X$ ("[[spacetime]]"/"[[worldvolume]]");

* a $\mathbb{Z}$-[[graded object|graded]] [[complex numbers|complex]] [[vector bundle]] $E \to X$ (the "[[field bundle]]" containing also in general [[antifields]] and [[ghosts]]);

* equipped with a [[bundle]] [[homomorphism]] (the "[[antibracket]] [[density]]")

  $$
    \langle -,-\rangle_{loc} \;\colon\; E \times E \to Dens_X
  $$

  from the fiberwise [[tensor product]] of $E$ with itself to the compex [[density bundle]] which is fiberwise

  * non-degenerate

  * anti-symmetric

  * of degree -1

(See also at _[[Verdier duality]]_.)

Write $\mathcal{E}_c \coloneqq \Gamma_{cp}(E)$ for the space of [[sections]] of the [[field bundle]] of [[compact support]]. Write

$$
  \langle -,-\rangle
  \;\colon\;
  \mathcal{E}_c
  \otimes
  \mathcal{E}_c
  \to
  \mathbb{C}
$$

for the induced pairing on sections

$$
  \langle \phi, \psi\rangle
  =
  \int_{x \in X} \langle \phi(x), \psi(x)\rangle_{loc}
  \,.
$$

The paring being non-degenerate means that we have an [[isomorphism]] $E \stackrel{\simeq}{\to} E^* \otimes Dens_X$ and we write

$$
  E^! \coloneqq E^* \otimes Dens_X
  \,.
$$

**[[dynamics]]**

* A [[differential operator]] on sections of the [[field bundle]]

  $$
    Q \;\colon\; \mathcal{E} \to \mathcal{E}
  $$

  of degree 1 such that

  1. $(\mathcal{E}, Q)$ is an [[elliptic complex]];

  1. $Q$ is [[self-adjoint operator|self-adjoint]] with respect to $\langle -,-\rangle$ in that for all [[field (physics)|fields]] $\phi,\psi \in \mathcal{E}_c$ of homogeneous degree we have $\langle \phi , Q \psi\rangle = (-1)^{{\vert \phi\vert}} \langle Q \phi, \psi\rangle$.

=--

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

From this data we obtain:

* The [[action functional]] $S \colon \mathcal{E}_c \to \mathbb{C}$ of this corresponding free field theory is

  $$
    S \;\colon\; \phi \mapsto \int_X \langle \phi, Q \phi\rangle
    \,.
  $$

* The [[classical BV-complex]] is the [[symmetric algebra]] $Sym  \mathcal{E}^!_c$ of [[compact support|compactly suppported]] [[sections]] of $E^!$ equipped with the induced action of the differential $Q$ and the pairing

  $$
    \{\alpha,\beta\} \coloneqq  \int_{x \in X} \langle \alpha(x), \beta(x)\rangle
    \,.
  $$

  See below at _[The classical observables](#TheClassicalObservables)_ for more.

* The [[quantum BV-complex]]

  $$
    Obs^q \coloneqq (Sym \mathcal{E}^!_c[ [\hbar] ], Q + \hbar \Delta)
  $$

  is the deformation of the above to the [[symmetric algebra]] tensored with the [[formal power series]] in $\hbar$ ("[[Planck's constant]]") $Sym(\mathcal{E}^!)[ [\hbar] ]$  and differential $Q + \hbar \Delta$ with [[BV-Laplacian]] defined to vanish on $Sym^{\leq 1}$, given by

  $$
    \Delta (\alpha \cdot \beta) \coloneqq \{\alpha,\beta\}
  $$

  for $\alpha,\beta \in \mathcal{E}^!$ and extended by the formula

  $$
    \Delta(a \cdot b)
    \coloneqq
    (\Delta a) \cdot b
    +
    (-1)^{deg(a)}
    a \cdot (\Delta b)
    +
    \{a,b\}
    \,.
  $$

  See below at _[The quantum observables](#TheQuantumObservables)_ for more.

A closed element $\mathcal{O} \in Obs^q$ is an [[observable]] and its formal [[path integral]] [[expectation value]] $\langle \mathcal{O}\rangle$ is its image in the [[cochain cohomology]] $H^\bullet Obs^q$. Via the [[homological perturbation lemma]] this may be computed in [[perturbation theory]] (order by order in $\hbar$) in terms of [[Feynman diagrams]].

In a non-free field theory the differential would have an additional perturbation of the complex  by an [[interaction]] term $I$ to

$$
  Q + \{I,-\} + \hbar \Delta
  \,.
$$

=--

[[!include action (physics) - table]]

#### The classical observables
 {#TheClassicalObservables}

For $(E, Q, \langle-, -\rangle_{loc})$ a free field theory, def. \ref{FreeFieldTheory}, write

$$
  E^! \coloneqq E^\ast \otimes Dens_X
$$

and accordingly write $\overline{\mathcal{E}^!}$ for its [[distribution|distributional]] [[sections]]. This is the distributional dual to the smooth sections $\mathcal{E}$ of $E$.

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

The complex of **global classical observables** of the free field theory $(E,Q, \langle-,- \rangle_{loc})$ is the [[classical BV-complex]]

$$
  Obs^{cl} \coloneqq (Sym \mathcal{E}^!_c, Q)
$$

given by the [[symmetric algebra]] of dual sections and quipped with the dual of the differential (which we denote by the same letter) defined on generators and then extended as a graded [[derivation]] to the full [[symmetric algebra]].

The [[factorization algebra]] of local classical observables is the [[cosheaf]] of these observables which assigns to $U \subset X$ the complex

$$
  Obs^{cl} \colon U \mapsto (Sym \mathcal{E}^!_c(U), Q)
  \,.
$$

=--

in ([Gwilliam](#Gwilliam)), this is def. 5.3.6.

#### The quantum observables
 {#TheQuantumObservables}

There is a canonical [[BV-quantization]] of the [above classical observable](#TheClassicalObservables) of a free field theory
given by defining the [[BV Laplacian]] as follows.

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

For $(E, Q, \langle -,-\rangle_{loc})$ a free field theory, def. \ref{FreeFieldTheory}, the **standard [[BV Laplacian]]**

$$
  \Delta
  \colon
  Sym \mathcal{E}^!_c \to Sym \mathcal{E}^!_c
$$

is given on generators $a,b \in Sym^1 \mathcal{E}^!_c$ of homogeneous degree by

$$
  \Delta(a \cdot b) \coloneqq \{a,b\}
$$

and then extended to arbitrary elements by the formula

$$
  \Delta(a \cdot b)
  \coloneqq
  (\Delta a) \cdot b
  +
  (-1)^{deg(a)}
  a \cdot (\Delta b)
  +
  \{a,b\}
$$

=--

In ([Gwilliam](#Gwilliam)) this is construction 2.4.9 (also construction 3.1.6, and section 5.3.3).

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

For $(E, Q, \langle -,-\rangle_{loc})$ a free field theory, def. \ref{FreeFieldTheory} its complex of **[[quantum observables]]** is then the corresponding [[quantum BV-complex]] deformation of the classical BV-complex, def. \ref{ClassicalObservables}, given by the standard
BV-Laplacian of def.\ref{TheStandardBVLaplacian}

$$
  Obs^{q} \colon U \mapsto
  \left(
    Sym(\mathcal{E}^!_c(U))[ [ \hbar ] ], Q + \hbar \Delta
  \right)
  \,.
$$

=--

In ([Gwilliam](#Gwilliam)) this is def. 5.3.9.

## Properties

### Characterization of the quantum observables

We characterize the [[cochain complex]] $Obs^q$ of [[quantum observables]] of def. \ref{QuantumObservables} by an equivalent but small complex built from just the [[cochain cohomology]] of the [[elliptic complex]] of [[field (physics)|fields]] $(\mathcal{E}, Q)$.

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

For $(E, Q, \langle -,-\rangle_{loc})$ a free field theory, def. \ref{FreeFieldTheory}, the global pairing constitutes a dg-[[symplectic vector space]] $(\mathcal{E}, Q, \langle -,-\rangle)$, which descends to the [[cochain cohomology]] to a graded symplectic vector space $(H^\bullet(\mathcal{E}, \langle -,-\rangle)$;
hence by def. \ref{TheStandardBVLaplacian} there is a standard [[BV-Laplacian]] $\Delta_{H^\bullet\mathcal{E}}$. Write

$$
  \mathcal{BVQ}(H^\bullet \mathcal{E})
  \coloneqq
  ( Sym (H^\bullet(\mathcal{E}))^*, \Delta_{H^\bullet \mathcal{E}} )
$$

for the corresponding [[quantum BV-complex]].

=--

This is part of ([Gwilliam, prop. 2.4.10, prop. 5.5.1](#Gwilliam)),

> Handle the following with care for the moment.

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

For a free field theory $(E,Q,\langle-,- \rangle_{loc})$, def. \ref{FreeFieldTheory}, the complex of quantum observables $Obs^q$, def. \ref{QuantumObservables} is [[quasi-isomorphism|quasi-isomorphic]] to
the BV-quantization of the cohomology of the field complex, given by def. \ref{TheQuantumBVComplexOnTheCohomologyOfTheFieldComplex}

$$
  Obs^q
  \simeq
  \mathcal{BVQ}(H^\bullet(\mathcal{E}))
  \,.
$$

=--

This is ([Gwilliam, prop. 5.5.1](#Gwilliam)).

The proof is supposedly along the lines of ([Gwilliam, section 2.5](#Gwilliam)), applying the [[homological perturbation lemma]].

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

The bracket $\{-,-\}$ on the complex of quantum observables $Obs^q$ of def. \ref{QuantumObservables} descends to a bracket on [[cochain cohomology]], making $(H^\bullet (Obs^q), \{-,-\})$ into a graded [[symplectic vector space]].

=--

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

Let $a,b \in Obs^q$ be closed elements of homogeneous degree. Then by the compatibly of $\Delta$ with $\{-,-\}$ also $\{a,b\}$ is closed:

$$
  \Delta \{a,b\}
  =
  \{\Delta a, b\} \pm \{a , \Delta b\} = 0
  \,.
$$

Let in addition $c \in Obs^q$ be any element. Then

$$
  \begin{aligned}
    \{a, b + \Delta c\}
    &=
    \{a,b\} + \{a, \Delta c\}
    \\
    & = \{a,b\} + \Delta (a \cdot (\Delta b)) - (\Delta a)\cdot b   -a \cdot (\Delta^2 b)
    \\
    & = \{a,b\} + \Delta (a \cdot (\Delta b))
  \end{aligned}
$$

and hence the cohomology class of $\{a,b\}$ is independent of the representative cocycle $b$, and similarly for $a$.

=--

## Examples
 {#Examples}

### 0-Dimensional free field theory
 {#0DimensionalFreeFieldTheory}

A degenerate but instructive class of examples to compare to is the case where $X = *$ is the 0-dimensional connected manifold: the point. (See ([Gwilliam 2.3.1](#Gwilliam))).

In this case

$$
  E = V \oplus V^*[-1]
$$

is the [[direct sum]] of a vector space and its formal dual shifted in degree. The pairing is the canonical pairing between a vector space and its dual.

If $\{x^i \colon V \to \mathbb{R}\}_i$ is a [[basis]] for functional on $V$ and $\{\xi_i\}$ is the corresponding basis of functions on $V^*[-1]$, then the [[antibracket]] in this case is

$$
  \{
    X^i, x^j
  \}
  = 0
  \;\;\;
  \{\xi_i, \xi_j\} = 0
  \;\;\;
  \{x^i, \x_j\} = \delta^i_j
  \,.
$$

The [[BV-Laplacian]] in this basis is

$$
  \Delta = \sum_{i = 1}^n \frac{\partial}{\partial x^i} \frac{\partial}{\partial \xi_i}
  \,.
$$

The [[action functional]] is a [[Gaussian distribution]] over $V$ defined by a matrix $A = (a_{i j})$. The corresponding differential is

$$
  Q = \sum_{i,j =1}^n x^i a_{i j} \frac{\partial}{\partial \xi_i}
  \,.
$$

Hence for a field of the form

$$
  \phi = \sum_{i = 1}^n \phi^i \xi_i
$$

we have the [[action functional]]

$$
  \begin{aligned}
    \exp(S(\phi))
    & =
    \exp(-\langle \phi , Q \phi\rangle)
    \\
    & = \exp( - \phi^i a_{k j} \phi^j \langle \xi_i, x^k   \rangle )
    \\
    & = \exp(- \phi^i a_{i j} \phi^j )
  \end{aligned}
$$

### Locally free field theories

Some [[sigma-model]] quantum field theories have the property that they are free _locally_ on their [[target spaces]]. Under good conditions then [[quantization]] of free field theory locally yields a [[sheaf]] of [[quantum observables]] on [[target space]] from which the full quantization of the field theory may be reconstructed.

A famous example of this is the [[topological twist|topologically twisted]][[2d (2,0)-superconformal QFT]] (see there for more, and see ([Gwilliam, section 6](#{#Gwilliam}) for the description in terms of [[factorization algebras]]).

## Related concepts

* [[Wick algebra]]

* [[Gaussian probability distribution]], [[Gaussian integral]]

* [[Wick's lemma]]

* [[gauge theory]]

## References

Discussion of free field theories and their [[quantization]] on [[globally hyperbolic Lorentzian manifolds]] is in

* {#BaerGinouxPfaeffle07} [[Christian Bär]], [[Nicolas Ginoux]], [[Frank Pfäffle]], _Wave Equations on Lorentzian Manifolds and Quantization_, ESI Lectures in Mathematics and Physics, European Mathematical Society Publishing House, ISBN 978-3-03719-037-1, March 2007, Softcover ([arXiv:0806.1036](https://arxiv.org/abs/0806.1036))

Discussion on Euclidean manifolds and in terms of [[BV-formalism]] is in

* {#CostelloGwilliam} [[Kevin Costello]], [[Owen Gwilliam]], _Factorization algebras in perturbative quantum field theory_ ([wiki](http://math.northwestern.edu/~costello/factorization_public.html), [pdf](http://math.northwestern.edu/~gwilliam/factorization.pdf))

* {#Gwilliam} [[Owen Gwilliam]], _Factorization algebras and free field theories_ PhD thesis ([[GwilliamThesis.pdf:file]])

* [[Owen Gwilliam]], [[Rune Haugseng]], _Linear Batalin-Vilkovisky quantization as a functor of ∞-categories_ ([arXiv:1608.01290](https://arxiv.org/abs/1608.01290))

[[!redirects free field theories]]

[[!redirects free field]]
[[!redirects free fields]]

[[!redirects free quantum field theory]]
[[!redirects free quantum field theories]]

[[!redirects free quantum field]]
[[!redirects free quantum fields]]


free functor

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

# Contents
* table of contents
{: toc}

## Idea

Informally, a **free functor** is a [[left adjoint]] to a [[forgetful functor]] -- part of a [[free-forgetful adjunction]]. (This is informal because the concept of [[forgetful functor]] is informal; *any* functor might be viewed as forgetful, so *any* left adjoint might be viewed as free, while in practice only some are.)

Formally, with respect to a [[monad]] or [[algebraic theory]] or [[operad]] $T$, and $T Alg(C)$ the corresponding category of [[algebras over a monad]] or [[algebras over an algebraic theory]] or [[algebras over an operad]], respectively, in some category $C$, the **free $T$-algebra functor** is the [[left adjoint]] to the [[forgetful functor]] $T Alg(C) \to C$.

Such a functor may be thought of as sending any [[object]] of $C$ to the $T$-algebra _freely generated_ by it.

### Free objects

In general, if $U: C \to D$ is thought of as a forgetful functor and $F: D \to C$ is its left adjoint, then $F(x)$ is the __[[free object|free C-object]]__ on an object $x$ of $D$.

More generally, even if the entire left adjoint $F$ doesn't exist, a [[free object]] on $x$ can be defined using a universal property, as "what the value of $F(x)$ would be if $F$ existed."  Conversely, if a free object on $x$ exists for *all* $x\in D$, then the left adjoint $F$ can be assembled from them.

### Cofree functors

[[duality|Dually]], a __cofree functor__ is a [[right adjoint]] to a forgetful functor.

For the classical functors which forget algebraic structure, cofree functors are less common than free functors.

## Examples

Classically, examples of free constructions were characterized by a [[universal property]]. For example, in the case of the free group on a set $X$ the universal property states that any map $X \to G$ as sets uniquely extends to a group homomorphism $F(X) \to G$. When such a free construction can be realized as a left adjoint functor, this universal property is just a transliteration of the fact that the [[unit of an adjunction|unit]] of the [[free-forgetful adjunction]] is an [[initial object]] in the [[comma category]] $(X \downarrow U)$ (where $U$ is the forgetful functor out of the category of algebras, see e.g. the proof of Freyd's general [[adjoint functor theorem]].)

### For free functors

* the [[free monoid]] functor [[Set]] $\to$ [[Mon]];

* the [[free module]] functor [[Set]] $\to$ $K$ [[Mod]] for a [[rig]] $K$;

* the [[free group]] functor [[Set]] $\to$ [[Grp]];

* the [[group completion]] functor [[Mon]] $\to$ [[Grp]]

  in the abelian case in particular:

  the [[Grothendieck group of a commutative monoid|Grothendieck group completion]] functor [[CMon]] $\to$ [[Ab]]

* the [[free abelian group]] functor [[Set]] $\to$ [[Ab]];

* the [[abelianization]] functor [[Grp]] $\to$ [[Ab]];

* the [[free category]] functor $Grph_{d,r} \to$ [[Cat]];

* the [[free operad]] functor;

* the [[unitisation]] functor [[Rng]] $\to$ [[Ring]].

Free constructions *on* [[categories]]:

* [[free cocompletion]], [[free coproduct completion]], [[idempotent completion]], [[Cauchy completion]]

One formal sort of free functor is the [[left adjoint]] $C\to C^T$, where $T$ is a [[monad]] on the [[category]] $C$ and $C^T$ is its [[Eilenberg-Moore category]] (the category of $T$-algebras).  This includes all of the examples above and many others.

A general way to construct free functors is with a [[transfinite construction of free algebras]] (in [[set theory|set-theoretic]] foundations), or with an [[inductive type]] or [[higher inductive type]] (in [[type theory|type-theoretic]] foundations).

### For cofree functors

* The [[cofree coalgebra]] on a vector space. More generally, if $M$ is an [[operad]] in a symmetric monoidal category $V$, $Prop(M)$ its associated [[PROP]], and if $C$ is a monoidal $V$-category, then an $M$-coalgebra in $C$ may be identified with a monoidal $V$-functor $Prop(M)^{op} \to C$. Under suitable completeness assumptions on $C$, the forgetful functor $M$-$Coalg_C \to C$ has a right adjoint, and this forgetful functor is [[comonadic functor|comonadic]].

* If $M$ is a monoid, the forgetful functor $Set^M \to Set$ on (left) $M$-sets has a right adjoint $X \mapsto \hom(M, X)$, where $M$ acts on functions $f: M \to X$ according to the rule $(m f)(m') = f(m' m)$. This forgetful functor is comonadic. Much more generally, the right adjoint to the underlying functor $Set^C \to Set/C_0$ ($C_0$ the set of objects of a category $C$) is comonadic. More generally still, if $V$ is complete and $f: C \to D$ is a functor between small categories, the functor $V^f: V^D \to V^C$ has a right adjoint (although $V^f$ will not normally be comonadic in this generality).

* The forgetful functor $Cat \to Set$, taking a small category to its set of objects, has a right adjoint $K$ for which $K X$ is a category whose objects are elements of $X$ and where there is exactly one morphism $x \to y$ for any $x, y \in X$. The category $K X$, which is a groupoid, is known as the chaotic category on $X$, or the indiscrete category on $X$.

* When $U: C \to Set$ is [[topological concrete category]] over $Set$, as for example the forgetful functor $U: Top \to Set$, it frequently happens that $U$ possesses a right adjoint, assigning to a set an "indiscrete topology".

* The ring of [[Witt vectors]] is the co-free [[Lambda-ring]].

* A rich source of examples is [[coreflective subcategories]], which are comonadic over the ambient category. For example, the category of compactly generated spaces is coreflective in the category of all spaces, $Top$.

## Related concepts

* [[free object]], [[universal property]]

[[!redirects free functor]]
[[!redirects free functors]]
[[!redirects free construction]]
[[!redirects free constructions]]
[[!redirects freely generated]]
[[!redirects free]]

[[!redirects cofree functor]]
[[!redirects cofree functors]]
[[!redirects cofree]]
[[!redirects co-free functor]]
[[!redirects co-free functors]]
[[!redirects co-free]]
[[!redirects fascist functor]]
[[!redirects fascist functors]]
[[!redirects fascist]]

[[!redirects free-forgetful adjunction]]


free graded co-commutative coalgebra

#Definition#

For $V^\bullet$ a complex of modules over a commutative algebra $A$, the **free graded co-commutative [[coalgebra]]**
$\vee^\bullet_A V$ over $V$, is the [[coalgebra]] (in the sense of co-monoids in complexes of modules) whose underlying complex is the graded-symmetric tensor algebra $S^\bullet_A V$ over $A$, and who co-product is the co-concatenation product.

[[!redirects free graded co-commutative coalgebras]]
[[!redirects free graded co-commutative co-algebra]]
[[!redirects free graded co-commutative co-algebras]]
[[!redirects free graded cocommutative coalgebra]]
[[!redirects free graded cocommutative coalgebras]]
[[!redirects free graded cocommutative co-algebra]]
[[!redirects free graded cocommutative co-algebras]]


free group

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

#Contents#
* table of contents
{:toc}

## Idea

The __free group__ on a given [[set]] $S$ is the [[free object]] on $S$ in [[Grp|the category of groups]].  The elements of $S$ are called the __generators__ of this group.

## Definition

### In type theory

In [[dependent type theory]], the free group on a type $A$ is the [[0-truncation]] of the [[underlying type of free infinity-group]] of $A$, $\mathrm{FreeGroup}(A) \coloneqq [\mathrm{UTFIG}(A)]_0$. This is because in any dependent type theory with [[uniqueness of identity proofs]], where every type is 0-truncated, the underlying type of the free infinity-group of $A$ is the free group of $A$.

In addition, one could construct the free group directly from the traditional axioms of a [[group]], as detailed below:

The [[inference rules]] for free group types:

$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{FreeGroup}(A) \; \mathrm{type}}$$

Introduction rules for free groups:

$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \eta:A \to \mathrm{FreeGroup}(A) \; \mathrm{type}} \quad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mu:\mathrm{FreeGroup}(A) \times \mathrm{FreeGroup}(A) \to \mathrm{FreeGroup}(A)}$$

$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \epsilon:\mathrm{FreeGroup}(A)} \quad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \iota:\mathrm{FreeGroup}(A) \to \mathrm{FreeGroup}(A)}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash x:\mathrm{FreeGroup}(A) \quad \Gamma \vdash y:\mathrm{FreeGroup}(A) \quad \Gamma \vdash z:\mathrm{FreeGroup}(A)}{\Gamma \vdash \alpha(x, y, z):\mathrm{Id}_{\mathrm{FreeGroup}(A)}(\mu(x, \mu(y, z)),\mu(\mu(x, y), z))}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash x:\mathrm{FreeGroup}(A)}{\Gamma \vdash \lambda_\epsilon(x):\mathrm{Id}_{\mathrm{FreeGroup}(A)}(\mu(\epsilon, x), x)} \quad \frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash x:\mathrm{FreeGroup}(A)}{\Gamma \vdash \rho_\epsilon(x):\mathrm{Id}_{\mathrm{FreeGroup}(A)}(\mu(x, \epsilon), x)}$$

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash x:\mathrm{FreeGroup}(A)}{\Gamma \vdash \lambda_\iota(x):\mathrm{Id}_{\mathrm{FreeGroup}(A)}\mu(\iota(x), x),  \epsilon)} \quad \frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash x:\mathrm{FreeGroup}(A)}{\Gamma\vdash \rho_\iota(x):\mathrm{Id}_{\mathrm{FreeGroup}(A)}(\mu(x, \iota(x)), \epsilon)}$$

$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \tau:\mathrm{isSet}(\mathrm{FreeGroup}(A))}$$

## Properties

* Every [[subgroup]] of a free group is itself a free group. This is the _[[Nielsen-Schreier theorem]]_.

## Related concepts

* [[free monoid]]

* [[free product of groups]]

* [[free abelian group]], [[free groupoid]]

* [[underlying type of free infinity-group]]

* [[Fox derivative]]

## References

Early discussion of ([[subgroups]] of) [[free groups]] (proof of the [[Nielsen-Schreier theorem]]) and generalization to the [[amalgamated free product of groups]]:

* [[Otto Schreier]], *Die Untergruppen der freien Gruppen*, Abh. Math. Semin. Univ. Hambg. **5** (1927) 161–183 [[doi:10.1007/BF02952517](https://doi.org/10.1007/BF02952517)]

Expository review:

* Abhay Chandel, *Free groups and amalgamated product*, BSc thesis (2013) [[pdf](http://home.iiserb.ac.in/~kashyap/Group/thesis_abhay.pdf), [[Chandel-AmalgamatedProducts.pdf:file]]]

Discussion of free groups in [[homotopy type theory]]:

* [[Univalent Foundations Project]], §6.11 of: *[[Homotopy Type Theory -- Univalent Foundations of Mathematics]]*, Institute for Advanced Study (2013) [[web](http://homotopytypetheory.org/book/), [pdf](http://hottheory.files.wordpress.com/2013/03/hott-online-323-g28e4374.pdf)]

* [[Marc Bezem]], [[Ulrik Buchholtz]], [[Pierre Cagne]], [[Bjørn Ian Dundas]], [[Daniel R. Grayson]]: §6.2 in: *[[Symmetry]]* (2021) [[pdf](https://unimath.github.io/SymmetryBook/book.pdf)]

* [[Nicolai Kraus]], [[Thorsten Altenkirch]], *Free Higher Groups in Homotopy Type Theory*, LICS '18: Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, (2018) [[arXiv;1805.02069](https://arxiv.org/abs/1805.02069), [doi:10.1145/3209108.3209183](https://doi.org/10.1145/3209108.3209183)]

[[!redirects free groups]]