FA-81066 / Music interval and transposition theory / Open access
Interval-class vector of a pitch-class set: large intervals folded by subtracting a tritone · case 01
A perfect fifth is counted as interval class 1 instead of 5, so [0,7] reports [1,0,0,0,0,0].
ROOT CAUSE
Intervals above six are reduced by subtracting six instead of taking the complement to twelve.
VERIFIED REPAIR
Restore the class folding step so that it reads `ic = min(d, 12 - d)`.
Unsuccessful approach: Complementing to eleven shifts every folded class by one and sends the tritone to class 5.
Case contract
Input a list of integers, reduced mod 12 and deduplicated. For each unordered pair count its interval class min(d, 12-d) in 1..6. Return the six counts [ic1..ic6]; non-integer input returns None.
Why this case matters
Interval vectors drive set-class similarity measures and Z-relation detection.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
if not isinstance(x, list) or not all(isinstance(v, int) for v in x):
return None
pcs = sorted(set(v % 12 for v in x))
vec = [0] * 6
for i in range(len(pcs)):
for j in range(i + 1, len(pcs)):
d = (pcs[j] - pcs[i]) % 12
ic = d if d <= 6 else d - 6
vec[ic - 1] += 1
return vec
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([0, 4, 7], [0, 0, 1, 1, 1, 0]), ([0, 1], [1, 0, 0, 0, 0, 0]), ([0, 1, 4, 6], [1, 1, 1, 1, 1, 1]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([11, -1], [0, 0, 0, 0, 0, 0]), ([], [0, 0, 0, 0, 0, 0]), ([5], [0, 0, 0, 0, 0, 0]), ([0, 12, 24], [0, 0, 0, 0, 0, 0])], [([0, 6], [0, 0, 0, 0, 0, 1]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([5], [0, 0, 0, 0, 0, 0]), ([0, 12, 24], [0, 0, 0, 0, 0, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 4, 7], [0, 0, 1, 1, 1, 0]), ([0, 6], [0, 0, 0, 0, 0, 1]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([0, 1, 4, 6], [1, 1, 1, 1, 1, 1]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 12, 12, 12, 12, 6]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 7], [0, 0, 0, 0, 1, 0]), ([0, 1, 4, 6], [1, 1, 1, 1, 1, 1]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 12, 12, 12, 12, 6]), ([0, 3, 6, 9], [0, 0, 4, 0, 0, 2]), ([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([-1, 0, 4], [1, 0, 0, 1, 1, 0])], [([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 12, 12, 12, 12, 6]), ([0, 3, 6, 9], [0, 0, 4, 0, 0, 2]), ([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([-1, 0, 4], [1, 0, 0, 1, 1, 0]), ([-13, 2], [0, 0, 1, 0, 0, 0]), ([0, 5, 7], [0, 1, 0, 0, 2, 0])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 0 | [1, 0, 1, 1, 0, 0] | [0, 0, 1, 1, 1, 0] | Failed |
| oracle 1 | [1, 0, 0, 0, 0, 0] | [1, 0, 0, 0, 0, 0] | Passed |
| oracle 2 | [1, 1, 1, 1, 1, 1] | [1, 1, 1, 1, 1, 1] | Passed |
| oracle 3 | [2, 1, 1, 1, 0, 1] | [1, 1, 1, 1, 1, 1] | Failed |
| oracle 4 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 5 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 6 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 7 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
SHA-256 / 47648cde0c0b4a62b99018ba4928b326f99680f5181bed91a62ecef0af6bf825
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
if not isinstance(x, list) or not all(isinstance(v, int) for v in x):
return None
pcs = sorted(set(v % 12 for v in x))
vec = [0] * 6
for i in range(len(pcs)):
for j in range(i + 1, len(pcs)):
d = (pcs[j] - pcs[i]) % 12
ic = min(d, 11 - d)
vec[ic - 1] += 1
return vec
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([0, 4, 7], [0, 0, 1, 1, 1, 0]), ([0, 1], [1, 0, 0, 0, 0, 0]), ([0, 1, 4, 6], [1, 1, 1, 1, 1, 1]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([11, -1], [0, 0, 0, 0, 0, 0]), ([], [0, 0, 0, 0, 0, 0]), ([5], [0, 0, 0, 0, 0, 0]), ([0, 12, 24], [0, 0, 0, 0, 0, 0])], [([0, 6], [0, 0, 0, 0, 0, 1]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([5], [0, 0, 0, 0, 0, 0]), ([0, 12, 24], [0, 0, 0, 0, 0, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 4, 7], [0, 0, 1, 1, 1, 0]), ([0, 6], [0, 0, 0, 0, 0, 1]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([0, 1, 4, 6], [1, 1, 1, 1, 1, 1]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 12, 12, 12, 12, 6]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 7], [0, 0, 0, 0, 1, 0]), ([0, 1, 4, 6], [1, 1, 1, 1, 1, 1]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 12, 12, 12, 12, 6]), ([0, 3, 6, 9], [0, 0, 4, 0, 0, 2]), ([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([-1, 0, 4], [1, 0, 0, 1, 1, 0])], [([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 12, 12, 12, 12, 6]), ([0, 3, 6, 9], [0, 0, 4, 0, 0, 2]), ([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([-1, 0, 4], [1, 0, 0, 1, 1, 0]), ([-13, 2], [0, 0, 1, 0, 0, 0]), ([0, 5, 7], [0, 1, 0, 0, 2, 0])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 0 | [0, 0, 1, 2, 0, 0] | [0, 0, 1, 1, 1, 0] | Failed |
| oracle 1 | [1, 0, 0, 0, 0, 0] | [1, 0, 0, 0, 0, 0] | Passed |
| oracle 2 | [1, 1, 1, 1, 2, 0] | [1, 1, 1, 1, 1, 1] | Failed |
| oracle 3 | [1, 1, 1, 2, 1, 0] | [1, 1, 1, 1, 1, 1] | Failed |
| oracle 4 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 5 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 6 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 7 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
SHA-256 / 2e248d09cacfb02e3859b3f12aa6257c68c78f65d4aa7370896382260ecaed0a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
if not isinstance(x, list) or not all(isinstance(v, int) for v in x):
return None
pcs = sorted(set(v % 12 for v in x))
vec = [0] * 6
for i in range(len(pcs)):
for j in range(i + 1, len(pcs)):
d = (pcs[j] - pcs[i]) % 12
ic = min(d, 12 - d)
vec[ic - 1] += 1
return vec
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([0, 4, 7], [0, 0, 1, 1, 1, 0]), ([0, 1], [1, 0, 0, 0, 0, 0]), ([0, 1, 4, 6], [1, 1, 1, 1, 1, 1]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([11, -1], [0, 0, 0, 0, 0, 0]), ([], [0, 0, 0, 0, 0, 0]), ([5], [0, 0, 0, 0, 0, 0]), ([0, 12, 24], [0, 0, 0, 0, 0, 0])], [([0, 6], [0, 0, 0, 0, 0, 1]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([5], [0, 0, 0, 0, 0, 0]), ([0, 12, 24], [0, 0, 0, 0, 0, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 4, 7], [0, 0, 1, 1, 1, 0]), ([0, 6], [0, 0, 0, 0, 0, 1]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([0, 1, 4, 6], [1, 1, 1, 1, 1, 1]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 12, 12, 12, 12, 6]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 7], [0, 0, 0, 0, 1, 0]), ([0, 1, 4, 6], [1, 1, 1, 1, 1, 1]), ([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 12, 12, 12, 12, 6]), ([0, 3, 6, 9], [0, 0, 4, 0, 0, 2]), ([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([-1, 0, 4], [1, 0, 0, 1, 1, 0])], [([0, 1, 3, 7], [1, 1, 1, 1, 1, 1]), ([0, 2, 4, 6, 8, 10], [0, 6, 0, 6, 0, 3]), ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 12, 12, 12, 12, 6]), ([0, 3, 6, 9], [0, 0, 4, 0, 0, 2]), ([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([-1, 0, 4], [1, 0, 0, 1, 1, 0]), ([-13, 2], [0, 0, 1, 0, 0, 0]), ([0, 5, 7], [0, 1, 0, 0, 2, 0])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("oracle %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 0 | [0, 0, 1, 1, 1, 0] | [0, 0, 1, 1, 1, 0] | Passed |
| oracle 1 | [1, 0, 0, 0, 0, 0] | [1, 0, 0, 0, 0, 0] | Passed |
| oracle 2 | [1, 1, 1, 1, 1, 1] | [1, 1, 1, 1, 1, 1] | Passed |
| oracle 3 | [1, 1, 1, 1, 1, 1] | [1, 1, 1, 1, 1, 1] | Passed |
| oracle 4 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 5 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 6 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 7 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
SHA-256 / 3662b4d3015b3f885d2275e66188c2613dda7900ce7f144bbca6983d8e2a1057
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:49:59.556135+00:00.
Case digest / ecdcef8404e48ccaf9f0ba4d423dfe2f64b638a8e908adaea89a1dac36e0c50a