{"abstract":"The exact polynomial squarefree characteristic p result violates the stated contract at field leading cancellation.","category":"Numerics","checks":8,"contract":"Input [coefficients,p] prime p; return whether nonconstant polynomial over Fp has gcd(f,fprime)=1; constants false. Bounds: degree at most three and prime p<=7.","contract_signature":"x","evaluation_group":"s3-numerics-polynomial-squarefree-characteristic-p","failed_approach":"The partial repair r[-1]*g[-1]%p still violates the field leading cancellation invariant.","family":"s3-numerics-polynomial-squarefree-characteristic-p-field-leading-cancellation","id":"FA-14821","implementations":{"attempt":{"sha256":"4b710f0a4d9811b36bf09cef173545cad8de5d537794e5bfaae7e30f3fbd4705","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\n    f=[v%p for v in a]\n    while f and f[-1]==0:f.pop()\n    if len(f)<2:return False\n    g=[(i*f[i])%p for i in range(1,len(f))]\n    while g and g[-1]==0:g.pop()\n    for _ in range(20):\n     if not g:break\n     r=f[:]\n     for _ in range(20):\n      if len(r)<len(g):break\n      if g[-1]%p==0:return None\n      c=r[-1]*g[-1]%p\n      k=len(r)-len(g)\n      for j in range(len(g)):r[j+k]=(r[j+k]-c*g[j])%p\n      while r and r[-1]==0:r.pop()\n     f,g=g,r\n    return len(f)==1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[0, 1, 1], 3], True), ([[0, 2], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[0, 2], 2], False), ([[1, 1], 2], True), ([[1, 2], 2], False), ([[2, 1], 2], True)], [([[0, 2, 1], 3], True), ([[0, 1, 1], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[1, 2, 2], 2], False), ([[2, 0, 1], 2], False), ([[2, 0, 2], 2], False), ([[2, 1, 1], 2], True)], [([[1, 0, 1], 3], True), ([[1, 1, 1], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[0, 1, 2, 1], 2], False), ([[0, 1, 2, 2], 2], True), ([[0, 2, 0, 1], 2], False), ([[0, 2, 0, 2], 2], False)], [([[2, 0, 1], 3], True), ([[2, 2, 1], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[1, 1, 1, 2], 2], True), ([[1, 1, 2, 1], 2], True), ([[1, 1, 2, 2], 2], True), ([[1, 2, 0, 1], 2], True)], [([[2, 1, 1], 3], True), ([[0, 1, 2, 2], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[2, 1, 1, 1], 2], True), ([[2, 1, 1, 2], 2], True), ([[2, 1, 2, 1], 2], False), ([[2, 1, 2, 2], 2], True)]]\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":"61ae6d506a31104d32ae01c88522356ab7e937f9a6139da19122848a34007fd1","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\n    f=[v%p for v in a]\n    while f and f[-1]==0:f.pop()\n    if len(f)<2:return False\n    g=[(i*f[i])%p for i in range(1,len(f))]\n    while g and g[-1]==0:g.pop()\n    for _ in range(20):\n     if not g:break\n     r=f[:]\n     for _ in range(20):\n      if len(r)<len(g):break\n      if g[-1]%p==0:return None\n      c=r[-1]//g[-1]\n      k=len(r)-len(g)\n      for j in range(len(g)):r[j+k]=(r[j+k]-c*g[j])%p\n      while r and r[-1]==0:r.pop()\n     f,g=g,r\n    return len(f)==1\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[0, 1, 1], 3], True), ([[0, 2], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[0, 2], 2], False), ([[1, 1], 2], True), ([[1, 2], 2], False), ([[2, 1], 2], True)], [([[0, 2, 1], 3], True), ([[0, 1, 1], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[1, 2, 2], 2], False), ([[2, 0, 1], 2], False), ([[2, 0, 2], 2], False), ([[2, 1, 1], 2], True)], [([[1, 0, 1], 3], True), ([[1, 1, 1], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[0, 1, 2, 1], 2], False), ([[0, 1, 2, 2], 2], True), ([[0, 2, 0, 1], 2], False), ([[0, 2, 0, 2], 2], False)], [([[2, 0, 1], 3], True), ([[2, 2, 1], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[1, 1, 1, 2], 2], True), ([[1, 1, 2, 1], 2], True), ([[1, 1, 2, 2], 2], True), ([[1, 2, 0, 1], 2], True)], [([[2, 1, 1], 3], True), ([[0, 1, 2, 2], 5], True), ([[0, 1], 2], True), ([[2, 2, 2, 2], 7], True), ([[2, 1, 1, 1], 2], True), ([[2, 1, 1, 2], 2], True), ([[2, 1, 2, 1], 2], False), ([[2, 1, 2, 2], 2], True)]]\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-squarefree-characteristic-p-field-leading-cancellation","generated_at":"2026-09-29T14:39:20.650002+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 field leading cancellation step uses r[-1]//g[-1] instead of r[-1]*pow(g[-1],-1,p)%p.","sha256":"ac1f8bf905761c13aad1296842023e6be29d104612cfa1d683ba43a8f29cce69","title":"Polynomial squarefree characteristic p: field leading 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":46.398,"exit_code":1,"observations":[{"actual":true,"check":"explicit oracle 0","expected":true,"passed":true},{"actual":false,"check":"explicit oracle 1","expected":true,"passed":false},{"actual":true,"check":"explicit oracle 2","expected":true,"passed":true},{"actual":false,"check":"explicit oracle 3","expected":true,"passed":false},{"actual":false,"check":"explicit oracle 4","expected":false,"passed":true},{"actual":true,"check":"explicit oracle 5","expected":true,"passed":true},{"actual":false,"check":"explicit oracle 6","expected":false,"passed":true},{"actual":true,"check":"explicit oracle 7","expected":true,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": true, \"expected\": true, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.046,"exit_code":1,"observations":[{"actual":false,"check":"explicit oracle 0","expected":true,"passed":false},{"actual":true,"check":"explicit oracle 1","expected":true,"passed":true},{"actual":true,"check":"explicit oracle 2","expected":true,"passed":true},{"actual":false,"check":"explicit oracle 3","expected":true,"passed":false},{"actual":false,"check":"explicit oracle 4","expected":false,"passed":true},{"actual":true,"check":"explicit oracle 5","expected":true,"passed":true},{"actual":false,"check":"explicit oracle 6","expected":false,"passed":true},{"actual":true,"check":"explicit oracle 7","expected":true,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": true, \"expected\": true, \"passed\": true}], \"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."}}