This entry is about the notion of spans/correspondences which generalizes that of relations. For spans in vector spaces or modules, see linear span.
Rel, bicategory of relations, allegory
left and right euclidean;
extensional, well-founded relations.
natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
Definitions
Transfors between 2-categories
Morphisms in 2-categories
Structures in 2-categories
Limits in 2-categories
Structures on 2-categories
In set theory, a span or correspondence between sets $A$ and $B$ is a set $C$ with a function $R:C \to A \times B$ to the product set $A \times B$. A span between a set $A$ and $A$ itself is a directed pseudograph, which is used to define categories in set theory.
In dependent type theory, there is a distinction between a span, a multivalued partial function, and a correspondence:
A span between types $A$ and $B$ is a type $C$ with families of elements $x:C \vdash g(x):A$ and $x:C \vdash h(x):B$
A multivalued partial function from type $A$ to type $B$ is a type family $x:A \vdash P(x)$ with a family of elements $x:A, p:P(x) \vdash f(x, p):B$
A correspondence between types $A$ and $B$ is a type family $x:A, y:B \vdash R(x, y)$.
However, from any one of the above structures, one could get the other two structures, provided one has identity types and dependent pair types in the dependent type theory. Given a type family $x:A \vdash P(x)$, let $z:\sum_{x:A} P(x) \vdash \pi_1(z):A$ and $z:\sum_{x:A} P(x) \vdash \pi_2(z):P(\pi_1(z))$ be the dependent pair projections for the dependent pair type $\sum_{x:A} P(x)$.
From every span one could get a multivalued partial function by defining the type family $x:A \vdash P(x)$ as $P(x) \coloneqq \sum_{y:C} g(y) =_A x$ and the family of elements $x:A, p:P(x) \vdash f(x, p):B$ as $f(x, p) \coloneqq h(\pi_1(x))$.
From every multivalued partial function one could get a span by defining the type $C$ as $C \coloneqq \sum_{x:A} P(x)$ and the family of elements $x:C \vdash g(x):A$ as $g(x) \coloneqq \pi_1(x)$.
From every multivalued partial function one could get a correspondence by defining the type family $x:A, y:B \vdash R(x, y)$ as $R(x, y) \coloneqq \sum_{p:P(x)} f(x, p) =_B y$.
From every correspondence one could get a multivalued partial function by defining the type family $x:A \vdash P(x)$ as $P(x) \coloneqq \sum_{y:B} R(x, y)$, and the family of elements $x:A, p:P(x) \vdash h(x, p):B$ as $h(x, p) \coloneqq \pi_1(p)$
From every span one could get a correspondence by defining the type family $x:A, y:B \vdash R(x, y)$ as $R(x, y) \coloneqq \sum_{z:C} (g(z) =_A x) \times (h(z) =_B y)$.
From every correspondence one could get a span by defining the type $C$ as $C \coloneqq \sum_{x:A} \sum_{y:B} R(x, y)$, the family of elements $z:C \vdash g(z):A$ as $g(z) \coloneqq \pi_1(z)$, and the function $z:C \vdash h(z):B$ as $h(z) \coloneqq \pi_1(\pi_2(z))$
Given types $A$, $B$, and $C$ and spans $(D, x:D \vdash g_D(x):A, x:D \vdash h_D(x):B)$ between $A$ and $B$ and $(E, y:E \vdash g_E(y):B, y:E \vdash h_E(y):C)$ between $B$ and $C$, there is a span
defined by
Given types $A$, $B$, and $C$ and correspondences $x:A, y:B \vdash R(x, y)$ and $y:B, z:C \vdash S(y, z)$, there is a correspondence $x:A, z:C \vdash (S \circ R)(x, z)$ defined by
In any category $C$, a span, or roof, or correspondence, from an object $x$ to an object $y$ is a diagram of the form
where $s$ is some other object of the category. (The word “correspondence” is also sometimes used for a profunctor.)
This diagram is also 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^op$ is called a co-span in $C$.
A span that has a cocone is called a coquadrable span.
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$:
we can take a pullback in the middle:
and obtain a span from $x$ to $z$:
This way of composing spans lets us define a bicategory Span$(C)$ with:
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 $Span(C)$ 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 $Span(C)$, 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?.)
By including functions as well, instead of a bicategory we obtain a pseudo-double category?.
Let $C$ be a category with pullbacks and let $Span_1(C) := (Span(C))_{\sim 1}$ be the 1-category of objects of $C$ and isomorphism classes of spans between them as morphisms.
Then
Next assume that $C$ is a cartesian monoidal category. Then clearly $Span_1(C)$ naturally becomes a monoidal category itself, but more: then
We discuss the universal property that characterizes 2-categories of spans.
For $C$ be a category with pullbacks, write
$Span_2(C) \coloneqq (Span(C))_{\sim2}$ for the weak 2-category of objects of $C$, spans as morphisms, and maps between spans as 2-morphisms,
$\eta_C: C \rightarrow Span_2(C)$ for the functor given by:
Now let
$K$ be any bicategory
$F, G \,\colon\, C \rightarrow K$ be functors such that every map in $C$ is sent to a map in $K$ possessing a right adjoint and satisfying the Beck-Chevalley Condition for any commutative square in $K$,
$\alpha \,\colon\, F \rightarrow G$ be a natural transformation.
Then:
(universal property of the bicategory of spans)
The following holds:
$\eta_C$ is universal among such functors $F$, i.e. $F$ as above factors as $F = \hat{F} \circ \eta_C$ for a functor $\hat{F} \,\colon\, Span_2(C) \rightarrow K$ which is unique up to isomorphism.
There exists a unique lax natural transformation: $\hat{\alpha} \,\colon\, \hat{F} \rightarrow \hat{G}$ such that $\hat{\alpha} \eta_C = \alpha$.
Let $x, y$ be objects in $C$ and $f: x \rightarrow y$ be a morphism in $C$. If $(\alpha_x, \alpha_y)$ induce a pseudo-map of adjoints $F(f) \dashv (Ff)^* \rightarrow G(f) \dashv (Gf)^*$, then $\hat{\alpha}$ is a pseudonatural transformation
Furthermore, if we denote $Pbk$ as the 2-category of categories with pullbacks, pullback-preserving functors, and equifibered natural transformations and $BiCat$ as the tricategory of bicategories, $Span(-): Pbk \rightarrow BiCat$ is well-defined as a functor.
Since a category of spans/correspondences $Corr(\mathcal{C})$ is evidently equivalent to its opposite category, it follows that to the extent that limits exists they are also colimits and vice versa.
If the underlying category $\mathcal{C}$ is an extensive category, then the coproduct/product in $Corr(\mathcal{C})$ is given by the disjoint union in $\mathcal{C}$. (See also this MO discussion).
More generally, every van Kampen colimit in $\mathcal{C}$ is a (co)limit in $Corr(\mathcal{C})$ — and conversely, this property characterizes van Kampen colimits. (Sobocinski-Heindel 11).
Correspondences may be seen as generalizations of relations. A relation is a correspondence which is (-1)-truncated as a morphism into the cartesian product. See at relation and at Rel for more on this.
Spans in FinSet behave like the categorification of matrices with entries in the natural numbers: for $X_1 \leftarrow 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_1$ and $x_2 \in X_2$ plays the role of the corresponding matrix entry. Under this identification composition of spans indeed corresponds to matrix multiplication. This implies that the category of spans of finite sets is equivalent to the Lawvere theory of commutative monoids, that is, to the PROP for the free bicommutative bialgebra. Spans over finite sets is a rig category with respect to the tensor products induced by the coproduct and product in FinSet. The coproduct in FinSet remains the coproduct, but the product becomes the bilinear tensor product of modules.
The Burnside category is essentially the category of correspondences in G-sets for $G$ a finite group.
A cobordism $\Sigma$ from $\Sigma_{in}$ to $\Sigma_{out}$ is an example of a cospan $\Sigma_{in} \to \Sigma \leftarrow \Sigma_{out}$ in the category of smooth manifolds. However, composition of cobordisms is not quite the pushout-composition of these cospans: to make the composition be a smooth manifold again some extra technical aspects must be added (“collars”).
In prequantum field theory (see there for details), spans of stacks model trajectories of fields.
The category of Chow motives has as morphisms equivalence classes of linear combinations of spans of smooth projective varieties.
The Weinstein symplectic category has as morphisms Lagrangian correspondences between symplectic manifolds.
More generally symplectic dual pairs are correspondences between Poisson manifolds.
Cospans of homomorphisms of C*-algebras represent morphisms in KK-theory (by Cuntz’ result).
Correspondences of flag manifolds play a role as twistor correspondences, see at Schubert calculus – Correspondences and at horocycle correspondence
The Fourier-Mukai transform is a pull-push operation through correspondences equipped with objects in a cocycle given by an object in a derived category of quasi-coherent sheaves.
A hypergraph is a span from a set of vertices to a set of (hyper)edges.
A category of correspondences is a refinement of a category Rel of relations. See there for more.
The terminology “span” appears on page 533 of:
The $Span(C)$ construction was introduced by Jean Bénabou (as an example of a bicategory) in
Bénabou cites an article by Yoneda (1954) for introducing the concept of span (in the category of categories).
An exposition discussing the role of spans in quantum theory:
The relationship between spans and bimodules is briefly discussed in
The relation to van Kampen colimits is discussed in
The universal property of categories of spans is due to
and further discussed in:
R. Dawson, Robert Paré, Dorette Pronk, Universal properties of Span, Theory and Appl. of Categories 13, 2004, No. 4, 61-85, TAC, MR2005m:18002
R. Dawson, Robert Paré, Dorette Pronk, The span construction, Theory Appl. Categ. 24 (2010), No. 13, 302–377, TAC MR2720187
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
Last revised on December 29, 2023 at 18:20:24. See the history of this page for a list of all contributions to it.