Dinatural transformations are a generalization of ordinary natural transformations and also of extranatural transformations. The differences can be summarized thusly:
If the dependence of $F$ or $G$ on $x$ in a dinatural transformation is trivial, it reduces to an extranatural one. Similarly, if the contravariant (or, dually, the covariant) dependence of $F$ and $G$ on $x$ are trivial, it reduces to an ordinary natural one.
Arguably, most dinatural transformations which arise in practice are ordinary or extranatural.
Let $F, G: C^{op} \times C \to D$ be functors. A dinatural transformation from $F$ to $G$, sometimes written
consists of a collection of morphisms
such that for every morphism $f: c \to c'$ in $C$,
This “hexagon identity” gives the “domain” version of extranaturality when $G$ is constant, and the “codomain” version when $F$ is constant. The domain version involves a commutative square of the form
where $G$ is constant with respect to the argument $c$, and the codomain version a commutative square of the form
when $F$ is constant with respect to the argument $c$.
Many people who encounter the notion of dinaturality through the general definition (as in equation (1) have subsequent difficulty grokking it. It is the opinion of at least one author of this article (Todd Trimble), and it was certainly the opinion of Max Kelly, that this “efficient” definition is not the most useful or intuitive one. Rather, one may be better off grokking the separate squares (2) and (3) – that is, the notion of extranaturality – and how they arise in practice.
One could try to argue against that by pointing to dinatural transformations which do not reduce to extranatural ones. Here perhaps the most well known example is where $F = \hom: Set^{op} \times Set \to Set$, where we have a class of dinatural transformations
defined by the rule $alpha_n(f) = f^{(n)}$ (“Church numeral?s”). But these examples can be “bent” into domain extranaturality by defining
and considering extranatural transformations from the constant $1$ (the terminal set) to $G$. Such tricks support the counterargument that the extra generality of the traditional definition is largely spurious, and not particularly helpful in terms of comprehension.
Dinatural transformations cannot, in general, be composed with each other, although there are certain circumstances when they can be (such as when certain squares are pushouts or pullbacks, or when they are in fact ordinary natural transformations). In general, what we can say is that dinatural transformations with fixed source and target form a paracategory.
Here is a blog post inspired by the above discussion:
It discusses these concepts in the context of the programming language Haskell.