{"abstract":"The exact binary field inversion result violates the stated contract at Euclidean polynomial cancellation.","category":"Numerics","checks":8,"contract":"Input [a,irreducible bitmask], a nonzero with degree below modulus; return multiplicative inverse in binary field. Bounds: modulus degree is between two and six.","contract_signature":"x","evaluation_group":"s3-numerics-binary-field-inversion","failed_approach":"The partial repair u-(v<<j) still violates the Euclidean polynomial cancellation invariant.","family":"s3-numerics-binary-field-inversion-Euclidean-polynomial-cancellation","id":"FA-15651","implementations":{"attempt":{"sha256":"2d4e8e424d7d18fc54e7c2f85128ae709faac2dd3542a4d88eff37b32412e4aa","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,p=x;u=a;v=p;g1=1;g2=0\n    for _ in range(60):\n     if u==1:break\n     if u==0:return None\n     j=u.bit_length()-v.bit_length()\n     if j<0:\n      u,v=v,u;g1,g2=g2,g1;j=-j\n     u=u-(v<<j)\n     g1=g1^(g2<<j)\n    for _ in range(60):\n     if g1.bit_length()<p.bit_length():break\n     g1=g1^(p<<(g1.bit_length()-p.bit_length()))\n    return g1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 7], 3), ([3, 11], 6), ([1, 7], 1), ([63, 67], 32), ([3, 7], 2), ([1, 11], 1), ([2, 11], 5), ([4, 11], 7)], [([3, 7], 2), ([3, 19], 14), ([1, 7], 1), ([63, 67], 32), ([8, 19], 15), ([9, 19], 2), ([10, 19], 12), ([11, 19], 5)], [([2, 11], 5), ([6, 19], 7), ([1, 7], 1), ([63, 67], 32), ([10, 25], 11), ([11, 25], 10), ([12, 25], 2), ([13, 25], 9)], [([3, 11], 6), ([10, 19], 12), ([1, 7], 1), ([63, 67], 32), ([12, 31], 13), ([13, 31], 12), ([14, 31], 11), ([15, 31], 2)], [([4, 11], 7), ([14, 19], 3), ([1, 7], 1), ([63, 67], 32), ([14, 37], 6), ([15, 37], 13), ([16, 37], 11), ([17, 37], 24)]]\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":"76ca606a849f83fe9fa5360e8d1df3ff079d23008d5c885a8b8ffdb97a30c03f","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,p=x;u=a;v=p;g1=1;g2=0\n    for _ in range(60):\n     if u==1:break\n     if u==0:return None\n     j=u.bit_length()-v.bit_length()\n     if j<0:\n      u,v=v,u;g1,g2=g2,g1;j=-j\n     u=u^(v>>j)\n     g1=g1^(g2<<j)\n    for _ in range(60):\n     if g1.bit_length()<p.bit_length():break\n     g1=g1^(p<<(g1.bit_length()-p.bit_length()))\n    return g1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 7], 3), ([3, 11], 6), ([1, 7], 1), ([63, 67], 32), ([3, 7], 2), ([1, 11], 1), ([2, 11], 5), ([4, 11], 7)], [([3, 7], 2), ([3, 19], 14), ([1, 7], 1), ([63, 67], 32), ([8, 19], 15), ([9, 19], 2), ([10, 19], 12), ([11, 19], 5)], [([2, 11], 5), ([6, 19], 7), ([1, 7], 1), ([63, 67], 32), ([10, 25], 11), ([11, 25], 10), ([12, 25], 2), ([13, 25], 9)], [([3, 11], 6), ([10, 19], 12), ([1, 7], 1), ([63, 67], 32), ([12, 31], 13), ([13, 31], 12), ([14, 31], 11), ([15, 31], 2)], [([4, 11], 7), ([14, 19], 3), ([1, 7], 1), ([63, 67], 32), ([14, 37], 6), ([15, 37], 13), ([16, 37], 11), ([17, 37], 24)]]\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-field-inversion-Euclidean-polynomial-cancellation","generated_at":"2026-09-29T14:39:28.776869+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.","root_cause":"The Euclidean polynomial cancellation step uses u^(v>>j) instead of u^(v<<j).","sha256":"3064a13bb463f38ab63631a99be5f268760120d5b8233aa08665106019d03b45","title":"Binary field inversion: Euclidean polynomial cancellation · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.419,"exit_code":1,"observations":[{"actual":3,"check":"explicit oracle 0","expected":3,"passed":true},{"actual":3,"check":"explicit oracle 1","expected":6,"passed":false},{"actual":1,"check":"explicit oracle 2","expected":1,"passed":true},{"actual":22,"check":"explicit oracle 3","expected":32,"passed":false},{"actual":2,"check":"explicit oracle 4","expected":2,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":5,"check":"explicit oracle 6","expected":5,"passed":true},{"actual":3,"check":"explicit oracle 7","expected":7,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": 3, \"expected\": 6, \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 22, \"expected\": 32, \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 3, \"expected\": 7, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.618,"exit_code":1,"observations":[{"actual":0,"check":"explicit oracle 0","expected":3,"passed":false},{"actual":0,"check":"explicit oracle 1","expected":6,"passed":false},{"actual":1,"check":"explicit oracle 2","expected":1,"passed":true},{"actual":0,"check":"explicit oracle 3","expected":32,"passed":false},{"actual":0,"check":"explicit oracle 4","expected":2,"passed":false},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":0,"check":"explicit oracle 6","expected":5,"passed":false},{"actual":0,"check":"explicit oracle 7","expected":7,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 0, \"expected\": 3, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 0, \"expected\": 6, \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 0, \"expected\": 32, \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": 0, \"expected\": 2, \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 0, \"expected\": 5, \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": 0, \"expected\": 7, \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}