FAILURE MAP
← Case archive

FA-81076 / Music interval and transposition theory / Open access

Interval-class vector of a pitch-class set: interval class stored one slot high · case 01

A semitone is recorded in the ic2 slot and a major third in the ic4 slot.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Interval classes 1..6 are used directly as zero-based list indices.

VERIFIED REPAIR

Restore the vector slot step so that it reads `vec[ic - 1]`.

Unsuccessful approach: Wrapping the index modulo six moves the tritone into the ic1 slot and still shifts every other class.

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 = min(d, 12 - d)
            vec[ic] += 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, 7], [0, 0, 0, 0, 1, 0]), ([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([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]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 4, 7], [0, 0, 1, 1, 1, 0]), ([0, 1], [1, 0, 0, 0, 0, 0]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([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, 12, 24], [0, 0, 0, 0, 0, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 1], [1, 0, 0, 0, 0, 0]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([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]), ([1, 8], [0, 0, 0, 0, 1, 0]), ([0, 2, 7], [0, 1, 0, 0, 2, 0])], [([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]), ([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]), ([3, 10], [0, 0, 0, 0, 1, 0])], [([-1, 0, 4], [1, 0, 0, 1, 1, 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]), ([3, 10], [0, 0, 0, 0, 1, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 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 fixtureActualExpectedOutcome
oracle 0[0, 0, 0, 1, 1, 1][0, 0, 1, 1, 1, 0]Failed
oracle 1[0, 0, 0, 0, 0, 1][0, 0, 0, 0, 1, 0]Failed
oracle 2[0, 0, 0, 0, 3, 0][0, 0, 0, 3, 0, 0]Failed
oracle 3[0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0]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 / 4db9b13d7cdf73b3a2799418ad7de5c674e3f23ec9493373cdc18695f9fbc73b

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, 12 - d)
            vec[ic % 6] += 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, 7], [0, 0, 0, 0, 1, 0]), ([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([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]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 4, 7], [0, 0, 1, 1, 1, 0]), ([0, 1], [1, 0, 0, 0, 0, 0]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([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, 12, 24], [0, 0, 0, 0, 0, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 1], [1, 0, 0, 0, 0, 0]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([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]), ([1, 8], [0, 0, 0, 0, 1, 0]), ([0, 2, 7], [0, 1, 0, 0, 2, 0])], [([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]), ([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]), ([3, 10], [0, 0, 0, 0, 1, 0])], [([-1, 0, 4], [1, 0, 0, 1, 1, 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]), ([3, 10], [0, 0, 0, 0, 1, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 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 fixtureActualExpectedOutcome
oracle 0[0, 0, 0, 1, 1, 1][0, 0, 1, 1, 1, 0]Failed
oracle 1[0, 0, 0, 0, 0, 1][0, 0, 0, 0, 1, 0]Failed
oracle 2[0, 0, 0, 0, 3, 0][0, 0, 0, 3, 0, 0]Failed
oracle 3[0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0]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 / 30fa58d7b65a88b033804ce759cd16c3f36d4a70946d196ba91aae1521095f64

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, 7], [0, 0, 0, 0, 1, 0]), ([0, 4, 8], [0, 0, 0, 3, 0, 0]), ([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]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 4, 7], [0, 0, 1, 1, 1, 0]), ([0, 1], [1, 0, 0, 0, 0, 0]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([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, 12, 24], [0, 0, 0, 0, 0, 0]), ([-13, 11], [0, 0, 0, 0, 0, 0])], [([0, 1], [1, 0, 0, 0, 0, 0]), ([0, 7], [0, 0, 0, 0, 1, 0]), ([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]), ([1, 8], [0, 0, 0, 0, 1, 0]), ([0, 2, 7], [0, 1, 0, 0, 2, 0])], [([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]), ([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]), ([3, 10], [0, 0, 0, 0, 1, 0])], [([-1, 0, 4], [1, 0, 0, 1, 1, 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]), ([3, 10], [0, 0, 0, 0, 1, 0]), ([4, -3, 9], [0, 0, 0, 0, 1, 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 fixtureActualExpectedOutcome
oracle 0[0, 0, 1, 1, 1, 0][0, 0, 1, 1, 1, 0]Passed
oracle 1[0, 0, 0, 0, 1, 0][0, 0, 0, 0, 1, 0]Passed
oracle 2[0, 0, 0, 3, 0, 0][0, 0, 0, 3, 0, 0]Passed
oracle 3[0, 0, 0, 0, 0, 0][0, 0, 0, 0, 0, 0]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 / cd197a41a43d76c8cdbf94c4bb481934dc17f5f6494ce37ff68f4d25c338a8cf

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.841688+00:00.

Case digest / c2fffd824fa179fa76d4ee324e6335b4205acb8cb64a7b58ea430258eae1f424