Distributivity of categorical product and sum

Let $\textbf{C}$ be a category with products and co-products.

If $\textbf{C}$ is $\textbf{Set}$ or $\textbf{Top}$ I'm pretty sure the following "distributive law" holds: for all $X,Y,Z \in \operatorname{ob}(\textbf{C})$, $$(X \sqcup Y) \times Z \cong (X \times Z) \sqcup (Y \times Z).$$

Does this (or a similar law) hold for any such category $\textbf{C}$ or not?


You always have a canonical arrow $(X\times Z)\sqcup (Y\times Z) \to (X\sqcup Y)\times Z$, obtained from the universal properties of $\sqcup$ and $\times$ (there is a canonical arrow $X\times Z\to X\to X\sqcup Y$ and a canonical arrow $X\times Z\to Z$, so there is a canonical arrow $X\times Z\to (X\sqcup Y)\times Z$, and similarly for $Y\times Z$). But this arrow is not an isomorphism in general.

For a very simple example, consider the lattice M3, considered as a poset (a category with at most one arrow between any two objects). Here is a picture:

M3

In a lattice, $\times$ is $\min$ and $\sqcup$ is $\max$, so we have $(x\sqcup y)\times z = 1\times z = z$, but $(x\times z)\sqcup (y\times z) = 0\sqcup 0 = 0$.

Actually, this is (almost) the universal obstruction: it happens that a lattice is distributive if and only if it contains no sublattice isomorphic to M3 or N5. N5 is another lattice that looks like this:

N5

Here's another example, this time in a concrete category: distributivity fails in the category of abelian groups. In that category, $\times = \sqcup = \oplus$, so we have $(X\sqcup Y)\times Z \cong X\oplus Y \oplus Z$, but $(X\times Z)\sqcup (Y\times Z) \cong X\oplus Y\oplus Z^2$.


A simple counterexample is $\text{Set}^{op}$. Asking for $\text{Set}^{op}$ to be distributive means asking for coproducts to distribute over products in $\text{Set}$, which is easy to rule out for finite sets using cardinality. Another simple counterexample is $\text{Vect}$, where products and coproducts agree, and where it's again easy to rule out for finite-dimensional vector spaces using dimension. (However, it is true that tensor products distribute over direct sums; $\text{Vect}$ is not cartesian closed but it is the next best thing, closed monoidal.)

An interesting example is $\text{CRing}^{op}$, the category of affine schemes. It's a nice exercise to show that this category is distributive, despite neither being cartesian closed nor (as far as I know) admitting a conservative functor to $\text{Set}$ preserving products and coproducts (taking the Zariski spectrum is not conservative and does not preserve products).


Any category $\mathcal{K}$ having a functor $F : \mathcal{K} \to \text{Set}$ which is conservative, preserves finite products and finite coproducts has the required property.

This property is quite common in fact and quite ofter the functor is the forgetful.