Math question: Continuity at a point

In Goedel Escher Bach, Douglas Hoffstadter discusses a function which has a jump discontinuity at every rational value of x, and is continuous at every irrational value.

My question is, basically, what does “continuous” mean? I thought continuity was definable only in terms of intervals, not points–but as far as I can tell, there are no continuous intervals in a function such as that just described. So what does it mean to be continuous at a point, if it doesn’t mean that the point is part of an interval containing all real numbers between two particular (and distinct) values?

(I say there are no continuous intervals in the function because since there’s a jump discontinuity at every rational value, and since between every pair of values there exist an infinite number of rational values, it follows that between any two values there will be an infinite number of jump discontinuity, which (AFAIK) makes the interval between those values discontinuous.)

Well, perhaps I should look at Wikipedia first:

I’ll have to get clear on what “limit” means here but I gather the idea (very lay-paraphrased) is that there’s no discontinuity at c because c is exactly where you’d ‘expect’ it to be given everything around it.

I can make intuitive sense of what it would mean to be continuous at every irrational, then–there’d be an infinite number of jumps between each irrational number, but the values at the irrational numbers themselves would follow a “pattern” of some kind supporting the existence of a limit. Which describes the function Hofstadter was discussing pretty well.

It means exactly the same as what it means in Calc I: if the value at f(c) is the same as what f(c) approaches as x “gets close to” c, then f is continuous at c.

I think understanding limits is easier if you consider a counter-example. Imagine the graph of a parabola f(x) = x[sup]2[/sup] + 2, except that this is a special parabola where f(0) is undefined.

If you make a table of all the values getting closer and closer to f(0) from the right side, you’ll see that they approach (but do not actually reach) 2. And the same if you approach from the left. So we say that the limit of f(x) as x approaches zero is two. But f(0) itself is not actually 2. So f is not continuous at zero.

Think of it like a game: You name a tolerance, and I’ll name an interval such that all points within that interval are within that tolerance.

First game: We’ll use the function f(x) = x, in the vicinity of the origin. You pick, say, 1/2 for your tolerance. Fine, I say: For any x within 1/4 of the origin, f(x) is within your tolerance. If you pick 1/10 for your tolerance, I can pick 1/20. If you pick 0.000000001, I can pick 0.0000000005. No matter what you pick, I can always win this game. So we say that that function is continuous at the origin.

Now, let’s say we play again, with the Heaviside function: g(x) = {0: x ≤ 0, 1: x > 0}. You pick your tolerance to be 1/2. Now, no matter what I pick, I can’t win: Even if I pick 0.00000001, I lose, because g(0.00000001) = 1, and 1 is greater than 1/2. Granted, you could still throw the game by picking 2 to be your tolerance, but you don’t have to: You can, if you choose, force a win, just by picking a number smaller than the size of the jump. Since you can force a win, we say that the Heaviside function isn’t continuous at that point.

All right, now let’s play this game again with the function you’re talking about. For the record, the function is h(x) = {0: x is irrational, 1/q: x = p/q in lowest terms}. We’ll play in the vicinity of pi. To keep things fully fair, I’ll let you choose a tolerance, and then I’ll answer with an interval. I’ll bet you that no matter what tolerance you pick, I can still win, which means that this function is continuous at pi.

A rather over-simplified but useful explanation of continuity at a point at the Calc I level is that all the following three conditions have to be met:

  1. The value of the function is defined at the given point,

  2. The limit of the function exists at the given point (that’s the bit you were saying about having a place where you’d “expect” the function to be at that point, given the behavior of the function as you get closer and closer to the point), and

  3. The value and the limit of the function at the given point are equal.

Yes; this is an excellent intuitive description of continuity at a point.

I think there’s a typo that needs to be fixed:

there’s no discontinuity at c because f(c) is exactly where you’d ‘expect’ it to be given everything around it.

That is indeed what I meant, thanks for the clarification.

This is a strange case indeed, methinks, and seems to mess badly with any sensible notion of continuity, even if it technically meets the three required conditions! I’ve only thunk about this for t < 0.05 hours since reading the above. Someone tell me if I’m Straight Doper enough to have doped this one out:

We seem to have:
(a) f(pi) = 0
(b) within any “sufficiently” small interval around x=pi, we have a mixture irrationals with f(that)=0, along with rationals with f(that)=something very close to zero (because for any pair of rationals to be very close together, their “q’s” in the above 1/q definition must get very large to distinguish them, thus the “1/q” gets very close to 0).
© No matter how small a tolerance you name, you can find an small interval where those “1/q” values are all within the named tolerance of zero, even though they are not zero.

