FAILURE MAP
← Case archive

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

Pythagorean ratio for a chain of fifths: flatward chains stacked sharpward · case 01

One fifth down returns 3/2 instead of the fourth 4/3.

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

ROOT CAUSE

The exponent discards the sign of the chain length.

THE FAILURE

The exponent discards the sign of the chain length.

Unsuccessful approach: Inverting the generator fixes negative chains but reverses every positive chain.

Case contract

Input an integer k with |k| <= 24 (booleans rejected). Return (3/2)**k octave-reduced into [1, 2) as [numerator, denominator]; out-of-range or non-integer input returns None.

Why this case matters

Pythagorean and meantone tuning tools stack fifths and octave-reduce the result.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(x):
    if not isinstance(x, int) or isinstance(x, bool) or abs(x) > 24:
        return None
    r = Fraction(3, 2) ** abs(x)
    while r >= 2:
        r /= 2
    while r < 1:
        r *= 2
    return [r.numerator, r.denominator]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[(0, [1, 1]), (1, [3, 2]), (4, [81, 64]), (-1, [4, 3]), (-3, [32, 27]), (25, None), (-25, None), (30, None)], [(2, [9, 8]), (5, [243, 128]), (-2, [16, 9]), (-5, [256, 243]), (30, None), (True, None), ('1', None), (1.0, None)], [(1, [3, 2]), (2, [9, 8]), (3, [27, 16]), (4, [81, 64]), (6, [729, 512]), (-3, [32, 27]), (-6, [1024, 729]), (1.0, None)], [(3, [27, 16]), (4, [81, 64]), (5, [243, 128]), (6, [729, 512]), (7, [2187, 2048]), (12, [531441, 524288]), (-5, [256, 243]), (-12, [1048576, 531441])], [(5, [243, 128]), (6, [729, 512]), (7, [2187, 2048]), (12, [531441, 524288]), (-1, [4, 3]), (-2, [16, 9]), (-6, [1024, 729]), (-24, [549755813888, 282429536481])]]
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[1, 1][1, 1]Passed
oracle 1[3, 2][3, 2]Passed
oracle 2[81, 64][81, 64]Passed
oracle 3[3, 2][4, 3]Failed
oracle 4[27, 16][32, 27]Failed
oracle 5NoneNonePassed
oracle 6NoneNonePassed
oracle 7NoneNonePassed

SHA-256 / 58912f5126eb4d92f5dcc1176ebdaf1043e3962ffaad57f3916f46eb0729aec4

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(x):
    if not isinstance(x, int) or isinstance(x, bool) or abs(x) > 24:
        return None
    r = Fraction(2, 3) ** x
    while r >= 2:
        r /= 2
    while r < 1:
        r *= 2
    return [r.numerator, r.denominator]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[(0, [1, 1]), (1, [3, 2]), (4, [81, 64]), (-1, [4, 3]), (-3, [32, 27]), (25, None), (-25, None), (30, None)], [(2, [9, 8]), (5, [243, 128]), (-2, [16, 9]), (-5, [256, 243]), (30, None), (True, None), ('1', None), (1.0, None)], [(1, [3, 2]), (2, [9, 8]), (3, [27, 16]), (4, [81, 64]), (6, [729, 512]), (-3, [32, 27]), (-6, [1024, 729]), (1.0, None)], [(3, [27, 16]), (4, [81, 64]), (5, [243, 128]), (6, [729, 512]), (7, [2187, 2048]), (12, [531441, 524288]), (-5, [256, 243]), (-12, [1048576, 531441])], [(5, [243, 128]), (6, [729, 512]), (7, [2187, 2048]), (12, [531441, 524288]), (-1, [4, 3]), (-2, [16, 9]), (-6, [1024, 729]), (-24, [549755813888, 282429536481])]]
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[1, 1][1, 1]Passed
oracle 1[4, 3][3, 2]Failed
oracle 2[128, 81][81, 64]Failed
oracle 3[3, 2][4, 3]Failed
oracle 4[27, 16][32, 27]Failed
oracle 5NoneNonePassed
oracle 6NoneNonePassed
oracle 7NoneNonePassed

SHA-256 / 236b72064416684c43c48afb1caecc15f36cb0d107651e85268e92fd5634407e

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / d50b1f1bd752367cf7d88b212a2b65f9ec9639176430d901673497b33558f62d