{"abstract":"The exact kummer binomial valuation result violates the stated contract at incoming carry inclusion.","category":"Numerics","checks":8,"contract":"Input [n,k,p], 0<=k<=n p prime; return exponent of p in binomial(n,k) via carries adding k and n-k. Bounds: n<2^39.","evaluation_group":"s3-numerics-kummer-binomial-valuation","failed_approach":"The partial repair a%p+b%p+count still violates the incoming carry inclusion invariant.","family":"s3-numerics-kummer-binomial-valuation-incoming-carry-inclusion","id":"FA-15551","implementations":{"attempt":{"sha256":"b4e184793a6120b53f21d574e1ce194fa1fa4926d521e796e01d3ef34ada4ac8","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    n,k,p=x;a=k;b=n-k;carry=0;count=0\n    for _ in range(40):\n     if a==0 and b==0 and carry==0:break\n     t=a%p+b%p+count\n     carry=int(t>=p)\n     count+=carry\n     a,b=a//p,b//p\n    return count\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([4, 1, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([1, 1, 2], 0), ([2, 0, 2], 0), ([2, 1, 2], 1), ([2, 2, 2], 0), ([3, 0, 2], 0)], [([4, 3, 2], 2), ([6, 3, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([5, 3, 2], 1), ([5, 4, 2], 0), ([5, 5, 2], 0), ([6, 0, 2], 0)], [([8, 1, 2], 3), ([8, 2, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([7, 7, 2], 0), ([8, 0, 2], 0), ([8, 3, 2], 3), ([8, 4, 2], 1)], [([8, 2, 2], 2), ([8, 6, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([9, 7, 2], 2), ([9, 8, 2], 0), ([9, 9, 2], 0), ([10, 0, 2], 0)], [([8, 3, 2], 3), ([9, 3, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([11, 3, 2], 0), ([11, 4, 2], 1), ([11, 5, 2], 1), ([11, 6, 2], 1)]]\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":"1c409a60680e3d23405d8e8796eaf6b6b07104498e625c34259d39a31a27a521","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    n,k,p=x;a=k;b=n-k;carry=0;count=0\n    for _ in range(40):\n     if a==0 and b==0 and carry==0:break\n     t=a%p+b%p\n     carry=int(t>=p)\n     count+=carry\n     a,b=a//p,b//p\n    return count\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([4, 1, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([1, 1, 2], 0), ([2, 0, 2], 0), ([2, 1, 2], 1), ([2, 2, 2], 0), ([3, 0, 2], 0)], [([4, 3, 2], 2), ([6, 3, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([5, 3, 2], 1), ([5, 4, 2], 0), ([5, 5, 2], 0), ([6, 0, 2], 0)], [([8, 1, 2], 3), ([8, 2, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([7, 7, 2], 0), ([8, 0, 2], 0), ([8, 3, 2], 3), ([8, 4, 2], 1)], [([8, 2, 2], 2), ([8, 6, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([9, 7, 2], 2), ([9, 8, 2], 0), ([9, 9, 2], 0), ([10, 0, 2], 0)], [([8, 3, 2], 3), ([9, 3, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([11, 3, 2], 0), ([11, 4, 2], 1), ([11, 5, 2], 1), ([11, 6, 2], 1)]]\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":"201374408ea4beaf35d112a7a469ee68de078cf4321db7111c60f17094abe093","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    n,k,p=x;a=k;b=n-k;carry=0;count=0\n    for _ in range(40):\n     if a==0 and b==0 and carry==0:break\n     t=a%p+b%p+carry\n     carry=int(t>=p)\n     count+=carry\n     a,b=a//p,b//p\n    return count\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([4, 1, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([1, 1, 2], 0), ([2, 0, 2], 0), ([2, 1, 2], 1), ([2, 2, 2], 0), ([3, 0, 2], 0)], [([4, 3, 2], 2), ([6, 3, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([5, 3, 2], 1), ([5, 4, 2], 0), ([5, 5, 2], 0), ([6, 0, 2], 0)], [([8, 1, 2], 3), ([8, 2, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([7, 7, 2], 0), ([8, 0, 2], 0), ([8, 3, 2], 3), ([8, 4, 2], 1)], [([8, 2, 2], 2), ([8, 6, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([9, 7, 2], 2), ([9, 8, 2], 0), ([9, 9, 2], 0), ([10, 0, 2], 0)], [([8, 3, 2], 3), ([9, 3, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([11, 3, 2], 0), ([11, 4, 2], 1), ([11, 5, 2], 1), ([11, 6, 2], 1)]]\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-kummer-binomial-valuation-incoming-carry-inclusion","generated_at":"2026-09-29T14:39:28.046953+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 a%p+b%p+carry at the incoming carry inclusion step.","root_cause":"The incoming carry inclusion step uses a%p+b%p instead of a%p+b%p+carry.","sha256":"ee075b04e871e5644d85946c8523907ea349f87a4e66fb2112c14f29c2e18de4","title":"Kummer binomial valuation: incoming carry inclusion · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.84,"exit_code":1,"observations":[{"actual":40,"check":"explicit oracle 0","expected":2,"passed":false},{"actual":0,"check":"explicit oracle 1","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 2","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 3","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 4","expected":0,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":0,"check":"explicit oracle 6","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 7","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 40, \"expected\": 2, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 0, \"expected\": 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\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.223,"exit_code":1,"observations":[{"actual":1,"check":"explicit oracle 0","expected":2,"passed":false},{"actual":0,"check":"explicit oracle 1","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 2","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 3","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 4","expected":0,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":0,"check":"explicit oracle 6","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 7","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 1, \"expected\": 2, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 0, \"expected\": 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\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.11,"exit_code":0,"observations":[{"actual":2,"check":"explicit oracle 0","expected":2,"passed":true},{"actual":0,"check":"explicit oracle 1","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 2","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 3","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 4","expected":0,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":0,"check":"explicit oracle 6","expected":0,"passed":true},{"actual":0,"check":"explicit oracle 7","expected":0,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 0, \"expected\": 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\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}