# Doing Calculus on the Rationals (with the help of Nonstandard Analysis)

Nonstandard Analysis is usually used to introduce infinitesimals into the real numbers in an attempt to make arguments in analysis more intuitive.

The idea is that you construct a superset $\mathbb{R}^*$ which contains the reals and also some infinitesimals, prove that some statement holds of $\mathbb{R}^*$, and then use a general “transfer principle” to conclude that the same statement holds of $\mathbb{R}$.

Implicit in this procedure is the idea that $\mathbb{R}$ is the real world, and therefore the goal is to prove things about it. We construct a field $\mathbb{R}^*$ with infinitesimals, but only as a method for eventually proving something about $\mathbb{R}$.

We can do precisely the same thing with $\mathbb{Q}$ instead of with $\mathbb{R}$. But, in Weak Theories of Nonstandard Arithmetic and Analysis, Jeremy Avigad observed that if we don’t care about transferring the results back down to $\mathbb{Q}$, then we can get all the basic results of calculus and elementary real analysis just by working with $\mathbb{Q}^*$, and without ever having to construct the reals.

Let me first differentiate two approaches to nonstandard analysis. The first is the one I mentioned above, where you actually construct a field $\mathbb{R}^*$ (although you need the axiom of choice to do it). This is done entirely within ordinary mathematics. Call this the semantic approach.

Another approach is the axiomatic approach. A good example of this is Edward Nelson‘s internal set theory. In this approach, you take an ordinary axiomatization of some part of mathematics (for example, ZFC), introduce a new predicate for being “standard” or “normal-sized”, and some axioms saying that there exist things which are not standard and how these things relate to everything else. In the usual situation, a sentence which does not contain the predicate “standard” is provable in the new theory iff it’s provable in the old theory. (This is the case with IST and ZFC.)

The axiomatic approach is the approach we’ll take here. We’ll let our language $\mathcal{L}$ consist of a function symbol for each primitive recursive function and relation, together with a predicate $st$ and a constant $\omega$. Our axioms will be the following:

1. If $\phi$ is a true (in the natural numbers) first-order $\mathcal{L}$-sentence that does not include the new predicate $st$, then we take $\phi$ as an axiom.
2. We take $\neg st(\omega)$ as an axiom.
3. We take $\forall x\, (st(x)\rightarrow \forall y as an axiom.
4. We take $st(x_1)\wedge \cdots \wedge st(x_k) \rightarrow st(f(x_1,\ldots, x_k))$ to be an axiom for each $k$-ary primitive recursive function $f$.

The interpretation of our sentences is that we are now quantifying over a domain which includes infinitely large natural numbers (of which $\omega$ is an example) and that the predicate $st$ picks out those which are normal-sized. However, since we are working within the axiomatic system, I will still refer to the domain we are quantifying over as $\mathbb{N}$.

Within the system, construct $\mathbb{Z}$ and $\mathbb{Q}$ from $\mathbb{N}$ as usual. We make the following definitions:

We say that an natural number $n$ is unbounded if it is not standard (i.e., if $\neg st(n)$). We say that an integer $x$ is unbounded if $|x|$ is unbounded. We say that a rational $q$ is unbounded if the closest integer to it is unbounded.

Furthermore, we say that a rational number $q$ is infinitesimal if it equals 0 or if $1/q$ is unbounded. We say that $q$ and $r$ are infinitely close, written $q\sim r$, if $q-r$ is infinitesimal.

Let $\mathbb{Q}'$ be the set of rationals which are not infinite. We can now do analysis on $\mathbb{Q}'$. First of all, we can define continuity in a natural way: We say that $f\colon \mathbb{Q}'\to\mathbb{Q}'$ is continuous if whenever $q \sim r$, $f(q)\sim f(r)$.

We have the intermediate value theorem for $\mathbb{Q}'$: If $f(0) <0$ and $f(1) >0$ and $f$ is continuous, then there is a $q\in [0,1]$ such that $f(q)\sim 0$. Proof: Recall that $\omega$ is a natural number. Let $j$ be the maximum natural number less than $\omega$ such that $f(j/\omega) <0$. (This is possible because there are only finitely many natural numbers less than any natural number, including $\omega$!) But then $f(j/\omega)$ must be infinitely close to ${0}$, since by continuity $0 < f((j+1)/\omega)\sim f(j/\omega) < 0$.

We can also prove that any continuous function on ${}[0,1]\cap\mathbb{Q}'$ attains a maximum (up to $\sim$) by essentially the same means: just consider the $j < \omega$ for which $f(j/\omega)$ is a maximum, which is again possible considering that there are only finitely many $j < \omega$.

Turning to differentiation, we may define $f'(x) = y$ if for all non-zero infinitesimals $h$,

$\displaystyle{\frac{f(x+h) - f(x)}{h}\sim y}$

(Note that the derivative is actually defined only up to $\sim$.) We can then prove that the derivative of $x^k$ is $kx^{k-1}$ by letting $h$ be an arbitrary infinitesimal, expanding $(x+h)^k - x^k$, dividing by $h$, and noting that what results is $kx^{k-1}$ plus an infinitesimal.

Avigad notes that we may continue by defining $\text{exp}$, $\sin$, and $\cos$ by taking an unbounded partial sum of the Taylor expansions, and that this is sufficient to prove all the basic properties. He also cites an easy proof in this setting of the Cauchy-Peano theorem on the existence of solutions to differential equations.

Filed under Uncategorized

### 6 responses to “Doing Calculus on the Rationals (with the help of Nonstandard Analysis)”

1. In the non-standard reals, we have the nice property that every bounded real is infinitesimally close to a standard real – I imagine that this is a property that fails here, right?

I suppose we can probably prove that just by considering $\sin 1$ or something similar – for any standard rational $x$, I should either be able to find some rational number less than 1 whose $\sin$ is greater than $x$ by more than some standard rational, or some rational number greater than 1 whose $\sin$ is less than $x$ by more than some standard rational. Since $\sin$ is strictly increasing in this range, this means that $\sin 1$ is not infinitesimally close to $x$. Thus, $\sin 1$ is not infinitesimally close to any standard rational.

So we’ve somehow built in approximations to all the standard reals. I suppose we can see this if we consider the rationals in some non-standard model of the reals. Write out the full decimal expansion for some real $y$. Now consider the rational number that we get by taking the first $\omega$ digits after the decimal point in this expansion, and repeating these, instead of continuing with the rest of $y$. This number is infinitely close to $y$, but is rational. I imagine the model we get by constructing the rationals directly will include all of these?

2. Yes, you are correct.

3. msuica

Are there really finitely many numbers less than ω? Then we should be able to count the natural numbers smaller than ω and say that there are n such natural numbers, where n is a finite natural number. But this would imply that ω = n, which would seem to be a contradiction.

Is there a subtlety in the axioms that I’m misunderstanding?

– max

• Re: “Are there really finitely many numbers less than ω?”

No, externally we know there are infinitely many numbers less than ω, but the model doesn’t know it. The model thinks there are finitely many– namely, ω many (which the model thinks is a finite amount).

4. Confused on two things. First, shouldn’t st(0) be taken as an axiom? Otherwise the standard model, plus st interpreted as an empty predicate and w interpreted as 0, would satisfy axioms 1-4…

Second, you say: “construct Z and Q from N as usual”. Could you clarify? How do we extend an arbitrary primitive recursive function from N to Z to Q? Especially if it’s defined using recursion, which leads to an infinite loop if given anything besides a natural…

5. Nelson links should be updated with s/www/web/. Eg https://web.math.princeton.edu/~nelson/ works.