Rational betweenness oracles
Query and refine a real number through exact rational intervals.
Load the package and construct the paper's halo oracle for a rational number:
The answer is structured data. :yes, :no, and :unknown are distinct, and a returned prophecy is an exact rational interval with provenance rather than a pair of display decimals.
When ordinary RiX control flow needs a logical value, adapt the procedural answer explicitly:
:yes becomes true, :no becomes null/false, and :unknown becomes a diagnostic undecided value carrying the query, reason, evidence, and work. This keeps the procedure's three statuses without making a symbol accidentally truthy.
Refine the same represented number with a finite work budget:
result[:approximation] is the scalar form of the work completed by the refiner. It is present whether the requested width was reached or the finite budget was exhausted:
This value can participate in ordinary Core/RiX arithmetic and three-state comparisons. The Oracle remains responsible for further refinement; the finite approximation itself does not hide an infinite process.
Language Halo neighborhoods
A language Halo is the compact comparison and membership surface for bounded certified refinement:
This is not the paper procedure named :halo. In .oracle.Ask, delta expands the query's open neighborhood. In {~ target, epsilon }, epsilon only sets the requested enclosure width; the target itself is unchanged. If a budget ends, RiX still uses the best certified enclosure to prove a result when it can, otherwise the decision is undecided with :budgetExhausted details.
The trace is suitable for the CLI, RiX Web, or a document renderer. A renderer does not query the oracle itself; the bounded mathematical operation first produces a portable interval and evidence.
Reproducible alternatives
The random-halo demonstration records its seed. Ask replays one branch, while bounded AskAll shows the two finite alternatives without treating that observation as a theorem about every possible oracle:
Arithmetic and certified adapters
Oracle arithmetic keeps an immutable recipe and materializes exact rational intervals only when a width is requested:
Exact Rationals become exact point leaves. .oracle.From(value) also accepts any certified, arbitrarily refinable singleton provider. It rejects finite non-point Balls, RationalIntervals, and Floats because those inputs do not carry the missing singleton/refinement meaning.
Exact refinement funnels
A funnel exposes compatible certified intervals at arbitrarily small rational widths. The nth-root constructor uses exact Newton brackets; the trace remains an enclosure even when the work budget ends:
The generic adapter accepts any provider that publicly certifies singleton denotation and arbitrary refinement. A certified Cauchy sequence therefore needs no private Oracle integration:
Coarse oracles
A coarse Oracle knows a fixed exact interval at eta resolution, but does not pretend to denote one arbitrarily refinable singleton:
The wide request is :enclosed. The fine request is :resolutionFloor, not :budgetExhausted: more host work cannot extract precision that this coarse model never claimed. Both results retain the exact certified interval.
Compare without guessing equality
Bounded comparison distinguishes strict order from epsilon compatibility:
The first status is :less. The second is :undecided, because two compatible finite enclosures are not a proof of equality.
Arithmetic recipes can also be exposed as certified funnels:
A testing root with explicit evidence
The testing constructor refuses to infer a theorem from sampled signs. Supply the existence, uniqueness, and continuity evidence separately:
An :assumed or :observed record remains useful metadata but cannot authorize certified testing-root bisection.