Consider the space of bounded sequences of real numbers, together with the supremum norm. We would like to define a notion of limit which holds for *every* and satisfies the well known properties of standard limit:

*Linearity:*.*Omogeneity:*.*Monotonicity:*if for every then .*Nontriviality:*if for every then .*Consistency:*if the limit exists in the classical sense, then the two notions coincide.

The consistency condition is reasonable also because it avoid trivial cases: if we fix and we define the limit of the sequence as the value , then the first four properties are satisfied.

Let us recall the classical definition of limit: we say that converges to if and only if, for every , the set of values such that is *cofinite*, *i.e.*, has a finite complement. The family of cofinite subsets of (in fact, of any set ) has the following properties:

*Upper closure:*if and then .*Meet stability:*if then .

A family of subsets of with the two properties above is called a *filter* on . An immediate example is the *trivial filter* ; another example is the *improper filter* . The family of cofinite subset of is called the *Fréchet filter* on . The Fréchet filter is not the improper one if and only if is infinite.

An *ultrafilter* on is a filter on satisfying the following additional conditions:

*Properness:*.*Maximality:*for every , either or .

For example, if , then is an ultrafilter on , called the *principal ultrafilter* generated by . Observe that : if we say that is *free*. These are, in fact, the only two options.

**Lemma 1.** For a proper filter to be an ultrafilter, it is necessary and sufficient that it satisfies the following condition: for every and nonempty , if then for at least one .

*Proof:* It is sufficient to prove the thesis with . If with , then is a proper filter that properly contains . If the condition is satisfied, for every which is neither nor we have , thus either or .

**Theorem 1.** Every nonprincipal ultrafilter is free. In addition, an ultrafilter is free if and only if it extends the Fréchet filter. In particular, every ultrafilter over a finite set is principal.

*Proof:* Let be a nonprincipal ultrafilter. Let : then , so either there exists such that and , or there exists such that and . In the first case, ; in the second case, we consider and reduce to the first case. As is arbitrary, is free.

Now, for every the set belongs to but not to : therefore, no principal ultrafilter extends the Fréchet filter. On the other hand, if is an ultrafilter, is finite, and , then by maximality, hence for some because of Lemma 1, thus cannot be a free ultrafilter.

So it seems that free ultrafilters are the right thing to consider when trying to expand the concept of limit. There is an issue, though: we have not seen any single example of a free ultrafilter; in fact, we do not even (yet) know whether free ultrafilters do exist! The answer to this problem comes, in a shamelessly nonconstructive way, from the following

**Ultrafilter lemma.** Every proper filter can be extended to an ultrafilter.

The ultrafilter lemma, together with Theorem 1, implies the existence of free ultrafilters on every infinite set, and in particular on . On the other hand, to prove the ultrafilter lemma the Axiom of Choice is required, in the form of Zorn’s lemma. Before giving such proof, we recall that a family of sets has the *finite intersection property* if every finite subfamily has a nonempty intersection: every proper filter has the finite intersection property.

*Proof of the ultrafilter lemma.* Let be a proper filter on and let be the family of the collections of subsets of that extend and have the finite intersection property, ordered by inclusion. Let be a totally ordered subfamily of : then extends and has the finite intersection property, because for every finitely many there exists by construction such that .

By Zorn’s lemma, has a maximal element , which surely satisfies and . If and , then still has the finite intersection property, therefore by maximality. If then still has the finite intersection property, therefore again by maximality.

Suppose, for the sake of contradiction, that there exists such that and : then neither nor have the finite intersection property, hence there exist such that . But means , and means : therefore,

against having the finite intersection property.

We are now ready to expand the idea of limit. Let be a metric space and let be an ultrafilter on : we say that is the *ultralimit* of the sequence along if for every the set

belongs to . (Observe how, in the standard definition of limit, the above set is required to belong to the Fréchet filter.) If this is the case, we write

Ultralimits, if they exist, are unique and satisfy our first four conditions. Moreover, the choice of a principal ultrafilter corresponds to the trivial definition . So, what about free ultrafilters?

