{"abstract":"The exact integer polynomial pseudodivision result violates the stated contract at leading cancellation coefficient.","category":"Numerics","checks":8,"contract":"Input [A,B] integer ascending canonical nonzero polynomials degA>=degB; returns [scale, quotient, remainder] with scale*A=B*quotient+remainder, scale=lc(B)^(degA-degB+1).","evaluation_group":"s3-numerics-integer-polynomial-pseudodivision","failed_approach":"The partial repair abs(r[-1]) still violates the leading cancellation coefficient invariant.","family":"s3-numerics-integer-polynomial-pseudodivision-leading-cancellation-coefficient","id":"FA-14796","implementations":{"attempt":{"sha256":"7f2988058a50619a710a464c2b45487869c50b06f2e05415f8718c9421f554d2","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=A[:];q=[0]*(len(A)-len(B)+1);b=B[-1];steps=len(A)-len(B)+1\n    for _ in range(steps):\n     if len(r)<len(B):\n      q=[b*v for v in q];r=[b*v for v in r];continue\n     k=len(r)-len(B)\n     c=abs(r[-1])\n     q=[b*v for v in q]\n     q[k]=q[k]+c\n     r=[b*v for v in r]\n     for j in range(len(B)):r[j+k]=r[j+k]-c*B[j]\n     while r and r[-1]==0:r.pop()\n    while q and q[-1]==0:q.pop()\n    return [b**steps,q,r]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[-2, -2, -2], [-2, -1]], [1, [-2, 2], [-6]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -2], [-2, 1]], [1, [-6, -2], [-14]]), ([[-2, -2, -2], [-2, 2]], [4, [-8, -4], [-24]]), ([[-2, -2, -2], [-1, -2]], [4, [2, 4], [-6]]), ([[-2, -2, -2], [-1, -1]], [1, [0, 2], [-2]]), ([[-2, -2, -2], [-1, 1]], [1, [-4, -2], [-6]])], [([[-2, -2, -2], [-2, 1]], [1, [-6, -2], [-14]]), ([[-2, -2, -2], [-1, -2]], [4, [2, 4], [-6]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -2], [2, -1]], [1, [6, 2], [-14]]), ([[-2, -2, -2], [2, 1]], [1, [2, -2], [-6]]), ([[-2, -2, -2], [2, 2]], [4, [0, -4], [-8]]), ([[-2, -2, -1], [-2, -2]], [4, [2, 2], [-4]])], [([[-2, -2, -2], [-2, 2]], [4, [-8, -4], [-24]]), ([[-2, -2, -2], [0, -2]], [4, [4, 4], [-8]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -1], [1, 1]], [1, [-1, -1], [-1]]), ([[-2, -2, -1], [1, 2]], [4, [-3, -2], [-5]]), ([[-2, -2, -1], [2, -2]], [4, [6, 2], [-20]]), ([[-2, -2, -1], [2, -1]], [1, [4, 1], [-10]])], [([[-2, -2, -2], [-1, -2]], [4, [2, 4], [-6]]), ([[-2, -2, -2], [0, 2]], [4, [-4, -4], [-8]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, 1], [0, 2]], [4, [-4, 2], [-8]]), ([[-2, -2, 1], [1, -2]], [4, [3, -2], [-11]]), ([[-2, -2, 1], [1, -1]], [1, [1, -1], [-3]]), ([[-2, -2, 1], [1, 1]], [1, [-3, 1], [1]])], [([[-2, -2, -2], [-1, -1]], [1, [0, 2], [-2]]), ([[-2, -2, -2], [1, 1]], [1, [0, -2], [-2]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, 2], [0, -2]], [4, [4, -4], [-8]]), ([[-2, -2, 2], [0, -1]], [1, [2, -2], [-2]]), ([[-2, -2, 2], [0, 1]], [1, [-2, 2], [-2]]), ([[-2, -2, 2], [0, 2]], [4, [-4, 4], [-8]])]]\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":"2d00425958ab16e7a83c92e1e9d3f135b4963582a4ec3f9e0a90cb58df19256c","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=A[:];q=[0]*(len(A)-len(B)+1);b=B[-1];steps=len(A)-len(B)+1\n    for _ in range(steps):\n     if len(r)<len(B):\n      q=[b*v for v in q];r=[b*v for v in r];continue\n     k=len(r)-len(B)\n     c=B[-1]\n     q=[b*v for v in q]\n     q[k]=q[k]+c\n     r=[b*v for v in r]\n     for j in range(len(B)):r[j+k]=r[j+k]-c*B[j]\n     while r and r[-1]==0:r.pop()\n    while q and q[-1]==0:q.pop()\n    return [b**steps,q,r]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[-2, -2, -2], [-2, -1]], [1, [-2, 2], [-6]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -2], [-2, 1]], [1, [-6, -2], [-14]]), ([[-2, -2, -2], [-2, 2]], [4, [-8, -4], [-24]]), ([[-2, -2, -2], [-1, -2]], [4, [2, 4], [-6]]), ([[-2, -2, -2], [-1, -1]], [1, [0, 2], [-2]]), ([[-2, -2, -2], [-1, 1]], [1, [-4, -2], [-6]])], [([[-2, -2, -2], [-2, 1]], [1, [-6, -2], [-14]]), ([[-2, -2, -2], [-1, -2]], [4, [2, 4], [-6]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -2], [2, -1]], [1, [6, 2], [-14]]), ([[-2, -2, -2], [2, 1]], [1, [2, -2], [-6]]), ([[-2, -2, -2], [2, 2]], [4, [0, -4], [-8]]), ([[-2, -2, -1], [-2, -2]], [4, [2, 2], [-4]])], [([[-2, -2, -2], [-2, 2]], [4, [-8, -4], [-24]]), ([[-2, -2, -2], [0, -2]], [4, [4, 4], [-8]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -1], [1, 1]], [1, [-1, -1], [-1]]), ([[-2, -2, -1], [1, 2]], [4, [-3, -2], [-5]]), ([[-2, -2, -1], [2, -2]], [4, [6, 2], [-20]]), ([[-2, -2, -1], [2, -1]], [1, [4, 1], [-10]])], [([[-2, -2, -2], [-1, -2]], [4, [2, 4], [-6]]), ([[-2, -2, -2], [0, 2]], [4, [-4, -4], [-8]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, 1], [0, 2]], [4, [-4, 2], [-8]]), ([[-2, -2, 1], [1, -2]], [4, [3, -2], [-11]]), ([[-2, -2, 1], [1, -1]], [1, [1, -1], [-3]]), ([[-2, -2, 1], [1, 1]], [1, [-3, 1], [1]])], [([[-2, -2, -2], [-1, -1]], [1, [0, 2], [-2]]), ([[-2, -2, -2], [1, 1]], [1, [0, -2], [-2]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, 2], [0, -2]], [4, [4, -4], [-8]]), ([[-2, -2, 2], [0, -1]], [1, [2, -2], [-2]]), ([[-2, -2, 2], [0, 1]], [1, [-2, 2], [-2]]), ([[-2, -2, 2], [0, 2]], [4, [-4, 4], [-8]])]]\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":"2f46bf8941d8f82adf55282db1aa368125a0156004cd5199bb5d80e5ed7131a3","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=A[:];q=[0]*(len(A)-len(B)+1);b=B[-1];steps=len(A)-len(B)+1\n    for _ in range(steps):\n     if len(r)<len(B):\n      q=[b*v for v in q];r=[b*v for v in r];continue\n     k=len(r)-len(B)\n     c=r[-1]\n     q=[b*v for v in q]\n     q[k]=q[k]+c\n     r=[b*v for v in r]\n     for j in range(len(B)):r[j+k]=r[j+k]-c*B[j]\n     while r and r[-1]==0:r.pop()\n    while q and q[-1]==0:q.pop()\n    return [b**steps,q,r]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[-2, -2, -2], [-2, -1]], [1, [-2, 2], [-6]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -2], [-2, 1]], [1, [-6, -2], [-14]]), ([[-2, -2, -2], [-2, 2]], [4, [-8, -4], [-24]]), ([[-2, -2, -2], [-1, -2]], [4, [2, 4], [-6]]), ([[-2, -2, -2], [-1, -1]], [1, [0, 2], [-2]]), ([[-2, -2, -2], [-1, 1]], [1, [-4, -2], [-6]])], [([[-2, -2, -2], [-2, 1]], [1, [-6, -2], [-14]]), ([[-2, -2, -2], [-1, -2]], [4, [2, 4], [-6]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -2], [2, -1]], [1, [6, 2], [-14]]), ([[-2, -2, -2], [2, 1]], [1, [2, -2], [-6]]), ([[-2, -2, -2], [2, 2]], [4, [0, -4], [-8]]), ([[-2, -2, -1], [-2, -2]], [4, [2, 2], [-4]])], [([[-2, -2, -2], [-2, 2]], [4, [-8, -4], [-24]]), ([[-2, -2, -2], [0, -2]], [4, [4, 4], [-8]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -1], [1, 1]], [1, [-1, -1], [-1]]), ([[-2, -2, -1], [1, 2]], [4, [-3, -2], [-5]]), ([[-2, -2, -1], [2, -2]], [4, [6, 2], [-20]]), ([[-2, -2, -1], [2, -1]], [1, [4, 1], [-10]])], [([[-2, -2, -2], [-1, -2]], [4, [2, 4], [-6]]), ([[-2, -2, -2], [0, 2]], [4, [-4, -4], [-8]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, 1], [0, 2]], [4, [-4, 2], [-8]]), ([[-2, -2, 1], [1, -2]], [4, [3, -2], [-11]]), ([[-2, -2, 1], [1, -1]], [1, [1, -1], [-3]]), ([[-2, -2, 1], [1, 1]], [1, [-3, 1], [1]])], [([[-2, -2, -2], [-1, -1]], [1, [0, 2], [-2]]), ([[-2, -2, -2], [1, 1]], [1, [0, -2], [-2]]), ([[-2, -2, -2], [-2, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, 2], [0, -2]], [4, [4, -4], [-8]]), ([[-2, -2, 2], [0, -1]], [1, [2, -2], [-2]]), ([[-2, -2, 2], [0, 1]], [1, [-2, 2], [-2]]), ([[-2, -2, 2], [0, 2]], [4, [-4, 4], [-8]])]]\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-integer-polynomial-pseudodivision-leading-cancellation-coefficient","generated_at":"2026-09-29T14:39:20.469987+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] at the leading cancellation coefficient step.","root_cause":"The leading cancellation coefficient step uses B[-1] instead of r[-1].","sha256":"e155b675c9830bf7265a358f682cd4e1f745a34878ca66aac5ddfcab8efa3728","title":"Integer polynomial pseudodivision: leading cancellation coefficient · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.772,"exit_code":1,"observations":[{"actual":[1,[0,2],[-2,2]],"check":"explicit oracle 0","expected":[1,[-2,2],[-6]],"passed":false},{"actual":[4,[0,4],[-8]],"check":"explicit oracle 1","expected":[4,[0,4],[-8]],"passed":true},{"actual":[2,[2],[]],"check":"explicit oracle 2","expected":[2,[2],[]],"passed":true},{"actual":[1,[0,6],[-2,10,-8]],"check":"explicit oracle 3","expected":[1,[-6,-2],[-14]],"passed":false},{"actual":[4,[0,12],[-8,16,-32]],"check":"explicit oracle 4","expected":[4,[-8,-4],[-24]],"passed":false},{"actual":[4,[0,4],[-8,-4]],"check":"explicit oracle 5","expected":[4,[2,4],[-6]],"passed":false},{"actual":[1,[0,2],[-2]],"check":"explicit oracle 6","expected":[1,[0,2],[-2]],"passed":true},{"actual":[1,[0,6],[-2,4,-8]],"check":"explicit oracle 7","expected":[1,[-4,-2],[-6]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, [0, 2], [-2, 2]], \"expected\": [1, [-2, 2], [-6]], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [4, [0, 4], [-8]], \"expected\": [4, [0, 4], [-8]], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [2, [2], []], \"expected\": [2, [2], []], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [1, [0, 6], [-2, 10, -8]], \"expected\": [1, [-6, -2], [-14]], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [4, [0, 12], [-8, 16, -32]], \"expected\": [4, [-8, -4], [-24]], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [4, [0, 4], [-8, -4]], \"expected\": [4, [2, 4], [-6]], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [1, [0, 2], [-2]], \"expected\": [1, [0, 2], [-2]], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [1, [0, 6], [-2, 4, -8]], \"expected\": [1, [-4, -2], [-6]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.777,"exit_code":1,"observations":[{"actual":[1,[],[-2,-2,-2]],"check":"explicit oracle 0","expected":[1,[-2,2],[-6]],"passed":false},{"actual":[4,[0,4],[-8]],"check":"explicit oracle 1","expected":[4,[0,4],[-8]],"passed":true},{"actual":[2,[2],[]],"check":"explicit oracle 2","expected":[2,[2],[]],"passed":true},{"actual":[1,[0,2],[-2,2,-4]],"check":"explicit oracle 3","expected":[1,[-6,-2],[-14]],"passed":false},{"actual":[4,[0,6],[-8,4,-20]],"check":"explicit oracle 4","expected":[4,[-8,-4],[-24]],"passed":false},{"actual":[4,[-2,4],[-10,-8]],"check":"explicit oracle 5","expected":[4,[2,4],[-6]],"passed":false},{"actual":[1,[],[-2,-2,-2]],"check":"explicit oracle 6","expected":[1,[0,2],[-2]],"passed":false},{"actual":[1,[0,2],[-2,0,-4]],"check":"explicit oracle 7","expected":[1,[-4,-2],[-6]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, [], [-2, -2, -2]], \"expected\": [1, [-2, 2], [-6]], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [4, [0, 4], [-8]], \"expected\": [4, [0, 4], [-8]], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [2, [2], []], \"expected\": [2, [2], []], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [1, [0, 2], [-2, 2, -4]], \"expected\": [1, [-6, -2], [-14]], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [4, [0, 6], [-8, 4, -20]], \"expected\": [4, [-8, -4], [-24]], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [4, [-2, 4], [-10, -8]], \"expected\": [4, [2, 4], [-6]], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [1, [], [-2, -2, -2]], \"expected\": [1, [0, 2], [-2]], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [1, [0, 2], [-2, 0, -4]], \"expected\": [1, [-4, -2], [-6]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.005,"exit_code":0,"observations":[{"actual":[1,[-2,2],[-6]],"check":"explicit oracle 0","expected":[1,[-2,2],[-6]],"passed":true},{"actual":[4,[0,4],[-8]],"check":"explicit oracle 1","expected":[4,[0,4],[-8]],"passed":true},{"actual":[2,[2],[]],"check":"explicit oracle 2","expected":[2,[2],[]],"passed":true},{"actual":[1,[-6,-2],[-14]],"check":"explicit oracle 3","expected":[1,[-6,-2],[-14]],"passed":true},{"actual":[4,[-8,-4],[-24]],"check":"explicit oracle 4","expected":[4,[-8,-4],[-24]],"passed":true},{"actual":[4,[2,4],[-6]],"check":"explicit oracle 5","expected":[4,[2,4],[-6]],"passed":true},{"actual":[1,[0,2],[-2]],"check":"explicit oracle 6","expected":[1,[0,2],[-2]],"passed":true},{"actual":[1,[-4,-2],[-6]],"check":"explicit oracle 7","expected":[1,[-4,-2],[-6]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, [-2, 2], [-6]], \"expected\": [1, [-2, 2], [-6]], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [4, [0, 4], [-8]], \"expected\": [4, [0, 4], [-8]], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [2, [2], []], \"expected\": [2, [2], []], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [1, [-6, -2], [-14]], \"expected\": [1, [-6, -2], [-14]], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [4, [-8, -4], [-24]], \"expected\": [4, [-8, -4], [-24]], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [4, [2, 4], [-6]], \"expected\": [4, [2, 4], [-6]], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [1, [0, 2], [-2]], \"expected\": [1, [0, 2], [-2]], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [1, [-4, -2], [-6]], \"expected\": [1, [-4, -2], [-6]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}