FA-6116 / Polynomial arithmetic / Open access
Polynomial coefficient convolution · case 01
Elementwise multiplication omits cross-degree products.
ROOT CAUSE
Elementwise multiplication omits cross-degree products.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return [sum(a[j]*b[i-j] for j in range(len(a)) if 0<=i-j<len(b)) for i in range(len(a)+len(b)-1)] if a and b else []
Unsuccessful approach: The result is truncated to an input length and loses high powers.
Case contract
Integer coefficients in ascending power order and integer evaluation bounds; missing high-degree coefficients are zero. Rational outputs are reduced Fraction strings; the zero-polynomial degree is -1. Polynomial coefficient convolution. Exact operational definition: [sum(a[j]*b[i-j] for j in range(len(a)) if 0<=i-j<len(b)) for i in range(len(a)+len(b)-1)] if a and b else []
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Polynomial arithmetic results depend on the stated convention.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(a, b):
return [x*y for x,y in zip(a,b)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 2], [3, 4])', solve(*([1, 2], [3, 4])), [3, 10, 8])
check('fixture 2: ([0, 1], [0, 1])', solve(*([0, 1], [0, 1])), [0, 0, 1])
check('fixture 3: ([2], [3])', solve(*([2], [3])), [6])
check('fixture 4: ([], [1])', solve(*([], [1])), [])
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 |
|---|---|---|---|
| fixture 1: ([1, 2], [3, 4]) | [3, 8] | [3, 10, 8] | Failed |
| fixture 2: ([0, 1], [0, 1]) | [0, 1] | [0, 0, 1] | Failed |
| fixture 3: ([2], [3]) | [6] | [6] | Passed |
| fixture 4: ([], [1]) | [] | [] | Passed |
SHA-256 / cd13bd9fd264876f54aaa70efb6ac3b11756ee0539a96fa41c1d2e3482685c53
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(a, b):
return [sum(a[j]*b[i-j] for j in range(len(a)) if 0<=i-j<len(b)) for i in range(max(len(a),len(b)))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 2], [3, 4])', solve(*([1, 2], [3, 4])), [3, 10, 8])
check('fixture 2: ([0, 1], [0, 1])', solve(*([0, 1], [0, 1])), [0, 0, 1])
check('fixture 3: ([2], [3])', solve(*([2], [3])), [6])
check('fixture 4: ([], [1])', solve(*([], [1])), [])
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 |
|---|---|---|---|
| fixture 1: ([1, 2], [3, 4]) | [3, 10] | [3, 10, 8] | Failed |
| fixture 2: ([0, 1], [0, 1]) | [0, 0] | [0, 0, 1] | Failed |
| fixture 3: ([2], [3]) | [6] | [6] | Passed |
| fixture 4: ([], [1]) | [0] | [] | Failed |
SHA-256 / 9e894569c6128b5fa0d0e2fae92d98ea9540cb29a00963e505004768bd07b419
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(a, b):
return [sum(a[j]*b[i-j] for j in range(len(a)) if 0<=i-j<len(b)) for i in range(len(a)+len(b)-1)] if a and b else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 2], [3, 4])', solve(*([1, 2], [3, 4])), [3, 10, 8])
check('fixture 2: ([0, 1], [0, 1])', solve(*([0, 1], [0, 1])), [0, 0, 1])
check('fixture 3: ([2], [3])', solve(*([2], [3])), [6])
check('fixture 4: ([], [1])', solve(*([], [1])), [])
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 |
|---|---|---|---|
| fixture 1: ([1, 2], [3, 4]) | [3, 10, 8] | [3, 10, 8] | Passed |
| fixture 2: ([0, 1], [0, 1]) | [0, 0, 1] | [0, 0, 1] | Passed |
| fixture 3: ([2], [3]) | [6] | [6] | Passed |
| fixture 4: ([], [1]) | [] | [] | Passed |
SHA-256 / 0d07f9a3438f6a81ec37c342a02407ef5c8aaece6bab65e672b2888530df77f0
Verification & scope
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:37:57.801253+00:00.
Case digest / db0fbd6621346b2e226aa18dffbb0e19525da30f42f82704c2854565bc9a5de7