# nLab span

category theory

## Applications

#### 2-Category theory

2-category theory

# Contents

## Disambiguation

For spans in vector spaces (or modules), see linear span.

## Definition

### Spans

In any category $C$, a span, or roof, or correspondence, from an object $x$ to an object $y$ is a diagram of the form

$\begin{array}{ccc}& & s\\ & {}^{f}↙& & {↘}^{g}\\ x& & & & y\end{array}$\array{ && s \\ & {}^{f}\swarrow && \searrow^{g} \\ x &&&& y }

where $s$ is some other object of the category. (The word “correspondence” is also sometimes used for a profunctor.)

This diagram is called a ‘span’ because it looks like a little bridge; ‘roof’ is similar. The term ‘correspondence’ is prevalent in geometry and related areas; it comes about because a correspondence is a generalisation of a binary relation.

Note that a span with $f=1$ is just a morphism from $x$ to $y$, while a span with $g=1$ is a morphism from $y$ to $x$. So, a span can be thought of as a generalization of a morphism in which there is no longer any asymmetry between source and target.

A span in the opposite category ${C}^{\mathrm{op}}$ is called a co-span in $C$.

A span that has a cocone is called a coquadrable span.

### Categories of spans

If the category $C$ has pullbacks, we can compose spans. Namely, given a span from $x$ to $y$ and a span from $y$ to $z$:

$\begin{array}{ccccccc}& & s& & & & t\\ & {}^{f}↙& & {↘}^{g}& & {}^{h}↙& & {↘}^{i}\\ x& & & & y& & & & z\end{array}$\array{ && s &&&& t \\ & {}^{f}\swarrow && \searrow^{g} & & {}^{h}\swarrow && \searrow^{i} \\ x &&&& y &&&& z }

we can take a pullback in the middle:

$\begin{array}{ccccc}& & & & s{×}_{y}t\\ & & & {}^{{p}_{s}}↙& & {↘}^{{p}_{t}}\\ & & s& & & & t\\ & {}^{f}↙& & {↘}^{g}& & {}^{h}↙& & {↘}^{i}\\ x& & & & y& & & & z\end{array}$\array{ &&&& s \times_y t \\& && {}^{p_s}\swarrow && \searrow^{p_t} \\ && s &&&& t \\ & {}^{f}\swarrow && \searrow^{g} & & {}^{h}\swarrow && \searrow^{i} \\ x &&&& y &&&& z }

and obtain a span from $x$ to $z$:

$\begin{array}{ccc}& & s{×}_{y}t\\ & {}^{f{p}_{s}}↙& & {↘}^{i{p}_{t}}\\ x& & & & z\end{array}$\array{ && s \times_y t \\ & {}^{f p_s}\swarrow && \searrow^{i p_t} \\ x &&&& z }

This way of composing spans lets us define a 2-category $\mathrm{Span}\left(C\right)$ with:

• objects of $C$ as objects
• spans as morphisms
• maps between spans as 2-morphisms

This is a weak 2-category: it has a nontrivial associator: composition of spans is not strictly associative, because pullbacks are defined only up to canonical isomorphism. A naturally defined strict 2-category which is equivalent to $\mathrm{Span}\left(C\right)$ is the strict 2-category of linear polynomial functors between slice categories of $C$.

(Note that we must choose a specific pullback when defining the composite of a pair of morphisms in $\mathrm{Span}\left(C\right)$, if we want to obtain a bicategory as traditionally defined; this requires the axiom of choice. Otherwise we obtain a bicategory with ‘composites of morphisms defined only up to canonical iso-2-morphism’; such a structure can be modeled by an anabicategory or an opetopic bicategory?.)

## Properties

### The 1-category of spans

Let $C$ be a category with pullbacks and let ${\mathrm{Span}}_{1}\left(C\right):=\left(\mathrm{Span}\left(C\right){\right)}_{\sim 1}$ be the 1-category of objects of $C$ and isomorphism class of spans between them as morphisms.

Then

• ${\mathrm{Span}}_{1}\left(C\right)$ is a dagger category.

Next assume that $C$ is a cartesian monoidal category. Then clearly ${\mathrm{Span}}_{1}\left(C\right)$ naturally becomes a monoidal category itself, but more: then

### Universal property of the 2-category of spans

(Dawson-Paré-Pronk 04) (…)

## Examples

• Spans in FinSet behave like the categorification of matrices with entries in the natural numbers: for ${X}_{1}←N\to {X}_{2}$ a span of finite sets, the cardinality of the fiber ${X}_{{x}_{1},{x}_{2}}$ over any two elements ${x}_{1}\in {X}_{2}$ and ${x}_{2}\in {X}_{2}$ plays the role of the corresponding matrix entry. Under this identification composition of spaces indeed corresponds to matrix multiplication.

• A cobordism $\Sigma$ from ${\Sigma }_{\mathrm{in}}$ to ${\Sigma }_{\mathrm{out}}$ is an example of a cospan ${\Sigma }_{\mathrm{in}}\to \Sigma ←{\Sigma }_{\mathrm{out}}$ in the category of smooth manifolds. However, composition of cobordisms is not quite the pushpout-composition of these cospans: to make the composition be a smooth manifold again some extra technical aspects must be added (“collars”).

## References

An exposition discussing the role of spans in quantum field theory:

The relationship between spans and bimodules is briefly discussed in

The universal property of categories of spans is discussed in

The structure of a monoidal tricategory on spans in 2-categories is discussed in

Generally, an (∞,n)-category of spans is indicated in section 3.2 of

Revised on April 26, 2013 11:12:08 by Noam Zeilberger (87.88.131.170)