**Theorem 2.** Every bounded sequence of real numbers has an ultralimit along every free ultrafilter on .

*Proof:* It is not restrictive to suppose for every . Let be an arbitrary, but fixed, free ultrafilter on . We will construct a sequence of closed intervals , , such that and for every . By the Cantor intersection theorem it will be : we will then show that .

Let . Let be either or , chosen according to the following criterion: . If both halves satisfy the criterion we just choose one once and for all. We iterate the procedure by always choosing as one of the two halves of such that .

Let . Let , and let be so large that : then , thus . As the smaller set belongs to , so does the larger one.

We have thus almost achieved our original target: a notion of limit which applies to every bounded sequence of real numbers. Such notion will depend on the specific free ultrafilter we choose: but it is already very reassuring that such a notion exists at all! To complete our job we need one more check: we have to be sure that the definition is consistent with the classical one. And this is indeed what happens!

**Theorem 3.** Let be a sequence of real numbers and let . Then in the classical sense if and only if for every free ultrafilter on .

To prove Theorem 3 we make use of an auxiliary result, which is of interest by itself.

**Lemma 2.** Let be the family of collections of subsets of that have the finite intersection property. The maximal elements of are precisely the ultrafilters.

*Proof:* Every ultrafilter is clearly maximal in . If is maximal in , then it is clearly proper and upper closed, and we can reason as in the proof of the ultrafilter lemma to show that it is actually an ultrafilter.

*Proof of Theorem 3:* Suppose does not converge to in the classical sense. Fix such that the set is infinite. Then the family has the finite intersection property: let be a free ultrafilter that extends it. Then , and does not have an ultralimit along .

The converse implication follows from the classical definition of limit, together with the very notion of free ultrafilter.

Theorem 3 does hold for sequences of real numbers, but does not extend to arbitrary metric spaces. In fact, the following holds, which we state without proving.

**Theorem 4.** Let be a metric space. The following are equivalent.

- For some free ultrafilter on , every sequence in has an ultralimit along .
- For every free ultrafilter on , every sequence in has an ultralimit along .
- is compact.

Ultrafilters are useful in many other contexts. For instance, they are used to construct *hyperreal numbers*, which in turn allow a rigorous definition of infinitesimals and the foundation of calculus over those. But this might be the topic for another Theory Lunch talk.

]]>

In Agda, proofs and programs are the same thing, types are sets are propositions. These sets contain values of that type, or equally they contain proofs of that proposition.

Agda is a very expressive language so very little is built in and most things can be defined in a library. We will define some of those things now to see how they work.

module talk where

Natural numbers (0,1,2,3,…) can be seen as being defined by either `zero`

or the successor (+1) `suc`

of another natural number.

data Nat : Set where zero : Nat suc : Nat → Nat

Addition `_+_`

takes two natural numbers and returns another. It can be defined by recursion (induction) on the first argument. If it is `zero`

we return `n`

and if it is successor we can make a recursive call to `(m + n)`

and apply the successor to the result. The recursive call (inductive hypothesis) is valid as `m`

is structurally smaller than `suc m`

.

_+_ : Nat → Nat → Nat zero + n = n suc m + n = suc (m + n)

Having defined one function we now want to prove something about it. One can think of this as an exercise in formal verification. I want to prove that `_+_`

satisfies some equations. There is an equals sign in the definition above but this is not the one I should use to state my equations. The `=`

is the definitional equality symbol and denotes equations that the computer can see are true. I want to *prove* some things that the computer isn’t able to see for itself.

The notion we need is propositional equality which is a relation we will define now. In another language one might expect a relation to have type like `Nat → Nat → Bool`

which might return true if the natural numbers were equal. In Agda we would use `Set`

instead of `Bool`

and the set would be inhabited if the relation holds. We can define propositional equality `_≅_`

once and for all for any set `A`

which we write as an implicit parameter `{A : Set}`

. Remarkably this set has only one canonical inhabitant `refl`

which is inhabits the type of equations between really identical (definitionally equal) values. This may seem strange but one can prove (derive) the other properties, such as symmetry and transitivity.

