In the mathematical field of category theory, an allegory is a category that has some of the structure of the category Rel of sets and binary relations between them. Allegories can be used as an abstraction of categories of relations, and in this sense the theory of allegories is a generalization of relation algebra to relations between different sorts. Allegories are also useful in defining and investigating certain constructions in category theory, such as exact completions.
In this article we adopt the convention that morphisms compose from right to left, so RS means "first do S, then do R".
YouTube Encyclopedic

1/5Views:61 574171 3216 667 9774 011 4754 711 048

Philosophy of Mathematics: Platonism

Hidden Math in Alice in Wonderland

Plato’s Allegory of the Cave  Alex Gendler

Can you solve the Leonardo da Vinci riddle?  Tanya Khovanova

Plato’s best (and worst) ideas  Wisecrack
Transcription
Definition
An allegory is a category in which
 every morphism is associated with an antiinvolution, i.e. a morphism with and and
 every pair of morphisms with common domain/codomain is associated with an intersection, i.e. a morphism
all such that
 intersections are idempotent: commutative: and associative:
 antiinvolution distributes over intersection:
 composition is semidistributive over intersection: and and
 the modularity law is satisfied:
Here, we are abbreviating using the order defined by the intersection: means
A first example of an allegory is the category of sets and relations. The objects of this allegory are sets, and a morphism is a binary relation between X and Y. Composition of morphisms is composition of relations, and the antiinvolution of is the converse relation : if and only if . Intersection of morphisms is (settheoretic) intersection of relations.
Regular categories and allegories
Allegories of relations in regular categories
In a category C, a relation between objects X and Y is a span of morphisms that is jointly monic. Two such spans and are considered equivalent when there is an isomorphism between S and T that make everything commute; strictly speaking, relations are only defined up to equivalence (one may formalise this either by using equivalence classes or by using bicategories). If the category C has products, a relation between X and Y is the same thing as a monomorphism into X × Y (or an equivalence class of such). In the presence of pullbacks and a proper factorization system, one can define the composition of relations. The composition is found by first pulling back the cospan and then taking the jointlymonic image of the resulting span
Composition of relations will be associative if the factorization system is appropriately stable. In this case, one can consider a category Rel(C), with the same objects as C, but where morphisms are relations between the objects. The identity relations are the diagonals
A regular category (a category with finite limits and images in which covers are stable under pullback) has a stable regular epi/mono factorization system. The category of relations for a regular category is always an allegory. Antiinvolution is defined by turning the source/target of the relation around, and intersections are intersections of subobjects, computed by pullback.
Maps in allegories, and tabulations
A morphism R in an allegory A is called a map if it is entire and deterministic Another way of saying this is that a map is a morphism that has a right adjoint in A when A is considered, using the local order structure, as a 2category. Maps in an allegory are closed under identity and composition. Thus, there is a subcategory Map(A) of A with the same objects but only the maps as morphisms. For a regular category C, there is an isomorphism of categories In particular, a morphism in Map(Rel(Set)) is just an ordinary set function.
In an allegory, a morphism is tabulated by a pair of maps and if and An allegory is called tabular if every morphism has a tabulation. For a regular category C, the allegory Rel(C) is always tabular. On the other hand, for any tabular allegory A, the category Map(A) of maps is a locally regular category: it has pullbacks, equalizers, and images that are stable under pullback. This is enough to study relations in Map(A), and in this setting,
Unital allegories and regular categories of maps
A unit in an allegory is an object U for which the identity is the largest morphism and such that from every other object, there is an entire relation to U. An allegory with a unit is called unital. Given a tabular allegory A, the category Map(A) is a regular category (it has a terminal object) if and only if A is unital.
More sophisticated kinds of allegory
Additional properties of allegories can be axiomatized. Distributive allegories have a unionlike operation that is suitably wellbehaved, and division allegories have a generalization of the division operation of relation algebra. Power allegories are distributive division allegories with additional powersetlike structure. The connection between allegories and regular categories can be developed into a connection between power allegories and toposes.
References
 Peter Freyd, Andre Scedrov (1990). Categories, Allegories. Mathematical Library Vol 39. NorthHolland. ISBN 9780444703682.
 Peter Johnstone (2003). Sketches of an Elephant: A Topos Theory Compendium. Oxford Science Publications. OUP. ISBN 019852496X.