MOS substitution: Difference between revisions

Inthar (talk | contribs)
ArrowHead294 (talk | contribs)
mNo edit summary
Line 4: Line 4:


{| class="wikitable"
{| class="wikitable"
|+ The three subst 2'''L'''(1'''m'''2'''s''') scales
|+ style="font-size: 105%;" | The three subst 2'''L'''(1'''m'''2'''s''') scales
|-
|-
!rowspan=2| [[UDP]] for filling MOS  
! rowspan="2" | [[UDP]] for filling MOS  
!rowspan=2| filling MOS
! rowspan="2" | filling MOS
!colspan=2| step pattern  
! colspan="2" | step pattern  
!rowspan=2| denoted as
! rowspan="2" | denoted as
|-
|-
!| template MOS:
! Template MOS:
|| <code>LXLXX</code>  
| <code>LXLXX</code>  
|-
|-
|| 2&#124;0
| 2{{pipe}}0
|style="text-align:right;"| <code>mss</code>  
| style="text-align: right;" | <code>mss</code>  
|colspan=2 style="text-align:right;"| <code>LmLss</code>  
| colspan="2" style="text-align: right;" | <code>LmLss</code>  
| subst 2L(1m2s 2&#124;0)
| subst 2L(1m2s 2{{pipe}}0)
|-
|-
|| 1&#124;1
| 1{{pipe}}1
|style="text-align:right;"| <code>sms</code>
| style="text-align: right;"| <code>sms</code>
|colspan=2 style="text-align:right;"| <code>LsLms</code>  
| colspan="2" style="text-align: right;" | <code>LsLms</code>  
| subst 2L(1m1s 1&#124;1)
| subst 2L(1m1s 1{{pipe}}1)
|-
|-
|| 0&#124;2  
| 0{{pipe}}2  
|style="text-align:right;"| <code>ssm</code>
| style="text-align: right;"| <code>ssm</code>
|colspan=2 style="text-align:right;"| <code>LsLsm</code>
| colspan="2" style="text-align: right;" | <code>LsLsm</code>
| subst 2L(1m1s 0&#124;2)
| subst 2L(1m1s 0{{pipe}}2)
|}
|}


Line 64: Line 64:


Here <math>\mathbf{z}</math> is the new step size inserted, <math>\mathbf{y}</math> is the step size in the starting MOS identified with <math>\mathbf{z}</math> by the template MOS, and <math>k</math> is the brightness of the mode of the filling MOS used (<math>k = 0</math> corresponds to the darkest mode; the conventional understanding of "brightness" makes sense as <math>\mathbf{L}</math> (resp. <math>\mathbf{m}</math>) > <math>\mathbf{s}</math>).
Here <math>\mathbf{z}</math> is the new step size inserted, <math>\mathbf{y}</math> is the step size in the starting MOS identified with <math>\mathbf{z}</math> by the template MOS, and <math>k</math> is the brightness of the mode of the filling MOS used (<math>k = 0</math> corresponds to the darkest mode; the conventional understanding of "brightness" makes sense as <math>\mathbf{L}</math> (resp. <math>\mathbf{m}</math>) > <math>\mathbf{s}</math>).
== Denoting modes of a MOS substitution scale ==
== Denoting modes of a MOS substitution scale ==
Just as rotating the filling MOS while fixing the mode of the template MOS serves to distinguish different MOS substitution scales, we take the mode of the template MOS (treating the slot letter as the smaller step) and write it in UDP to indicate the mode of a given MOS substitution scale.
Just as rotating the filling MOS while fixing the mode of the template MOS serves to distinguish different MOS substitution scales, we take the mode of the template MOS (treating the slot letter as the smaller step) and write it in UDP to indicate the mode of a given MOS substitution scale.


For example: Taking the 5|5 mode of the template MOS in subst 5'''L'''(2'''m'''4'''s''' 4&#124;0(2)) ('''LmLsLsLmLss''') yields the mode '''sLmLsLsLmLs''', denoted "subst 5'''L'''(2'''m'''4'''s''' 4&#124;0(2)) 5|5".
For example: Taking the 5|5 mode of the template MOS in subst 5'''L'''(2'''m'''4'''s''' 4&#124;0(2)) ('''LmLsLsLmLss''') yields the mode '''sLmLsLsLmLs''', denoted "subst 5'''L'''(2'''m'''4'''s''' 4|0(2)) 5|5".


== Examples ==
== Examples ==
In the following tables, the interval class of the generators stacked in the generator sequence is such that the perfect generator has fewer <math>\mathbf{X}</math> steps than the imperfect counterpart.
In the following tables, the interval class of the generators stacked in the generator sequence is such that the perfect generator has fewer <math>\mathbf{X}</math> steps than the imperfect counterpart.
=== 5L2m4s ===
=== 5L2m4s ===
To derive groundfault's [[diamech]] scale which has step pattern <math>5\mathbf{L}2\mathbf{m}4\mathbf{s}</math> as <math>\mathsf{MOS\_subst}(5, 2, 4; \mathbf{m}, \mathbf{s}; k)</math>, we exploit <math>(b, c) = 2</math> and substitute <math>2\mathbf{m}4\mathbf{s}</math> into the template MOS <math>5\mathbf{L}6\mathbf{X}</math> (<math>\mathbf{LXLXLXLXLXX}</math>). Since <math>2\mathbf{m}4\mathbf{s}</math> has three distinct modes (<math>\mathbf{ssmssm}, \mathbf{smssms}, \mathbf{mssmss}</math>) and <math>5\mathbf{L}6\mathbf{X}</math> is primitive, we obtain three distinct scales, all of which admit length-3 generator sequences of 2-steps, representing all 3 possible rotations of <math>(\mathbf{L}+\mathbf{m}, \mathbf{L}+\mathbf{s}, \mathbf{L}+\mathbf{s})</math> as displayed in the following table:
To derive groundfault's [[diamech]] scale which has step pattern <math>5\mathbf{L}2\mathbf{m}4\mathbf{s}</math> as <math>\mathsf{MOS\_subst}(5, 2, 4; \mathbf{m}, \mathbf{s}; k)</math>, we exploit <math>(b, c) = 2</math> and substitute <math>2\mathbf{m}4\mathbf{s}</math> into the template MOS <math>5\mathbf{L}6\mathbf{X}</math> (<math>\mathbf{LXLXLXLXLXX}</math>). Since <math>2\mathbf{m}4\mathbf{s}</math> has three distinct modes (<math>\mathbf{ssmssm}, \mathbf{smssms}, \mathbf{mssmss}</math>) and <math>5\mathbf{L}6\mathbf{X}</math> is primitive, we obtain three distinct scales, all of which admit length-3 generator sequences of 2-steps, representing all 3 possible rotations of <math>(\mathbf{L}+\mathbf{m}, \mathbf{L}+\mathbf{s}, \mathbf{L}+\mathbf{s})</math> as displayed in the following table:
{| class="wikitable"
{| class="wikitable"
|+ Diamech as subst 5'''L'''(2'''m'''4'''s''')
|+ style="font-size: 105%;" | Diamech as subst 5'''L'''(2'''m'''4'''s''')
|-
|-
!rowspan=2| <math>k</math>
! rowspan="2" | <math>k</math>
!rowspan=2| filling MOS
! rowspan="2" | Filling MOS
!rowspan=2| [[UDP]] for filling MOS  
! rowspan="2" | [[UDP]] for filling MOS  
!colspan=2| step pattern  
! colspan="2" | Step pattern  
!colspan=2| generator sequence  
! colspan="2" | Generator sequence  
!rowspan=2| MOS for <math>\mathbf{s} = \mathbf{0}</math>
! rowspan="2" | MOS for <math>\mathbf{s} = \mathbf{0}</math>
|-
|-
!| template MOS:
! Template MOS:
|| <code>LXLXLXLXLXX</code>  
| <code>LXLXLXLXLXX</code>  
!| intvl. class of gen.:
! Interval class of gen.:
|| 2-steps
| 2-steps
|-
|-
| 2 || <code>mssmss</code> || 4&#124;0(2)  
| 2 || <code>mssmss</code> || 4{{pipe}}0(2)  
|colspan=2 style="text-align:right;"| <code>LmLsLsLmLss</code>  
| colspan="2style="text-align: right;" | <code>LmLsLsLmLss</code>  
|colspan=2| GS('''L'''+'''m''', '''L'''+'''s''', '''L'''+'''s''') || yes
| colspan="2" | GS({{nowrap|'''L''' + '''m'''}}, {{nowrap|'''L''' + '''s'''}}, {{nowrap|'''L''' + '''s'''}}) || yes
|-
|-
| 1 || <code>smssms</code> || 2&#124;2(2)  
| 1 || <code>smssms</code> || 2{{pipe}}2(2)  
|colspan=2 style="text-align:right;"| <code>LsLmLsLsLms</code>  
| colspan="2style="text-align: right;" | <code>LsLmLsLsLms</code>  
|colspan=2| GS('''L'''+'''s''', '''L'''+'''m''', '''L'''+'''s''') || yes
| colspan="2" | GS({{nowrap|'''L''' + '''s'''}}, {{nowrap|'''L''' + '''m'''}}, {{nowrap|'''L''' + '''s'''}}) || yes
|-
|-
| 0 || <code>ssmssm</code> || 0&#124;4(2)  
| 0 || <code>ssmssm</code> || 0{{pipe}}4(2)  
|colspan=2 style="text-align:right;"| <code>LsLsLmLsLsm</code>
| colspan="2style="text-align: right;" | <code>LsLsLmLsLsm</code>
|colspan=2| GS('''L'''+'''s''', '''L'''+'''s''', '''L'''+'''m''') || yes
| colspan="2" | GS({{nowrap|'''L''' + '''s'''}}, {{nowrap|'''L''' + '''s'''}}, {{nowrap|'''L''' + '''m'''}}) || yes
|}
|}


=== 5L2m6s ===
=== 5L2m6s ===
{| class="wikitable"
{| class="wikitable"
|+ subst 5L(2m6s)
|+ style="font-size: 105%;" | Substituted 5L(2m6s)
|-
|-
!rowspan=2| <math>k</math>
! rowspan="2" | <math>k</math>
!rowspan=2| filling MOS (1 period)
! rowspan="2" | Filling MOS
!rowspan=2| [[UDP]] for filling MOS  
! rowspan="2" | [[UDP]] for filling MOS  
!colspan=2| step pattern  
! colspan="2" | Step pattern  
!colspan=2| generator sequence  
! colspan="2" | Generator sequence  
!rowspan=2| MOS for <math>\mathbf{s} = \mathbf{0}</math>
! rowspan="2" | MOS for <math>\mathbf{s} = \mathbf{0}</math>
|-
|-
!| template MOS:
! Template MOS:
|| <code>LXLXXLXLXXLXX</code>  
| <code>LXLXLXLXLXX</code>  
!| intvl. class of gen.:
! Interval class of gen.:
|| 5-steps
| 5-steps
|-
|-
| 3 || <code>msss</code> || 6&#124;0(2)  
| 3 || <code>msss</code> || 6{{pipe}}0(2)  
|colspan=2 style="text-align:right;"| <code>LmLssLsLmsLss</code>  
| colspan="2style="text-align: right;" | <code>LmLssLsLmsLss</code>  
|colspan=2| GS((2'''L'''+'''m'''+2'''s''')<sup>3</sup>, 2'''L'''+3'''s''') || yes
| colspan="2" | GS(({{nowrap|2'''L''' + '''m''' + 2'''s'''}})<sup>3</sup>, {{nowrap|2'''L''' + 3'''s'''}}) || yes
|-
|-
| 2 || <code>smss</code> || 4&#124;2(2)  
| 2 || <code>smss</code> || 4{{pipe}}2(2)  
|colspan=2 style="text-align:right;"| <code>LsLmsLsLsmLss</code>  
| colspan="2style="text-align: right;" | <code>LsLmsLsLsmLss</code>  
|colspan=2| GS((2'''L'''+'''m'''+2'''s''')<sup>2</sup>, 2'''L'''+3'''s''', 2'''L'''+'''m'''+2'''s''') || yes
| colspan="2" | GS(({{nowrap|2'''L''' + '''m''' + 2'''s'''}})<sup>2</sup>, {{nowrap|2'''L''' + 3'''s'''}}, {{nowrap|2'''L''' + '''m''' + 2'''s'''}}) || yes
|-
|-
| 1 || <code>ssms</code> || 2&#124;4(2)  
| 1 || <code>ssms</code> || 2{{pipe}}4(2)  
|colspan=2 style="text-align:right;"| <code>LsLsmLsLssLms</code>  
| colspan="2style="text-align: right;" | <code>LsLsmLsLssLms</code>  
|colspan=2| GS(2'''L'''+'''m'''+2'''s''', 2'''L'''+3'''s''', (2'''L'''+'''m'''+2'''s''')<sup>2</sup>) || yes
| colspan="2" | GS({{nowrap|2'''L''' + '''m''' + 2'''s'''}}, {{nowrap|2'''L''' + 3'''s'''}}, ({{nowrap|2'''L''' + '''m''' + 2'''s'''}})<sup>2</sup>) || yes
|-
|-
| 0 || <code>sssm</code> || 0&#124;6(2)  
| 0 || <code>sssm</code> || 0{{pipe}}6(2)  
|colspan=2 style="text-align:right;"| <code>LsLssLmLssLsm</code>  
| colspan="2style="text-align: right;" | <code>LsLssLmLssLsm</code>  
|colspan=2| GS(2'''L'''+3'''s''', (2'''L'''+'''m'''+2'''s''')<sup>3</sup>) || yes
| colspan="2" | GS({{nowrap|2'''L''' + 3'''s'''}}, ({{nowrap|2'''L''' + '''m''' + 2'''s'''}})<sup>3</sup>) || yes
|}
|}
Here the notation ''G''<sup>''k''</sup> denotes repeating the generator ''G'' ''k'' times in the generator sequence.
Here the notation ''G''<sup>''k''</sup> denotes repeating the generator ''G'' ''k'' times in the generator sequence.
Line 137: Line 139:
These are four of the 8 [[billiard scale]]s that have pattern 5'''L'''2'''m'''6'''s'''. The other four billiard words have length-3 subwords of non-'''X''' letters, unlike the MOS substitution scales.
These are four of the 8 [[billiard scale]]s that have pattern 5'''L'''2'''m'''6'''s'''. The other four billiard words have length-3 subwords of non-'''X''' letters, unlike the MOS substitution scales.


This scale pattern is available in [[37edo]] with step ratio 5:3:1; the generator sequence in the tuning has 2'''L'''+'''m'''+2'''s''' = 486.5 (~4/3) and 2'''L'''+3'''s''' = 421.6 (~14/11), and notably this tuning represents all primes from 3 to 13 with only 3 being inaccurate. 65edo's 9:7:1 is an optimum for 2.3.5.11, and is given by a GS using three 4/3's and one 5/4.
This scale pattern is available in [[37edo]] with step ratio 5:3:1; the generator sequence in the tuning has {{nowrap|2'''L''' + '''m''' + 2'''s''' {{=}} 486.5 (~4/3)}} and {{nowrap|2'''L'''  
+ 3'''s''' {{=}} 421.6 (~14/11)}}, and notably this tuning represents all primes from 3 to 13 with only 3 being inaccurate. 65edo's 9:7:1 is an optimum for 2.3.5.11, and is given by a GS using three 4/3's and one 5/4.


=== 6L7m9s ===
=== 6L7m9s ===
{| class="wikitable"
{| class="wikitable"
|+ subst 7m(6L9s)
|+ style="font-size: 105%;" | Substituted 7m(6L9s)
|-
|-
!rowspan=2| <math>k</math>
! rowspan="2" | <math>k</math>
!rowspan=2| filling MOS (1 period)
! rowspan="2" | Filling MOS
!rowspan=2| [[UDP]] for filling MOS  
! rowspan="2" | [[UDP]] for filling MOS  
!colspan=2| step pattern  
! colspan="2" | Step pattern  
!colspan=2| generator sequence  
! colspan="2" | Generator sequence  
!rowspan=2| MOS for <math>\mathbf{s} = \mathbf{0}</math>
! rowspan="2" | MOS for <math>\mathbf{s} = \mathbf{0}</math>
|-
|-
!| template MOS:
! Template MOS:
|| <code>mXXmXXmXXmXXmXXmXXmXXX</code>  
| <code>mXXmXXmXXmXXmXXmXXmXXX</code>  
!| intvl. class of gen.:
! Interval class of gen.:
|| 3-steps
| 3-steps
|-
|-
| 4 || <code>LsLss</code> || 12&#124;0(3)  
| 4 || <code>LsLss</code> || 12{{pipe}}0(3)  
|colspan=2 style="text-align:right;"| <code>mLsmLsmsLmsLmssmLsmLss</code>  
| colspan="2" style="text-align: right;" | <code>mLsmLsmsLmsLmssmLsmLss</code>  
|colspan=2| GS('''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''', '''m'''+2'''s''') || yes
| colspan="2" | GS({{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''m''' + 2'''s'''}}) || yes
|-
|-
| 3 || <code>LssLs</code> || 9&#124;3(3)  
| 3 || <code>LssLs</code> || 9{{pipe}}3(3)  
|colspan=2 style="text-align:right;"| <code>mLsmsLmsLmssmLsmLsmsLs</code>  
| colspan="2" style="text-align: right;" | <code>mLsmsLmsLmssmLsmLsmsLs</code>  
|colspan=2| GS('''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''', '''m'''+2'''s''', '''L'''+'''m'''+'''s''') || yes
| colspan="2" | GS({{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''m''' + 2'''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}) || yes
|-
|-
| 2 || <code>sLsLs</code> || 6&#124;6(3)  
| 2 || <code>sLsLs</code> || 6{{pipe}}6(3)  
|colspan=2 style="text-align:right;"| <code>msLmsLmssmLsmLsmsLmsLs</code>  
| colspan="2" style="text-align: right;" | <code>msLmsLmssmLsmLsmsLmsLs</code>  
|colspan=2| GS('''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''', '''m'''+2'''s''', '''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''') || yes
| colspan="2" | GS({{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''m''' + 2'''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}) || yes
|-
|-
| 1 || <code>sLssL</code> || 3&#124;9(3)  
| 1 || <code>sLssL</code> || 3{{pipe}}9(3)  
|colspan=2 style="text-align:right;"| <code>msLmssmLsmLsmsLmsLmssL</code>  
| colspan="2" style="text-align: right;" | <code>msLmssmLsmLsmsLmsLmssL</code>  
|colspan=2| GS('''L'''+'''m'''+'''s''', '''m'''+2'''s''', '''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''') || yes
| colspan="2" | GS({{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''m''' + 2'''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}) || yes
|-
|-
| 0 || <code>ssLsL</code> || 0&#124;12(3)  
| 0 || <code>ssLsL</code> || 0{{pipe}}12(3)  
|colspan=2 style="text-align:right;"| <code>mssmLsmLsmsLmsLmssmLsL</code>
| colspan="2" style="text-align: right;" | <code>mssmLsmLsmsLmsLmssmLsL</code>
|colspan=2| GS('''m'''+2'''s''', '''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''', '''L'''+'''m'''+'''s''')  || no
| colspan="2" | GS({{nowrap|'''m''' + 2'''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}}, {{nowrap|'''L''' + '''m''' + '''s'''}})  || no
|}
|}


== Mathematical facts ==
== Mathematical facts ==
=== A ternary scale whose L = m and s = 0 temperings are MOS comes from MOS substitution ===
=== A ternary scale whose {{nowrap|L {{=}} m}} and {{nowrap|s {{=}} 0}} temperings are MOS comes from MOS substitution ===
If a ternary scale with [[step signature]] ''a'''''L'''''b'''''m'''''c'''''s''' satisfies:
If a ternary scale with [[step signature]] ''a'''''L'''''b'''''m'''''c'''''s''' satisfies:
# the result of identifying '''L''' steps with '''m''' steps is a MOS;
# the result of identifying '''L''' steps with '''m''' steps is a MOS;
# the result of deleting all '''s''' steps is a MOS,
# the result of deleting all '''s''' steps is a MOS,
then it is a MOS substitution scale, namely subst((''a''+''b'')'''X'''''c'''''s'''(''i''), '''X''', ''a'''''L'''''b'''''m'''(''j'')) for some brightnesses ''i'' and ''j''.
then it is a MOS substitution scale, namely subst(({{nowrap|''a'' + ''b''}})'''X'''''c'''''s'''(''i''), '''X''', ''a'''''L'''''b'''''m'''(''j'')) for some brightnesses ''i'' and ''j''.


In particular, all [[monotone-MOS scale]]s (i.e. such that the results of '''L''' = '''m''', '''m''' = '''s''', and '''s''' = '''0''' temperings are MOSes) arise from MOS substitution in this way.
In particular, all [[monotone-MOS scale]]s (i.e. such that the results of {{nowrap|'''L''' {{=}} '''m'''}}, {{nowrap|'''m''' {{=}} '''s'''}}, and {{nowrap|'''s''' {{=}} '''0'''}} temperings are MOSes) arise from MOS substitution in this way.


=== If the template MOS is primitive, MOS substitution yields binary well-formed generator sequences ===
=== If the template MOS is primitive, MOS substitution yields binary well-formed generator sequences ===
Line 190: Line 193:
Consider the mode of the template MOS <math>T = T(\mathbf{m},\mathbf{X}) = (a+c)\mathbf{X}b\mathbf{m}(0).</math> This is the mode of <math>T</math> that has the most <math>\mathbf{X}</math> steps near the end. If <math>T</math> is [[primitive]], let <math>r</math> be the count of <math>\mathbf{X}</math> steps in a chosen (reduced) generator of <math>T.</math> Since <math>r</math> must be coprime to <math>a+c,</math> <math>r</math>-steps in the filling MOS <math>F = a\mathbf{L}c\mathbf{s}(k)</math> come in exactly 2 sizes, <math>i\mathbf{L}+j\mathbf{s}</math> and <math>(i-1)\mathbf{L}+(j+1)\mathbf{s}.</math> Since the detempering of the imperfect generator of <math>T</math> occurs only once in <math>S</math>, <math>S</math> admits a particularly elegant well-formed binary (using two distinct generators) [[generator sequence]] of length <math>q,</math> corresponding to the circle of <math>r</math>-steps in the filling MOS. Letting <math>\mathsf{GS}(g_1, ..., g_{q})</math> be this generator sequence, <math>g_j</math> is either <math>p\mathbf{m} + i\mathbf{L} + j\mathbf{s}</math> or <math>p\mathbf{m} + (i-1)\mathbf{L} + (j+1)\mathbf{s},</math> according as the <math>j</math>-th <math>r</math>-step in the sequence of stacked <math>r</math>-steps on the chosen mode of <math>F</math> is <math>i\mathbf{L} + j\mathbf{s}</math> or <math>(i-1)\mathbf{L} + (j+1)\mathbf{s}.</math> (We could have chosen to use the mode of <math>T</math> on the other extreme of its generator arc instead, which corresponds to taking the circle of <math>(a+c - r)</math>-steps in <math>F</math> and is thus also valid.) The generator of the template MOS serves as the "guide generator" for this generator sequence.
Consider the mode of the template MOS <math>T = T(\mathbf{m},\mathbf{X}) = (a+c)\mathbf{X}b\mathbf{m}(0).</math> This is the mode of <math>T</math> that has the most <math>\mathbf{X}</math> steps near the end. If <math>T</math> is [[primitive]], let <math>r</math> be the count of <math>\mathbf{X}</math> steps in a chosen (reduced) generator of <math>T.</math> Since <math>r</math> must be coprime to <math>a+c,</math> <math>r</math>-steps in the filling MOS <math>F = a\mathbf{L}c\mathbf{s}(k)</math> come in exactly 2 sizes, <math>i\mathbf{L}+j\mathbf{s}</math> and <math>(i-1)\mathbf{L}+(j+1)\mathbf{s}.</math> Since the detempering of the imperfect generator of <math>T</math> occurs only once in <math>S</math>, <math>S</math> admits a particularly elegant well-formed binary (using two distinct generators) [[generator sequence]] of length <math>q,</math> corresponding to the circle of <math>r</math>-steps in the filling MOS. Letting <math>\mathsf{GS}(g_1, ..., g_{q})</math> be this generator sequence, <math>g_j</math> is either <math>p\mathbf{m} + i\mathbf{L} + j\mathbf{s}</math> or <math>p\mathbf{m} + (i-1)\mathbf{L} + (j+1)\mathbf{s},</math> according as the <math>j</math>-th <math>r</math>-step in the sequence of stacked <math>r</math>-steps on the chosen mode of <math>F</math> is <math>i\mathbf{L} + j\mathbf{s}</math> or <math>(i-1)\mathbf{L} + (j+1)\mathbf{s}.</math> (We could have chosen to use the mode of <math>T</math> on the other extreme of its generator arc instead, which corresponds to taking the circle of <math>(a+c - r)</math>-steps in <math>F</math> and is thus also valid.) The generator of the template MOS serves as the "guide generator" for this generator sequence.


=== If the template is a primitive MOS, and for some perfect generators <math>p_T, p_F, \ |p_T|_\mathbf{X} = |p_F|,</math> then MOS substitution yields almost parallelograms in the lattice ===
=== If the template is a primitive MOS, and for some perfect generators <math>p_T, p_F, \ \left|p_T\right|_\mathbf{X} = \left|p_F\right|,</math> then MOS substitution yields almost parallelograms in the lattice ===
With the additional assumption that the number of X's in a perfect generator ''p''<sub>''T''</sub> of the template MOS be a generator class of the filling MOS, the generator sequence yields ''q'' parallel chains ''C''<sub>1</sub>,  
With the additional assumption that the number of X's in a perfect generator ''p''<sub>''T''</sub> of the template MOS be a generator class of the filling MOS, the generator sequence yields ''q'' parallel chains ''C''<sub>1</sub>,  
..., ''C''<sub>''q''</sub> of the aggregate generator. The offset between ''C''<sub>''i''</sub> and ''C''<sub>''i''+1</sub> is equal to subst(''p''<sub>''T''</sub>, '''X''', ''p''<sub>''F''</sub>), where ''p''<sub>''T''</sub> and ''p''<sub>''F''</sub> are perfect generators (of appropriate lengths) of the template and filling MOSes, respectively. The aggregate generator is  subst((''p''<sub>''T''</sub>)<sup>''r''</sup>, '''X''', ''F''<sup>''r''</sup>), where ''F'' is the filling MOS.
..., ''C''<sub>''q''</sub> of the aggregate generator. The offset between ''C''<sub>''i''</sub> and ''C''<sub>''i''+1</sub> is equal to subst(''p''<sub>''T''</sub>, '''X''', ''p''<sub>''F''</sub>), where ''p''<sub>''T''</sub> and ''p''<sub>''F''</sub> are perfect generators (of appropriate lengths) of the template and filling MOSes, respectively. The aggregate generator is  subst((''p''<sub>''T''</sub>)<sup>''r''</sup>, '''X''', ''F''<sup>''r''</sup>), where ''F'' is the filling MOS.
Line 207: Line 210:


=== MOS substitution scales have block balance at most 2 ===
=== MOS substitution scales have block balance at most 2 ===
Consider a MOS substitution scale a'''X''' (b'''Y''' c'''Z'''). It is obvious that '''X''' has [[block balance]] 1, since we can replace the MOS substitution scale with the MOS scale a'''X''' (b + c)'''W''' to make this argument. '''Y''' and '''Z''' have block balance at most 2, since we can consider windows of the MOS scale of size ''k'' or ''k'' + 1, and the number of times '''Y''' (and also '''Z''') differs by at most 2. This is proved below for '''Y''', but it's exactly the same argument for '''Z''':
Consider a MOS substitution scale {{nowrap|a'''X''' (b'''Y''' c'''Z''')}}. It is obvious that '''X''' has [[block balance]] 1, since we can replace the MOS substitution scale with the MOS scale a'''X''' ({{nowrap|b + c}})'''W''' to make this argument. '''Y''' and '''Z''' have block balance at most 2, since we can consider windows of the MOS scale of size ''k'' or {{nowrap|''k'' + 1}}, and the number of times '''Y''' (and also '''Z''') differs by at most 2. This is proved below for '''Y''', but it's exactly the same argument for '''Z''':


Case 1: one of ''k'' and ''k'' + 1 equals (''b'' + ''c'') and '''Y''' occurs exactly ''b'' times or ''b'' plus or minus 1 in this case.
Case 1: one of ''k'' and {{nowrap|''k'' + 1}} equals ({{nowrap|''b'' + ''c''}}) and '''Y''' occurs exactly ''b'' times or ''b'' plus or minus 1 in this case.


Case 2: neither of ''k'' and ''k'' + 1 equals (''b'' + ''c''). Here, if '''Y''' occurs ''j'' or ''j'' + 1 times in a window of size ''k'', then ''Y'' occurs ''j'' + 1 or ''j'' + 2 times in a window of size ''k'' + 2.
Case 2: neither of ''k'' and {{nowrap|''k'' + 1}} equals ({{nowrap|''b'' + ''c''}}). Here, if '''Y''' occurs ''j'' or {{nowrap|''j'' + 1}} times in a window of size ''k'', then ''Y'' occurs {{nowrap|''j'' + 1}} or {{nowrap|''j'' + 2}} times in a window of size {{nowrap|''k'' + 2}}.


== MOS substitution scales and RTT ==
== MOS substitution scales and RTT ==
Line 470: Line 473:
     */
     */
}
}
</syntaxhighlight>
</syntaxhighlight>