FA-14671 / Numerics / Open access
Lagrange interpolation value: self node exclusion · case 01
The exact lagrange interpolation value result violates the stated contract at self node exclusion.
ROOT CAUSE
The self node exclusion step uses xi==t instead of i==j.
VERIFIED REPAIR
Use i==j at the self node exclusion step.
Unsuccessful approach: The partial repair j==0 still violates the self node exclusion invariant.
Case contract
Input [points,t] distinct integer abscissae and integer ordinates; exact rational interpolation value [p,q].
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):
points,t=x
ans=Fraction(0)
for i,(xi,yi) in enumerate(points):
term=Fraction(yi)
for j,(xj,yj) in enumerate(points):
if xi==t:continue
den=xi-xj
if den==0:return None
term*=Fraction(t-xj,den)
ans=ans+term
return [ans.numerator,ans.denominator]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 0], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 3], [-2, 1])], [([[[-2, -2], [-1, -2], [0, -2]], -2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 0], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 0], [0, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 1], [4, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 2], [10, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 3], [18, 1])], [([[[-2, -2], [-1, -2], [0, -2]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 3], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -2], [0, 2]], 3], [38, 1]), ([[[-2, -2], [-1, -1], [0, -2]], -3], [-5, 1]), ([[[-2, -2], [-1, -1], [0, -2]], -2], [-2, 1]), ([[[-2, -2], [-1, -1], [0, -2]], -1], [-1, 1])], [([[[-2, -2], [-1, -2], [0, -2]], 0], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -1]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -1], [0, 0]], -1], [-1, 1]), ([[[-2, -2], [-1, -1], [0, 0]], 0], [0, 1]), ([[[-2, -2], [-1, -1], [0, 0]], 1], [1, 1]), ([[[-2, -2], [-1, -1], [0, 0]], 2], [2, 1])], [([[[-2, -2], [-1, -2], [0, -2]], 1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -1]], 2], [4, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -1], [0, 2]], 2], [14, 1]), ([[[-2, -2], [-1, -1], [0, 2]], 3], [23, 1]), ([[[-2, -2], [-1, 0], [0, -2]], -3], [-8, 1]), ([[[-2, -2], [-1, 0], [0, -2]], -2], [-2, 1])]]
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 | None | [-2, 1] | Failed |
| explicit oracle 1 | None | [2, 1] | Failed |
| explicit oracle 2 | None | [-2, 1] | Failed |
| explicit oracle 3 | None | [-2, 1] | Failed |
| explicit oracle 4 | None | [-2, 1] | Failed |
| explicit oracle 5 | None | [-2, 1] | Failed |
| explicit oracle 6 | None | [-2, 1] | Failed |
| explicit oracle 7 | None | [-2, 1] | Failed |
SHA-256 / 82c65ebc179b046c1d5108464c882a0202e4d5b518afa0f4c86e643a4143ca6d
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):
points,t=x
ans=Fraction(0)
for i,(xi,yi) in enumerate(points):
term=Fraction(yi)
for j,(xj,yj) in enumerate(points):
if j==0:continue
den=xi-xj
if den==0:return None
term*=Fraction(t-xj,den)
ans=ans+term
return [ans.numerator,ans.denominator]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 0], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 3], [-2, 1])], [([[[-2, -2], [-1, -2], [0, -2]], -2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 0], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 0], [0, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 1], [4, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 2], [10, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 3], [18, 1])], [([[[-2, -2], [-1, -2], [0, -2]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 3], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -2], [0, 2]], 3], [38, 1]), ([[[-2, -2], [-1, -1], [0, -2]], -3], [-5, 1]), ([[[-2, -2], [-1, -1], [0, -2]], -2], [-2, 1]), ([[[-2, -2], [-1, -1], [0, -2]], -1], [-1, 1])], [([[[-2, -2], [-1, -2], [0, -2]], 0], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -1]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -1], [0, 0]], -1], [-1, 1]), ([[[-2, -2], [-1, -1], [0, 0]], 0], [0, 1]), ([[[-2, -2], [-1, -1], [0, 0]], 1], [1, 1]), ([[[-2, -2], [-1, -1], [0, 0]], 2], [2, 1])], [([[[-2, -2], [-1, -2], [0, -2]], 1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -1]], 2], [4, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -1], [0, 2]], 2], [14, 1]), ([[[-2, -2], [-1, -1], [0, 2]], 3], [23, 1]), ([[[-2, -2], [-1, 0], [0, -2]], -3], [-8, 1]), ([[[-2, -2], [-1, 0], [0, -2]], -2], [-2, 1])]]
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 | None | [-2, 1] | Failed |
| explicit oracle 1 | None | [2, 1] | Failed |
| explicit oracle 2 | None | [-2, 1] | Failed |
| explicit oracle 3 | None | [-2, 1] | Failed |
| explicit oracle 4 | None | [-2, 1] | Failed |
| explicit oracle 5 | None | [-2, 1] | Failed |
| explicit oracle 6 | None | [-2, 1] | Failed |
| explicit oracle 7 | None | [-2, 1] | Failed |
SHA-256 / 16118aae3bb59109cb45ccd547cf973fcbf4ff408e811aa97497acf08f0a3253
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):
points,t=x
ans=Fraction(0)
for i,(xi,yi) in enumerate(points):
term=Fraction(yi)
for j,(xj,yj) in enumerate(points):
if i==j:continue
den=xi-xj
if den==0:return None
term*=Fraction(t-xj,den)
ans=ans+term
return [ans.numerator,ans.denominator]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 0], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 3], [-2, 1])], [([[[-2, -2], [-1, -2], [0, -2]], -2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 0], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 0], [0, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 1], [4, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 2], [10, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 3], [18, 1])], [([[[-2, -2], [-1, -2], [0, -2]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 3], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -2], [0, 2]], 3], [38, 1]), ([[[-2, -2], [-1, -1], [0, -2]], -3], [-5, 1]), ([[[-2, -2], [-1, -1], [0, -2]], -2], [-2, 1]), ([[[-2, -2], [-1, -1], [0, -2]], -1], [-1, 1])], [([[[-2, -2], [-1, -2], [0, -2]], 0], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -1]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -1], [0, 0]], -1], [-1, 1]), ([[[-2, -2], [-1, -1], [0, 0]], 0], [0, 1]), ([[[-2, -2], [-1, -1], [0, 0]], 1], [1, 1]), ([[[-2, -2], [-1, -1], [0, 0]], 2], [2, 1])], [([[[-2, -2], [-1, -2], [0, -2]], 1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -1]], 2], [4, 1]), ([[[-2, -2], [-1, -2], [0, -2]], -3], [-2, 1]), ([[[0, 2], [2, 2]], 3], [2, 1]), ([[[-2, -2], [-1, -1], [0, 2]], 2], [14, 1]), ([[[-2, -2], [-1, -1], [0, 2]], 3], [23, 1]), ([[[-2, -2], [-1, 0], [0, -2]], -3], [-8, 1]), ([[[-2, -2], [-1, 0], [0, -2]], -2], [-2, 1])]]
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 | [-2, 1] | [-2, 1] | Passed |
| explicit oracle 1 | [2, 1] | [2, 1] | Passed |
| explicit oracle 2 | [-2, 1] | [-2, 1] | Passed |
| explicit oracle 3 | [-2, 1] | [-2, 1] | Passed |
| explicit oracle 4 | [-2, 1] | [-2, 1] | Passed |
| explicit oracle 5 | [-2, 1] | [-2, 1] | Passed |
| explicit oracle 6 | [-2, 1] | [-2, 1] | Passed |
| explicit oracle 7 | [-2, 1] | [-2, 1] | Passed |
SHA-256 / b682718394be15e831ce7bdf3c54e475e25a140584a33d7651bbb3f273aa3b0c
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.200048+00:00.
Case digest / fcef4f36aec429406be813c2a0a98f6662f954205ccf3974c3f121d96c7f5c9b