Normal forms: Difference between revisions

Sintel (talk | contribs)
Normal val lists: the ploidacot form is equivalent to the equave-reduced generator form. Misc. formatting fixes
Line 32: Line 32:
We may write a list of vals (mapping) as a {{nowrap|(''k'', ''d'')}}-shaped matrix (read "k by d", i.e. with <math>k</math> rows and <math>d</math> columns), where the rows of the matrix are the vals (maps), and <math>d</math> is the ''dimensionality'' of the system<ref group="note">Calling the {{w|prime-counting function}}, written π(''x''), on the prime limit will give us this number. For examples, {{nowrap|π(2) {{=}} 1|π(3) {{=}} 2|π(5) {{=}} 3|π(7) {{=}} 4|π(11) {{=}} 5|etc.}}</ref>. To get the '''defactored Hermite form''', we do the following:
We may write a list of vals (mapping) as a {{nowrap|(''k'', ''d'')}}-shaped matrix (read "k by d", i.e. with <math>k</math> rows and <math>d</math> columns), where the rows of the matrix are the vals (maps), and <math>d</math> is the ''dimensionality'' of the system<ref group="note">Calling the {{w|prime-counting function}}, written π(''x''), on the prime limit will give us this number. For examples, {{nowrap|π(2) {{=}} 1|π(3) {{=}} 2|π(5) {{=}} 3|π(7) {{=}} 4|π(11) {{=}} 5|etc.}}</ref>. To get the '''defactored Hermite form''', we do the following:


