Suppose *f*:*X*→*Y* is a morphism of schemes. We can define a function on the underlying topological space *Y* by sending *y*∈*Y* to the dimension of the fiber of *f* over *y*. When is this function upper semi-continuous?

I have a "concrete" application in mind. If an algebraic group *G* acts on a scheme *X*, I'm pretty sure the dimensions of the stabilizers is upper semi-continuous (i.e. it can jump up on closed subschemes), but I don't know a proof. The stabilizers of points are the fibers of the map *Stab*→*X* in the following cartesean square:

Stab ---> GxX | | | cart | v v X ----> XxX

The map *GxX→XxX* is given by *(g,x)→(gx,x)*, and the map *X→XxX* is the diagonal *x→(x,x)*. So it would be nice to have a condition satisfied by *GxX→XxX* which guarantees upper semi-continuity of the fiber dimension.