For any small interval you choose, there could chance to be a small “q” serendipitously mixed in the interval that would destroy the continuity, but you could always choose a smaller interval to exclude point.

But note that even so, there must a mix or rationals and irrationals in that interval, so there must be jumps between zero and non-(but-really-near)-zero values of f(x). Somebody, am I picturing this a-right? So there is NO continuous interval, however small, around x=pi, yet the function meets the three criteria for continuity.

Yikes. This is a mal-behaved function indeed! Well, I’m a Bent-Up Doper now! Methinks we need to update the definition of continuity to exclude cases like this!

– Senegoid

Senegoid, you seem to be bringing up the same consideration I did in the OP–that on a function like this there will be no continuous intervals. (Intervals on which the function is continuous at every point.) But in the thread it’s been explained that a function can be continuous at a point even if it’s not continuous over any interval. Why doesn’t that alleviate your concern?

The discussions above have made clear what the function isn’t doing, to-wit, being continuous over any interval – leaving one to wonder, perhaps: Okay, so what IS the function doing over any small interval (e.g., around pi) instead? I think my post is the first to try to give a picture of what is going on with this function, such that it could have such a weird property. I didn’t think that was very obvious. Well, okay, if I could have pictured it in my mind with t < 0.05 hours of thought, maybe it wasn’t that obtuse – but I sure thought it’s weird. – Enough to provoke my suggestion that it so violates whatever anyone ever originally meant continuity to mean, maybe we need to update the definition. (Semi-facetious suggestion.)

Around any irrational there will be infinitely many rationals, but as you restrict the intervals, the denominators are getting larger and larger, so the value of the function is getting smaller and smaller.

FWIW, I will mention that this makes no sense in constructive mathematics. Constructivists define continuity to mean uniformly continuous on any closed interval and continuity at a point is meaningless. See Errett Bishop, Constructive Analysis for more details. Any constructible function is automatically continuous (which Bishop accepts as a fact, but not a theorem since it has no constructive proof). The function in question is not constructible since there is usually no way of deciding whether a number, even a constructible number, is rational or not. Bishop also describe the construction of a number that you cannot even decide whether it is 0. Any function that can be calculated in a computer (e.g. in a Turing machine, even one with an infinite tape) is automatically constructible.

Actually, it might be instructive to first start with a few simpler cases. First, take the Dirichlet function: d(x) = {0: x irrational, 1: x rational}. OK, that’s kind of weird, but I think everyone can accept that it’s discontinuous everywhere.

Now, consider the function e(x) = d(x)*x. This has much the same property as the Dirichlet function, except now, for any x close to zero, e(x) will also be close to zero, so it’s continuous at exactly that point. Once you accept that this function can be continuous at a single point, it’s a lot easier to see how the function in the OP is continuous at all the irrationals.

And Hari Seldon, does your post there imply that, say, the Heaviside function is not constructable? That seems a rather peculiar definition of “constructable”, to exclude something as simple as the Heaviside.

What definition of continuous on an interval are you using?

When I teach Calc I, continuity on an interval means continuous at every point on that interval, and only makes sense after defining continuity at a point.

In higher math most definitions of continuity use open sets and don’t confine themselves to intervals.

I also posted to supply this link, which may be useful to some.

Aha! Yes, this makes a good introduction leading to the OP’s function.

Yes, the Heaviside function is not constructive; or rather, it’s constructive, but not constructively a total function. It’s only defined for those x such that either x < 0, x = 0, or x > 0. Constructively, this is not all of R (even though there is no x which is neither < 0, nor = 0, nor > 0; constructive mathematics, in the relevant sense, uses intuitionistic logic).

Frylock is clearly taking the intermediate value property as definitive of continuity. Which is a perfectly plausible thing to do for the ordinary language word “continuity”; it’s just not the particular definition that has been settled upon in mathematical jargon.

One of my favorite mathematical oddities is Conway’s base 13 function, which has the intermediate value property even though it’s discontinuous everywhere.

I agree.

Also, another way to define “continuous” is that if the derivative of the function is defined at a point or range, then that point or range is continuous for that original function. If f’(n) (the value of the derivative of function f at x=n) is not defined (e.g. infinity, negative infinity, or otherwise not defined in the real number system), then the function is discontinuous at that point. f(n) may or may not be defined.

There’s an old joke about Politically Correct Math and how “discontinuous” functions should be called “differentially challenged” instead.

Not necessarily. The absolute value function f(x) = |x| and the cube root function f(x) = x^(1/3) are both continuous at x=0, but f’(0) does not exist.