bimodule

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

#Contents#
* table of contents
{:toc}

## Idea

A _bimodule_ is a [[module]] in two compatible ways over two [[rings]].

## Definition

### Over a ring

#### With a left action and a right action

Given two [[rings]] $R$ and $S$, a $R$-$S$-bimodule is an [[abelian group]] $B$ with a [[bilinear function|bilinear]] [[left action|left $R$-action]] $\alpha_R:R \times B \to B$ and a bilinear [[right action|right $S$-action]] $\alpha_S:B \times S \to B$ such that for all $r \in R$, $b \in B$, and $s \in S$, $\alpha_R(r, \alpha_S(b, s)) = \alpha_S(\alpha_R(r, b), s)$.

#### With a biaction

Equivalently, given two [[rings]] $R$ and $S$, a $R$-$S$-bimodule is an [[abelian group]] $B$ with a [[multilinear function|trilinear]] [[biaction|$R$-$S$-biaction]], a function $(-)(-)(-):R \times B \times S \to B$ such that

* for all $b \in B$, $1_R b 1_S = b$

* for all $b \in B$, $r_1 \in R$, $r_2 \in R$, $s_1 \in S$, $s_2 \in S$, $r_1 (r_2 b s_1) s_2 = (r_1 \cdot_R r_2) b (s_1 \cdot_S s_2)$

* for all $r_1 \in R$, $r_2 \in R$, $b \in B$, $s \in S$, $(r_1 + r_2) b s = r_1 b s + r_2 b s$

* for all $r \in R$, $b_1 \in B$, $b_2 \in B$, $s \in S$, $r (b_1 + b_2) s = r b_1 s + r b_2 s$

* for all $r \in R$, $b \in B$, $s_1 \in S$, $s_2 \in S$, $r b (s_1 + s_2) = r b s_1 + r b s_2$

representing simultaneous left multiplication by scalars $r \in R$ and right multiplication by scalars $s \in S$.

### Over a monoid in a monoidal category

We can define in more generality what is a $(A,B)$-bimodule in a monoidal category $(\mathcal{C},\otimes,I)$ where $(A,\nabla^{A},\eta^{A})$ and $(B,\nabla^{B},\eta^{B})$ are two monoids. It is given by:

* An object $X \in \mathcal{C}$
* A left-action $l:A \otimes X \rightarrow X$
* A right-action $r:X \otimes B \rightarrow X$

such that:

* $(X,l)$ is a [[module over a monoid| left module]]
* $(X,r)$ is a [[module over a monoid| right module]]

