How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Binary rounding grids, exact subtraction, and ordered TwoSum
Statement
For an integer , let , with unbounded exponent. Let round a real number to its nearest member of , breaking ties by the even normalized significand; set . For put be the unique integer with , and set . The following hold.
- is monotone, odd, and fixes . For , .
- If , then belongs to and . If , the sum is exact.
- If have the same sign and , then (Sterbenz exact subtraction).
- If and , then , , satisfy and exactly.
Facts & Assumptions
Given: the binary set and nearest-even rounding just defined. All quantities in this lemma use unbounded exponents; finite-range success is handled separately by its consumers.
Every complete ordered field is Archimedean: for every real number there is a larger natural number.
Proof
Integer induction gives for : the initial equality is immediate and . For , [F1] supplies a natural , so . The finite set of integers with is nonempty and has a largest element ; it satisfies . Strict increase of powers of two makes unique. Thus the stated exists for every . In its binade, the finitely many points , , bracket ; their adjacent neighbors determine its nearest point. Points outside that bracket cannot be nearer, and zero is farther than a positive grid point; negative arguments follow by reflection. On a binade , the nonnegative grid has spacing . Its consecutive midpoints partition the real line into nearest-point cells, proving monotonicity and exactness on the grid; reflection preserves the even-significand tie rule, proving oddness. Every nonzero real number has two bracketing grid points, so a nearest point exists and is nonzero for a nonzero argument. The gaps on either side of a grid point are at most , including the half-sized lower gap at a power of two. Its rounding cell therefore gives . Also, for any power of two , every integer multiple with is in : the integer has at most significant bits, except , which is a power of two.
Suppose and , and put . Both operands and their exact sum are integer multiples of . Whenever , step 1.1 makes representable because . In particular, if , monotonicity and the fixed grid points imply , so . Otherwise , hence its binade spacing is an integer multiple of , so is an integer multiple of . Since and themselves are candidate nearest points, ; step 1.1 makes representable. The zero-operand cases have , and interchange handles the other magnitude order. This proves the second assertion, including the strict small-rounded-sum case.
For the subtraction assertion, change both signs and interchange operands so that and . Then , and the grid argument in step 2.1, applied to and , shows that is representable. Reversing the transformations proves all same-sign cases; zero gives only the trivial zero pair.
For the ordered transform, if then and all outputs vanish. Otherwise oddness allows . Since and is representable, monotonicity gives . If , it also gives ; step 3.1 then makes exact. If , the operands and meet step 3.1, so exactly and is exact as well. Thus always , where . Step 2.1 makes representable, so exactly.
Depends on
Used by
Dependency tree · two levels
5 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.
Sources
- Shewchuk, Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates, sections 2.2–2.3 (standard reference, not scraped)