<!-- canonical: efficientnewlanguage.org/ai/examples/955-twelve-fifths-did-not-make-seven-octaves | ai_layer_version: 0.1.0 | updated: 2026-09-21 -->

# Example 955 — Twelve fifths did not make seven octaves

`twelve_fifths_did_not_make_seven_octaves.eml` - A tuner sets a keyboard by pure fifths, each one checked beatless at exactly three to two, twelve of them around the circle from C back to C, and reasons that twelve fifths climb seven octaves so the last note will match the first. What twelve exact fifths actually climb is computed below.

## EML

```eml
# Self-authored for the EML case corpus (no external origin). A tuner sets a
# keyboard by pure fifths, each one checked beatless at exactly three to two,
# twelve of them around the circle from C back to C, and reasons that twelve
# fifths climb seven octaves so the last note will match the first. What twelve
# exact fifths actually climb is computed below.
#
# The reasoning is careful. Every fifth is a true three to two; twelve fifths
# were counted, not estimated; seven octaves is the right number of octaves to
# come back down; and the intent is exactly 'close the circle on the note it
# started from'.
#
# Twelve fifths multiply to three to the twelfth over two to the twelfth, and
# seven octaves are two to the seventh - so the circle lands on 531441 against
# 524288, about one and a third percent sharp, and no count of pure fifths ever
# closes it because a power of three is odd and a power of two is not.

12 => fifths_around_the_circle
7 => octaves_to_come_back_down

# the exponents below are the two counts above, written as literals

3^12 => fifths_numerator
2^12 => fifths_denominator
2^7 => octaves_ratio
octaves_ratio * fifths_denominator => octaves_over_the_same_denominator
fifths_numerator - octaves_over_the_same_denominator => excess_over_the_same_denominator
int(fifths_numerator * 100000 / octaves_over_the_same_denominator) => circle_landing_per_lakh_of_the_start
circle_landing_per_lakh_of_the_start - 100000 => sharp_by_per_lakh
int(sharp_by_per_lakh / fifths_around_the_circle) => sharp_by_per_lakh_spread_over_each_fifth
fifths_numerator - 2 * int(fifths_numerator / 2) => remainder_of_the_fifths_numerator_on_dividing_by_two

"fifths around the circle        : " + str(fifths_around_the_circle) + ", each exactly 3 to 2" ^0
"octaves to come back down       : " + str(octaves_to_come_back_down) + ", each exactly 2 to 1" ^0
"" ^0
"twelve fifths climb             : " + str(fifths_numerator) + " over " + str(fifths_denominator) ^0
"seven octaves climb             : " + str(octaves_ratio) + ", which is " + str(octaves_over_the_same_denominator) + " over " + str(fifths_denominator) ^0
"the difference                  : " + str(excess_over_the_same_denominator) + " over " + str(fifths_denominator) + ", in the fifths' favour" ^0
"where the circle lands          : " + str(circle_landing_per_lakh_of_the_start) + " per hundred thousand of the start" ^0
"sharp by                        : " + str(sharp_by_per_lakh) + " per hundred thousand" ^0
"spread over twelve fifths       : " + str(sharp_by_per_lakh_spread_over_each_fifth) + " per hundred thousand each" ^0
"fifths numerator mod 2          : " + str(remainder_of_the_fifths_numerator_on_dividing_by_two) + " - odd, and every octave count is even" ^0
"" ^0

# ---- what the tuner verified ----

"the closed-circle reasoning" ^0
"  each fifth : beatless, a true 3 to 2" ^0
"  count : " + str(fifths_around_the_circle) + " fifths, C to G to D and round to C" ^0
"  octaves : " + str(octaves_to_come_back_down) + ", the right number to come back down" ^0
"  intent : close the circle on the note it started from" ^0
"  facts wrong : 0" ^0
"  verdict : TWELVE PURE FIFTHS CLOSE THE CIRCLE" ^0
"" ^0
"  making every fifth exactly 3 to 2 is the part done right" ^0
"  here, and it is why the climb is exactly " + str(fifths_numerator) + " over" ^0
"  " + str(fifths_denominator) + " and not an approximation of it" ^0
"" ^0

# ---- what twelve fifths climb ----

"the arithmetic of the circle" ^0
"  a fifth : multiply the frequency by 3, divide by 2" ^0
"  twelve of them : multiply by 3 twelve times, " + str(fifths_numerator) ^0
"  seven octaves : multiply by 2 seven times, " + str(octaves_ratio) ^0
"  for them to match : a power of 3 would have to equal a power" ^0
"    of 2, and " + str(fifths_numerator) + " is odd while every power of 2 is even" ^0
"  the gap : " + str(sharp_by_per_lakh) + " per hundred thousand, the same for every" ^0
"    tuner who ever tried it, because it is not a tuning error" ^0
"" ^0

# ---- what the tuner got ----

"the last note" ^0
"  believed : the C it started from, seven octaves up" ^0
"  actual : " + str(circle_landing_per_lakh_of_the_start) + " per hundred thousand of it, sharp by " + str(sharp_by_per_lakh) ^0
"  is any fifth impure : no; all twelve are exact" ^0
"  can more care close it : no; the gap is in the integers," ^0
"    and one interval somewhere must absorb it" ^0
"" ^0

# ---- null control ----

# The same circle closed by shaving every fifth by a twelfth of the gap instead
# of by asking twelve pure fifths to meet.
1364 => nc_gap_with_twelve_pure_fifths_per_lakh
0 => nc_gap_with_twelve_fifths_each_shaved_per_lakh
113 => nc_purity_each_fifth_gives_up_per_lakh

"null control - spread the gap over every fifth" ^0
"  gap, twelve pure fifths : " + str(nc_gap_with_twelve_pure_fifths_per_lakh) + " per hundred thousand" ^0
"  gap, twelve fifths each shaved : " + str(nc_gap_with_twelve_fifths_each_shaved_per_lakh) + " per hundred thousand" ^0
"  purity each fifth gives up : " + str(nc_purity_each_fifth_gives_up_per_lakh) + " per hundred thousand" ^0
"  no note and no count changed; the circle closes because no" ^0
"  fifth is pure any more" ^0
"" ^0

# ---- the rule ----

"what twelve exact fifths guarantee" ^0
"  each step is a true 3 to 2 : exactly, and beatless" ^0
"  the twelfth step returns to the start : not addressed; the" ^0
"    product of the steps is " + str(fifths_numerator) + " against " + str(octaves_over_the_same_denominator) + ", and a power" ^0
"    of three cannot equal a power of two, so the circle lands" ^0
"    " + str(sharp_by_per_lakh) + " per hundred thousand sharp however carefully each" ^0
"    step is made" ^0
"" ^0

"a circle of fifths is a spiral drawn from above; the twelve steps are each" ^0
"perfect and the shape they make does not close, and the tuner's only choice is" ^0
"where to hide the seam" ^0
"" ^0

"Every fifth is exactly 3 to 2 - the tuner did that. But twelve of them climb" ^0
"" + str(fifths_numerator) + " against the " + str(octaves_over_the_same_denominator) + " of seven octaves, " + str(sharp_by_per_lakh) + " per hundred thousand sharp, and" ^0
"since " + str(fifths_numerator) + " is odd and no power of two is, the gap is arithmetic, not" ^0
"workmanship, until it is spread across the fifths at " + str(sharp_by_per_lakh_spread_over_each_fifth) + " per hundred thousand each." ^0
```

