and I(n, xn,m) ∩ Kc ⊂ f−1((f(x) − ε, f(x) + ε)). Hence, f|Kc is continuous at x.
To prove the last part of the theorem, note first that (iii) implies (ii) even without the restriction that J contains no interval. Now suppose that J contains no interval and that f,K are as in (ii). Define (1) G(x) = lim sup t→x,t∈Kc f(t) and (2) g(x) = G(x) when G(x) is finite, or = f(x) otherwise. In particular, it follows from (ii) that f|Kc = g|Kc . Let x ∈ Kc and ε > 0. According to (ii) there is a δ > 0 such that (3) |g(y) − g(x)| = |f(y) − f(x)| < ε/2 whenever y ∈ (x − δ, x + δ) ∩Kc. If z ∈ (x − δ, x + δ) ∩K, then the assumption that K can contain no nonempty open set implies the existence of a sequence {zn : n ∈ N} ⊂ (x − δ, x + δ) ∩ Kc such that f(zn) → G(z). Hence, by (3), G(z) is finite, so g(z) = G(z) and |g(z) − g(x)| ? ε/2 < ε. Therefore, g is continuous at x. QED