<s>
In	O
the	O
mathematical	O
field	O
of	O
category	O
theory	O
,	O
an	O
allegory	B-Algorithm
is	O
a	O
category	O
that	O
has	O
some	O
of	O
the	O
structure	O
of	O
the	O
category	O
Rel	O
of	O
sets	O
and	O
binary	O
relations	O
between	O
them	O
.	O
</s>
<s>
Allegories	B-Algorithm
can	O
be	O
used	O
as	O
an	O
abstraction	O
of	O
categories	O
of	O
relations	O
,	O
and	O
in	O
this	O
sense	O
the	O
theory	O
of	O
allegories	B-Algorithm
is	O
a	O
generalization	O
of	O
relation	O
algebra	O
to	O
relations	O
between	O
different	O
sorts	O
.	O
</s>
<s>
Allegories	B-Algorithm
are	O
also	O
useful	O
in	O
defining	O
and	O
investigating	O
certain	O
constructions	O
in	O
category	O
theory	O
,	O
such	O
as	O
exact	O
completions	O
.	O
</s>
<s>
A	O
first	O
example	O
of	O
an	O
allegory	B-Algorithm
is	O
the	O
category	O
of	O
sets	O
and	O
relations	O
.	O
</s>
<s>
The	O
objects	O
of	O
this	O
allegory	B-Algorithm
are	O
sets	O
,	O
and	O
a	O
morphism	O
is	O
a	O
binary	O
relation	O
between	O
and	O
.	O
</s>
<s>
In	O
a	O
category	O
,	O
a	O
relation	O
between	O
objects	O
and	O
is	O
a	O
span	O
of	O
morphisms	O
that	O
is	O
jointly	O
monic	B-Application
.	O
</s>
<s>
If	O
the	O
category	O
has	O
products	O
,	O
a	O
relation	O
between	O
and	O
is	O
the	O
same	O
thing	O
as	O
a	O
monomorphism	B-Application
into	O
(	O
or	O
an	O
equivalence	O
class	O
of	O
such	O
)	O
.	O
</s>
<s>
The	O
category	O
of	O
relations	O
for	O
a	O
regular	O
category	O
is	O
always	O
an	O
allegory	B-Algorithm
.	O
</s>
<s>
A	O
morphism	O
in	O
an	O
allegory	B-Algorithm
is	O
called	O
a	O
map	O
if	O
it	O
is	O
entire	O
and	O
deterministic	O
Another	O
way	O
of	O
saying	O
this	O
is	O
that	O
a	O
map	O
is	O
a	O
morphism	O
that	O
has	O
a	O
right	O
adjoint	O
in	O
when	O
is	O
considered	O
,	O
using	O
the	O
local	O
order	O
structure	O
,	O
as	O
a	O
2-category	O
.	O
</s>
<s>
Maps	O
in	O
an	O
allegory	B-Algorithm
are	O
closed	O
under	O
identity	O
and	O
composition	O
.	O
</s>
<s>
In	O
an	O
allegory	B-Algorithm
,	O
a	O
morphism	O
is	O
tabulated	O
by	O
a	O
pair	O
of	O
maps	O
and	O
if	O
and	O
An	O
allegory	B-Algorithm
is	O
called	O
tabular	O
if	O
every	O
morphism	O
has	O
a	O
tabulation	O
.	O
</s>
<s>
For	O
a	O
regular	O
category	O
,	O
the	O
allegory	B-Algorithm
is	O
always	O
tabular	O
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
for	O
any	O
tabular	O
allegory	B-Algorithm
,	O
the	O
category	O
of	O
maps	O
is	O
a	O
locally	O
regular	O
category	O
:	O
it	O
has	O
pullbacks	O
,	O
equalizers	O
,	O
and	O
images	O
that	O
are	O
stable	O
under	O
pullback	O
.	O
</s>
<s>
A	O
unit	O
in	O
an	O
allegory	B-Algorithm
is	O
an	O
object	O
for	O
which	O
the	O
identity	O
is	O
the	O
largest	O
morphism	O
and	O
such	O
that	O
from	O
every	O
other	O
object	O
,	O
there	O
is	O
an	O
entire	O
relation	O
to	O
.	O
</s>
<s>
An	O
allegory	B-Algorithm
with	O
a	O
unit	O
is	O
called	O
unital	O
.	O
</s>
<s>
Given	O
a	O
tabular	O
allegory	B-Algorithm
,	O
the	O
category	O
is	O
a	O
regular	O
category	O
(	O
it	O
has	O
a	O
terminal	O
object	O
)	O
if	O
and	O
only	O
if	O
is	O
unital	O
.	O
</s>
<s>
Additional	O
properties	O
of	O
allegories	B-Algorithm
can	O
be	O
axiomatized	O
.	O
</s>
<s>
Distributive	O
allegories	B-Algorithm
have	O
a	O
union-like	O
operation	O
that	O
is	O
suitably	O
well-behaved	O
,	O
and	O
division	O
allegories	B-Algorithm
have	O
a	O
generalization	O
of	O
the	O
division	O
operation	O
of	O
relation	O
algebra	O
.	O
</s>
<s>
Power	O
allegories	B-Algorithm
are	O
distributive	O
division	O
allegories	B-Algorithm
with	O
additional	O
powerset-like	O
structure	O
.	O
</s>
<s>
The	O
connection	O
between	O
allegories	B-Algorithm
and	O
regular	O
categories	O
can	O
be	O
developed	O
into	O
a	O
connection	O
between	O
power	O
allegories	B-Algorithm
and	O
toposes	O
.	O
</s>
