{"abstract":"The exact factoradic permutation unrank result violates the stated contract at alphabet selection removal.","category":"Numerics","checks":8,"contract":"Input [n,r], n<=7 and 0<=r<n!; return lexicographic permutation of 0..n-1 at rank r.","contract_signature":"x","evaluation_group":"s3-numerics-factoradic-permutation-unrank","failed_approach":"The partial repair pool.pop(-1-digit) still violates the alphabet selection removal invariant.","family":"s3-numerics-factoradic-permutation-unrank-alphabet-selection-removal","id":"FA-15131","implementations":{"attempt":{"sha256":"8ef731d157ac5bfd6cc60b9d8d953d153e8f1d3b68533a98b457a207fa08120c","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,r=x;pool=list(range(n));out=[]\n    for i in range(n-1,-1,-1):\n     block=math.factorial(i)\n     digit=r//block\n     if digit<0 or digit>=len(pool):return None\n     out.append(pool.pop(-1-digit))\n     r=r%block\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 0], [0, 1]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([2, 1], [1, 0]), ([3, 0], [0, 1, 2]), ([3, 1], [0, 2, 1]), ([3, 2], [1, 0, 2]), ([3, 3], [1, 2, 0])], [([3, 0], [0, 1, 2]), ([3, 1], [0, 2, 1]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([4, 8], [1, 2, 0, 3]), ([4, 9], [1, 2, 3, 0]), ([4, 10], [1, 3, 0, 2]), ([4, 11], [1, 3, 2, 0])], [([3, 1], [0, 2, 1]), ([3, 4], [2, 0, 1]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 1], [0, 1, 2, 4, 3]), ([5, 2], [0, 1, 3, 2, 4]), ([5, 3], [0, 1, 3, 4, 2]), ([5, 4], [0, 1, 4, 2, 3])], [([3, 2], [1, 0, 2]), ([4, 1], [0, 1, 3, 2]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 18], [0, 4, 1, 2, 3]), ([5, 19], [0, 4, 1, 3, 2]), ([5, 20], [0, 4, 2, 1, 3]), ([5, 21], [0, 4, 2, 3, 1])], [([3, 3], [1, 2, 0]), ([4, 4], [0, 3, 1, 2]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 35], [1, 2, 4, 3, 0]), ([5, 36], [1, 3, 0, 2, 4]), ([5, 37], [1, 3, 0, 4, 2]), ([5, 38], [1, 3, 2, 0, 4])]]\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":"f31660dd9210556d310f51c7f0fba5d2258e3fcb1a327c660061a8bf33860fae","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,r=x;pool=list(range(n));out=[]\n    for i in range(n-1,-1,-1):\n     block=math.factorial(i)\n     digit=r//block\n     if digit<0 or digit>=len(pool):return None\n     out.append(pool[digit])\n     r=r%block\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 0], [0, 1]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([2, 1], [1, 0]), ([3, 0], [0, 1, 2]), ([3, 1], [0, 2, 1]), ([3, 2], [1, 0, 2]), ([3, 3], [1, 2, 0])], [([3, 0], [0, 1, 2]), ([3, 1], [0, 2, 1]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([4, 8], [1, 2, 0, 3]), ([4, 9], [1, 2, 3, 0]), ([4, 10], [1, 3, 0, 2]), ([4, 11], [1, 3, 2, 0])], [([3, 1], [0, 2, 1]), ([3, 4], [2, 0, 1]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 1], [0, 1, 2, 4, 3]), ([5, 2], [0, 1, 3, 2, 4]), ([5, 3], [0, 1, 3, 4, 2]), ([5, 4], [0, 1, 4, 2, 3])], [([3, 2], [1, 0, 2]), ([4, 1], [0, 1, 3, 2]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 18], [0, 4, 1, 2, 3]), ([5, 19], [0, 4, 1, 3, 2]), ([5, 20], [0, 4, 2, 1, 3]), ([5, 21], [0, 4, 2, 3, 1])], [([3, 3], [1, 2, 0]), ([4, 4], [0, 3, 1, 2]), ([1, 0], [0]), ([6, 719], [5, 4, 3, 2, 1, 0]), ([5, 35], [1, 2, 4, 3, 0]), ([5, 36], [1, 3, 0, 2, 4]), ([5, 37], [1, 3, 0, 4, 2]), ([5, 38], [1, 3, 2, 0, 4])]]\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-factoradic-permutation-unrank-alphabet-selection-removal","generated_at":"2026-09-29T14:39:23.824711+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 alphabet selection removal step uses pool[digit] instead of pool.pop(digit).","sha256":"ed3ea96cf20ae57e9cc0b1d2c7f6185b62197d72f51e80c83022539c45b92adb","title":"Factoradic permutation unrank: alphabet selection removal · 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":41.276,"exit_code":1,"observations":[{"actual":[1,0],"check":"explicit oracle 0","expected":[0,1],"passed":false},{"actual":[0],"check":"explicit oracle 1","expected":[0],"passed":true},{"actual":[0,1,2,3,4,5],"check":"explicit oracle 2","expected":[5,4,3,2,1,0],"passed":false},{"actual":[0,1],"check":"explicit oracle 3","expected":[1,0],"passed":false},{"actual":[2,1,0],"check":"explicit oracle 4","expected":[0,1,2],"passed":false},{"actual":[2,0,1],"check":"explicit oracle 5","expected":[0,2,1],"passed":false},{"actual":[1,2,0],"check":"explicit oracle 6","expected":[1,0,2],"passed":false},{"actual":[1,0,2],"check":"explicit oracle 7","expected":[1,2,0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, 0], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 1, 2, 3, 4, 5], \"expected\": [5, 4, 3, 2, 1, 0], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [0, 1], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [2, 1, 0], \"expected\": [0, 1, 2], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [2, 0, 1], \"expected\": [0, 2, 1], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [1, 2, 0], \"expected\": [1, 0, 2], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [1, 0, 2], \"expected\": [1, 2, 0], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.543,"exit_code":1,"observations":[{"actual":[0,0],"check":"explicit oracle 0","expected":[0,1],"passed":false},{"actual":[0],"check":"explicit oracle 1","expected":[0],"passed":true},{"actual":[5,4,3,2,1,0],"check":"explicit oracle 2","expected":[5,4,3,2,1,0],"passed":true},{"actual":[1,0],"check":"explicit oracle 3","expected":[1,0],"passed":true},{"actual":[0,0,0],"check":"explicit oracle 4","expected":[0,1,2],"passed":false},{"actual":[0,1,0],"check":"explicit oracle 5","expected":[0,2,1],"passed":false},{"actual":[1,0,0],"check":"explicit oracle 6","expected":[1,0,2],"passed":false},{"actual":[1,1,0],"check":"explicit oracle 7","expected":[1,2,0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [0, 0], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [5, 4, 3, 2, 1, 0], \"expected\": [5, 4, 3, 2, 1, 0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 0, 0], \"expected\": [0, 1, 2], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1, 0], \"expected\": [0, 2, 1], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [1, 0, 0], \"expected\": [1, 0, 2], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [1, 1, 0], \"expected\": [1, 2, 0], \"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."}}