Dually, is

If both are satisfied, then above is left adjoint to .

This analogy continues in dimension 2 (for bicategories or double categories), yielding the *colax* functors as double profunctors with the reflection property and the *lax* functors as double profunctors with the coreflection property. If a double profunctor has both property, it determines a colax/lax adjunction.

A *double category* consists of objects (), vertical arrows (), horizontal arrows (), and cells (). Each arrow is assigned its start and end point, as two (not necessarily distinct) objects, called the ‘domain’ and ‘codomain’. Each cell is assigned its *boundary* , depicted as

There is a horizontal composition on the horizontal arrows , and on the cells , and a vertical composition on the vertical arrows and on the cells . Two items of similar kind are composable (in a specific order) if their respective boundaries coincides.

The compositions has identity elements: each object determines a horizontal and a vertical identity [denoted by and , respectively], and each arrow [resp. ] determines an identity cell with boundary [resp. ].

And finally, the compositions are

**Examples:**

- Any category can be seen as a double category, with the arrows playing the role of both vertical and horizontal arrows, and the cells being the
*commutative squares*. - Any bicategory naturally determines a double category, in which the only vertical arrows are the identities. Thus all things written below are valid as well for (co)lax functors between bicategories.
- In the double category of rings, the objects are the rings, the vertical arrows are ring homomorphisms, the horizontal arrows are the
*bimodules*with composition the*tensor product*, and a cell is a map which preserves addition and satisfies for all . - In the double category of categories the objects are the categories, the vertical arrows are functors, the horizontal arrows are the profunctors, and a cell is simply a functor such that and , where profunctors are regarded as categories (over the arrow), as in our profunctor post.

Let be a double category. Then, as vertical composition (either of vertical morphisms or of cells) is strictly associative, we obtain

- a category with the same objects as and the vertical arrows as arrows (hence forgetting horizontal arrows and cells)
- a category with horizontal arrows as objects and cells with vertical composition as arrows (forgetting only the horizontal compositions)

Accordingly, the notation means that is a horizontal arrow of .

Let and be double categories. Then a *double profunctor* from to can be defined as a double category , disjointly containing (isomorphic copies of) and , such that any further cell has a boundary with and . These additional cells are called ‘*heterocells*‘ or ‘*through cells*‘, and are the (necessarily vertical) ‘*heteromorphisms*‘ or ‘*through arrows*‘.

(Alternatively, a double profunctor can be viewed as a strict functor where is the ‘vertical arrow’ double category, containing 2 objects, and a single nonidentity vertical arrow .)

Recall that an arrow in a category is a *reflection arrow* to a subcategory if and for every , there is a unique such that .

**Definition.** A double profunctor has the *reflection property*, if there are a collection of heteromorphisms and a collection of heterocells, such that

a) each is a reflection arrow from to within ,

b) for every horizontal , the boundary of is of the form for some ,

c) and each is a reflection arrow from to within .

The main observation is that these already induce the following *comparison cells*:

- For any , the horizontal identity cell of uniquely factors through , i.e. there is a cell such that .

By b) it follows that the left and right side of the boundary of must be vertical identities, also its bottom is a horizontal identity. - For any consecutive horizontal arrows in , the horizontal composition uniquely factors through , yielding a cell such that .

Based on similar considerations as above, if we write for the codomain of and for the bottom of , then the boundary of is .

That is, what this data describes is nothing else but a **colax functor**.

We can also convert this (assuming choice, of course): it is not hard to construct a double profunctor for any colax functor by adding formal heteroarrows and heterocells and defining their horizontal composition using the comparison cells.

Dually, a double profunctor with the *coreflection property* is basically a **lax functor**.

And, if a double profunctor has both the reflection and the coreflection property, then the corresponding colax and lax functors determine a so called **colax/lax adjunction**.

**Examples:**

- Consider the forgetful functor from unital rings to monoids (which forgets addition), and extend it to their bimodules. This way we obtain a
*lax functor*. [todo:*what are the cells in the corresponding double profunctor?*] - [todo: by binary relations and Boolean relations. A heterocell has each side as a binary relation, and it exists with such boundary iff we get both containment of (left-to-right) compositions and [..or something like this..]]

[1] “Bridges and Profunctors”, PhD dissertation, Bertalan Pécsi

]]>Recall that a category is a directed graph equipped with an associative and unital *composition* of its edges. In the categorical context, the nodes of the graph are also called *objects* and edges are called *arrows* or *morphisms*. The unitality requirement says that each object has a unit arrow , called *identity*, which doesn’t affect the result of the compositions.

