Previously, we introduced strong monads, and their associated double strength maps. By considering how a monad interacts with the double strengths, other important classes of monads emerge.

Recall that for a strong monad , their are two double strength morphisms:

which are natural in and . By restricting attention to the case where the monoidal structure is given by categorical products, we then notice that by combining the double strength and product structure, we can form the following composites:

- .
- .

As these composites are both endomorphisms, it is natural to ask when they are equal to the identity morphism of the same type.

**Remark**: This is a recurring theme, which we have commented on before. When doing category theory, we are often in situations when certain morphisms are assumed to be part of the available structure. It is always worthwhile considering when composites of these morphisms of the same type are actually equal. For example, the axioms of a monoidal category ensure that all such diagrams commute (in a precise technical sense). On the other hand, for a strong monad, exploring when the two double strength maps coincide leads us to the notion of commutative monad.

A monad is said to be:

**Affine**if .**Relevant**if .**Cartesian**if it is both affine and relevant. That is, when it preserves binary products, up to isomorphism.

We should immediately be a bit suspicious of these definitions. Do we get different notions if we consider interaction with rather than ? Fortunately, life is simple in this case, and the choice to use or makes no difference, although it does take a little bit of work to establish this fact.

## Affineness algebraically?

As usual, when we encounter new classes of monads, we shall examine them from the point of view of algebra.

A bit of calculation shows that being affine is equivalent to requiring the component of the monad at the terminal object is an isomorphism. Algebraically, consists of equivalence classes of terms:

The set of these terms is isomorphic to the terminal object if and only if it has a single element. This can only be the case if all these equivalence classes are equal. This is the same as requiring that every term built from operation symbols and a single variable is equal to the variable itself. This will be the case if and only if every operation satisfies:

That is, all the operations are idempotent.

**Example**: The non-empty (finite) powerset monad is affine.

**Example**: If we consider consider any algebraic presentation such that we can derive , then everything can be proved equal to everything else. Such a presentation is said to be inconsistent. We consider the presented monad . There are two cases:

- The signature doesn’t contain a constant symbol. In this case , and for every other , .
- The signature contains a constant symbol. In this case, for all , .

So the monads corresponding to inconsistent presentations are affine. These pathological monads, which we shall refer to as **inconsistent monads**, are a good source of counterexamples for naive conjectures about monads.

**Counterexample**: For an algebraic presentation which is *not* inconsistent, if contains a constant symbol, then the presented monad is not affine. For example, the ordinary finite powerset monad is *not* affine.

## Relevance algebraically

Unfortunately, the condition for being relevant does have such a convenient simplification. In this case, to understand what is going on algebraically, we shall have to look the the original definition directly, using the algebraic description of discussed previously. For arbitrary element

,

the relevance condition becomes:

which can only be the case if the following equation is derivable for every term :

Using pairs everywhere is getting hard to read. The previous equation is equivalent to:

**Example**: If we only have constant elements in our presentation, then the equation above holds trivially. Therefore for any set , the exception monad is relevant.

As the relevance condition is still rather hard to read, we specialise it to a single binary operation :

The equation should be familiar from our discussion of the reader monad for a binary bit.

**Example**: The equation above is exactly the condition satisfied by the lookup operation for the binary bit reader monad, and inductively by all terms. The binary bit reader monad is relevant. In fact, any instance of the reader monad is relevant, as can be verified by direct calculation.

**Counterexample**: To confirm a monad is relevant, it is *not* sufficient to establish the condition for operation symbols only. For example, if we have two binary operations satisfying the relevance condition above, it is not necessarily the case that the composite will.

**Example**: Unsurprisingly, the inconsistent monads introduced above are also relevant. This is trivially true, as they satisfy every possible equational condition.

## Summing Up

By considering the interaction between a strong monad and its double strength maps, we were lead to new classes of monads. In algebraic examples, these conditions have natural interpretations.

We should ask ourselves, are these monads useful for anything? Gladly, the answer is yes. We briefly sketch a couple of examples:

- For a commutative monad on a symmetric monoidal category, under tame conditions, the symmetric monoidal structure lifts to the Eilenberg-Moore category. If the monad is affine or relevant, further structure such as projection and diagonal maps also lift to the Eilenberg-Moore category.
- Beck’s distributive laws are a vital tool for composing monads. If a monad is commutative monad, there are useful positive results about the existence of distributive laws for combining it with other monads. Recent work has shown that affine and relevant monads imply distributive laws in more general situations.

To discuss either of these topics properly requires more background than we have currently introduced. We may return to them in later posts.

For further background on affine and relevant monads, Jacobs “Semantics of Weakening and Contraction” is an excellent place to start reading (as it is for many other topics in monad theory!). The importance of affine and relevant monads for positive results about distributive laws can be found in the PhD thesis of Louis Parlant.

## One thought on “Monads with special presentations”