FA-81081 / Music interval and transposition theory / Open access
Interval-class vector of a pitch-class set: negative pitch numbers reflected instead of reduced · case 01
A set containing -1 is analysed as if it contained 1, so [-1,0,4] gets the wrong vector.
ROOT CAUSE
Negative inputs are reduced via their absolute value, which reflects them around zero.
VERIFIED REPAIR
Restore the negative reduction step so that it reads `sorted(set(v % 12 for v in x))`.
Unsuccessful approach: Adding twelve once leaves values below -12 negative, so duplicates like 11 and -1 are no longer merged.
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(abs(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, 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]), ([11, -1], [0, 0, 0, 0, 0, 0]), ([-13, 2], [0, 0, 1, 0, 0, 0]), ([-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]), ([-1, 0, 4], [1, 0, 0, 1, 1, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 0]), ([-14, 10, 3], [0, 0, 0, 0, 1, 0])], [([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]), ([-13, 2], [0, 0, 1, 0, 0, 0]), ([0, 5, 7], [0, 1, 0, 0, 2, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0]), ([-25, 1, 11], [0, 1, 0, 0, 0, 0])], [([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([0, 5, 7], [0, 1, 0, 0, 2, 0]), ([1, 8], [0, 0, 0, 0, 1, 0]), ([0, 2, 7], [0, 1, 0, 0, 2, 0]), ([2, 11], [0, 0, 1, 0, 0, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0]), ([-14, 10, 3], [0, 0, 0, 0, 1, 0])], [([11, -1], [0, 0, 0, 0, 0, 0]), ([0, 2, 7], [0, 1, 0, 0, 2, 0]), ([2, 11], [0, 0, 1, 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]), ([-13, 11], [0, 0, 0, 0, 0, 0]), ([-14, 10, 3], [0, 0, 0, 0, 1, 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 | [0, 0, 0, 0, 0, 1] | [0, 0, 0, 0, 0, 1] | Passed |
| oracle 3 | [0, 0, 0, 0, 1, 0] | [0, 0, 0, 0, 1, 0] | Passed |
| oracle 4 | [1, 1, 1, 1, 1, 1] | [1, 1, 1, 1, 1, 1] | Passed |
| oracle 5 | [0, 1, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Failed |
| oracle 6 | [1, 0, 0, 0, 0, 0] | [0, 0, 1, 0, 0, 0] | Failed |
| oracle 7 | [0, 1, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Failed |
SHA-256 / c2b32158d57a63b279a8b05fdfe383d1aeeeae6cd5741120db9ff5ba06151626
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 if v >= 0 else 12 + v 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, 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]), ([11, -1], [0, 0, 0, 0, 0, 0]), ([-13, 2], [0, 0, 1, 0, 0, 0]), ([-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]), ([-1, 0, 4], [1, 0, 0, 1, 1, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 0]), ([-14, 10, 3], [0, 0, 0, 0, 1, 0])], [([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]), ([-13, 2], [0, 0, 1, 0, 0, 0]), ([0, 5, 7], [0, 1, 0, 0, 2, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0]), ([-25, 1, 11], [0, 1, 0, 0, 0, 0])], [([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([0, 5, 7], [0, 1, 0, 0, 2, 0]), ([1, 8], [0, 0, 0, 0, 1, 0]), ([0, 2, 7], [0, 1, 0, 0, 2, 0]), ([2, 11], [0, 0, 1, 0, 0, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0]), ([-14, 10, 3], [0, 0, 0, 0, 1, 0])], [([11, -1], [0, 0, 0, 0, 0, 0]), ([0, 2, 7], [0, 1, 0, 0, 2, 0]), ([2, 11], [0, 0, 1, 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]), ([-13, 11], [0, 0, 0, 0, 0, 0]), ([-14, 10, 3], [0, 0, 0, 0, 1, 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 | [0, 0, 0, 0, 0, 1] | [0, 0, 0, 0, 0, 1] | Passed |
| oracle 3 | [0, 0, 0, 0, 1, 0] | [0, 0, 0, 0, 1, 0] | Passed |
| oracle 4 | [1, 1, 1, 1, 1, 1] | [1, 1, 1, 1, 1, 1] | Passed |
| oracle 5 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 6 | [0, 0, 1, 0, 0, 0] | [0, 0, 1, 0, 0, 0] | Passed |
| oracle 7 | [0, 0, 0, 0, 0, 1] | [0, 0, 0, 0, 0, 0] | Failed |
SHA-256 / 2c8ae9104085e0b10713cbaf5cdd0afc005161c442ac4163d12f178154db2a36
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, 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]), ([11, -1], [0, 0, 0, 0, 0, 0]), ([-13, 2], [0, 0, 1, 0, 0, 0]), ([-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]), ([-1, 0, 4], [1, 0, 0, 1, 1, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 0]), ([-14, 10, 3], [0, 0, 0, 0, 1, 0])], [([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]), ([-13, 2], [0, 0, 1, 0, 0, 0]), ([0, 5, 7], [0, 1, 0, 0, 2, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0]), ([-25, 1, 11], [0, 1, 0, 0, 0, 0])], [([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([0, 5, 7], [0, 1, 0, 0, 2, 0]), ([1, 8], [0, 0, 0, 0, 1, 0]), ([0, 2, 7], [0, 1, 0, 0, 2, 0]), ([2, 11], [0, 0, 1, 0, 0, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0]), ([-14, 10, 3], [0, 0, 0, 0, 1, 0])], [([11, -1], [0, 0, 0, 0, 0, 0]), ([0, 2, 7], [0, 1, 0, 0, 2, 0]), ([2, 11], [0, 0, 1, 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]), ([-13, 11], [0, 0, 0, 0, 0, 0]), ([-14, 10, 3], [0, 0, 0, 0, 1, 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 | [0, 0, 0, 0, 0, 1] | [0, 0, 0, 0, 0, 1] | Passed |
| oracle 3 | [0, 0, 0, 0, 1, 0] | [0, 0, 0, 0, 1, 0] | Passed |
| oracle 4 | [1, 1, 1, 1, 1, 1] | [1, 1, 1, 1, 1, 1] | Passed |
| oracle 5 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
| oracle 6 | [0, 0, 1, 0, 0, 0] | [0, 0, 1, 0, 0, 0] | Passed |
| oracle 7 | [0, 0, 0, 0, 0, 0] | [0, 0, 0, 0, 0, 0] | Passed |
SHA-256 / 0f8f6d7a89356f5b376d4c481fcdda1c80384e39cdd8f2e7a0ddf147e667bec8
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.864123+00:00.
Case digest / b1d48bc3bc879b21aaf3ba362574a237af9bf4128dcd62ab8024dad8954e38e0