# Extend a Morphism of Schemes

I have a question about following argument used in Szamuely's "Galois Groups and Fundamental Groups" in the excerpt below (or look up at page 159):

Let $$X,Y$$ schemes which are finite and locally free over base scheme $$S$$. Let $$U \subset S$$ be dense in $$S$$.

If we have a morphism $$X \times_S U \to Y \times_S U$$ over $$U$$ why does it extend to a morphism $$X \to Y$$ over $$S$$?

My considerations: The problem is local so wlog $$S= Spec(R), X= Spec(R^n), Y= Spec(R^m)$$(by locally freeness) and $$U= D(f)$$ for a $$f \in R$$.

Therefore the problem is reduced to the following affine case:

If $$R^m \otimes_R R_f = R_f^m \to R_f^n$$ a ring morphism why does it uniquely induce a ring morphism $$R^m \to R^n$$ uniquely?

Remark: Denote by $$R_f$$ the localization of $$R$$ at $$f$$.

Sure I can compose it with $$R^m \to R^m_f$$ but does the resulting map $$R^m \to R_f^n$$ factorize (uniquely) thought $$R^n$$?

Or did the author mean another approach?

• An open set of the form $D(f)$ has a complement of a codimension $1$ (by the Hauptidealsatz). Here $U$ is assumed to have a complement of codimension $\geq 2$ so is contained in no $D(f)$ and sections on $U$ should be the same as on $S$. It's too late and I'm a bit too tired to fill in the dots, but this should at least get you started. – Gro-Tsen May 4 at 22:00
• @Gro-Tsen: If I understood your argument correctly then the point is that the given condition for $U$ having complement of codim $\ge2$ garantees that every global section on $S$ localized/restricted to $U$ doesn't arise from a localization on a $f \in H^0(S,O_S)$. So by restructing $S$ to $U$ is "nothing localized" (I know sounds a bit sloppy)? Or did I misunderstood your explanation? The only aspect that puzzles me a bit is that in your argumentation you didn't used the assumption that $U$ is dense,right? Or is this indeed not necassary? – Karl_Peter May 5 at 20:10