The topological analog of flatness? Recall that a map $f:X\to Y$ of schemes is called flat iff for any $x\in X$ the ring $O_{X,x}$ is a flat $O_{Y,f(x)}$-module.
Briefly the question is: what is the topological analog of this?
Many notions and constructions in scheme theory have obvious topological counterparts (which probably were the inspiration at least in some cases, but I'm not a historian to tell this for sure). Gluing schemes is analogous to gluing smooth manifolds out of copies of Euclidean balls. Proper, \'etale and smooth morphisms all have obvious topological analogs: these are proper maps, local homeomorphisms and smooth maps of smooth manifolds such that the differential at each point is surjective (submersions). A separated scheme is the analog of a Hausdorff space. Moreover, in all these cases it seems clear that there is just one way of translating the corresponding topological notion in the language of schemes.
Flat morphisms seem trickier (to me). I'm aware of two interpretations. One is too vague ("a map such that the preimages of points don't vary too wildly"). The other ("a Serre fibration") is not completely satisfactory: all fibers of a Serre fibration are homotopy equivalent and are even homeomorphic if the fibration is locally trivial. However, there are plenty of flat maps which do not look like Serre fibrations at all: for example the projection of the union of the lines $x=\pm y$ in the plane onto the $x$-axis.
One way to make the above question a bit more precise is this: is there a way to define the notion of a "flat" map (of sufficiently nice topological spaces, say smooth manifolds or CW complexes or polyhedra) in terms of topology or differential geometry so that when $X(\mathbf{C})$ and $Y(\mathbf{C})$ are the sets of closed points of varieties (= reduced separated schemes of finite type) $X$ and $Y$ over $\mathbf{C}$ a morphism $X\to Y$ is flat if and only if induced map $X(\mathbf{C})\to Y(\mathbf{C})$ of topological spaces is "topologically" flat? Maybe this is too much to ask for, in which case I'd be interested to know if there is a variation of this which holds.
An obvious guess: one should take the notion of a submersion and relax it, but I'm not sure how.
 A: An immediate comment is that, in the case of smooth manifolds, the notion that you suggest needs to take into account more than just the differentiable structure of $X$ and $Y$: any two smooth, connected, projective curves of the same genus $g \geq 2$ are diffeomorphic, but there is a flat morphism (in the usual sense) between them if and only if they are isomorphic as complex varieties. Since there is a family with $3g-3$ parameters of complex structures on curves of genus $g$, there seems to be the need for more structure to be encoded in the notion of an analogue of flatness.
On the positive side, I have always thought that Morse functions have a feel similar to flat morphisms: while they do not seem to preserve the "numerical" character of flat functions (e.g. fibers may sprout off extra components), they nonetheless impose a certain bound on the variations of the fibers. More concretely, if $X$ consists of $g+1$ disjoint circles in the plane with centers along the $x$-axis (no two of which are contained in one another) and $Y$ is the $x$-axis, then I tend to think of the projection of $X$ onto the $x$-axis as the "real picture" of the degree two morphism from a curve of genus $g$ to $\mathbb{P}^1$. In this case, the projection is a Morse function and the morphism I think of is a flat morphism!
To make the analogy more precise, you would probably have to impose some condition on the critical points to take into account the "automatic orientability" of the complex case: I am not sure that I would consider "flat" a Morse function from $S^1$ to $\mathbb{R}$ having more than two critical points. This might give a way of "curing" the issue with extra components appearing in fibers.
A: Here is a statement that goes into the direction you are looking for:

When $X$ and $Y$ are smooth varieties over $\mathbb C$, then $f$ is flat if and only if every fiber of $f$ has dimension $\dim X - \dim Y$.

Thiis is perhaps not quite as well-known as it should be; I learned it as a student in my algebraic geometry class taught by Jens Franke. I would also be glad if someone could tell me a reference, as Jens Franke doesn't seem to be planning to turn his lecture notes into a book...
(Here is an example of one of the several precise statements he proved:
Let $f \colon X \to Y$ be a morphism of finite type between locally Noetherian prescheme, such that $X$ is Cohen-Macaulay and $Y$ is regular. Then $f$ is flat if either of the following two conditions holds:


*

*For every irreducible closed subset $Z \subset Y$ and every irreducible component $Z'$ of $f^{-1}(Z)$ we have $\mathrm{codim}(Z', X) = \mathrm{codim}(Z, Y)$

*$Y$ is ``equicodimensional'', $f$ maps closed points to closed points, and every non-empty fiber of $f$ has dimension $\dim X - \dim Y$.


Here ``equicodimensional'' means that every closed point has the same codimension.)
