copairing

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

#Contents#
* table of contents
{:toc}

## Idea

Copairing is [[opposite category|dual]] to [[pairing]].

## Definition

Let $X$ and $Y$ be [[objects]] of some [[category]] $C$, and suppose that [[the]] [[coproduct]] $X \sqcup Y$ exists in $C$.

Let $T$ be some object of $C$, and let $a\colon X \to T$ and $b\colon Y \to T$ be [[morphisms]] of $C$.  Then, by definition of [[coproduct]], there exists a unique morphism $[a,b]\colon X \sqcup Y \to T$ such that the obvious diagrams commute.

This $[a,b]$ is the __copairing__ of $a$ and $b$.

## Notation

When convenient, it is nice to write it vertically; all of the following are seen:
$$ \left({a \atop b}\right) ,\quad \left[{a \atop b}\right] ,\quad \left\{{a \atop b}\right\} .$$
The vertical notation can be combined with [[pairing]] to create a [[matrix calculus]] for morphisms from a coproduct to a product.  This works best when products and coproducts are the same, as described at [[matrix calculus]].

## Examples

One often sees a [[function]] defined by cases as follows:
$$
f(x) = \left\{\array{ g(x) & \text {if}\; \phi(x) \\ h(x) & \text {if}\; \psi(x)
.}\right.
$$
Such a definition is valid in general iff the [[domain]] of $f$ is the (internal) [[disjoint union]] of its [[subsets]] $\{x : \phi(x)\}$ and $\{x : \psi(x)\}$.  In that case, let $X$ be the first subset, let $Y$ be the second, and let $T$ be the [[target]] of $f$.  Then we have $X \sqcup Y$ as the domain of $f$, and $f$ itself is the copairing of $g$ and $h$, so that
$$
f = \left[{g \atop h}\right]\,.
$$


copower

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

#Contents#
* table of contents
{:toc}

## Idea

In a [[closed monoidal category]] $C$ the [[tensor product]] $a \otimes b$ and [[internal hom]] $[b,c]$ are related by the defining [[natural isomorphism]]

$$
  C(a \otimes b, c) \simeq C(a, [b,c])
  \,.
$$

The notion of **copowering** generalizes this to the situation where a category $C$ does not act on itself by tensors, but where another category $V$ acts on $C$.

The [[formal duality|dual]] notion is that of *[[powering]]*.

## Definition

\begin{definition}\label{CopowerDefinition}
Let $V$ be a [[closed monoidal category|closed]] [[monoidal category]] serving as the [[cosmos for enrichment]].

 In a $V$-[[enriched category]] $\mathbf{C}$, the **copower** of an object $c \in \mathbf{C}$ by an object $v \in V$ is an object $v \cdot c \in \mathbf{C}$ with a ([[enriched natural transformation|$V$-enriched]]-)[[natural isomorphism]]

$$
  \mathbf{C}\big(
    v \cdot c,\, c'
  \big)
  \;\;\cong\;\;
  \mathbf{V}\big(
    v
    ,\,
    \mathbf{C}(c,c')
  \big)
$$

where

* $\mathbf{C}(-,-)$ denotes the $V$-valued [[hom-object]] of $C$,

* $\mathbf{V}(-,-)$ denotes correspondingly the [[internal hom]] of $V$ (i.e. the [[hom-object]] with respect to its canonical self-enrichment).

\end{definition}

\begin{remark}
**(terminology)** \linebreak
Copowers are frequently called _tensors_ and a $V$-category having all copowers is called _tensored_, while the word "copower" is reserved for the case $V=Set$.  However, there seems to be no good reason for making this distinction.  Moreover, the word "tensor" is fairly overused, and unfortunate since a tensor (= a copower) is a colimit, while a cotensor (= [[power]]) is a limit.
\end{remark}

## Properties

* Copowers are a special sort of [[weighted limit|weighted colimit]].  Conversely, all weighted colimits can be constructed from copowers together with [[conical colimits]] (i.e., ordinary $Set$-based colimits with an enhanced $V$-universal property, although the latter is automatic if powers also exist), assuming these exist.  The dual limit notion of a copower is a [[power]].

## Examples

\begin{example}\label{GeneralBasicExamples}
Let $V$ be a [[Bénabou cosmos]].

* In $V$ regarded as a $V$-[[enriched category]] over itself, the copower is just the given [[tensor product]] of $V$.

* If $B$ is $V$-copowered and $A$ is $V$-small, then the $V$-[[enriched functor category]] $B^A$ is $V$-copowered.

* If $C$ is $V$-copowered and $B \to C$ is a $V$-[[reflective subcategory|reflective full embedding]], then $B$ is also copowered.

\end{example}
(e.g.[Kelly 1982, Sec. 3.7](#Kelly82))

\begin{example}\label{CopoweringOfSmallCategoriesOverSet}
**(copowering of small categories over set)**
\linebreak
Every [[locally small category]] $C$ with all [[coproducts]] is canonically copowered over [[Set]]: the copowering functor

  $$
    \cdot \,\colon\, Set \times C \to C
  $$

  sends $(S,b)$ to the [[coproduct]] of $|S|$-many copies of $b \in C$:

  $$
    S \cdot b \coloneqq \coprod_{s \in S} b
    \,.
  $$

  The defining [[natural isomorphism]] in this situation is then just the fact that the [[hom functor]] [[hom-functor preserves limits|sends colimits in its first argument to limits]]:

  $$
    C(\coprod_{s \in S} b , c)
    \simeq
    \prod_{s \in S} C(b,c)
    \simeq
    Set(S, C(b,c))
    \,.
  $$
\end{example}

\begin{example}
**(copowering of the category of monoids)**
\linebreak
A particularly illuminating instance of Example \ref{CopoweringOfSmallCategoriesOverSet} occurs when $C$ is the [[category of monoids]] (or that [[Groups|of groups]]). In this case, the copower $X\cdot A$ of a [[monoid]] $A$ by a set $X$ is the [[free product]] of $X$ copies of $A$, which can more concretely be described as a "one-sided version" of the [[tensor product of commutative monoids]]. Indeed, $X\cdot A$ is the monoid consisting of

  - The set given by the quotient of the free (noncommutative) monoid $Free(X\times A)$ on $X\times A$ by the congruence relation $\sim$ generated by the relations
    $$
        \begin{aligned}
            (x,a)(x,b) &\sim (x,a b),\\
            (x,1_A)    &\sim ()
        \end{aligned}
    $$
    for each $x\in X$ and each $a,b\in A$, where $()$ is the unit of $Free(X\times A)$. Here, for each $x\in X$ and each $a\in A$, we write $x\cdot a$ for the equivalence class of $(x,a)$.
  - The product given by concatenation, i.e. by
    $$
        (x\cdot a)\cdot_{X\cdot A}(y\cdot b)
        =
        (x\cdot a)(y\cdot b),
    $$
    for each $x\cdot a,y\cdot b\in X\cdot A$;
  - The unit given by
    $$1_{X\cdot A}=x\cdot 1_A,$$
    which is independent of $x$, as $x\cdot 1_A=()=y\cdot 1_A$ for all $x,y\in A$.

  Explicitly, $\coprod_{x\in X}A$ is isomorphic to the above monoid via the isomorphism sending $(x_{1}\cdot a_{1})\cdots(x_{n}\cdot a_{n})$ to the element of $\coprod_{x\in X}A$ given by the word $a^{(x_{1})}_{1}\cdots a^{(x_{n})}_{n}$, where $a^{(x_{i})}_{i}$ is the element $a_{i}$ in the $x_{i}$-th copy of $A$ in the expression $\coprod_{x\in X}A$.

  The [[universal property]] of the copower $X\cdot A$ states that a morphism of monoids from $X\cdot A$ to a monoid $B$ is the same data as a "left-bilinear" map of sets $f\colon A\times X\to B$, satisfying
  $$
  \begin{aligned}
      f(a b,x) &= f(a,x)f(b,x),\\
      f(1_A,x) &= 1_B
  \end{aligned}
  $$
  for each $x\in X$.

  The copower $\cdot\colon Set\times Mon\to Mon$ also endows $Mon$ with [[skew monoidal]] structures $\triangleleft$ and $\triangleright$, given by
  $$
  \begin{aligned}
      A\triangleleft B  &= |B| \cdot A,\\
      A\triangleright B &= |A| \cdot B
  \end{aligned}
  $$
  for each $A,B\in Obj(Mon)$, where $|A|$ and $|B|$ are the underlying sets of $A$ and $B$. While monoids in $CMon$ with respect to the [[tensor product of commutative monoids]] are [[semirings]], monoids in $Mon$ with respect to $\triangleleft$ and $\triangleright$ recover left and right [[near-semirings]].
\end{example}

## Related concepts

* [[powered and copowered category]]

* [[(∞,1)-copower]]

* [[power]]

* [[bitensoring]]

## References

Textbook accounts:

* {#Kelly82} [[Max Kelly]], Section 3.7 of: _Basic concepts of enriched category theory_, London Math. Soc. Lec. Note Series __64__, Cambridge Univ. Press 1982, 245 pp. ([ISBN:9780521287029](https://www.cambridge.org/de/academic/subjects/mathematics/logic-categories-and-sets/basic-concepts-enriched-category-theory?format=PB&isbn=9780521287029));

  republished as:

  Reprints in Theory and Applications of Categories, No. 10 (2005) pp. 1-136 ([tac:tr10](http://www.tac.mta.ca/tac/reprints/articles/10/tr10abs.html), [pdf](http://www.tac.mta.ca/tac/reprints/articles/10/tr10.pdf))

* {#Borceux94}  [[Francis Borceux]], Section 6.5 of: *[[Handbook of Categorical Algebra]]* Vol. 2:  *Categories and Structures*, Encyclopedia of Mathematics and its Applications **50**, Cambridge University Press (1994)
([doi:10.1017/CBO9780511525865](https://doi.org/10.1017/CBO9780511525865)

* [[Emily Riehl]], §3.7 in: *[[Categorical Homotopy Theory]]*, Cambridge University Press (2014) [[doi:10.1017/CBO9781107261457](https://doi.org/10.1017/CBO9781107261457), [pdf](http://www.math.jhu.edu/~eriehl/cathtpy.pdf)]

[[!redirects copowers]]

[[!redirects tensoring]]
[[!redirects tensorings]]

[[!redirects copowering]]
[[!redirects copowerings]]

[[!redirects copowered]]


copresheaf

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

#Contents#
* table of contents
{:toc}

## Definition

A **copresheaf**, or **covariant presheaf**, on a [[category]] $\mathcal{C}$ is a [[presheaf]] on the [[opposite category]] $C^{op}$. As with [[presheaves]], it is understood by default that they take values in [[Set]], but one may consider copresheaves with values in any [[category]] $\mathcal{D}$.

This is a [[concept with an attitude]]: a copresheaf on $\mathcal{C}$ is just a [[functor]] $\mathcal{C} \to \mathcal{D}$ (typically: $\mathcal{C} \to Set$, but one may speak of functors as copresheaves if eventually one wants to impose a gluing condition on them and pass to _[[cosheaves]]_.

Accordingly, the *category of copresheaves* on $\mathcal{C}$ (and with values in $\mathcal{D}$) is just the [[functor category]] $Func(\mathcal{C},\, \mathcal{D})$, whose [[morphisms]] are the [[natural transformations]].

For $\mathcal{D} = Set$, the [[opposite category|opposite]] of the category of copresheaves on $\mathcal{C}$ may be understood as the [[free completion]] of $\mathcal{C}$.

## Related entries

* [[cosheaf]]

* [[free completion]]

* [[Isbell duality]]

[[!redirects copresheaves]]

[[!redirects covariant presheaf]]
[[!redirects covariant presheaves]]

[[!redirects co-presheaf]]
[[!redirects co-presheaves]]

[[!redirects precosheaf]]
[[!redirects precosheaves]]

[[!redirects category of copresheaves]]
[[!redirects categories of copresheaves]]

[[!redirects copresheaf category]]
[[!redirects copresheaf categories]]


coprime integers

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

#Contents#
* table of contents
{:toc}

## Definition

A collection of [[integers]] is called _coprime_ or _relatively prime_ if the only common [[prime factor]] is 1, equivalently if their [[greatest common divisor]] is 1.

## Related concepts

* [[multiplicative group of integers modulo n]]

* [[greatest common divisor]]

## References

See also:

* Wikipedia, _[Coprime integers](https://en.wikipedia.org/wiki/Coprime_integers)_

[[!redirects coprime]]
[[!redirects relatively prime]]

[[!redirects coprime integer]]
[[!redirects coprime numbers]]

[[!redirects relatively prime integers]]
[[!redirects relatively prime numbers]]


coproduct

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

# Coproducts
* tic
{: toc}

## Idea

The notion of _coproduct_ is a generalization to arbitrary [[categories]] of the notion of [[disjoint union]] in the category [[Set]].

## Definition

For $C$ a [[category]] and $x, y \in Obj(C)$ two [[object]]s, their **coproduct** is an object $x \coprod y$ in $C$ equipped with two [[morphism]]s

\begin{center}
\begin{tikzcd}
x \arrow[rd, "i_x"'] &            & y \arrow[ld, "i_y"] \\
                     & x \amalg y &
\end{tikzcd}
\end{center}

such that this is [[universal property|universal]] with this property, meaning such that for any other object with maps like this

\begin{center}
\begin{tikzcd}
x \arrow[rd, "f"'] &   & y \arrow[ld, "g"] \\
                   & Q &
\end{tikzcd}
\end{center}

there exists a _unique_ morphism $(f,g) :  x \coprod y \to Q$ such that we have the following [[commuting diagram]]:

\begin{center}
\begin{tikzcd}
x \arrow[rd, "f"'] \arrow[r, "i_x"] & x \amalg y \arrow[d, "{(f, g)}"] & y \arrow[ld, "g"] \arrow[l, "i_y"'] \\
                                    & Q                                &
\end{tikzcd}
\end{center}

This morphism $(f,g)$ is called the __[[copairing]]__  of $f$ and $g$.  The morphisms $x\to x\coprod y$ and $y\to x\coprod y$ are called [[coprojections]] or sometimes "injections" or "inclusions", although in general they may not be [[monomorphisms]].

**Notation.** The coproduct is also denoted $a+b$ or $a\amalg b$, especially when it is [[disjoint coproduct|disjoint]] (or $a \sqcup b$ if your fonts don\'t include '$\amalg$'). The copairing is also denoted $[f,g]$ or (when possible) given vertically: $\left\{{f \atop g}\right\}$.

A coproduct is thus the [[colimit]] over the [[diagram]] that consists of just two objects.

More generally, for $S$ any [[set]] and $F : S \to C$ a collection of objects in $C$ indexed by  $S$, their **coproduct** is an object

$$
  \coprod_{s \in S} F(s)
$$

equipped with maps

$$
  F(s)  \to \coprod_{s \in S} F(s)
$$

such that this is [[universal property|universal]] among all objects with maps from the $F(s)$.

## Examples

*  In [[Set]], the coproduct of a [[family of sets]] $(C_i)_{i\in I}$ is the [[disjoint union]] $\coprod_{i\in I} C_i$ of sets.

   This makes the coproduct a [[categorification]] of the operation of addition of [[natural number]]s and more generally of [[cardinal]] numbers: for $S,T \in FinSet$ two finite sets and $|-| : FinSet \to \mathbb{N}$ the [[cardinality]] operation, we have

   $$
     |S \coprod T| = |S| + |T|
     \,.
   $$

*  In [[Top]], the coproduct of a family of spaces $(C_i)_{i\in I}$ is the space whose set of points is $\coprod_{i\in I} C_i$ and whose open subspaces are of the form $\coprod_{i\in I} U_i$ (the internal [[disjoint union]]) where each $U_i$ is an [[open subspace]] of $C_i$.  This is typical of [[topological concrete categories]].

*  In [[Grp]], the coproduct is the "[[free product of groups]]", whose [[underlying set]] is *not* a [[disjoint union]].  This is typical of [[algebraic category|algebraic categories]].

*  In [[Ab]], in [[Vect]], the coproduct is  the [[subobject]] of the [[product]] consisting of those tuples of elements for which only finitely many are not 0.

*  In [[Cat]], the coproduct of a family of categories $(C_i)_{i\in I}$ is the category with
   $$Obj(\coprod_{i\in I} C_i) = \coprod_{i\in I} Obj(C_i)$$
   and
   $$
     Hom_{\coprod_{i\in I} C_i}(x,y) =
     \left\{
       \begin{aligned}
         Hom_{C_i}(x,y) & if x,y \in C_i
         \\
         \emptyset & otherwise
       \end{aligned}
     \right.
   $$

*  In [[Grpd]], the coproduct follows [[Cat]] rather than [[Grp]].  This is typical of [[oidifications]]: the coproduct becomes a disjoint union again.

## Properties

* A coproduct in $C$ is the same as a [[product]] in the [[opposite category]] $C^{op}$.

* When they exist, coproducts are unique up to unique canonical isomorphism, so we often say "[[generalized the|the]] coproduct."

* A coproduct indexed by the [[empty set]] is an [[initial object]] in $C$.

## Related concepts

* [[quasi-coproduct]]

* [[sum type]]

* [[free coproduct completion]]

* [[base change]]

  * [[dependent sum]], [[dependent product]]

  * [[dependent sum type]], [[dependent product type]]

## References

Textbook account:

* [[Francis Borceux]], Section 2.2 in Vol. 1: *Basic Category Theory* of: *[[Handbook of Categorical Algebra]]*, Encyclopedia of Mathematics and its Applications **50** Cambridge University Press (1994) ([doi:10.1017/CBO9780511525858](https://doi.org/10.1017/CBO9780511525858))

[[!redirects coproducts]]

[[!redirects binary coproducts]]


coproduct-preserving representable

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
###Context###
#### Compact objects
+--{: .hide}
[[!include compact object - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Introduction

In this article, we collect some results about representable functors $C(c, -) \colon C \to V$ (where $V$ is some base of hom-enrichment) that preserve coproducts.

When $C$ is an [[extensive category]] regarded as enriched in $Set$, we call $c$ a _[[connected object]]_, and this terminology matches well one's intuition about connectedness from familiar cases such as $C = Top$, or $C$ the category of graphs, etc. Some basic results with proofs may be found at [[connected object]], including

* A connected colimit (i.e., a colimit over a [[connected category|connected diagram]] of) connected objects is connected.

* If $X$ is connected and $X \to Y$ is epic, then $Y$ is connected.

For non-extensive categories (e.g., categories of modules), the relation to "connectedness" tends to be less intuitive[^fine].  Nevertheless, the concept of (arbitrary) coproduct-preserving representable remains important, and it is useful to collect some basic information.

## Absoluteness

In an [[Ab-enriched category]], *finite* coproducts are [[absolute colimits]], hence are preserved by *every* representable.  Thus, the interest is in representables which preserve infinite coproducts as well (which is what most of this page is about).

At the other extreme from extensive categories, in a [[SupLat]]-enriched category (such as [[SupLat]] or [[Rel]]) *arbitrary* coproducts are absolute, and hence preserved by every representable.

## Module categories

Let $\mathbf{Mod}_R$ denote the category of right modules over a ring $R$, and suppose an object $M$ induces a coproduct-preserving hom-functor $\mathbf{Mod}_R(M, -) \colon \mathbf{Mod}_R \to \mathbf{Ab}$. Various names for such $M$ appear in the literature, "compact" and "dually slender" among them. In any event, a [question arose on MathOverflow](http://mathoverflow.net/questions/59282/sums-compact-objects-f-g-objects-in-categories-of-modules) as to whether or to what extent this condition coincides with the condition of being finitely generated, for various rings $R$.

The information provided below was mostly culled from the answers given to that question, especially those by [Pierre-Yves Gaillard](#Gaillard) and [Fernando Muro](#Muro). Here and there some minor details and background information have been filled in, and some key results have been slightly rearranged.

### Positive results

We begin with some easy preliminary remarks. Given a family of objects $\{B_i\}_{i \in I}$ in an $\mathbf{Ab}$-enriched category $C$ and a functor $F \colon C \to \mathbf{Ab}$, there is a canonical arrow

$$\oplus_i F(B_i) \to F(\oplus_i B_i)$$

and if this arrow is an isomorphism for every family $B_i$, we say $F$ preserves coproducts. Turning to the case of representable functors on modules, let

$$p_j \colon \oplus_i B_i \to B_j$$

be the obvious projection ($p_j \circ i_j = 1_{B_j}$, else $p_j \circ i_k = 0$), and given $f \colon M \to \oplus_i B_i$, put

$$f_j \coloneqq p_j \circ f.$$

Then $\mathbf{Mod}_R(M, -)$ preserves the particular coproduct $\oplus_i B_i$ if for each $f \colon M \to \oplus_i B_i$, we have $f_j = 0$ for all but finitely many $j$.

Clearly $\mathbf{Mod}_R(R, -)$ preserves coproducts, and if $F$, $G$ are coproduct-preserving functors $\mathbf{Mod}_R \to \mathbf{Ab}$, then so is $F \oplus G$. It follows that

* $\mathbf{Mod}_R(R^n, -)$ preserves coproducts.

+-- {: .num_prop}
###### Proposition
If $\mathbf{Mod}_R(M, -)$ preserves coproducts and $q \colon M \to N$ is epic, then $\mathbf{Mod}_R(N, -)$ preserves coproducts.
=--

+-- {: .proof}
###### Proof
Given $f \colon N \to \oplus_i B_i$, we have $p_j \circ f \circ q = 0$ for all but finitely many $j$, whence $f_j = p_j \circ f = 0$ for all but finitely many $j$ since $q$ is epic.
=--

Combining the two preceding observations, we infer that

* $\mathbf{Mod}_R(M, -)$ preserves coproducts if $M$ is finitely generated.

Here is a sharper description of coproduct-preserving representables, based on subobject lattices.

+-- {: .num_theorem #prop1}
###### Theorem
$\mathbf{Mod}_R(M, -)$ preserves coproducts if and only if the union of every countable chain of proper submodules of $M$ is a proper submodule.
=--

+-- {: .proof}
###### Proof
(As adapted from [Gaillard's answer](#Gaillard).) Let $M_0\subset M_1\subset\cdots$ be a chain of proper submodules of $M$ whose union is $M$, and put $Q_n = M/M_n$. Since for each $m \in M$ we have $q_n(m) = 0$ for all but finitely many $n$, the map

$$q = \langle q_n \rangle \colon M \to \prod_n Q_n,$$

corresponding to the tuple of quotient maps $q_n \colon M \to Q_n$, factors through the inclusion $\oplus_n Q_n \hookrightarrow \prod_n Q_n$. However, since each $q_n$ is nonzero, $q$ does not belong to the subgroup

$$\oplus_n \mathbf{Mod}_R(M, Q_n) \hookrightarrow \prod_n \mathbf{Mod}_R(M, Q_n) \cong \mathbf{Mod}_R(M, \prod_n Q_n)$$

and thus the canonical map $\oplus_n \mathbf{Mod}_R(M, Q_n) \to \mathbf{Mod}_R(M, \oplus_n Q_n)$ is not an isomorphism.

In the other direction, if $\mathbf{Mod}_R(M, -)$ does not preserve coproducts, then we can find some map

$$f \colon M \to \oplus_{i\in I} B_i$$

not belonging to the subgroup $\oplus_{i \in I} \mathbf{Mod}_R(M, B_i) \hookrightarrow \mathbf{Mod}_R(M, \oplus_{i \in I} B_i)$. This means that infinitely many components $f_i \colon M \to B_i$ are nonzero. Choose a countable subset $N \subset I$ such that $f_n \colon M \to B_n$ is nonzero for every $n \in N$, and put

$$M_n \coloneqq \bigcap_{k \geq n} \ker(f_k).$$

Each $M_n$ is a proper submodule of $M$, and the $M_n$ form a nondecreasing chain, but the union of the $M_n$ is $M$ (because for each $m \in M$, only finitely many $f_n(m)$ can be nonzero).
=--

+-- {: .num_theorem #theorem2}
###### Theorem
Let $R$ be a Noetherian ring, and suppose $M \to N$ is a monomorphism of $R$-modules. Then if $\mathbf{Mod}_R(N, -)$ is coproduct-preserving, so is $\mathbf{Mod}_R(M, -)$.
=--

+-- {: .proof}
###### Proof
(As adapted from [Muro's answer](#Muro).) Consider a family $B_i$ of modules, and a map $f \colon M \to \oplus_i B_i$. Since there are [enough injectives](http://ncatlab.org/nlab/show/injective+object#AbHasEnoughInjectives), there exists an embedding $i_j \colon B_j \to E_j$ in an injective module, for each $j$.
Next, as explained [here](http://ncatlab.org/nlab/show/injective+object#DirectSumInjectives), the Noetherian assumption allows us to infer that $\oplus_i E_i$ is injective. Thus, there exists $g$ such that the diagram

$$\array{
M & \to & N \\
 ^\mathllap{f} \downarrow & & \downarrow^\mathrlap{g} \\
\oplus_j B_j & \underset{\oplus_j i_j}{\to} & \oplus_j E_j
}$$

commutes. Because $\mathbf{Mod}_R(N, -)$ preserves coproducts, we have $g_j = 0$ for all but finitely many $j$. Since the diagram

$$\array{
M & \to & N \\
 ^\mathllap{f_j} \downarrow & & \downarrow^\mathrlap{g_j} \\
B_j & \underset{i_j}{\to} & E_j
}$$

commutes and $i_j$ is injective, we see $f_j = 0$ for all but finitely many $j$, whence $\mathbf{Mod}_R(M, -)$ preserves coproducts.
=--

+-- {: .num_corollary}
###### Corollary
Let $R$ be Noetherian. If $\mathbf{Mod}_R(M, -)$ preserves coproducts, then $M$ is finitely generated.
=--

+-- {: .proof}
###### Proof
(Combining [Gaillard's](#Gaillard) and [Muro's](#Muro) answers.) We prove the contrapositive. Suppose $M$ is not finitely generated. Then we can find a strictly increasing sequence of submodules of $M$:

$$M_1 \hookrightarrow M_2 \hookrightarrow \ldots \hookrightarrow M.$$

Let $M'$ be the union of the $M_i$. By [Theorem 1](#prop1), the representable $\mathbf{Mod}_R(M', -)$ does not preserve coproducts. By [Theorem 2](#theorem2), we infer that $\mathbf{Mod}_R(M, -)$ does not preserve coproducts.
=--

* **Remark:** A ring for which finitely generated modules coincide with modules $M$ such that $\mathbf{Mod}_R(M, -)$ is coproduct-preserving is called **steady**. Thus, Noetherian rings are steady. Cf. [Martin Brandenburg's answer](#Brandenburg).

### Negative results

Next, we construct an example of a ring $R$ and an $R$-module $M$ such that $\mathbf{Mod}_R(M, -)$ preserves coproducts but $M$ is not finitely generated.

+-- {: .num_lemma #lem}
###### Lemma
A module $M$ is finitely generated if and only if the union of a totally ordered family of proper submodules of $M$ is a proper submodule.
=--

+-- {: .proof}
###### Proof
The following proof is a practically verbatim transcription from [Gaillard's answer](#Gaillard), modulo some notational changes. Assume that $M$ is not finitely generated. Let $P$ be the set of those submodules $N$ of $M$ such that $M/N$ is not finitely generated, ordered by inclusion. Clearly the poset $P$ is nonempty and has no maximal element. By (the contrapositive of) Zorn's Lemma, there is a nonempty totally ordered subset $T \hookrightarrow P$ which has no upper bound. Letting $U$ be the union of the submodules occurring in $T$, we see that $M/U$ is finitely generated. There is thus a finitely generated submodule $F$ of $M$ which generates $M$ modulo $U$. Then the collection

$$\{N+F: N \in T\}$$

is a totally ordered set of proper submodules whose union is $M$.
=--

Thus, our task is to construct a ring $R$ and an $R$-module $M$ such that every _countable_ chain of proper submodules of $M$ is bounded above by a proper submodule of $M$ (cf. Theorem \ref{theorem2}), but admitting an uncountable chain of proper submodules whose union is $M$ (so that $M$ is not finitely generated, by the preceding lemma \ref{lem}). The solution as presented below is essentially from the answers of [Gaillard](#Gaillard) and [Brandenburg](#Brandenburg), with a few extra glosses.

The task is more or less straightforward if we just remember that [[valuation ring|valuation rings]] can model arbitrarily complicated [rates of growth](http://ncatlab.org/nlab/show/valuation+ring#example_rates_of_growth_10), i.e., in the present case, we just want to build a valuation field with uncountable supply of rates of growth (or of degrees of infinite/infinitesimal elements). Thus, consider for example the free abelian group generated by the first uncountable ordinal, and make this a totally ordered group $G$ by imposing the lexicographic order. This is the value group of a valuation field $K$ whose elements are [[Hahn series]], formally described as functions

$$f \colon G \to \mathbb{R}$$

whose support is well-ordered when considered as a subset of the opposite order $G^{op}$. (More suggestively, we think of $f$ as a formal series

$$\sum_{g \in G} a_g x^g$$

where $a_g = f(g)$ and $x$ is an indeterminate viewed as a generic infinite element, with obvious rules for adding and multiplying. The well-ordering condition is used to ensure that the rules for addition and multiplication are well-founded, and the value $v(f)$ of such a series is the least $g \in G^{op}$ lying in the support of $f$. That is to say, the greatest $g \in G$ that indexes a non-zero coefficient $a_g$.)

Now let $R$ be the valuation ring consisting of _bounded_ elements of $K$, i.e., those $f \colon G \to \mathbb{R}$ in $K$ where $f(g) = 0$ whenever $g$ is greater than the identity element of $G$. Then $K$ is the field of fractions of $R$, and we may regard $K$ as an $R$-module.

For each $t \in \omega_1$, let $R_t$ be the $R$-submodule of $K$ consisting of all those $f \colon G \to \mathbb{R}$ in $K$ such that $v(f) \leq t$. These $R_t$ are "principal fractional ideals", and they form a system of proper submodules which is cofinal in the lattice of $R$-submodules of $K$, ordered by inclusion.

By cofinality, any _countable_ chain of submodules of $K$ is bounded above by some $R_t$, so that $\mathbf{Mod}_R(K, -)$ preserves coproducts. However, the union of all the $R_t$ is $K$, so that $K$ is not finitely generated.

## References

* Sasha (mathoverflow.net/users/2095), "Sums-compact" objects = f.g. objects in categories of modules?, Question 59282 (version: 2011-11-19)
([link](http://mathoverflow.net/questions/59282/sums-compact-objects-f-g-objects-in-categories-of-modules))
{#Sasha}

* Fernando Muro (mathoverflow.net/users/12166), "Sums-compact" objects = f.g. objects in categories of modules?, Answer 59320 (version: 2011-03-23) ([link](http://mathoverflow.net/questions/59282/sums-compact-objects-f-g-objects-in-categories-of-modules/59320#59320))
{#Muro}

* Pierre-Yves Gaillard (mathoverflow.net/users/461), "Sums-compact" objects = f.g. objects in categories of modules?, Answer 81333 (version: 2011-11-29) ([link](http://mathoverflow.net/questions/59282/sums-compact-objects-f-g-objects-in-categories-of-modules/81333#81333))
{#Gaillard}

* Martin Brandenburg (mathoverflow.net/users/2841), "Sums-compact" objects = f.g. objects in categories of modules?, Answer 81623 (version: 2011-11-22) ([link](http://mathoverflow.net/questions/59282/sums-compact-objects-f-g-objects-in-categories-of-modules/81623#81623))
{#Brandenburg}

## Footnote

[^fine]: The divide between extensive categories and categories of modules is somewhat analogous to the divide between the classical particles and quantum particles. In the classical picture, if an elementary particle (which we can think of as "connected") is in a state described by a union $U + V$, then it is either in state $U$ or in state $V$. Whereas in the quantum picture, one has to consider superpositions $U \oplus V$ of states $U$, $V$, and the usual sort of classical logic of disjunctions breaks down. Notice that classical logic (meaning here, non-quantum logic) is largely derived from our experience with extensive categories such as toposes.


coprojection

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

# Contents
* table of contents
{: toc}

## Definition

Generally in [[category theory]] a _coprojection_ is one of the canonical [[morphisms]] $p_i$ into a (categorical) [[coproduct]]:

$$
  p_i \colon X_i \to \coprod_j X_j
  \,.
$$

or, more generally into a [[colimit]]

$$
  p_i \colon X_i \to \underset{\rightarrow_j}{\lim} X_j
  \,.
$$

Hence a coprojection is a component of a [[colimit|colimiting]] _[[cocone]]_ under a given [[diagram]].

Coprojections are also sometimes called *coproduct injections* or *inclusions*, though in general they are not [[monomorphisms]] (see below).

## Properties

### Monicity

In general, the coprojections of a coproduct need not be [[monomorphisms]].  However, they are in certain common situations, such as:

* In a [[distributive category]]; see [there](http://ncatlab.org/nlab/show/distributive+category#monic) for a proof.

* In a category with [[zero morphisms]], since then they are [[split monomorphisms]].

It is easy to find examples of categories in which the coprojections of coproducts are not monic, e.g. the projection $\emptyset \times A\to A$ in $Set$ is not epic if $A$ is nonempty, so when regarded as a coprojection in $Set^{op}$ it is not monic.  It is somewhat trickier to find examples of [[closed monoidal categories]] with this property, but [[Chu spaces]] give an example; see [this MO question](http://mathoverflow.net/questions/208375/a-cosmos-where-coproduct-injections-are-not-monic).

[[!redirects coprojection]]
[[!redirects coprojections]]

[[!redirects coproduct coprojection]]
[[!redirects coproduct coprojections]]
[[!redirects coprojection morphism]]
[[!redirects coprojection morphisms]]

[[!redirects coprojection map]]
[[!redirects coprojection maps]]

[[!redirects co-projection]]
[[!redirects co-projections]]

[[!redirects co-product coprojection]]
[[!redirects co-product coprojections]]
[[!redirects co-projection morphism]]
[[!redirects co-projection morphisms]]

[[!redirects co-projection map]]
[[!redirects co-projection maps]]

[[!redirects coproduct injection]]
[[!redirects coproduct injections]]
[[!redirects coproduct inclusion]]
[[!redirects coproduct inclusions]]


copy

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

\tableofcontents

## Idea

In [[dependent type theory]], given a type $A$, one could define a type $\mathrm{Copy}(A)$ called a **copy** of $A$, which is [[equivalence in type theory|equivalent]] to $A$.

## Definitions

There are two ways to define the copy $\mathrm{Copy}(A)$ of a type $A$, as a [[positive type]] or as a [[negative type]]

### Copies as a positive type

Copies as positive types are also called **unary sum types** or **positive unary product types**.

Assuming that [[identification types]], [[function types]] and [[dependent product types]] exist in the type theory, the copy of type $A$ is the [[inductive type]] generated by a [[function]] from $A$ to $\mathrm{Copy}(A)$:

Formation rules for copies:
$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{Copy}(A) \; \mathrm{type}}$$

Introduction rules for copies:
$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{copy}_A:A \to \mathrm{Copy}(A)}$$

Elimination rules for copies:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:\mathrm{Copy}(A) \vdash C(x) \; \mathrm{type} \quad \Gamma \vdash c_{\mathrm{copy}_A}:\prod_{x:A} C(\mathrm{copy}_A(x)) \quad \Gamma \vdash y:\mathrm{Copy}(A)}{\Gamma \vdash \mathrm{ind}_{\mathrm{Copy}(A)}^C(c_{\mathrm{copy}_A}, y):C(y)}$$

Computation rules for copies:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:\mathrm{Copy}(A) \vdash C(x) \; \mathrm{type} \quad \Gamma \vdash c_{\mathrm{copy}_A}:\prod_{x:A} C(\mathrm{copy}_A(x)) \quad \Gamma \vdash x:A}{\Gamma \vdash \beta_{\mathrm{Copy}(A)}^{\mathrm{copy}_A}(c_{\mathrm{copy}_A}, x):\mathrm{Id}_{C(\mathrm{copy}_A(x))}(\mathrm{ind}_{\mathrm{Copy}(A)}^C(c_{\mathrm{copy}_A}, \mathrm{copy}_A(x)), c(x))}$$

Uniqueness rules for copies:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:\mathrm{Copy}(A) \vdash C(x) \; \mathrm{type} \quad \Gamma \vdash c:\prod_{x:\mathrm{Copy}(A)} C(x) \quad \Gamma \vdash y:\mathrm{Copy}(A)}{\Gamma \vdash \eta_{\mathrm{Copy}(A)}(c, y):\mathrm{Id}_{C(y)}(\mathrm{ind}_{\mathrm{Copy}(A)}^C(c_{\mathrm{copy}_A}, y), c(y))}$$

The elimination, computation, and uniqueness rules for the copy of $A$ state that the copy of $A$ and $B$ satisfy the **dependent universal property of the copy** of $A$ and $B$. If the dependent type theory also has [[dependent sum types]], allowing one to define the [[uniqueness quantifier]], the dependent universal property of the copy of $A$ could be simplified to the following rule:

$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:\mathrm{Copy}(A) \vdash C(x) \; \mathrm{type} \quad \Gamma \vdash c_{\mathrm{copy}_A}:\prod_{x:A} C(\mathrm{copy}_A(x))}{\Gamma \vdash \mathrm{up}_{\mathrm{Copy}(A)}^C(c_{\mathrm{copy}_A}):\exists!c:\prod_{x:\mathrm{Copy}(A)} C(x).\prod_{x:A} \mathrm{Id}_{C(\mathrm{copy}_A(x))}(c(\mathrm{copy}_A(x)), c_{\mathrm{copy}_A}(x))}$$

\begin{theorem}
$\mathrm{copy}_A$ is an [[equivalence of types]] between $A$ and $\mathrm{Copy}(A)$.
\end{theorem}

\begin{proof}
Suppose one takes the type family $C$ in the elimination, computation, and uniqueness rules of the copy of $A$ to be the type family $\sum_{x:A} \mathrm{Id}_{\mathrm{Copy}(A)}(\mathrm{copy}_A(x), -)$. Then the elimination rule states that $\sum_{x:A} \mathrm{Id}_{\mathrm{Copy}(A)}(\mathrm{copy}(x), b)$ has an element for all elements $b:\mathrm{Copy}(A)$, the computation rule states that given all elements $a:A$ the type $\sum_{x:A} \mathrm{Id}_{\mathrm{Copy}(A)}(\mathrm{copy}(x), \mathrm{copy}(a))$ is contractible, and the uniqueness rule states that if the type $\sum_{x:A} \mathrm{Id}_{\mathrm{Copy}(A)}(\mathrm{copy}(x), \mathrm{copy}(a))$ is contractible for all elements $a:A$, then the type $\sum_{x:A} \mathrm{Id}_{\mathrm{Copy}(A)}(\mathrm{copy}(x), b)$ is contractible for all elements $b:B$. Thus, $\mathrm{copy}$ is an [[equivalence of types]], since the type $\sum_{x:A} \mathrm{Id}_{\mathrm{Copy}(A)}(\mathrm{copy}(x), b)$ is contractible for all elements $b:\mathrm{Copy}(A)$.
\end{proof}

### Copies as a negative type

Copies as negative types are also called **negative unary product types**

The rules for negative copies are given as follows:

Formation rules for copies:
$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{Copy}(A) \; \mathrm{type}}$$

Introduction rules for copies:
$$\frac{\Gamma \vdash a:A}{\Gamma \vdash \mathrm{copy}(a):\mathrm{Copy}(A)}$$

Elimination rules for copies:
$$\frac{\Gamma \vdash b:\mathrm{Copy}(A)}{\Gamma \vdash \mathrm{original}(b):A}$$

Computation rules for copies:
$$\frac{\Gamma \vdash a:A}{\Gamma \vdash \mathrm{original}(\mathrm{copy}(a)) \equiv a:A} \qquad \frac{\Gamma \vdash a:A}{\Gamma \vdash \mathrm{original}(\mathrm{copy}(a)) \equiv_A a \; \mathrm{true}} \qquad \frac{\Gamma \vdash a:A}{\Gamma \vdash \beta_{\mathrm{Copy}(A)}(a):\mathrm{original}(\mathrm{copy}(a)) =_A a}$$

Uniqueness rules for copies:
$$\frac{\Gamma \vdash b:\mathrm{Copy}(A)}{\Gamma \vdash b \equiv \mathrm{copy}(\mathrm{original}(b)):\mathrm{Copy}(A)} \qquad \frac{\Gamma \vdash b:\mathrm{Copy}(A)}{\Gamma \vdash b \equiv_{\mathrm{Copy}(A)} \mathrm{copy}(\mathrm{original}(b)) \; \mathrm{true}} \qquad \frac{\Gamma \vdash b:\mathrm{Copy}(A)}{\Gamma \vdash \eta_{\mathrm{Copy}(A)}(b):b =_{\mathrm{Copy}(A)} \mathrm{copy}(\mathrm{original}(b))}$$

\begin{theorem}
$\mathrm{copy}$ is an [[equivalence of types]] between $A$ and $\mathrm{Copy}(A)$.
\end{theorem}

\begin{proof}
Unary products with judgmental or propositional [[conversion rules]] turn $\mathrm{copy}$ into a [[judgmentally strict equivalence]] and a [[propositionally strict equivalence]] respectively. Unary products with only typal [[conversion rules]] turn $\mathrm{copy}$ and $\mathrm{original}$ into [[quasi-inverse functions]] of each other. One could then define a function $f:\mathrm{QInv}(\mathrm{copy}) \to \mathrm{isEquiv}(\mathrm{copy})$ which takes the quasi-inverse function $(\mathrm{original}, \beta_{\mathrm{Copy}(A)}, \eta_{\mathrm{Copy}(A)})$ to a witness that $\mathrm{copy}$ has [[contractible type|contractible]] [[fiber type|fibers]] and is thus an [[equivalence of types]].
\end{proof}

## Extensionality principle for copies

The extensionality princple for copies says that for each element $x:A$ and $y:A$ the [[function application to identities]] for the copy function $\mathrm{copy}$ is an [[equivalence of types]]

$$x:A, y:A \vdash \mathrm{copyext}(x, y):\mathrm{isEquiv}(\mathrm{ap}_{\mathrm{copy}}(x, y))$$

In [[Mike Shulman]]'s model of [[higher observational type theory]], this would be promoted to a [[judgmental equality]]:

$$x:A, y:A \vdash (x =_A y) \equiv (\mathrm{copy}(x) =_{\mathrm{Copy}(A)} \mathrm{copy}(y))$$

## Relation to equivalences

Given types $A$ and $B$ and $f:A \to B$, $f$ is an [[equivalence of types]] if $B$ satisfies the [[universal property]] of a positive copy type of $A$ with copy function $f:A \to B$.

Indeed, one could define the [[isEquiv]] type family $f:A \to B \vdash \mathrm{isEquiv}(f)$ by very similar rules to the rules for positive copy types:

Formation rules for isEquiv:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma \vdash f:A \to B}{\Gamma \vdash \mathrm{isEquiv}(f) \; \mathrm{type}}$$

Introduction rules for isEquiv:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma \vdash f:A \to B \quad \Gamma \vdash g:B \to A \\
      \Gamma \vdash G:\prod_{y:B} f(g(y)) =_B y \quad \Gamma \vdash H:\prod_{x:A} (g(f(x)) =_A x)
    \end{array}
  }{\Gamma \vdash \mathrm{witn}(f, g, G, H):\mathrm{isEquiv}(f)}$$

Elimination rules for isEquiv:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma \vdash f:A \to B \quad \Gamma \vdash p:\mathrm{isEquiv}(f) \\
      \Gamma, y:B \vdash C(y) \; \mathrm{type} \quad \Gamma \vdash c_f:\prod_{x:A} C(f(x)) \quad \Gamma \vdash b:B
    \end{array}
  }{\Gamma \vdash \mathrm{ind}_{\mathrm{isEquiv}(f)}^C(f, p, c_f, b):C(b)}$$

Computation rules for isEquiv:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma \vdash f:A \to B \quad \Gamma \vdash p:\mathrm{isEquiv}(f) \\
      \Gamma, y:B \vdash C(y) \; \mathrm{type} \quad \Gamma \vdash c_f:\prod_{x:A} C(f(x)) \quad \Gamma \vdash a:A
    \end{array}
  }{\Gamma \vdash \beta_{\mathrm{isEquiv}(f)}(f, p, c_f, a):\mathrm{ind}_{\mathrm{isEquiv}(f)}^C(f, p, c_f, f(a)) =_{C(f(a))} c_f(a)}$$

Uniqueness rules for isEquiv:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma \vdash f:A \to B \quad \Gamma \vdash p:\mathrm{isEquiv}(f) \\
      \Gamma, y:B \vdash C(y) \; \mathrm{type} \quad \Gamma \vdash c:\prod_{y:B} C(y) \quad \Gamma \vdash b:B
    \end{array}
  }{\Gamma \vdash \eta_{\mathrm{isEquiv}(f)}(f, p, c, b):c(b) =_{C(b)} \mathrm{ind}_{\mathrm{isEquiv}(f)}^C(f, p, c, b)}$$

Similarly, one could define the type of equivalences between $A$ and $B$ by very similar rules to the rules for positive copy types and isEquiv types:

Formation rules for equivalence types:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type}}{\Gamma \vdash A \simeq B \; \mathrm{type}}$$

Introduction rules for equivalence types:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma \vdash f:A \to B \quad \Gamma \vdash g:B \to A \\
      \Gamma \vdash G:\prod_{y:B} f(g(y)) =_B y \quad \Gamma \vdash H:\prod_{x:A} (g(f(x)) =_A x)
    \end{array}
  }{\Gamma \vdash \mathrm{equiv}(f, g, G, H):A \simeq B}$$

Elimination rules for equivalence types:
$$\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma, R:A \simeq B}{\Gamma, x:A \vdash f_R(x):B}$$

$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma, R:A \simeq B \\
      \Gamma, y:B \vdash C(y) \; \mathrm{type} \quad \Gamma \vdash c_R:\prod_{x:A} C(f_R(x)) \quad \Gamma \vdash b:B
    \end{array}
  }{\Gamma \vdash \mathrm{ind}_{A \simeq B}^C(R, c_R, b):C(b)}$$

Computation rules for equivalence types:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma \vdash R:A \simeq B \\
      \Gamma, y:B \vdash C(y) \; \mathrm{type} \quad \Gamma \vdash c_R:\prod_{x:A} C(f_R(x)) \quad \Gamma \vdash a:A
    \end{array}
  }{\Gamma \vdash \beta_{A \simeq B}(R, c_R, a):\mathrm{ind}_{A \simeq B}^C(R, c_R, f_R(a)) =_{C(f_R(a))} c_R(a)}$$

Uniqueness rules for equivalence types:
$$\frac{
    \begin{array}{l}
      \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \quad \Gamma \vdash R:A \simeq B \\
      \Gamma, y:B \vdash C(y) \; \mathrm{type} \quad \Gamma \vdash c:\prod_{y:B} C(y) \quad \Gamma \vdash b:B
    \end{array}
  }{\Gamma \vdash \eta_{A \simeq B}(R, c, b):c(b) =_{C(b)} \mathrm{ind}_{A \simeq B}^C(R, c, b)}$$

## See also

* [[equivalence in type theory]]
* [[unit type]]
* [[dependent sum type]]
* [[sum type]]
* [[definition]]

## References

The above notion of "copy of a type" is considered in §2.12.8 of:

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

[[!redirects copy]]
[[!redirects copies]]

[[!redirects strict copy]]
[[!redirects strict copies]]

[[!redirects weak copy]]
[[!redirects weak copies]]

[[!redirects positive copy]]
[[!redirects positive copies]]

[[!redirects strict positive copy]]
[[!redirects strict positive copies]]

[[!redirects weak positive copy]]
[[!redirects weak positive copies]]

[[!redirects negative copy]]
[[!redirects negative copies]]

[[!redirects strict negative copy]]
[[!redirects strict negative copies]]

[[!redirects weak negative copy]]
[[!redirects weak negative copies]]

[[!redirects copying]]

[[!redirects wrapped copy]]
[[!redirects wrapped copies]]

[[!redirects strict wrapped copy]]
[[!redirects strict wrapped copies]]

[[!redirects weak wrapped copy]]
[[!redirects weak wrapped copies]]

[[!redirects positive wrapped copy]]
[[!redirects positive wrapped copies]]

[[!redirects strict positive wrapped copy]]
[[!redirects strict positive wrapped copies]]

[[!redirects weak positive wrapped copy]]
[[!redirects weak positive wrapped copies]]

[[!redirects negative wrapped copy]]
[[!redirects negative wrapped copies]]

[[!redirects strict negative wrapped copy]]
[[!redirects strict negative wrapped copies]]

[[!redirects weak negative wrapped copy]]
[[!redirects weak negative wrapped copies]]

[[!redirects copy type]]
[[!redirects copy types]]

[[!redirects strict copy type]]
[[!redirects strict copy types]]

[[!redirects weak copy type]]
[[!redirects weak copy types]]

[[!redirects positive copy type]]
[[!redirects positive copy types]]

[[!redirects strict positive copy type]]
[[!redirects strict positive copy types]]

[[!redirects weak positive copy type]]
[[!redirects weak positive copy types]]

[[!redirects negative copy type]]
[[!redirects negative copy types]]

[[!redirects strict negative copy type]]
[[!redirects strict negative copy types]]

[[!redirects weak negative copy type]]
[[!redirects weak negative copy types]]

[[!redirects copying types]]

[[!redirects wrapped copy type]]
[[!redirects wrapped copy types]]

[[!redirects strict wrapped copy type]]
[[!redirects strict wrapped copy types]]

[[!redirects weak wrapped copy type]]
[[!redirects weak wrapped copy types]]

[[!redirects positive wrapped copy type]]
[[!redirects positive wrapped copy types]]

[[!redirects strict positive wrapped copy type]]
[[!redirects strict positive wrapped copy types]]

[[!redirects weak positive wrapped copy type]]
[[!redirects weak positive wrapped copy types]]

[[!redirects negative wrapped copy type]]
[[!redirects negative wrapped copy types]]

[[!redirects strict negative wrapped copy type]]
[[!redirects strict negative wrapped copy types]]

[[!redirects weak negative wrapped copy type]]
[[!redirects weak negative wrapped copy types]]

[[!redirects unary sum]]
[[!redirects unary sums]]

[[!redirects strict unary sum]]
[[!redirects strict unary sums]]

[[!redirects weak unary sum]]
[[!redirects weak unary sums]]

[[!redirects unary sum type]]
[[!redirects unary sum types]]

[[!redirects strict unary sum type]]
[[!redirects strict unary sum types]]

[[!redirects weak unary sum type]]
[[!redirects weak unary sum types]]

[[!redirects unary product]]
[[!redirects unary products]]

[[!redirects strict unary product]]
[[!redirects strict unary products]]

[[!redirects weak unary product]]
[[!redirects weak unary products]]

[[!redirects unary product type]]
[[!redirects unary product types]]

[[!redirects strict unary product type]]
[[!redirects strict unary product types]]

[[!redirects weak unary product type]]
[[!redirects weak unary product types]]

[[!redirects universal property of a copy]]
[[!redirects dependent universal property of a copy]]

[[!redirects universal property of the copy]]
[[!redirects dependent universal property of the copy]]

[[!redirects universal property of copies]]
[[!redirects dependent universal property of copies]]

[[!redirects universal property of wrapped copies]]
[[!redirects dependent universal property of wrapped copies]]

[[!redirects universal property of copy types]]
[[!redirects dependent universal property of copy types]]

[[!redirects universal property of positive copy types]]
[[!redirects dependent universal property of positive copy types]]

[[!redirects universal property of wrapped copy types]]
[[!redirects dependent universal property of wrapped copy types]]

[[!redirects universal property of positive wrapped copy types]]
[[!redirects dependent universal property of positive wrapped copy types]]

[[!redirects universal property of unary sums]]
[[!redirects dependent universal property of unary sums]]

[[!redirects universal property of unary sum types]]
[[!redirects dependent universal property of unary sum types]]

[[!redirects copy induction]]

[[!redirects wrapped copy induction]]


copyright

For copyright issues in $n$Lab see [[Home Page]] and [[General Discussion]].

Some past material on copyright issues of $n$Lab from the unofficial point of view of one $n$Laber see [[zoranskoda:copyright of nLab|here]].

Here we discuss general copyright issues and literature (mainly in science) in general.

## Copyright issues in natural sciences and mathematics

While in court it is easier to win if somebody had a prior registration of copyright in a copyright office, in principle most of the copyright laws and patent laws in provable cases give advantage to the *factual priority* of the work, even if not registered. That is, every author's work is a priori protected from the moment of creation; the registration at a copyright office just makes it easier to prove the priority in disputes.

According to some historians and anti-copyright activists, the copyright in the 19th and early 20th centuries mainly worked for the authors, while today it is structured in a way which is protects the publishers and less the authors. In particular, often the authors loose battles with their own publishers in attempts to make parts of their work free or published in a form which they prefer.

## Links and literature

* MathOverflow [publishing-journals-articles-without-transferring-copyright](http://mathoverflow.net/questions/64982/publishing-journals-articles-without-transferring-copyright/64983), [how-to-select-a-journal](http://mathoverflow.net/questions/7284/how-to-select-a-journal)

* Oleg Pikhurko's experience: [html](http://www.math.cmu.edu/~pikhurko/Copyright.html)

* Wikipedia [Copyright](http://en.wikipedia.org/wiki/Copyright), [copyright law](http://en.wikipedia.org/wiki/Copyright_law), [intellectual property activism](http://en.wikipedia.org/wiki/Category:Intellectual_property_activism), [anti-copyright](http://en.wikipedia.org/wiki/Anti-copyright), [free nad open source software](http://en.wikipedia.org/wiki/Free_and_open_source_software)

See also the related issues at [[zoranskoda:citations]].


Coq

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

# Contents
* table of contents
{: toc}

## Idea

The computer software _Coq_ "runs" the formal [[foundations]]-language _[[dependent type theory|dependent]] [[type theory]]_ and serves in particular as a formal [[proof management system]]. It provides a formal language to write mathematical [[definitions]], executable [[programs]] and [[theorems]] together with an environment for semi-interactive development of machine-checked [[proofs]], i.e. for [[certified programming]].

Coq is named after [[Thierry Coquand]], with a reference as well to Coquand's [[calculus of constructions|Calculus of Constructions]] (CoC). It follows a tradition of naming languages after animals (compare OCaml).

## Applications

Computer systems such as Coq and [[Agda]] have been used to give machine-assisted and machine-verified proofs of extraordinary length, such as of the [[four-colour theorem]] and the [[Kepler conjecture]].

More generally, they are being used to formalise and machine-verify large parts of mathematics as such, see the section _[Formalization of set-based mathematics](#FormalizationOfSetBasedMathematics)_ below.

One striking insight by [[Vladimir Voevodsky]] was that Coq naturally lends itself also to a formalization of higher mathematics that is founded not on sets, but on [[higher category theory]] and [[homotopy theory]]. For this see below the section _[Homotopy type theory](#HomotopyTypeTheory)_.

### Formalization of set-based mathematics
  {#FormalizationOfSetBasedMathematics}

Projects include

* [ForMath](#ForMath)

* [MathClasses](#MathClasses)

### Formalized proofs

Major [[theorems]] whose [[proofs]] have been fully formalized in Coq include

* [[Feit-Thompson theorem]]

### Homotopy type theory
  {#HomotopyTypeTheory}

For Coq-projects in [[homotopy type theory]] see the section [Code](homotopy+type+theory#Code).

## Related entries
 {#RelatedEntries}

* Coq uses the _[[Gallina specification language]]_ for specifying [[theories]].

* and it uses a version of the *[[calculus of constructions]]* to implement [[natural deduction]].

* *[[CoqQ]]* is a [[quantum programming language]] [[domain specific embedded programming language|embedded]] in Coq.

\linebreak

[[!include proof assistants and formalization projects -- list]]

## References

### General
 {#ReferencesGeneral}

* [Coq home page](http://coq.inria.fr/)

* {#jsCoq} [JsCoq](https://x80.org/rhino-coq/), a ready-to-use online Coq environment

* {#jsHoTTCoq} [JsHoTTCoq](https://x80.org/rhino-hott/), a ready-to-use online [[HoTT]] Coq environment

* {#CoqWiki} [Cocorico](http://coq.inria.fr/cocorico), the Coq wiki

* [HoTT Coq wiki](https://github.com/HoTT/HoTT/wiki)

* [history of Coq](https://github.com/coq/coq/blob/beedccef9ddc8633c705d7c5ee2f1bbbb3ec8a47/dev/doc/README-V1-V5)

* Russell O’Connor, _[Believing In-Consistency](http://r6.ca/blog/20091101T231201Z.html)_

  (On whether the consistency of Coq is believable, given that [[ordinal analysis]] techniques are nowhere near able to handle such strong systems.)

### Learning Coq

To get an idea how to use Coq from Emacs, there are [[Andrej Bauer]]'s _Video tutorials for the Coq proof assistant_ ([web](http://math.andrej.com/2011/02/22/video-tutorials-for-the-coq-proof-assistant/)).

Yet properly learning Coq can be quite daunting, luckily the right material can help a lot:

1. [[Benjamin Pierce]]'s [Software Foundations](http://www.cis.upenn.edu/~bcpierce/sf/) is probably the most elementary introduction to Coq and functional progamming. The book is written in Coq so you can directly open the source files in CoqIDE and step through them to see what is going on and solve the exercises.

1. In a similar style, [[Andrej Bauer]] and [[Peter LeFanu Lumsdaine]] wrote a nice [Coq tutorial](https://github.com/andrejbauer/Homotopy/tree/master/OberwolfachTutorial) ([pdf](https://github.com/andrejbauer/Homotopy/blob/master/OberwolfachTutorial/univalence.pdf)) on [homotopy type theory](#HomotopyTypeTheory). See also _[[Oberwolfach HoTT-Coq tutorial]]_.

1. [[Adam Chlipala]]'s trimmed down version of [Certified Programming with Dependent Types](http://adam.chlipala.net/papers/CpdtJFR/) explains more advanced Coq techniques.

### Applications to formal mathematics

*  {#MahboubiTassi21} Assia Mahboubi, Enrico Tassi, *Mathematical Components* (2021) [[doi:10.5281/zenodo.3999478](https://doi.org/10.5281/zenodo.3999478)]

On [[ForMath]]:

* {#ForMath} [[Thierry Coquand]], _ForMath: Formalisation of Mathematics_ research project ([web](http://wiki.portal.chalmers.se/cse/pmwiki.php/ForMath/ForMath))

* {#MathClasses} Eelis van der Weegen, [[Bas Spitters]], Robbert Krebbers, Matthieu Sozeau, Tom Prince, [[Jelle Herold]],

  _Math Classes_, Coq Library for basic mathematical structures ([web](http://math-classes.org/))

Formalization of [[synthetic geometry|synthetic]] [[Euclidean geometry]]:

* [[Gabriel Braun]], [[Pierre Boutry]], [[Julien Narboux]], _[GeoCoq](http://geocoq.github.io/GeoCoq/)_, _[La géométrie de Tarski en Coq](http://gabrielbraun.free.fr/Geometry/Tarski/)_

Formalization of [[internal categories in homotopy type theory]]:

* [[Jason Gross]], [[Adam Chlipala]], [[David Spivak]], _Experience Implementing a Performant Category-Theory Library in Coq_ ([arXiv:1401.7694](http://arxiv.org/abs/1401.7694))

category: software

[[!redirects coq]]


CoqQ

+-- {: .rightHandSide}
+-- {: .toc .clickDown tabindex="0"}
### Context
#### Computation
+-- {: .hide}
[[!include constructivism - contents]]
=--
#### Quantum systems
+--{: .hide}
[[!include quantum systems -- contents]]
=--
#### Type theory
+-- {: .hide}
[[!include type theory - contents]]
=--
=--
=--

#Contents#
* table of contents
{:toc}

## Idea

* [github.com/coq-quantum/CoqQ](https://github.com/coq-quantum/CoqQ)

*CoqQ* [[Zhou et al. (2022)](#ZhouEtAl22)] is the name of a [[domain specific programming language|domain specific]] [[quantum programming language]] which is [[domain specific embedded programming language|embedded]] in the (classical) [[proof assistant]] *[[Coq]]* and used for studying [[software verification]] of quantum programs (such as [[quantum circuits]] but also more generally).

CoqQ uses an analytic formalization of ([[finite dimensional vector space|finite dimensional]]) [[Hilbert spaces]] (from [Mahboubi & Tassi (2021)](Coq#MahboubiTassi21)) in order to formalize [[quantum gates]] as actual [[linear maps]] between these.

## Related languages

* [[Quipper]]

* [[QWIRE]]

* [[quantum programming language]]

## References

* {#ZhouEtAl22} [[Li Zhou]], [[Gilles Barthe]], Pierre-Yves Strub, Junyi Liu, [[Mingsheng Ying]], *CoqQ: Foundational Verification of Quantum Programs* [[arXiv:2207.11350](https://arxiv.org/abs/2207.11350)]


Coquand universe

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

\tableofcontents

## Idea

In [[dependent type theory]], **Coquand universes** or **universes à la Coquand** are an alternative to [[Russell universes]] and [[Tarski universes]] in presenting [[types]] and the hierarchy of [[type universes]]. Unlike type theories with Russell universes, which usually have either no separate type judgment, like that found in the *[[HoTT book]]*, or one type judgment, or type theories with Tarski universe, which are required to have one type judgment, type theories with Coquand universes have a type judgment for every universe in the type theory.

## Formal definition

### With a type judgment for each universe

One formal definition of a type theory with Coquand universes is as follows:

The type theory has [[judgments]]

* $\Gamma \; \mathrm{ctx}$, that $\Gamma$ is a [[context]]

* $i \; \mathrm{level}$, that $i$ is a universe level,

* $\phi \; \mathrm{prop}$, that $\phi$ is a [[proposition]],

* $\phi \; \mathrm{true}$, that $\phi$ is a [[true]] proposition,

and consists of the formal [[signature (in logic)|signature]] and [[inference rules]] of [[first-order theory|first-order]] [[Heyting arithmetic]] or [[Peano arithmetic]]. These rules ensure that there are an [[infinite]] number of indices, which are strictly ordered with [[strict total order]] $\lt$ and upwardly unbounded, where $i \lt s(i)$ is true for all indices $i$.

This allows us to add an infinite number of [[type]] [[judgments]], one type judgment $A \; \mathrm{type}_i$ for every level $i$, indicating that $A$ is a type with level $i$, as well as [[term]] judgments $a:A$. Then, one has the following [[inference rules]] for Coquand universes:

$$\frac{\Gamma \vdash i \; \mathrm{level}}{\Gamma \vdash U_i \; \mathrm{type}_{s(i)}} \quad \frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A \; \mathrm{type}_i}{\Gamma \vdash \mathrm{Lift}_i(A) \; \mathrm{type}_{s(i)}}$$

$$\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A \; \mathrm{type}_i}{\Gamma \vdash \mathrm{Code}(A):U_i} \qquad \frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash B:U_i}{\Gamma \vdash \mathrm{El}(B) \; \mathrm{type}_i}$$

$$\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A \; \mathrm{type}_i}{\Gamma \vdash \mathrm{El}_i(\mathrm{Code}_i(A)) \equiv A \; \mathrm{type}_i} \qquad \frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash B:U_i}{\Gamma \vdash \mathrm{Code}_i(\mathrm{El}(B)) \equiv B:U_i}$$

There are also weak versions of Coquand universes, where one uses [[identifications]] and [[equivalences of types]] instead of [[judgmental equality]]:

$$\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A \; \mathrm{type}_i}{\Gamma \vdash \beta_{U_i}^A:\mathrm{El}_i(\mathrm{Code}_i(A)) \simeq A} \qquad \frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash B:U_i}{\Gamma \vdash \eta_{U_i}(B):\mathrm{Code}_i(\mathrm{El}(B)) =_{U_i} B}$$

The [[univalence axiom]] for Coquand universes states that for all $A:U_i$ and $B:U_i$, [[type transport|transport]] across $\mathrm{Lift}_i(\mathrm{El}_i(-))$ is an [[equivalence of types]]

$$\frac{\Gamma \vdash i \; \mathrm{level} \quad \Gamma \vdash A:U_i \quad \Gamma \vdash B:U_i}{\Gamma \vdash \mathrm{ua}_{U_i}(A, B):\mathrm{isEquiv}(\mathrm{transport}_{x:U_i.\mathrm{Lift}_i(\mathrm{El}_i(x))}(A, B))}$$

### With a single separate type judgment

It is also possible to define the hierarchy of Coquand universes with a single separate type judgment, such that every single type is in a Coquand universe. The advantage of doing so is that one doesn't need to define the theory of universe levels before defining the type theory; one could instead simply define the natural numbers inside of the type theory itself, along with the hierarchy of Coquand universes:

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathbb{N} \; \mathrm{type}} \qquad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{Level}(A):\mathbb{N}}$$

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma, n:\mathbb{N} \vdash U(n) \; \mathrm{type}} \qquad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{Code}(n)(A):U(\mathrm{Level}(A))}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n)}{\Gamma \vdash \mathrm{El}(n, A) \; \mathrm{type}} \quad \frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n)}{\Gamma \vdash \mathrm{Level}(\mathrm{El}(n, A)) \equiv n:\mathbb{N}}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n)}{\Gamma \vdash \mathrm{Code}(n)(\mathrm{El}(n, A)) \equiv A:U(n)}$$

$$\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{El}(n, \mathrm{Code}(n)(A)) \equiv A \; \mathrm{type}} \quad \frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{Level}(\mathrm{El}(n, \mathrm{Code}(n)(A))) \equiv \mathrm{Level}(A):\mathbb{N}}$$

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash 0:\mathbb{N}} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{Level}(\mathbb{N}) \equiv 0:\mathbb{N}}$$

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma, n:\mathbb{N} \vdash s(n):\mathbb{N}} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma, n:\mathbb{N} \vdash \mathrm{Level}(U(n)) \equiv s(n):\mathbb{N}}$$

In particular, every type $A$ has a universe level, which is a natural number, and the universe level of $\mathbb{N}$ is zero and the universe level of $U(n)$ given natural number $n$ is the successor $s(n)$.

Furthermore, every type $A$ of level $n$ lifts to another type $\mathrm{Lift}(A)$ of level $s(n)$, such that $\mathrm{El}(s(n), \mathrm{Lift}(A))$ is a [[negative copy]] of $\mathrm{El}(n, A)$:

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n)}{\Gamma \vdash \mathrm{Lift}(A):U(s(n))}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n)}{\Gamma, x:\mathrm{El}(n, A) \vdash \mathrm{LiftEl}(A)(x):\mathrm{El}(s(n), \mathrm{Lift}(A))}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n)}{\Gamma, y:\mathrm{El}(s(n), \mathrm{Lift}(A)) \vdash \mathrm{LiftEl}(A)^{-1}(y):\mathrm{El}(n, A)}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n)}{\Gamma, x:\mathrm{El}(n, A) \vdash \mathrm{LiftEl}(A)^{-1}(\mathrm{LiftEl}(A)(x)) \equiv x:\mathrm{El}(n, A)}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n)}{\Gamma, y:\mathrm{El}(s(n), \mathrm{Lift}(A)) \vdash \mathrm{LiftEl}(A)(\mathrm{LiftEl}(A)^{-1}(y)) \equiv y:\mathrm{El}(s(n), \mathrm{Lift}(A))}$$

Next are the rules for [[function types]], which are necessary to define [[type families]] as elements of a type for [[dependent product types]] and the induction principle of the [[natural numbers type]]. Here, [[function types]] are indexed by the universe level $n$, since the function type indexed by $n$ are only definable for $U(n)$-small types, aka types with level $n$.

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:U(n)}{\Gamma \vdash A \to_{n} B:U(n)}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:U(n) \quad \Gamma, x:\mathrm{El}(n, A) \vdash b(x):\mathrm{El}(n, B)}{\Gamma \vdash \lambda x:A.b(x):\mathrm{El}(n, A \to_{n} B)}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:U(n) \quad \Gamma \vdash b:\mathrm{El}(n, A \to_{n} B)}{\Gamma, x:\mathrm{El}(n, A) \vdash b(x):\mathrm{El}(n, B)}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:U(n) \quad \Gamma, x:\mathrm{El}(n, A) \vdash b(x):\mathrm{El}(n, B)}{\Gamma, x:\mathrm{El}(n, A) \vdash (\lambda x:A.b(x))(x) \equiv b(x):\mathrm{El}(n, B)}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:U(n) \quad \Gamma \vdash b:\mathrm{El}(n, A \to_{n} B)}{\Gamma \vdash \lambda x:A.b(x) \equiv b:\mathrm{El}(n, A \to_{n} B)}$$

Similarly, the rules for dependent function types are as follows:

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:\mathrm{El}(s(n), \mathrm{Lift}(A)) \to_{s(n)} U(n)}{\Gamma \vdash \Pi(n, A, B):U(n)}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:\mathrm{El}(s(n), \mathrm{Lift}(A)) \to_{s(n)} U(n) \quad \Gamma, x:\mathrm{El}(n, A) \vdash b(x):\mathrm{El}(n, B(\mathrm{LiftEl}(A)(x)))}{\Gamma \vdash \lambda x:A.b(x):\mathrm{El}(n, \Pi(n, A, B))}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:\mathrm{El}(s(n), \mathrm{Lift}(A)) \to_{s(n)} U(n) \quad \Gamma \vdash b:\mathrm{El}(n, \Pi(n, A, B))}{\Gamma, x:\mathrm{El}(n, A) \vdash b(x):\mathrm{El}(n, B(\mathrm{LiftEl}(A)(x)))}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:\mathrm{El}(s(n), \mathrm{Lift}(A)) \to_{s(n)} U(n) \quad \Gamma, x:\mathrm{El}(n, A) \vdash b(x):\mathrm{El}(n, B(\mathrm{LiftEl}(A)(x)))}{\Gamma, x:\mathrm{El}(n, A) \vdash (\lambda x:A.b(x))(x) \equiv b(x):\mathrm{El}(n, B(\mathrm{LiftEl}(A)(x)))}$$

$$\frac{\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash A:U(n) \quad \Gamma \vdash B:\mathrm{El}(s(n), \mathrm{Lift}(A)) \to_{s(n)} U(n) \quad \Gamma \vdash b:\mathrm{El}(n, \Pi(n, A, B))}{\Gamma \vdash \lambda x:A.b(x) \equiv b:\mathrm{El}(n, \Pi(n, A, B))}$$

Finally, we have for each universe level $n:\mathbb{N}$ a [[natural numbers type]] $\mathrm{Nat}(n)$ such that $\mathrm{Nat}(0) \equiv \mathrm{Code}(0)(\mathbb{N})$ and $\mathrm{Nat}(s(n)) \equiv \mathrm{Lift}(\mathrm{Nat}(n))$. In addition, each $\mathrm{Nat}(n)$ has element $\mathrm{zero}(n):\mathrm{El}(n, \mathrm{Nat}(n))$ and function $\mathrm{succ}(n):\mathrm{El}(n, \mathrm{Nat}(n) \to_{n} \mathrm{Nat}(n))$, defined via lifting the elements of $\mathrm{Nat}(n)$ across universe levels. Finally, each $\mathrm{Nat}(n)$ satisfies the induction principle of the [[natural numbers type]] over the universe $U(n)$.

* Formation rules for natural numbers types:

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma, n:\mathbb{N} \vdash \mathrm{Nat}(n):U(n)}$$

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{Nat}(0) \equiv \mathrm{Code}(0)(\mathbb{N}):U(0)} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma, n:\mathbb{N} \vdash \mathrm{Nat}(s(n)) \equiv \mathrm{Lift}(\mathrm{Nat}(n)):U(s(n))}$$

* Introduction rules for natural numbers types:

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma, n:\mathbb{N} \vdash \mathrm{zero}(n):\mathrm{El}(n, \mathrm{Nat}(n))} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma, n:\mathbb{N} \vdash \mathrm{succ}(n):\mathrm{El}(n, \mathrm{Nat}(n) \to_{n} \mathrm{Nat}(n))}$$

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{zero}(0) \equiv 0:\mathrm{El}(0, \mathrm{Nat}(0))} \qquad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{succ}(0) \equiv s:\mathrm{El}(0, \mathrm{Nat}(0) \to_{0} \mathrm{Nat}(0))}$$

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma, n:\mathbb{N} \vdash \mathrm{zero}(s(n)) \equiv \mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{zero}(n)):\mathrm{El}(s(n), \mathrm{Nat}(s(n)))}$$

$$\frac{\Gamma \; \mathrm{ctx}}{\Gamma, n:\mathbb{N}, m:\mathrm{Nat}(s(n)) \vdash \mathrm{succ}(s(n)) \equiv \mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{succ}(n)):\mathrm{El}(s(n), \mathrm{Nat}(s(n)) \to_{s(n)} \mathrm{Nat}(s(n)))}$$

* Elimination rules for natural numbers types:

$$\frac{
\begin{array}{c}
\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash C:\mathrm{El}(s(n), \mathrm{Lift}(\mathrm{Nat}(n)) \to_{s(n)} U(n)) \quad \Gamma \vdash c_0:\mathrm{El}(n, C(\mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{zero}(n)))) \\
\Gamma \vdash c_s:\mathrm{El}(n, \Pi\left(n, \mathrm{Nat}(n), \lambda x:\mathrm{Nat}(n).C(\mathrm{LiftEl}(\mathrm{Nat}(n))(x)) \to_{n} C(\mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{succ}(n, x)))\right)) \\
\end{array}}{\Gamma \vdash \mathrm{ind}_\mathrm{Nat}(n, C, c_0, c_s):\mathrm{El}(n, \Pi\left(n, \mathrm{Nat}(n), \lambda x:\mathrm{Nat}(n).C(\mathrm{LiftEl}(\mathrm{Nat}(n))(x))\right))}$$

* Computation rules for natural numbers types:

$$\frac{
\begin{array}{c}
\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash C:\mathrm{El}(s(n), \mathrm{Lift}(\mathrm{Nat}(n)) \to_{s(n)} U(n)) \quad \Gamma \vdash c_0:\mathrm{El}(n, C(\mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{zero}(n)))) \\
\Gamma \vdash c_s:\mathrm{El}(n, \Pi\left(n, \mathrm{Nat}(n), \lambda x:\mathrm{Nat}(n).C(\mathrm{LiftEl}(\mathrm{Nat}(n))(x)) \to_{n} C(\mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{succ}(n, x)))\right)) \\
\end{array}}{\Gamma \vdash \mathrm{ind}_\mathrm{Nat}(n, C, c_0, c_s, \mathrm{zero}(n)) \equiv c_0:\mathrm{El}(n, C(\mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{zero}(n))))}$$

$$\frac{
\begin{array}{c}
\Gamma \vdash n:\mathbb{N} \quad \Gamma \vdash C:\mathrm{El}(s(n), \mathrm{Lift}(\mathrm{Nat}(n)) \to_{s(n)} U(n)) \quad \Gamma \vdash c_0:\mathrm{El}(n, C(\mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{zero}(n)))) \\
\Gamma \vdash c_s:\mathrm{El}(n, \Pi\left(n, \mathrm{Nat}(n), \lambda x:\mathrm{Nat}(n).C(\mathrm{LiftEl}(\mathrm{Nat}(n))(x)) \to_{n} C(\mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{succ}(n, x)))\right)) \\
\end{array}}{\Gamma, x:\mathrm{Nat}(n) \vdash \mathrm{ind}_\mathrm{Nat}(n, C, c_0, c_s, \mathrm{succ}(n, x)) \equiv c_s(\mathrm{ind}_\mathrm{Nat}(n, C, c_0, c_s, x)):\mathrm{El}(n, C(\mathrm{LiftEl}(\mathrm{Nat}(n))(\mathrm{succ}(n, x))))}$$

Something similar could be done for [[Russell universes]].

## Analogues in set theory

There are analogues of Coquand universes in [[set theory]]. Instead of having a single set theory, one has a whole collection of set theories which embed into each other, with indices indicating which level the set theory lies on.

One formal definition of a set theory with Coquand universes is as follows:

The set theory has [[judgments]]

* $\Gamma \; \mathrm{ctx}$, that $\Gamma$ is a [[context]]

* $\kappa \; \mathrm{level}$, that $\kappa$ is a level of set theory,

* $\phi \; \mathrm{prop}$, that $\phi$ is a [[proposition]],

* $\phi \; \mathrm{true}$, that $\phi$ is a [[true]] proposition,

and consists of the formal [[signature (in logic)|signature]] and [[inference rules]] of [[first-order theory|first-order]] [[Heyting arithmetic]] or [[Peano arithmetic]]. These rules ensure that there are an [[infinite]] number of indices, which are strictly ordered with [[strict total order]] $\lt$ and upwardly unbounded, where $\kappa \lt \kappa^+$ is true for all indices $\kappa$.

This allows us to add an infinite number of [[set]] [[judgments]], one set judgment $A \; \mathrm{set}_\kappa$ for every level $\kappa$, indicating that $A$ is a set with level $\kappa$, as well as an infinite number of [[membership relations]] $x \in_\kappa A$, one for each set judgment $\mathrm{set}_\kappa$. Then, one has the following [[inference rules]] for Coquand universes:

$$\frac{\Gamma \vdash \kappa \; \mathrm{level}}{\Gamma \vdash V_\kappa \; \mathrm{set}_{\kappa^+}} \quad \frac{\Gamma \vdash \kappa \; \mathrm{level} \quad \Gamma \vdash A \; \mathrm{set}_\kappa}{\Gamma \vdash \mathrm{Code}_{\kappa}(A) \; \mathrm{set}_{\kappa^+}}$$

$$\frac{\Gamma \vdash \kappa \; \mathrm{level} \quad \Gamma \vdash A \; \mathrm{set}_\kappa}{\Gamma \vdash \mathrm{Code}_{\kappa}(A) \in_{\kappa^+} V_\kappa \; \mathrm{true}} \qquad \frac{\Gamma \vdash \kappa \; \mathrm{level} \quad \Gamma \vdash A \; \mathrm{set}_{\kappa^+} \quad \Gamma \vdash A \in_{\kappa^+} V_\kappa \; \mathrm{true}}{\Gamma \vdash \mathrm{El}_{\kappa}(A) \; \mathrm{set}_\kappa}$$

$$\frac{\Gamma \vdash \kappa \; \mathrm{level} \quad \Gamma \vdash A \; \mathrm{set}_\kappa}{\Gamma \vdash \mathrm{El}_{\kappa}(\mathrm{Code}_{\kappa}(A)) = A \; \mathrm{true}} \qquad \frac{\Gamma \vdash \kappa \; \mathrm{level} \quad \Gamma \vdash A \; \mathrm{set}_{\kappa^+} \quad \Gamma \vdash A \in_{\kappa^+} V_\kappa \; \mathrm{true}}{\Gamma \vdash \mathrm{Code}_{\kappa}(\mathrm{El}_{\kappa}(A)) = A \; \mathrm{true}}$$

This says that each $V_\kappa$ is a [[set]] which satisfies a [[reflection principle]].

## Related concepts

* [[type universe]]

  * [[Russell universe]]

  * [[Tarski universe]]

* [[hierarchy of universes]]

* [[reflection principle]]

## References

Universes à la Coquand are described in section 2.1 of

* [[Daniel Gratzer]], [[G. Alex Kavvos]], [[Andreas Nuyts]], [[Lars Birkedal]]: _Multimodal Dependent Type Theory_, Logical Methods in Computer Science **17** 3 (2021) lmcs:7713 [[arXiv:2011.15021](https://arxiv.org/abs/2011.15021), doi:10.46298/lmcs-17(3:11)2021]

[[!redirects Coquand universe]]
[[!redirects Coquand universes]]

[[!redirects à la Coquand]]

[[!redirects universe à la Coquand]]
[[!redirects universes à la Coquand]]

[[!redirects strict Coquand universe]]
[[!redirects strict Coquand universes]]

[[!redirects strictly à la Coquand]]

[[!redirects universe strictly à la Coquand]]
[[!redirects universes strictly à la Coquand]]

[[!redirects strict universe à la Coquand]]
[[!redirects strict universes à la Coquand]]

[[!redirects weak Coquand universe]]
[[!redirects weak Coquand universes]]

[[!redirects weakly à la Coquand]]

[[!redirects universe weakly à la Coquand]]
[[!redirects universes weakly à la Coquand]]

[[!redirects weak universe à la Coquand]]
[[!redirects weak universes à la Coquand]]


coquasitriangular bialgebra

Coquasitriangularity is dual property to [[quasitriangular bialgebra|quasitriangularity]].

A $k$-[[bialgebra]] (or, in particular, [[Hopf algebra]]) $(H, m,\eta,\Delta,\epsilon)$ is __coquasitriangular__ (or dual quasitriangular) if it is equipped with a $k$-linear map $R:H\otimes H\to k$ which is invertible in [[convolution algebra]] $Hom_k(H\otimes H,k)$ (with respect to the convolution-unit $\epsilon\otimes\epsilon$) with a convolution inverse denoted $\bar{R}$ such that the opposite multiplication $m_{H_{op}} := m\circ \tau$ is given by

$$
m_{H_{op}} = R\star m\star \bar{R}
$$

and the following two identities hold when applied on $H\otimes H\otimes H$:

$$
R(m\otimes id) = R_{13} R_{23}
$$

$$
R(id\otimes m) = R_{12} R_{23}
$$

with the subscript notation as explained in the $n$lab entry [[quasitriangular Hopf algebra]]. The main examples come from quantized function algebras (that is, roughly, dual of quantized [[enveloping algebra]]s).


Corbett Redden

* [website](https://myweb.liu.edu/~dredden/)

## Selected writings

On [[equivariant ordinary differential cohomology]]:

* [[Corbett Redden]], _Differential Borel equivariant cohomology via connections_, New York Journal of Mathematics, Volume 23 (2017) 441-487 ([nyjm:23-20](http://nyjm.albany.edu/j/2017/23-20.html), [arXiv:1602.06921](https://arxiv.org/abs/1602.06921))

* [[Corbett Redden]], _An alternate description of equivariant connections_, Differential Geometry and its Applications Volume 56, February 2018, Pages 81-94 ([doi:10.1016/j.difgeo.2017.11.003](https://doi.org/10.1016/j.difgeo.2017.11.003) [arXiv:1608.01297](https://arxiv.org/abs/1608.01297))

* [[Byungdo Park]], [[Corbett Redden]], _A classification of equivariant gerbe connections_, Communications in Contemporary MathematicsVol. 21, No. 02, 1850001 (2019) ([arXiv:1709.06003](https://arxiv.org/abs/1709.06003), [doi:10.1142/S0219199718500013](https://doi.org/10.1142/S0219199718500013))

category: people


Corbin

Corbin is a contributor.

## Pages to work on

* [[categorical combinator]], explaining Curien and Hagino
* [[Cheng morality]], maybe? The [original paper](http://eugeniacheng.com/wp-content/uploads/2017/02/cheng-morality.pdf) is important, but not sure of the name. Contrast with e.g. [[Pirsig morality]], which definitely is not as relevant.
* [[complexity class]]
* [[complexity theory]]
* [[Haskell]] really should be clarified when it comes to category theory. At least [Fast & Loose](https://www.cs.ox.ac.uk/jeremy.gibbons/publications/fast+loose.pdf) and [Hask](https://wiki.haskell.org/Hask) should be linked.
* [[Impagliazzo's five worlds]], the hidden gem of complexity theory
* [[meros]]
* [[Shutt expressiveness]] and [[Shutt abstraction]], based on [Shutt's writings about abstractive power](https://fexpr.blogspot.com/2013/12/abstractive-power.html)
* [[separation axiom|Separation axiom]] and [[topological vector space]] could have zaha-style diagrams, see [this conversation](https://nforum.ncatlab.org/discussion/13419/catabase-a-database-of-categories/) for details.
* [[timed set]], from the paper "Timed Sets, Functional Complexity, and Computability"
* [[TurCat]], maybe? This is the category where each object is a [[Turing category]] and the arrows are functors which preserve restriction structure. It's a full subcategory of [[RCat]], where each object is a [[restriction category]].


core groupoid

> This entry is about the concept in [[category theory]]. For the [[core of a ring]] see there.

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

#Contents#
* table of contents
{:toc}

## Idea

For $\mathcal{C}$ any [[category]] or, more generally, [[(n,r)-category]], its *core* is the maximal [[groupoid]] inside it, generally the maximal sub-[[(n,0)-category]], hence the maximal [[infinity-groupoid|$\infty$-groupoid]] inside it.

Since a [[functor]] out of a groupoid $\mathcal{G}$, and generally an [[(infinity,n)-functor|(n,r)-functor]] out of an [[infinity-groupoid|$\infty$-groupoid]], necessarily takes values in [[isomorphisms]] or generally in [[equivalences]], hence in the core of its [[codomain]],

$$
  Cat_{n,r}
  \big(
    \mathcal{G}
    ,\,
    \mathcal{C}
  \big)
  \;\;
  \simeq
  \;\;
  Grpd_{n}
  \big(
    \mathcal{G}
    ,\,
    core(\mathcal{C})
  \big)
  \,,
$$

the core construction is the [[right adjoint]] to the [[full subcategory|full inclusion]] of [[groupoids]] among [[categories]] (generally: [[(n,0)-categories]] among [[(n,r)-categories]]):

$$
  Grpd_n
  \underoverset
    {\underset{core}{\longleftarrow}}
    {\overset{F}{\hookrightarrow}}
    {\bot}
  Cat_{n,r}
  \,.
$$

(Incidentally, the [[forgetful functor]] $F$ from $Grp$ to $Cat$ also has a [[left adjoint]], called the *[[free groupoid]]*-construction.)

## Definition

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

For $C \in $ [[Cat]] a [[category]], its **core** $core(C) \in$ [[Grpd]]
is the [[groupoid]] which is the maximal [[subcategory|sub]]-[[groupoid]] of $C$: the [[subcategory]] consisting of all objects of $C$ but with [[morphisms]] only the [[isomorphisms]] of $C$.

This construction extends to a 1-[[functor]]

$$
  Core \colon Cat \to Grpd
  \,.
$$

=--

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

We usually think of a groupoid as a special kind of category, but we can also think of a category as a groupoid equipped with additional morphisms.  (This is possible because [[Grpd]] is a [[reflective subcategory]] of [[Cat]].)  One level [[decategorification|decategorified]], we usually think in the opposite way: a [[poset]] is a [[set]] equipped with a [[partial order]], but we can also think of a set as a special kind of poset (specifically, a [[symmetric relation|symmetric]] one).

=--

## Examples

\begin{example}
Given a [[preorder|preordered set]], regarded as a category, taking its core is the same as partitioning the set into [[equivalence classes]] of the preorder.
\end{example}

\begin{example}
The core of [[FinSet]] is known as the *[[permutation groupoid]]* or *[[symmetric groupoid]]* or similar.

A *[[combinatorial species]]* is a [[functor]] from the [[symmetric groupoid]] to [[Set]].
\end{example}

## Properties

### Universal property

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

The core-functor of def. \ref{CoreOfCategories} is [[right adjoint]] to the [[full subcategory]]-inclusion $U \colon Grpd \to Cat$ of groupoids into categories.

$$
  Grpd
  \underoverset
    {\underset{core}{\longleftarrow}}
    {\hookrightarrow}
    {\bot}
  Cat
  \,.
$$

=--

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

Given a [[category]] $C$ and a [[groupoid]] $A$, a [[functor]]

$$
 A \to C
$$

(hence a functor out of the underlying category $U(A)$ of $A$)
has to send [[isomorphisms]] to isomorphisms, hence has to send every [[morphism]] of $A$ to an [[isomorphism]] in $C$. This means that it factors through the core-inclusion

$$
  A \to Core(C) \to C
  \,.
$$

=--

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

The [[left adjoint]] to $U \colon Grpd \to Cat$ is the [[localization]] functor that universally inverts every morphism in $C$. On [[nerves]] this is [[Kan fibrant replacement]].

=--

## Variations and generalizations

### $\dagger$-Categories

The __core__ of a [[dagger category]] consists of its [[unitary morphism|unitary]] isomorphisms only.  This is why, for example, it makes sense to think of [[Hilb]] either as a category whose morphisms are linear maps bounded by $1$ or as a dagger category whose morphisms are all linear maps; either way, the core is the same (invertible linear maps of norm exactly $1$).

### Higher categories

The __core__ of an $n$-[[n-category|category]] is the $n$-[[n-groupoid|groupoid]] consisting only of [[equivalence]]s at each level; the __core__ of an $\infty$-[[infinity-category|category]] is similarly an $\infty$-[[infinity-groupoid|groupoid]]: the core of a [[quasicategory]] is the maximal [[Kan complex]] inside it.

For more on this see also at _[[category object in an (infinity,1)-category]]_.

## Related concepts

* [[free groupoid]], [[free category]]

* [[core in a 2-category]]

* [[decategorification]]

## References

* [[Pierre Gabriel]], [[Michel Zisman]], §1.5.4 of: *[[Calculus of fractions and homotopy theory]]*, Ergebnisse der Mathematik und ihrer Grenzgebiete **35**, Springer (1967) [[doi:10.1007/978-3-642-85844-4](https://link.springer.com/book/10.1007/978-3-642-85844-4), [pdf](https://web.math.rochester.edu/people/faculty/doug/otherpapers/GZ.pdf)]

Discussion in the generality of [[(infinity,n)-categories|$(\infty,n)$-categories]]:

* {#Lurie09} [[Jacob Lurie]], Around Prop. 1.1.14 in: _[[(∞,2)-Categories and the Goodwillie Calculus]]_ ([arXiv:0905.0462](http://arxiv.org/abs/0905.0462))

[[!redirects core groupoids]]

[[!redirects core]]
[[!redirects cores]]

[[!redirects underlying groupoid]]
[[!redirects underlying groupoids]]

[[!redirects maximal subgroupoid]]
[[!redirects maximal subgroupoids]]
[[!redirects maximal sub-groupoid]]
[[!redirects maximal sub-groupoids]]

[[!redirects groupoid core]]
[[!redirects groupoid cores]]


core in a 2-category

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

#Contents#
* table of contents
{:toc}

## Idea

The **[[core]]** of a [[category]] $A$ is the maximal [[subcategory]] of $A$ that is a [[groupoid]], consisting of all its [[objects]] and all [[isomorphisms]] between them.  The core is not a [[functor]] on the [[2-category]] [[Cat]], but it is a functor on the [[(2,1)-category]] $Cat_g$ of categories, functors, and [[natural isomorphisms]].  In fact, it is a [[coreflective subcategory|coreflection]] of $Cat_g$ into [[Gpd]].

In general, for any [[2-category]] $K$ we write $K_g$ for its "homwise core:" the sub-2-category determined by all the objects and morphisms but only the iso [[2-morphisms]].  Of course, $K_g$ is a [[(2,1)-category]].  Then $gpd(K)$ is a full [[sub-2-category]] of $K_g$, and we can ask whether it is coreflective.  In a [[regular 2-category]], however, it turns out that there is a stronger and more useful notion which implies this coreflectivity.

## Definition

### Core

+--{: .num_defn}
###### Definition
A **core** of an object $A$ in a [[regular 2-category]] is a [[morphism]] $J\to A$ which is [[eso morphism|eso]], [[pseudomonic functor|pseudomonic]], and where $J$ is groupoidal.

=--

### Enough groupoids

We say that a regular 2-category has **enough groupoids** if every object admits an eso from a groupoidal one.  Thus, a (2,1)-exact 2-category has cores if and only if it has enough groupoids.

Likewise, we say that a regular 2-category has **enough discretes** if every object admits an eso from a discrete one.  Clearly this is a stronger condition.  Note, though, that if $K$ has enough groupoids, then $pos(K)$ has enough discretes, since the core of any posetal object is discrete.

Having enough discretes, or at least enough groupoids, is a very familiar aspect of 2-categories such as $Cat$.  It also turns out to make the [[2-internal logic|internal logic]] noticeably easier to work with.  However, in a sense none of the really "new" 2-categories have enough groupoids or discretes.

* The 2-exact 2-categories having enough discretes are precisely the categories of internal categories and anafunctors in 1-exact 1-categories; see [[exact completion of a 2-category]].  Likewise, any 2-exact 2-categories having enough groupoids consists of certain internal categories in a (2,1)-category.

* Basically the only [[Grothendieck 2-toposes]] having enough discretes are the 2-categories of stacks on [[2-site|1-sites]], and the only ones having enough groupoids are the 2-categories of stacks on (2,1)-sites.  The "honestly 2-dimensional" case of stacks on 2-sites (almost?) never have enough of either.

## Properties

### General

+--{: .num_lemma}
###### Lemma
In a regular 2-category $K$, any core $J\to A$ is a coreflection of
$A$ from $K_g$ into $gpd(K)$.
=--
+--{: .proof}
###### Proof

We must show that for any groupoidal $G$, the functor
$$gpd(K)(G,J)=K_g(G,J)\to K_g(G,A)$$
is an equivalence.  Since $J\to A$ is pseudomonic in $K$, it is ff in $K_g$, so this functor is full and faithful; thus it remains to show it is eso.  Given any map $G\to A$, take the pullback
$$\array{P & \to & J\\ \downarrow && \downarrow \\ G & \to & A}$$
and let $P_1\;\rightrightarrows\; P$ be the kernel of $P\to G$.  Since the composite $P\to A$ descends to $G$, it comes equipped with an action by this kernel.  However, since $G$ is groupoidal, $P_1\;\rightrightarrows\; P$ is a [[n-congruence|(2,1)-congruence]], so the 2-cell defining the action must be an isomorphism.  Therefore, it must factor uniquely through the pseudomonic $J\to A$, so $P\to J$ has an action as well; thus it descends to a map $G\to J$, as desired.

=--

In particular, cores in a regular 2-category are unique up to unique
equivalence.  We write $J(A)$ for the core of $A$, when it exists.

+--{: .num_lemma}
###### Lemma
An object $A$ of a (2,1)-exact 2-category has a core if and only if
there is an eso $C\to A$ where $C$ is groupoidal.
=--

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

"Only if" is clear, so suppose that $p:C\to A$ is eso and $C$ is groupoidal.  Let $C_1 = C\times_A C$ be the pullback.  Then $C_1$ is also groupoidal and is a (2,1)-congruence on $C$, so by exactness it is the kernel of some eso $q:C\to J$.  There is an evident induced map $m:J\to A$; we claim that this is a core of $A$.

Evidently $m:J\to A$ is eso, since the eso $C\to A$ factors through it.  And since $C_1$ is a (2,1)-congruence, the classification of [[n-congruence|congruences]] implies that $J$ is groupoidal; thus it remains to show that $m$ is pseudomonic.

First suppose given $f,g: X\;\rightrightarrows\; J$.  Pulling back $q$ along $f$ and $g$ gives esos $P_1\to X$ and $P_2\to X$, whose pullback $P = P_1\times_X P_2$ comes with an eso $r:P \to T$ and two morphisms $h,k:P \to C$ with $q h \cong f r$ and $q k \cong g r$.  Then any pair of 2-cells $\alpha,\beta: f\to g$ induce maps $P\;\rightrightarrows\; C_1$, since $C_1$ is the kernel $(q/q)$.  But if $m\alpha = m\beta$, then these two maps must be equal, since $C_1$ is also the kernel $(p/p)$.  Therefore, $\alpha r=\beta r$, and since $r$ is eso, $\alpha=\beta$; thus $m$ is faithful.

On the other hand, again given $f,g: X\;\rightrightarrows\; J$, any isomorphism $\alpha: m f\cong m g$ induces a map $P\to C_1$ and therefore a 2-cell $\beta: f r\to g r$ with $m\beta = \alpha r$.  To show that $\beta$ descends to a 2-cell $f\to g$, we must verify that it is an action 2-cell for the actions of $P\;\rightrightarrows\; J$ on $f r$ and $g r$.  But $m\beta$ is an action 2-cell, since $m\beta = \alpha r$, and we now know that $m$ is faithful, so it reflects the axiom for an action 2-cell.  Therefore, $m$ is full-on-isomorphisms, and hence pseudomonic.
=--

### Subobjects

We also remark that cores, when they exist, "capture all the information about [[subobjects]]."

+--{: .num_prop}
###### Proposition
If $K$ is a regular 2-category and $A$ is an object having a core $j:J\to A$, then $j^*:Sub(A)\to Sub(J)$ is an equivalence.
=--
+--{: .proof}
###### Proof
It is a general fact in a regular 2-category that for any eso $f:X\to Y$, $f^*:Sub(Y)\to Sub(X)$ is full (and faithful, which of course is automatic for a functor between posets).  For if $f^*U \le f^*V$, then we have a square
$$\array{f^*U & \to & f^*V & \to & V\\
  \downarrow &&&& \downarrow\\
  U & & \to & & Y}$$
in which $f^*U \to U$ is eso and $V\to Y$ is ff, hence we have $U\to V$ over $Y$.

Thus, in our case, $j^*$ is full and faithful since $j$ is eso, so it suffices to show that for any ff $U\to J$ we have $j^* \exists_j U \le U$ in $Sub(J)$.  But we have a commutative square
$$\array{U & \to & \exists_j U\\
  \downarrow && \downarrow\\
  J & \to & X}$$
where the vertical arrows are ff and the bottom arrow $J\to X$ is faithful and pseudomonic, from which it follows that $U\to \exists_j U$ is also faithful and pseudomonic.  Since $U\to \exists_j U$  is eso by definition, $U$ is a core of $\exists_j U$, and since $j^*\exists_j U$ is a groupoid mapping to $\exists_j U$, it factors through $U$, as desired.
=--

## Related concepts

* [[core]]

* [[decategorification]]

## References

The material on this page is taken from

* [[Mike Shulman]], _[[michaelshulman:core]]_

[[!redirects cores in a 2-category]]