Given a set X (such as the set of points in an interval), the space ℝ^{X} of all real-valued functions on X is not usually the function space we work with -- it is "too large" in some sense. Thus, we typically deal with functions that "behave well" with respect to some other structure on X.

One familiar example of this is functional analysis using the L^{p} spaces: we begin with a measure space (X,μ) and consider two functions to be equivalent if they agree on a set of full μ-measure. Strictly speaking, then, we do not deal with functions themselves, but with equivalence classes of functions.

If X carries a topological structure rather than a measure-theoretic one, then we often consider the space C(X) of all continuous functions on X. In this case elements of the space are single functions, and we do not impose any equivalence relation.

Of course, there are many discontinuous functions from X to ℝ that may be of interest: characteristic functions of subsets Y ⊂ X, for example, or more general piecewise continuous functions. Thus it would be of interest (to me at least) to have some notion of when two arbitrary functions are "close enough to identical" from a topological point of view, just as agreeing μ-a.e. gives a notion of "close enough to identical" from a measure-theoretic point of view.

As an example, if f : [0,1] → ℝ has f(0)=1 and f(x)=0 for all other x, we may reasonably say that the constant function g ≡ 0 is the "continuous version" of f. Similarly, if f : ℝ → ℝ is given by f(x)=1 for x ≥ 0 and f(x)=0 for x<0, while g : ℝ → ℝ is given by g(x)=1 for x>0 and g(x)=0 for x ≤ 0, then we may feel that f and g are "close" to being the same function, perhaps close enough to be identified; furthermore, neither one is "more continuous" than the other, in contrast to the previous example. (They are both more continuous, however, than the function h defined by h(0)=2 and h(x)=f(x)=g(x) for all x ≠ 0.)

One possible way to formalise this intuition would be to put a directed graph structure on the space ℝ^{X} of real-valued functions on X by drawing an edge from f to g if and only if the graph of g is contained in the closure of the graph of f. Thus in the first example above, there would be an edge from f to g, but not from g to f, while in the second example, there would be edges from h to both f and g, and an edge in both directions between f and g, but no edges from f or g to h.

With this digraph structure, continuous functions would have many incoming edges, but no outgoing ones, while "well-behaved" piecewise continuous functions would be partitioned into equivalence classes, each class containing various functions corresponding to the choice for the value of the function at the points of discontinuity.

All this is just my own rambling line of thought at this point, and my question is this: *Is there a systematic and well-developed theory into which such considerations fit? If so, is there a good reference?* I suspect that people have thought about this enough to come up with such a theory, but I have no idea what keywords to look for or what things might be called. (For a similar reason, I wasn't quite sure how to tag this question appropriately, so please feel free to re-tag if you can do better.)