FA-81111 / Music interval and transposition theory / Open access
Pythagorean ratio for a chain of fifths: long flatward chains accepted · case 01
A chain of -25 fifths is computed instead of being rejected as out of range.
ROOT CAUSE
The range guard checks only the positive bound.
THE FAILURE
The range guard checks only the positive bound.
Unsuccessful approach: A strict bound also rejects the permitted extreme chains of plus or minus 24.
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 x > 24:
return None
r = Fraction(3, 2) ** 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]), (2, [9, 8]), (3, [27, 16]), (4, [81, 64]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (-25, None)], [(3, [27, 16]), (4, [81, 64]), (5, [243, 128]), (6, [729, 512]), (7, [2187, 2048]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (-25, None)], [(6, [729, 512]), (7, [2187, 2048]), (12, [531441, 524288]), (-1, [4, 3]), (-2, [16, 9]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (-25, None)], [(-1, [4, 3]), (-2, [16, 9]), (-3, [32, 27]), (-5, [256, 243]), (-6, [1024, 729]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (-25, None)], [(-5, [256, 243]), (-6, [1024, 729]), (-12, [1048576, 531441]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (25, None), (-25, None), (30, None)]]
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, 1] | [1, 1] | Passed |
| oracle 1 | [3, 2] | [3, 2] | Passed |
| oracle 2 | [9, 8] | [9, 8] | Passed |
| oracle 3 | [27, 16] | [27, 16] | Passed |
| oracle 4 | [81, 64] | [81, 64] | Passed |
| oracle 5 | [282429536481, 274877906944] | [282429536481, 274877906944] | Passed |
| oracle 6 | [549755813888, 282429536481] | [549755813888, 282429536481] | Passed |
| oracle 7 | [1099511627776, 847288609443] | None | Failed |
SHA-256 / eaba1f956397f75a82ba519f635c4d6964dc84736cbdb0f93040992bb3d3f53b
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(3, 2) ** 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]), (2, [9, 8]), (3, [27, 16]), (4, [81, 64]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (-25, None)], [(3, [27, 16]), (4, [81, 64]), (5, [243, 128]), (6, [729, 512]), (7, [2187, 2048]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (-25, None)], [(6, [729, 512]), (7, [2187, 2048]), (12, [531441, 524288]), (-1, [4, 3]), (-2, [16, 9]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (-25, None)], [(-1, [4, 3]), (-2, [16, 9]), (-3, [32, 27]), (-5, [256, 243]), (-6, [1024, 729]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (-25, None)], [(-5, [256, 243]), (-6, [1024, 729]), (-12, [1048576, 531441]), (24, [282429536481, 274877906944]), (-24, [549755813888, 282429536481]), (25, None), (-25, None), (30, None)]]
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, 1] | [1, 1] | Passed |
| oracle 1 | [3, 2] | [3, 2] | Passed |
| oracle 2 | [9, 8] | [9, 8] | Passed |
| oracle 3 | [27, 16] | [27, 16] | Passed |
| oracle 4 | [81, 64] | [81, 64] | Passed |
| oracle 5 | None | [282429536481, 274877906944] | Failed |
| oracle 6 | None | [549755813888, 282429536481] | Failed |
| oracle 7 | None | None | Passed |
SHA-256 / f453f9fa8ca37e496328470381cd6b97fb778e09a5b913543eafb43a98d6fb47
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.950625+00:00.
Case digest / 8562880c3c9766e7092ee6c6aeb4f9c482e08081a8f0ebb2c49d278355192a31