Temperament addition: Difference between revisions

Cmloegcmluin (talk | contribs)
consistent hyphenation of "prime-count vector"
Cmloegcmluin (talk | contribs)
increase precision of language re: minor determinants, to be explicit about them being the largest possible minors
Line 325: Line 325:
For matrices, negation is accomplished by choosing a single vector and changing the sign of every entry in it. In the case of comma bases, a vector is a column, whereas in a mapping a vector (technically a row vector, or covector) is a row.
For matrices, negation is accomplished by choosing a single vector and changing the sign of every entry in it. In the case of comma bases, a vector is a column, whereas in a mapping a vector (technically a row vector, or covector) is a row.


For matrices, the check for negation is related to canonicalization of multivectors as are used in exterior algebra for RTT. Essentially we take the minors of the matrix, and then look at their leading or trailing entry (leading in the case of a covariant matrix, like a mapping; trailing in the case of a contravariant matrix, like a comma basis): if this entry is positive, so is the temperament, and vice versa.
For matrices, the check for negation is related to canonicalization of multivectors as are used in exterior algebra for RTT. Essentially we take the largest possible minor determinants of the matrix (or "largest-minors" for short), and then look at their leading or trailing entry (leading in the case of a covariant matrix, like a mapping; trailing in the case of a contravariant matrix, like a comma basis): if this entry is positive, so is the temperament, and vice versa.


====5. Entry-wise add====
====5. Entry-wise add====
Line 390: Line 390:
'''3. Defactor.''' Next, verify that both matrices are defactored. In this case, both matrices ''are'' enfactored, each by a factor of 30<ref>or you may prefer to think of this as three different (prime) factors: 2, 3, 5 (which multiply to 30)</ref>. So we'll use addabilization defactoring. Since there's only a single vector in the <span style="color: #3C8031;"><math>L_{\text{dep}}</math></span>, therefore all we need to do is repeatedly add that <span style="color: #3C8031;">one linearly dependent vector</span> to the <span style="color: #B6321C;">linearly independent vector</span> until we find a vector with the target GCD, which we can then simply divide out to defactor the matrix. Specifically, we add 11 times the <span style="color: #3C8031;">linearly dependent vector</span>. For the first matrix, {{map|1 0 -4 -13}} + 11⋅<span style="color: #3C8031;">{{map|19 30 44 53}}</span> = {{map|210 330 480 570}}, whose entries have a GCD = 30, so we can defactor the matrix by dividing that vector by 30, leaving us with <span style="color: #B6321C;">{{map|7 11 16 19}}</span>. Therefore the final matrix here is [<span style="color: #3C8031;">{{map|19 30 44 53}}</span> {{map|7 11 16 19}}⟩. The other matrix matrix happens to defactor in the same way: {{map|1 0 -4 17}} + 11⋅<span style="color: #3C8031;">{{map|19 30 44 53}}</span> = {{map|210 330 480 600}} whose GCD is also 30, reducing to <span style="color: #B6321C;">{{map|7 11 16 20}}</span>, so the final matrix is [<span style="color: #3C8031;">{{map|19 30 44 53}}</span> <span style="color: #B6321C;">{{map|7 11 16 20}}</span>⟩.
'''3. Defactor.''' Next, verify that both matrices are defactored. In this case, both matrices ''are'' enfactored, each by a factor of 30<ref>or you may prefer to think of this as three different (prime) factors: 2, 3, 5 (which multiply to 30)</ref>. So we'll use addabilization defactoring. Since there's only a single vector in the <span style="color: #3C8031;"><math>L_{\text{dep}}</math></span>, therefore all we need to do is repeatedly add that <span style="color: #3C8031;">one linearly dependent vector</span> to the <span style="color: #B6321C;">linearly independent vector</span> until we find a vector with the target GCD, which we can then simply divide out to defactor the matrix. Specifically, we add 11 times the <span style="color: #3C8031;">linearly dependent vector</span>. For the first matrix, {{map|1 0 -4 -13}} + 11⋅<span style="color: #3C8031;">{{map|19 30 44 53}}</span> = {{map|210 330 480 570}}, whose entries have a GCD = 30, so we can defactor the matrix by dividing that vector by 30, leaving us with <span style="color: #B6321C;">{{map|7 11 16 19}}</span>. Therefore the final matrix here is [<span style="color: #3C8031;">{{map|19 30 44 53}}</span> {{map|7 11 16 19}}⟩. The other matrix matrix happens to defactor in the same way: {{map|1 0 -4 17}} + 11⋅<span style="color: #3C8031;">{{map|19 30 44 53}}</span> = {{map|210 330 480 600}} whose GCD is also 30, reducing to <span style="color: #B6321C;">{{map|7 11 16 20}}</span>, so the final matrix is [<span style="color: #3C8031;">{{map|19 30 44 53}}</span> <span style="color: #B6321C;">{{map|7 11 16 20}}</span>⟩.


'''4. Check negativity.''' The next thing we need to do is check the negativity of these two temperaments. If either of the matrices we're adding is negative, then we'll have to change it (if both are negative, then the problem cancels out, and we go back to being right). We check negativity by using the minors of these matrices. The first matrix's minors are (-1, -4, -10, -4, -13, -12) and the second matrix's minors are (-1, -4, 9, -4, 17, 32). What we're looking for here are their leading entries, because these are minors of a mapping (if we were looking at minors of comma bases, we'd be looking at the trailing entries instead). Specifically, we're looking to see if the leading entries are positive. They're not. Which tells us these matrices are both negative! But again, since they were ''both'' negative, the effect cancels out; no need to change anything (but if we wanted to, we could just take the <span style="color: #B6321C;">linearly independent vector</span> for each matrix and negate every entry in it).
'''4. Check negativity.''' The next thing we need to do is check the negativity of these two temperaments. If either of the matrices we're adding is negative, then we'll have to change it (if both are negative, then the problem cancels out, and we go back to being right). We check negativity by using the largest-minors of these matrices. The first matrix's largest-minors are (-1, -4, -10, -4, -13, -12) and the second matrix's largest-minors are (-1, -4, 9, -4, 17, 32). What we're looking for here are their leading entries, because these are largest-minors of a mapping (if we were looking at largest-minors of comma bases, we'd be looking at the trailing entries instead). Specifically, we're looking to see if the leading entries are positive. They're not. Which tells us these matrices are both negative! But again, since they were ''both'' negative, the effect cancels out; no need to change anything (but if we wanted to, we could just take the <span style="color: #B6321C;">linearly independent vector</span> for each matrix and negate every entry in it).


'''5. Add.''' Now the matrices are ready to add:
'''5. Add.''' Now the matrices are ready to add:
Line 2,009: Line 2,009:
* '''[[dimensions]]''': the <math>d</math>, <math>r</math>, and <math>n</math> of a temperament
* '''[[dimensions]]''': the <math>d</math>, <math>r</math>, and <math>n</math> of a temperament
* '''addable''': two temperaments are addable when they have the same dimensions and have <span style="color: #B6321C;"><math>l_{\text{ind}}</math></span> <math>= 1</math>
* '''addable''': two temperaments are addable when they have the same dimensions and have <span style="color: #B6321C;"><math>l_{\text{ind}}</math></span> <math>= 1</math>
* '''negation''': a mapping is negated when the leading entry of its [[minors]] is negative; a comma basis is negated when the trailing entry of its minors is negative  
* '''negation''': a mapping is negated when the leading entry of its [[minors|largest-minors]] is negative; a comma basis is negated when the trailing entry of its largest-minors is negative  


=Wolfram implementation=
=Wolfram implementation=