---
title: "algorithm-neville-interpolation-tests — Mova code model"
description: "Mova code model of algorithms/src/neville_interpolation/tests.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/algorithms/src/neville_interpolation/tests.rs.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/algorithms/src/neville_interpolation/tests.rs.groupant/>

# algorithm-neville-interpolation-tests

The groupant beside algorithms/src/neville_interpolation/tests.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

## Facts

- **kind:** groupant
- **status:** partial descriptive instance
- **source:** [`algorithms/src/neville_interpolation/tests.rs`](https://github.com/ElamurAI/mova-free/blob/main/algorithms/src/neville_interpolation/tests.rs)
- **source SHA-256:** `25044ad8fe42b6c0…`
- **repository folder:** [`algorithms/src/neville_interpolation/tests.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/algorithms/src/neville_interpolation/tests.rs.groupant)
- **repository commit:** `48f2e6f74146`

> **Implementation material.** A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

## Components

| component | label | where |
|---|---|---|
| **approximant** | partial | [approximant](#approximant) |
| **ast** | partial | `syntax.json` |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [approximant](#approximant) |
| **tests** | existing checks referenced | [tests](#tests) |

## Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

| id | type | label | where |
|---|---|---|---|
| `behavior_complement` | behavior_complement | partial source derived model | [behavior_complement](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `oracle_independence` | oracle_independence | partial source derived model | [oracle_independence](#oracle-independence) |
| `mutation_sensitivity` | mutation_sensitivity | partial source derived model | [mutation_sensitivity](#mutation-sensitivity) |
| `finite_scope` | finite_scope | partial source derived model | [finite_scope](#finite-scope) |

## Model text


### descriptant

#### neville_interpolation: tests.rs

Original std-only Rust. References: Neville/Newton: Stoer and Bulirsch, Introduction to Numerical Analysis, interpolation chapter; spline: de Boor, A Practical Guide to Splines; trapezoid: Davis and Rabinowitz, Methods of Numerical Integration; tanh-sinh: Takahasi and Mori (1974), Double exponential formulas for numerical integration. No copied implementation.

##### Prospective epoch (before implementation)

Before implementation: finite strictly increasing nonempty interpolation nodes, matched finite ordinates; spline at least two. Neville triangular O(n^2) time/O(n) memory, P_i,j=((x_j-x)P_i,j-1+(x-x_i)P_i+1,j)/(x_j-x_i). Newton backward divided differences O(n^2)/O(n), nested product evaluation O(n). Natural spline Thomas solve for second derivatives, zero endpoint curvatures, O(n) construction and binary interval evaluation. Reject nonfinite intermediate states and undefined spacing; no conditioning promise. Quadrature endpoints strictly ordered finite, finite positive tolerance, finite span; callbacks finite, deterministic and resource bounded by caller. Adaptive trapezoid dyadically doubles grid reusing samples, /3 consecutive difference heuristic; bounded evaluations and stagnation. Tanh sinh fixed transformed truncation [-3,3], dyadic h, samples strictly inside endpoints in ascending transformed order per level, no reuse; error is consecutive difference only and excludes truncation error. Both no arbitrary-function accuracy bound: zero and unsampled bump share sample trace. Expected gain: Neville O(n) storage versus full tableau, Newton O(n) repeated evaluation, spline linear solve; no measured speed claim or executable approximation percentage. Validation independent polynomial/analytic fixtures, domain/overflow/status/count and alias witnesses; compiled production mutants and repeats.


##### Mathematical combiner

Raw source and partial syntax anchor the f64 transition F; forward model predicts F, typed views describe its excluded pairs and preimage fibers; independent tests evaluate finite projections of F. Their conjunction narrows compatible implementations but is not a proof. No semantic AST resolution or macro expansion. Leaf children=[]; crate wiring is parent-owned.

##### Observed epoch 2026-10-30

15 focused tests pass twice debug and twice optimized release with identical normalized outcomes. Five compiled production mutants fail oracle assertions; original bytes restored and positives rerun. No benchmark or speed claim. Finite arithmetic, allocations and callback limitations remain.

### model

### behavior_complement

Observed Pass excludes implementations violating any asserted result on these fixtures, including compiled mutant: Change left+right to left-right; polynomial_oracle assertion fails. Pass does not exclude bugs outside tested cases; it is not a universal theorem.

### reverse_reconstruction

Pass has many preimages: exact implementations and implementations agreeing only on this finite fixture set. Untested q=12345 behavior can change while all assertions pass. At q=0, nodes [-1,1], ordinates [-1,1] and [0,0] both yield 0. A scalar query cannot recover ordinates or nodes. At known distinct nodes, real exact interpolation is unique for degree<n; rounded evaluation is not injective.

### oracle_independence

Expected values use analytic monomials, antiderivatives or explicit spline cubic, independently of production recurrence. polynomial_oracle checks powers 0..5 at 23 rational queries including extrapolation; boundaries checks singleton, empty, duplicate, NaN and overflowing span; ambiguous_query checks a nonunique preimage.

### mutation_sensitivity

Change left+right to left-right; polynomial_oracle assertion fails.

### finite_scope

Pass records only finite fixtures, not all f64 values or callbacks. Compile errors do not count as killed mutants; production mutation must compile and fail named assertion, then exact original bytes restored and rerun.

### approximant

#### Forward model and invariant

Finite test transition maps fixture implementations to pass or assertion panic. polynomial_oracle checks powers 0..5 at 23 rational queries including extrapolation; boundaries checks singleton, empty, duplicate, NaN and overflowing span; ambiguous_query checks a nonunique preimage.

Cost: O(n^2) scalar operations and O(n) allocated storage; allocation failure follows Rust allocator behavior, not Error.

Invariants: successful reported scalars are finite; invalid-domain cases do not become approximate answers. Callback budgets and order are observable semantics. Real polynomial reproduction and quadrature convergence statements do not certify f64 accuracy. Determinism presumes deterministic callback. No executable surrogate profile: cancellation/conditioning and unobserved samples prevent a useful general 1/2/5/10% certificate. No gain or percentage promise.

### tests

polynomial_oracle checks powers 0..5 at 23 rational queries including extrapolation; boundaries checks singleton, empty, duplicate, NaN and overflowing span; ambiguous_query checks a nonunique preimage.

Control: Change left+right to left-right; polynomial_oracle assertion fails.

External evidence: $MOVA_DATA/runs/octopus-wave25-numerical-2026-10-30; repeated focused harness and strict Clippy.
