{"abstract":"The exact polynomial composition result violates the stated contract at canonical degree.","category":"Numerics","checks":8,"contract":"Input [A,B] nonempty ascending integer polynomials; return canonical ascending coefficients A(B(t)), zero represented [0].","evaluation_group":"s3-numerics-polynomial-composition","failed_approach":"The partial repair r[-1]<=0 still violates the canonical degree invariant.","family":"s3-numerics-polynomial-composition-canonical-degree","id":"FA-14636","implementations":{"attempt":{"sha256":"e054219a640f562f800b105a9bd5445ff9f4e390bce90511aefda7359c3037b1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    A,B=x\n    r=[0]\n    for a in reversed(A):\n     t=[0]*(len(r)+len(B)-1)\n     for i,u in enumerate(r):\n      for j,v in enumerate(B):\n       if i+j>=len(t):return None\n       t[i+j]+=u*v\n     t[0]+=a\n     r=t\n    while len(r)>1 and r[-1]<=0:r.pop()\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[-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, 0], [-1, 1]], [0, -1]), ([[-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, 0, -1], [-1, -1]], [-2, -2, -1]), ([[-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, 0]], [-1]), ([[-1, 0, -1], [0, 1]], [-1, 0, -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])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"94c522056f0c18b04e0bf460c774b1452f8efa269aba03a8fa4c016330d96513","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    A,B=x\n    r=[0]\n    for a in reversed(A):\n     t=[0]*(len(r)+len(B)-1)\n     for i,u in enumerate(r):\n      for j,v in enumerate(B):\n       if i+j>=len(t):return None\n       t[i+j]+=u*v\n     t[0]+=a\n     r=t\n    while len(r)>1 and r[0]==0:r.pop()\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[-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, 0], [-1, 1]], [0, -1]), ([[-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, 0, -1], [-1, -1]], [-2, -2, -1]), ([[-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, 0]], [-1]), ([[-1, 0, -1], [0, 1]], [-1, 0, -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])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"89bc4bfb16f1fa64d5b3cf03e22165d42371cd157019f3e4ad2ecc5b74a5544b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    A,B=x\n    r=[0]\n    for a in reversed(A):\n     t=[0]*(len(r)+len(B)-1)\n     for i,u in enumerate(r):\n      for j,v in enumerate(B):\n       if i+j>=len(t):return None\n       t[i+j]+=u*v\n     t[0]+=a\n     r=t\n    while len(r)>1 and r[-1]==0:r.pop()\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[-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, 0], [-1, 1]], [0, -1]), ([[-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, 0, -1], [-1, -1]], [-2, -2, -1]), ([[-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, 0]], [-1]), ([[-1, 0, -1], [0, 1]], [-1, 0, -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])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-numerics-polynomial-composition-canonical-degree","generated_at":"2026-09-29T14:39:18.932051+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Exact discrete arithmetic with observable algorithmic state; no floating point approximation is used.","repair":"Use r[-1]==0 at the canonical degree step.","root_cause":"The canonical degree step uses r[0]==0 instead of r[-1]==0.","sha256":"bd33699b5b6ba2ab1f8bb7186a43e5d1c5dc98b0e77bc763d28a296545d63da3","title":"Polynomial composition: canonical degree · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":47.187,"exit_code":1,"observations":[{"actual":[-1],"check":"explicit oracle 0","expected":[-1,-1,-1],"passed":false},{"actual":[0],"check":"explicit oracle 1","expected":[0],"passed":true},{"actual":[-1],"check":"explicit oracle 2","expected":[-1],"passed":true},{"actual":[-1,1],"check":"explicit oracle 3","expected":[-1,1,-1],"passed":false},{"actual":[-1,1],"check":"explicit oracle 4","expected":[-1,1,-1],"passed":false},{"actual":[-1],"check":"explicit oracle 5","expected":[-1],"passed":true},{"actual":[-1],"check":"explicit oracle 6","expected":[-1,-1,-1],"passed":false},{"actual":[-3,3],"check":"explicit oracle 7","expected":[-3,3,-1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-1], \"expected\": [-1, -1, -1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [-1, 1], \"expected\": [-1, 1, -1], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [-1, 1], \"expected\": [-1, 1, -1], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [-1], \"expected\": [-1, -1, -1], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [-3, 3], \"expected\": [-3, 3, -1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.534,"exit_code":1,"observations":[{"actual":[-1,-1,-1,0],"check":"explicit oracle 0","expected":[-1,-1,-1],"passed":false},{"actual":[0],"check":"explicit oracle 1","expected":[0],"passed":true},{"actual":[-1,0,0,0],"check":"explicit oracle 2","expected":[-1],"passed":false},{"actual":[-1,1,-1,0],"check":"explicit oracle 3","expected":[-1,1,-1],"passed":false},{"actual":[-1,1,-1,0],"check":"explicit oracle 4","expected":[-1,1,-1],"passed":false},{"actual":[-1,0,0,0],"check":"explicit oracle 5","expected":[-1],"passed":false},{"actual":[-1,-1,-1,0],"check":"explicit oracle 6","expected":[-1,-1,-1],"passed":false},{"actual":[-3,3,-1,0],"check":"explicit oracle 7","expected":[-3,3,-1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-1, -1, -1, 0], \"expected\": [-1, -1, -1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [-1, 0, 0, 0], \"expected\": [-1], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [-1, 1, -1, 0], \"expected\": [-1, 1, -1], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [-1, 1, -1, 0], \"expected\": [-1, 1, -1], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [-1, 0, 0, 0], \"expected\": [-1], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [-1, -1, -1, 0], \"expected\": [-1, -1, -1], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [-3, 3, -1, 0], \"expected\": [-3, 3, -1], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":48.403,"exit_code":0,"observations":[{"actual":[-1,-1,-1],"check":"explicit oracle 0","expected":[-1,-1,-1],"passed":true},{"actual":[0],"check":"explicit oracle 1","expected":[0],"passed":true},{"actual":[-1],"check":"explicit oracle 2","expected":[-1],"passed":true},{"actual":[-1,1,-1],"check":"explicit oracle 3","expected":[-1,1,-1],"passed":true},{"actual":[-1,1,-1],"check":"explicit oracle 4","expected":[-1,1,-1],"passed":true},{"actual":[-1],"check":"explicit oracle 5","expected":[-1],"passed":true},{"actual":[-1,-1,-1],"check":"explicit oracle 6","expected":[-1,-1,-1],"passed":true},{"actual":[-3,3,-1],"check":"explicit oracle 7","expected":[-3,3,-1],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-1, -1, -1], \"expected\": [-1, -1, -1], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [-1, 1, -1], \"expected\": [-1, 1, -1], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [-1, 1, -1], \"expected\": [-1, 1, -1], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [-1, -1, -1], \"expected\": [-1, -1, -1], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [-3, 3, -1], \"expected\": [-3, 3, -1], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}