more gluing ideals together Let $X$ be a scheme and let $U_i= Spec R_i$ be an open cover of $X$ by open affines.  Suppose we have a family of ideals $I_i\subset \mathcal{O}_X(U_i)=R_i$ and let's say I want to know if the family $\{I_i\}$ cuts out a closed subscheme of $X$. Here are two observations:

*

*It is necessary and sufficient to check that any two $I_i,I_j$ generate the same ideal in every $W\subset U_i\cap U_j$ when $W$ is distinguished open affine in both $U_i$ and $U_j$.


*By observation 1., it suffices to show that any two $I_i,I_j$ generate the same ideal in every $\mathcal{O}_X(U_i\cap U_j)$ (since the restriction from $  U_i$ to $W$ factors through the restriction from  $U_i$ to $ U_i\cap U_j$)
My question is whether 2. is also necessary. I suspect the answer is no. A counterexample will have to have $X$ non separated since we need $ U_i\cap U_j$ to be non affine.  and I guess I haven't met too many of those
 A: Your suspicion is correct.
Consider an affine plane $\mathbb{A}^2_k$ over some field $k$ and let $o$ be its origin. We glue two copies of $\mathbb{A}^2_k$ along $\mathbb{A}^2_k\setminus \{o\}$. We obtain a $k$-scheme $X$ which is called the plane with double origin. We denote two copies of $\mathbb{A}^2_k$ in $X$ by $U_1,U_2$. Each one of them has its own private origin $o_1,o_2$, respectively. Moreover, $U_1\cap U_2 = \mathbb{A}^2_k\setminus \{o\}$. Note also that restrictions
$$\Gamma(U_1,\mathcal{O}_{X}) \rightarrow \Gamma(U_1\cap U_2,\mathcal{O}_{X}),\,\Gamma(U_2,\mathcal{O}_{X})\rightarrow \Gamma(U_1\cap U_2,\mathcal{O}_{X})$$
are isomorphism, because open subset $U_1\cap U_2$ is of codimension two in normal schemes $U_1,U_2$.
Now we pick $Z = \{o_1\}$ with reduced structure. This is a closed subscheme of $X$. Denote by $I_1,I_2$ ideals of $Z\cap U_1,Z\cap U_2$ in $\Gamma(U_1,\mathcal{O}_{X})$ and $\Gamma(U_2,\mathcal{O}_{X})$, respectively. Then $I_1\subsetneq \Gamma(U_1,\mathcal{O}_{X})$ is some proper ideal. On the other hand $I_2 = \Gamma(U_2,\mathcal{O}_{X})$ due to the fact that $Z\cap U_2 = \emptyset$. Since restrictions
$$\Gamma(U_1,\mathcal{O}_{X}) \rightarrow \Gamma(U_1\cap U_2,\mathcal{O}_{X}),\,\Gamma(U_2,\mathcal{O}_{X})\rightarrow \Gamma(U_1\cap U_2,\mathcal{O}_{X})$$
are isomorphism, we derive that the image of $I_1$ in $\Gamma(U_1\cap U_2,\mathcal{O}_{X})$ is proper ideal and the image of $I_2$ in $\Gamma(U_1\cap U_2,\mathcal{O}_{X})$ is nonproper. Thus these images are not the same.
P.S. For 2 to be neccessary it suffices to assume that $X$ is semiseparated, which means that the diagonal $X\rightarrow X\times X$ is affine or equivalently intersection of any two open, affine subschemes is affine. This is a more general class of schemes than separated schemes. The plane with double origin is the simplest example (that I am aware of) of a scheme which is not semiseparated.