A *functor* is a composition and identity preserving graph morphism from a category to a category.

A *profunctor*, on the other hand, connects up two categories by (potentially) adding more morphisms in between them ‘from the outer world’. In other perspective, we can describe this setting as one of the two categories *acting from the left* and the other one *acting from the right* on the newly added morphisms. This can also be grasped as simply being a two variable functor to the category of sets, contravariant in the first argument.

Here we collected some definitions, each being equivalent to each other, in the sense that the given ‘structures’ can be uniquely transformed into each other.

In what follows, let and be two categories.

**Def.1.** A category is called a profunctor between and , if it disjointly and fully contains and and any other arrow of goes from an object of to an object of .

Such arrows of are called *heteromorphisms* or *through arrows*.

So, a profunctor connects up and by adding heteromorphisms of the form which can be (interchangeably) composed by morphisms of from the left and by morphisms of from the right, in order to make itself a category.

**Def.2.** A profunctor is a category over the arrow, i.e. it is a functor for some category , where denotes the arrow category which has objects, call them and , and one arrow .

We can obtain the left and right base categories and as the inverse image of objects and of , respectively, and of their identities.

A categorical way to express this (but only up to isomorphism) is to use pullbacks

.

Importantly, the -preimage of the arrow consists exactly of the heteromorphisms of .

**Def.3.** A profunctor is a functor .

It simply assigns the set of heteromorphisms to the object pair , and assigns the function to the morphism pair .

In other words, given the category as above, take its hom functor and restrict it to .

Conversely, a given functor determines a category by adding the elements of *regarding* them as heteromorphisms , and by defining the compositions as the image of under the function .

———

A *span* between sets and is a pair of functions , for some set .

This can be visualized as a kind of bipartite graph between and , the elements of being the edges, and assigns their sources from while assigns their targets from .

Note, however that and as sets may overlap, in particular, we allow , when a span becomes exactly a *directed graph* (or *quiver*), having the starting and end points of the edges in the same set.

In other perspective, a span associates the set of edges from to for a given pair . Said that, a span is none other than a ‘function’ : a profunctor at the level of sets.

Spans can be ‘*composed*‘ as follows:

Let and be two spans. Their composite span between and consists of all length paths of the form with .

This way, spans are organized in a *bicategory* structure as arrows between sets. Bicategories provide a level of abstraction where general left and right actions can be nicely defined and studied, by means of their ‘*internal monoids*‘ (also called *monads* in this context).

An internal monoid in a bicategory is, roughly, an arrow equipped with an ‘associative, unital operation’ .

The internal monoids in the bicategory of spans turn out to be just the categories.

A left action of an internal monoid on an arrow is a which is compatible with . A right action can be dually defined.

If and are monoids, a *bimodule* between them is an arrow equipped with a left and a right action at once, compatible with each other, in the sense that they provide a unique two sided action .

**Def.4.** A profunctor is a bimodule in the bicategory of spans.

Likewise, any functor can be regarded as a kind of fibration over . Each object determines a fibre category with arrows which are mapped to .

In this generality, the fibres connect up by means of *profunctors* between them and then and the original composition of are encapsulated in the arising mapping .

More specifically, given any arrow , its preimage determines [is] a profunctor between categories and , all within .

For a composable pair of arrows , we obtain a *comparison map* , which is just the composition defined in of the occuring pairs of arrows.

The comparison maps make this mapping a ‘normal lax functor’.

Under certain hypothesis on , all the arising profunctors become functorial (when each object from the source category has a reflection on the target category), yielding a normal lax functor . Such an is called an opposite *Grothendieck prefibration*. The reflection arrows are also called *(weak) cartesian morphisms* of .

If they are closed under composition in , the comparison maps become invertible, so that composition of the profunctors is and we talk about *Grothendieck opfibration*.

Its dual notion, when all profunctors are opfunctorial, is the *Grothendieck (pre-)fibration*.

**Def.1**

A functor is called a *left adjoint* to a functor if there is a bijection between the homsets:

natural in both and . In this case is called a right adjoint to , and we write .

**Def.2**

A functor is called a *left adjoint* to a functor if there are natural transformations and satisfying the *zig-zag identities*:

So, *why* are these two definitions equivalent?

We start out from Def.2, as it generalizes to arbitrary bicategory or double category, which enable morphisms (‘*transformations*‘) between [parallel] arrows, depicted .

We will use the bicategory which has functors as arrows and natural transformations as transformations, and the bicategory which has profunctors as arrows. And we will pass them to Ehresmann’s double category construction.

