{"abstract":"Major and minor triads get different prime forms: [0,4,7] returns [0,4,7] instead of [0,3,7].","category":"Music interval and transposition theory","checks":8,"contract":"Input a list of integers. Compute the right-packed normal form of the set and of its inversion (p -> -p mod 12), transpose each to start on 0, and return whichever is more packed: compare the last value, then the penultimate, and so on toward the second (the original wins ties). Empty input returns []; non-integers return None.","evaluation_group":"w2-music-interval-prime-form","failed_approach":"Transposing by a tritone is still a transposition, not an inversion, so the candidate never differs.","family":"w2-music-interval-prime-form-inversion-operator","id":"FA-81056","implementations":{"attempt":{"sha256":"36ef4f3f64cee4b7bf2fb3140246a48a0ee84965a2d54fd6612b4b073d6629f5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list) or not all(isinstance(v, int) for v in x):\n        return None\n    def normal(values):\n        pcs = sorted(set(p % 12 for p in values))\n        n = len(pcs)\n        best = None\n        for r in range(n):\n            rot = pcs[r:] + [p + 12 for p in pcs[:r]]\n            key = [rot[-1] - rot[0]] + [rot[j] - rot[0] for j in range(n - 2, 0, -1)]\n            if best is None or (key, rot[0]) < best[0]:\n                best = ((key, rot[0]), rot)\n        return [p - best[1][0] for p in best[1]]\n    if not x:\n        return []\n    a = normal(x)\n    b = normal([(p + 6) % 12 for p in x])\n    ka = [a[-1]] + a[-2:0:-1]\n    kb = [b[-1]] + b[-2:0:-1]\n    return a if ka <= kb else b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 4, 7], [0, 3, 7]), ([0, 3, 7], [0, 3, 7]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [0, 1, 4, 5, 7, 9]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 4], [0, 1, 4]), ([7, 11, 2, 5], [0, 2, 5, 8])], [([2, 6, 9], [0, 3, 7]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 1, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([0, 4, 7, 10], [0, 2, 5, 8])], [([0, 1, 4], [0, 1, 4]), ([0, 3, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([0, 2, 7], [0, 2, 7]), ([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 4, 7, 10], [0, 2, 5, 8]), ([0, 2, 6, 7], [0, 1, 5, 7])], [([0, 4, 7], [0, 3, 7]), ([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 1, 5], [0, 1, 5]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([10, 1, 5], [0, 3, 7]), ([0, 1, 2, 3], [0, 1, 2, 3]), ([0, 2, 6, 7], [0, 1, 5, 7])], [([0, 4, 7], [0, 3, 7]), ([2, 6, 9], [0, 3, 7]), ([10, 1, 5], [0, 3, 7]), ([0, 1, 2, 3], [0, 1, 2, 3]), ([], []), ([6], [0]), ([0, 4, 7, 10], [0, 2, 5, 8]), ([0, 3, 6, 10], [0, 2, 5, 8])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"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":"c8fcc610fca4cbb9445281a5fd5d4cb9cb976d193a160c2bdc6e27e6c12fe4b1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list) or not all(isinstance(v, int) for v in x):\n        return None\n    def normal(values):\n        pcs = sorted(set(p % 12 for p in values))\n        n = len(pcs)\n        best = None\n        for r in range(n):\n            rot = pcs[r:] + [p + 12 for p in pcs[:r]]\n            key = [rot[-1] - rot[0]] + [rot[j] - rot[0] for j in range(n - 2, 0, -1)]\n            if best is None or (key, rot[0]) < best[0]:\n                best = ((key, rot[0]), rot)\n        return [p - best[1][0] for p in best[1]]\n    if not x:\n        return []\n    a = normal(x)\n    b = normal(x[::-1])\n    ka = [a[-1]] + a[-2:0:-1]\n    kb = [b[-1]] + b[-2:0:-1]\n    return a if ka <= kb else b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 4, 7], [0, 3, 7]), ([0, 3, 7], [0, 3, 7]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [0, 1, 4, 5, 7, 9]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 4], [0, 1, 4]), ([7, 11, 2, 5], [0, 2, 5, 8])], [([2, 6, 9], [0, 3, 7]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 1, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([0, 4, 7, 10], [0, 2, 5, 8])], [([0, 1, 4], [0, 1, 4]), ([0, 3, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([0, 2, 7], [0, 2, 7]), ([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 4, 7, 10], [0, 2, 5, 8]), ([0, 2, 6, 7], [0, 1, 5, 7])], [([0, 4, 7], [0, 3, 7]), ([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 1, 5], [0, 1, 5]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([10, 1, 5], [0, 3, 7]), ([0, 1, 2, 3], [0, 1, 2, 3]), ([0, 2, 6, 7], [0, 1, 5, 7])], [([0, 4, 7], [0, 3, 7]), ([2, 6, 9], [0, 3, 7]), ([10, 1, 5], [0, 3, 7]), ([0, 1, 2, 3], [0, 1, 2, 3]), ([], []), ([6], [0]), ([0, 4, 7, 10], [0, 2, 5, 8]), ([0, 3, 6, 10], [0, 2, 5, 8])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"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":"1d1b143553c1f4e8bbd16a912ac8bb5d2873048862e676dfd6560f9453399f36","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    if not isinstance(x, list) or not all(isinstance(v, int) for v in x):\n        return None\n    def normal(values):\n        pcs = sorted(set(p % 12 for p in values))\n        n = len(pcs)\n        best = None\n        for r in range(n):\n            rot = pcs[r:] + [p + 12 for p in pcs[:r]]\n            key = [rot[-1] - rot[0]] + [rot[j] - rot[0] for j in range(n - 2, 0, -1)]\n            if best is None or (key, rot[0]) < best[0]:\n                best = ((key, rot[0]), rot)\n        return [p - best[1][0] for p in best[1]]\n    if not x:\n        return []\n    a = normal(x)\n    b = normal([(-p) % 12 for p in x])\n    ka = [a[-1]] + a[-2:0:-1]\n    kb = [b[-1]] + b[-2:0:-1]\n    return a if ka <= kb else b\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([0, 4, 7], [0, 3, 7]), ([0, 3, 7], [0, 3, 7]), ([0, 1, 5, 6, 8], [0, 1, 5, 6, 8]), ([0, 1, 3, 5, 8, 9], [0, 1, 4, 5, 7, 9]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 4], [0, 1, 4]), ([7, 11, 2, 5], [0, 2, 5, 8])], [([2, 6, 9], [0, 3, 7]), ([0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 9]), ([0, 4, 8], [0, 4, 8]), ([0, 3, 6, 9], [0, 3, 6, 9]), ([0, 1, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([0, 4, 7, 10], [0, 2, 5, 8])], [([0, 1, 4], [0, 1, 4]), ([0, 3, 4], [0, 1, 4]), ([4, 5, 8], [0, 1, 4]), ([0, 2, 7], [0, 2, 7]), ([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 4, 7, 10], [0, 2, 5, 8]), ([0, 2, 6, 7], [0, 1, 5, 7])], [([0, 4, 7], [0, 3, 7]), ([0, 5, 7], [0, 2, 7]), ([1, 2, 4, 8], [0, 1, 3, 7]), ([0, 1, 5], [0, 1, 5]), ([7, 11, 2, 5], [0, 2, 5, 8]), ([10, 1, 5], [0, 3, 7]), ([0, 1, 2, 3], [0, 1, 2, 3]), ([0, 2, 6, 7], [0, 1, 5, 7])], [([0, 4, 7], [0, 3, 7]), ([2, 6, 9], [0, 3, 7]), ([10, 1, 5], [0, 3, 7]), ([0, 1, 2, 3], [0, 1, 2, 3]), ([], []), ([6], [0]), ([0, 4, 7, 10], [0, 2, 5, 8]), ([0, 3, 6, 10], [0, 2, 5, 8])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"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 with a stipulated toy contract; it is not a complete music notation or theory engine. 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":"w2-music-interval-prime-form-inversion-operator","generated_at":"2026-09-29T14:49:59.347398+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Set-class labelling depends on prime forms being computed identically for every member of a class.","repair":"Restore the inversion operator step so that it reads `b = normal([(-p) % 12 for p in x])`.","root_cause":"The comparison candidate is the retrograde of the input, which has the same pitch-class set, instead of its inversion.","sha256":"3fb6053afe5f91744520dc3bfca5225326c09e86653c2bd15788191153649cce","title":"Pitch-class set prime form (right-packed): retrograde used in place of inversion · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.215,"exit_code":1,"observations":[{"actual":[0,4,7],"check":"oracle 0","expected":[0,3,7],"passed":false},{"actual":[0,3,7],"check":"oracle 1","expected":[0,3,7],"passed":true},{"actual":[0,1,5,6,8],"check":"oracle 2","expected":[0,1,5,6,8],"passed":true},{"actual":[0,1,4,5,7,9],"check":"oracle 3","expected":[0,1,4,5,7,9],"passed":true},{"actual":[0,2,3,6,7,9],"check":"oracle 4","expected":[0,2,3,6,7,9],"passed":true},{"actual":[0,4,8],"check":"oracle 5","expected":[0,4,8],"passed":true},{"actual":[0,3,4],"check":"oracle 6","expected":[0,1,4],"passed":false},{"actual":[0,3,6,8],"check":"oracle 7","expected":[0,2,5,8],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [0, 4, 7], \"expected\": [0, 3, 7], \"passed\": false}, {\"check\": \"oracle 1\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [0, 1, 5, 6, 8], \"expected\": [0, 1, 5, 6, 8], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [0, 1, 4, 5, 7, 9], \"expected\": [0, 1, 4, 5, 7, 9], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [0, 2, 3, 6, 7, 9], \"expected\": [0, 2, 3, 6, 7, 9], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [0, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [0, 3, 4], \"expected\": [0, 1, 4], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [0, 3, 6, 8], \"expected\": [0, 2, 5, 8], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.911,"exit_code":1,"observations":[{"actual":[0,4,7],"check":"oracle 0","expected":[0,3,7],"passed":false},{"actual":[0,3,7],"check":"oracle 1","expected":[0,3,7],"passed":true},{"actual":[0,1,5,6,8],"check":"oracle 2","expected":[0,1,5,6,8],"passed":true},{"actual":[0,1,4,5,7,9],"check":"oracle 3","expected":[0,1,4,5,7,9],"passed":true},{"actual":[0,2,3,6,7,9],"check":"oracle 4","expected":[0,2,3,6,7,9],"passed":true},{"actual":[0,4,8],"check":"oracle 5","expected":[0,4,8],"passed":true},{"actual":[0,3,4],"check":"oracle 6","expected":[0,1,4],"passed":false},{"actual":[0,3,6,8],"check":"oracle 7","expected":[0,2,5,8],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [0, 4, 7], \"expected\": [0, 3, 7], \"passed\": false}, {\"check\": \"oracle 1\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [0, 1, 5, 6, 8], \"expected\": [0, 1, 5, 6, 8], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [0, 1, 4, 5, 7, 9], \"expected\": [0, 1, 4, 5, 7, 9], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [0, 2, 3, 6, 7, 9], \"expected\": [0, 2, 3, 6, 7, 9], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [0, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [0, 3, 4], \"expected\": [0, 1, 4], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [0, 3, 6, 8], \"expected\": [0, 2, 5, 8], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.656,"exit_code":0,"observations":[{"actual":[0,3,7],"check":"oracle 0","expected":[0,3,7],"passed":true},{"actual":[0,3,7],"check":"oracle 1","expected":[0,3,7],"passed":true},{"actual":[0,1,5,6,8],"check":"oracle 2","expected":[0,1,5,6,8],"passed":true},{"actual":[0,1,4,5,7,9],"check":"oracle 3","expected":[0,1,4,5,7,9],"passed":true},{"actual":[0,2,3,6,7,9],"check":"oracle 4","expected":[0,2,3,6,7,9],"passed":true},{"actual":[0,4,8],"check":"oracle 5","expected":[0,4,8],"passed":true},{"actual":[0,1,4],"check":"oracle 6","expected":[0,1,4],"passed":true},{"actual":[0,2,5,8],"check":"oracle 7","expected":[0,2,5,8],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": [0, 3, 7], \"expected\": [0, 3, 7], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [0, 1, 5, 6, 8], \"expected\": [0, 1, 5, 6, 8], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [0, 1, 4, 5, 7, 9], \"expected\": [0, 1, 4, 5, 7, 9], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [0, 2, 3, 6, 7, 9], \"expected\": [0, 2, 3, 6, 7, 9], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [0, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [0, 1, 4], \"expected\": [0, 1, 4], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [0, 2, 5, 8], \"expected\": [0, 2, 5, 8], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}