# Maths - Category Theory - Adjunctions

An adjunction is a looser relationship between structures than isomorphism or equivalence. On the previous page about equivalence we looked at 'equivalence as an isomorphism upto isomorphism':

• GF1C
• FG1D

We could look at adjunctions as a further weakening so that, instead of 2 isomorphisms of mappings we just have 2 mappings of mappings (natural transformations):

• unit: μ : 1c => GF
• co-unit: ξ : FG => 1d

The topic of adjunctions is a very powerful concept but can be difficult to understand, it might therefore help to approach the subject from different directions. We give two definitions and show that they are the same.

## Definition 1

 An adjunction is given by a pair of functors, F and G. Equipped with natural transformations unit: μ : 1c =>GF co-unit: ξ : FG => 1d such that the diagrams on the left (known as the triangle identities) commutes. We can look at this in terms of the components. At first it may appear that we cannot use natural transformations because the arrows between C and D go in opposite directions and therefore the domains and codomains are not the same. However we can rearrange the diagram so that a natural transformation goes between 1 and GF and another one goes between FG and 1. This (perhaps over-complicated) diagram is trying to represent the natuality squares of the two natural transformations and how they all link together..

For adjunctions there is a arrow in both directions between the two objects. It is not necessary that GF and FG are the identity elements but only that they have natural transformations to/from the identity elements.

FG is unit (does not change object - injective followed by surjective) but GF does change object (surjective followed by injective). Like equivalence but in one direction.

The above diagrams can also be represented as 2-cells:

## Definition 2

In this approach we are still using isomorphisms between morphisms but in an apparently different way that turns out to be the same.

We have an isomorphism between a morphism in C and a morphism in D. Until now, to compare morphisms, we have used natural transformations. But natural transformations can only compare morphisms with the same domain and codomain here the morphisms, being compared, are not even in the same category.

This comparison is called a 'natural isomorphism' as follows:

We have arrows in C which are isomorphic to arrows in D. Shown here as red arrows.

An adjunction is given by a natural isomorphism

 morphisms in D morphisms in C φ: D( F x , y ) → C( x , G y )
for every xC and yD
which is naturally isomorphic in both x and y

What are the functors that are naturally isomorphic?

Cop→ set

 D(F _,y) x D(F x,y)

Cop→ set

 C(_,G y) x C(x,G y)

D→ set

 D(F x,_) y D(F x,y)

D→ set

 C(x,G _) y C(x,G y)

So the naturality square in x is:

 We precompose with F f to get: fx -> fx' -> y

### String Diagrams

String diagrams are the Poincaré dual of the usual category theoretic diagrams, they can be useful for 2-categories such as adjunctions. (more about string diagrams on this page).

Category Diagram String Diagram
We start with a diagram like this (F is left adjoint to G) and add 2 natural transformations below (η and ξ) with the following axioms.
We take this diagram: between functors and put it in a diagram with the objects. The string diagram has the identity functor omitted as explained above. Also, for simplicity, ξ is not shown in a circle.
And again for η.
Now for the triangle equalities. In the string diagram it just looks like we can pull the line straight.
The other triangle equality

## Examples

### Example 1 - Preordered Set

Here we work in the category of preordered sets (I have illustrated this as a directed graph, I find it helpful to use draw directed graphs as described in the box on the right)

 Here we look at a perordered set ≤(red) and a mapping to another perordered set (blue). The morphism between them (green) preserves the ordering. That is: if a ≤ a' then F(a) ≤ F(a') So is there a mapping (G) back from B to A that preserves as much structure as possible in some unique way? Here is a first attempt, as we can see we can compose these morphisms and still preserve the order structure :if a ≤ a' then GF(a) ≤ GF(a'). However, it does not do this in a unique way, there are many mappings for G that could have done this. So lets add another condition: GF(a) ≤ a This condition is not met for our first choice of G (on the diagram on the left this is interpreted as reversing one of the red arrows). However, given the morphism F then there is a way to choose a way to choose the morphism G so that the order is preserved relative to the original sequence. For instance, if the number the elements of 'A' with ascending values. We then map these values onto 'B' using the morphism 'F'. We can then determine G by mapping the highest value for each element in 'B' to the corresponding number in 'A'. G is then the adjoint of F. So, for adjoint morphisms: F(a) ≤ b if and only if a ≤ G(b) Now we have a unique mapping G we can go on to show the unit and co-unit: μ : 1c =>GF So the unit maps 1c to GF as in this diagram. In this diagram we can't derive mappings from movement of points, we just map the mappings directly. I added in the purple arrows to make it into a graph, they are not really generated by GF. ξ : FG => 1d In this case the co-unit is trivial.

#### Same Thing Using Definition 2

 In this case we take an element 'A' of C and an element 'X' of D. We can then determine GX and FA by following the arrows. The arrow A->GX is then isomorphic to the arrow FA->X. This must be so for any 'A' in C and 'X' in D.

### Example 2 - Monoid

This example looks at extremes such as the forgetful functor in one direction (which removes all structure and leaves the underlying set) and the free algebra in the other direction (see Presentation of a group. Free algebra has generators but not relations).

'term' or 'word' algebras determines an adjunction

So,

• F is the forgetful functor which goes from monoid to set and removes the structure (multiplication and identity) and,
• G goes from set to monoid and creates a free monoid, since there are no relations, the elements of the set don't interact and remain as a word or list.

therefore:

• μ : 1monoid =>GF is a transformation within monoid, which forgets the existing structure and creates a free structure.
• ξ : FG => 1set is a transformation within set, which creates a free monoid (list) and then forgets the structure to return the elements of the set.

Question 1: What does the forgetful functor do to list? Does it return just the characters of the set? (in this case the characters A,B,C,D,E) or does it return an infinite set whose elements are every possible list?

Question 2: Is Monoid left or right adjoint to Set? What is the other adjoint?

The basis on a vector space

The free group on a set

G G / [G,G] commutator subgroup

universal enveloping algebra of a Lie algebra

completion of a metric space

## Examples

Category of graphs described on page here.

 Between reflexive graph and set. In reflexive graph: every node has loop to itself.
 Between irreflexive graph and set. In irreflexive graph: every node does not have loop to itself.
 Between dynamical system graph and set. In dynamical system graph: every node has one outgoing arrow.
 Different dynamical system graph and set. This time the morphism to set defines the fixpoints.

### Poset

An endofunctor on posets models closure. Posets don't have loops, therefore defined by fixpoints.

 Define T: P -> P with x <= T x T² x <= T x gives T² <= T (that is it is idempotent)

Which gives an adjunction: t i

This is discussed as a monad on page here.

Implementing Posets in FriCas program is discussed on page here.

Category
type theory quantifiers

substitution

(Cartesian maps)

existential,sum Σ

weakening

weakening universal, product Π
equality contraction
truth comprehension or subset types
equality comprehension
quotients equality

### Other Pages on this site

• Category of graphs described on page here.
• Implementing Graphs in FriCas program is discussed on page here.
• Implementing Posets in FriCas program is discussed on page here.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

 Conceptual Mathematics - This is a book about category theory that does not assume an extensive knowledge over a wide area of mathematics. The style of the book is a bit quirky though.