Rel, bicategory of relations, allegory
left and right euclidean;
extensional, well-founded relations.
In category theory, an allegory is a category with properties meant to reflect properties that hold in a category Rel of relations. The notion was first introduced (as far as we know) and certainly first made famous in the book Categories, Allegories (Freyd-Scedrov).
Freyd and Scedrov argue that a categorical calculus of relations is an alternative and often more amenable framework for developing concepts traditionally couched in “functional” language (i.e., concepts which apply to sets and functions); for instance, a principal raison d’etre for regular categories is precisely that one can do relational calculus in them (as had been long known, e.g., Saunders MacLane showed how to calculate with relations to do diagram chases in abelian categories). Allegories, and correlative notions such as bicategories of relations, also offer a smooth approach to regular and exact completions, as used for example in the construction of realizability toposes.
A signal feature of allegories is emphasis on the modular law (see def. 1 below), which generalizes the modular law in lattices to more general relations, and which generalizes also so-called Frobenius reciprocity in categorical logic.
An allegory is a (1,2)-category $A$ equipped with an involution $(-)^o \colon A^{op} \to A$ which is the identity on objects, such that
If $C$ is a regular category and $Rel(C)$ is the locally posetal bicategory of relations, then $Rel(C)$ is an allegory.
Any first-order hyperdoctrine with equality similarly gives rise to an allegory, as does any abstract bicategory of relations in the sense of Carboni-Walters.
Any modular lattice can be regarded as a one-object allegory if we take composition to be union and the involution to be the identity.
A map in an allegory is a morphism that has a right adjoint. If $r \dashv s$, then $s = r^o$ (hint: use the modular law to show $r \dashv s \cap r^o$ and $r \cap s^o \dashv s$).
Any 2-category has a bicategory of maps. In an allegory, the ordering between maps is discrete, meaning that if $f \leq g$ then $f = g$. Consequently, the bicategory of maps of an allegory is a category.
A tabulation of a morphism $\phi$ is a pair of maps $f,g$ such that $\phi = g^o f$ and $f^o f \cap g^o g = 1$. An allegory is tabular if every morphism has a tabulation, and pretabular if every morphism is contained in one that has a tabulation.
Every regular category, and indeed every locally regular category, has a tabular allegory of internal binary relations. Conversely, by restricting to the morphisms with left adjoints (“maps”) in a tabular allegory, we obtain a locally regular category. These constructions are inverse, so tabular allegories are equivalent to locally regular categories.
A locally regular category has finite products if and only if its tabular allegory of relations has top elements in its hom-posets.
Finally, a unit in an allegory is an object $U$ such that $1_U$ is the greatest morphism $U\to U$, and every object $X$ admits a morphism $\phi\colon X\to U$ such that $1_X\le \phi^o\phi$. A locally regular category has a terminal object (hence is regular) if and only if its tabular allegory of relations has a unit.
Thus, regular categories are equivalent to unital (or unitary) tabular allegories. For more details, see Categories, Allegories, the Elephant, or Theory of units and tabulations in allegories.
A distributive allegory is an allegory whose hom-posets have finite joins that are preserved by composition. Thus a distributive allegory is locally a lattice. The category of maps in a unitary tabular distributive allegory is a pre-logos, and conversely the bicategory of relations in a pre-logos is a unitary tabular distributive allegory.
A division allegory is a distributive allegory in which composition on one (and therefore the other) side has a right adjoint (left or right division). That is: given $r \colon A \to B$ and $s \colon A \to C$, there exists $r/s \colon B \to C$ such that
(so that $- \circ r$ has right adjoint $-/r$: an example of a right Kan extension). Composition on the other side, $r \circ -$, has a right adjoint (an example of a right Kan lift) given by
In the bicategory of sets and relations, with notation as above, we have
where $r(a, b)$ is shorthand for ”$(a, b)$ belongs to $r$”.
The category of maps (functional relations) of a unitary/unital tabular division allegory is a logos, and conversely the bicategory of relations in a logos is a unitary tabular division allegory. (Categories, Allegories, 2.32, page 227.)
A power allegory is an allegory $\mathcal{A}$ such that the inclusion functor $Map(\mathcal{A}) \to \mathcal{A}$ has a right adjoint $P$. The counit at an object $B$ may be written
and we have the comprehension axiom? that to each $r \colon A \to B$ there is a map $\chi_r \colon A \to P(B)$ such that $r = \ni_B \circ \chi_r$.
A power allegory is a division allegory.
Let $r \colon A \to C$ and $s \colon B \to C$ be morphisms; we construct a right Kan lift $s \backslash r$ of $r$ through $s$. This means that for all $t \colon A \to B$ we have $s \circ t \leq r$ if and only if $t \leq s \backslash r$.
We construct $s \backslash r$ as $\chi_s^o [\geq] \chi_r$ where $[\geq] \colon P(C) \to P(C)$ is a relation opposite to the internalization $[\leq]$ of the external order. One way to define $[\leq]$ is
where $\bigcup \colon P P(C) \to P(C)$ internalizes the union operation, and is defined to be the map that classifies the composite
(Full details to appear.)
In other language, a power allegory is a division allegory which associates to each object $B$ a morphism $\ni_B \colon P(B) \to B$ such that for all $r \colon A \to B$
which expresses the truth of the formula $\forall_{a \colon A} \exists_{S: P(B)} \forall_{b \colon B} S \ni_B b \Leftrightarrow r(a, b)$, and
which internalizes an axiom of extensionality, which reads $\forall_{b \colon B} (S \ni_B b) \Leftrightarrow (T \ni_B b) \vdash S = T$. Given those axioms, and given $r \colon A \to B$, one may define
which internalizes the formula-definition $\chi_r(a, S) \coloneqq \forall_b S \ni_B b \Leftrightarrow r(a, b)$, and then show $\chi_r$ is a map. (See Categories, Allegories, pp. 235-236.)
The bicategory of relations in a topos is a power allegory; conversely, the category of maps in a unitary tabular power allegory is a topos.
Let $T$ be a regular theory. There is then an allegory $\mathcal{A}_T$ given as follows:
That $\mathcal{A}_T$ is an allegory is B.311 in Freyd–Scedrov; that it is in fact unitary and pre-tabular is B.312.
Further structure on $T$ gives rise to further structure on $\mathcal{A}_T$ (B.313): if $T$ is a coherent, first-order or higher-order theory, then $\mathcal{A}_T$ will be a distributive, division or power allegory respectively.
Every pre-tabular allegory has a tabular completion, given by splitting its coreflexive morphisms (i.e. those endomorphisms $R$ such that $R \subset id$). The category of maps in the coreflexive splitting of $\mathcal{A}_T$ is precisely the syntactic category of $T$.
There are two possible ways to interpret a regular formula of the form $\exists y. R(x,y) \wedge S(y,z)$ in a unitary pre-tabular allegory, if $R$ and $S$ are interpreted as $r \colon X \to Y$ and $s \colon Y \to Z$ respectively: as the composite $s \cdot r$, or more ‘literally’ by:
We would like to know that these morphisms are equal, so that an existential formula will have a unique interpretation:
We show inclusion in each direction.
Firstly, $s r = s r \cap p_2 p_1^o$, because the product projections tabulate the top morphism. Notice also that the RHS above is equal to
where $\top_{Y Z}$ is the top morphism $Y \to Z$.
Now we can calculate:
In the other direction, we have
and we are back to where we started. In the fourth-last step we used the fact that if $p_1, p_2 \colon Z \times Z \to Z$ are the projections, then $p_1 \cap p_2 = \Delta^o$. But $\Delta = \langle id, id \rangle$, and from lemma 1 here we have that $\langle id, id \rangle = p_1^o \cap p_2^o$.
Other attempted axiomatizations of the same idea “something that acts like the category of relations in a regular category” include:
bicategory of relations (a special sort of cartesian bicategory)
Discussion of the relation between pretabular unitary allegories and bicategories of relations, and also between tabular unitary allegories and regular categories is in
The standard monograph is
The notion is discussed also in chapter A3 of
In
it is shown that any bicategory of relations is an allegory.
See also