$\DeclareMathOperator{\colim}{colim}
\DeclareMathOperator{\Spec}{Spec}$


[Edit1] I should point out that the colimits below are in the category of schemes, since the statements are trivially false for colimits in the category of affine schemes. [/Edit1]


In [this answer](https://mathoverflow.net/questions/23478/examples-of-common-false-beliefs-in-mathematics/23640#23640) Martin points out that $\coprod\_i \Spec R\_i \ne \Spec \prod\_i R\_i$ in general. This also proves for
$$ \colim\_{i \in I} \Spec R\_i \ne \Spec \lim\_{i \in I} R\_i. $$
(Though taking a non-affine scheme, and writing it as colimit of affines might even be a more 'natural' proof.) Now I wondered if what happens if we take global sections on both sides, i.e.,
$$ \mathcal{O}(\colim\_{i \in I} \Spec R\_i) \stackrel{?}{=} \lim\_{i \in I} R\_i. $$
For several (co)limits, I verified this is true. And actually there is a natural map from right to left. 


But is this map


$$ \lim\_{i \in I} R\_i \to \mathcal{O}(\colim\_{i \in I} \Spec R\_i) $$


an isomorphism:


* when $I$ is finite?
* if so, when $I$ is small?



Is lim R_i = O(colim Spec R_i) true for finite (co)limits?
We have an equivalence of categories $Aff\simeq Ring^{op}$ and a pair of adjoint functors $$\mathcal{O}:Sch\rightleftharpoons Ring^{op} : Spec$$ $$\mathcal{O} \dashv Spec$$
The category of affine schemes is clearly a full subcategory of $Sch$. This leads us to reformulation of the previous statement: the inclusion of full subcategory $J:Aff\hookrightarrow Sch$ has a left adjoint $L=Spec\circ \mathcal{O}$. So $Aff$ is a reflective subcategory of $Sch$. Your question is then about the isomorphism $$\mathrm{colim}\_i A\_i \simeq L(\mathrm{colim}\_i J(A\_i))$$
This is true, because for a reflective subcategory $L\circ J \simeq 1$ (see, for example, Maclane's book) and left adjoints ($L$) commute with colimits.
$$\mathrm{colim}\_i A\_i \simeq \mathrm{colim}\_i LJ(A\_i) \simeq L(\mathrm{colim}\_i J(A\_i))$$


It is an isomorphism whenever any mentioned colimit exists, it also defines then all other mentioned colimits.


