This proof starts by proving the special case where the function's domain is a closed and bounded interval [a, b]. The proof of the general case follows from this special case.
Proof when the domain is closed and bounded Two proofs of this special case are given.
Proof 1 Let I := [a, b] be an interval and let f : I \to \R be a non-decreasing function (such as an
increasing function). Then for any a f(a) ~\leq~ f\left(a^+\right) ~\leq~ f\left(x^-\right) ~\leq~ f\left(x^+\right) ~\leq~ f\left(b^-\right) ~\leq~ f(b). Let \alpha > 0 and let x_1 be n points inside I at which the jump of f is greater or equal to \alpha: f\left(x_i^+\right) - f\left(x_i^-\right) \geq \alpha,\ i=1,2,\ldots,n For any i=1,2,\ldots,n, f\left(x_i^+\right) \leq f\left(x_{i+1}^-\right) so that f\left(x_{i+1}^-\right) - f\left(x_i^+\right) \geq 0. Consequently, \begin{alignat}{9} f(b) - f(a) &\geq f\left(x_n^+\right) - f\left(x_1^-\right) \\ &= \sum_{i=1}^n \left[f\left(x_i^+\right) - f\left(x_i^-\right)\right] + \sum_{i=1}^{n-1} \left[f\left(x_{i+1}^-\right) - f\left(x_i^+\right)\right] \\ &\geq \sum_{i=1}^n \left[f\left(x_i^+\right) - f\left(x_i^-\right)\right] \\ &\geq n \alpha \end{alignat} and hence n \leq \frac{f(b) - f(a)}{\alpha}. Since f(b) - f(a) we have that the number of points at which the jump is greater than \alpha is finite (possibly even zero). Define the following sets: S_1: = \left\{x : x \in I, f\left(x^+\right) - f\left(x^-\right) \geq 1\right\}, S_n: = \left\{x : x \in I, \frac{1}{n} \leq f\left(x^+\right) - f\left(x^-\right) Each set S_n is finite or the
empty set. The union S = \bigcup_{n=1}^\infty S_n contains all points at which the jump is positive and hence contains all points of discontinuity. Since every S_i,\ i=1,2,\ldots is at most countable, their union S is also at most countable. If f is non-increasing (or
decreasing) then the proof is similar. This completes the proof of the special case where the function's domain is a closed and bounded interval. \blacksquare
Proof 2 For a monotone function f, let f\nearrow mean that f is monotonically non-decreasing and let f\searrow mean that f is monotonically non-increasing. Let f : [a, b] \to \R is a monotone function and let D denote the set of all points d \in [a, b] in the domain of f at which f is discontinuous (which is necessarily a jump discontinuity). Because f has a jump discontinuity at d \in D, f\left(d^-\right) \neq f\left(d^+\right) so there exists some
rational number y_d \in \Q that lies strictly in between f\left(d^-\right) \text{ and } f\left(d^+\right) (specifically, if f \nearrow then pick y_d \in \Q so that f\left(d^-\right) while if f \searrow then pick y_d \in \Q so that f\left(d^-\right) > y_d > f\left(d^+\right) holds). It will now be shown that if d, e \in D are distinct, say with d then y_d \neq y_e. If f \nearrow then d implies f\left(d^+\right) \leq f\left(e^-\right) so that y_d If on the other hand f \searrow then d implies f\left(d^+\right) \geq f\left(e^-\right) so that y_d > f\left(d^+\right) \geq f\left(e^-\right) > y_e. Either way, y_d \neq y_e. Thus every d \in D is associated with a unique rational number (said differently, the map D \to \Q defined by d \mapsto y_d is
injective). Since \Q is countable, the same must be true of D. \blacksquare
Proof of general case Suppose that the domain of f (a monotone real-valued function) is equal to a union of countably many closed and bounded intervals; say its domain is \bigcup_{n} \left[a_n, b_n\right] (no requirements are placed on these closed and bounded intervals{{efn|So for instance, these intervals need not be
pairwise disjoint nor is it required that they intersect only at endpoints. It is even possible that \left[a_n, b_n\right] \subseteq \left[a_{n+1}, b_{n+1}\right] for all n}}). It follows from the special case proved above that for every index n, the
restriction f\big\vert_{\left[a_n, b_n\right]} : \left[a_n, b_n\right] \to \R of f to the interval \left[a_n, b_n\right] has at most countably many discontinuities; denote this (countable) set of discontinuities by D_n. If f has a discontinuity at a point x_0 \in \bigcup_{n} \left[a_n, b_n\right] in its domain then either x_0 is equal to an endpoint of one of these intervals (that is, x_0 \in \left\{a_1, b_1, a_2, b_2, \ldots\right\}) or else there exists some index n such that a_n in which case x_0 must be a point of discontinuity for f\big\vert_{\left[a_n, b_n\right]} (that is, x_0 \in D_n). Thus the set D of all points of at which f is discontinuous is a subset of \left\{a_1, b_1, a_2, b_2, \ldots\right\} \cup \bigcup_{n} D_n, which is a countable set (because it is a union of countably many countable sets) so that its subset D must also be countable (because every subset of a countable set is countable). In particular, because every interval (including open intervals and half open/closed intervals) of real numbers can be written as a countable union of closed and bounded intervals, it follows that any monotone real-valued function defined on an interval has at most countable many discontinuities. To make this argument more concrete, suppose that the domain of f is an interval I that is not
closed and
bounded (and hence by
Heine–Borel theorem not
compact). Then the interval can be written as a countable union of closed and bounded intervals I_n with the property that any two consecutive intervals have an
endpoint in common: I = \cup_{n=1}^\infty I_n. If I = (a,b] \text{ with } a \geq -\infty then I_1 = \left[\alpha_1, b\right],\ I_2 = \left[\alpha_2, \alpha_1\right], \ldots, I_n = \left[\alpha_n, \alpha_{n-1}\right], \ldots where \left(\alpha_n\right)_{n=1}^{\infty} is a strictly decreasing
sequence such that \alpha_n \rightarrow a. In a similar way if I = [a,b), \text{ with } b \leq +\infty or if I = (a,b) \text{ with } -\infty \leq a In any interval I_n, there are at most countable many points of discontinuity, and since a countable union of at most countable sets is at most countable, it follows that the set of all discontinuities is at most countable. \blacksquare == Jump functions ==