Flat with geometrically connected and proper fibers is proper

Let $$S$$ be a locally Noetherian scheme.

Lemma 1. If $$f: X \to S$$ a proper flat morphism, then it has proper fibers, and if furthermore the generic fibers are geometrically connected all its fibers are (by semi-continuity, EGA IV.15.5.4).

There is a converse:

Lemma 2. if $$f$$ is flat (or even just univ. submersive), finite type separated, has proper and geometrically connected fibers then it is proper (EGA IV.15.7.10).

If $$S$$ is a dvr, there is an intermediate result:

Lemma 3. Let $$f:X \to S$$ be flat separated of finite type, S a dvr. If the special fiber is proper and the generic fiber is geometrically connected then $$f$$ is proper. Hence the special fiber is geometrically connected by the result above.

Proof: Indeed the proof is in Serre-Tate, Good reduction of abelian varieties, Lemma 3. By fpqc descent they reduce to $$S=\mathop{Spec} \hat{A}$$ the spectrum of a complete noetherian ring, and use lifting of proper components of the special fiber. (The Lemma assumes that $$f$$ is smooth but I think they only use that it is univ open).

So the following question is natural:

Question. if $$f:X \to S$$ is flat separated, of finite type with geometrically connected generic fibers. If the fiber at $$s$$ is proper, is $$f$$ proper at $$s$$ (that is proper in a neighborhood of $$s$$)?

Essentially I'd like to combine the local proper valuative criterion (of EGA IV.15.7.5) with the version https://stacks.math.columbia.edu/tag/0894 where we can restrict to a dense open to reduce to the previous case. Does this work?

I think that if the fiber is proper at $$s$$ and all fibers of generisations of $$s$$ are geometrically connected, then $$f$$ is indeed proper at $$s$$ (so fibers of generisations of $$s$$ are proper). Indeed using the local valuative criterion we reduce exactly to Lemma 3.

Conversely if all fibers of generisations of $$s$$ are propers and the generic fibers (we only need this for generic $$\eta$$ specializing to $$s$$) are geometrically connected then $$f$$ is proper too. Indeed we take a chain $$s_0 \to s_1 \to \dots s_n=s$$ and we Lemma 3 to conclude that $$f$$ is proper at $$s_1$$, so its fiber is geometrically connected, so $$f$$ is proper at $$s_2$$, and so on.

• EGA IV.15.7.8 applies only when $f$ is quasi-finite. – abx Sep 8 '20 at 16:38
• Sorry I meant EGA IV.15.5.4 instead of EGA IV.15.5.9, I'll edit – RandomMathUser Sep 8 '20 at 17:35
• The problem is local on $S$, so assume that $S$ is an affine scheme. Now factor $f$ as the composition of a dense open immersion and a proper morphism via Nagata compactification. Finally, consider the closed image in $S$ of the closed complement of the open immersion. – Jason Starr Sep 8 '20 at 19:41
• @Jason: sorry I was not able to complete your proof. But I think I found another one. – RandomMathUser Sep 9 '20 at 15:42

So I think I have the following proof: since the condition is topological, we can assume that everything is reduced. Since $$f$$ is separated, it suffices to prove that $$f$$ is proper at $$y$$ at each irreducible component of $$X$$. So we reduce to $$S$$ and $$X$$ integral and $$f$$ dominant. But in this case we can use EGA IV.15.7.1, which states that it suffices to check the valuative criterion for $$S'$$ a dvr when the generic point $$\eta$$ of $$S'$$ maps to the generic point of $$X$$ hence also to the generic point of $$Y$$, and the closed point $$s$$ of $$S'$$ maps to $$Y$$. But then we are reduced to Lemma 3.