# formal glueing of schemes

I need to know when a glueing prcedure makes sense in the scheme world. Let $X$ be a smooth, projective scheme over $S=Spec(A)$, $A$ a complete ring. Let $x,y\in X$ closed points such that $\phi:\hat{\mathcal{O}}_{X,x}\cong \hat{\mathcal{O}}_{X,y}$ (completion w.r.t. maximal ideals). I want to produce a scheme where I identify the points $x$ and $y$ via this isomorphism. I guess that in general this is not possible. When does this operation make sense? When does it do at least as formal/rigid/analytic space?Do I get a stack?

-

## 1 Answer

I will first describe two gluing constructions that seem to work for affine schemes.

Let $X = \mathrm{Spec}(A)$, $Y = \mathrm{Spec}(B)$, and let $Z = \mathrm{Spec}(R)$. Suppose that I have maps $\phi: Z \to X$ and $\psi:Z \to Y$ corresponding to maps of rings $A \to R$ and $B \to R$. I would like to glue $X$ and $Y$ along the image of $Z$. Call this hypothetical space $W$. It seems reasonable that whatever this space is, its coordinate ring should be pairs $(f, g)$ of functions $f$ on $X$ and $g$ on $Y$, which agree when evaluated on $Z$. So

$$\mathcal{O}_W[W] = \{(f,g) \in A \times B \ | \ \phi(f) = \psi(g) \}$$ Then take $W$ to be $\mathrm{Spec}$ of this ring. It comes with natural maps $X \to W$ and $Y \to W$, and seems to do the job.

Now suppose that we have two maps $Z \to X$ corresponding to ring maps $\phi, \psi: A \to R$. Then similarly we can define $$\mathcal{O}_W[W] = \{ f \in A \ | \ \phi(f) = \psi(f) \}$$ and take $W$ to be $\mathrm{Spec}$ of this.

Now for your case, we have $X$ projective and two points $x, y \in X$. By assumption, both points have the same residue field, say $k$. Pick open affines $U, V$ in $X$ so that $x \in U$ and $y \in V$. Then the inclusions $x, y \to X$ give maps $\mathcal{O}_X[U] \to k$ and $\mathcal{O}_X[V] \to k$. Applying the constructions above, we should be able to build up a scheme $W$ as desired. However, I have not checked the details, so I can imagine that there might be some snag that requires one to add additional hypotheses about the schemes and maps involved.

-