Certified nested real balls in RiX
Use exact real and complex Balls, nested roots, and precision-negotiated elementary functions.
Exact finite balls
A Ball is an exact midpoint-radius snapshot implemented as a semantic RiX value. Its interval and component accessors never pass through a floating-point value:
The ball contains every value from 5/4 through 7/4, endpoints included. Contains can check either an exact scalar or another ball.
Outward arithmetic and dyadic grids
Finite-ball arithmetic returns the exact interval hull of the operation. RoundOut explicitly widens both endpoints to a selected dyadic grid:
Division works when the divisor's ball excludes zero. A ball that contains zero cannot certify a finite reciprocal and is rejected.
A nested square-root real
Sqrt creates a recipe rather than choosing one permanent approximation. Each requested bisection snapshot is contained in every earlier one:
The lower endpoint always squares to at most 2, and the upper endpoint always squares to at least 2. Perfect rational squares such as 9 start as point balls immediately.
Generic refinement and Halo decisions
The shared Numerics contract asks for a target width and always applies a finite work budget. Language Halo comparisons use the same certified protocol:
With maxCalls=0, that last comparison is an undecided value carrying :budgetExhausted evidence. Asking an already finite ball for a narrower enclosure similarly produces :resolutionFloor; neither outcome discards its best certified interval.
Arithmetic on nested Ball reals
Finite Balls retain their exact interval-hull arithmetic. Nested Ball recipes retain the NestedBallReal family while an Oracle recipe coordinates later refinement:
The Rational 1/3 is embedded exactly in the nested-Ball family. A Float is not eligible for that promotion; write an explicit Float conversion only when binary64 arithmetic is actually intended.
Precision-negotiated elementary functions
Phase 2 elementary functions remain Ball-family values while delegating their certified analytic bounds to Numerics:
The requested output width and the tighter internal working width are both exact Rationals in the evidence record. Exhaustion remains a certified result containing the best interval supplied by Numerics.
Exact rectangular complex balls
Complex Balls retain independent exact real and imaginary enclosures:
ContainsParts(real,imaginary) certifies membership componentwise. Division is permitted only when the denominator's enclosure proves that its modulus cannot be zero.