FAILURE MAP
← Case archive

FA-6156 / Polynomial arithmetic / Open access

Polynomial odd part · case 01

Filtering coefficients changes their exponents.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Filtering coefficients changes their exponents.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return [c if i%2 else 0 for i,c in enumerate(coeff)]

Unsuccessful approach: Even powers are retained instead of odd 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 odd part. Exact operational definition: [c if i%2 else 0 for i,c in enumerate(coeff)]

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(coeff):
    return [c for i,c in enumerate(coeff) if i%2]
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],)), [0, 2, 0, 4])
check('fixture 2: ([0, 1],)', solve(*([0, 1],)), [0, 1])
check('fixture 3: ([5],)', solve(*([5],)), [0])
check('fixture 4: ([],)', solve(*([],)), [])
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 fixtureActualExpectedOutcome
fixture 1: ([1, 2, 3, 4],)[2, 4][0, 2, 0, 4]Failed
fixture 2: ([0, 1],)[1][0, 1]Failed
fixture 3: ([5],)[][0]Failed
fixture 4: ([],)[][]Passed

SHA-256 / c73811d2ee2d70ac900378681e8adcb5e26670ab49f7c03db25ce149171853c8

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(coeff):
    return [c if i%2==0 else 0 for i,c in enumerate(coeff)]
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],)), [0, 2, 0, 4])
check('fixture 2: ([0, 1],)', solve(*([0, 1],)), [0, 1])
check('fixture 3: ([5],)', solve(*([5],)), [0])
check('fixture 4: ([],)', solve(*([],)), [])
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 fixtureActualExpectedOutcome
fixture 1: ([1, 2, 3, 4],)[1, 0, 3, 0][0, 2, 0, 4]Failed
fixture 2: ([0, 1],)[0, 0][0, 1]Failed
fixture 3: ([5],)[5][0]Failed
fixture 4: ([],)[][]Passed

SHA-256 / 8dad82a7d0b7d73abb26653209d3325a6123b01c12772c717416acf105ae9ded

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(coeff):
    return [c if i%2 else 0 for i,c in enumerate(coeff)]
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],)), [0, 2, 0, 4])
check('fixture 2: ([0, 1],)', solve(*([0, 1],)), [0, 1])
check('fixture 3: ([5],)', solve(*([5],)), [0])
check('fixture 4: ([],)', solve(*([],)), [])
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 fixtureActualExpectedOutcome
fixture 1: ([1, 2, 3, 4],)[0, 2, 0, 4][0, 2, 0, 4]Passed
fixture 2: ([0, 1],)[0, 1][0, 1]Passed
fixture 3: ([5],)[0][0]Passed
fixture 4: ([],)[][]Passed

SHA-256 / dcb413fae7886c91e2417cc0d8a8bcc7d59e768ed8152c295d3c71aae33fe0fe

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:58.209926+00:00.

Case digest / 50dbc09ec573422ecc76c736a382278080b4fbd6dc1499f36cb174a482e68bd4