{"abstract":"The exact forward difference newton basis result violates the stated contract at difference orientation.","category":"Numerics","checks":8,"contract":"Input nonempty integer sequence f(0)..f(n); return binomial-basis coefficients Delta^k f(0).","evaluation_group":"s3-numerics-forward-difference-newton-basis","failed_approach":"The partial repair row[i+1]+row[i] still violates the difference orientation invariant.","family":"s3-numerics-forward-difference-newton-basis-difference-orientation","id":"FA-14726","implementations":{"attempt":{"sha256":"0faea2cad593ac933cbcb87a21b62c7e1ab1b6389301c37e95aa079669dcf54a","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    row=x[:];out=[]\n    for _ in range(len(x)):\n     if not row:break\n     out.append(row[0])\n     row=[row[i+1]+row[i] for i in range(len(row)-1)]\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-1, 0], [-1, 1]), ([-1, -1], [-1, 0]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([0], [0]), ([1], [1]), ([-1, 1], [-1, 2]), ([0, -1], [0, -1])], [([-1, 1], [-1, 2]), ([1, -1], [1, -2]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([-1, 0, 1], [-1, 1, 0]), ([-1, 1, -1], [-1, 2, -4]), ([-1, 1, 0], [-1, 2, -3]), ([-1, 1, 1], [-1, 2, -2])], [([0, -1], [0, -1]), ([-1, -1, -1], [-1, 0, 0]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([1, 0, 0], [1, -1, 1]), ([1, 0, 1], [1, -1, 2]), ([1, 1, -1], [1, 0, -2]), ([1, 1, 0], [1, 0, -1])], [([0, 1], [0, 1]), ([-1, 0, -1], [-1, 1, -2]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([-1, 0, 0, -1], [-1, 1, -1, 0]), ([-1, 0, 0, 0], [-1, 1, -1, 1]), ([-1, 0, 0, 1], [-1, 1, -1, 2]), ([-1, 0, 1, -1], [-1, 1, 0, -3])], [([1, -1], [1, -2]), ([-1, 1, -1], [-1, 2, -4]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([0, -1, -1, 1], [0, -1, 1, 1]), ([0, -1, 0, -1], [0, -1, 2, -4]), ([0, -1, 0, 0], [0, -1, 2, -3]), ([0, -1, 0, 1], [0, -1, 2, -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":"3c78a4140433df1bf331aa15be666fa674c5d614392eeab91034b997c46e5624","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    row=x[:];out=[]\n    for _ in range(len(x)):\n     if not row:break\n     out.append(row[0])\n     row=[row[i]-row[i+1] for i in range(len(row)-1)]\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-1, 0], [-1, 1]), ([-1, -1], [-1, 0]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([0], [0]), ([1], [1]), ([-1, 1], [-1, 2]), ([0, -1], [0, -1])], [([-1, 1], [-1, 2]), ([1, -1], [1, -2]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([-1, 0, 1], [-1, 1, 0]), ([-1, 1, -1], [-1, 2, -4]), ([-1, 1, 0], [-1, 2, -3]), ([-1, 1, 1], [-1, 2, -2])], [([0, -1], [0, -1]), ([-1, -1, -1], [-1, 0, 0]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([1, 0, 0], [1, -1, 1]), ([1, 0, 1], [1, -1, 2]), ([1, 1, -1], [1, 0, -2]), ([1, 1, 0], [1, 0, -1])], [([0, 1], [0, 1]), ([-1, 0, -1], [-1, 1, -2]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([-1, 0, 0, -1], [-1, 1, -1, 0]), ([-1, 0, 0, 0], [-1, 1, -1, 1]), ([-1, 0, 0, 1], [-1, 1, -1, 2]), ([-1, 0, 1, -1], [-1, 1, 0, -3])], [([1, -1], [1, -2]), ([-1, 1, -1], [-1, 2, -4]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([0, -1, -1, 1], [0, -1, 1, 1]), ([0, -1, 0, -1], [0, -1, 2, -4]), ([0, -1, 0, 0], [0, -1, 2, -3]), ([0, -1, 0, 1], [0, -1, 2, -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":"89eaa579d5a72df810392ae05740af714aadfe7fdd12322b8c1902f2e47ea3ff","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    row=x[:];out=[]\n    for _ in range(len(x)):\n     if not row:break\n     out.append(row[0])\n     row=[row[i+1]-row[i] for i in range(len(row)-1)]\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-1, 0], [-1, 1]), ([-1, -1], [-1, 0]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([0], [0]), ([1], [1]), ([-1, 1], [-1, 2]), ([0, -1], [0, -1])], [([-1, 1], [-1, 2]), ([1, -1], [1, -2]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([-1, 0, 1], [-1, 1, 0]), ([-1, 1, -1], [-1, 2, -4]), ([-1, 1, 0], [-1, 2, -3]), ([-1, 1, 1], [-1, 2, -2])], [([0, -1], [0, -1]), ([-1, -1, -1], [-1, 0, 0]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([1, 0, 0], [1, -1, 1]), ([1, 0, 1], [1, -1, 2]), ([1, 1, -1], [1, 0, -2]), ([1, 1, 0], [1, 0, -1])], [([0, 1], [0, 1]), ([-1, 0, -1], [-1, 1, -2]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([-1, 0, 0, -1], [-1, 1, -1, 0]), ([-1, 0, 0, 0], [-1, 1, -1, 1]), ([-1, 0, 0, 1], [-1, 1, -1, 2]), ([-1, 0, 1, -1], [-1, 1, 0, -3])], [([1, -1], [1, -2]), ([-1, 1, -1], [-1, 2, -4]), ([-1], [-1]), ([1, 1, 1, 1, 1], [1, 0, 0, 0, 0]), ([0, -1, -1, 1], [0, -1, 1, 1]), ([0, -1, 0, -1], [0, -1, 2, -4]), ([0, -1, 0, 0], [0, -1, 2, -3]), ([0, -1, 0, 1], [0, -1, 2, -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-forward-difference-newton-basis-difference-orientation","generated_at":"2026-09-29T14:39:19.786040+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 row[i+1]-row[i] at the difference orientation step.","root_cause":"The difference orientation step uses row[i]-row[i+1] instead of row[i+1]-row[i].","sha256":"e273e93061baa6c9eecd0df888dabb7265aaf1450f5b63500ee1ac62bd0b85a0","title":"Forward difference newton basis: difference orientation · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.989,"exit_code":1,"observations":[{"actual":[-1,-1],"check":"explicit oracle 0","expected":[-1,1],"passed":false},{"actual":[-1,-2],"check":"explicit oracle 1","expected":[-1,0],"passed":false},{"actual":[-1],"check":"explicit oracle 2","expected":[-1],"passed":true},{"actual":[1,2,4,8,16],"check":"explicit oracle 3","expected":[1,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":[-1,0],"check":"explicit oracle 6","expected":[-1,2],"passed":false},{"actual":[0,-1],"check":"explicit oracle 7","expected":[0,-1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-1, -1], \"expected\": [-1, 1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [-1, -2], \"expected\": [-1, 0], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [1, 2, 4, 8, 16], \"expected\": [1, 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\": [-1, 0], \"expected\": [-1, 2], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [0, -1], \"expected\": [0, -1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.942,"exit_code":1,"observations":[{"actual":[-1,-1],"check":"explicit oracle 0","expected":[-1,1],"passed":false},{"actual":[-1,0],"check":"explicit oracle 1","expected":[-1,0],"passed":true},{"actual":[-1],"check":"explicit oracle 2","expected":[-1],"passed":true},{"actual":[1,0,0,0,0],"check":"explicit oracle 3","expected":[1,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":[-1,-2],"check":"explicit oracle 6","expected":[-1,2],"passed":false},{"actual":[0,1],"check":"explicit oracle 7","expected":[0,-1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-1, -1], \"expected\": [-1, 1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [-1, 0], \"expected\": [-1, 0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [1, 0, 0, 0, 0], \"expected\": [1, 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\": [-1, -2], \"expected\": [-1, 2], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 1], \"expected\": [0, -1], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.13,"exit_code":0,"observations":[{"actual":[-1,1],"check":"explicit oracle 0","expected":[-1,1],"passed":true},{"actual":[-1,0],"check":"explicit oracle 1","expected":[-1,0],"passed":true},{"actual":[-1],"check":"explicit oracle 2","expected":[-1],"passed":true},{"actual":[1,0,0,0,0],"check":"explicit oracle 3","expected":[1,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":[-1,2],"check":"explicit oracle 6","expected":[-1,2],"passed":true},{"actual":[0,-1],"check":"explicit oracle 7","expected":[0,-1],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [-1, 1], \"expected\": [-1, 1], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [-1, 0], \"expected\": [-1, 0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [-1], \"expected\": [-1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [1, 0, 0, 0, 0], \"expected\": [1, 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\": [-1, 2], \"expected\": [-1, 2], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0, -1], \"expected\": [0, -1], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}