## Python (deterministic transpilation)

```python
fifths_around_the_circle = 12
octaves_to_come_back_down = 7
fifths_numerator = 3**12
fifths_denominator = 2**12
octaves_ratio = 2**7
octaves_over_the_same_denominator = octaves_ratio * fifths_denominator
excess_over_the_same_denominator = fifths_numerator - octaves_over_the_same_denominator
circle_landing_per_lakh_of_the_start = int(fifths_numerator * 100000 / octaves_over_the_same_denominator)
sharp_by_per_lakh = circle_landing_per_lakh_of_the_start - 100000
sharp_by_per_lakh_spread_over_each_fifth = int(sharp_by_per_lakh / fifths_around_the_circle)
remainder_of_the_fifths_numerator_on_dividing_by_two = fifths_numerator - 2 * int(fifths_numerator / 2)
print("fifths around the circle        : " + str(fifths_around_the_circle) + ", each exactly 3 to 2")
print("octaves to come back down       : " + str(octaves_to_come_back_down) + ", each exactly 2 to 1")
print("")
print("twelve fifths climb             : " + str(fifths_numerator) + " over " + str(fifths_denominator))
print("seven octaves climb             : " + str(octaves_ratio) + ", which is " + str(octaves_over_the_same_denominator) + " over " + str(fifths_denominator))
print("the difference                  : " + str(excess_over_the_same_denominator) + " over " + str(fifths_denominator) + ", in the fifths' favour")
print("where the circle lands          : " + str(circle_landing_per_lakh_of_the_start) + " per hundred thousand of the start")
print("sharp by                        : " + str(sharp_by_per_lakh) + " per hundred thousand")
print("spread over twelve fifths       : " + str(sharp_by_per_lakh_spread_over_each_fifth) + " per hundred thousand each")
print("fifths numerator mod 2          : " + str(remainder_of_the_fifths_numerator_on_dividing_by_two) + " - odd, and every octave count is even")
print("")
print("the closed-circle reasoning")
print("  each fifth : beatless, a true 3 to 2")
print("  count : " + str(fifths_around_the_circle) + " fifths, C to G to D and round to C")
print("  octaves : " + str(octaves_to_come_back_down) + ", the right number to come back down")
print("  intent : close the circle on the note it started from")
print("  facts wrong : 0")
print("  verdict : TWELVE PURE FIFTHS CLOSE THE CIRCLE")
print("")
print("  making every fifth exactly 3 to 2 is the part done right")
print("  here, and it is why the climb is exactly " + str(fifths_numerator) + " over")
print("  " + str(fifths_denominator) + " and not an approximation of it")
print("")
print("the arithmetic of the circle")
print("  a fifth : multiply the frequency by 3, divide by 2")
print("  twelve of them : multiply by 3 twelve times, " + str(fifths_numerator))
print("  seven octaves : multiply by 2 seven times, " + str(octaves_ratio))
print("  for them to match : a power of 3 would have to equal a power")
print("    of 2, and " + str(fifths_numerator) + " is odd while every power of 2 is even")
print("  the gap : " + str(sharp_by_per_lakh) + " per hundred thousand, the same for every")
print("    tuner who ever tried it, because it is not a tuning error")
print("")
print("the last note")
print("  believed : the C it started from, seven octaves up")
print("  actual : " + str(circle_landing_per_lakh_of_the_start) + " per hundred thousand of it, sharp by " + str(sharp_by_per_lakh))
print("  is any fifth impure : no; all twelve are exact")
print("  can more care close it : no; the gap is in the integers,")
print("    and one interval somewhere must absorb it")
print("")
nc_gap_with_twelve_pure_fifths_per_lakh = 1364
nc_gap_with_twelve_fifths_each_shaved_per_lakh = 0
nc_purity_each_fifth_gives_up_per_lakh = 113
print("null control - spread the gap over every fifth")
print("  gap, twelve pure fifths : " + str(nc_gap_with_twelve_pure_fifths_per_lakh) + " per hundred thousand")
print("  gap, twelve fifths each shaved : " + str(nc_gap_with_twelve_fifths_each_shaved_per_lakh) + " per hundred thousand")
print("  purity each fifth gives up : " + str(nc_purity_each_fifth_gives_up_per_lakh) + " per hundred thousand")
print("  no note and no count changed; the circle closes because no")
print("  fifth is pure any more")
print("")
print("what twelve exact fifths guarantee")
print("  each step is a true 3 to 2 : exactly, and beatless")
print("  the twelfth step returns to the start : not addressed; the")
print("    product of the steps is " + str(fifths_numerator) + " against " + str(octaves_over_the_same_denominator) + ", and a power")
print("    of three cannot equal a power of two, so the circle lands")
print("    " + str(sharp_by_per_lakh) + " per hundred thousand sharp however carefully each")
print("    step is made")
print("")
print("a circle of fifths is a spiral drawn from above; the twelve steps are each")
print("perfect and the shape they make does not close, and the tuner's only choice is")
print("where to hide the seam")
print("")
print("Every fifth is exactly 3 to 2 - the tuner did that. But twelve of them climb")
print("" + str(fifths_numerator) + " against the " + str(octaves_over_the_same_denominator) + " of seven octaves, " + str(sharp_by_per_lakh) + " per hundred thousand sharp, and")
print("since " + str(fifths_numerator) + " is odd and no power of two is, the gap is arithmetic, not")
print("workmanship, until it is spread across the fifths at " + str(sharp_by_per_lakh_spread_over_each_fifth) + " per hundred thousand each.")
```

