Alphabeta Math
LemmaStatement: AI-adaptedProof: AI-adaptedPipeline-generatedjudge pass (gpt-6-luna)
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 p≥2, let Bp={0}∪{±m2k:m,k∈Z, 2p−1≤m<2p}, with unbounded exponent. Let R round a real number to its nearest member of Bp, breaking ties by the even normalized significand; set R(0)=0. For x≠0 put E(x) be the unique integer with 2E(x)≤∣x∣<2E(x)+1, and set q(x)=2E(x)−p+1. The following hold.

  • R is monotone, odd, and fixes Bp. For R(t)≠0, ∣R(t)−t∣≤q(R(t))/2.
  • If x,y∈Bp, then ρ=R(x+y)−(x+y) belongs to Bp and ∣ρ∣≤min⁡(∣x∣,∣y∣). If ∣R(x+y)∣<min⁡(∣x∣,∣y∣), the sum is exact.
  • If x,y∈Bp have the same sign and ∣x∣/2≤∣y∣≤2∣x∣, then x−y∈Bp (Sterbenz exact subtraction).
  • If A,B∈Bp and ∣A∣≥∣B∣, then S=R(A+B), Z=R(S−A), T=R(B−Z) satisfy Z=S−A and T=A+B−S 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.

[F1]

Every complete ordered field is Archimedean: for every real number there is a larger natural number.

Proof

1.1givenF1algebra

Integer induction gives 2n≥n+1 for n≥0: the initial equality is immediate and 2n+1≥2(n+1)≥n+2. For t>0, [F1] supplies a natural N>max⁡(t,1/t,1), so 2−N<t<2N. The finite set of integers j∈[−N,N] with 2j≤t is nonempty and has a largest element E; it satisfies 2E≤t<2E+1. Strict increase of powers of two makes E unique. Thus the stated E(x) exists for every x≠0. In its binade, the finitely many points m2E−p+1, 2p−1≤m≤2p, bracket t; 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 [2j,2j+1], the nonnegative grid has spacing 2j−p+1. 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 c≠0 are at most q(c), including the half-sized lower gap at a power of two. Its rounding cell therefore gives ∣R(t)−t∣≤q(R(t))/2. Also, for any power of two h, every integer multiple nh with ∣n∣≤2p is in Bp: the integer has at most p significant bits, except ∣n∣=2p, which is a power of two.

2.1step 1.1algebra

Suppose x,y≠0 and ∣x∣≥∣y∣, and put h=q(y). Both operands and their exact sum t=x+y are integer multiples of h. Whenever ∣t∣≤∣y∣, step 1.1 makes t representable because ∣y∣<2ph. In particular, if ∣R(t)∣<∣y∣, monotonicity and the fixed grid points ±∣y∣ imply ∣t∣<∣y∣, so R(t)=t. Otherwise ∣R(t)∣≥∣y∣, hence its binade spacing is an integer multiple of h, so ρ=R(t)−t is an integer multiple of h. Since x and y themselves are candidate nearest points, ∣ρ∣≤min⁡(∣t−x∣,∣t−y∣)=∣y∣<2ph; step 1.1 makes ρ representable. The zero-operand cases have ρ=0, and interchange handles the other magnitude order. This proves the second assertion, including the strict small-rounded-sum case.

3.1step 2.1algebra

For the subtraction assertion, change both signs and interchange operands so that x≥y>0 and x≤2y. Then 0≤x−y≤y, and the grid argument in step 2.1, applied to x and −y, shows that x−y is representable. Reversing the transformations proves all same-sign cases; zero gives only the trivial zero pair.

4.1step 1.1step 2.1step 3.1algebra∎

For the ordered transform, if A=0 then B=0 and all outputs vanish. Otherwise oddness allows A>0. Since 0≤A+B≤2A and 2A is representable, monotonicity gives 0≤S≤2A. If B≥−A/2, it also gives S≥A/2; step 3.1 then makes S−A exact. If B<−A/2, the operands A and −B meet step 3.1, so S=A+B exactly and S−A=B is exact as well. Thus always Z=S−A=B+ρ, where ρ=S−(A+B). Step 2.1 makes −ρ representable, so T=R(B−Z)=−ρ=A+B−S 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