{"abstract":"The exact integer polynomial pseudodivision result violates the stated contract at pseudo quotient insertion.","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 q[k]-c still violates the pseudo quotient insertion invariant.","family":"s3-numerics-integer-polynomial-pseudodivision-pseudo-quotient-insertion","id":"FA-14801","implementations":{"attempt":{"sha256":"73c8bb7fb0bec93e480c854fd2553f3c1ad675c2cdb7f9fa0b8b979ad6a266f6","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, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -2], [-2, -1]], [1, [-2, 2], [-6]]), ([[-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, [-2, 2], [-6]]), ([[-2, -2, -2], [-2, 2]], [4, [-8, -4], [-24]]), ([[-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], [-1, 1]], [1, [-4, -2], [-6]]), ([[-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, -1]], [1, [2, 2], [-2]]), ([[-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, -2]], [4, [6, 4], [-14]]), ([[-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":"6c7af61f8094a191fd44f168056809830c7632976a8bcfc7628acce42b4b36b2","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]+b*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, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -2], [-2, -1]], [1, [-2, 2], [-6]]), ([[-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, [-2, 2], [-6]]), ([[-2, -2, -2], [-2, 2]], [4, [-8, -4], [-24]]), ([[-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], [-1, 1]], [1, [-4, -2], [-6]]), ([[-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, -1]], [1, [2, 2], [-2]]), ([[-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, -2]], [4, [6, 4], [-14]]), ([[-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":"ec7522d7fa625bf37f9e0552f957566ff25dbc6c65a7b9230ae40374a0cb4445","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, -2]], [4, [0, 4], [-8]]), ([[2, 2], [2, 2]], [2, [2], []]), ([[-2, -2, -2], [-2, -1]], [1, [-2, 2], [-6]]), ([[-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, [-2, 2], [-6]]), ([[-2, -2, -2], [-2, 2]], [4, [-8, -4], [-24]]), ([[-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], [-1, 1]], [1, [-4, -2], [-6]]), ([[-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, -1]], [1, [2, 2], [-2]]), ([[-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, -2]], [4, [6, 4], [-14]]), ([[-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-pseudo-quotient-insertion","generated_at":"2026-09-29T14:39:20.505093+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 q[k]+c at the pseudo quotient insertion step.","root_cause":"The pseudo quotient insertion step uses q[k]+b*c instead of q[k]+c.","sha256":"f778544c818da8e964f66fab44e07efa592aeac0b2a710006cc2769877011905","title":"Integer polynomial pseudodivision: pseudo quotient insertion · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.186,"exit_code":1,"observations":[{"actual":[4,[0,-4],[-8]],"check":"explicit oracle 0","expected":[4,[0,4],[-8]],"passed":false},{"actual":[2,[-2],[]],"check":"explicit oracle 1","expected":[2,[2],[]],"passed":false},{"actual":[1,[2,-2],[-6]],"check":"explicit oracle 2","expected":[1,[-2,2],[-6]],"passed":false},{"actual":[1,[6,2],[-14]],"check":"explicit oracle 3","expected":[1,[-6,-2],[-14]],"passed":false},{"actual":[4,[8,4],[-24]],"check":"explicit oracle 4","expected":[4,[-8,-4],[-24]],"passed":false},{"actual":[4,[-2,-4],[-6]],"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":false},{"actual":[1,[4,2],[-6]],"check":"explicit oracle 7","expected":[1,[-4,-2],[-6]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [4, [0, -4], [-8]], \"expected\": [4, [0, 4], [-8]], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [2, [-2], []], \"expected\": [2, [2], []], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [1, [2, -2], [-6]], \"expected\": [1, [-2, 2], [-6]], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [1, [6, 2], [-14]], \"expected\": [1, [-6, -2], [-14]], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [4, [8, 4], [-24]], \"expected\": [4, [-8, -4], [-24]], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [4, [-2, -4], [-6]], \"expected\": [4, [2, 4], [-6]], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [1, [0, -2], [-2]], \"expected\": [1, [0, 2], [-2]], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [1, [4, 2], [-6]], \"expected\": [1, [-4, -2], [-6]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.401,"exit_code":1,"observations":[{"actual":[4,[0,-8],[-8]],"check":"explicit oracle 0","expected":[4,[0,4],[-8]],"passed":false},{"actual":[2,[4],[]],"check":"explicit oracle 1","expected":[2,[2],[]],"passed":false},{"actual":[1,[2,-2],[-6]],"check":"explicit oracle 2","expected":[1,[-2,2],[-6]],"passed":false},{"actual":[1,[-6,-2],[-14]],"check":"explicit oracle 3","expected":[1,[-6,-2],[-14]],"passed":true},{"actual":[4,[-16,-8],[-24]],"check":"explicit oracle 4","expected":[4,[-8,-4],[-24]],"passed":false},{"actual":[4,[-4,-8],[-6]],"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":false},{"actual":[1,[-4,-2],[-6]],"check":"explicit oracle 7","expected":[1,[-4,-2],[-6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [4, [0, -8], [-8]], \"expected\": [4, [0, 4], [-8]], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [2, [4], []], \"expected\": [2, [2], []], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [1, [2, -2], [-6]], \"expected\": [1, [-2, 2], [-6]], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [1, [-6, -2], [-14]], \"expected\": [1, [-6, -2], [-14]], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [4, [-16, -8], [-24]], \"expected\": [4, [-8, -4], [-24]], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [4, [-4, -8], [-6]], \"expected\": [4, [2, 4], [-6]], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [1, [0, -2], [-2]], \"expected\": [1, [0, 2], [-2]], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [1, [-4, -2], [-6]], \"expected\": [1, [-4, -2], [-6]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.706,"exit_code":0,"observations":[{"actual":[4,[0,4],[-8]],"check":"explicit oracle 0","expected":[4,[0,4],[-8]],"passed":true},{"actual":[2,[2],[]],"check":"explicit oracle 1","expected":[2,[2],[]],"passed":true},{"actual":[1,[-2,2],[-6]],"check":"explicit oracle 2","expected":[1,[-2,2],[-6]],"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\": [4, [0, 4], [-8]], \"expected\": [4, [0, 4], [-8]], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [2, [2], []], \"expected\": [2, [2], []], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [1, [-2, 2], [-6]], \"expected\": [1, [-2, 2], [-6]], \"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"}