Wikipedia says that the intermediate value theorem “depends on (and is actually equivalent to) the completeness of the real numbers.” It then offers a simple counterexample to the analogous proposition on ℚ and a proof of the theorem in terms of the completeness property.

Does an analogous result hold for the computable reals (perhaps assuming that the function in question is computable)? If not, is there a nice counterexample?

I'm afraid I don't understand your question. The IVT says that if a continuous function has range (y1,y2) over some interval (x1,x2) then for any yc between y1 and y2, there is some xc between x1 and x2 such that the function at f(xc) = yc. I don't understand how this is meant to be extended to the computable reals...
–
Gabriel BenamyDec 15 '09 at 16:56

Gabriel Benamy: Like this-- "If a continuous computable function f maps the computable reals in the interval [x1, x2] to computable reals, with f(x1)=y1 and f(x2)=y2, then for any computable number yc between y1 and y2, there is some computable number xc between x1 and x2 such that the function at f(xc)=yc." (Continuity is defined the same for the computable reals as for the reals, in case that's the difficulty.)
–
Jason OrendorffDec 15 '09 at 17:45

I can see that there's an existential quantifier in the IVT, and if it is to be proven, then that has to come from somewhere. If you write out the proof for the reals, that quantifier clearly comes from invoking the least upper bound property. If it's obvious that one just can't get an existential quantifier on the computable reals, then that's the piece I'm missing (and, in that case, sorry for the dumb question!)
–
Jason OrendorffDec 15 '09 at 17:51

5 Answers
5

Let me assume that you are speaking about computable reals and functions in the sense of
computable analysis, which is one of the most successful approaches to the topic. (One must be careful, since there are several incompatible notions of computability on the reals.)

In computable analysis, the computable real numbers are those that can be computed to within any desired precision by a finite, terminating algorithm (e.g. using Turing machines). One should imagine receiving rational approximations to the given real. In this subject, functions on the reals are said to be computable, if there is an algorithm that can compute, for any desired degree of accuracy, the value of the function, for any algorithm that produces approximations to the input with sufficient accuracy. That is, if we want to know f(x) to within epsilon, then the algorithm is allowed to ask for x to within any delta it cares to.

The Computable Intermediate Value Theorem would be the assertion that if f is a computable continuous function and f(a)< c<f(b) for computable reals a, b, c, then there is a computable real d with f(d)=c.

The basic situation is as follows. The answer is Yes. If f happens to be increasing, then the usual bisection proof of existence turns out to be effective. For other f, however, one can use a trisection proof. Theorem 6.3.8 says that if f is computable and f(x)*f(z)<0, then f has a computable zero. This implies the Computable Intermediate Value theorem above.

In contrast, the same theorem also says that there is a non-negative computable continuous function f on [0,1], such that the sets of zeros of f has Lebesgue measure greater than 1/2, but f has no computable zero.

In summary, if the function crosses the line, you can compute a crossing point, but if it stays on one side, then you might not be able to compute a kissing point, even if it is kissing on a large measure set.

Vasco Brattka, the most prominent of Weihrauch's followers, commented <a href="cs.nyu.edu/pipermail/fom/2009-May/013776.html"&gt; on the FOM list<a> that the constructive critique of the IVT may be interpreted classically as (the failure of) a <i>uniform</i> assignment of a zero, ie continuously wrt the function (or parameters that describe it). This is the only observation about the IVT that I have heard from that school since I presented my paper on the IVT at <a href="cca-net.de/cca2005/">their conference</a>.
–
Paul TaylorJan 1 '10 at 16:35

Thanks first to Andrej for drawing attention to
my paper on the IVT,
and indeed for his contributions to the work itself.
This paper is the introduction to Abstract Stone Duality
(my theory of computable general topology) for the general mathematician,
but Sections 1 and 2 discuss the IVT in traditional language first.
The following are hints at the ideas that you will find there and
at the end of Section 14.

I think it's worth starting with a warning about the computable
situation in ${\bf R}^2$, where it is customary to talk about fixed
points instead of zeroes.
Gunter Baigger
described
a computable endofunction of the square.
The classical Brouwer thereom says that it has a fixed point,
but no such fixed point can be defined by a program.
This is in contrast to the classical response to the constructive
IVT, that either there is a computable zero, or the function
hovers at zero over an interval.
(I have not yet managed to incorporate Baigger's counterexample
into my thinking.)

The interval-halving (or, I suspect, any computational) algorithm
generates a convergent sequence of straddling intervals.

More abstractly, write $\lozenge U$ if the open subset $U$ contains
a straddling interval.
The interval-halving algorithm (known historically as the
Bolzano--Weierstrass theorem or
lion hunting)
depends exactly on the property that $\lozenge$ takes unions to
disjunctions, and in particular
$$ \lozenge(U\cup V) \Longrightarrow \lozenge U \lor \lozenge V. $$
(Compare this with the Brouwer degree, which takes disjoint unions
to sums of integers.)

I claim, therefore, that the formulation of the constructive IVT
should be the identification of suitable conditions (more than
continuity but less than openness) on $f$ in order to prove the
above property of $\lozenge$.

Alternatively, instead of restricting the function $f$,
we could restrict the open subsets $U$ and $V$.
This is what the argument at the end of
Section 14
of my paper does.
This gives a factorisation $f=g\cdot p$ of any continuous
function $f:{\bf R}\to{\bf R}$ into a proper surjection $p$
with compact connected fibres and a non-hovering map $g$.

To a classical mathematician, $p$ is obviously surjective
in the pointwise sense, whereas this is precisely the situation
that a constructivist finds unacceptable.
Meanwhile, they agree on finding zeroes of $g$.

In fact, this process finds interval-valued zeroes of
any continuous function that takes opposite signs, which was
the common sense answer to the question in the first place.

The operator $\lozenge$ defines an overt subspace,
but I'll leave you to read the paper to find out what that means.

I am afraid Joel has missed an important detail there, which is worth pointing out. Suppose $f$ is continuous and computable on $[a,b]$ and $f(a) \cdot f(b) < 0$. We must be careful to distinguish between

there exists a computable $x$ in $[a,b]$ such that $f(x) = 0$, and

there is an algorithm which accepts as input $f$, $a$, and $b$ and outputs $x$ in $[a,b]$ such that $f(x) = 0$.

In the first case we have a classical existence of a computable entity $x$, while in case (b) we have a computable existence of a computable entity.

I am pretty sure Weihrauch only proves 1., and it is impossible to prove 2., even if we further assume that $f$ is not only computable but computably continuous, or even Lipshitz with a known computable constant. The basic reason why 2. does not hold is that the $x$ cannot be chosen continuously with respect to the input data: essentially, a very small perturbation of $f$ can cause $x$ to jump around. Because all computable maps are continuos, we cannot have an algorithm computing $x$ (this is not a proof, just the idea, you have to work a bit harder to get all the details right).

However, you can impose fairly mild conditions on $f$ that are typically satisfied in practice. For example, if $f$ is locally non-constant, by which I mean that for every $y$ in $[a,b]$ we can compute nearby points $z$ and $w$ such that $f(z) \neq f(w)$, then IVT holds computably in the sense of 2. To see this, just perform bisection, but always avoid hitting a zero by going to a nearby non-zero point (because either $f(z)$ or $f(w)$ is non-zero, and we can compute which one). This condition is satisfied by non-trivial polynomials, for example, as well as for any differentiable function wose derivative only has isolated zeroes.

Let me also say a bit about the use of completeness of reals in IVT. Neel's remark translats from constructive mathematics to computability as follows: we can compute arbitrarily good approximations to the IVT. The trouble is that the approximations need not converge to anything, at least not computably. Classically they have an accumulation point, but we can't compute any information from it.

A second point is that IVT holds not because $\mathbb{R}$ is complete, but because it is connected. A very thorough analysis of this was made by Paul Taylor in his paper "A lambda-calculus for real analysis", see http://www.paultaylor.eu/ASD/lamcra/ . It's not easy reading, but it is very educational.

Indeed, the Computable IVT as I stated it is equivalent to (a), and this is what Weirich proves (and what the questioner seems to have asked). A major goal of computable analysis is to undertand the computable reals as a mathematical structure, using classical logic, and it is statement (a) that implies, for example, that the computable reals are a real-closed field. (See Weirich Corollary 6.3.10.) Statement (b), in contrast, requires a uniform algorithm, which is a stronger notion. Such uniformity issues arise throughout compubility theory, both on the natural numbers and on the reals.
–
Joel David HamkinsDec 22 '09 at 1:48

This question and its answers confused me for a while, but I think I get it now, so I'll describe my experience in the hopes that it will help other non-experts, and the experts can tell me if I've still got anything wrong.

My initial reaction was: given a computable function f : [a, b] → ℝ with f(a) < 0 and f(b) > 0, "of course" we can compute an element z of [a, b] with f(z) = 0, as follows: choose c to be the midpoint (a+b)/2, check whether f(c) is positive or negative, report that z is in [a, c] or [c, b] respectively, and recurse on that interval. Ironically, the problem is that f(c) might actually be exactly 0. If so, we can ask for its value to arbitrarily large precision, but will never learn anything about whether it is positive, negative, or zero, so we cannot output c as the answer, nor guarantee that either subinterval [a, c] or [c, b] contains a root of f.

Under the locally non-constant hypothesis, however, we can choose c' near c (so that both intervals [a, c'] and [c', b] are less than k times as wide as [a, b] for some fixed k < 1) so that f(c) and f(c') are distinct. Then we can compute f(c) and f(c') in parallel, stopping when we know that one of them is either positive or negative, as must eventually happen since they cannot both be zero, and proceed as before.

It's also clear now why classically there is a computable root of f without any hypotheses besides computability of f: either some number of the form a + (s/2r)(b-a) is a root of f—these numbers are all computable—or the original algorithm will succeed forever and thus compute a root of f.

Constructively, the intermediate value theorem fails, so there is no computable procedure to calculate an intermediate value on computable reals.

However, the following theorem does hold, remembering that constructively all real-valued functions are computable, as are the reals themselves. For every continuous real-valued function f on an interval [a,b] with a < b, for every c between f(a) and f(b), the following holds:

$\forall n.\; \exists x \in [a,b].\; |f(x) − c| < 2^{−n}$

Classically, I think you can use this to derive the intermediate value theorem, since you can use it to cook up a Cauchy sequence. But then you'll pass out of the set of computable reals, of course.

This is known as the "approximate" intermediate value theorem.
–
Paul TaylorJan 1 '10 at 18:42

Thanks! I think I didn't really understand what continuity did and didn't do until I understood why the approximate version didn't imply the full version, constructively. It's a little embarrassing to admit that I didn't get high-school mathematics, but only a little: high-school mathematics is some of the greatest mathematics (in Whitehead's sense) ever created.
–
Neel KrishnaswamiJan 2 '10 at 11:09