# A morphism from proper to affine is constant?

Let $S$ be a base scheme and $f \colon X \to S$ and $Y \to S$ finitely presented morphisms. Suppose that $g$ is affine and $f$ is faithfully flat and separated with connected reduced geometric fibers. Also, suppose that $f$ is proper over a (topologically) dense subscheme $U$ of $S$. Is it true that every morphism $g \colon X \to Y$ over $S$ is constant (i.e., factors through a section $S \to Y$)?

-
Problem local on base, so $S =$ Spec($A$), $Y =$ Spec($B$), $g$ is $A$-alg. map $B \rightarrow O(X)$, & ask if image = $A$ ($A \rightarrow O(X)$ is inj.). If OK for all $B$ f. pres. over $A$ then OK for all $A$-alg. $B$ by limits. Then $B = O(X)$ forces $O(X) = A$. Conversely if $O(X) = A$ all OK. So $Y$ irrelevant; question is if $O_S \rightarrow f_ {\ast}O_X$ is =. Surely $U$ dense in sense preserved by localization, so localize @ generic pt of complement of max. open where $O_S = f_ {\ast}O_X$, so $S$ local and "$O_S = f_ {\ast}O_X$" away from closed pt. Try Nagata or non-normal counterex. – BCnrd Aug 7 '10 at 13:26
By the way, surely despite the weakening of properness, you still assume $f$ is separated, right? Please edit the question so it is accurate as stated. – BCnrd Aug 7 '10 at 13:28
That was very helpful, thanks (also to Angelo). I am trying to come up with a general statement which is valid for ANY base scheme (but I am a bit flexible with $f$). Although flatness of $f$ may be the wrong kind of assumption here, the non-normal counterexamples I can think of turn out to be non flat. – Behrang Noohi Aug 10 '10 at 11:40

The following example does not work, it hasn't geometrically connected fibers. Sorry.

In general the answer is no. Take $k \subset K$, a finite extension of field (so the morphism $\operatorname{Spec}(K)\to\operatorname{Spec}(k)$ is proper). Let $X$ be an affine variety over $k$. Let now $x$ be a $K$-point of $X$ that is not defined over $k$. The corresponding morphism $\operatorname{Spec}(K)\to X$ does the job.

-

This is essentially the proof of the rigidity theorem. As Brian says, it is enough to show that $O_S \rightarrow f_ {\ast}O_X$ is an isomorphism. If $p \in S$, then $\mathrm{H}^0(X_p, \mathcal{O}_{X_p}) = k(p)$, because the fibers are geometrically connected and geometrically reduced. Then by Grothendieck's base change theorem, $O_S \rightarrow f_ {\ast}O_X$ is in fact an isomorphism.

Edit: This does not answer Behrang's question, in view of his first comment (which should be really incorporated in the question).

-
Dear Angelo: The OP made the comment below the question that he only actually has properness over a dense open in $S$. So unfortunately the usual cohomological tools seem to not apply. I hope the OP will follow my request to please revise the question to include the hypotheses desired (and to make clear if U is quasi-compact over S, schematically or just topologically dense, etc.). – BCnrd Aug 7 '10 at 16:19
Oops sorry, I had missed the comment. – Angelo Aug 7 '10 at 16:28
If $S$ is Noetherian affine and normal, and $X$ is normal, as $O(X_U)=O(U)$, then Zariski's extension theorem imply that $O(X)=O(S)$. I think this is reason why BCnrd said "try non-normal counterexample". The problem I think is to find $X$ flat over $S$. – Qing Liu Aug 7 '10 at 22:09
Dear Qing: yep. – BCnrd Aug 7 '10 at 22:39