Fix a commutative ring $R$. There's a contravariant functor from finite sets to finite $R$-algebras sending $X$ to $R^X$. Viewed as a covariant functor $\text{set}^{op}\to R\text{-alg}$, this functor preserves finite limits and colimits; this is easy to verify directly by checking finite products ($R^{\coprod\_i X\_i} \cong \prod\_i R^{X\_i}$) and coproducts ($R^{\prod\_i X\_i}\cong \bigotimes\_i R^{X\_i}$), as well as equalizers and coequalizers. I'd love to just cite this fact instead of (re)proving it in a paper I'm writing.


The preserving of limits comes from the fact that the contravariant functors $X\mapsto R^X$ and $A\mapsto Hom\_{R\text{-alg}}(A,R)$ are "adjoint on the right":


$Hom\_{R\text{-alg}}(A,R^X) \cong Hom\_{R\text{-alg}}(A,R)^X \cong Hom\_{\text{set}^{op}}(Hom\_{R\text{-alg}}(A,R),X).$


If $R$ is Noetherian, then $X\mapsto R^X$ also has a right adjoint: an $R$-algebra homomorphism $R^X\to A$ corresponds to a complete set of orthogonal idempotents in $A$ indexed by $X$. If $A$ is finite (or even finite type) over $R$ then $Spec(A)$ is the topological disjoint union of its finitely many connected components, so a complete set of orthogonal idempotents is just a function $\pi\_0(Spec(A))\to X$. Thus


$Hom\_{R\text{-alg}}(R^X, A)\cong Hom\_{\text{set}^{op}}(X, \pi\_0(Spec(A)).$


But even with no extra hypotheses on $R$, the functor $X\mapsto R^X$ sends finite limits to colimits anyway. Does anyone know a reference for this, or something close to a one-liner proof so I can avoid a tedious nuts-and-bolts argument?



Reference for (co)limit-preserving functor $X\mapsto R^X$
Maybe this is more complicated than you are looking for, but you can get your right adjoint to exist without any Noetherian hypothesis by extending the domain to the category of all Boolean algebras. Specifically, let $\text{Bool}$ be the category of Boolean algebras and $R\text{-Alg}$ be the category of $R$-algebras (with no finiteness assumed). There is a functor $F:\text{Bool}\to R\text{-Alg}$ which sends a Boolean algebra $B$ to the $R$-algebra which is generated by idempotents corresponding to the elements of $B$ and satisfying the relations in $B$. When $B=\mathcal{P}(X)$ is the power set of a finite set $X$, $F(B)$ is just $R^X$, and in general, $F(B)$ can also be described as the ring of locally constant functions from the Stone space of $B$ to $R$. Furthermore, it is easy to see that $F$ is left adjoint to the functor $G:R\text{-Alg}\to\text{Bool}$ which sends an $R$-algebra to its Boolean algebra of idempotents. Finally, note that $X\mapsto \mathcal{P}(X)$ is an equivalence from $\text{set}^{op}$ to the full subcategory of finite Boolean algebras (which is closed under finite limits and colimits), and so finite colimits of Boolean algebras of the form $\mathcal{P}(X)$ are the same as finite limits of finite sets.


Incidentally, the fact that your functor $\text{set}^{op}\to R\text{-Alg}$ extends to both a functor $\text{Set}^{op}\to R\text{-Alg}$ which has a left adjoint and to a functor $\text{Bool}\to R\text{-Alg}$ which has a right adjoint is essentially equivalent to the fact that it preserves both finite limits and finite colimits. Indeed, $\text{Set}^{op}$ is the pro-completion of $\text{set}^{op}$, so you automatically get an extension to $\text{Set}^{op}$ preserving filtered limits; since your original functor preserved finite limits, this extension will actually preserve all limits. Similarly, $\text{Bool}$ is the ind-completion of $\text{set}^{op}$, so you get a corresponding story for colimits.


