Locally constant function


In mathematics, a function f from a topological space A to a set B is called locally constant, if for every a in A there exists a neighborhood U of a, such that f is constant on U.
Every constant function is locally constant.
Every locally constant function from the real numbers R to R is constant, by the connectedness of R. But the function f from the rationals Q to R, defined by f = 0 for x < π, and f = 1 for x > π, is locally constant.
If f : AB is locally constant, then it is constant on any connected component of A. The converse is true for locally connected spaces.
Further examples include the following:
There are sheaves of locally constant functions on X. To be more definite, the locally constant integer-valued functions on X form a sheaf in the sense that for each open set U of X we can form the functions of this kind; and then verify that the sheaf axioms hold for this construction, giving us a sheaf of abelian groups. This sheaf could be written ZX; described by means of stalks we have stalk Zx, a copy of Z at x, for each x in X. This can be referred to a constant sheaf, meaning exactly sheaf of locally constant functions taking their values in the group. The typical sheaf of course isn't constant in this way; but the construction is useful in linking up sheaf cohomology with homology theory, and in logical applications of sheaves. The idea of local coefficient system is that we can have a theory of sheaves that locally look like such 'harmless' sheaves, but from a global point of view exhibit some 'twisting'.