{"abstract":"The exact binary polynomial division result violates the stated contract at carryless leading cancellation.","category":"Numerics","checks":8,"contract":"Input [a,b] integer bitmasks for F2 polynomials with b>0; return [quotient,remainder] of carryless division. Bounds: a,b<2^32.","evaluation_group":"s3-numerics-binary-polynomial-division","failed_approach":"The partial repair a^(b>>shift) still violates the carryless leading cancellation invariant.","family":"s3-numerics-binary-polynomial-division-carryless-leading-cancellation","id":"FA-15631","implementations":{"attempt":{"sha256":"dc8be2214c00d2107b2972a7be29b17094c54185b1adead9fd590f496f1a6513","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;q=0\n    for _ in range(40):\n     if a.bit_length()<b.bit_length():break\n     shift=a.bit_length()-b.bit_length()\n     if shift<0:return None\n     q=q^(1<<shift)\n     a=a^(b>>shift)\n    return [q,a]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 3], [1, 1]), ([2, 1], [2, 0]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([0, 2], [0, 0]), ([0, 3], [0, 0]), ([0, 4], [0, 0]), ([0, 5], [0, 0])], [([4, 3], [3, 1]), ([4, 2], [2, 0]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([0, 18], [0, 0]), ([0, 19], [0, 0]), ([0, 20], [0, 0]), ([0, 21], [0, 0])], [([4, 5], [1, 1]), ([5, 2], [2, 1]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([1, 4], [0, 1]), ([1, 5], [0, 1]), ([1, 6], [0, 1]), ([1, 7], [0, 1])], [([4, 6], [1, 2]), ([6, 2], [3, 0]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([1, 21], [0, 1]), ([1, 22], [0, 1]), ([1, 23], [0, 1]), ([1, 24], [0, 1])], [([4, 7], [1, 3]), ([7, 2], [3, 1]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([2, 7], [0, 2]), ([2, 8], [0, 2]), ([2, 9], [0, 2]), ([2, 10], [0, 2])]]\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":"80796fb245bf84e9add4d7e0637bfc412e1f1e9c75df6898b5ddcb90b4230c3f","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;q=0\n    for _ in range(40):\n     if a.bit_length()<b.bit_length():break\n     shift=a.bit_length()-b.bit_length()\n     if shift<0:return None\n     q=q^(1<<shift)\n     a=a-(b<<shift)\n    return [q,a]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 3], [1, 1]), ([2, 1], [2, 0]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([0, 2], [0, 0]), ([0, 3], [0, 0]), ([0, 4], [0, 0]), ([0, 5], [0, 0])], [([4, 3], [3, 1]), ([4, 2], [2, 0]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([0, 18], [0, 0]), ([0, 19], [0, 0]), ([0, 20], [0, 0]), ([0, 21], [0, 0])], [([4, 5], [1, 1]), ([5, 2], [2, 1]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([1, 4], [0, 1]), ([1, 5], [0, 1]), ([1, 6], [0, 1]), ([1, 7], [0, 1])], [([4, 6], [1, 2]), ([6, 2], [3, 0]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([1, 21], [0, 1]), ([1, 22], [0, 1]), ([1, 23], [0, 1]), ([1, 24], [0, 1])], [([4, 7], [1, 3]), ([7, 2], [3, 1]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([2, 7], [0, 2]), ([2, 8], [0, 2]), ([2, 9], [0, 2]), ([2, 10], [0, 2])]]\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":"060822c7d3e390ad88c6c4dbdde3c108979b99660e92feda0a485d31d37eaa20","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;q=0\n    for _ in range(40):\n     if a.bit_length()<b.bit_length():break\n     shift=a.bit_length()-b.bit_length()\n     if shift<0:return None\n     q=q^(1<<shift)\n     a=a^(b<<shift)\n    return [q,a]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 3], [1, 1]), ([2, 1], [2, 0]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([0, 2], [0, 0]), ([0, 3], [0, 0]), ([0, 4], [0, 0]), ([0, 5], [0, 0])], [([4, 3], [3, 1]), ([4, 2], [2, 0]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([0, 18], [0, 0]), ([0, 19], [0, 0]), ([0, 20], [0, 0]), ([0, 21], [0, 0])], [([4, 5], [1, 1]), ([5, 2], [2, 1]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([1, 4], [0, 1]), ([1, 5], [0, 1]), ([1, 6], [0, 1]), ([1, 7], [0, 1])], [([4, 6], [1, 2]), ([6, 2], [3, 0]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([1, 21], [0, 1]), ([1, 22], [0, 1]), ([1, 23], [0, 1]), ([1, 24], [0, 1])], [([4, 7], [1, 3]), ([7, 2], [3, 1]), ([0, 1], [0, 0]), ([127, 31], [4, 3]), ([2, 7], [0, 2]), ([2, 8], [0, 2]), ([2, 9], [0, 2]), ([2, 10], [0, 2])]]\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-binary-polynomial-division-carryless-leading-cancellation","generated_at":"2026-09-29T14:39:28.733780+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 a^(b<<shift) at the carryless leading cancellation step.","root_cause":"The carryless leading cancellation step uses a-(b<<shift) instead of a^(b<<shift).","sha256":"d72eb8af69821239529b6c424d652f676954418073d9105e1fe6ad089d07f1a6","title":"Binary polynomial division: carryless leading cancellation · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.27,"exit_code":1,"observations":[{"actual":[1,1],"check":"explicit oracle 0","expected":[1,1],"passed":true},{"actual":[0,2],"check":"explicit oracle 1","expected":[2,0],"passed":false},{"actual":[0,0],"check":"explicit oracle 2","expected":[0,0],"passed":true},{"actual":[0,127],"check":"explicit oracle 3","expected":[4,3],"passed":false},{"actual":[0,0],"check":"explicit oracle 4","expected":[0,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 5","expected":[0,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 6","expected":[0,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 7","expected":[0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [0, 2], \"expected\": [2, 0], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [0, 127], \"expected\": [4, 3], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.683,"exit_code":1,"observations":[{"actual":[1,-1],"check":"explicit oracle 0","expected":[1,1],"passed":false},{"actual":[2,0],"check":"explicit oracle 1","expected":[2,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 2","expected":[0,0],"passed":true},{"actual":[4,3],"check":"explicit oracle 3","expected":[4,3],"passed":true},{"actual":[0,0],"check":"explicit oracle 4","expected":[0,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 5","expected":[0,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 6","expected":[0,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 7","expected":[0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, -1], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [2, 0], \"expected\": [2, 0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [4, 3], \"expected\": [4, 3], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.676,"exit_code":0,"observations":[{"actual":[1,1],"check":"explicit oracle 0","expected":[1,1],"passed":true},{"actual":[2,0],"check":"explicit oracle 1","expected":[2,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 2","expected":[0,0],"passed":true},{"actual":[4,3],"check":"explicit oracle 3","expected":[4,3],"passed":true},{"actual":[0,0],"check":"explicit oracle 4","expected":[0,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 5","expected":[0,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 6","expected":[0,0],"passed":true},{"actual":[0,0],"check":"explicit oracle 7","expected":[0,0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [2, 0], \"expected\": [2, 0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [4, 3], \"expected\": [4, 3], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}