-- propositional equality data _≅_ {A : Set} : A → A → Set where refl : ∀{a} → a ≅ a

We could prove useful lemmas such as symmetry now but for this post I will only need `cong`

– that functions preserve equality. Given any function `f : A → B`

and two equal elements of `A`

the function should return equal results.

The lemma is very easy to prove as when we pattern match on the proof that the elements are equal then the only possible pattern is `refl`

which forces `a`

and `a'`

to be equal, replacing, say, `a'`

with `a`

which reduces our task to showing that `f a ≅ f a`

. This is easily proved using `refl`

.

-- lemma: functions preserve equality cong : {A B : Set} → (f : A → B) → {a a' : A} → a ≅ a' → f a ≅ f a' cong f refl = refl

The lemma is very useful for proving equations that have the same function (such as `suc`

) on both sides. We can use it to reduce our task to proving that what is underneath the function on both sides is equal.

One can define an algebraic structure like a monoid as a record (named tuple/struct/etc.) in Agda. It contains fields for the *data* and also for the laws. A monoid has a carrier set `M`

a distinguished unit element `e`

and a binary operation `op`

. The three laws state that `op`

has `e`

as its left and right unit and it is associative. The monoid record `Mon`

lives in `Set1`

as it contains a `Set`

(`0`

).

-- Monoid record Mon : Set1 where -- data field M : Set e : M op : M → M → M -- laws lunit : ∀ m → op e m ≅ m runit : ∀ m → op m e ≅ m assoc : ∀ m n o → op (op m n) o ≅ op m (op n o)

The goal is to define a monoid where `M = Nat`

, `e = zero`

and `op = _+_`

. Let’s go ahead and prove the laws. The first law which would be `(zero + n) ≅ n`

doesn’t require proof as it holds definitionally (it is the first line of the definition of `_+_`

). The second law does require proof as here the `_+_`

doesn’t compute as the first argument is the variable `n`

.

+runit : ∀ n → (n + zero) ≅ n +runit zero = refl +runit (suc n) = cong suc (+runit n)

We prove the second law `+runit`

by induction on `n`

. When proving a property of a program as we are doing here it’s a good idea to follow the same pattern in the proof as in the program. Here `_+_`

is defined by recursion on its first argument so it makes sense to carry out the proof by induction on the first argument too. This makes things compute nicely. The first case is `zero + zero ≅ zero`

which Agda computes to `zero ≅ zero`

by applying the definition of `_+_`

. This is easily proved by `refl`

. The second case computes to `suc (n + zero) ≅ suc n`

. First we observe that there is a function `suc`

on both sides so we type `cong suc ?`

. This reduces our problem to proving that `n + zero ≅ n`

which follows from the inductive hypothesis `+runit n`

+assoc : ∀ m n o → ((m + n) + o) ≅ (m + (n + o)) +assoc zero n o = refl +assoc (suc m) n o = cong suc (+assoc m n o)

The proof for associativity proceeds analogously. We pattern match on the first argument `m`

which gives two cases. The first case computes to `n + o ≅ n + o`

and the second computes to `suc ((m + n) + o) ≅ suc (m + (n + 0))`

. As before the first case follows by reflexivity and the second case by congruence of `suc`

and inductive hypothesis.

Having done all the hard work we can now define a monoid for `Nat`

, `_+_`

, and `zero`

:

-- natural numbers with addition form a monoid NatMon : Mon NatMon = record { M = Nat; e = zero; op = _+_; lunit = λ _ → refl; -- this one doesn't require proof runit = +runit; assoc = +assoc}

]]>

]]>

Consider a continuous line on the whiteboard, from point to point , and another continuous line from point to point . Think of a bijection between the two lines: we may think of it as a family of trajectories from a point on the first line to a point of the second line, so that at time we are at the beginning of each trajectory, and at time we are at the end. But we may want to add another requirement: that, at each time , the collection of points that have been reached at time is itself a continuous line on the whiteboard! This is the idea at the base of the geometric concept of homotopy.

