Interval Arithmetic and Rigorous Computer-Assisted Proofs
Learn how computing with guaranteed ranges turns rounded machine arithmetic into proof, with worked examples of bounding functions and trapping roots.
Key takeaways
- An interval [a, b] stands for an unknown number known to lie between a and b, and operations return a range containing every possible result.
- Rounding the lower end down and the upper end up keeps the guarantee on a real computer.
- Repeated use of a variable can make ranges much wider than necessary, and subdivision or algebraic rewriting narrows them.
- If a computed range excludes zero, the function provably has no root there.
- Computer-assisted proofs based on intervals still depend on correct software, hardware and mathematical reduction.
Interval arithmetic replaces each uncertain number with a range that is guaranteed to contain it, and does every calculation on whole ranges. If the final range for a quantity lies entirely above zero, you have proved that the quantity is positive, even though no step was computed exactly.
That idea lets computers, which normally round their results, take part in rigorous mathematical proofs. You will see how the rules work, why naive use gives disappointingly wide answers, and how mathematicians sharpen them.
Why ordinary computing is not proof
A computer stores most real numbers only approximately, usually in binary floating point, and rounds after nearly every operation. Individual errors are tiny, but they can accumulate or be magnified. The article on how rounding errors grow shows how.
Suppose a program reports that some expression equals 0.0000000003. Is the true value positive? The output alone cannot say. It might be zero or negative, with the error making up the difference.
A proof needs a statement of the form "the true value lies between these two bounds", with the bounds justified. Interval arithmetic produces exactly that kind of statement, automatically, as the computation proceeds.
This differs from the usual error estimate in science, which says that the answer is probably within some margin. An interval bound makes no appeal to probability or typical behavior. If the starting ranges contain the true inputs and the rules are implemented correctly, the final range contains the true output.
The systematic study of the method is closely associated with Ramon Moore, whose work in the 1950s and 1960s, including the 1966 book Interval Analysis, set out its rules and uses. Related ideas of bounding a number from both sides are far older: Archimedes trapped π between two fractions by comparing a circle with polygons.
The basic rules
An interval [a, b] is the set of real numbers from a to b. For two intervals X = [a, b] and Y = [c, d], each operation should return the set of all values x ∘ y with x in X and y in Y.
X + Y = [a + c, b + d]
X − Y = [a − d, b − c]
X × Y = [smallest, largest] of the products ac, ad, bc, bd
X ÷ Y = X × [1/d, 1/c] only when 0 is not in Y For example, [1, 2] + [3, 5] = [4, 7]. Subtraction gives [1, 2] − [3, 5] = [−4, −1], where the lowest result takes the smallest first number and the largest second one. For [−1, 2] × [3, 4], the four products are −3, −4, 6 and 8, so the answer is [−4, 8].
On a machine, the exact endpoint may not be representable. The software then rounds the lower endpoint downward and the upper endpoint upward. The range grows very slightly and the guarantee survives. The widely used IEEE standard for floating-point arithmetic provides directed rounding modes that make this possible.
The dependency problem
Take X = [1, 2] and compute X − X. The rule gives [1 − 2, 2 − 1] = [−1, 1]. Yet x − x is always 0.
Nothing is wrong, in the sense that [−1, 1] does contain 0. The rule has forgotten that both copies are the same number, and has allowed one to be 1 while the other is 2. Whenever a variable appears more than once, the result may be wider than the true range.
Consider f(x) = x(1 − x) for x in [0, 1]. The factors range over [0, 1] and [0, 1], so the product is bounded by [0, 1]. The true range is only [0, 0.25].
Rewrite the function as 1/4 − (x − 1/2)². Now x appears once. The difference x − 1/2 ranges over [−0.5, 0.5], its square over [0, 0.25], and the final result is [0, 0.25], which is exact. Note that squaring is treated as its own operation here, since multiplying two independent copies would again give a negative lower end.
Narrowing by subdivision
When no clever rewriting is available, cut the input into pieces and bound each separately. For x(1 − x), split [0, 1] into four quarters.
| Input piece | Range of 1 − x | Computed bound |
|---|---|---|
| [0, 0.25] | [0.75, 1] | [0, 0.25] |
| [0.25, 0.5] | [0.5, 0.75] | [0.125, 0.375] |
| [0.5, 0.75] | [0.25, 0.5] | [0.125, 0.375] |
| [0.75, 1] | [0, 0.25] | [0, 0.25] |
Together the pieces show that f stays within [0, 0.375]. With two halves the bound would be [0, 0.5], and with one piece [0, 1]. As the pieces shrink, the bound closes in on [0, 0.25].
Good programs subdivide adaptively. They keep splitting only the regions where the current bound is not yet good enough to settle the question.
A complete small proof
Claim: x² − x + 1 > 0 for every x in [0, 2]. Treat the whole interval at once. The square is [0, 4], and [0, 4] − [0, 2] + 1 = [−1, 5]. This bound includes negative numbers, so it decides nothing.
Halving does not quite succeed either. On [0, 1] the bound is [0, 2], and on [1, 2] it is [0, 4]. Both touch zero, and strict positivity is what was claimed. So split again.
[0, 0.5] [0, 0.25] − [0, 0.5] + 1 = [0.5, 1.25]
[0.5, 1] [0.25, 1] − [0.5, 1] + 1 = [0.25, 1.5]
[1, 1.5] [1, 2.25] − [1, 1.5] + 1 = [0.5, 2.25]
[1.5, 2] [2.25, 4] − [1.5, 2] + 1 = [1.25, 3.5] Every lower bound is positive, and the four pieces cover [0, 2]. The proof is finished. The true minimum is 0.75, at x = 0.5, so the bounds are far from sharp. They did not need to be. A proof by this method needs only enough precision to decide the question, which is an important economy when there are millions of boxes.
Proving that something has no root, or exactly one
Suppose you want to show that g(x) = x² − 2 has no zero on [0, 1]. The square of [0, 1] is [0, 1], so g lies in [−2, −1]. That range excludes zero, and the claim is proved.
On [1.4, 1.5], note that g(1.4) = −0.04 and g(1.5) = 0.25. A sign change in a continuous function guarantees a root, by the intermediate value theorem.
An interval version of Newton's method can prove both existence and uniqueness. Take X = [1, 2], with midpoint m = 1.5. The derivative 2x ranges over [2, 4] on X.
g(m) = 0.25
N = m − g(m) / [2, 4]
= 1.5 − [0.0625, 0.125]
= [1.375, 1.4375] Any root in X must lie in N. Moreover, N falls strictly inside X, and the derivative range does not contain zero. Under these conditions a standard theorem says there is exactly one root in X. It is √2, about 1.41421, and repeating the step traps it ever more tightly. Compare the ordinary method in Newton's method.
Turning a theorem into finitely many checks
A computer cannot test infinitely many points, but it can verify an inequality on finitely many boxes that cover a region. The mathematical work is to reduce the theorem to such a covering.
This works well for strict inequalities. If a quantity actually touches zero somewhere, no amount of subdivision will show it is strictly positive there. Those points need a separate argument by hand, often using derivatives.
The cost can also explode with the number of variables, since splitting each of ten variables in two already creates 1,024 boxes.
There is also a design choice in how to cover the region. A clever change of variables, or a bound that uses the derivative over each box, can cut the number of pieces enormously. Much of the skill in a published computer-assisted proof lies here, in shaping the problem so that the machine finishes in reasonable time. The older and simpler idea of repeatedly halving an interval appears in the bisection method.
Where it has been used
Several notable results rest on rigorous numerics. Oscar Lanford gave a computer-assisted proof in the early 1980s of conjectures of Feigenbaum about a universal pattern in the transition to chaos. Warwick Tucker proved, around the turn of the century, that the Lorenz equations really do have a strange attractor, settling a question that had rested on numerical pictures.
Thomas Hales's proof of the Kepler conjecture on packing spheres used interval methods to verify a large collection of nonlinear inequalities. The proof was later checked formally in the project known as Flyspeck, completed in 2014. See the Kepler conjecture.
Geometry offers another case. In the 1990s Joel Hass and Roger Schlafly, in work that began with Michael Hutchings, used rigorous numerical bounds to show that the standard double bubble is the most economical way to enclose two equal volumes. The general case of unequal volumes was settled later by other methods.
In each case the computer did not replace the mathematics. People first found the structure that made the problem finite, proved that the finite checks suffice, and designed the checks so that rounding could never turn a false statement into an accepted one. The computation then supplied the volume of arithmetic that no one could do reliably by hand.
What you still have to trust
An interval computation is only as sound as its parts. The reduction from theorem to inequalities must be correct. The interval library must round in the right direction, including for functions such as sine and logarithm. The program must really cover the whole region, with no missed slivers. The compiler and processor must behave as documented.
Mathematicians reduce these risks by publishing code, rerunning it on different systems and, in the strongest cases, verifying the arithmetic inside a proof assistant. Some argue that a computation no person can follow explains less than a conceptual proof. Others reply that long hand calculations are no more transparent and are more error-prone. Both points have force, and many results now combine human insight with machine checking.