{"abstract":"The exact bernstein to power basis result violates the stated contract at complement signed coefficient.","category":"Numerics","checks":8,"contract":"Input Bernstein coefficients b0..bn as integers; return exact ascending power coefficients of sum bi*choose(n,i)*t^i*(1-t)^(n-i).","contract_signature":"x","evaluation_group":"s3-numerics-bernstein-to-power-basis","failed_approach":"The partial repair math.comb(n-i,j)*(-1)**i if j<=n-i else 0 still violates the complement signed coefficient invariant.","family":"s3-numerics-bernstein-to-power-basis-complement-signed-coefficient","id":"FA-14761","implementations":{"attempt":{"sha256":"96ca7cc5699eae1585ccca0c6b077a47021c19cb73544bbdc70b08153d7c4aad","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    b=x;n=len(b)-1;r=[0]*(n+1)\n    for i in range(n+1):\n     for j in range(n-i+1):\n      k=i+j\n      if k<0 or k>n:return None\n      r[k]+=b[i]*(math.comb(n,i)) * (math.comb(n-i,j)*(-1)**i if j<=n-i else 0)\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-1, -1], [-1, 0]), ([-1, 0], [-1, 1]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([0], [0]), ([1], [1]), ([2], [2]), ([-1, 1], [-1, 2])], [([-1, 0], [-1, 1]), ([0, -1], [0, -1]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([2, 0], [2, -2]), ([2, 1], [2, -1]), ([2, 2], [2, 0]), ([-1, -1, -1], [-1, 0, 0])], [([-1, 1], [-1, 2]), ([1, -1], [1, -2]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([-1, 2, 1], [-1, 6, -4]), ([-1, 2, 2], [-1, 6, -3]), ([0, -1, -1], [0, -2, 1]), ([0, -1, 0], [0, -2, 2])], [([-1, 2], [-1, 3]), ([2, -1], [2, -3]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([0, 2, 2], [0, 4, -2]), ([1, -1, -1], [1, -4, 2]), ([1, -1, 0], [1, -4, 3]), ([1, -1, 1], [1, -4, 4])], [([1, -1], [1, -2]), ([-1, 0, -1], [-1, 2, -2]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([2, -1, -1], [2, -6, 3]), ([2, -1, 0], [2, -6, 4]), ([2, -1, 1], [2, -6, 5]), ([2, -1, 2], [2, -6, 6])]]\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":"6062d2bb5ef2d9f22b8650575e61f718991e609ead66de177db32fcde3abc52e","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    b=x;n=len(b)-1;r=[0]*(n+1)\n    for i in range(n+1):\n     for j in range(n-i+1):\n      k=i+j\n      if k<0 or k>n:return None\n      r[k]+=b[i]*(math.comb(n,i)) * (math.comb(n-i,j) if j<=n-i else 0)\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-1, -1], [-1, 0]), ([-1, 0], [-1, 1]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([0], [0]), ([1], [1]), ([2], [2]), ([-1, 1], [-1, 2])], [([-1, 0], [-1, 1]), ([0, -1], [0, -1]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([2, 0], [2, -2]), ([2, 1], [2, -1]), ([2, 2], [2, 0]), ([-1, -1, -1], [-1, 0, 0])], [([-1, 1], [-1, 2]), ([1, -1], [1, -2]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([-1, 2, 1], [-1, 6, -4]), ([-1, 2, 2], [-1, 6, -3]), ([0, -1, -1], [0, -2, 1]), ([0, -1, 0], [0, -2, 2])], [([-1, 2], [-1, 3]), ([2, -1], [2, -3]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([0, 2, 2], [0, 4, -2]), ([1, -1, -1], [1, -4, 2]), ([1, -1, 0], [1, -4, 3]), ([1, -1, 1], [1, -4, 4])], [([1, -1], [1, -2]), ([-1, 0, -1], [-1, 2, -2]), ([-1], [-1]), ([2, 2, 2, 2, 2], [2, 0, 0, 0, 0]), ([2, -1, -1], [2, -6, 3]), ([2, -1, 0], [2, -6, 4]), ([2, -1, 1], [2, -6, 5]), ([2, -1, 2], [2, -6, 6])]]\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-bernstein-to-power-basis-complement-signed-coefficient","generated_at":"2026-09-29T14:39:19.970036+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 complement signed coefficient step uses math.comb(n-i,j) if j<=n-i else 0 instead of math.comb(n-i,j)*(-1)**j if j<=n-i else 0.","sha256":"38e1ff213169de52bf3e3f5303497c679bdc9b2183b8c885bef1c68044d6d508","title":"Bernstein to power basis: complement signed coefficient · 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":44.804,"exit_code":1,"observations":[{"actual":[-1,0],"check":"explicit oracle 0","expected":[-1,0],"passed":true},{"actual":[-1,-1],"check":"explicit oracle 1","expected":[-1,1],"passed":false},{"actual":[-1],"check":"explicit oracle 2","expected":[-1],"passed":true},{"actual":[2,0,0,0,0],"check":"explicit oracle 3","expected":[2,0,0,0,0],"passed":true},{"actual":[0],"check":"explicit oracle 4","expected":[0],"passed":true},{"actual":[1],"check":"explicit oracle 5","expected":[1],"passed":true},{"actual":[2],"check":"explicit oracle 6","expected":[2],"passed":true},{"actual":[-1,-2],"check":"explicit oracle 7","expected":[-1,2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-1, 0], \"expected\": [-1, 0], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [-1, -1], \"expected\": [-1, 1], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [2, 0, 0, 0, 0], \"expected\": [2, 0, 0, 0, 0], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [-1, -2], \"expected\": [-1, 2], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.812,"exit_code":1,"observations":[{"actual":[-1,-2],"check":"explicit oracle 0","expected":[-1,0],"passed":false},{"actual":[-1,-1],"check":"explicit oracle 1","expected":[-1,1],"passed":false},{"actual":[-1],"check":"explicit oracle 2","expected":[-1],"passed":true},{"actual":[2,16,48,64,32],"check":"explicit oracle 3","expected":[2,0,0,0,0],"passed":false},{"actual":[0],"check":"explicit oracle 4","expected":[0],"passed":true},{"actual":[1],"check":"explicit oracle 5","expected":[1],"passed":true},{"actual":[2],"check":"explicit oracle 6","expected":[2],"passed":true},{"actual":[-1,0],"check":"explicit oracle 7","expected":[-1,2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-1, -2], \"expected\": [-1, 0], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [-1, -1], \"expected\": [-1, 1], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [2, 16, 48, 64, 32], \"expected\": [2, 0, 0, 0, 0], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [-1, 0], \"expected\": [-1, 2], \"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."}}