FA-14616 / Numerics / Open access
Polynomial composition: horner seed · case 01
The exact polynomial composition result violates the stated contract at horner seed.
ROOT CAUSE
The horner seed step uses [1] instead of [0].
VERIFIED REPAIR
Use [0] at the horner seed step.
Unsuccessful approach: The partial repair [A[0]] still violates the horner seed invariant.
Case contract
Input [A,B] nonempty ascending integer polynomials; return canonical ascending coefficients A(B(t)), zero represented [0].
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):
A,B=x
r=[1]
for a in reversed(A):
t=[0]*(len(r)+len(B)-1)
for i,u in enumerate(r):
for j,v in enumerate(B):
if i+j>=len(t):return None
t[i+j]+=u*v
t[0]+=a
r=t
while len(r)>1 and r[-1]==0:r.pop()
return r
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, -1, -1], [-1, 0]], [-1]), ([[-1, -1, -1], [-1, 1]], [-1, 1, -1]), ([[-1, -1, -1], [0, -1]], [-1, 1, -1]), ([[-1, -1, -1], [0, 0]], [-1]), ([[-1, -1, -1], [0, 1]], [-1, -1, -1]), ([[-1, -1, -1], [1, -1]], [-3, 3, -1])], [([[-1, -1, -1], [-1, 0]], [-1]), ([[-1, -1, -1], [0, -1]], [-1, 1, -1]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, -1, 0], [1, 1]], [-2, -1]), ([[-1, -1, 1], [-1, -1]], [1, 3, 1]), ([[-1, -1, 1], [-1, 0]], [1]), ([[-1, -1, 1], [-1, 1]], [1, -3, 1])], [([[-1, -1, -1], [-1, 1]], [-1, 1, -1]), ([[-1, -1, -1], [1, 0]], [-3]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, 0, -1], [1, 0]], [-2]), ([[-1, 0, -1], [1, 1]], [-2, -2, -1]), ([[-1, 0, 0], [-1, -1]], [-1]), ([[-1, 0, 0], [-1, 0]], [-1])], [([[-1, -1, -1], [0, -1]], [-1, 1, -1]), ([[-1, -1, 0], [-1, 0]], [0]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, 0, 1], [1, -1]], [0, -2, 1]), ([[-1, 0, 1], [1, 0]], [0]), ([[-1, 0, 1], [1, 1]], [0, 2, 1]), ([[-1, 1, -1], [-1, -1]], [-3, -3, -1])], [([[-1, -1, -1], [0, 1]], [-1, -1, -1]), ([[-1, -1, 0], [0, 1]], [-1, -1]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, 1, 0], [0, 1]], [-1, 1]), ([[-1, 1, 0], [1, -1]], [0, -1]), ([[-1, 1, 0], [1, 0]], [0]), ([[-1, 1, 0], [1, 1]], [0, 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, -4, -4, -1] | [-1, -1, -1] | Failed |
| explicit oracle 1 | [1, 2, 1] | [0] | Failed |
| explicit oracle 2 | [-2] | [-1] | Failed |
| explicit oracle 3 | [-2, 4, -4, 1] | [-1, 1, -1] | Failed |
| explicit oracle 4 | [-1, 1, -1, -1] | [-1, 1, -1] | Failed |
| explicit oracle 5 | [-1] | [-1] | Passed |
| explicit oracle 6 | [-1, -1, -1, 1] | [-1, -1, -1] | Failed |
| explicit oracle 7 | [-2, 0, 2, -1] | [-3, 3, -1] | Failed |
SHA-256 / ccc3a7fdffad382b1716f0f3a8aaaa4413925bf593d3516738947f0212cf0f65
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):
A,B=x
r=[A[0]]
for a in reversed(A):
t=[0]*(len(r)+len(B)-1)
for i,u in enumerate(r):
for j,v in enumerate(B):
if i+j>=len(t):return None
t[i+j]+=u*v
t[0]+=a
r=t
while len(r)>1 and r[-1]==0:r.pop()
return r
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, -1, -1], [-1, 0]], [-1]), ([[-1, -1, -1], [-1, 1]], [-1, 1, -1]), ([[-1, -1, -1], [0, -1]], [-1, 1, -1]), ([[-1, -1, -1], [0, 0]], [-1]), ([[-1, -1, -1], [0, 1]], [-1, -1, -1]), ([[-1, -1, -1], [1, -1]], [-3, 3, -1])], [([[-1, -1, -1], [-1, 0]], [-1]), ([[-1, -1, -1], [0, -1]], [-1, 1, -1]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, -1, 0], [1, 1]], [-2, -1]), ([[-1, -1, 1], [-1, -1]], [1, 3, 1]), ([[-1, -1, 1], [-1, 0]], [1]), ([[-1, -1, 1], [-1, 1]], [1, -3, 1])], [([[-1, -1, -1], [-1, 1]], [-1, 1, -1]), ([[-1, -1, -1], [1, 0]], [-3]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, 0, -1], [1, 0]], [-2]), ([[-1, 0, -1], [1, 1]], [-2, -2, -1]), ([[-1, 0, 0], [-1, -1]], [-1]), ([[-1, 0, 0], [-1, 0]], [-1])], [([[-1, -1, -1], [0, -1]], [-1, 1, -1]), ([[-1, -1, 0], [-1, 0]], [0]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, 0, 1], [1, -1]], [0, -2, 1]), ([[-1, 0, 1], [1, 0]], [0]), ([[-1, 0, 1], [1, 1]], [0, 2, 1]), ([[-1, 1, -1], [-1, -1]], [-3, -3, -1])], [([[-1, -1, -1], [0, 1]], [-1, -1, -1]), ([[-1, -1, 0], [0, 1]], [-1, -1]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, 1, 0], [0, 1]], [-1, 1]), ([[-1, 1, 0], [1, -1]], [0, -1]), ([[-1, 1, 0], [1, 0]], [0]), ([[-1, 1, 0], [1, 1]], [0, 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 | [0, 2, 2, 1] | [-1, -1, -1] | Failed |
| explicit oracle 1 | [0] | [0] | Passed |
| explicit oracle 2 | [0] | [-1] | Failed |
| explicit oracle 3 | [0, -2, 2, -1] | [-1, 1, -1] | Failed |
| explicit oracle 4 | [-1, 1, -1, 1] | [-1, 1, -1] | Failed |
| explicit oracle 5 | [-1] | [-1] | Passed |
| explicit oracle 6 | [-1, -1, -1, -1] | [-1, -1, -1] | Failed |
| explicit oracle 7 | [-4, 6, -4, 1] | [-3, 3, -1] | Failed |
SHA-256 / 1c207d71ffacb17d8fb3598b33f553fafecacd8ad377717b7425ce793597531e
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):
A,B=x
r=[0]
for a in reversed(A):
t=[0]*(len(r)+len(B)-1)
for i,u in enumerate(r):
for j,v in enumerate(B):
if i+j>=len(t):return None
t[i+j]+=u*v
t[0]+=a
r=t
while len(r)>1 and r[-1]==0:r.pop()
return r
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, -1, -1], [-1, 0]], [-1]), ([[-1, -1, -1], [-1, 1]], [-1, 1, -1]), ([[-1, -1, -1], [0, -1]], [-1, 1, -1]), ([[-1, -1, -1], [0, 0]], [-1]), ([[-1, -1, -1], [0, 1]], [-1, -1, -1]), ([[-1, -1, -1], [1, -1]], [-3, 3, -1])], [([[-1, -1, -1], [-1, 0]], [-1]), ([[-1, -1, -1], [0, -1]], [-1, 1, -1]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, -1, 0], [1, 1]], [-2, -1]), ([[-1, -1, 1], [-1, -1]], [1, 3, 1]), ([[-1, -1, 1], [-1, 0]], [1]), ([[-1, -1, 1], [-1, 1]], [1, -3, 1])], [([[-1, -1, -1], [-1, 1]], [-1, 1, -1]), ([[-1, -1, -1], [1, 0]], [-3]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, 0, -1], [1, 0]], [-2]), ([[-1, 0, -1], [1, 1]], [-2, -2, -1]), ([[-1, 0, 0], [-1, -1]], [-1]), ([[-1, 0, 0], [-1, 0]], [-1])], [([[-1, -1, -1], [0, -1]], [-1, 1, -1]), ([[-1, -1, 0], [-1, 0]], [0]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, 0, 1], [1, -1]], [0, -2, 1]), ([[-1, 0, 1], [1, 0]], [0]), ([[-1, 0, 1], [1, 1]], [0, 2, 1]), ([[-1, 1, -1], [-1, -1]], [-3, -3, -1])], [([[-1, -1, -1], [0, 1]], [-1, -1, -1]), ([[-1, -1, 0], [0, 1]], [-1, -1]), ([[-1, -1, -1], [-1, -1]], [-1, -1, -1]), ([[0, 0], [1, 1]], [0]), ([[-1, 1, 0], [0, 1]], [-1, 1]), ([[-1, 1, 0], [1, -1]], [0, -1]), ([[-1, 1, 0], [1, 0]], [0]), ([[-1, 1, 0], [1, 1]], [0, 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 | [-1, -1, -1] | [-1, -1, -1] | Passed |
| explicit oracle 1 | [0] | [0] | Passed |
| explicit oracle 2 | [-1] | [-1] | Passed |
| explicit oracle 3 | [-1, 1, -1] | [-1, 1, -1] | Passed |
| explicit oracle 4 | [-1, 1, -1] | [-1, 1, -1] | Passed |
| explicit oracle 5 | [-1] | [-1] | Passed |
| explicit oracle 6 | [-1, -1, -1] | [-1, -1, -1] | Passed |
| explicit oracle 7 | [-3, 3, -1] | [-3, 3, -1] | Passed |
SHA-256 / b4537d2402993d35a0f4f8c7587cc20a9573045daefc1cfbe611c76809202c0a
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:18.576179+00:00.
Case digest / d62ad0a7f7525e7b1cb8c7fffade6f9790111c600c02379b6f48ed2cbe8c2da4