Recall that a *path* in a topological space is a continuous function from the unit interval to . Call *pathwise connected* if for any two points there exists a path from to , *i.e.*, such that and . If is a path in and is continuous, then is a path in : thus, a continuous image of a pathwise connected space is pathwise connected.The -dimensional *unit balls* and -dimensional *spheres* are pathwise connected.

If are paths and , their *concatenation* (read: “ then ”) is defined by for and for : in other words, we run across both paths in sequence, at twice the speed.

**Definition 1.** Let and be topological spaces and let be continuous functions. A *homotopy* from to is a continuous function such that for every and . Two functions are *homotopic*, written , if there exists a homotopy from to .

It can be easily check that homotopy is an equivalence relation.

**Definition 2.** A *homotopy equivalence* between two pathwise connected spaces is a pair of continuous functions , such that and . and are *homotopy equivalent* if there exists a homotopy equivalence between them.

For example, the zero function and the inclusion form a homotopy equivalence, with and being a homotopy from and . Spaces that are homotopy equivalent to a point are called *contractible*.

The importance of homotopy equivalence, is that it preserves several algebraic invariants, i.e., algebraic objects associated to topological spaces so that homeomorphic spaces have same invariants. The first such invariant is the fundamental group, which we will define in the next paragraphs.

Let be a path connected space and : consider the family of paths from to . We want to study the homotopy classes of such paths, with an additional restriction on the homotopies to be *endpoint-fixing*: and for every , i.e., at each time the function must be a path from to , rather than any two arbitrary points of . This restriction on the homotopies makes them congruential with respect to concatenation: if , , and , then . We may thus think about the 2-category whose objects are the points of a topological space, morphisms are the paths from point to point, and morphisms of morphisms are endpoint-fixing homotopies from path to path.

There is more! Although and are not the same, the only difference is in the *velocities* while running on the different tracks: and it is easy to see how such change of velocity can be done continuously, so that . For the same reason, if is the constant path at , then is clearly homotopic to whatever is; similarly, . (Paths with initial point equal to final point are called *loops*.) Finally, if we define the *reverse* of the path by , then and . (Think about the original point having a lazy friend, who stops somewhere to rest and waits for the original point to come back to go back together to .) This justifies

**Definition 3.** Let be a pathwise connected space and let . The *fundamental group* of based at is the group whose elements are the homotopy classes of loops at , product is defined by , identity is , and inverse is defined by .

Suppose and form a homotopy equivalence. Let be a loop in based on : then is well defined, and with some computation it turns out to be a group isomorphism. This is the reason why we sometimes talk about , without specifying .

As every loop in in is homotopic to a constant loop via the homotopy , is the trivial group: in this case, when , we say that is *simply connected*. For , is also simply connected, as intuitively we may always move the path in a bounded region which contains the image of the entire homotopy, and does not contain the origin. On the other hand, the same intuition tells us that it should not be possible to continuously transform a loop in around the origin into a loop in which does not “surround” the origin, without crossing the origin sometimes: this is confirmed by

**Theorem 1.** .

The proof of Theorem 1 is based on the intuitive idea that we can homomorphically identify the number with the homotopy class of windings based on , counterclockwise if and clockwise if . To prove that such homomorphism is bijective, however, would go beyond the scope of this post. On the other hand, is simply connected for : think to what happens when we tie an elastic rubber band around a tennis ball.

**Definition 4.** A *retraction* of a topological space onto a subspace is a continuous function that fixes every point of ; is a *retract* of if there exists a retraction of onto . A *deformation retraction* of a topological space onto a subspace is a homotopy from the identity of to a retraction of onto ; is a *deformation retract* of if there exists a deformation retraction of onto .

is a retract of , a retraction being : it is also a deformation retract, as is a homotopy from the identity of to .

**Theorem 2.** If is a retract of then is isomorphic to a subgroup of . If is a deformation retract of then is isomorphic to .

It follows from Theorems 1 and 2 that is not a retract of : from which, in turn, follows

**Brouwer’s fixed point theorem in dimension 2.** Every continuous function from to itself has a fixed point.

