Let f(x) = x - a if x is irrational, and a - x if x is rational. The claim was made that f is continuous only at a. I’m pretty sure it isn’t, but I haven’t got a proof. I know that it’s not everywhere continuous–otherwise, it would have to coincide with x - a or a - x. So what’s the deal? Where is this function continuous?
But for any rational number q, you can construct a sequence of rational numbers converging to q. For any x[sub]n[/sub] in the sequence, f(x[sub]n[/sub]) = a - x[sub]n[/sub]. The limit as n goes to infinity of a - x[sub]n[/sub] is a - q. So it would seem that f is continuous on the rationals, unless I’ve made a mistake.