and moreover this diagram commutes:
\begin{tikzcd}
A \otimes X \otimes B \arrow[d, "l \otimes B"'] \arrow[rr, "A \otimes r"] &  & A \otimes X \arrow[d, "l"] \\
X \otimes B \arrow[rr, "r"']                                              &  & X
\end{tikzcd}

## Properties

### Biactions, left actions, and right actions

Let $R$ and $S$ be [[ring]]s, and let $B$ be a $R$-$S$-bimodule.

Given a left $R$-action $\alpha_R$ and a right $S$-action $\alpha_S$ of a $R$-$S$-bimodule, the biaction $(-)(-)(-):R \times B \times S \to B$ is defined as

$$r b s \coloneqq \alpha_R(r, \alpha_S(b, s)) = \alpha_S(\alpha_R(r, b), s)$$

The biaction is trilinear because the left $R$-action and right $S$-action are bilinear.

On the other hand, given an $R$-$S$-biaction $\alpha$ of a $R$-$S$-bimodule, the [[left action|left $R$-action]] is defined from the $R$-$S$-biaction as

$$\alpha_R(r, b) \coloneqq r b 1_S$$

for all $r \in R$ and $b \in B$. It is a left action because

$$\alpha_R(1_R, b) = 1_R b 1_S = m$$

$$\alpha_R(r_1, \alpha_L(r_2, b)) = r_1 (r_2 b 1_S) 1_S = (r_1 \cdot_R r_2) b (1_S \cdot_S 1_S) = (r_1 \cdot_R r_2) b 1_S = \alpha_R(r_1 \cdot_R r_2, b)$$

The [[right action|right $S$-action]] is defined from the $R$-$S$-biaction as

$$\alpha_S(b, s) \coloneqq 1_R b s$$

for all $s \in S$ and $b \in B$. It is a right action because

$$\alpha_S(b, 1_S) = 1_R b 1_S = m$$

$$\alpha_S(\alpha_S(b, s_1), s_2) = 1_R (1_R, b, s_1) s_2 = (1_R \cdot_R 1_R) b (s_1 \cdot_S s_2) = 1_S b (s_1 \cdot_S s_2) = \alpha_S(b, s_1 \cdot_S s_2)$$

The left $R$-action and right $S$-action satisfy the following identity:

* for all $b \in B$, $r \in R$ and $s \in S$, $\alpha_R(r, \alpha_S(b, s)) = \alpha_S(\alpha_R(r, b), s)$.

This is because when expanded out, the identity becomes:

$$\alpha(r, \alpha(1_R, b, s), 1_S) = \alpha(1_R, \alpha(r, b, 1_S), s)$$

$$(r \cdot_R 1_R) b (s \cdot_S 1_S) = (1_R \cdot_R r) b (1_S \cdot_S s)$$

$$r b s = r b s$$

The left $R$-action and right $S$-action are bilinear because the original biaction is trilinear.

### Linear maps

Let $R$ and $S$ be [[rings]]. A **$R$-$S$-linear map** or **$R$-$S$-bimodule homomorphism** between two $R$-$S$-bimodules $A$ and $B$ is an abelian group [[homomorphism]] $f:A \to B$ such that for all $a \in A$, $r \in R$, and $s \in S$,

$$f(r a s) = r f(a) s$$

A $R$-$S$-linear map $f:A \to B$ is [[monic]] or an **$R$-$S$-bimodule monomorphism** if for every other $R$-$S$-bimodule $C$ and $R$-$S$-linear maps $h:C \to A$ and $k:C \to A$, $f \circ h = f \circ k$ implies that $h = k$.

A **sub-$R$-$S$-bimodule** of a $R$-$S$-bimodule $B$ is a $R$-$S$-bimodule $A$ with a [[monic]] linear map $i:A \hookrightarrow B$.

A $R$-$S$-linear map $f:A \to B$ is [[invertible]] or an **$R$-$S$-bimodule isomorphism** if there exists a $R$-$S$-linear map $g:B \to A$ such that $g \circ f = id_A$ and $f \circ g = id_B$, where $id_A$ and $id_B$ are the identity linear maps on $A$ and $B$ respectively.

### Tensor product of bimodules

Given [[rings]] $R, S, T$ and an $R$-$S$ bimodule $A$ and an $S$-$T$ bimodule $B$, the tensor product of $A$ and $B$ is formed as a [[quotient]] $A \otimes_N B$ of the [[tensor product of abelian groups]] $A\otimes B$. This is a special case of a more general construction:

Given three monoids $M,N,P$ in a monoidal category $(\mathcal{C},\otimes,I)$, a $M$-$N$-bimodules $A$ and a $N$-$P$-bimodule $B$, we denote the monoid actions as $\lambda^{A}:M \otimes A \rightarrow A$, $\rho^{A}:A \otimes N \rightarrow N$, $\lambda^{B}:N \otimes B \rightarrow N$ and $\rho^{B}:B \otimes P \rightarrow P$. The tensor product, $A \otimes_{N} B$ is defined as this coequalizer:

\begin{tikzcd}
A \otimes N \otimes B \arrow[rr, "\rho^{A} \otimes B", shift left] \arrow[rr, "A \otimes \lambda^{B}"', shift right] &  & A \otimes B \arrow[r, "\pi_{A,B}"] & A \otimes_{N} B
\end{tikzcd}

We suppose moreover that this coequalizer is preserved by tensoring on the left by $M$ and tensoring on the right by $P$, meaning that these diagrams are coequalizer diagrams:
\begin{tikzcd}
M \otimes A \otimes N \otimes B \arrow[rr, "M \otimes \rho^{A} \otimes B", shift left] \arrow[rr, "M \otimes A \otimes \lambda^{B}"', shift right] &  & M \otimes A \otimes B \arrow[rr, "{M \otimes \pi_{A,B}}"] &  & M \otimes A \otimes_{N} B
\end{tikzcd}
\begin{tikzcd}
A \otimes N \otimes B \otimes P \arrow[rr, "\rho^{A} \otimes B \otimes P", shift left] \arrow[rr, "A \otimes \lambda^{B} \otimes P"', shift right] &  & A \otimes B \otimes P \arrow[rr, "{\pi_{A,B} \otimes P}"] &  & A \otimes_{N} B \otimes P
\end{tikzcd}
$A \otimes B$ becomes a $M$-$P$-bimodule with left action defined by the following diagram:
\begin{tikzcd}
M \otimes A \otimes N \otimes B \arrow[rr, "M \otimes \rho^{A} \otimes B", shift left] \arrow[rr, "M \otimes A \otimes \lambda^{B}"', shift right] \arrow[d, "\lambda^{A} \otimes N \otimes B"'] &  & M \otimes A \otimes B \arrow[rr, "{M \otimes \pi_{A,B}}"] \arrow[d, "\lambda^{A} \otimes B"'] &  & M \otimes A \otimes_{N} B \arrow[d, "\lambda^{A \otimes_{N}B}", dashed] \\
A \otimes N \otimes B \arrow[rr, "\rho^{A} \otimes B", shift left] \arrow[rr, "A \otimes \lambda^{B}"', shift right]                                                                             &  & A \otimes B \arrow[rr, "{\pi_{A,B}}"']                                                        &  & A \otimes_{N} B
\end{tikzcd}
and right action defined by the following diagram:

\begin{tikzcd}
A \otimes N \otimes B \otimes P \arrow[rr, "\rho^{A} \otimes B \otimes P", shift left] \arrow[rr, "A \otimes \lambda^{B} \otimes P"', shift right] \arrow[d, "A \otimes N \otimes \rho^{B}"'] &  & A \otimes B \otimes P \arrow[rr, "{\pi_{A,B} \otimes P}"] \arrow[d, "A \otimes \rho^{B}"'] &  & A \otimes_{N} B \otimes P \arrow[d, "\rho^{A \otimes_{N}B}", dashed] \\
A \otimes N \otimes B \arrow[rr, "\rho^{A} \otimes B", shift left] \arrow[rr, "A \otimes \lambda^{B}"', shift right]                                                                          &  & A \otimes B \arrow[rr, "{\pi_{A,B}}"']                                                     &  & A \otimes_{N} B
\end{tikzcd}

Assuming all requisite [[reflexive coequalizer|(reflective) coequalizers]] exist, universal property arguments guarantee associativity isomorphisms of type

$$(A \otimes_N B) \otimes_P C \to A \otimes_N (B \otimes_P C).$$

In fact, this tensor product defines composition in a [[bicategory]] where objects or 0-cells are monoids in a monoidal category, where 1-cells $A$ from $R$ to $S$ are $R$-$S$ bimodules, and where 2-cells from $A$ to $B$ are morphisms of $R$-$S$ bimodules.

This in turn can be seen as a special case of a bicategory of [[profunctors]] [[enriched category|enriched]] in a [[monoidal category]] with suitably nice cocompleteness properties -- see [[monoidally cocomplete category]] and [[Benabou cosmos]].

### Two-sided ideals of a ring

Every ring $R$ is a $R$-$R$-bimodule, with the [[biaction]] $(-)(-)(-):R \times R \times R \to R$ defined by the ternary product $a b c \coloneqq a \cdot b \cdot c$ for elements $a \in R$, $b \in R$, $c \in R$.

Given a ring $R$, a **[[two-sided ideal]]** of $R$ is a sub-$R$-$R$-bimodule of $R$.

### Rings over a ring

Let $R$ be a [[ring]]. An **$R$-ring** $S$ is a $R$-$R$-bimodule with a [[bilinear function]] $(-)\cdot(-):S \times S \to S$ and an element $1 \in S$ such that $(S, \cdot, 1)$ forms a [[monoid]].

## Categories of bimodules

### The 1-category of bimodules and intertwiners

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

Write $BMod$ for the [[category]] whose

* [[objects]] are triples $(R,S,B)$ where $R$ and $S$ are [[rings]] and where $B$ is an $R$-$S$-bimodule;

* [[morphisms]] are triples $(f,g, \phi)$ consisting of two ring [[homomorphisms]] $f \colon R \to R'$ and $g \colon S \to S'$ and an [[intertwiner]] of $R$-$S'$-bimodules $\phi \colon B \cdot g \to f \cdot B'$. This we may depict as a

  $$
    \array{
      R &\stackrel{B}{\to}& S
      \\
      {}^{\mathllap{f}}\downarrow &\Downarrow_{\phi}& \downarrow^{\mathrlap{g}}
      \\
      R' &\stackrel{B'}{\to}& S'
    }
    \,.
  $$

=--

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

As this notation suggests, $BMod$ is naturally the vertical category of a [[pseudo double category]] whose horizontal composition is given by tensor product of bimodules.

=--

### The 2-category of rings, bimodules, and intertwiners
 {#AsMorphismsInA2Category}

Consider bimodules over [[rings]].

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

There is a [[2-category]] whose

* [[objects]] are [[rings]];

* [[1-morphisms]] are bimodules;

* [[2-morphisms]] are [[intertwiners]].

The [[composition]] of 1-morphisms is given by the [[tensor product of modules]] over the middle algebra.

=--

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

There is a [[2-functor]] from the above 2-category of rings and bimodules to [[Cat]] which

* sends an ring $R$ to its [[category of modules]] $Mod_R$;

* sends a $R$-$S$-bimodule $B$ to the [[tensor product]] [[functor]]

  $$
    (-)\otimes_{R} B
    \;\colon\;
    Mod_{R} \to Mod_{S}
  $$

* sends an [[intertwiner]] to the evident [[natural transformation]] of the above functors.

=--

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

This construction has as its image precisely the [[colimit]]-preserving [[functors]] between [[categories of modules]].

=--

This is the [[Eilenberg-Watts theorem]].

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

In the context of [[higher category theory]]/[[higher algebra]] one may interpret this as says that the [[2-category]] of those [[2-modules]] over the given ring which are equivalent to a [[category of modules]] is that of rings, bimodules and intertwiners. See also at _[[2-ring]]_.

=--

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

The 2-category of rings and bimodules is an archtypical example for a [[2-category with proarrow equipment]], hence for a [[pseudo double category]] with niche-fillers. Or in the language of [[internal (infinity,1)-category]]-theory: it naturally induces the structure of a [[simplicial object]] in the [[(2,1)-category]] $Cat$

$$
  \left(
    \cdots
    \stackrel{\to}{\stackrel{\to}{\to}}
    X_1
      \stackrel{\overset{\partial_1}{\to}}{\underset{\partial_0}{\to}}
    X_0
  \right)
  \in
  Cat^{\Delta^{op}}
$$

which satisfies the [[Segal conditions]]. Here

$$
  X_0 =  Ring
$$

is the category of [[rings]] and [[homomorphisms]] between them, while

$$
  X_1 = BMod
$$

is the category of def. \ref{1CategoryOfBimodulesAndIntertwiners}, whose objects are pairs consisting of two rings $A$ and $B$ and an $A$-$B$ bimodule $N$ between them, and whose morphisms are pairs consisting of two ring homomorphisms $f \colon A \to A'$ and $g \colon B \to B'$ and an [[intertwiner]] $N \cdot (g) \to (f) \cdot N'$.

=--

### The $(\infty,2)$-category of $\infty$-algebras and $\infty$-bimodules
 {#Infinity2CategoryOfInfinityAlgebrasAndBimodules}

The above has a generalization to _[[(infinity,1)-bimodules]]_. See there for more.

## Related concepts

* [[module over a monad]]

* [[bimodule object]]

* [[quotient bimodule]]

* [[Hilbert bimodule]]

* [[Noetherian bimodule]]

* [[Artinian bimodule]]

* [[two-sided ideal]]

* [[category of two-sided ideals in a ring]]

* [[biaction]]

* [[amplimorphism]]

* [[bibundle]]

* [[(infinity,1)-bimodule]]

* [[bimodule category]]

* [[2-module]], [[2-ring]]

## References

The 2-category of bimodules in its incarnation as a [[2-category with proarrow equipment]] appears as example 2.3 in

* [[Michael Shulman]], _Framed bicategories and monoidal fibrations_ ([arXiv:0706.1286](http://arxiv.org/abs/0706.1286))

Bimodules in [[homotopy theory]]/[[higher algebra]] are discussed in section 4.3 of

* {#Lurie} [[Jacob Lurie]], _[[Higher Algebra]]_

For more on that see at _[[(∞,1)-bimodule]]_.

[[!redirects bimodules]]

[[!redirects bimodule homomorphism]]
[[!redirects bimodule homomorphisms]]
[[!redirects bimodule monomorphism]]
[[!redirects bimodule monomorphisms]]
[[!redirects bimodule isomorphism]]
[[!redirects bimodule isomorphisms]]

[[!redirects tensor product of bimodules]]
[[!redirects tensor products of bimodules]]

[[!redirects subbimodule]]
[[!redirects subbimodules]]


bimodule category

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

#Contents#
* table of contents
{:toc}

## Idea

The concept of a _bimodule category_ is a [[categorification]] of that of [[bimodule]], hence the two-sided version of the notion of a *[[module category]]*.

Where a [[bimodule]] is an [[abelian group]] [[action|acted]] on by two [[rings]], so a bimodule category is a suitable [[category]] suitably acted on by two [[monoidal categories]], hence a 2-sided _[[module category]]_.

## Related concepts

* [[Deligne tensor product of abelian categories]]

## References

* [[Justin Greenough]], *Monoidal 2-structure of Bimodule Categories*, Journal of Algebra **324** 8 (2010) 1818-1859 [[arXiv:0911.4979](https://arxiv.org/abs/0911.4979), [doi:10.1016/j.jalgebra.2010.06.018](https://doi.org/10.1016/j.jalgebra.2010.06.018)]

* {#DSPS13} [[Chris Douglas]], [[Chris Schommer-Pries]], [[Noah Snyder]], *Dualizable tensor categories*, Memoirs of the American Mathematical Society (2020) [[arXiv:1312.7188](http://arxiv.org/abs/1312.7188), [ams:memo-268-1308](https://bookstore.ams.org/memo-268-1308)]

[[!redirects bimodule categories]]


bimodule object

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

#Contents#
* table of contents
{:toc}

## Idea

The notion of [[biaction]] or [[bimodule]] makes sense [[internalization|internal]] to a [[monoidal category]] or a [[monoidal (infinity,1)-category]].

## Definition

### As a functor into a closed monoidal category

Let $V$ be a [[closed monoidal category]]. Recall that for $C$ a category [[enriched category|enriched over]] $V$, a $C$-[[module object]] in $V$ is a $V$-functor $\rho : C \to V$. We think of the objects $\rho(a)$ for $a \in Obj(C)$ as the objects on which $C$ acts, and of $\rho(C(a,b))$ as the action of $C$ on these objects.

In this language a $C$-$D$ _bimodule object_ or _biaction object_ in $V$ for $V$-enriched categories $C$ and $D$ is a $V$-functor

$$
  C^{op} \otimes D \to V
  \,.
$$

Such a functor is also called a profunctor or [[distributor]]. Bimodule objects in $V$ can be thought of as a kind of generalized hom, giving a set of morphisms (or object of $V$) between an object of $C$ and an object of $D$.

+--{.query}
Some points are in order. Strictly speaking, the construction of $C^{op}$ from a $V$-category $C$ requires that $V$ be symmetric (or at least braided) monoidal. It's possible to define $C$-$D$-bimodule objects in $V$ without recourse to $C^{op}$, but then either that should be spelled out, or one should include a symmetry. (If the former is chosen, then closedness one on side might not be the best choice of assumption, in view of the next remark; a more natural choice might be biclosed monoidal.)

Second: bimodule objects are not that much good unless you can compose them; for that one should add some cocompleteness assumptions to $V$ (with $\otimes$ cocontinuous in both arguments; biclosedness would ensure that), and consider smallness assumptions on the objects $C$, $D$, etc. ---Todd.
=--

## Examples

* Let $V = Set$ and let $C = D$.  Then the hom functor $C(-, -):C^{op} \times C \to Set$ is a bimodule.

* Let $\hat{C} = Set^{C^{op}}$; the objects of $\hat{C}$ are "generating functions" that assign to each object of $C$ a set.  Every bimodule $f:D^op \times C \to Set$ can be curried to give a Kleisli arrow $\tilde{f}:C \to \hat{D}$.  Composition of these arrows corresponds to convolution of the generating functions.

  +--{.query}
  [[Todd Trimble|Todd]]: I am not sure what is trying to be said with regard to "convolution". I know about Day convolution, but this is not the same thing.

  Also, with regard to "Kleisli arrow": I understand the intent, but one should proceed with caution since there is no global monad $C \mapsto \hat{C}$ to which Kleisli would refer. Again there are size issues that need attending to.
  =--

* Let $V = Vect$ and let $C = \mathbf{B}A_1$ and $D = \mathbf{B}A_2$ be two one-object $Vect$-enriched categories, whose endomorphism vector spaces are hence [[algebra]]s. Then a $C$-$D$-bimodule is a vector space $V$ with an action of $A_1$ on the left and and action of $A_2$ on the right.

## See also

* [[bimodule]]
* [[biaction]]
* [[Bimod]]

[[!redirects bimodule objects]]
[[!redirects biaction object]]
[[!redirects biaction objects]]


bimodule objects > history

< [[bimodule object]]


bimonoid

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

# Bimonoids
* table of contents
{: toc}

## Idea

A bimonoid is something which is both a monoid and a comonoid in a compatible way. The  compatibility is easy to formulate in symmetric monoidal categories and much harder in a nonsymmetric setup.

## Definition in symmetric monoidal categories

In a [[symmetric monoidal category]], a __bimonoid__ (or __bimonoid object__) is an object $B$ equipped with a structure of a [[monoid]] and a [[comonoid]] which are compatible in one of two equivalent ways: the comultiplication and the counit are morphisms of monoids or the multiplication and the unit are morphisms of comonoids.  The symmetry of the monoidal structure is involved in the definition of the tensor product $B\otimes B$ as monoids and as comonoids.  In terms of [[string diagrams]], the equations expressing the compatibility of the monoidal and comonoidal structures on $B$ may be represented as follows:

A bimonoid that additionally has an [[antipode]] (a map $s \colon B\to B$ satisfying an axiom that makes it act like "inverses" in a group) is called a **[[Hopf monoid]]**; a Hopf monoid in [[Vect]] is a [[Hopf algebra]].

A bimonoid that is both a [[commutative monoid]] and a [[cocommutative comonoid]] is called **bicommutative**.

## Examples

* A bimonoid in [[Vect]] (with its usual [[tensor product]]) is generally called a __[[bialgebra]]__.

* In a category with [[biproducts]], with the biproduct as the monoidal product, every object is a bimonoid in a unique way ([Café post](http://golem.ph.utexas.edu/category/2010/09/bimonoids_from_biproducts.html)).  This bimonoid is bicommutative.

* More generally, in a [[cartesian monoidal category]], every monoid object is a bimonoid in a unique way, with comultiplication being the diagonal map.    Dually, every comonoid object in a cocartesian monoidal category is a bimonoid in a unique way.

* A bimonoid is said to be **special** if comultiplication followed by multiplication is the identity.   The category [[Rel]] has biproducts so every object is a bicommutative bimonoid, but these bimonoids are also special.  The category [[FinRel]] is the free symmetric monoidal category on a special bicommutative bimonoid, namely $1$ with its diagonal as comultiplication and fold map as multiplication.

* A bimonoid is said to be **connected** if counit followed by unit is the identity. For example, the [[symmetric algebra]] is a connected bimonoid.

* One obtains the notion of **quasi-bimonoid** by omitting the associativity and coassociativity requirements.

## Monoidal structure on modules
{#MonoidalStructureOnModules}

If $B$ is a bimonoid in $\mathcal{C}$, then the category $Mod_B$ of $B$-[[modules]] inherits a [[monoidal category|monoidal structure]] such that the [[forgetful functor]] $Mod_B \to \mathcal{C}$ (the "[[fiber functor]]") is a [[strong monoidal functor]].  For $B$-modules $M$ and $N$, we equip the [[tensor product]] $M\otimes N$ in $\mathcal{C}$ with the $B$-action given by
$$
B\otimes (M\otimes N) \xrightarrow{\Delta}
(B\otimes B) \otimes (M\otimes N) \xrightarrow{\cong}
(B\otimes M) \otimes (B\otimes N) \xrightarrow{act \otimes act}
M\otimes N
$$
where $\Delta$ denotes the comultiplication of $B$ as a comonoid.  The bimonoid compatibility axioms are exactly what is needed to make this a $B$-module structure, and coassociativity makes it associative.  Similarly, we use the counit $B\to I$ of $B$ to give the unit object $I$ a $B$-module structure.

If $B$ moreover a [[Hopf monoid]], then $Mod_B$ also inherits a [[closed monoidal category|closed]] monoidal structure if $\mathcal{C}$ has one; see at _[[Hopf monoid]]_.

These relations are known as _[[Tannaka duality]]_ [for monoids/algebras](Tannaka%20duality#ForAlgebraModules), see at _[[structure on algebras and their module categories - table]]_.

## Non-symmetric variants

It is interesting how to generalize this notion in various nonsymmetric situations, for example involving [[braided monoidal category|braidings]], or more generally in [[duoidal categories]], or in relative situations over noncommutative rings (e.g. Takeuchi bialgebroids). In the completely noncommutative situation of the monoidal category of endofunctors, one can look at various compatibilities between [[monad]]s and comonads or monads and tensor products, for example involving [[mixed distributive laws]].

## Related concepts

* [[Hopf monoid]], [[Frobenius monoid]], [[graded bimonoid]]

## References

As far as compatibility with tensor product is concerned, there is a notion of a bimonad and involves a version of [[distributive law]]s, hence it is related to a lifting problem:

* [[Ieke Moerdijk]], _Monads on tensor categories_, Category theory 1999 (Coimbra), J. Pure Appl. Algebra 168 (2002), no. 2-3, 189--208 (MR2003e:18012)

* Kornél Szlachányi, _The monoidal Eilenberg–Moore construction and bialgebroids_, J. Pure Appl. Algebra 182, no. 2--3 (2003) 287--315; _Adjointable monoidal functors and quantum groupoids_, [math.QA/0301253](http://arxiv.org/abs/math/0301253)

Szlachányi uses earlier analysis of

* P. Schauenburg, _Bialgebras over noncommutative rings, and a structure theorem for Hopf bimodules_, Applied Categorical Structures __6__, 193-222 (1998) [doi](http://dx.doi.org/10.1023/A:1008608028634)

* H.E. Porst, _On categories of monoids, comonoids and bimonoids_, Quaest. Math. __31__ (2008) 127-139 [MR2010d:18010](http://www.ams.org/mathscinet-getitem?mr=2529129) [doi](http://dx.doi.org/10.2989/QM.2008.31.2.2.474)

For a dual version see

* P. Mac Crudden, Opmonoidal monads, Theory Appl. Cat., Vol. 10, 2002, No. 19, pp 469-485, [link](http://www.tac.mta.ca/tac/volumes/10/19/10-19abs.html)

There is also a more subtle notion also called Hopf monad in

* R. Wisbauer, B. Mesablishvili, Bimonads and Hopf monads on categories, [arXiv:0710.1163](http://arxiv.org/abs/0710.1163)

In some of these generalized cases, one does not have a good notion of of antipode, so that the difference between bimonoids and Hopf monoids has to be stated in different terms.  A similar case is in the case of [[Hopf algebroid]]s over a noncommutative base:

* [[Brian Day]], [[Ross Street]], _Monoidal bicategories and Hopf algebroids_, Advances in Math. __129__, 1 (1997) 99--157

* [[Gabi Böhm]], _Hopf algebroids_, (a chapter of) Handbook of algebra, [arxiv:math.RA/0805.3806](http://arxiv.org/abs/0805.3806); _An alternative notion of Hopf algebroid_; in "Hopf algebras in noncommutative geometry and physics",  31--53, Lec. Notes in Pure and Appl. Math. __239__, Dekker, New York 2005; [math.QA/0301169](http://arxiv.org/abs/math.QA/0301169)

The fact that a skeleton of [[FinRel]] is the [[PROP]] for special bicommutative bimonoids is Theorem 7.2 in Coya and Fong, based on techniques from Lack's paper on distributive laws for PROPs:

* Brandon Coya and [[Brendan Fong]], _Corelations are the prop for extraspecial commutative Frobenius monoids_, Theory and Applications of Categories, Vol. 32, 2017, No. 11, pp. 380-395.   ([arxiv](https://arxiv.org/abs/1601.02307))

* [[Steve Lack]], Composing PROPs, Theory and Applications of Categories 13(9):147–163, 2004. ([pdf](http://www.tac.mta.ca/tac/volumes/13/9/13-09.pdf))

[[!redirects bimonoid]]
[[!redirects bimonoids]]
[[!redirects bimonoid object]]
[[!redirects bimonoid objects]]


bimonoidal category > history

< [[rig category]]


bimorphism > history


Bin Zhang

* [MathematicsGenealogy page](https://www.mathgenealogy.org/id.php?id=111724)

## Selected writings

On [[twisted equivariant K-theory|twisted]] [[orbifold K-theory]]:

* [[Alejandro Adem]], [[Yongbin Ruan]], [[Bin Zhang]], _A Stringy Product on Twisted Orbifold K-theory_, Morfismos (10th Anniversary Issue), Vol. 11, No 2 (2007), 33-64.  ([arXiv:math/0605534](https://arxiv.org/abs/math/0605534), [Morfismos pdf](www.morfismos.cinvestav.mx/Portals/morfismos/SiteDocs/Articulos/Volumen11/No2/Zhang/arz.pdf))

category: people


binary cyclic group

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

#Contents#
* table of contents
{:toc}

## Idea

One calls a [[cyclic group]] of [[order of a group|order]] an [[even number]] $2(n+1)$ ($n \in \mathbb{N}$) a _binary cyclic group_ if one thinks of it as being the [[central extension]] of a cyclic group by the [[group of order 2]]:

$$
  \array{
     \mathbb{Z}/2\mathbb{Z} &\hookrightarrow& \mathbb{Z}/2(n+1)\mathbb{Z}
     \\
     && \downarrow
     \\
     && \mathbb{Z}/(n+1)\mathbb{Z}
  }
$$

This way binary cyclic groups are related to cyclic groups as the [[binary dihedral groups]] are related to the [[dihedral groups]]. Note that if $n+1$ is odd, then the extension is (necessarily) the trivial extension, and if $n+1$ is even, then this extension is the (unique) nontrivial extension.

From the point of view of the [[classification of finite rotation groups]], the cyclic groups, dihedral groups etc. are the [[finite group|finite]] [[subgroups]] of the [[special orthogonal group]] $SO(3)$, while their binary versions are those subgroups of the [[special unitary group]] $SU(2)$ that arise from the former by taking [[preimages]] under the [[double cover]]-projection $SU(2) \simeq Spin(3) \to SO(3)$.

[[!include ADE -- table]]

## References

See also

* Wikipedia, _[Binary cyclic group](https://en.wikipedia.org/wiki/Binary_cyclic_group)_

[[!redirects binary cyclic groups]]


binary digit

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

#Contents#
* table of contents
{:toc}

## Idea

A __binary digit__, or __bit__, is either $0$ or $1$.

The [[set]] of binary digits is the __[[boolean domain]]__ $\mathbb{B}$.

As a [[unit]] of [[information]], a __bit__ is the amount of information needed to specify which of the $2$ possibilities a given binary digit is.  In natural units, a bit is $ln 2$.

## Related concepts

* [[data type]]

* [[truth value]]

* [[logic gate]]

* [[qbit]], [[qdit]]

* [[computation]]

* [[Boolean algebra]]

## References

See also

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

[[!redirects binary digit]]
[[!redirects binary digits]]
[[!redirects bit]]
[[!redirects bits]]

[[!redirects Bool]]


binary function

# Contents
* table of contents
{: toc}

## Idea

A _binary function_, or _function of two variables_, is like a [[function]] but with two [[domains]].  That is, while a function $f$ from the [[set]] $A$ to the set $C$ maps an [[element]] $x$ of $A$ to a unique element $f(x)$ of $C$, a binary function from $A$ and $B$ to $C$ maps an element $x$ of $A$ and an element $y$ of $B$ to a unique element $f(x,y)$ of $C$.

We can generalise further to _multiary functions_, or _functions of several variables_.

## Definitions

The possible definitions depend on [[foundations]]; for us, the simplest is probably this:

+-- {: .num_defn}
###### Definition
A __binary function__ from $A$ and $B$ to $C$ is simply a [[function]] $f$ to $C$ from the binary [[cartesian product]] $A \times B$.  We write $f(x,y)$ for $f((x,y))$.
=--

This is natural in [[structural set theory]]; it makes sense in any [[set theory]] and (suitably interpreted) in a foundational [[type theory]].

In [[material set theory]], one often declines to specify the domain of a function (since this can be recovered from it); then we can say this:

+-- {: .num_defn}
###### Definition
A __binary function__ to $C$ is simply a [[function]] $f$ to $C$ such that every [[element]] of the [[domain]] of $f$ is an [[ordered pair]].  Again, we write $f(x,y)$ for $f((x,y))$.
=--

An equivalent (but different) definition in material set theory is this:

+-- {: .num_defn}
###### Definition
A __binary function__ to $C$ is a [[ternary relation]] $f$ such that

* given $(x,y,z) \in f$, we have $z \in C$, and
* given $(x,y,z) \in f$ and $(x,y,z') \in f$, we have $z = z'$.

Now we write $f(x,y)$ for the unique $z$ (if any) such that $(x,y,z) \in f$.
=--

Either way, the material concept is actually more general than the structural one, because the [[domain]] of a material binary function might not be a [[cartesian product]].  The link is provided by the binary version of a [[partial function]]:

+-- {: .num_defn}
###### Definition
A __partial binary function__ from $A$ and $B$ to $C$ is a function to $C$ from a [[subset]] of $A \times B$.
=--

One can also define a notion of binary function without any notion of ordered pair, as long as one has the [[function set|set of functions]] from any set to any other set.  This is called a [[currying|curried]] representation.

+-- {: .num_defn}
###### Definition
A __binary function__ from $A$ and $B$ to $C$ is a [[function]] from $A$ to the set $C^B$ of all functions from $B$ to $C$.
=--

The connection is that if $f$ is a binary function defined as having ordered pairs in its domain, the corresponding function from $A$ to $C^B$ sends $a\in A$ to the function that sends $b\in B$ to $f(a,b)\in C$.  One can give a similar comparison of material and structural versions of this definition.  In addition, this definition is usually the one used in [[type theory]].

It\'s also possible to take the concept of binary function as an undefined primitive concept, on the same level as that of [[function]].  Then we want [[axioms]] such as the following (depending on the style of [[foundations]]):

*  Given an [[element]] $x$ of the [[set]] $A$, an element $y$ of $B$, and a binary function from $A$ and $B$ to $C$, we have an element $f(x,y)$ of $C$.

*  If $x$ and $x'$ are [[equality|equal]] elements of $A$ and $y$ and $y'$ are equal elements of $B$, then $f(x,y) = f(x',y')$.

*  Given two such binary functions $f$ and $f'$, if $f(x,y) = f'(x,y)$ for every $x$ in $A$ and every $y$ in $B$, then $f = f'$.

## Internalization

The cartesian-product-based definitions make sense internal to any [[category]] with binary [[cartesian products]].  More generally, we can consider any [[monoidal category]].

Similarly, the curried definition makes sense internal to any [[closed category]].  The cartesian analogue of a closed category (not to be confused with a [[cartesian closed category]], which also has finite products) exists but is not well-known.

Finally, the undefined concept of "binary function" can be internalized to the [[binary morphisms]] in any [[multicategory]], in particular perhaps a [[cartesian multicategory]].  If a multicategory has tensor products, then its binary morphisms are representable in the ordered-pair style, while if it has hom-objects, they are representable in the curried style; but in general a multicategory may have neither.

## Special cases

A binary function to the set of [[truth values]] is a [[binary relation]].

A binary function from $A$ and $A$ to $C$ may be simply called a __binary function__ from $A$ to $C$.

A binary function $f$ from $A$ to $C$ is __symmetric__ if $f(a,b) = f(b,a)$ always.

## Related concepts

* **binary function**, [[bilinear map]], [[multilinear map]]

* [[binary morphism]], [[multimorphism]]

* [[bifunctor]], [[Quillen bifunctor]]

[[!redirects binary function]]
[[!redirects binary functions]]

[[!redirects function of two variables]]
[[!redirects functions of two variables]]
[[!redirects functions of two variables each]]

[[!redirects binary map]]
[[!redirects binary maps]]
[[!redirects binary mapping]]
[[!redirects binary mappings]]

[[!redirects symmetric binary function]]
[[!redirects symmetric binary functions]]


binary Golay code

#Contents#
*table of contents
{:toc}

## Idea

The *binary Golay code* is an [[abelian group]] which is a 12-dimensional subspace of the [[vector space]] $\mathbb{F}_2^{24}$. It is used in [[coding theory]] (as a [[binary linear code]]) and the theory of [[sporadic finite simple groups]].

## Definition

Consider the 24-element set $X = \{1,\ldots,24\}$, and the free vector space on it, identified with the [[power set]] of $X$. The the **binary Golay code** (sometimes called the _extended_ binary Golay code to distinguish it from the _perfect_ binary Golay code, which uses only 23 elements of $X$) has basis constructed as follows ...

(see [Wikipedia](http://en.wikipedia.org/wiki/Binary_Golay_code) for the time being)

The [[automorphism group]] of the binary Golay code is the [[Mathieu group]] $M_{24}$. Moreover, the other Mathieu group are obtained as [[stabiliser groups]] of various sets in the Golay code. There is a unique [[central extension]] of the binary Golay code by $\mathbb{Z}/2$ which is not a group but a [[code loop]], and can be used to construct the [[Monster group]].

## Related entries

* [[coding theory]], [[error correcting code]], [[quantum error correcting code]]

* [[linear code]], [[binary linear code]]

* [[Mathieu group]]

* [[combinatorial design]]

* [[Leech lattice]]

* [[adinkra]]


binary linear code

# Contents #
* table of contents
{: toc}

## Definitions and framework

A *bineary linear code* is a [[linear code]] over the [[prime field]] $\mathbb{F}_2$.

### Linear codes

A ($q$-ary) *[[linear code]]* of length $n$ and rank $k$ is a $k$-dimensional subspace of the $n$-dimensional [[vector space]] $\mathbb{F}_q^n$ over a [[prime field]] $\mathbb{F}_q$ with $q$ elements, or of any $n$-dimensional space over $\mathbb{F}_q$ that comes equipped with a "standard" basis. A principal application is in the construction of [[error-correcting codes]].

There is a [[species|Joyal species]] $Code_{q, k}: Core(FinSet) \to Set$ of $q$-ary linear codes of rank $k$, which assigns to a finite set $\Omega$ the set of $k$-dimensional subspaces of the free $\mathbb{F}_q$-vector space generated by $\Omega$ as basis. The corresponding [[groupoid]] of $q$-linear codes is the [[category of elements]] of $Code_{q, k}$. This gives one notion of [[isomorphism]] of linear codes, where an isomorphism $(S, V \subseteq \mathbb{F}_q S) \to (T, W \subseteq \mathbb{F}_q T)$ is a bijection $\phi: S \to T$ such that the linear map $\mathbb{F}_q \phi$ carries $V$ onto $W$. Thus, [[isomorphisms]] in this sense are given by [[permutation matrices]].

An alternative notion that recurs in coding theory is that an isomorphism (often called an _equivalence_) of codes consists of a [[monomial matrix]] which, when interpreted as a linear isomorphism using the assigned linear bases, carries $V$ onto $W$.

Each assigned basis $\{e_1, \ldots, e_n\}$ of a vector space $U$ can be construed as a self-dual basis with respect to a bilinear form, so that $\langle e_i, e_j \rangle = \delta_{i j}$. In terms of coordinates with respect to the chosen basis, this bilinear form is the usual dot product

$$(\vec{x}, \vec{y}) \mapsto x_1 y_1 + \ldots + x_n y_n$$

and this bilinear form is used to define the notion of _dual code_ (see below).

### Binary linear codes

The following is largely adapted from [Frenkel, Lepowsky, Meurman](#FLM).

A **(binary linear) code** is a $q$-ary code with $q = 2$. In this case, isomorphisms defined by permutation matrices are the same as isomorphisms defined by monomial matrices.

As a combinatorial structure on a finite set $\Omega$, a binary linear code is typically construed as a subspace of a finite power set $P(\Omega)$, considered as an $\mathbb{F}_2$-space whose addition is given by taking the symmetric difference of sets, and with standard basis given by the [[atoms]].

In that case, the standard dot product can be identified with the nondegenerate symmetric $\mathbb{F}_2$-bilinear pairing on the Boolean ring $P(\Omega)$ given by

$$ P(\Omega) \times P(\Omega) \stackrel{\langle -, - \rangle}{\to} \mathbb{F}_2$$

$$\,$$

$$(S, T) \mapsto {|S \cap T|} \pmod 2$$

where ${|C|}$ is the [[cardinality]] of a set $C$. In the sequel, we let $n = {|\Omega|} = \dim(P(\Omega))$.

To each code $\mathbf{C} \subset P(\Omega)$ there is a **dual code** $\mathbf{C}^\perp$:

$$\mathbf{C}^\perp = \{S \in P(\Omega): \forall T \in \mathbf{C} \; \langle S, T \rangle = 0\}.$$

Notice that $\dim(\mathbf{C}^\perp) = n - \dim(\mathbf{C})$. A code $\mathbf{C}$ is **self-dual** if $\mathbf{C} = \mathbf{C}^\perp$. In this case $n$ is even and $\dim(\mathbf{C}) = n/2$.

Now suppose $\Omega$ is a set with an even number $n$ of elements. The collection $E(\Omega)$ of subsets of even cardinality is a vector subspace of $P(\Omega)$ of dimension $n-1$, and we have

$$E(\Omega) = 1^\perp,$$

where $1$ is the multiplicative unit of $P(\Omega)$ (the subset $\Omega$), under the assumption $n$ is even. On $E(\Omega)$ we may define a quadratic form

$$q: E(\Omega) \to \mathbb{F}_2$$

taking $S \in E(\Omega)$ to $\frac{{|S|}}{2} \pmod 2$; this $q$ gives rise to the bilinear form $\langle -, - \rangle$ on $E(\Omega)$ via

$$\langle S, T \rangle = q(S + T) - q(S) - q(T).$$

A code $\mathbf{C} \subset P(\Omega)$ is of **type II** if

* $4$ divides ${|C|}$ for every $C \in \mathbf{C}$ and $\Omega \in \mathbf{C}$,

and of **type I** if

* $\mathbf{C} \subset E(\Omega)$ and $\Omega \in \mathbf{C}$, but $\mathbf{C}$ is not of type II.

Notice that the quadratic form (hence the bilinear form) vanishes on a type II code $\mathbf{C}$, so that we have $\mathbf{C} \subset \mathbf{C}^\perp$ (i.e., $\mathbf{C}$ is isotropic). If $\mathbf{C}$ is maximal isotropic -- has half the dimension of $P(\Omega)$ -- then it follows that $\mathbf{C}$ is self-dual.

## Examples

+-- {: .num_example}
###### Example
**(Hamming $(8, 4)$ code)**
Up to isomorphism, there is a unique type II self-dual code $\mathbf{C} \subset P(\Omega)$ where $\Omega$ is an 8-element set. Such a code may be constructed as follows: let $\Omega$ be the projective line $\mathbb{P}^1 \mathbb{F}_7$, so as a set $\Omega = \{0, 1, 2, 3, 4, 5, 6, \infty\}$. Let $Q$ be the set of squares $0, 1, 2, 4$ and let $N$ be its complement in $\Omega$. The span of the set of elements $\{N + i: i \in \mathbb{F}_7\}$ (where $\infty + i = \infty$ for each $i$) is a 4-dimensional space consisting of 16 elements:

$$\array{
\emptyset, & \{3, 5, 6, \infty\}, & \{0, 4, 6, \infty\}, & \{0, 1, 5, \infty\} \\
\{1, 2, 6, \infty\}, & \{0, 2, 3, \infty\}, & \{1, 3, 4, \infty\}, & \{2, 4, 5, \infty\} \\
\{0, 3, 4, 5\}, & \{1, 4, 5, 6\}, & \{0, 2, 5, 6\}, & \{0, 1, 3, 6\} \\
\{0, 1, 2, 4\}, & \{1, 2, 3, 5\}, & \{2, 3, 4, 6\}, & \Omega.
}$$

For this subspace $\mathbf{C} \subset P(\Omega)$, every element is a set that is of cardinality $0$, $4$, or $8$. It is clearly of type II, and self-dual because it is maximal isotropic.

There is a second Hamming code $\mathbf{C}'$ (isomorphic to $\mathbf{C}$) that is spanned by the elements $\{-N - i: i \in \mathbb{F}_7\}$. This is "complementary" to the first in an appropriate sense: we have

$$\mathbf{C} + \mathbf{C}' = E(\Omega), \qquad \mathbf{C} \cap \mathbf{C}' = \mathbb{F}_2 \Omega,$$

so that $\mathbf{C}/\mathbb{F}_2 \Omega$ is complementary to $\mathbf{C}'/\mathbb{F}_2 \Omega$ in the 6-dimensional space $E(\Omega)/\mathbb{F}_2 \Omega$.
=--

In the theory of error-correcting codes, this is related to the Hamming $(7, 4)$ code, but with an extra parity bit. The Hamming $(7, 4)$ code is one of an infinite family of Hamming codes of type $(2^r - 1, 2^r - r - 1)$.

+-- {: .num_example}
###### Example
(The [[binary Golay code]].) Up to isomorphism, there is a unique self-dual code of type II on a 24-element set with no elements of weight (= cardinality) 4. Indeed, let $3 \Omega$ denote the disjoint union of three copies of $\Omega$. Construct a code $\mathbf{D} \subset P(3\Omega)$ that is spanned by elements of the form

$$S \sqcup S \sqcup \emptyset, \qquad S \sqcup \emptyset \sqcup S, \qquad T \sqcup T \sqcup T$$

where $S$ ranges over elements of the Hamming code $\mathbf{C}$ and $T$ ranges over elements of the Hamming code $\mathbf{C}'$. Any three elements $S \sqcup S \sqcup \emptyset$, $S' \sqcup \emptyset \sqcup S'$, and $T \sqcup T \sqcup T$ are mutually orthogonal in $P(\Omega)$, so evidently $\mathbf{D}$ is an orthogonal direct sum of three 4-dimensional isotropic spaces, making $\mathbf{D}$ an isotropic subspace of dimension 12, hence maximal isotropic. Each element of $\mathbf{D}$ has cardinality a multiple of $4$, making it self-dual type II.

To see that $\mathbf{D}$ has no elements of weight 4, argue as follows. Note that combinations $(S \sqcup S \sqcup \emptyset) + (S' \sqcup \emptyset \sqcup S')$ are of the form $S_1 \sqcup S_2 \sqcup S_3$ such that $S_1 + S_2 + S_3 = 0$. Now suppose we had

$${|S_1 + T|} + {|S_2 + T|} + {|S_3 + T|} = 4.$$

Since all the summands are even, one must be zero, so say $S_3 + T = 0$. Since $\mathbf{C} \cap \mathbf{C}' = \mathbb{F}_2 \Omega$, we must have $T \in \mathbb{F}_2 \Omega$. But then ${|S_1 + T|}$ and ${|S_2 + T|}$ are multiples of $4$, and therefore one is zero, so say $S_2 + T = 0$. But now we have

$$S_1 = S_1 - 2 T = S_1 + S_2 + S_3 = 0$$

whence we infer that ${|S_1 + T|}$ is a multiple of $8$, and we have reached a contradiction.
=--

## Properties

### Relation to quantum stabilizer codes
 {#RelationToQuantumStabilizerCodes}

Classical binary linear codes
are closely related to [[quantum error correcting codes]] knows as
*[[stabilizer codes]]* (e.g. [Ball, Centelles & Huber 20, Sec. 2.3 & 3](#BallCentellesHuber20))

## Related entries

* [[coding theory]]

* [[binary Golay code]]

* [[combinatorial design]]

* [[Leech lattice]]

* [[adinkra]]

## References

* {#FLM} [[Igor Frenkel]], [[James Lepowsky]], Arne Meurman, _Vertex operator algebras and the monster_, Pure and Applied Mathematics __134__, Academic Press, New York 1998. liv+508 pp. [MR0996026](http://www.ams.org/mathscinet-getitem?mr=996026)

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

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

Discussion in relation to [[quantum stabilizer codes]]:

* {#BallCentellesHuber20} Simeon Ball, Aina Centelles, Felix Huber, Section 2.3 & 3 of: *Quantum error-correcting codes and their geometries* ([arXiv:2007.05992](https://arxiv.org/abs/2007.05992))

category: combinatorics

[[!redirects binary linear codes]]
[[!redirects binary code]]


binary morphism

# Contents
* table of contents
{:toc}

## Definition

A _binary morphism_ is a [[morphism]] in a [[monoidal category]] out of a [[tensor product]], or (more generally) a [[multimorphism]] in a [[multicategory]] of arity $2$.

## Related concepts

* [[binary function]], [[bilinear map]], [[multilinear map]]

* **binary morphism**, [[multimorphism]]

* [[bifunctor]], [[Quillen bifunctor]]

[[!redirects binary morphism]]
[[!redirects binary morphisms]]


binary number

## Related concepts

* [[dyadic rational number]]

## References

* Wikipedia, _[Binary number](https://en.wikipedia.org/wiki/Binary_numeral_system)_

[[!redirects binary numbers]]


binary pulsar

[[!redirects binary pulsars]]

## Idea

A certain [[relativistic binary]]

## Related entries

* [[gravitational wave]]

* [[black hole]]

## References

* Wikipedia, _[Binary pulsar](https://en.wikipedia.org/wiki/Binary_pulsar)_


binding energy

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

#Contents#
* table of contents
{:toc}

## Idea

In [[physics]], the *binding energy* of a [[bound state]] is the smallest amount of [[energy]] needed to take the constituents apart

## Related concepts

* [[energy]]

* [[rest energy]]

## References

See also:

* Wikipedia, *[Binding energy](https://en.wikipedia.org/wiki/Binding_energy)*

[[!redirects binding energies]]


binomial theorem

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

# Contents #
* table of contents
{: toc}

## Statement

For $k$ a [[natural number]] and $r$ a [[complex number]], define the [[falling factorial]] by

$$r^{\underline{k}} = r(r-1)\ldots (r-k+1),$$

a polynomial of degree $k$ evaluated at $r$. If $r$ is a natural number, this expression vanishes for $k \gt r$.

The binomial theorem may be stated thus: if $r$ is any complex number and ${|x|} \lt 1$, then

$$(1 + x)^r = \sum_{k \geq 0} \frac{r^{\underline{k}} x^k}{k!}$$

where the left side may be formally defined as $\exp(r \cdot \log (1+x))$, taking the principal branch of the [[logarithm]] as defined by the power series

$$\log(1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \ldots $$

with radius of convergence equal to $1$. (A formal verification of the binomial theorem may be found at [[coinduction]].)

Thus, if we define the **binomial coefficient** $\binom{r}{k}$ by the formula

$$\binom{r}{k} \coloneqq \frac{r^{\underline{k}}}{k!},$$

then we have

$$(y + x)^r = \sum_{k \geq 0} \binom{r}{k} y^{r-k}x^k$$

whenever ${|\frac{x}{y}|} \lt 1$, i.e., whenever ${|y|} \gt {|x|}$. More precisely: for any fixed $y \neq 0$, this equation holds for any branch of the logarithm that we use to define $(y+x)^r$ as $\exp(r\log(y+x))$ over the domain $\{x: {|x|} \lt {|y|}\}$.

## Combinatorial interpretation

The special finitary case in which $i, j, n$ are positive integers,

$$(i + j)^n = \sum_{0 \leq k \leq n} \binom{n}{k} i^k j^{n-k}$$

may be established combinatorially (or in "bijective fashion") as follows. Start by interpreting $(i + j)^n$ as the number of functions $f: N \to I \sqcup J$ from an $n$-element set, where $I, J$ have cardinalities $i, j$ respectively. By pulling back $f$ along each of the inclusions of $I, J$ into $I \sqcup J$, we get functions $f_I: f^{-1}(I) \to I$, $f_J: f^{-1}(J) \to J$. Here $f^{-1}(I)$ and $f^{-1}(J)$ are complementary subsets of $N$, say of cardinalities $k$ and $n-k$ respectively. (In effect, we are using the fact that the category of finite sets is an [[extensive category]].) Thus, $f$ determines and is uniquely determined by the following data

* A subset $K (= f^{-1}(I))$ of $N$,
* A function $g (= f_I)$ of the form $K \to I$,
* A function $h (= f_J)$ of the form $N-K \to J$

and by counting the number of such triplets $(K, g, h)$, we are led to the right-hand side of the previous displayed equation.

Notice this gives a rigorous proof for the polynomial identity

$$(x+y)^n = \sum_{0 \leq k \leq n} \binom{n}{k} x^k y^{n-k}$$

since a polynomial in $\mathbb{Z}[x, y]$ is the zero polynomial if it vanishes for all positive integer values substituted for $x$ and $y$.

## Pascal's triangle

The binomial coefficient polynomials $\binom{x}{k}$ (here $x$ is an indeterminate) satisfy the recurrence

$$\Delta \binom{x}{k} \coloneqq \binom{x+1}{k} - \binom{x}{k} = \binom{x}{k-1}, \qquad \binom{x}{0} \coloneqq 1, \binom{0}{k} = 0\; (k \neq 0)$$

where the first two equations may also be written as

$$\Delta \frac{x^\underline{k}}{k!} = \frac{x^\underline{k-1}}{(k-1)!}, \qquad \frac{x^\underline{0}}{0!} = 1.$$

The first equation may be viewed as the discrete analogue of the continuous [[derivative]] formula

$$\frac{d}{d x} \frac{x^k}{k!} = \frac{x^{k-1}}{(k-1)!}.$$

The more familiar form of this recurrence,

$$\binom{x+1}{k} = \binom{x}{k} + \binom{x}{k-1},$$

may be interpreted combinatorially: a $k$-element subset $K$ of $X + 1$ is either entirely contained in $X$, or is determined by the $(k-1)$-element subset of $X$ that is $K \cap X$.

## Related concepts

* [[multinomial coefficient]]

* [[factorial]], [[double factorial]]

* [[Catalan number]]

* [[binomial type]]

## References

See also

* Wikipedia, _[Binomial theorem](https://en.wikipedia.org/wiki/Binomial_theorem)_

[[!redirects binomial coefficient]]
[[!redirects binomial coefficients]]


binomial type

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

\tableofcontents

## Idea

In [[type theory]], the *binomial types* or *binomial sets* are the [[categorification]] of the [[binomial coefficients]] and then the further generalization from [[family of finite types|finite types]]/[[finite sets]] to arbitrary [[types]] or [[sets]].

## Definition

Given [[types]] $A$ and $B$, the **binomial type** of $A$ and $B$ is defined as

$$
  \left(
    \begin{array}{c}
    A
    \\
    B
   \end{array}
\right)
  \;\coloneqq\;
  \sum_{
   f \colon
   A \to \mathbb{2}
   }
  \left[
    B \simeq
    \left(
    \sum_{a \colon A}
      f(a)
      =_\mathbb{2}
      1
    \right)
  \right]
  \,,
$$

where

* $\sum_{(-)} (-)$ denotes the [[dependent pair type]]-formation;

* $(-)\to(-)$ denotes [[function type]]-formation;

* $\mathbb{2}$ denotes the finite type with two elements "$0$" and "$1$";

* $(-) =_\mathbb{2} (-)$ denotes its [[identification type]];

* $[-]$ denotes [[propositional truncation]] ([[bracket types]]).

Since $A \simeq B$ is defined as the [[dependent pair type]] $\sum_{f:A \to B} \mathrm{isEquiv}(f)$, the above definition is the same as

$$
  \left(
    \begin{array}{c}
    A
    \\
    B
   \end{array}
\right)
  \;\coloneqq\;
  \sum_{
   f \colon
   A \to \mathbb{2}
   }
  \exists g:B \to \left(
    \sum_{a \colon A}
      f(a)
      =_\mathbb{2}
      1
    \right).\mathrm{isEquiv}(g)
  \,,
$$

where given a type family $x:A \vdash B(x)$ the [[existential quantifier]] is defined as the propositional truncation of the dependent pair type

$$\exists x:A.B(x) \coloneqq \left[\sum_{x:A} B(x)\right]$$

This definition can be translated directly into [[set theory]] notation as follows:

$$
  \left(
    \begin{array}{c}
    A
    \\
    B
   \end{array}
\right)
  \;\coloneqq\;
  \{f \in \mathbb{2}^A \vert \exists g \in \{a \in A \vert f(a) =_\mathbb{2} 1\}^B.\mathrm{isBijection}(g)\}
  \,,
$$

where $B^A$ is the [[function set]] with [[domain]] $A$ and [[codomain]] $B$ and $\mathbb{2}$ is the two-element set (the classical [[boolean domain]]), and the predicate $\mathrm{isBijection}(f)$ on the function set $f \in B^A$ is defined as
$$\mathrm{isBijection}(f) \coloneqq \forall y \in B.\exists!x \in A.f(x) = y$$

This results in **binomial sets**.

### Locally small binomial types

There is an alternative way to express the second definition, by use of a [[univalent universe]], but the resulting type is only locally small relative to the universe.

We define the type of decidable embeddings as the type of functions whose fibers are decidable:
$$A \hookrightarrow_d B \coloneqq \sum_{f:A \to B} \prod_{b:B} \left(\sum_{a:A} f(a) =_B b\right) \vee \neg \left(\sum_{a:A} f(a) =_B b\right)$$

Let $(U, \mathrm{El})$ be a [[univalent Tarski universe]], and given type $A$, let us define $U_A$ to be the type of all types in $U$ which are merely equivalent to $A$:
$$U_A \coloneqq \sum_{X:U} \left[A \simeq \mathrm{El}(X)\right]$$
Then given [[essentially small type|essentially $U$-small types]] $A$ and $B$, the locally $U$-small binomial type is defined as
$$\left(\begin{array}{c}A \\ B\end{array}\right)_U \coloneqq \sum_{X:U_B} \left[\mathrm{El}(X) \hookrightarrow_d A\right]$$

One could also translate the above definition into [[set theory]]:

Given a [[universe]] $U$ of [[small sets]], the set $U_A$ is defined to be the set of all small sets in $U$ which are in bijection with $A$:

$$U_A \coloneqq \{X \in U \vert \exists i \in X^A.\forall x \in X.\exists!a \in A.a \in i^*(x)\}$$

where $i^*(x)$ is the [[preimage]] or [[fiber]] of $i$ at $x$.

Then given small sets $A$ and $B$, the locally $U$-small **binomial set** of $A$ and $B$ is defined as the set of all $X \in U_B$ such that there exists a [[decidable injection]] from $X$ to $A$:

$$\left(\begin{array}{c}A \\ B\end{array}\right)_U \coloneqq \{X \in U_B \vert \exists i \in A^X.\forall x \in X.(\exists!a \in A.a \in i^*(x)) \vee (\neg \exists a \in A.a \in i^*(x))\}$$

## See also

* [[binomial theorem]]

* [[categorification]]

## References

The above definitions of binomial types can be found, respectively, in remark 17.6.7 and definition 17.6.7 of:

* {#Rijke22} [[Egbert Rijke]], *[[Introduction to Homotopy Type Theory]]*, Cambridge Studies in Advanced Mathematics, Cambridge University Press (2023) [[arXiv:2212.11082](https://arxiv.org/abs/2212.11082)[

[[!redirects binomial type]]
[[!redirects binomial types]]

[[!redirects binomial set]]
[[!redirects binomial sets]]


binormal topological space

Let $I = [0.1]$ be the closed unit interval with the standard topology. A [[topological space]] is __binormal__ if $X\times I$ is a [[normal topological space]] (satisfies [[separation axiom]]s $T_4$ and $T_1$).

Exercise I.B2 in Spanier: If $X$ is a binormal space, $Y$ a normal space and $f:X\to Y$ continuous,
the [[mapping cylinder]] of $f$ is a normal space.

__Borsuk's homotopy extension theorem__. (Exercise I.D2 in Spanier) Let $A$ be a closed subspace of a binormal space $X$. Then $(X,A)$ has the homotopy extension property with respect to any absolute neighborhood retract $Y$.

* Edwin H. Spanier, _Algebraic topology_, Springer 1966

category: topology
[[!redirects binormal space]]


biology

#Contents#
* table of contents
{:toc}

## Idea

This page is used as a hub to gather references about [[category theory|category-theoretic]] work with explicit applications to biology.

_Biology_ can be seen as an umbrella term for a spectrum of scientific domains all interested in studying life, at various [scales](https://en.wikipedia.org/wiki/Biological_organisation). A range of category-theoretic formalisms have now been proposed to model these scales, from [DNA mechanisms](https://www.cdc.gov/genomics/about/basics.htm) to [complex systems](https://en.wikipedia.org/wiki/Complex_system) through [protein interactions](https://en.wikipedia.org/wiki/Protein%E2%80%93protein_interaction). This page gathers works expressing their results in the language of biology by using category theory concepts. More works with potential applications to topics somewhat related to biological questions are referred at the end of the page.

## Categories

This section presents category theoretic models using categories as ways to describe biological mechanisms and relations.

### Ologs

[[ontology|Ontologies]] are used in [genomics](https://en.wikipedia.org/wiki/Genomics) to classify categories of observable phenomena such as [diseases](https://www.ebi.ac.uk/ols/ontologies/doid) or [gene expressions](https://en.wikipedia.org/wiki/Gene_Ontology). A category-theoretic model called "Ologs" was proposed to formalize such ontologies. _Ologs _ are freely generated categories over graphs whose objects and arrows are defined by (English) sentences such that

* each object is a [nominal sentence](https://en.wikipedia.org/wiki/Nominal_sentence) about a given topic;

* each arrow is encoded by a [grammatical predicate](https://en.wikipedia.org/w/index.php?title=Predicate) starting with the verb _is_ but deprived of its last [grammatical object](https://en.wikipedia.org/wiki/Object) such that the arrow, its source and its target all together define a semantically correct (English) sentence.

The idea is that each arrow of an olog describes a fact about a given topic.

\begin{centre}
    \begin{xymatrix@C=10em}
        \fbox{$\textrm{chromosome }x$} \ar[r]^-{\textrm{is the owner of}} & \fbox{$\textrm{gene }y$} \ar[r]^-{\textrm{(which) is reponsible for}} & \fbox{$\textrm{disease }z$}
    \end{xymatrix}
\end{centre}

Ologs have been used to characterize hierarchies in biology.

### Segments {#CategoryOfSegments}

Categories of segments aim to model the set of natural and experimental operations that can be done on [DNA segments](https://en.wikipedia.org/wiki/DNA). The definition of their arrows is simple but flexible enough to express a wide range of biological mechanisms occurring in [genetics](https://en.wikipedia.org/wiki/Genetics) and related fields.

For every non-negative integer $n$, we will denote the set $\{1,2,\dots,n\}$ as $[n]$. Note that $[0] = \emptyset$.

+-- {: .num_defn}
###### Definition
For every preorder $(\Omega,\preceq)$, we define a _segment on $\Omega$_ as a tuple $(n_0,n_1,t,c)$ where $n_0$ and $n_1$ are non-negative integers, $t:[n_1] \to [n_0]$ is an order-preserving surjection and $c:[n_0] \to \Omega$ is a function.
=--

If we take the preorder $\mathbf{2} = \{ 0\leq 1\}$, then the following diagram represents a segment $(14,5,c,t)$ in $\mathbf{2}$; the brackets represent the fibers of the order-preserving surjection $t$ while the corresponding colors represent the mappings of the function $c$, which lands in the set $\mathbf{2}$.

\begin{centre}
    \begin{xymatrix@C=-5pt}
       (\bullet&\bullet&\bullet)&(\circ&\circ)&(\bullet&\bullet&\bullet&\bullet)&(\circ&\circ)&(\bullet&\bullet&\bullet)
    \end{xymatrix}
\end{centre}

+-- {: .num_defn}
###### Definition
For every preorder $(\Omega,\preceq)$, we define a _morphism of segments_ from segment $(n_0,n_1,t,c)$ on $\Omega$ to a segment $(n_0',n_1',t',c')$ on $\Omega$ as a pair $(f_1,f_0)$ where $f_1:[n_1] \to [n_1']$ is an order-preserving injection and $f_0:[n_0] \to [n_0']$ is an order-preserving function such that the relation $c'(f_0(i)) \preceq c(i)$ holds in $(\Omega,\preceq)$ for every $i \in [n_0]$.
=--

We define the _category of segments over a preorder $(\Omega,\preceq)$_ as the category $\mathbf{Seg}(\Omega)$ whose objects are segments over $\Omega$ and whose arrows are the morphisms of segments between them.

We can show that if the preorder $(\Omega,\preceq)$ defines a [[lattice]], then the category $\mathbf{Seg}(\Omega)$ can be equipped with a [[site]] structure.

### References

Ologs and biology:

* [[David Spivak|DI Spivak]], RE Kent, _Ologs: A categorical framework for knowledge representation_, [pdf](https://math.mit.edu/~dspivak/informatics/olog.pdf)
* JY Wong, J McDonald, M Taylor-Pinney, [[David Spivak|DI Spivak]], KaplanDL , MJ Buehler, _Materials by Design: Merging Proteins and Music_, Nano Today. 2012 Dec 1;7(6):488-495,  [link](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3752788/)
* T. Giesa, [[David Spivak|DI Spivak]], MJ. Buehler, _Reoccurring patterns in hierarchical protein materials and music: The power of analogies_, [pdf](https://arxiv.org/pdf/1111.5297.pdf)

Introductory material for categories of segments:

* A [talk](https://www.youtube.com/watch?v=l2PB9by6IBc) by [[Kenny Courser|K Courser]].

* [[Remy Tuyeras|R Tuyeras]], _Category Theory for Genetics_,  [arXiv:1708.05255](https://arxiv.org/abs/1708.05255)

## Theories and models

This section presents category theoretic models taking the form of diagrams. These models can be either presented as functors with properties or as commutative diagrams. Common examples are models for a [[limit sketch]]. The first attempt to formalize biological systems in terms of diagrams (with limits) was initiated by R. Rosen (see the references at the end of the page). However, Rosen's work stays quite abstract and does not treat of any specific biological phenomenon.

### Stock-flow diagrams and Petri nets

In the spirit of [[David Spivak|Spivak's]] approach in encoding databases as functors over small categories, functors have been used to organize (and hence model) biological data. One example is that of stock-flow diagrams, which are defined as follows.

Let us denote as $\mathsf{H}$ the free category generated over the following graph:

\begin{centre}
    \begin{xymatrix}
        \textrm{flow} \ar@<+1.2ex>[rr]^{u} \ar@<-1.2ex>[rr]_{d} && \textrm{stock}\\
        &\textrm{link}\ar[ru]_{s} \ar[lu]^{t} &
    \end{xymatrix}
\end{centre}

The previous diagram should be seen as a sketch specifying a structure in which there are _links_ that go from a _stock_ to a _flow_ such that each _flow_ goes from a _stock_ to another _stock_.

+-- {: .num_defn}
###### Definition
We define a _primitive stock-flow diagram_ as a functor $\mathsf{H} \to \mathbf{FinSet}$ where $\mathbf{FinSet}$ is the category of finite sets and functions.
=--

+-- {: .num_defn}
###### Definition
A _stock-flow diagram_ consists of primitive stock-flow diagram $F:\mathsf{H} \to \mathbf{FinSet}$ and, for every element $x \in F(\mathrm{flow})$, a continuous function $\mathbb{R}^{U_x} \to \mathbb{R}$ where $U_x$ denotes the finite fiber $F(t)^{-1}(x)$.
=--

There is a notion of _open_ stock-flow diagram that can be composed by using the composition of cospans. Stock-flow diagrams have been used to model [epidemics](https://en.wikipedia.org/wiki/List_of_epidemics) and more specifically [COVID-19](https://en.wikipedia.org/wiki/COVID-19).

### Pedigrads

A [[pedigrad]] is a model for a limit sketch defined on a [category of segments](#CategoryOfSegments). The functors defining pedigrads can land in any types of categories. These functors have been used to model [genomic data](https://en.wikipedia.org/wiki/Genomics) and design algorithms to study them.

### References

Stock-flow diagrams and petri nets:

* [[John Baez|JC Baez]], X Li, S Libkind, N Osgood and E Patterson, _Compositional modeling with stock and flow diagrams_, [arXiv:2205.08373](https://arxiv.org/abs/2205.08373)

* A Baas, J Fairbanks, M Halter, S Libkind and E Patterson, _An algebraic framework for structured epidemic modeling_, [arXiv:2203.16345](https://arxiv.org/abs/2203.16345)

* [[John Baez|JC Baez]], BS Pollard, _A Compositional Framework for Reaction Networks_, [arXiv:1704.02051](https://arxiv.org/abs/1704.02051)

Pedigrads:

* [[Remy Tuyeras|R Tuyeras]], _Category theory for genetics I: mutations and sequence alignments_, Theory and Applications of Categories, Vol. 33, 2018, No. 40, pp 1269-1317, [link](http://www.tac.mta.ca/tac/volumes/33/40/33-40abs.html)

* [[Remy Tuyeras|R Tuyeras]], _Category theory for genetics II: genotype, phenotype and haplotype_, [arXiv:1805.07004](https://arxiv.org/abs/1805.07004)

* [[Remy Tuyeras|R Tuyeras]], _A category theoretical argument for causal inference_, [arXiv:2004.09999](https://arxiv.org/abs/2004.09999)

## Adjunctions

[[adjunction|Adjunctions]] have been used to model [pathogens](https://en.wikipedia.org/wiki/Pathogen) and [disease diagnoses](https://en.wikipedia.org/wiki/Disease), and their corresponding [immune response](https://en.wikipedia.org/wiki/Immune_response). For example, denote as $I$ the set of immune responses and as $P$ the set pathogens and [disease symptoms](https://en.wikipedia.org/wiki/Signs_and_symptoms). In practice, we can map a subset of $P$ to a subset of $I$. This defines a binary relation as follows.
$$
Q \subseteq \mathsf{Sub}(P) \times \mathsf{Sub}(I)
$$
We can complete this binary [[relation]] into a functor of the following form.
$$
Q: \mathsf{Sub}(P)^{\mathsf{op}} \times \mathsf{Sub}(I) \to \mathbf{2} = \{0 \leq 1\}.
$$
We can then define a [[functor]] $F:\mathsf{Sub}(I) \to \mathsf{Sub}(P)$ with the following specification.
$$
F(i) = \bigcup\{p| Q(p,i) = 1\}
$$
If the binary relation $Q$ is defined such that $F$ preserves [[meet|meets]] (ie. intersections), then we can use the [[adjoint functor theorem]] to define a left-adjoint $L:\mathsf{Sub}(P) \to \mathsf{Sub}(I)$ for the functor $F$.
$$
L(p) = \bigcap\{i|p \subseteq F(i)\}
$$
The previous adjunction gives us a context in which we can reason about immune responses and their triggering pathogens and diseases. Further, the adjunction formalism ensures a certain _continuity_ in time and space regarding the linking of diseases/pathogens to their immune response (as suggested in the following correspondence).

\begin{centre}
\begin{xymatrix@R=-2pt[font = \large]}
&p \subseteq F(i) & \textrm{\normalsize{if a disease $p$ describes conditions (reportedly) triggering $i$}}&\\
\ar@{-}[rrr]&&&\\
&L(p) \subseteq LF(i) \subseteq i & \textrm{\normalsize{then the (expected) immune response for $p$ is in $i$}}&
    \end{xymatrix}
\end{centre}

We can embed the previous type of models in time and space by filtering the sets $P$ and $I$ into a sequence (or a category) of subsets containing chronological and spatial occurrences of diseases and their immune responses, respectively. In this case, the corresponding binary relations $Q \subseteq \mathsf{Sub}(P) \times \mathsf{Sub}(I)$ need to be defined for each time and space parameter in a functorial way.

\begin{centre}
    \begin{xymatrix}
        \mathsf{Sub}(P_1)\ar[r]\ar@{->}@<-1.2ex>[d]\ar@{<-}@<+1.2ex>[d]&\mathsf{Sub}(P_2)\ar[r]\ar@{->}@<-1.2ex>[d]\ar@{<-}@<+1.2ex>[d]&\dots\ar[r]&\mathsf{Sub}(P_n)\ar[r]\ar@{->}@<-1.2ex>[d]\ar@{<-}@<+1.2ex>[d]&\dots\\
        \mathsf{Sub}(I_1)\ar[r]&\mathsf{Sub}(I_2)\ar[r]&\dots\ar[r]&\mathsf{Sub}(I_n)\ar[r]&\dots\\
    \end{xymatrix}
\end{centre}

### References

* [[Gianfranco Mascari|J-F Mascari]], D Giacchero and N Sfakianakis, _Symetries and asymetries of the immune system response: A categorification approach_, 2017 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), 2017, pp. 1451-1454, [pdf](http://www.mcs.st-and.ac.uk/~ns210/files/Masc-Sfak-Categor.pdf)

## Operads and algebras

### Trees

[[operad|Operads]] have been used to model [phylogenetic trees](https://en.wikipedia.org/wiki/Phylogenetic_tree), see:

* [Operads and Phylogenetic Trees](https://golem.ph.utexas.edu/category/2015/12/operads_and_phylogenetic_trees.html)

### Axioms for algebras and gradient descent

A [[little cubes operad|little-disc-operad-inspired]] formalism was developed to model biological systems and cellular behaviors. This formalism considers [gradient descent](https://en.wikipedia.org/wiki/Gradient_descent) techniques to make certain subsets $A \subseteq \mathbb{R}^{\times n}$ converge towards [[algebra over an operad|algebra-like structures]].

More specifically, these gradient descent techniques use the underlying equations of the axioms for algebras as [objective functions](https://en.wikipedia.org/wiki/Loss_function). The sets $A$ obtained through these optimizations can be interpreted as models for [specialization of biological functions](https://en.wikipedia.org/wiki/Specialization) and [[entropy|entropic]] mechanisms in living organisms.

### References

Phylogenies:

* [[John Baez|JC Baez]], N Otter, _Operads and Phylogenetic Trees_, Theory and Applications of Categories, Vol. 32 No. 40 (2017), 1397-1453, [paper](http://www.tac.mta.ca/tac/volumes/32/40/32-40abs.html)

Specialization and gradient descent:

* [[Remy Tuyeras|R Tuyeras]] et al., _Cellular intelligence: dynamic specialization through non-equilibrium multi-scale compartmentalization_, [bioarxiv](https://www.biorxiv.org/content/10.1101/2021.06.25.449951v1.abstract)

## Related fields

This section gathers works in domains that often use category theory as a language for logical discourse.

### Algebraic topology

[[algebraic topology|Algebraic topology]] techniques and intuitions developed along with [[persistent homology]] have been used to study neuronal morphologies.

Additionally, the clustering algorithm [UMAP](https://umap-learn.readthedocs.io/en/latest/), commonly-used in computational biology to classify sequencing data, relies on properties holding for [[fuzzy simplicial set]]s. For more detail, see the following blog post:

* [[John Baez|JC Baez]], [The Category Theory Behind UMAP](https://johncarlosbaez.wordpress.com/2020/02/10/the-category-theory-behind-umap/), Azimuth

### Algebraic geometry

The concept of [[singularity|singularities]], in [[algebraic geometry]], has been used to model anatomic morphologies and behaviors.

Additionally, various concepts of algebraic geometry such as [[manifold|manifolds]] and [[moduli space|moduli spaces]] have been used by [[Mikhail Gromov|M Gromov]] to model molecular mechanisms in living cells.

### References

Persistent homology:

* L Kanari, P Dłotko, M Scolamiero, R Levi, J Shillcock, [[Kathryn Hess|K Hess]], H Markram (2016), _Quantifying topological invariants of neuronal morphologies_, [arXiv:1603.08432](https://arxiv.org/abs/1603.08432)

* Y Lee, SD Barthel, P Dłotko, SM Moosavi, [[Kathryn Hess|K Hess]], B Smit, (2017), _Pore-geometry recognition: on the importance of quantifying similarity in nanoporous materials_, [arXiv:1701.06953.](https://arxiv.org/abs/1701.06953)

Fuzzy simplicial sets:

* A Jackson, _The mathematics of UMAP_, [pdf](https://adelejackson.github.io/files/Maths_of_UMAP.pdf)

* [[David Spivak|DI Spivak]], _Metric Realization of Fuzzy Simplicial Sets_, [pdf](https://math.mit.edu/~dspivak/files/metric_realization.pdf)

Algebraic geometry:

*  EC Zeeman, _Catastrophe Theory_, Scientific American, April 1976; pp. 65–70, 75–83, [pdf](http://www.gaianxaos.com/pdf/dynamics/zeeman-catastrophe_theory.pdf)

* [[Mikhail Gromov|M Gromov]], Mathematical slices of molecular biology, [pdf](https://www.ihes.fr/~gromov/wp-content/uploads/2018/08/M01-03.pdf)

## Higher structures

### Hyperstructures

[[Nils Baas|N Baas]] has proposed [[hyperstructure|hyperstructures]] to describe hierarchical organizations in biology. While these structures were originally designed to organize [[extended cobordism]] structures, they are argued to also be appropriate for modeling multilevel systems in biology. Note that contrarily to multilevel structures such as [[n-category|$n$-categories]], hyperstructures offer more freedom in that biological processes are not necessarily oriented as [[globe|globular arrows]] but, instead, appear to be organized as "aggregates" with _bonds_.

The idea behind applying hyperstructures to biology is that they allow us to consider some set $X_0$ of "agents" such that any subset $S \subseteq X_0$ can define an _aggregate_ when it is "labeled" by an explanation (or description) $\omega$ for that aggregation.
\begin{centre}
    \begin{xymatrix@C=+80pt}
X_0 = \{\textrm{all cells}\} \ar[r]^-{\textrm{consider a subset}}& S = \{\textrm{all liver cells}\} \ar[r]^-{\textrm{label with}} & \omega = \fbox{$\textrm{liver cell}$} \ar[r]^{\textrm{define}}& (S,\omega)\textit{ an organ; a liver}
    \end{xymatrix}
\end{centre}
The pair $(S,\omega)$ can then be represented by another label, say $\beta$, that can classify a collection of pairs sharing similarities.
\begin{centre}
    \begin{xymatrix}
(S,\omega) = (\{\textrm{all liver cells for individual $i$}\}, \fbox{$\textrm{liver cell}$}) \ar@{|->}[r]&\beta = \fbox{$\textrm{liver in an individual}$}
    \end{xymatrix}
\end{centre}
The previous construction can then be repeated recursively on the set of labels $\beta$. This set, call it $X_1$, could potentially be the set of all the [biological organs](https://en.wikipedia.org/wiki/Organ) in an individual. Then, the next level $X_2$ (obtained from $X_1$ by following the previous procedure) can be the set of all [organ systems](https://en.wikipedia.org/wiki/Organ_system), which can subsequently be organized as [bodies](https://en.wikipedia.org/wiki/Human_body) on a fourth level $X_3$.

Note that hyperstructures also require compatibility properties between the labels. In particular, for each level $X_k$, the pairs $(S,\omega)$ should be organized into a [[Grothendieck construction]] $\int \Omega$ such that the mappings $(S,\omega) \mapsto \beta$ define a [[functor]] $\int \Omega \to \mathbf{Set}$.

### Bigraphs, $\lambda$-calculus and $\pi$-calculus

[Bigraphs](https://en.wikipedia.org/wiki/Bigraph) are a type of [[hypergraph|hypergraph-based]] structures that can be linked to [process algebras](https://en.wikipedia.org/wiki/Process_calculus) such as the [[lambda-calculus|$\lambda$-calculus]], the [$\pi$-calculus](https://en.wikipedia.org/wiki/%CE%A0-calculus) and its [stochastic variant](https://link.springer.com/referenceworkentry/10.1007/978-1-4419-9863-7_767). Each of these calculus formalisms has been used to model biological systems.

Interestingly, it was shown that the $\pi$-calculus can be interpreted within a [[2-category theory|2-category-theoretic]] setting.

A number of bigraph-based formalisms have been proposed to model complex systems, some with a category theoretic flavor. For example, [stochastic bigraphs](https://www.pure.ed.ac.uk/ws/portalfiles/portal/15231648/Stochastic_Bigraphs.pdf) and their compositions have been used to model [membrane budding](https://en.wikipedia.org/wiki/Budding) in a biological system.

### References

Hyperstructures:

* [[Nils Baas|NA Baas]], _On the Philosophy of Higher Structures_, [arXiv:1805.11943](https://arxiv.org/pdf/1805.11943.pdf)

* [[Nils Baas|NA Baas]], _On Higher Structures_,  [arXiv:1509.00403](https://arxiv.org/pdf/1509.00403.pdf)

* [[Nils Baas|NA Baas]], _Extended Memory Evolutive Systems in a Hyperstructure Context. Axiomathes 19, 215–221 (2009), [link](https://doi.org/10.1007/s10516-009-9066-3)

Bigraphs:

*  [[Robin Milner|R Milner]], _Bigraphs and Their Algebra_, Electronic Notes in Theoretical Computer Science
Volume 209, 24 April 2008, Pages 5-19, [link](https://www.sciencedirect.com/science/article/pii/S157106610800217X)

* J Krivine, [[Robin Milner|R Milner]], A Troina, _Stochastic Bigraphs_, Electronic Notes in Theoretical Computer Science
Volume 218, 22 October 2008, Pages 73-9, [link](https://www.sciencedirect.com/science/article/pii/S1571066108004003)

Relations between $\lambda$-calculus, $\pi$-calculus and biology:

* S Federhen, _Replication is Recursion; or, Lambda: the Biological Imperative_, [bioarxiv](https://www.biorxiv.org/content/biorxiv/early/2015/05/01/018804.full.pdf)

* [A Regev](https://en.wikipedia.org/wiki/Aviv_Regev), W Silverman, E Shapiro E, _Representation and simulation of biochemical processes using the pi-calculus process algebra_, Pacific Symposium on Biocomputing 6:459-470 (2001), [pdf](http://psb.stanford.edu/psb-online/proceedings/psb01/regev.pdf)

* See the blog post by [[John Baez]]: [Biology and the Pi-Calculus](https://johncarlosbaez.wordpress.com/2016/01/02/biology-and-the-pi-calculus/)

* [[Mike Stay|M Stay]], LG Meredith, _Higher category models of the pi-calculus_, [arXiv:1504.04311](https://arxiv.org/abs/1504.04311)

## Other references

A general discussion on using category theory for biology can be found on the $n$-category café:

* [category theory and biology](http://golem.ph.utexas.edu/category/2007/11/category_theory_and_biology.html).

Phylogenomics:

* L Pachter, B Sturmfels, _The mathematics of phylogenomics_, [math/0409132](http://arxiv.org/abs/math/0409132)

Cell biology:

* V Noel, D Grigoriev, S Vakulenko, O Radulescu, _Tropical geometries and dynamics of biochemical networks. Application to hybrid cell cycle models_, [pdf](http://logic.pdmi.ras.ru/~grigorev/pub/tropical_dynamics_modified.pdf)

Systems biology:

* R Rosen, _The representation of biological systems from the standpoint of the theory of categories_ , Bulletin of Mathematical Biophysics, Vol 20. 1958, [pdf]( http://www.few.vu.nl/~rplanque/Onderwijs/MathBio/PapersForProject/Rosen.pdf)

* IC Baianu, JF Glazebrook and R Brown, _A Category Theory And Higher Dimensional Algebra Approach To Complex Systems Biology, Meta-systems And Ontological Theory Of Levels: Emergence Of Life, Society, Human Consciousness And Artificial Intelligence_, [text](https://planetmath.org/ACATEGORYTHEORYANDHIGHERDIMENSIONALALGEBRAAPPROACHTOCOMPLEXSYSTEMSBIOLOGYMETASYSTEMSANDONTOLOGICALTHEORYOFLEVELS)

Neuroscience:

* According to [[Mikhail Gromov]], the mathematical structures nearest to what is happening in the mind are [[n-categories]]. See his talk: [Ergologic and Interfaces Between Languages](https://www.youtube.com/watch?v=jRSqGYJQQM8)

* [[Andree Ehresmann|AC Ehresmann]] and P S Wlimes, _Towards a theoretical framework for wandering logic intelligence memory evolutive systems_. In P. L. Simeonov, L. S. Smith, and A. C. Ehresmann, editors, Integral. Biomathics: Tracing the Road to Reality. Springer-Verlag, 2012.

* [[Andree Ehresmann|AC Ehresmann]] and J-P Vanbremeersch, _The memory evolutive systems as a model of Rosen's organisms_. Axiomathes, 16:165–214, 2006.

* [[Andree Ehresmann|AC Ehresmann]] and J-P Vanbremeersch. _Memory Evolutive Systems: Hierarchy, Emergence, Cognition_, volume 4 of Studies in Multidisciplinarity. Elsevier, 2007.

* [[Andree Ehresmann|AC Ehresmann]], [[Nils Baas|N Baas]], and J-P Vanbremeersch. _Hyperstructures and memory evolutive systems_.
Intern. J. Gen. Sys., 33(5):553–568, 2004.

* D Pastor, E Beurier, [[Andree Ehresmann|AC Ehresmann]], R Waldeck, _Interfacing biology, category theory and mathematical statistics_, [pdf](https://arxiv.org/pdf/2009.06832.pdf)


BIon

[[!redirects BIons]]

## References

On [[D1-D3 brane intersections]] as spikes/BIons in the [[D3-brane]] [[DBI action|DBI-theory]]:

* [[Curtis Callan]], [[Juan Maldacena]], _Brane Dynamics From the Born-Infeld Action_, Nucl. Phys. B513 (1998) 198-212 ([arXiv:hep-th/9708147](https://arxiv.org/abs/hep-th/9708147))

* [[Paul Howe]], [[Neil Lambert]], [[Peter West]], _The Self-Dual String Soliton_, Nucl. Phys. B515 (1998) 203-216 ([arXiv:hep-th/9709014](https://arxiv.org/abs/hep-th/9709014))

* [[Gary Gibbons]], _Born-Infeld particles and Dirichlet p-branes_,  	Nucl. Phys. B514: 603-639, 1998 ([arXiv:hep-th/9709027](https://arxiv.org/abs/hep-th/9709027))

* [[Neil Constable]], [[Robert Myers]], Oyvind Tafjord, _The Noncommutative Bion Core_, Phys. Rev. D61 (2000) 106009 ([arXiv:hep-th/9911136](https://arxiv.org/abs/hep-th/9911136))

From the [[M5-brane]]

* {#HoweLambertWest97} [[Paul Howe]], [[Neil Lambert]], [[Peter West]], _The Self-Dual String Soliton_, Nucl. Phys. B515 (1998) 203-216 ([arXiv:hep-th/9709014](https://arxiv.org/abs/hep-th/9709014))


bipartite graph

A **bipartite graph** is a [[graph]] $G$ whose vertices can be [[vertex coloring|2-colored]], i.e., such that there exists a graph homomorphism $G \to K_2$.  Note that a bipartite graph cannot have any loops, although it may have multiple edges.

## Related entries

* [[vertex coloring]]

## Related pages

* Wikipedia: [Bipartite graph](https://en.wikipedia.org/wiki/Bipartite_graph)

## References

* R. Diestel, _Graph Theory_ , GTM **173** Springer Heidelberg 2000².

* [[William Lawvere|F. W. Lawvere]], _Categories of Spaces may not be Generalized Spaces as Exemplified by Directed Graphs_ , Revista Colombiana de Matemáticas **XX** 1986 pp.179-186. Reprinted with an author comment as TAC Reprint no.9 (2005) pp.1-7. ([pdf](http://www.tac.mta.ca/tac/reprints/articles/9/tr9.pdf))


bipermutative category

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

#Contents#
* table of contents
{:toc}

## Idea

A _bipermutative category_ is a semistrict [[rig category]].  More concretely, it is a [[permutative category]] $(C, \oplus)$ with a second [[symmetric monoidal category]] structure $(C, \otimes)$ that [[distributive law|distributes]] over $\oplus$, with, again, some of the [[coherence laws]] required to hold strictly.

## Definition

Two nonequivalent definitions are given in
([May, def. VI 3.3](#May)) and ([Elmendorf-Mandell, def. 3.6](#ElmendorfMandell)).

May requires the left distributivity map to be an isomorphism
and the right distributivity map to be an identity.

Elmendorf and Mandell allow both distributivity maps to be noninvertible.

A discussion of these two definitions is in ([May2, Section 12](#May2)).

## Properties

### Relation to rig categories

Every [[symmetric monoidal category|symmetric]] [[rig category]] is equivalent to a bipermutative category ([May, prop. VI 3.5]).

## Examples

* [[Ab]], $R$[[Mod]], [[Vect]] are [[symmetric monoidal category|symmetric]] [[rig categories]] under [[direct sum]] and [[tensor product of abelian groups]]/[[tensor product of modules]].  Thus, they have "strictifications" that are bipermutative.

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

For $R$ a plain [[ring]], regarded as a discrete [[rig category]], it is a bipermutative category. The corresponding [[K-theory of a bipermutative category]] is [[ordinary cohomology]] with [[coefficients]] in $R$, given by the [[Eilenberg-MacLane spectrum]] $H R$.

=--

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

Consider the category whose [[objects]] are the [[natural numbers]] and whose [[hom sets]] are

$$
  Hom(n_1, n_2) = \left\{ \array{ \Sigma_{n_1} & | n_1 = n_2 \\ \emptyset & | n_1 \neq n_2 } \right.
  \,,
$$

with $\Sigma_n$ being the [[symmetric group]] of [[permutations]] of $n$ elements. The two monoidal structures ar given by addition and multiplication of natural numbers. This is a bipermutative version of the $Core(FinSet)$, the [[core]] of the category [[FinSet]] of [[finite sets]].

The corresponding [[K-theory of a bipermutative category]] is given by the [[sphere spectrum]].

=--

## Related concepts

* [[K-theory of a bipermutative category]]

* [[BDR 2-vector bundle]]

* [[distributivity for monoidal structures]]

  * [[rig category]]

  * [[distributive monoidal category]]

  * [[distributive category]]

## References

* [[Peter May]], _$E_\infty$ Ring Spaces and $E_\infty$ Ring spectra_, Springer lectures notes in mathematics, Vol. 533, (1977) ([pdf](http://www.math.uchicago.edu/~may/BOOKS/e_infty.pdf)) chaper VI
 {#May}

* [[Peter May]], _The construction of $E_\infty$ ring spaces
from bipermutative categories_, Geometry and Topology Monographs, Vol. 16, (2009) ([pdf](http://www.math.uchicago.edu/~may/PAPERS/Final2.pdf)) chaper VI
 {#May2}

* [[Anthony Elmendorf]], [[Michael Mandell]], _Rings, modules and algebras in infinite loop space theory_, K-Theory 0680 ([web](http://www.math.uiuc.edu/K-theory/0680/), [pdf](http://www.math.uiuc.edu/K-theory/0680/RMAsubmit.pdf))
 {#ElmendorfMandell}

[[!redirects bipermutative categories]]


biproduct

> This entry is about [[coproducts]] coinciding with [[products]]. For the notion of biproduct in the sense of [[bicategory]] theory see at [[2-limit]]. See at _[[bilimit]]_ for general disambiguation.

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

#Contents#
* table of contents
{: toc}

## Idea

A _biproduct_ in a [[category]] $\mathcal{C}$ is an operation that is both a [[product]] and a [[coproduct]], in a compatible way. Morphisms between finite biproducts are encoded in a [[matrix calculus]].

Finite biproducts are best known from [[additive category|additive categories]]. A category which has biproducts but is not necessarily [[enriched category|enriched]] in [[Ab]], hence not necessarily [[additive category|additive]], is called a _semiadditive category_.

## Definitions

### In an additive category

Let $\mathcal{C}$ be an [[additive category]]; that is, $\mathcal{C}$ is [[enriched category|enriched]] over [[abelian groups]]. For $a, b$ a [[pair]] of [[objects]] in $\mathcal{C}$, a __biproduct__ of $a$ and $b$ ([MacLane](#MacLane) p.194) is an object $a \oplus b$ together with [[maps]]
\begin{tikzcd}
a \arrow[rr, "i_{1}"', shift right] &  & a \oplus b \arrow[ll, "p_{1}"', shift right] \arrow[rr, "p_{2}", shift left] &  & b \arrow[ll, "i_{2}", shift left]
\end{tikzcd}
which satisfy the following [[equalities]]:
$$
i_{1};p_{1}=1_{a}, \quad i_{2};p_{2}=1_{b}, \quad p_{1};i_{1} + p_{2};i_{2} = 1_{a \oplus b}
$$

### In a category with zero morphisms

Let $\mathcal{C}$ be a [[category]] with [[zero morphisms]]; that is, $\mathcal{C}$ is [[enriched category|enriched]] over [[pointed sets]] (which is notably the case when $\mathcal{C}$ has a [[zero object]]).  For $c_1, c_2$ a [[pair]] of objects in $\mathcal{C}$, suppose a [[product]] $c_1 \times c_2$ and a [[coproduct]] $c_1 \sqcup c_2$ both exist.

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

Write

$$
  r_{c_1,c_2}
  \;\colon\;
  c_1 \sqcup c_2
    \longrightarrow
  c_1 \times c_2
$$

for the [[morphism]] which is uniquely defined (via the [[universal property]] of [[coproduct]] and [[product]]) by the condition that
\[
  \label{ConditionOnComparisonMorphism}
  \left(
    c_i
      \longrightarrow
    c_1 \sqcup c_2
      \overset{\; r \;}{\longrightarrow}
    c_1 \times c_2
      \longrightarrow
    c_j
  \right)
  =
  \left\{
    \array{
      Id_{c_i} & if & i = j
      \\
      0_{i,j} & if & i \neq j
    }
  \right.
  \,
\]

where the last and the first morphisms are the [[projections]] and [[co-projections]], respectively, and
where $0_{i,j}$ is the [[zero morphism]] from $c_i$ to $c_j$. Thus $r_{c_1, c_2} = (Id_{c_1}, 0_{1,2}) \sqcup (0_{2,1}, Id_{c_2})$, where $(f, g) \colon d \to a \times b$ denotes the map induced by $f \colon d \to a$ and $g \colon d \to b$.

=--

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

If the morphism $r_{c_1,c_2}$ in def. \ref{TheCanonicalComparisonMorphism}, is an [[isomorphism]], then the isomorphic objects $c_1 \times c_2$ and $c_1 \sqcup c_2$ are called [[generalized the|the]] __biproduct__ of $c_1$ and $c_2$.  This object is often denoted $c_1 \oplus c_2$, alluding to the [[direct sum]] (which is often an example).

If $r_{c_1,c_2}$ is an isomorphism for all objects $c_1, c_2 \in \mathcal{C}$ and hence a [[natural isomorphism]]

$$
  r \;\colon\; (-)\sqcup (-) \stackrel{\simeq}{\longrightarrow} (-) \times (-)
$$

then $\mathcal{C}$ is called a [semiadditive category](#SemiadditiveCategories).

=--

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

Definition \ref{Biproduct} has a straightforward generalization to biproducts of any number of objects (although this requires extra structure on the category in [[constructive mathematics]] if the set indexing these objects might not have [[decidable equality]]).

A [[zero object]] is the biproduct of no objects.

=--

### Point-free definition

Suppose $C$ is an arbitrary [[category]], without any assumption of pointedness, additivity, etc.

The __biproduct__ of $c_1$ and $c_2$
is a [[tuple]]
$$(c_1\oplus c_2,p_1:c_1\oplus c_2\to c_1,p_2:c_1\oplus c_2\to c_2,i_1:c_1\to c_1\oplus c_2,i_2:c_2\to c_1\oplus c_2)$$
such that $(c_1\oplus c_2,p_1,p_2)$ is a product tuple,
$(c_1\oplus c_2,i_1,i_2)$ is a coproduct tuple,
and
$$p_1 i_1=id,$$
$$p_2 i_2=id,$$
$$i_1 p_1 i_2 p_2 = i_2 p_2 i_1 p_1.$$

See Definition 3.1 in [Karvonen 2020](#Karvonen20).

## Semiadditive categories
 {#SemiadditiveCategories}

A category $C$ with all finite biproducts is called a **semiadditive category**.  More precisely, this means that $C$ has all finite products and coproducts, that the unique map $0\to 1$ is an isomorphism (hence $C$ has a zero object), and that the canonical maps $c_1 \sqcup c_2 \to c_1 \times c_2$ defined above are isomorphisms.

Amusingly, for $C$ to be semiadditive, it actually suffices to assume that $C$ has finite products and coproducts and that there exists *any* [[natural transformation|natural]] family of isomorphisms $c_1 \sqcup c_2 \cong c_1 \times c_2$ --- not necessarily the canonical maps constructed above.  A proof can be found in ([Lack 09](#Lack09)).

An [[additive category]], although normally defined through the theory of [[enriched categories]], may also be understood as a semiadditive category with an [[extra property]], as explained below at _[Properties -- Biproducts imply enrichment](#BiproductsImplyEnrichment)_.

### As (co)cartesian objects
The aforementioned result of Lack implies that a semiadditive category is a [[cartesian object|cocartesian object]] in the [[2-category]] of [[cartesian monoidal categories]] and product-preserving functors.
In fact, by [[Eckmann-Hilton argument|Eckmann-Hilton]], any monoidal structure defined on an object $\mathcal{C}$ of such a 2-category has to coincide with the one given by the cartesian product of $\mathcal{C}$. Thus when we specify a cocartesian one on $\mathcal{C}$, Eckmann-Hilton gives us a natural isomorphism $c_1 \sqcup c_2 \cong c_1 \times c_2$.

The exact same argument also shows semiadditive categories are [[cartesian objects]] in the [[2-category]] of [[cocartesian monoidal categories]] and coproduct-preserving functors.

## Properties

### Semiadditivity as structure/property
 {#SemiadditivityAsStructureProperty}

Given a category $\mathcal{C}$ with [[zero morphisms]], one may imagine equipping it with the [[structure]] of a chosen [[natural isomorphism]]

$$
  \psi_{(-),(-)} : (-)\sqcup (-) \stackrel{\simeq}{\longrightarrow} (-)\times(-)
  \,.
$$

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

([Lack 09, proof of theorem 5](#Lack09)).
If a [[category]] $\mathcal{C}$ with finite [[coproducts]] and [[products]] carries any [[natural isomorphism]] $\psi_{(-),(-)}$ from [[coproducts]] to [[products]], then
$$ \array {
  c_1\sqcup c_2 & \overset{\psi_{c_1, 0} + \psi_{0, c_2}}\rightarrow & c_1 \sqcup c_2 \\
    & \searrow^{r_{c_1, c_2}}           & \downarrow^{\psi_{c_1, c_2}} \\
    &                        & c_1 \times c_2
} $$
commutes for any two object $c_1$ and $c_2$.

=--

 Hence $r_{c_1, c_2}$ is an isomorphism so that $\mathcal{C}$ is semi-additive. See [[non-canonical isomorphism]] for more.

### Biproducts imply enrichment -- Relation to additive categories
 {#BiproductsImplyEnrichment}

A semiadditive category is automatically [[enriched category|enriched]] over the [[monoidal category]] of [[commutative monoids]] with the usual [[tensor product]], as follows.

Given two morphisms $f, g: a \to b$ in $C$, let their sum $f + g: a \to b$ be
$$ a \to a \times a \cong a \oplus a \overset{f \oplus g}{\to} b \oplus b \cong b \sqcup b \to b .$$
One proves that $+$ is associative and commutative. Of course, the zero morphism $0: a \to b$ is the usual [[zero morphism]] given by the zero object:
$$ a \to 1 \cong 0 \to b .$$
One proves that $0$ is the neutral element for $+$ and that this matches the $0$ morphism that we began with in the definition.  Note that in addition to a zero object, this construction actually only requires biproducts of an object with itself, i.e. biproducts of the form $a\oplus a$ rather than the more general $a\oplus b$.

If additionally every morphism $f: a \to b$ has an inverse $-f: a \to b$, then $C$ is enriched over the category $Ab$ of [[abelian groups]] and is therefore (precisely) an __[[additive category]]__.

If, on the other hand, the addition of morphisms is idempotent ($f+f=f$), then $C$ is enriched over the category $SLat$ of [[semilattices]] (and is therefore a kind of [[2-poset]]).

### Biproducts as enriched Cauchy colimits

Conversely, if $C$ is already known to be enriched over commutative monoids, then a binary biproduct may be defined purely diagrammatically as an object $c_1\oplus c_2$ together with injections $n_i:c_i\to c_1\oplus c_2$ and projections $p_i:c_1\oplus c_2 \to c_i$ such that $p_j n_i = \delta_{i j}$ (the [[Kronecker delta]]) and $n_1 p_1 + n_2 p_2 = 1_{c_1\oplus c_2}$.  It is easy to check that makes $c_1\oplus c_2$ a biproduct, and that any binary biproduct must be of this form.  Similarly, an object $z$ of such a category is a zero object precisely when $1_z= 0_z$, its identity is equal to the zero morphism. It follows that functors enriched over commutative monoids must automatically preserve finite biproducts, so that finite biproducts are a type of [[Cauchy colimit]] (i.e. [[absolute colimit]]).  Moreover, any product _or_ coproduct in a category enriched over commutative monoids is actually a biproduct.

For categories enriched over [[suplattices]], this extends to all small biproducts, with the condition $n_1 p_1 + n_2 p_2 = 1_{c_1\oplus c_2}$ replaced by $\bigvee_{i} n_i p_i = 1_{\bigoplus_i c_i}$.  In particular, the category of suplattices has all small biproducts.

### Biproducts from duals

The existence of [[dual objects]] tends to imply (semi)additivity; see ([Houston 08](#Houston06), [MO discussion](http://mathoverflow.net/questions/14402/semiadditivity-and-dualizability-of-2/21307)).

## Examples

Categories with biproducts include:

* The category [[Ab]] of abelian groups. More generally, any [[abelian category ]].

* The category of (finitely generated) [[projective module|projective modules]] over a given ring.

* Any [[triangulated category]], in particular the [[derived category]] of a ring, or the [[stable homotopy category|homotopy category of spectra]].

* The category of [[abelian categories]] and [[exact functors]].

* [[K(n)-local stable homotopy theory]] ([Hopkins-Lurie 14](#HopkinsLurie14))

* The category [[Rel]] of sets and relations between sets.

* The category [[SupLat]] of sup-lattices.

* Any [[compact closed category]] with products (or coproducts); see [Houston 06](#Houston06), and for generalizations [Garner-Schaeppi 15](#GarnerSchaeppi15) and [Zekic 21](#Zekic21).

## Non-examples

Some categories possess all [[binary products]] and [[coproducts]] but they are not biproducts and the category is thus not a semiadditive category. From above, we know that they are not enriched over the category of commutative monoids.

* The category [[Set]] of sets and functions, where the product is given by the [[cartesian product]] of sets and the coproduct by the [[disjoint union]] of sets.

* The category [[Top]] of topological spaces and continuous functions where the product is again given by the cartesian product and the coproduct by the disjoint union.

* The category [[Grp]] of groups, where the product is given by the cartesian product and the coproduct by the [[free product of groups]].

## Related concepts

* [[bilimit]]

* [[semiadditive (∞,1)-category]]

* [[pointed category]]

## References

* {#MacLane} [[Saunders MacLane]], _[[Categories Work|Categories for the working mathematician]]_

* {#Lawvere92} [[William Lawvere]], around p. 56 of: *Introduction to Linear Categories and Applications*, course lecture notes (1992) [[pdf](https://github.com/mattearnshaw/lawvere/blob/192dac273e8bf352f307f87b9ec4fe8ef7dc85b9/pdfs/1992-introduction-to-linear-categories-and-applications.pdf), [[Lawvere-LinearCategories.pdf:file]]]

* {#Lack09} [[Stephen Lack]], _Non-canonical isomorphisms_, ([arXiv:0912.2126](http://arxiv.org/abs/0912.2126)).

* {#Houston06} [[Robin Houston]], _Finite Products are Biproducts in a Compact Closed Category_, Journal of Pure and Applied Algebra, Volume 212, Issue 2, February 2008, Pages 394-400 ([arXiv:math/0604542](http://arxiv.org/abs/math/0604542))

* {#GarnerSchaeppi15} [[Richard Garner]] and [[Daniel Schaeppi]], _When coproducts are biproducts_, Math. Proc. Camb. Phil. Soc. 161 (2016) 47-51, [arXiv:1505.01669](https://arxiv.org/abs/1505.01669), 2015

* {#Zekic21} Mladen Zekić, _Biproducts in monoidal categories_, Publications de L'Institut Mathematique, [DOI](https://doi.org/10.2298/PIM2123001Z), 2021

* {#HopkinsLurie14} [[Michael Hopkins]], [[Jacob Lurie]], _[[Ambidexterity in K(n)-Local Stable Homotopy Theory]]_ (2014)

* {#Karvonen20} [[Martti Karvonen]], _Biproducts without pointedness_,  Cahiers de topologie et géométrie différentielle catégoriques **61** 3 (2020) 229–238 $[$[arXiv:1801.06488](https://arxiv.org/abs/1801.06488), [journal pdf](http://cahierstgdc.com/wp-content/uploads/2020/07/KARVONEN-LXI-3.pdf)$]$

A related discussion is archived at $n$[Forum](http://nforum.mathforge.org/discussion/4966/zero-morphism-and-additive-categories/?Focus=39983#Comment_39983).

[[!redirects biproducts]]
[[!redirects semiadditive category]]
[[!redirects semiadditive categories]]
[[!redirects semi-additive category]]
[[!redirects semi-additive categories]]