Proof: If has no fixed points, then the half-line from through is well defined for every . Let be the intersection of such half line with : then is a continuous function from to such that for every , *i.e.*, a retraction of onto —which is impossible.

There are some ways to compute the fundamental group of a space, given the fundamental groups of other spaces. For example, is isomorphic to the direct product of and , because the loops in based on are precisely the products of the loops in based on and the loops in based on . Another important tool is provided by

**van Kampen’s theorem.** Let and be pathwise connected spaces such that is pathwise connected and nonempty. Let . Then is the pushout of the diagram , where the arrows are induced by the inclusions.

As an application of van Kampen’s theorem, suppose and are copies of , and that is a single point. Then is free on two generators, because is the pushout of , where is the trivial group that only contains the identity element. More in general, the pushout of is for every two positive integers : thus, the fundamental group of a *bouquet of circles*—*i.e.*, copies of , joined at a single point —is free on generators.

As a final note, consider a continuous function between two pathwise connected spaces. If is a loop in with base point , then is a loop in with base point : it is also easy to check that and that . From this follows that the function defined by is a group homomorphism: therefore, the application that maps every into the corresponding , is the component on the arrows of a functor from the category of pointed pathwise connected topological spaces with basepoint-preserving continuous function to the category of groups with group homomorphisms, whose component on objects maps every pathwise connected space to its fundamental group.

]]>

Let us start by clarifying the context. Recall that a *topology* on a set is a family of subsets of such that:

- ;
- if then ; and
- if then .

For instance, the family made of all the unions of open intervals of is the Euclidean topology.

The members of are called the *open sets* of ; the complements of the open sets are called *closed*. If , then is a topology on , called the induced topology. For instance, the interval is closed in the Euclidean topology of , as it is the complement of the open set ; and is an open subset of .

An *open cover* of is a family of open sets of whose union is . Open covers can be thought of as models of the *level of detail* one can achieve by observing a space while one’s vision is, for some reason, *blurred*: an observer will be able to tell point from point if and only if there are two disjoint open sets from the given open cover (possibly, the whole topology) one of which contains and the other .

A topological space is *compact* if every open cover contains a finite subcover. Suppose that, to compensate our blurred vision, we hire guardians to keep track of the points of the space, but the contract with the security company states that each guardian will only watch the points of a given open set: compactness then ensures that we can always watch the whole space while only hiring finitely many guardians. (This similitude was suggested to me by Tommaso Toffoli.) The Heine-Borel theorem states that every open cover of the closed and bounded interval contains a finite subcover. Tychonoff’s theorem implies that the set of infinite words on a finite alphabet , whose open sets are unions of sets of the form with , is a compact space.

A function between two topological spaces is said to be *continuous* if the counterimage of any open subset of the codomain is an open subset of the domain. According to our similitude, *going back* along a continuous function *does not worsen* the level of detail: if the images of two points can be distinguished in the codomain, then the original points can also be distinguished in the domain. The usual formulation of continuity from Calculus courses is, in fact, a special case of this definition.

If is a compact space, then for every open cover of there is a minimum number of elements of a finite subcover of . We set , where the logarithm is taken in a fixed base .

Let and be open covers of : we say that is a *refinement* of if for every there exists such that : we then write . The intuitive meaning is that allows a level of detail *no smaller* than does: if allows telling any two points apart, so does .

It is immediate to check that is a preorder: usually, is not antisymmetric. As a counterexample, let:

- ;
- ; and
- .

Then and , but The example above can be modified to show that the case is also possible.

The *common refinement* of and is

Clearly, ; if is any open cover such that , and , then there exist and such that : thus, too.

The operation is commutative and associative, but usually not idempotent: as a counterexample, if and , then . Observe that, with our choice, : this is actually a general fact.

**Theorem.** Let be a compact topological space, let and be open covers of , and let be a continuous function.

- If and then .
- If then and .
- .
- If then .
- .
- . If is surjective then equality holds.

Given an open cover of a compact space and a continuous function , let

Then for every ,

so that : by Fekete’s lemma,

