FAILURE MAP
← Case archive

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

Roman numeral label for a chord in a key: augmented chords written lowercase · case 01

An augmented mediant in minor is labelled iii+ instead of III+.

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

ROOT CAUSE

Only major quality selects an uppercase numeral; augmented is treated like a minor-type chord.

VERIFIED REPAIR

Restore the numeral case step so that it reads `quality in ('maj', 'aug')`.

Unsuccessful approach: Uppercasing everything except minor also uppercases diminished chords, e.g. VII° for the leading-tone chord.

Case contract

Input [tonic_pc, mode, root_pc, quality] with mode major or minor (natural minor scale 0 2 3 5 7 8 10) and quality maj, min, dim or aug. Diatonic roots use their degree; in minor the leading tone (11 semitones) is degree VII with no prefix. Other roots in major are written b + the degree a semitone above; in minor # + the degree a semitone below. Numerals are uppercase for maj and aug, lowercase for min and dim, with suffix ° for dim and + for aug. Invalid input returns None.

Why this case matters

Harmonic analysis and ear-training tools label chords relative to the key.

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 len(x) != 4:
        return None
    tonic, mode, root, quality = x
    scales = {'major': [0, 2, 4, 5, 7, 9, 11], 'minor': [0, 2, 3, 5, 7, 8, 10]}
    if mode not in scales or quality not in ('maj', 'min', 'dim', 'aug'):
        return None
    if not all(isinstance(v, int) for v in (tonic, root)):
        return None
    rel = (root - tonic) % 12
    scale = scales[mode]
    names = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII']
    prefix = ''
    if rel in scale:
        deg = scale.index(rel)
    elif mode == 'minor' and rel == 11:
        deg = 6
    elif mode == 'major':
        prefix = 'b'
        deg = scale.index((rel + 1) % 12)
    else:
        prefix = '#'
        deg = scale.index((rel - 1) % 12)
    numeral = names[deg] if quality == 'maj' else names[deg].lower()
    suffix = {'maj': '', 'min': '', 'dim': '°', 'aug': '+'}[quality]
    return prefix + numeral + suffix
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([0, 'major', 7, 'maj'], 'V'), ([0, 'major', 2, 'min'], 'ii'), ([0, 'major', 11, 'dim'], 'vii°'), ([0, 'major', 8, 'maj'], 'bVI'), ([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 3, 'aug'], 'III+')], [([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([0, 'major', 3, 'maj'], 'bIII'), ([0, 'major', 6, 'dim'], 'bv°'), ([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 0, 'maj'], 'III'), ([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'major', 0, 'aug'], 'I+')], [([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 8, 'dim'], 'vii°'), ([9, 'minor', 0, 'maj'], 'III'), ([9, 'minor', 7, 'maj'], 'VII'), ([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([2, 'major', 1, 'dim'], 'vii°')], [([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 9, 'min'], '#vi'), ([0, 'minor', 4, 'maj'], '#III'), ([7, 'major', 2, 'maj'], 'V'), ([0, 'major', 0, 'aug'], 'I+'), ([5, 'major', 4, 'dim'], 'vii°')], [([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'minor', 4, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([7, 'major', 2, 'maj'], 'V'), ([7, 'major', 0, 'maj'], 'IV'), ([0, 'lydian', 0, 'maj'], None), ([0, 'major', 0, 'sus'], None), ([5, 'minor', 4, 'dim'], 'vii°')]]
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 0VVPassed
oracle 1iiiiPassed
oracle 2vii°vii°Passed
oracle 3bVIbVIPassed
oracle 4bVIIbVIIPassed
oracle 5bIIbIIPassed
oracle 6#iv°#iv°Passed
oracle 7iii+III+Failed

SHA-256 / 8d01d2f225832d27f515c13d7cc1cbddd184be7de322d906e65e0036e826897f

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 len(x) != 4:
        return None
    tonic, mode, root, quality = x
    scales = {'major': [0, 2, 4, 5, 7, 9, 11], 'minor': [0, 2, 3, 5, 7, 8, 10]}
    if mode not in scales or quality not in ('maj', 'min', 'dim', 'aug'):
        return None
    if not all(isinstance(v, int) for v in (tonic, root)):
        return None
    rel = (root - tonic) % 12
    scale = scales[mode]
    names = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII']
    prefix = ''
    if rel in scale:
        deg = scale.index(rel)
    elif mode == 'minor' and rel == 11:
        deg = 6
    elif mode == 'major':
        prefix = 'b'
        deg = scale.index((rel + 1) % 12)
    else:
        prefix = '#'
        deg = scale.index((rel - 1) % 12)
    numeral = names[deg] if quality != 'min' else names[deg].lower()
    suffix = {'maj': '', 'min': '', 'dim': '°', 'aug': '+'}[quality]
    return prefix + numeral + suffix
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([0, 'major', 7, 'maj'], 'V'), ([0, 'major', 2, 'min'], 'ii'), ([0, 'major', 11, 'dim'], 'vii°'), ([0, 'major', 8, 'maj'], 'bVI'), ([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 3, 'aug'], 'III+')], [([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([0, 'major', 3, 'maj'], 'bIII'), ([0, 'major', 6, 'dim'], 'bv°'), ([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 0, 'maj'], 'III'), ([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'major', 0, 'aug'], 'I+')], [([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 8, 'dim'], 'vii°'), ([9, 'minor', 0, 'maj'], 'III'), ([9, 'minor', 7, 'maj'], 'VII'), ([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([2, 'major', 1, 'dim'], 'vii°')], [([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 9, 'min'], '#vi'), ([0, 'minor', 4, 'maj'], '#III'), ([7, 'major', 2, 'maj'], 'V'), ([0, 'major', 0, 'aug'], 'I+'), ([5, 'major', 4, 'dim'], 'vii°')], [([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'minor', 4, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([7, 'major', 2, 'maj'], 'V'), ([7, 'major', 0, 'maj'], 'IV'), ([0, 'lydian', 0, 'maj'], None), ([0, 'major', 0, 'sus'], None), ([5, 'minor', 4, 'dim'], 'vii°')]]
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 0VVPassed
oracle 1iiiiPassed
oracle 2VII°vii°Failed
oracle 3bVIbVIPassed
oracle 4bVIIbVIIPassed
oracle 5bIIbIIPassed
oracle 6#IV°#iv°Failed
oracle 7III+III+Passed

SHA-256 / b6adb4d947dedb4e43c2637ab56eee233871dd07ff2cd399c825628a0a4f0138

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 len(x) != 4:
        return None
    tonic, mode, root, quality = x
    scales = {'major': [0, 2, 4, 5, 7, 9, 11], 'minor': [0, 2, 3, 5, 7, 8, 10]}
    if mode not in scales or quality not in ('maj', 'min', 'dim', 'aug'):
        return None
    if not all(isinstance(v, int) for v in (tonic, root)):
        return None
    rel = (root - tonic) % 12
    scale = scales[mode]
    names = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII']
    prefix = ''
    if rel in scale:
        deg = scale.index(rel)
    elif mode == 'minor' and rel == 11:
        deg = 6
    elif mode == 'major':
        prefix = 'b'
        deg = scale.index((rel + 1) % 12)
    else:
        prefix = '#'
        deg = scale.index((rel - 1) % 12)
    numeral = names[deg] if quality in ('maj', 'aug') else names[deg].lower()
    suffix = {'maj': '', 'min': '', 'dim': '°', 'aug': '+'}[quality]
    return prefix + numeral + suffix
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([0, 'major', 7, 'maj'], 'V'), ([0, 'major', 2, 'min'], 'ii'), ([0, 'major', 11, 'dim'], 'vii°'), ([0, 'major', 8, 'maj'], 'bVI'), ([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 3, 'aug'], 'III+')], [([0, 'major', 10, 'maj'], 'bVII'), ([0, 'major', 1, 'maj'], 'bII'), ([0, 'major', 3, 'maj'], 'bIII'), ([0, 'major', 6, 'dim'], 'bv°'), ([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 0, 'maj'], 'III'), ([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'major', 0, 'aug'], 'I+')], [([9, 'minor', 4, 'maj'], 'V'), ([9, 'minor', 8, 'dim'], 'vii°'), ([9, 'minor', 0, 'maj'], 'III'), ([9, 'minor', 7, 'maj'], 'VII'), ([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([2, 'major', 1, 'dim'], 'vii°')], [([9, 'minor', 6, 'min'], '#vi'), ([9, 'minor', 1, 'maj'], '#III'), ([9, 'minor', 3, 'dim'], '#iv°'), ([0, 'minor', 9, 'min'], '#vi'), ([0, 'minor', 4, 'maj'], '#III'), ([7, 'major', 2, 'maj'], 'V'), ([0, 'major', 0, 'aug'], 'I+'), ([5, 'major', 4, 'dim'], 'vii°')], [([0, 'minor', 11, 'dim'], 'vii°'), ([0, 'minor', 4, 'maj'], '#III'), ([0, 'minor', 3, 'aug'], 'III+'), ([7, 'major', 2, 'maj'], 'V'), ([7, 'major', 0, 'maj'], 'IV'), ([0, 'lydian', 0, 'maj'], None), ([0, 'major', 0, 'sus'], None), ([5, 'minor', 4, 'dim'], 'vii°')]]
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 0VVPassed
oracle 1iiiiPassed
oracle 2vii°vii°Passed
oracle 3bVIbVIPassed
oracle 4bVIIbVIIPassed
oracle 5bIIbIIPassed
oracle 6#iv°#iv°Passed
oracle 7III+III+Passed

SHA-256 / b38234ecaeca0dcd789515c596f20a38aa91d7c28d7135ded037076bca9d0597

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

Case digest / 8a9b2f98e0ed73e1bc60922ca329fdea306cbe4f9a6a5007521769e769041d6e