{"abstract":"The exact prime power unit factorial result violates the stated contract at all prime factor stripping.","category":"Numerics","checks":8,"contract":"Input [n,p,e], n>=0 p prime e>=1; return product of positive integers<=n after removing ALL p factors from each, modulo p^e. Bounds: n<=64.","evaluation_group":"s3-numerics-prime-power-unit-factorial","failed_approach":"The partial repair v==p still violates the all prime factor stripping invariant.","family":"s3-numerics-prime-power-unit-factorial-all-prime-factor-stripping","id":"FA-15581","implementations":{"attempt":{"sha256":"78bae66f12acae36595d66d9f8da188373baba5d5efc787facaa6bfddc989e58","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,p,e=x;mod=p**e;r=1\n    for v in range(1,n+1):\n     for _ in range(30):\n      if v==p:break\n      v//=p\n     r=r*v%mod\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([3, 2, 2], 3), ([1, 2, 1], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([0, 2, 2], 1), ([0, 2, 3], 1), ([0, 2, 4], 1), ([1, 2, 2], 1)], [([3, 2, 3], 3), ([1, 2, 4], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([4, 2, 2], 3), ([4, 2, 3], 3), ([4, 2, 4], 3), ([5, 2, 1], 1)], [([3, 2, 4], 3), ([2, 2, 3], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([8, 2, 3], 3), ([8, 2, 4], 11), ([9, 2, 1], 1), ([9, 2, 2], 3)], [([4, 2, 2], 3), ([3, 2, 2], 3), ([0, 2, 1], 1), ([64, 7, 4], 282), ([12, 2, 4], 15), ([13, 2, 1], 1), ([13, 2, 2], 3), ([13, 2, 3], 3)], [([4, 2, 3], 3), ([4, 2, 1], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([17, 2, 1], 1), ([17, 2, 2], 3), ([17, 2, 3], 3), ([17, 2, 4], 11)]]\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":"bbcb1443b2c344ae989d2b2159b4fab15b9955faebddb877e7d8d431fb49e906","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,p,e=x;mod=p**e;r=1\n    for v in range(1,n+1):\n     for _ in range(30):\n      if v<p:break\n      v//=p\n     r=r*v%mod\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([3, 2, 2], 3), ([1, 2, 1], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([0, 2, 2], 1), ([0, 2, 3], 1), ([0, 2, 4], 1), ([1, 2, 2], 1)], [([3, 2, 3], 3), ([1, 2, 4], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([4, 2, 2], 3), ([4, 2, 3], 3), ([4, 2, 4], 3), ([5, 2, 1], 1)], [([3, 2, 4], 3), ([2, 2, 3], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([8, 2, 3], 3), ([8, 2, 4], 11), ([9, 2, 1], 1), ([9, 2, 2], 3)], [([4, 2, 2], 3), ([3, 2, 2], 3), ([0, 2, 1], 1), ([64, 7, 4], 282), ([12, 2, 4], 15), ([13, 2, 1], 1), ([13, 2, 2], 3), ([13, 2, 3], 3)], [([4, 2, 3], 3), ([4, 2, 1], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([17, 2, 1], 1), ([17, 2, 2], 3), ([17, 2, 3], 3), ([17, 2, 4], 11)]]\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":"f8f8f0fed887120e7244453ca652d990e972828b247b2d0dc63588c96c7515ff","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,p,e=x;mod=p**e;r=1\n    for v in range(1,n+1):\n     for _ in range(30):\n      if v%p!=0:break\n      v//=p\n     r=r*v%mod\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([3, 2, 2], 3), ([1, 2, 1], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([0, 2, 2], 1), ([0, 2, 3], 1), ([0, 2, 4], 1), ([1, 2, 2], 1)], [([3, 2, 3], 3), ([1, 2, 4], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([4, 2, 2], 3), ([4, 2, 3], 3), ([4, 2, 4], 3), ([5, 2, 1], 1)], [([3, 2, 4], 3), ([2, 2, 3], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([8, 2, 3], 3), ([8, 2, 4], 11), ([9, 2, 1], 1), ([9, 2, 2], 3)], [([4, 2, 2], 3), ([3, 2, 2], 3), ([0, 2, 1], 1), ([64, 7, 4], 282), ([12, 2, 4], 15), ([13, 2, 1], 1), ([13, 2, 2], 3), ([13, 2, 3], 3)], [([4, 2, 3], 3), ([4, 2, 1], 1), ([0, 2, 1], 1), ([64, 7, 4], 282), ([17, 2, 1], 1), ([17, 2, 2], 3), ([17, 2, 3], 3), ([17, 2, 4], 11)]]\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-prime-power-unit-factorial-all-prime-factor-stripping","generated_at":"2026-09-29T14:39:28.097097+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 v%p!=0 at the all prime factor stripping step.","root_cause":"The all prime factor stripping step uses v<p instead of v%p!=0.","sha256":"786c9813b323f0ba1d55e99e6c782613bc0471176f9b43126ea176ce03e76e0c","title":"Prime power unit factorial: all prime factor stripping · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.366,"exit_code":1,"observations":[{"actual":0,"check":"explicit oracle 0","expected":3,"passed":false},{"actual":0,"check":"explicit oracle 1","expected":1,"passed":false},{"actual":1,"check":"explicit oracle 2","expected":1,"passed":true},{"actual":0,"check":"explicit oracle 3","expected":282,"passed":false},{"actual":1,"check":"explicit oracle 4","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 6","expected":1,"passed":true},{"actual":0,"check":"explicit oracle 7","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 0, \"expected\": 3, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 0, \"expected\": 282, \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 0, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.974,"exit_code":1,"observations":[{"actual":1,"check":"explicit oracle 0","expected":3,"passed":false},{"actual":1,"check":"explicit oracle 1","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 2","expected":1,"passed":true},{"actual":2122,"check":"explicit oracle 3","expected":282,"passed":false},{"actual":1,"check":"explicit oracle 4","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 6","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 7","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 1, \"expected\": 3, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 2122, \"expected\": 282, \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.323,"exit_code":0,"observations":[{"actual":3,"check":"explicit oracle 0","expected":3,"passed":true},{"actual":1,"check":"explicit oracle 1","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 2","expected":1,"passed":true},{"actual":282,"check":"explicit oracle 3","expected":282,"passed":true},{"actual":1,"check":"explicit oracle 4","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 6","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 7","expected":1,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 282, \"expected\": 282, \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}