exists. The quantity above is called the *entropy of relative to *. The *topological entropy* of the continuous function is then defined as

Intuitively, topological entropy is the *worst-case* amount of *average*

* information per iteration* required to reconstruct the initial state, given the

current one. As a quick sanity check, let us verify that the identity has zero topological entropy. Clearly, whatever is, so that for every , and whatever is.

]]>

I wrote a post about it in my new blog, dedicated to cellular automata, which I launched this week. The post contains extended proofs and examples, and most important, fixes several errors I had made during the talk. I might update it later, by adding figures—which are well known to take their time.

Link: http://anotherblogonca.wordpress.com/2013/06/27/in-a-garden-of-eden/

]]>

*given a monad , find an adjunction such that and *

If the adjunction solves the problem above, we say that it *generates* the monad .

The first solution to this problem was given by the Swiss mathematician Heinrich Kleisli, and is based on an alternative way of defining monads, as it is the case with adjunctions. Let us suppose with . If , then , so that : and we know from the definition of monad that . We can thus define an operator that takes into so that whatever is. The simplest example is itself, which yields , so that by uniqueness in the definition of adjunction quadruple, and . Moreover, if and , then , which implies by uniqueness.

**Definition 4.** A *Kleisli triple* on a category is a triple where:

- is a function,
- for every , and
- for every

such that the following equations are satisfied:

- for every ;
- for every ;
- for every , .

If is an adjunction quadruple then is a Kleisli triple.

**Theorem 1.** Let be a category.

- If is a monad on , and if for every , then is a Kleisli triple on .
- If is a Kleisli triple on , and if for every and for every , then is a monad on .
- The two operations from the previous points are each other’s converse.

*Proof:* Point 1 follows from naturality of and and the three monad laws:

For point 2, functoriality of , naturality of and , and monad laws follow from Kleisli laws:

Point 3 is straightforward.

Considering again the free monoid example, the corresponding Kleisli triple has

Theorem 1 says that we can restate our problem as follows:

*given a Kleisli triple ,** find an adjunction quadruple such that and *

If with , then for every there is an isomorphism : this observation is at the base of Kleisli’s construction.

**Definition 5.** Let be a Kleisli triple on a category . The *Kleisli category *of is the category defined as follows:

- ;
- ;
- , that is, the identity of in is ;
- , that is, the composition of and in is the composition of and in .

**Theorem 2.** is a category.

*Proof:* If , then and by the Kleisli laws. If , , and , then

Our plan is to construct an adjunction quadruple , with and , such that and for every . We do this as follows:

- for every ;
- for every ;
- for every ;
- for every .

Let us quickly check that is indeed a functor. If then . If and , then . We are only left to determine, for every , a unique such that : but the entire construction leads to the choice ! Indeed, , and by the Kleisli laws. Observe that the functor is the one that does all the work, while the function is little more than a placeholder.

By our identification of adjunctions with adjunction quadruples (see the previous talk) we also get for every , and for every .

Kleisli’s solution is not the only one, but just one among many: and, in a sense that will be clear later, the “simplest” one. Another solution was constructed by Eilenberg and Moore, and is based on a completely different approach: instead of keeping the objects and specializing the morphisms, one expands the objects and redefines the morphisms.

**Definition 6.** Let be a category and let be a monad on .

- A
*-algebra*on is a pair where is an object in and is such that and . - A morphism of -algebras from a -algebra to a -algebra is an arrow such that .
- The
*Eilenberg-Moore category*of -algebras on is the category which has -algebras as objects, morphisms of -algebras as morphisms, and where identities and composition are defined as in .

If is the free monoid construction, then an -algebra is a function such that

- for every , and
- for every .

As is a monad, for every object of there is a *free -algebra* , and every arrow induces a morphism of free -algebras . Moreover, *any* is, by definition, also a morphism from to in .

This time, our plan is to construct an adjunction such that , , , and for every . We do this as follows:

- ;
- ;
- if ;
- ;
- for every .

