{"abstract":"The exact kummer binomial valuation result violates the stated contract at carry propagation termination.","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.","contract_signature":"x","evaluation_group":"s3-numerics-kummer-binomial-valuation","failed_approach":"The partial repair a<p and b<p still violates the carry propagation termination invariant.","family":"s3-numerics-kummer-binomial-valuation-carry-propagation-termination","id":"FA-15546","implementations":{"attempt":{"sha256":"d34efe39962e0cd4bb1447ffa18ac43e3818300b5e57583ac422bcb652bae1b6","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<p and b<p: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), ([2, 1, 2], 1), ([1, 0, 2], 0), ([59, 59, 7], 0), ([1, 1, 2], 0), ([2, 0, 2], 0), ([2, 2, 2], 0), ([3, 0, 2], 0)], [([4, 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), ([6, 1, 2], 1)], [([8, 1, 2], 3), ([6, 3, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([7, 7, 2], 0), ([8, 0, 2], 0), ([8, 2, 2], 2), ([8, 3, 2], 3)], [([8, 2, 2], 2), ([8, 3, 2], 3), ([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), ([8, 6, 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":"c3e1499366322d9dde8e6abf3eca1d920f075ddacd93a921a4586ac7dbb0d5bf","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 or b==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), ([2, 1, 2], 1), ([1, 0, 2], 0), ([59, 59, 7], 0), ([1, 1, 2], 0), ([2, 0, 2], 0), ([2, 2, 2], 0), ([3, 0, 2], 0)], [([4, 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), ([6, 1, 2], 1)], [([8, 1, 2], 3), ([6, 3, 2], 2), ([1, 0, 2], 0), ([59, 59, 7], 0), ([7, 7, 2], 0), ([8, 0, 2], 0), ([8, 2, 2], 2), ([8, 3, 2], 3)], [([8, 2, 2], 2), ([8, 3, 2], 3), ([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), ([8, 6, 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-carry-propagation-termination","generated_at":"2026-09-29T14:39:28.000763+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 carry propagation termination step uses a==0 or b==0 instead of a==0 and b==0 and carry==0.","sha256":"baf0bb9a12c4d91fb7e802848c9262ce1bc15c7f5e9c82e6f9b55fa2921612de","title":"Kummer binomial valuation: carry propagation termination · 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":42.944,"exit_code":1,"observations":[{"actual":1,"check":"explicit oracle 0","expected":2,"passed":false},{"actual":0,"check":"explicit oracle 1","expected":1,"passed":false},{"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":0,"check":"explicit oracle 5","expected":0,"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\": 1, \"passed\": false}, {\"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\": 0, \"expected\": 0, \"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":43.681,"exit_code":1,"observations":[{"actual":1,"check":"explicit oracle 0","expected":2,"passed":false},{"actual":1,"check":"explicit oracle 1","expected":1,"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":0,"check":"explicit oracle 5","expected":0,"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\": 1, \"expected\": 1, \"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\": 0, \"expected\": 0, \"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"}},"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."}}