FA-14691 / Numerics / Open access
Newton divided difference table: difference order bounds · case 01
The exact newton divided difference table result violates the stated contract at difference order bounds.
ROOT CAUSE
The difference order bounds step uses range(1,n-1) instead of range(1,n).
THE FAILURE
The difference order bounds step uses range(1,n-1) instead of range(1,n).
Unsuccessful approach: The partial repair range(2,n) still violates the difference order bounds 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-1):
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, -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, -1]], [[-1, 1], [1, 2], [-1, 6]]), ([[-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, -1, 2]], [[-1, 1], [0, 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], [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, 0, 1]], [[-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], [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, 1, 0]], [[-1, 1], [1, 1], [-4, 15]]), ([[-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], [-1, 2, -1]], [[-1, 1], [3, 2], [-1, 2]]), ([[-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, 3]] | [[-1, 1], [0, 1], [1, 15]] | Failed |
| explicit oracle 1 | [[-1, 1], [0, 1], [0, 1]] | [[-1, 1], [0, 1], [0, 1]] | Passed |
| explicit oracle 2 | [[2, 1], [0, 1], [0, 1], [0, 1]] | [[2, 1], [0, 1], [0, 1], [0, 1]] | Passed |
| explicit oracle 3 | [[-1, 1], [0, 1], [2, 3]] | [[-1, 1], [0, 1], [2, 15]] | Failed |
| explicit oracle 4 | [[-1, 1], [0, 1], [1, 1]] | [[-1, 1], [0, 1], [1, 5]] | Failed |
| explicit oracle 5 | [[-1, 1], [1, 2], [-1, 3]] | [[-1, 1], [1, 2], [-1, 6]] | Failed |
| explicit oracle 6 | [[-1, 1], [1, 2], [0, 1]] | [[-1, 1], [1, 2], [-1, 10]] | Failed |
| explicit oracle 7 | [[-1, 1], [1, 2], [1, 3]] | [[-1, 1], [1, 2], [-1, 30]] | Failed |
SHA-256 / d7ea53966a6fd3c74c943e07c2e35fa74216621205a7b821980cd524614a398d
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(2,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, -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, -1]], [[-1, 1], [1, 2], [-1, 6]]), ([[-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, -1, 2]], [[-1, 1], [0, 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], [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, 0, 1]], [[-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], [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, 1, 0]], [[-1, 1], [1, 1], [-4, 15]]), ([[-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], [-1, 2, -1]], [[-1, 1], [3, 2], [-1, 2]]), ([[-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], [-1, 1], [1, 5]] | [[-1, 1], [0, 1], [1, 15]] | Failed |
| explicit oracle 1 | [[-1, 1], [-1, 1], [0, 1]] | [[-1, 1], [0, 1], [0, 1]] | Failed |
| explicit oracle 2 | [[2, 1], [2, 1], [0, 1], [0, 1]] | [[2, 1], [0, 1], [0, 1], [0, 1]] | Failed |
| explicit oracle 3 | [[-1, 1], [-1, 1], [2, 5]] | [[-1, 1], [0, 1], [2, 15]] | Failed |
| explicit oracle 4 | [[-1, 1], [-1, 1], [3, 5]] | [[-1, 1], [0, 1], [1, 5]] | Failed |
| explicit oracle 5 | [[-1, 1], [0, 1], [-1, 5]] | [[-1, 1], [1, 2], [-1, 6]] | Failed |
| explicit oracle 6 | [[-1, 1], [0, 1], [0, 1]] | [[-1, 1], [1, 2], [-1, 10]] | Failed |
| explicit oracle 7 | [[-1, 1], [0, 1], [1, 5]] | [[-1, 1], [1, 2], [-1, 30]] | Failed |
SHA-256 / 9c33ca6b16472eb8dfa497bdef226b050f6368eb8ecfe96c5a288fadf4610901
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.295135+00:00.
Case digest / a4457b3aa437f68487821ca656d4ea6c00fc14877320f21324d0ab4d319e537b