Wild coproducts in the category of simple lenses [lcc-0008]

This note contains material previously posted on my blog, here

The category of simple (bimorphic) lenses (let's just say over \mathsf {Set}, for now) has a monoidal structure, given by \binom {A}{X} \otimes \binom {B}{Y} = \binom {A \times B}{X \times Y}, which is neither Cartesian nor coCartesian. It also has Cartesian products, given by \binom {A}{X} \times \binom {B}{Y} = \binom {A + B}{X \times Y}. However, it does not in general have coproducts.

In the category of containers/dependent set lenses/polynomials, which is an extension of \mathsf {Lens}(\mathsf {Set}), coproducts do exist. If we think of an element of this category as a base set X and an indexed family of fiber sets A_x, x \in X, then the coproduct just takes the disjoint union of the bases and combines the two indexed families.

The polynomials in the image of \mathsf {Lens}(\mathsf {Set}) are those where the family is constant - B_x = B for all x - and so the problem with \mathsf {Lens}(\mathsf {Set}) when it comes to coproducts is that, if A \ncong B, computing the coproduct of \binom {A}{X} and \binom {B}{Y} in polynomials takes us out of lenses. And indeed in the case A = B, these coproducts do exist in \mathsf {Lens}(\mathsf {Set}) and are given by \binom {A}{X + Y}.

This defect is part of what motivated the development of Dependent optics.

For a while, it was thought that coproducts of this form were the only coproducts in \mathsf {Lens}(\mathsf {Set}), and that therefore the category of dependent lenses could be constructed as the universal completion under coproducts of \mathsf {Lens}(\mathsf {Set}) preserving the existing coproducts. This would then provide a universal property for a category of dependent optics as well.

Unfortunately, this is not true. \mathsf {Lens}(\mathsf {Set}) has the following "wild" coproduct as well:

We have the following theorem characterizing all the coproducts in \mathsf {Lens}(\mathsf {Set})

References

Related