Generic smoothness in the analytic setting. If $X, Y$ are non-singular algebraic varieties over an algebraically closed field of characteristic 0, and $f: X \to Y$ is a morphism, then there exists a Zariski-open, non-empty subset $U \subset Y$, such that $f^{-1}(U) \to U$ is a smooth morphism.
I wonder: Is the same true if $X, Y$ are non-singular complex analytic spaces?
I know that Sard's theorem shows that "most" fibers are smooth, in the sense that $f(\operatorname{Sing}(f)) \subset Y$ has Lebesgue measure $0$. But is $f(\operatorname{Sing}(f))$ also contained in a Zariski-closed subset?
If this is true, what is a good reference?
 A: Here is a reference. I have translated the statement and changed the wording slightly.
Theorem [Bănică, Théorème, (ii)]. Let $f\colon X \to Y$ be a morphism of complex analytic spaces. If $f$ is flat, then the set
$$U = \bigl\{ x \in X \bigm\vert X_{f(x)}\ \text{is regular at}\ x\bigr\}$$
is open in $X$, and the complement of $U$ is analytic in $X$.
For proper flat morphisms, we have:
Corollary [Bănică, Corollaire, (ii)]. Let $f\colon X \to Y$ be a proper morphism of complex analytic spaces. If $f$ is flat, then the set
$$V = \bigl\{ y \in Y \bigm\vert X_{y}\ \text{is a manifold}\bigr\}$$
is open in $Y$, and the complement of $V$ is analytic in $Y$.
As Moishe Kohan suggests, the Corollary follows from the Theorem using Remmert's theorem.
To obtain a statement that does not mention flatness, you can use Frisch's theorem [Frisch, Théorème (IV, 9)] (see [Kiehl, Satz 4] for an alternative proof), which says that the locus in $X$ at which $f$ is not flat is closed and analytic. For a textbook account of Frisch's theorem, see [Bănică–Stănăşilă, Theorem 4.5] (their proof follows [Kiehl]).
Finally, you can see [Bingener and Flenner, Corollary 2.1] for an English reference proving variants of these results (they also prove a version for real analytic spaces).
A: My answer was removed twice. The first time was for some unknown reasons by @Elliot Yu and @Leucippus. The second time was after my complaint to the Stacksexchange support. The answer was deleted “per my request”.
Let me answer your question for the last time.
The answer to your question is yes. In fact, we have a stronger result.
Theorem Assume that $X$ is smooth and $Y$ is irreducible. Let $f:X\rightarrow Y$ be a proper holomorphic map. Then the complement of the set $V:=\{y\in Y: X_y \text{ is a manifold}\}$ is a proper analytic subset of $Y$.
This result can be found on Page 108 of Several Complex Variables VII by Grauert, Peternell, and Remmert (link 1, link 2).
The complement of $V$ is just a negligible set without any extra assumptions. Takumi’s answer gives a stronger claim when $f$ is flat. I'm not sure if it holds or not.