Then clearly , while naturality of follows from the properties of free -algebras with respect to -algebra morphisms. In addition, if then , and if then . We thus have a full-featured adjunction: this time, is doing all the work, and is just a forgetful functor.

**Theorem 3.** Let be a monad on a . Identify the monad with the corresponding Kleisli triple . The Kleisli category is equivalent to the full subcategory of generated by the free -algebras.

*Proof:* Define a functor by setting for every , and for every . Then is a faithful functor, because if , then and similarly , so that if . But is also full, because if is a morphism of free -algebras, then from the laws of monads follows that .

But things get even more interesting than this! Let be a monad: let us consider *all* the adjunctions that generate . What can be a *morphism* of such adjunctions? First, if is a solution with , and is a solution with , we may consider a functor as a morphism from to . Next, we want that the equalities are not affected by mid-way application of : this translates into the two conditions and . Finally, as the previous point yields , we want that does not interfere with the counits: that is, .

**Definition 7.** Let be a monad on a category and let , be two adjunctions that generate , with and , respectively. A *-preserving functor* from to is a functor such that , , and .

It is straightforward to see that -generating adjunctions together with -preserving functors form a category : composition is provided by the usual composition of functors, while the identity of in is the identity functor of if .

To confirm that our intuition is correct, let us verify that satisfies the three given equations:

- ;
- ;
- ;
- ;
- .

**Theorem 4.** Let be a monad. Then the Kleisli adjunction is the initial object of , the Eilenberg-Moore adjunction is the final object. In particular, is the only arrow in from the former to the latter.

*Proof:* If is the Kleisli adjunction, then the only choice for is and . If is the Eilenberg-Moore adjunction, then the only choice for is and .

]]>

In the following, if is a category, we indicate by the collection of objects of , and by the collection of morphisms in from to .

As we know, there are two basic ways of defining an adjunction:

**Definition 1.** Let and be categories; let and be functors. An *adjunction* from to , written , is a quadruple where (the *unit* of the adjunction) and (the *counit*) are natural transformations such that , for every and , and .

**Definition 2.** Let and be categories. We call *adjunction quadruple* a quadruple such that:

- is a functor,
- is a mapping, and
- associates to every object a morphism so that
- for every there exists a unique such that .

The two definitions above are equivalent in the following sense. If is an adjunction according to Definition 1, and , then is an adjunction quadruple according to Definition 2. On the other hand, if is an adjunction quadruple according to Definition 2, and is the inverse operation of —that is, if and only if —then necessarily , and by putting for and for we define an adjunction according to Definition 1.

If is an adjunction, then is an endofunctor.The first question that comes to our mind is:

*when does an endofunctor derive from an adjunction?*

Let us check some basic properties such an endofunctor must satisfy. First of all, defined by is a natural transformation and satisfies

Moreover, as is a natural transformation, by choosing we get , which after an application of yields

It will turn out that these two properties are precisely what we need.

**Definition 3.** A *monad* on a category is a triple where:

- is an endofunctor,
- and are natural transformations, and
- for every we have and ,

As a very basic example, the *free monoid* construction is a monad on , where , , , and .

As a less basic example, suppose is a poset: what is a monad on ? First of all, an endofunctor on a poset is a monotone function; next, if there is , then ; finally, if there is , then , which together with the previous inequality yields . On the other hand, any nondecreasing idempotent is the endofunctor component of a monad: the monad equations are actually ensured by being a poset, so that any two maps with same domain and same codomain are equal.

We then restate our original problem as follows:

*given a monad , find an adjunction such that and *

If the adjunction solves the problem above, we say that it *generates* the monad .

The first solution to this problem was given by the Swiss mathematician Heinrich Kleisli, and is based on an alternative way of defining monads, as it is the case with adjunctions. Let us suppose with . If , then , so that : and we know from the definition of monad that . We can thus define an operator that takes into in a way such that whatever is. The simplest example is itself, so that , and by uniqueness in the definition of adjunction quadruple. Moreover, if and , then

which implies by uniqueness.

This is the base of Kleisli’s solution to our problem, which we will discuss in a future talk.

]]>

]]>

]]>