In this generality one can already prove uniqueness of left/right adjoint for a given arrow and the following interchanging rules, which assert one-to-one correspondences between the below transformations, supposed :

(E.g. if given , we have , now we can use to obtain .)

Note that, both sides of the natural bijection in Def.1 are functors , i.e. are *profunctors*.

Specifically, they above are denoted by and , that is, for a single functor , we define

(In the terminology of heteromorphisms, we can get if we take a copy from each arrow in of the form and regard them as heteromorphisms .)

Importantly, it turns out that there is an adjunction in the bicategory .

The mappings and extend to two natural embeddings of the bicategory , whose arrows are the functors, into .

Note that is contravariant on arrows (reverses source/target and composition of functors) while is contravariant on the natural transformations.

To express these as covariant mappings, the notations and are introduced, for the bicategory obtained from by reversing arrows / transformations, respectively.

Using the interchange rules, we show below how to arrive to the embedding when starting out from , touching an embedding of *double categories*, , in the middle of the way:

A diagram of functors with induces and is determined by any of the following profunctor morphisms:

In a *double category*, transformations are supported by a pair of ‘*vertical arrows*‘ (regarding the original arrows as horizontal ones), and thus are depicted and also called as *squares* (or ‘cells’).

Horizontally adjacent squares, as well as horizontal arrows can be associatively composed horizontally, with units.

Vertically adjacent squares, as well as vertical arrows can be associatively composed vertically, with units.

The so called *Ehresmann* double category can be defined for any bicategory : all the arrows of are considered both vertical and horizontal in , with squares as transformations .

Now we are ready to define our embedding : its source is the double category , and its target is the double category , and flips horizontal arrows and composition.

So that . All objects (the categories) are fixed, a horizontal arrow (a functor ) is mapped to , while a vertical arrow (a functor ) is mapped to and a square is mapped to the corresponding square of . Compositions just work fine.

Adjunction in a double category is interpreted between a *vertical* and *horizontal* , in such a way that in for a bicategory translates readily to being left adjoint to in , according to Def.2.

If we flip horizontal arrows in a double category, adjunctions become *companions*:

A pair of horizontal and vertical arrows , are said to be a *companion* pair, if there exist squares as below

such that and (vertical composition) .

It is easy to see, that a companion in is just a pair of parallel isomorphic arrows in .

Since flips horizontal arrows, takes adjunctions to companions and companions to adjunctions.

Moreover, is surjective on squares.

Put it all together, we get that

two functors are naturally isomorphic if and only if there is an adjunction of profunctors . (This is basically one of the key observations above that .)

And, finally,

two functors are adjoint according to Def.2 if and only if we have an isomorphism of profunctors , i.e. Def.1 holds.

**Remark.** Actually, there are issues about formalizing Ehresmann’s construction for general bicategories.

When composition of arrows in a bicategory is strictly associative, we indeed get a (still strictly associative) double category . Otherwise, however, the resulting double category would be only *weakly* associative both horizontally and vertically, and such animals can only be defined by workarounds, e.g. using higher dimension categories with special collapses.

But don’t panic, we can still make things precise by introducing adequate maps from double categories to bicategories, so that would become such a map , with all its good properties, in particular taking companions to adjunctions and an adjunction to a pair of isomorphic arrows.

]]>We define a bridge as a category over , i.e. a category equipped with a functor . The full subcategories and are called *banks* of the bridge, and we write .

The arrows in the -preimage of the two arrows in are referred to as *through arrows* or *heteromorphisms* in the bridge.

In other words, a category is a bridge between categories and if these are disjoint full subcategories of and has no more objects.

Recall that the idempotent completion of a category has all the idempotent arrows of as objects (i.e. those satisfying ), and a morphism of is considered as an arrow in whenever .

**Theorem 1.** Two categories are equivalent if and only if there is a bridge between them where each object has an isomorphic fellow object on the other bank (called equivalence bridge).

**Proof.** Given a bridge with this property, using axiom of choice, we can fix an isomorphism for each object on one bank, and use them to define an equivalence functor.

Given equivalent categories , take an isomorphism of their skeletons , this induces a bridge , which can be extended on both banks.

There is a similar characterization for Morita equivalence of categories.

**Theorem 2.** Two categories are Morita equivalent if and only if there is a bridge between them where each (identity) morphism can be written as a composition of through arrows (called Morita bridge).

Put these together, we arrive to the well known

**Theorem 3.** Two categories are Morita equivalent if and only if their idempotent completions are equivalent.

**Proof.** Consider a Morita bridge and take its idempotent completion . For each object we have for some through arrows . But then is an idempotent in , isomorphic to in . This implies that every , thus also every idempotent on has an isomorphic fellow in , so, by symmetry, is an equivalence bridge.

