# Gluing schemes Hartshorne example

In example 2.3.5 Hartshorne says

Let $X_1$ and $X_2$ be schemes. Let $U_1 \subseteq X_1$ and $U_2 \subseteq X_2$ be open subsets, and let $\varphi: ( U_1, \mathcal{O}_{X_1 \mid U_1}) \to ( U_2, \mathcal{O}_{X_2 \mid U_2})$ be an isomorphism of locally ringed spaces. Then we can define a scheme $X$, obtained by glueing $X_1$ and $X_2$ along $U_1$ and $U_2$ via the isomorphism $\varphi$. The topological space of $X$ is the quotient of the disjoint union $X_{1} \cup X_{2}$ by the equivalence relation $x_{1} \sim \phi (x_1)$ for each $x_1 \in U_{1}$, with the quotient topology. Thus there are maps $i_1 : X_1 \to X$ and $i_2: X _{2} \to X$ , and a subset of $V \subseteq X$ is open iff $i_1 ^{-1}(V)$ is open in $X_1$ and $i_2^{-1}(V)$ is open in $X_2$. The structure sheaf $\mathcal{O}_X$ is defined as follows: for any open set $V\subseteq X$,

$$\mathcal{O}_{X}(V) = \left \{ \langle s_{1}, s_{2}\rangle\mid s_1 \in \mathcal{O}_X (i_1 ^{-1}(V)) \text{ and } s_2 \in \mathcal{O}_X (i_{2} ^{-1}(V)) \text{ and } \varphi(s_1|_{i_1^{-1}(V)) \cap U_1})= s_2|_{i_2^{-1}(V)) \cap U_2} \right\}$$

I'm unable to interpret the $\varphi(s_1|_{i_1^{-1}(V)) \cap U_1})= s_2|_{i_2^{-1}(V)) \cap U_2}$ part. I'm even unclear about where does this $\varphi$ come from. (I think this $\varphi$ can not be the same as the usual morphism $\varphi^{\#}$ of sheaves of rings on $U_2$).

• $\phi$ is the isomorphism we use to glue the schemes $X_1$ and $X_2$ together. The equality you are unable to interpret is the statement that the sections of our glued scheme X on an open set V are pairs $(s_1, s_2)$ which are equal when restricted to $U_1$ and $U_2$, respectively; we use $\phi$ to identify $U_1$ with $U_2$ in $X$. – Thom Tyrrell Jun 17 '13 at 17:03
• To be completely precise he probably ought to have written $\varphi^\#(s_2|_{i_2^{-1}(V) \cap U_2}) = s_1|_{i_1^{-1}(V) \cap U_1}$. The point is that there's only one reasonable way to use $\varphi$ to demand that $s_1$ and $s_2$ agree "as much as possible". – TTS Jun 17 '13 at 17:07
• Thanks. I guessed it to be that way but I wanted to be sure. Thanks again! – Grobber Jun 17 '13 at 17:24
• @Grobber : I changed $<s_1,s_2>$ to $\langle s_1,s_2\rangle$ and used \mid properly. See above. – Michael Hardy Jun 17 '13 at 18:10
• @TTS what you wrote is still not strictly correct, since $\varphi^{\sharp}$ is a morphism of sheaves.. But I got your point. – Aolong Li Apr 28 '18 at 2:46