Solution (source code)

= Solution

First supply the unlettered preliminaries. Assuming the relevant <categorical limits> and <colimits> exist, limits of shape $I$ commute with colimits of shape $J$ when for every <functor> $D:I\times J\to\mathcal C$ the canonical map
$$
\boxed{\operatorname*{colim}_{j\in J}\operatorname*{lim}_{i\in I}D(i,j)
\longrightarrow\operatorname*{lim}_{i\in I}\operatorname*{colim}_{j\in J}D(i,j)}
$$
is an <isomorphism>. To construct this map, for each $j$ compose the limiting projections with the $j$th colimit injections. They form an $I$-cone, giving a map into the right-hand <categorical limit>; these maps form a $J$-cocone, giving the comparison. This specifies the actual comparison required for <commutation of limits and colimits>.

A <group> regarded as a one-object <category> has its group elements as arrows, with composition given by multiplication. A <functor> from it to the <Category of sets> is a <group action>. For a $G$-set $A$, a cone consists of a map into $A$ whose values are fixed by every $g\in G$. Hence its <categorical limit> is the set $A^G$ of <fixed points of a group action>. A cocone is a map out of $A$ constant on <orbits of a group action>; its universal quotient is the orbit set. Thus
$$
\boxed{\lim_GA=A^G,\qquad\operatorname*{colim}_GA=A/G.}
$$

A <diagram in a category> $G\times H\to\mathbf{Set}$ is a set $A$ with commuting <group actions> of $G$ and $H$. Its limit–colimit comparison is
$$
\theta:A^G/H\longrightarrow(A/H)^G,\qquad[a]_H\longmapsto[a]_H.
$$
Commutation makes $A^G$ stable under $H$. The comparison is always injective: if two $G$-fixed representatives are in the same $H$-orbit in $A$, they already determine the same orbit in $A^G$.

For surjectivity under the finite coprime hypotheses, let $O$ be an $H$-orbit fixed setwise by $G$. Its size divides $|H|$ by the <orbit-stabilizer theorem>. Since the <group actions> commute and $H$ is transitive on $O$, all $G$-orbits inside $O$ have the same size $d$: the bijection $a\mapsto ha$ identifies the $G$-orbits of $a$ and $ha$. Thus $d$ divides $|O|$, while the <orbit-stabilizer theorem> also gives $d\mid|G|$. The orders are <coprime>, so $d=1$. Every point in $O$ is therefore $G$-fixed, and $O$ lies in the image of $\theta$. We have proved <commutation of fixed points and orbit quotients for coprime groups>:
$$
\boxed{A^G/H\cong(A/H)^G.}
$$
The bijection is the canonical comparison and is natural in the set with commuting <group actions>, so it proves the requested <commutation of limits and colimits> in the <Category of sets>.