## stdout (executed)

```text
fifths around the circle        : 12, each exactly 3 to 2
octaves to come back down       : 7, each exactly 2 to 1

twelve fifths climb             : 531441 over 4096
seven octaves climb             : 128, which is 524288 over 4096
the difference                  : 7153 over 4096, in the fifths' favour
where the circle lands          : 101364 per hundred thousand of the start
sharp by                        : 1364 per hundred thousand
spread over twelve fifths       : 113 per hundred thousand each
fifths numerator mod 2          : 1 - odd, and every octave count is even

the closed-circle reasoning
  each fifth : beatless, a true 3 to 2
  count : 12 fifths, C to G to D and round to C
  octaves : 7, the right number to come back down
  intent : close the circle on the note it started from
  facts wrong : 0
  verdict : TWELVE PURE FIFTHS CLOSE THE CIRCLE

  making every fifth exactly 3 to 2 is the part done right
  here, and it is why the climb is exactly 531441 over
  4096 and not an approximation of it

the arithmetic of the circle
  a fifth : multiply the frequency by 3, divide by 2
  twelve of them : multiply by 3 twelve times, 531441
  seven octaves : multiply by 2 seven times, 128
  for them to match : a power of 3 would have to equal a power
    of 2, and 531441 is odd while every power of 2 is even
  the gap : 1364 per hundred thousand, the same for every
    tuner who ever tried it, because it is not a tuning error

the last note
  believed : the C it started from, seven octaves up
  actual : 101364 per hundred thousand of it, sharp by 1364
  is any fifth impure : no; all twelve are exact
  can more care close it : no; the gap is in the integers,
    and one interval somewhere must absorb it

null control - spread the gap over every fifth
  gap, twelve pure fifths : 1364 per hundred thousand
  gap, twelve fifths each shaved : 0 per hundred thousand
  purity each fifth gives up : 113 per hundred thousand
  no note and no count changed; the circle closes because no
  fifth is pure any more

what twelve exact fifths guarantee
  each step is a true 3 to 2 : exactly, and beatless
  the twelfth step returns to the start : not addressed; the
    product of the steps is 531441 against 524288, and a power
    of three cannot equal a power of two, so the circle lands
    1364 per hundred thousand sharp however carefully each
    step is made

a circle of fifths is a spiral drawn from above; the twelve steps are each
perfect and the shape they make does not close, and the tuner's only choice is
where to hide the seam

Every fifth is exactly 3 to 2 - the tuner did that. But twelve of them climb
531441 against the 524288 of seven octaves, 1364 per hundred thousand sharp, and
since 531441 is odd and no power of two is, the gap is arithmetic, not
workmanship, until it is spread across the fifths at 113 per hundred thousand each.
```

## Round-trip

`ok: true` — round-trip fixpoint reached (python1 == python2)

## Trace event types

eml:run:start · eml:assign · eml:output · eml:run:done
