Imagine that you don’t know about the irrational numbers. All you know are rational numbers. You can still define rational-valued functions of rational variable (functions whose domain is a subset of $\mathbb{Q}$, and whose range is a subset of $\mathbb{Q}$). Let me call these “r-function” (unfortunately, “rational function” has a different meaning).
When we talk about “open intervals” in this setting, we just means the rational numbers there; so the open interval $(a,b)$ with $a,b$ rationals means $\{q\in\mathbb{Q}\mid a\lt q\lt b\}$.
You can also still define limits for such r-functions, exactly the same way you are used to, in this setting.
Definition. Let $f$ be an r-function, let $a\in\mathbb{Q}$. Assume that there exists an open interval containing $a$ such that $f$ is defined at every rational on that open interval. We say that the limit of $f$ as $x$ approaches $a$ is $L$ if and only if for every $\epsilon\gt 0$ there exists a $\delta\gt 0$ such that if $x\in\mathbb{Q}$ and $0\lt|x-a|\lt \delta$, then $|f(x)-L|\lt \epsilon$.
The limit theorems will still be valid in this setting.
We can also define continuity in this setting:
Definition. Let $f$ be an r-function and let $a$ be a rational. We say that $f$ is *continuous at $a$ if and only if three things happen:
- $f$ is defined at $a$.
- The limit of $f$ as $x$ approaches $a$ exists.
- The value of the limit is $f(a)$.
Again, a lot of the theorems you know about limits and about continuity are still valid in this setting. Also, a lot of the functions you are familiar with that make sense in this setting will be continuous everywhere: polynomials, viewed as r-functions, are continuous everywhere (that is, at every $a\in\mathbb{Q}$).
It would be a good exercise for you to check what theorems go through.
Now here is the important part: you don’t know what the reals are. You do not imagine these functions as “living” on the real line and full of holes; because we are imagining a world where the non-rational real numbers simply do not exist, period. So when you imagine these functions, something like $f(x) = 3x^2-1$ is continuous everywhere. There is no such thing as $\sqrt{1/3}$. At every rational $a$, you can prove that $f(x)$ is continuous at $a$, under the definition given above.
But in this setting, the Intermediate Value Theorem is not valid. Because, for example, even though $f$ is continuous on $[0,1]$, and $f(0)\lt 0$ and $f(1)\gt 0$, there is no rational $q$ (which, remember, are the only numbers that exist here) in $(0,1)$ satisfies $f(q)=0$.
Why does this happen? Because the rationals are not complete. They fail to satisfy a key property that the reals do satisfy. It’s not that they have “holes” when you think of them as sitting inside the reals, but that they intrinsically fail to satisfy the completeness property. Namely, the following statement:
If $S$ is a nonempty subset of XXXX
that is bounded above, then $S$ has a least upper bound in XXXX
.
When XXXX
is replaced by “the real numbers”, the statement is true. That is the Completeness of the Real Numbers. When you replace XXXX
with “the rational numbers”, the statement is false. This is why we say that rational are not complete.
The fact that this fails is why the IVT fails for r-functions, even though one can certainly define limits and continuity for r-functions.
In fact, the IVT is equivalent to completeness: if you assume the real numbers are complete, you can prove the IVT. And if you do not assume the real numbers are complete, but you assume the IVT holds, then you can prove that the reals are complete from that hypotheses.
The definitions above can be used for real functions, and it doesn’t matter whether the reals are complete or not. You can see that because by changing “real” to “rational” everywhere, you still get a sensible definition that lets you prove the results about limits, even though the rationals are not complete. So you do not need the fact that the reals are complete to define limits, or open intervals, or neighborhoods, or continuity. All of those can be defined, and statements about them can be proven, whether or not the reals (or whatever numbers you choose to work with) are complete. That’s why we do not say that completeness is required for those definitions.
In calculus, the first time that completeness really comes in is when you prove the IVT. Up until that point, you never really need the completeness (though sometimes it is informally invoked to give intuition about definitions, such as the definition of continuity being an attempt at capturing the idea of “no holes, no jumps, no breaks”). But, formally, you do not need completeness for any of those definitions, or any of those theorems.
You say, with respect to $f(x)=3x^2-1$:
Rather, it can be said that function $f(x)$ is not continuous in $\mathbb{Q}$. Because limit does not exist for the points in $\mathbb{Q}$ adjoining $\sqrt{1/3}$ (as the function value suddenly jumps suddenly leaving the point $f(x) = 0$). So, the function fails to be continuous in $\mathbb{Q}$ (for the above given definition of continuity).
That’s wrong.
First, what does “points adjoning $\sqrt{1/3}$” mean? Give my any rational $q$, and the function satisfies the definition of limit at that point, with limit equal to $q^2-1=f(q)$. The function is continuous at any $q$, no matter what $q$, no matter how close it is to the real number $\sqrt{1/3}$. As an r-function, there are no “sudden jumps” in the sense you seem to think there are.
Remember that continuity is not about pictures, not about “holes”. It’s about the definition. And the definition is satisfied, so the function is continuous. The “number” $\sqrt{1/3}$ may as well not exist as far as the r-function is concerned.
Second “the point $f(x)=0$”. That’s not a point in the domain. The fact that the function does not take the value is the failure of the Intermediate Value Theorem, not of continuity. Because continuity is connected to the IVT only because you have completeness. Without completeness, the two are not connected.
That’s why we have a definition of continuity, one that is mathematical, and not merely an intuitive notion of “no jumps”.
(Recall that the definition of continuity still yields results and that are sometimes hard to swallow, like the fact that the function $f(x) = 0$ if $x\in\mathbb{Q}$ and $f(x)=x$ if $x$ is irrational is in fact continuous at $0$, even though it is full of holes and jumps...)
What is going on is that there is a much more general definition of continuity and of limits than the one you are seeing; but one that would be too general and abstract for most students at your level. A definition that relies on the notion of “closeness”, “neighborhoods”, “open sets”. They are studied as part of a field called “topology”, and the case of the real numbers is just one particular instance of these general notions, one where you have a bunch of other tools that make things easier and more concrete.
There is no surprise that you are getting confused, given that you are trying to push ideas that have been simplified and anchored in the real numbers to places where they no longer make full sense without being able to abstract and completely divorce yourself from those anchors. Which kind of defeats the purpose of putting those anchors down in the first place (which are there to help ground things as you learn them for the first time). These are not easy things to do on a first try.