What is a non-artificial example of a bifunctor that is contravariant in both arguments?

173 Views Asked by At

The Hom functor is a bifunctor that’s covariant in one argument and contravariant in the other.

One can view the construction of group rings as a bifunctor that is covariant in both arguments.

But what is a (hopefully not contrived) example of a bifunctor that is contravariant in both arguments?

2

There are 2 best solutions below

1
On BEST ANSWER

Given any covariant bifunctor $A \times B \to C$ and a contravariant functor $C \to D^\text{op}$ we can compose to get a contravariant bifunctor.

One simple example of this might be $(V, W) \mapsto (V \oplus W)^*$ which sends a pair of vector spaces to the dual of their direct sum.

If we do the same construction with the tensor product instead of the direct sum, then we can write this in a slicker way by looking at bilinear maps $V \times W \to k$, which of course gives you $(V \otimes W)^*$. This is a nice observation due to Qiaochu, and is a natural object to study.


I hope this helps ^_^

0
On

I do not have an abstract mathematical example, but one of applied category theory---specifically in software. In Apache Kafka, records are stored in the log as a key and a value (think a Cartesian pair ×). What is called a producer for these records (a client that write them to the log) can be modeled as an endofunctor in the category in which the types of the programming language in question are objects and the functions are morphisms. This endofunctor is contravariant in both arguments, because the type of the key and the type of the value can both be mapped over with functions that go in the reverse direction as compared to the function that represents that whole mapping.