Proofs: Interval Newton method
These are the human proofs of Interval Newton method, at full length.
Correctness of the interval Newton method full
This proof shows: correctness, termination, convergence-rate.
Throughout, is continuously differentiable on . and are inclusion functions: for every interval , and . For a point , contains . The width of is .
Outward rounding gives inclusion functions
Each interval operation in the reference code first computes its endpoints in round to nearest, which is within half an ulp of the exact value. It then moves the lower endpoint one float down and the upper one float up. So the computed interval contains the exact interval result of the operation applied to the computed operands. By induction over the expression that defines , this is the fundamental theorem of interval arithmetic: the computed contains the range of on . For iexp, this requires that math.exp is accurate to within one ulp. That is an assumption about the C library, not a consequence of IEEE 754. The same widening applies to the Newton operator: the computed contains the exact set .
Lemma 1 (no zero is lost)
If and , then lies in the set computed at L5. If extended division is used, it lies in one of the pieces, and if and , it lies in , which L5 returns unchanged.
Proof. By the mean value theorem there is between and , hence in , with . If , then with and , so .
When but , the set of quotients is contained in the half-lines that the code forms. For : gives , and gives . The case is symmetric. is minus these half-lines, and in this case, because would force .
If , then , so . If moreover , the code keeps whole. If , then is impossible.
Line L4 discards only when , which implies that has no zero in . Bisection at L10 covers by two halves. So, by induction over the iterations, the union of the stack and the boxes in found always contains every zero of in . The merging at L12 only replaces boxes by their hulls or by verified sub-boxes, which by Lemma 2 contain the same zero. At the cap, the remaining stack is returned as well. This proves the claim that no zero in is missed.
Lemma 2 (existence and uniqueness)
If and , then has exactly one zero in , and it lies in .
Proof. has constant sign on , so is strictly monotone on and has at most one zero there. For existence, assume without loss of generality that with ; otherwise replace by . If we are done. Suppose . The lower endpoint of is at most , and it is at least because . So . By the mean value theorem, for some ,
So changes sign on and has a zero there by the intermediate value theorem. The case uses the upper endpoint in the same way. Lemma 1 places the zero in .
Since the computed contains the exact operator set, a computed inclusion implies the exact one, so the conclusion is rigorous in floating point. The inflation in L12 applies Lemma 2 to a slightly larger box . The verified box is then , which contains the unique zero of , and hence any zero in the original hull.
Theorem 1 (quadratic convergence of the width)
Suppose , with for all , and that satisfies for . If contains the zero , then
and the last term is a rounding term of a few ulps of divided by .
Proof. With exact , for with . Its width is . Since , . A wider adds at most . The case is symmetric.
So, in exact arithmetic, the widths of a verified box satisfy , which is order . In floating point the widths decrease in this way until the rounding term dominates, at a few ulps. Then L7 sees no shrinking and outputs the box. The test checks on .
Termination
Each pass of the loop L2 removes one box from the stack, and then does one of four things. It discards the box. It outputs a box. It pushes one box at most half as wide (L9), or one strictly narrower verified box (L7). Or it pushes pieces of which each is either at most half as wide or one of two bisection halves (L10). Bisection is skipped only when the midpoint is not strictly inside the box, and such a box counts as small, so it is output at L8. A box of width below is output too. Verified boxes are pushed only while their width strictly decreases, and a float interval has finitely many floats. So every chain of descendants is finite, and the stack empties. Independently of this argument, L11 stops the loop after iterations, so the run always terminates. The merge at L12 runs at most 8 Newton tests per merged box.