FA-14676 / Numerics / Open access
Lagrange interpolation value: basis denominator orientation · case 01
The exact lagrange interpolation value result violates the stated contract at basis denominator orientation.
ROOT CAUSE
The basis denominator orientation step uses xj-xi instead of xi-xj.
THE FAILURE
The basis denominator orientation step uses xj-xi instead of xi-xj.
Unsuccessful approach: The partial repair abs(xi-xj) still violates the basis denominator orientation 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 i==j:continue
den=xj-xi
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 = [[([[[0, -2], [2, -2]], -2], [-2, 1]), ([[[-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])], [([[[0, -2], [2, -2]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 2], [-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])], [([[[0, -2], [2, -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, -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])], [([[[0, -2], [2, -2]], 1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -1]], 3], [8, 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])], [([[[0, -2], [2, -2]], 2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 1], [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] | Failed |
| explicit oracle 1 | [-2, 1] | [-2, 1] | Passed |
| explicit oracle 2 | [-2, 1] | [2, 1] | Failed |
| 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 / 7e2f498dc5fdc67fc028e41a4e798e2c550da0b6783023938695ec2ef7806626
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 i==j:continue
den=abs(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 = [[([[[0, -2], [2, -2]], -2], [-2, 1]), ([[[-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])], [([[[0, -2], [2, -2]], -1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -2]], 2], [-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])], [([[[0, -2], [2, -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, -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])], [([[[0, -2], [2, -2]], 1], [-2, 1]), ([[[-2, -2], [-1, -2], [0, -1]], 3], [8, 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])], [([[[0, -2], [2, -2]], 2], [-2, 1]), ([[[-2, -2], [-1, -2], [0, 0]], 1], [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 | [6, 1] | [-2, 1] | Failed |
| explicit oracle 1 | [-14, 1] | [-2, 1] | Failed |
| explicit oracle 2 | [4, 1] | [2, 1] | Failed |
| explicit oracle 3 | [-2, 1] | [-2, 1] | Passed |
| explicit oracle 4 | [2, 1] | [-2, 1] | Failed |
| explicit oracle 5 | [-2, 1] | [-2, 1] | Passed |
| explicit oracle 6 | [-14, 1] | [-2, 1] | Failed |
| explicit oracle 7 | [-34, 1] | [-2, 1] | Failed |
SHA-256 / eea85b9275c86b82518ef5ee2f8e24f5cfd5d304ca528ed958a5d819db21d0d2
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.197651+00:00.
Case digest / 5c03f1385ef14202a0921e9e015ac9f503bcf12bd1e7179d4a232ca802acb257