For the other direction, if is an equivalence bridge, consider its restriction on both banks to . Then any is isomorphic to an idempotent in , say by , and in we have maps that ensures a composition of as heteromorphisms.

Objects of will be regarded as abstract

We define a formal logic by introducing the formulas as diagrams in of shape of a directed

**Definition.** Such a given tree is said to be *valid* in a given model (in notation ), if `Eve`

has a winning strategy against `Adam`

in the following game:

– `Adam`

starts the game by saying an interpretation of the root of in the model. [`Eve`

automatically wins if there is no such interpretation.]

– After a move , the other player has to find a next arrow in the tree and say an interpretation making the triangle commutative: .

– If a player cannot make a next move (either a leaf is reached, or there is no such interpretation), loses.

For example, if a tree consists of a single arrow , then means that is an -injective object (all interpretations of in *extend* to interpretations of along ), in other words, that has the *left lifting property* with respect to , where is an initial object of .

In general, the moves of *universal* choices (‘‘), the branches which he can choose -on even levels-, correspond to *conjunction* (‘‘), and dually the moves of `Eve`

correspond to *existential* choices (‘‘), and her branches -on odd levels- to *disjunction* (‘‘).

We define a *first order situation* for a fixed similarity type , to be a pair where is any set and is a set of elementary formulas (using the given relations symbols or equality for terms) built up by variables from .

We can simply set be the preorder category induced by if ( and ).

An interpretation in a type first order model is a mapping such that each element of holds under the evaluation .

A class of models is axiomatizable by universal / existential / positive / negative formulas iff it is closed under submodels / extensions / homomorphic images / surjective homomorphic preimages.

Assume we are given a class of ‘models’ and a class of formulas, forming a *(complete) Boolean algebra* (so that operations ‘and’/’or’ are defined for arbitrary many formulas), and assume we are given the ‘validity’ relation between them, which is ‘elementlike’, i.e. and .

Let .

We write and

.

A class of models is axiomatizable by -formulas if for some , equivalently, if .

Let be a reflexive binary relation on the class of models (typically stating the existence of a morphism of certain type), and write , similarly define .

**Definition.** A binary relation is *modelwise expressible* by -formulas, if for every model there is a formula which is valid on , and whenever , it implies .

**Examples.**

Let the formulas be infinitary first order formulas for a similarity type , and the models be the corresponding relational / algebraic structures.

- Let mean that is a
*homomorphic image*of , i.e. isomorphic to a quotient of , and choose to be the class of*positive*formulas. Setwhere is the conjunction of all atomic predicates that hold in , the element replaced by the corresponding variable .

- Let mean that is isomorphic to a
*substructure*of , i.e. there is a relationally full embedding , and choose to be the class of*existential*formulas. Setwhere runs over atomic formulas which are not valid on under the substitution .

**Theorem.** Suppose is modelwise expressible by -formulas. Then

a) If , then is axiomatizable by -formulas.

b) If , then is axiomatizable by disjunctions of -formulas.

*Proof.*

a) Let and . As , we have yielding a with which shows by hypothesis that .

b) Let and . We want to show .

Define and . Then , so , meaning that there is an for which .

Now use the hypothesis for model : there is a , so that . But it can’t be in because , so , yielding thus .

This theorem proves one direction in all of the above mentioned preservation theorems.

The converse direction, that the specific types of formulas are preserved under the specific operator on the class of models is a straightforward verification in each case.

However, we can prove a common generalization for them, using the more specific logic described in this post.

Let be an arbitrary profunctor with an initial object , objects of regarded as ‘situations’ and objects of as ‘models’, and introduce the relation ‘*diagonal fill-in*‘ (or ‘*left lifting property*‘) between arrows of and arrows of as follows:

that is, iff every commutative square with on the top and on the bottom has a diagonal fill-in making the whole diagram commutative:

For a subclass of morphisms , we write . Similarly, for , let .

For example, in the first order case, we have

surjective morphisms of , and

injective morphisms of . Moreover,

whenever , and

whenever and consists only of equations.

Universal formulas correspond to those trees in which `Eve`

doesn’t select new variables (so that the part doesn’t change in arrows on odd levels), and positive formulas correspond to trees in which `Adam`

doesn’t select new relations or equations to hold (so that the part is empty in the root situation and doesn’t change in arrows on even levels).

**Theorem.** Let be an arbitrary class of morphisms in , and let be a tree in which every arrow `Eve`

can possibly choose is in . Then implies .

Dually, if is of the above form, then implies .