FA-14701 / Numerics / Open access
Newton divided difference table: node span denominator · case 01
The exact newton divided difference table result violates the stated contract at node span denominator.
ROOT CAUSE
The node span denominator step uses nodes[i]-nodes[i-1] instead of nodes[i]-nodes[i-order].
VERIFIED REPAIR
Use nodes[i]-nodes[i-order] at the node span denominator step.
Unsuccessful approach: The partial repair nodes[i-order]-nodes[i] still violates the node span denominator invariant.
Case contract
Input distinct integer nodes and integer values [nodes,values]; return Newton coefficients [p,q] in original node order.
Why this case matters
Exact discrete arithmetic with observable algorithmic state; no floating point approximation is used.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
nodes,values=x
c=list(map(Fraction,values));n=len(c)
for order in range(1,n):
for i in range(n-1,order-1,-1):
den=nodes[i]-nodes[i-1]
if den==0:return None
c[i]=(c[i]-c[i-1])/den
return [[v.numerator,v.denominator] for v in c]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[-2, 0, 3], [-1, -1, 0]], [[-1, 1], [0, 1], [1, 15]]), ([[-2, 0, 3], [-1, 0, -1]], [[-1, 1], [1, 2], [-1, 6]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [-1, -1, 1]], [[-1, 1], [0, 1], [2, 15]]), ([[-2, 0, 3], [-1, -1, 2]], [[-1, 1], [0, 1], [1, 5]]), ([[-2, 0, 3], [-1, 0, 0]], [[-1, 1], [1, 2], [-1, 10]]), ([[-2, 0, 3], [-1, 0, 1]], [[-1, 1], [1, 2], [-1, 30]])], [([[-2, 0, 3], [-1, -1, 1]], [[-1, 1], [0, 1], [2, 15]]), ([[-2, 0, 3], [-1, 0, 2]], [[-1, 1], [1, 2], [1, 30]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [0, -1, 0]], [[0, 1], [-1, 2], [1, 6]]), ([[-2, 0, 3], [0, -1, 1]], [[0, 1], [-1, 2], [7, 30]]), ([[-2, 0, 3], [0, -1, 2]], [[0, 1], [-1, 2], [3, 10]]), ([[-2, 0, 3], [0, 0, -1]], [[0, 1], [0, 1], [-1, 15]])], [([[-2, 0, 3], [-1, -1, 2]], [[-1, 1], [0, 1], [1, 5]]), ([[-2, 0, 3], [-1, 1, 1]], [[-1, 1], [1, 1], [-1, 5]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [1, -1, 1]], [[1, 1], [-1, 1], [1, 3]]), ([[-2, 0, 3], [1, -1, 2]], [[1, 1], [-1, 1], [2, 5]]), ([[-2, 0, 3], [1, 0, -1]], [[1, 1], [-1, 2], [1, 30]]), ([[-2, 0, 3], [1, 0, 0]], [[1, 1], [-1, 2], [1, 10]])], [([[-2, 0, 3], [-1, 0, -1]], [[-1, 1], [1, 2], [-1, 6]]), ([[-2, 0, 3], [-1, 2, 0]], [[-1, 1], [3, 2], [-13, 30]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [2, -1, 2]], [[2, 1], [-3, 2], [1, 2]]), ([[-2, 0, 3], [2, 0, -1]], [[2, 1], [-1, 1], [2, 15]]), ([[-2, 0, 3], [2, 0, 0]], [[2, 1], [-1, 1], [1, 5]]), ([[-2, 0, 3], [2, 0, 1]], [[2, 1], [-1, 1], [4, 15]])], [([[-2, 0, 3], [-1, 0, 0]], [[-1, 1], [1, 2], [-1, 10]]), ([[-2, 0, 3], [0, -1, -1]], [[0, 1], [-1, 2], [1, 10]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[0, 1, 2], [-1, 0, -1]], [[-1, 1], [1, 1], [-1, 1]]), ([[0, 1, 2], [-1, 0, 0]], [[-1, 1], [1, 1], [-1, 2]]), ([[0, 1, 2], [-1, 0, 1]], [[-1, 1], [1, 1], [0, 1]]), ([[0, 1, 2], [-1, 0, 2]], [[-1, 1], [1, 1], [1, 2]])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| explicit oracle 0 | [[-1, 1], [0, 1], [1, 9]] | [[-1, 1], [0, 1], [1, 15]] | Failed |
| explicit oracle 1 | [[-1, 1], [1, 2], [-5, 18]] | [[-1, 1], [1, 2], [-1, 6]] | Failed |
| explicit oracle 2 | [[-1, 1], [0, 1], [0, 1]] | [[-1, 1], [0, 1], [0, 1]] | Passed |
| explicit oracle 3 | [[2, 1], [0, 1], [0, 1], [0, 1]] | [[2, 1], [0, 1], [0, 1], [0, 1]] | Passed |
| explicit oracle 4 | [[-1, 1], [0, 1], [2, 9]] | [[-1, 1], [0, 1], [2, 15]] | Failed |
| explicit oracle 5 | [[-1, 1], [0, 1], [1, 3]] | [[-1, 1], [0, 1], [1, 5]] | Failed |
| explicit oracle 6 | [[-1, 1], [1, 2], [-1, 6]] | [[-1, 1], [1, 2], [-1, 10]] | Failed |
| explicit oracle 7 | [[-1, 1], [1, 2], [-1, 18]] | [[-1, 1], [1, 2], [-1, 30]] | Failed |
SHA-256 / aea16420477ddb966e51cd882ecbcd743c40e90823fc926fe452b387de1b3a40
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
nodes,values=x
c=list(map(Fraction,values));n=len(c)
for order in range(1,n):
for i in range(n-1,order-1,-1):
den=nodes[i-order]-nodes[i]
if den==0:return None
c[i]=(c[i]-c[i-1])/den
return [[v.numerator,v.denominator] for v in c]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[-2, 0, 3], [-1, -1, 0]], [[-1, 1], [0, 1], [1, 15]]), ([[-2, 0, 3], [-1, 0, -1]], [[-1, 1], [1, 2], [-1, 6]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [-1, -1, 1]], [[-1, 1], [0, 1], [2, 15]]), ([[-2, 0, 3], [-1, -1, 2]], [[-1, 1], [0, 1], [1, 5]]), ([[-2, 0, 3], [-1, 0, 0]], [[-1, 1], [1, 2], [-1, 10]]), ([[-2, 0, 3], [-1, 0, 1]], [[-1, 1], [1, 2], [-1, 30]])], [([[-2, 0, 3], [-1, -1, 1]], [[-1, 1], [0, 1], [2, 15]]), ([[-2, 0, 3], [-1, 0, 2]], [[-1, 1], [1, 2], [1, 30]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [0, -1, 0]], [[0, 1], [-1, 2], [1, 6]]), ([[-2, 0, 3], [0, -1, 1]], [[0, 1], [-1, 2], [7, 30]]), ([[-2, 0, 3], [0, -1, 2]], [[0, 1], [-1, 2], [3, 10]]), ([[-2, 0, 3], [0, 0, -1]], [[0, 1], [0, 1], [-1, 15]])], [([[-2, 0, 3], [-1, -1, 2]], [[-1, 1], [0, 1], [1, 5]]), ([[-2, 0, 3], [-1, 1, 1]], [[-1, 1], [1, 1], [-1, 5]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [1, -1, 1]], [[1, 1], [-1, 1], [1, 3]]), ([[-2, 0, 3], [1, -1, 2]], [[1, 1], [-1, 1], [2, 5]]), ([[-2, 0, 3], [1, 0, -1]], [[1, 1], [-1, 2], [1, 30]]), ([[-2, 0, 3], [1, 0, 0]], [[1, 1], [-1, 2], [1, 10]])], [([[-2, 0, 3], [-1, 0, -1]], [[-1, 1], [1, 2], [-1, 6]]), ([[-2, 0, 3], [-1, 2, 0]], [[-1, 1], [3, 2], [-13, 30]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [2, -1, 2]], [[2, 1], [-3, 2], [1, 2]]), ([[-2, 0, 3], [2, 0, -1]], [[2, 1], [-1, 1], [2, 15]]), ([[-2, 0, 3], [2, 0, 0]], [[2, 1], [-1, 1], [1, 5]]), ([[-2, 0, 3], [2, 0, 1]], [[2, 1], [-1, 1], [4, 15]])], [([[-2, 0, 3], [-1, 0, 0]], [[-1, 1], [1, 2], [-1, 10]]), ([[-2, 0, 3], [0, -1, -1]], [[0, 1], [-1, 2], [1, 10]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[0, 1, 2], [-1, 0, -1]], [[-1, 1], [1, 1], [-1, 1]]), ([[0, 1, 2], [-1, 0, 0]], [[-1, 1], [1, 1], [-1, 2]]), ([[0, 1, 2], [-1, 0, 1]], [[-1, 1], [1, 1], [0, 1]]), ([[0, 1, 2], [-1, 0, 2]], [[-1, 1], [1, 1], [1, 2]])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| explicit oracle 0 | [[-1, 1], [0, 1], [1, 15]] | [[-1, 1], [0, 1], [1, 15]] | Passed |
| explicit oracle 1 | [[-1, 1], [-1, 2], [-1, 6]] | [[-1, 1], [1, 2], [-1, 6]] | Failed |
| explicit oracle 2 | [[-1, 1], [0, 1], [0, 1]] | [[-1, 1], [0, 1], [0, 1]] | Passed |
| explicit oracle 3 | [[2, 1], [0, 1], [0, 1], [0, 1]] | [[2, 1], [0, 1], [0, 1], [0, 1]] | Passed |
| explicit oracle 4 | [[-1, 1], [0, 1], [2, 15]] | [[-1, 1], [0, 1], [2, 15]] | Passed |
| explicit oracle 5 | [[-1, 1], [0, 1], [1, 5]] | [[-1, 1], [0, 1], [1, 5]] | Passed |
| explicit oracle 6 | [[-1, 1], [-1, 2], [-1, 10]] | [[-1, 1], [1, 2], [-1, 10]] | Failed |
| explicit oracle 7 | [[-1, 1], [-1, 2], [-1, 30]] | [[-1, 1], [1, 2], [-1, 30]] | Failed |
SHA-256 / 6cb5bd02fa2d61eb8514c31e955e1d07de5ccc2a53236d8d18966840d9d85860
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
nodes,values=x
c=list(map(Fraction,values));n=len(c)
for order in range(1,n):
for i in range(n-1,order-1,-1):
den=nodes[i]-nodes[i-order]
if den==0:return None
c[i]=(c[i]-c[i-1])/den
return [[v.numerator,v.denominator] for v in c]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[-2, 0, 3], [-1, -1, 0]], [[-1, 1], [0, 1], [1, 15]]), ([[-2, 0, 3], [-1, 0, -1]], [[-1, 1], [1, 2], [-1, 6]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [-1, -1, 1]], [[-1, 1], [0, 1], [2, 15]]), ([[-2, 0, 3], [-1, -1, 2]], [[-1, 1], [0, 1], [1, 5]]), ([[-2, 0, 3], [-1, 0, 0]], [[-1, 1], [1, 2], [-1, 10]]), ([[-2, 0, 3], [-1, 0, 1]], [[-1, 1], [1, 2], [-1, 30]])], [([[-2, 0, 3], [-1, -1, 1]], [[-1, 1], [0, 1], [2, 15]]), ([[-2, 0, 3], [-1, 0, 2]], [[-1, 1], [1, 2], [1, 30]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [0, -1, 0]], [[0, 1], [-1, 2], [1, 6]]), ([[-2, 0, 3], [0, -1, 1]], [[0, 1], [-1, 2], [7, 30]]), ([[-2, 0, 3], [0, -1, 2]], [[0, 1], [-1, 2], [3, 10]]), ([[-2, 0, 3], [0, 0, -1]], [[0, 1], [0, 1], [-1, 15]])], [([[-2, 0, 3], [-1, -1, 2]], [[-1, 1], [0, 1], [1, 5]]), ([[-2, 0, 3], [-1, 1, 1]], [[-1, 1], [1, 1], [-1, 5]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [1, -1, 1]], [[1, 1], [-1, 1], [1, 3]]), ([[-2, 0, 3], [1, -1, 2]], [[1, 1], [-1, 1], [2, 5]]), ([[-2, 0, 3], [1, 0, -1]], [[1, 1], [-1, 2], [1, 30]]), ([[-2, 0, 3], [1, 0, 0]], [[1, 1], [-1, 2], [1, 10]])], [([[-2, 0, 3], [-1, 0, -1]], [[-1, 1], [1, 2], [-1, 6]]), ([[-2, 0, 3], [-1, 2, 0]], [[-1, 1], [3, 2], [-13, 30]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[-2, 0, 3], [2, -1, 2]], [[2, 1], [-3, 2], [1, 2]]), ([[-2, 0, 3], [2, 0, -1]], [[2, 1], [-1, 1], [2, 15]]), ([[-2, 0, 3], [2, 0, 0]], [[2, 1], [-1, 1], [1, 5]]), ([[-2, 0, 3], [2, 0, 1]], [[2, 1], [-1, 1], [4, 15]])], [([[-2, 0, 3], [-1, 0, 0]], [[-1, 1], [1, 2], [-1, 10]]), ([[-2, 0, 3], [0, -1, -1]], [[0, 1], [-1, 2], [1, 10]]), ([[-2, 0, 3], [-1, -1, -1]], [[-1, 1], [0, 1], [0, 1]]), ([[0, 2, 3, 7], [2, 2, 2, 2]], [[2, 1], [0, 1], [0, 1], [0, 1]]), ([[0, 1, 2], [-1, 0, -1]], [[-1, 1], [1, 1], [-1, 1]]), ([[0, 1, 2], [-1, 0, 0]], [[-1, 1], [1, 1], [-1, 2]]), ([[0, 1, 2], [-1, 0, 1]], [[-1, 1], [1, 1], [0, 1]]), ([[0, 1, 2], [-1, 0, 2]], [[-1, 1], [1, 1], [1, 2]])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("explicit oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| explicit oracle 0 | [[-1, 1], [0, 1], [1, 15]] | [[-1, 1], [0, 1], [1, 15]] | Passed |
| explicit oracle 1 | [[-1, 1], [1, 2], [-1, 6]] | [[-1, 1], [1, 2], [-1, 6]] | Passed |
| explicit oracle 2 | [[-1, 1], [0, 1], [0, 1]] | [[-1, 1], [0, 1], [0, 1]] | Passed |
| explicit oracle 3 | [[2, 1], [0, 1], [0, 1], [0, 1]] | [[2, 1], [0, 1], [0, 1], [0, 1]] | Passed |
| explicit oracle 4 | [[-1, 1], [0, 1], [2, 15]] | [[-1, 1], [0, 1], [2, 15]] | Passed |
| explicit oracle 5 | [[-1, 1], [0, 1], [1, 5]] | [[-1, 1], [0, 1], [1, 5]] | Passed |
| explicit oracle 6 | [[-1, 1], [1, 2], [-1, 10]] | [[-1, 1], [1, 2], [-1, 10]] | Passed |
| explicit oracle 7 | [[-1, 1], [1, 2], [-1, 30]] | [[-1, 1], [1, 2], [-1, 30]] | Passed |
SHA-256 / e61dda3a259bb07b2a667a7ac6be1251c11f585414bca53171645f4875e64321
Verification & scope
A deterministic bounded teaching model. Inputs are restricted to the explicit contract; this is not a production algebra library. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:39:19.564037+00:00.
Case digest / 5306314c1a63e5839c5c3ac84586d504dd5769c5ce50b46d42195b511e07a599