# First, defactor it (aka make sure it is [[saturated]]).<ref group="note">Historically, this step was not explicitly recognized as necessary for normal forms. The vast majority of normal forms catalogued on the wiki are not contorted/enfactored in the first place, but specifically defining this canonical form to include this requirement is an important step toward ensuring that, which will prevent redundant temperaments from being catalogued. In various domains, normal forms are often required to be unique, however, canonical forms are required to be unique even more often that normal forms are; according to [[Wikipedia: Canonical form]], 'the distinction between "canonical" and "normal" forms varies from subfield to subfield. In most fields, a canonical form specifies a unique representation for every object, while a normal form simply specifies its form, without the requirement of uniqueness.' This is the rationale behind defining "canonical" as opposed to merely "normal". To be more specific, The HNF does provide a unique representation of ''matrices'', i.e. from a perspective of pure mathematics, and so you will certainly find throughout mathematical literature that HNF is described as providing a unique representation, and this is correct. However, when applied to the RTT domain, i.e. to ''mappings'', the HNF sometimes fails to identify equivalent mappings as such. And the critical flaw with HNF is its failure to defactor matrices - meaning that a "contorted" mapping matrix has a different Hermite normal form than a non-contorted one with the same kernel - and this is because dividing rows is not a permitted elementary row operation when computing the HNF. See: [https://math.stackexchange.com/a/685922]. The canonical form as described here ''does'' defactor matrices, and therefore it delivers a truly canonical result.<br />
# First, defactor it (aka make sure it is [[saturated]]).<ref group="note">Historically, this step was not explicitly recognized as necessary for normal forms. The vast majority of normal forms catalogued on the wiki are not contorted/enfactored in the first place, but specifically defining this canonical form to include this requirement is an important step toward ensuring that, which will prevent redundant temperaments from being catalogued. In various domains, normal forms are often required to be unique, however, canonical forms are required to be unique even more often that normal forms are; according to [[Wikipedia: Canonical form]], 'the distinction between "canonical" and "normal" forms varies from subfield to subfield. In most fields, a canonical form specifies a unique representation for every object, while a normal form simply specifies its form, without the requirement of uniqueness.' This is the rationale behind defining "canonical" as opposed to merely "normal". To be more specific, The HNF does provide a unique representation of ''matrices'', i.e. from a perspective of pure mathematics, and so you will certainly find throughout mathematical literature that HNF is described as providing a unique representation, and this is correct. However, when applied to the RTT domain, i.e. to ''mappings'', the HNF sometimes fails to identify equivalent mappings as such. And the critical flaw with HNF is its failure to defactor matrices - meaning that a "contorted" mapping matrix has a different Hermite normal form than a non-contorted one with the same kernel - and this is because dividing rows is not a permitted elementary row operation when computing the HNF. See: [https://math.stackexchange.com/a/685922]. The canonical form as described here ''does'' defactor matrices, and therefore it delivers a truly canonical result.<br>
There is also a rarely mentioned Hermite Canonical Form, or HCF, described here: [http://home.iitk.ac.in/~rksr/html/03CANONICALFACTORIZATIONS.htm], which sort of combines the HNF's constraint and the [[Matrix echelon forms #RREF|RREF]]'s reduced constraint (all pivots equal 1, all other entries in pivot columns are 0, both above and below the pivot), but we didn't find it useful because due to its constraint that all pivots be 1, it does not preserve periods that are genuinely unit fractions of an octave (at first glance, when a pivot is not equal to 1, it might trigger you to think that the mapping is enfactored. But temperaments can legitimately have generators that divide primes evenly, such as 5-limit Blackwood, {{rket| {{map| 5 8 0 }} {{map| 0 0 1 }} }}, which divides the octave into 5 parts. So any form that enforces pivots all be 1's, such as HCF and RREF, would fail this criteria.) It also doesn't qualify as an echelon form, which becomes apparent only when you use it on [[rank-deficient]] matrices, because it doesn't require the rows of all zeros to be at the bottom; instead it (bizarrely, though maybe it's related to how the SNF requires all pivots exactly along the main diagonal) requires the rows to be sorted so that all the pivots fall on the main diagonal.</ref>. Note that if the matrix was not [[full-rank]], this will result in the elimination of some rows<ref group="note">Note that canonicalizing a mapping does not remove trailing ''dimensions'' with only zeros.<br />
There is also a rarely mentioned Hermite Canonical Form, or HCF, described here: [http://home.iitk.ac.in/~rksr/html/03CANONICALFACTORIZATIONS.htm], which sort of combines the HNF's constraint and the [[Matrix echelon forms #RREF|RREF]]'s reduced constraint (all pivots equal 1, all other entries in pivot columns are 0, both above and below the pivot), but we didn't find it useful because due to its constraint that all pivots be 1, it does not preserve periods that are genuinely unit fractions of an octave (at first glance, when a pivot is not equal to 1, it might trigger you to think that the mapping is enfactored. But temperaments can legitimately have generators that divide primes evenly, such as 5-limit Blackwood, {{rket| {{map| 5 8 0 }} {{map| 0 0 1 }} }}, which divides the octave into 5 parts. So any form that enforces pivots all be 1's, such as HCF and RREF, would fail this criteria.) It also doesn't qualify as an echelon form, which becomes apparent only when you use it on [[rank-deficient]] matrices, because it doesn't require the rows of all zeros to be at the bottom; instead it (bizarrely, though maybe it's related to how the SNF requires all pivots exactly along the main diagonal) requires the rows to be sorted so that all the pivots fall on the main diagonal.</ref>. Note that if the matrix was not [[full-rank]], this will result in the elimination of some rows<ref group="note">Note that canonicalizing a mapping does not remove trailing ''dimensions'' with only zeros.<br>
In the case of a mapping, this would take the form of an extra column of all zeros to the right of any non-zero entries, or in other words, an unmapped prime higher than other mapped prime. For example you could have {{rket| {{map| 1 0 -4 0 }} {{map| 0 1 4 0 }} }} which is just 5-limit meantone but represented in the 7-limit even though prime 7 is not used.<br />
In the case of a mapping, this would take the form of an extra column of all zeros to the right of any non-zero entries, or in other words, an unmapped prime higher than other mapped prime. For example you could have {{rket| {{map| 1 0 -4 0 }} {{map| 0 1 4 0 }} }} which is just 5-limit meantone but represented in the 7-limit even though prime 7 is not used.<br>
And for a comma basis the form this would take is rotated 90 degrees: a row of all zeros below all other nonzero entries, e.g. [{{vector| 4 -4 1 0 }}].<br />
And for a comma basis the form this would take is rotated 90 degrees: a row of all zeros below all other nonzero entries, e.g. [{{vector| 4 -4 1 0 }}].<br>
The reason these additional zeros should be preserved and these temperaments be treated as different from their untrimmed counterparts is made clear when we consider the difference in the duals. For a comma basis, the extra dimension implies the presence of extra generators that are unbound to the other generators. For example, a basis for the nullspace of [{{vector| 4 -4 1 }}], or in other words its mapping, as we know well is {{rket| {{map| 1 0 -4 }} {{map| 0 1 4 }} }}. But that is not a basis for the nullspace of [{{vector| 4 -4 1 <span style{{=}}"color: red;">'''0'''</span> }}]; the mapping for that comma basis would have to be {{ket| {{map| 1 0 -4 <span style{{=}}"color: red;">'''0'''</span> }} {{map| 0 1 4 <span style{{=}}"color: red;">'''0'''</span> }} {{map| <span style{{=}}"color: red;">'''0 0 0 1'''</span> }} }}.</ref>. We now have an {{nowrap|(''r'', ''d'')}}-shaped matrix, with ''r'' rows where ''r''  is the ''rank''.
The reason these additional zeros should be preserved and these temperaments be treated as different from their untrimmed counterparts is made clear when we consider the difference in the duals. For a comma basis, the extra dimension implies the presence of extra generators that are unbound to the other generators. For example, a basis for the nullspace of [{{vector| 4 -4 1 }}], or in other words its mapping, as we know well is {{rket| {{map| 1 0 -4 }} {{map| 0 1 4 }} }}. But that is not a basis for the nullspace of [{{vector| 4 -4 1 <span style{{=}}"color: red;">'''0'''</span> }}]; the mapping for that comma basis would have to be {{ket| {{map| 1 0 -4 <span style{{=}}"color: red;">'''0'''</span> }} {{map| 0 1 4 <span style{{=}}"color: red;">'''0'''</span> }} {{map| <span style{{=}}"color: red;">'''0 0 0 1'''</span> }} }}.</ref>. We now have an {{nowrap|(''r'', ''d'')}}-shaped matrix, with ''r'' rows where ''r''  is the ''rank''.
# Then, put this result into HNF.
# Then, put this result into HNF.
Line 157: Line 157:


=== Equave-reduced generator form ===
=== Equave-reduced generator form ===
The '''equave-reduced generator form''' has the matrix modified from the defactored Hermite normal form so that each generator is equave-reduced, where the [[equave]] can be found as the formal prime represented by the first ''column'' of the matrix (which is usually the octave). For more information, see [[Octave reduction #Generalization]].  
The '''equave-reduced generator form''' has the matrix modified from the defactored Hermite normal form so that each generator is equave-reduced, where the [[equave]] can be found as the formal prime represented by the first ''column'' of the matrix (which is usually the octave). This is closely related to [[ploidacot]]s, so it may be casually called the ''ploidacot form''. For more information, see [[Octave reduction #Generalization]].  


Consider the case of septimal meantone. As we know, its defactored Hermite normal form is {{rket| {{map| 1 0 -4 -13 }} {{map| 0 1 4 10 }} }} which corresponds to generators of ~2/1 and ~3/1. In this case, as is typical, the formal prime represented by the first column of the matrix is 2, and so the equave is the octave. Therefore, all generators must be octave-reduced. But our second generator is ~3/1, which is not octave-reduced. We must alter the mapping in such a way that this row represents a generator of ~3/2 instead. We can do that here by adding the second row of the mapping to the first: {{rket| {{map| 1 1 0 -3 }} {{map| 0 1 4 10 }} }}. So that is septimal meantone's equave-reduced generator form, corresponding to generators of ~2/1 and ~3/2.  
Consider the case of septimal meantone. As we know, its defactored Hermite normal form is {{rket| {{map| 1 0 -4 -13 }} {{map| 0 1 4 10 }} }} which corresponds to generators of ~2/1 and ~3/1. In this case, as is typical, the formal prime represented by the first column of the matrix is 2, and so the equave is the octave. Therefore, all generators must be octave-reduced. But our second generator is ~3/1, which is not octave-reduced. We must alter the mapping in such a way that this row represents a generator of ~3/2 instead. We can do that here by adding the second row of the mapping to the first: {{rket| {{map| 1 1 0 -3 }} {{map| 0 1 4 10 }} }}. So that is septimal meantone's equave-reduced generator form, corresponding to generators of ~2/1 and ~3/2.  
Line 169: Line 169:


=== Minimal generator form ===
=== Minimal generator form ===
The '''minimal generator form''' (or '''mingen form''') is a form specific to rank-2 temperaments, where the generator is positive and no greater than half the period.<ref group="note">This is somewhat like octave reduction combined with octave inversion, because you can't just add or subtract half octaves until it's between 0 and 600 cents; you have to add or subtract octaves until it's between &minus;600 and +600 cents, then multiply by &minus;1 if it's negative.</ref><ref group="note">You could always find a smaller and smaller generator by going negative, so this assumes positive generators.</ref>
The '''minimal generator form''' (or '''mingen form''') is a form specific to rank-2 temperaments, where the generator is positive and no greater than half the period.<ref group="note">This is somewhat like octave reduction combined with octave inversion, because you can't just add or subtract half octaves until it's between 0 and 600 cents; you have to add or subtract octaves until it's between −600 and +600 cents, then multiply by −1 if it's negative.</ref><ref group="note">You could always find a smaller and smaller generator by going negative, so this assumes positive generators.</ref>


[[Graham Breed]]'s [http://x31eq.com/temper/ temperament finder] uses this form for all rank-2 temperaments. Septimal meantone in minimal generator form is [{{val| 1 2 4 7 }}, {{val| 0 -1 -4 -10 }}], corresponding to generators of ~2/1 and ~4/3.
[[Graham Breed]]'s [http://x31eq.com/temper/ temperament finder] uses this form for all rank-2 temperaments. Septimal meantone in minimal generator form is {{mapping| 1 2 4 7 l| 0 -1 -4 -10 }}, corresponding to generators of ~2/1 and ~4/3.


Beyond rank-2, the mingen form of a temperament is no longer unique. You can always get smaller and smaller generators. This is why on Graham Breed's temperament finding tool, beyond rank-2 he simply uses the Hermite Normal Form.
Beyond rank-2, the mingen form of a temperament is no longer unique. You can always get smaller and smaller generators. This is why on Graham Breed's temperament finding tool, beyond rank-2 he simply uses the Hermite Normal Form.


Consider the example in the diagram given here: [[Generator form manipulation #Beyond rank-2]]. We begin with {{rket| {{map| 1 2 0 -1 }} {{map| 0 -1 6 10 }} {{map| 0 0 -1 -2 }} }} with generators of 1200., 499.841¢, and 214.024¢, which therefore already satisfies the condition that each generator is less than half the previous generator. But we can transform it into {{rket| {{map| 1 2 2 3 }} {{map| 0 -1 1 0}} {{map| 0 0 -1 -2 }} }} which has a third generator of 116.013¢ instead. This is accomplished by adding row 3 to row 2 five times, which decreases generator 3 by the size of five times row 2, from 214.024¢ by 5 × 499.841 = 2499.205¢ to -2285.18¢; and then subtracting row 3 from row 1 twice, which increases generator 3 by the size of two times row 1, from &minus;2285.18¢ by {{nowrap|2 &times; 1200.{{=}} 2401.}} to 116.013¢. And we can get that generator even smaller if we had instead moved up by 499.841 twice to 1213.71¢ and then down by 1200.6¢ once to 13.109¢ (that's a final mapping of {{rket| {{map| 1 2 -1 -3 }} {{map| 0 -1 8 14 }} {{map| 0 0 -1 -2 }} }}.  
Consider the example in the diagram given here: [[Generator form manipulation #Beyond rank-2]]. We begin with {{rket| {{map| 1 2 0 -1 }} {{map| 0 -1 6 10 }} {{map| 0 0 -1 -2 }} }} with generators of 1200.6{{c}}, 499.841{{c}}, and 214.024{{c}}, which therefore already satisfies the condition that each generator is less than half the previous generator. But we can transform it into {{rket| {{map| 1 2 2 3 }} {{map| 0 -1 1 0 }} {{map| 0 0 -1 -2 }} }} which has a third generator of 116.013¢ instead. This is accomplished by adding row 3 to row 2 five times, which decreases generator 3 by the size of five times row 2, from 214.024{{c}} by 5 × 499.841 = 2499.205{{c}} to -2285.18{{c}}; and then subtracting row 3 from row 1 twice, which increases generator 3 by the size of two times row 1, from −2285.18{{c}} by {{nowrap| 2 × 1200.6{{c}} {{=}} 2401.2{{c}} }} to 116.013{{c}}. And we can get that generator even smaller if we had instead moved up by 499.841 twice to 1213.71¢ and then down by 1200.6¢ once to 13.109¢ (that's a final mapping of {{rket| {{map| 1 2 -1 -3 }} {{map| 0 -1 8 14 }} {{map| 0 0 -1 -2 }} }}.  


You could find smaller and smaller generators if you wanted, by essentially finding increasingly small "commas" between the other generators' sizes (e.g. {{nowrap|5 &times; 1200.}} versus {{nowrap|12 &times; 499.841¢}} is a difference of only 4.908¢) and then shifting generators by those commas.
You could find smaller and smaller generators if you wanted, by essentially finding increasingly small "commas" between the other generators' sizes (e.g. {{nowrap|5 × 1200.6{{c}} }} versus {{nowrap| 12 × 499.841{{c}} }} is a difference of only 4.908{{c}}) and then shifting generators by those commas.


This problem also precludes the possibility of a definitive maximum generator which is still less than half of the previous generator.
This problem also precludes the possibility of a definitive maximum generator which is still less than half of the previous generator.
Line 186: Line 186:
If you have a routine which will compute the reduced row echelon form of a matrix with rows consisting of vals using rational number arithmetic, this can be computed and any rows consisting of the zero val stripped off. The result is a unique identifier for the abstract temperament which is closely related to the normal val list. The intervals of the abstract temperament may be found in the same way, by applying the mappings (which are fractional vals) to monzos; or put in another way, by matrix multiplication of the monzos by the reduced row echelon form matrix.
If you have a routine which will compute the reduced row echelon form of a matrix with rows consisting of vals using rational number arithmetic, this can be computed and any rows consisting of the zero val stripped off. The result is a unique identifier for the abstract temperament which is closely related to the normal val list. The intervals of the abstract temperament may be found in the same way, by applying the mappings (which are fractional vals) to monzos; or put in another way, by matrix multiplication of the monzos by the reduced row echelon form matrix.


For example, if we feed [{{val| 22 35 51 62 }}, {{val| 31 49 72 87 }}, {{val| 84 133 195 236 }}] into a reduced row echelon form routine, we obtain [{{val| 1 0 3 1 }}, {{val| 0 1 -3/7 8/7 }}, {{val| 0 0 0 0 }}]. Stripping off the zero val in the final row, we get E = [{{val| 1 0 3 1 }}, {{val| 0 1 -3/7 8/7 }}]. The monzo for 7/6 is {{monzo| -1 -1 0 1 }}, and E{{monzo| -1 -1 0 1 }} = [0 1/7]. Multiply by {{monzo| 1 0 0 0 }}, the monzo for 2, and the result is E{{monzo| 1 0 0 0 }}, which is [1 0]. We have in fact 7-limit orwell temperament, with period 2 and generator approximately 7/6.
For example, if we feed {{mapping| 22 35 51 62 | 31 49 72 87 | 84 133 195 236 }} into a reduced row echelon form routine, we obtain {{mapping| 1 0 3 1 | 0 1 -3/7 8/7 | 0 0 0 0 }}. Stripping off the zero val in the final row, we get E = {{mapping| 1 0 3 1 | 0 1 -3/7 8/7 }}. The monzo for 7/6 is {{monzo| -1 -1 0 1 }}, and E⋅{{monzo| -1 -1 0 1 }} = [0 1/7]. Multiply by {{monzo| 1 0 0 0 }}, the monzo for 2, and the result is E⋅{{monzo| 1 0 0 0 }}, which is [1 0]. We have in fact 7-limit orwell temperament, with period 2 and generator approximately 7/6.


For more information, see [[RREF]].
For more information, see [[RREF]].