{"abstract":"The exact polynomial squarefree characteristic p result violates the stated contract at formal derivative in finite characteristic.","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.","evaluation_group":"s3-numerics-polynomial-squarefree-characteristic-p","failed_approach":"The partial repair [(i*f[i]) for i in range(1,len(f))] still violates the formal derivative in finite characteristic invariant.","family":"s3-numerics-polynomial-squarefree-characteristic-p-formal-derivative-in-finite-characteristic","id":"FA-14816","implementations":{"attempt":{"sha256":"9a86c6e574a393ebc4678bce900119791620582c14310fadb44ec2517bf625e2","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]) 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]*pow(g[-1],-1,p)%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], 2], True), ([[0, 0, 1], 2], False), ([[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)], [([[1, 0, 1], 2], False), ([[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), ([[2, 1, 2], 2], True)], [([[1, 2, 1], 2], False), ([[2, 0, 1], 2], False), ([[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, 1, 1], 2], True), ([[0, 0, 1, 2], 2], False), ([[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)], [([[0, 1, 1, 1], 2], True), ([[1, 0, 1, 2], 2], False), ([[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":"7f4a15051ea987bfd043c1634eac59a4909f84548c9ddeadba54c1a3ac9af86c","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=[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]*pow(g[-1],-1,p)%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], 2], True), ([[0, 0, 1], 2], False), ([[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)], [([[1, 0, 1], 2], False), ([[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), ([[2, 1, 2], 2], True)], [([[1, 2, 1], 2], False), ([[2, 0, 1], 2], False), ([[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, 1, 1], 2], True), ([[0, 0, 1, 2], 2], False), ([[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)], [([[0, 1, 1, 1], 2], True), ([[1, 0, 1, 2], 2], False), ([[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"},"fixed":{"sha256":"cae5f93268cb19815f5e08153a7d8a7e9ea75907dbc3b283b9edb48bd8ec05c8","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]*pow(g[-1],-1,p)%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], 2], True), ([[0, 0, 1], 2], False), ([[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)], [([[1, 0, 1], 2], False), ([[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), ([[2, 1, 2], 2], True)], [([[1, 2, 1], 2], False), ([[2, 0, 1], 2], False), ([[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, 1, 1], 2], True), ([[0, 0, 1, 2], 2], False), ([[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)], [([[0, 1, 1, 1], 2], True), ([[1, 0, 1, 2], 2], False), ([[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-formal-derivative-in-finite-characteristic","generated_at":"2026-09-29T14:39:20.553560+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 [(i*f[i])%p for i in range(1,len(f))] at the formal derivative in finite characteristic step.","root_cause":"The formal derivative in finite characteristic step uses [f[i]%p for i in range(1,len(f))] instead of [(i*f[i])%p for i in range(1,len(f))].","sha256":"99320fedc445ec8e2b23b7f1c33244d8be03ba8907adfdd309211e86c65201f3","title":"Polynomial squarefree characteristic p: formal derivative in finite characteristic · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.848,"exit_code":1,"observations":[{"actual":null,"check":"explicit oracle 0","expected":true,"passed":false},{"actual":null,"check":"explicit oracle 1","expected":false,"passed":false},{"actual":true,"check":"explicit oracle 2","expected":true,"passed":true},{"actual":true,"check":"explicit oracle 3","expected":true,"passed":true},{"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\": null, \"expected\": true, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": null, \"expected\": false, \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"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":45.684,"exit_code":1,"observations":[{"actual":false,"check":"explicit oracle 0","expected":true,"passed":false},{"actual":false,"check":"explicit oracle 1","expected":false,"passed":true},{"actual":true,"check":"explicit oracle 2","expected":true,"passed":true},{"actual":true,"check":"explicit oracle 3","expected":true,"passed":true},{"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\": false, \"expected\": false, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"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"},"fixed":{"elapsed_ms":40.171,"exit_code":0,"observations":[{"actual":true,"check":"explicit oracle 0","expected":true,"passed":true},{"actual":false,"check":"explicit oracle 1","expected":false,"passed":true},{"actual":true,"check":"explicit oracle 2","expected":true,"passed":true},{"actual":true,"check":"explicit oracle 3","expected":true,"passed":true},{"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":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"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\": true}\n"}},"verified":true,"visibility":"public"}