Normal forms: Difference between revisions
Wikispaces>genewardsmith **Imported revision 143888077 - Original comment: ** |
Wikispaces>genewardsmith **Imported revision 153447167 - Original comment: ** |
||
| Line 1: | Line 1: | ||
<h2>IMPORTED REVISION FROM WIKISPACES</h2> | <h2>IMPORTED REVISION FROM WIKISPACES</h2> | ||
This is an imported revision from Wikispaces. The revision metadata is included below for reference:<br> | This is an imported revision from Wikispaces. The revision metadata is included below for reference:<br> | ||
: This revision was by author [[User:genewardsmith|genewardsmith]] and made on <tt>2010- | : This revision was by author [[User:genewardsmith|genewardsmith]] and made on <tt>2010-07-21 06:14:27 UTC</tt>.<br> | ||
: The original revision id was <tt> | : The original revision id was <tt>153447167</tt>.<br> | ||
: The revision comment was: <tt></tt><br> | : The revision comment was: <tt></tt><br> | ||
The revision contents are below, presented both in the original Wikispaces Wikitext format, and in HTML exactly as Wikispaces rendered it.<br> | The revision contents are below, presented both in the original Wikispaces Wikitext format, and in HTML exactly as Wikispaces rendered it.<br> | ||
| Line 29: | Line 29: | ||
==Normal interval lists== | ==Normal interval lists== | ||
Given a list of p-limit intervals, we can convert it to a normal list by the following procedure: | Given a list of p-limit intervals, we can convert it to a normal list by the following procedure: | ||
| Line 53: | Line 52: | ||
==Normal val lists== | ==Normal val lists== | ||
If L is a list of n vals, we may write it as an nxm matrix, where the rows of the matrix are the vals, and m = pi(p), where p is the prime limit. To get the normal val list, we do the following: | If L is a list of n vals, we may write it as an nxm matrix, where the rows of the matrix are the vals, and m = pi(p), where p is the prime limit. To get the normal val list, we do the following: | ||
(1) Hermite reduce the matrix for L | (1) Hermite reduce the matrix for L | ||
(2) Throw away all rows which consist of nothing but zeros | (2) Throw away all rows which consist of nothing but zeros, resulting in a kxm matrix | ||
( | (3) Find the [[http://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse|Moore-Penrose pseudoinverse]] of the kxm matrix, take its transpose, and multiply this from the left by the row vector [1 log2(3) log2(5) ... log2(p)]. If the ith entry in the result is negative, multiply the corresponding val by -1. Return the result as the normalized val list. | ||
and multiply | |||
[1 log2(3) log2(5) ... log2(p)]. If the ith entry in the result is negative, multiply the corresponding val by -1. Return the result as the normalized val list. | |||
The point of steps three | The point of steps two and three is that now the vals on the list correspond to a list of generators which are all positive (written additively) or equivalently greater than 1 (written multiplicatively.) Just as a normal comma list can be used to classify an abstract regular temperament, so can a normal val list. The val list is what on [[Graham Breed]]'s [[http://x31eq.com/temper/|web site]] is called a "mapping", put into a canonical form. | ||
==Maple code== | ==Maple code== | ||
Below is Maple code for finding the normal interval and val list, given an interval list or a val list. | Below is Maple code for finding the normal interval and val list, given an interval list or a val list. | ||
log2 := proc(x) evalf(ln(x)/ln(2)) end: | |||
transpos := proc(w) | |||
# transpose of listlist w | |||
local u; | |||
u := Matrix(w); | |||
u := LinearAlgebra[Transpose](u); | |||
convert(u, listlist) end: | |||
pseudo := proc(w) | |||
# pseudoinverse of listlist w | |||
local u; | |||
u := Matrix(w); | |||
u := LinearAlgebra[MatrixInverse](u, method='pseudo'); | |||
convert(u, listlist) end: | |||
psu := proc(w) transpos(pseudo(w)) end: | |||
pril := proc(n) | pril := proc(n) | ||
| Line 92: | Line 99: | ||
convert(convert(v,array),list) end: | convert(convert(v,array),list) end: | ||
orp := proc(w, p) padic[ordp](w, p) end: | |||
# | |||
pim := proc(q) | |||
# rank of p-limit of q | |||
local r, i, p; | local r, i, p; | ||
r := 1; | r := 1; | ||
| Line 100: | Line 109: | ||
i := i+1; | i := i+1; | ||
p := ithprime(i); | p := ithprime(i); | ||
r := r*p^ | r := r*p^orp(q, p) od; | ||
if i=0 then RETURN(0) fi; | |||
i end: | i end: | ||
plim := proc(q) | |||
# prime limit of rational number q | |||
ithprime(pim(q)) end: | |||
rat2monz := proc(q, n) | rat2monz := proc(q, n) | ||
| Line 147: | Line 161: | ||
norv := proc(l) | norv := proc(l) | ||
# normal val list from list of vals l | # normal val list from list of vals l | ||
local | local u, v, w, i, n, a; | ||
u := herm(l); | u := herm(l); | ||
n := rnk(u); | |||
v := NULL: | v := NULL: | ||
for i from 1 to | for i from 1 to n do | ||
v := v,u[i] od; | v := v,u[i] od; | ||
v := [v]; | v := [v]; | ||
u := psu(v); | |||
w := pril(n); | |||
a := op(matmul(w, u)); | |||
a := | |||
u := NULL; | u := NULL; | ||
for i from 1 to | for i from 1 to n do | ||
if a[i] < 0 then u := u,-v[i] fi; | if a[i] < 0 then u := u,-v[i] fi; | ||
if a[i] >= 0 then u := u,v[i] fi od; | if a[i] >= 0 then u := u,v[i] fi od; | ||
[u] end: | [u] end: | ||
</pre></div> | </pre></div> | ||
<h4>Original HTML content:</h4> | <h4>Original HTML content:</h4> | ||
| Line 190: | Line 201: | ||
<br /> | <br /> | ||
<!-- ws:start:WikiTextHeadingRule:0:&lt;h2&gt; --><h2 id="toc0"><a name="x-Normal interval lists"></a><!-- ws:end:WikiTextHeadingRule:0 -->Normal interval lists</h2> | <!-- ws:start:WikiTextHeadingRule:0:&lt;h2&gt; --><h2 id="toc0"><a name="x-Normal interval lists"></a><!-- ws:end:WikiTextHeadingRule:0 -->Normal interval lists</h2> | ||
Given a list of p-limit intervals, we can convert it to a normal list by the following procedure:<br /> | Given a list of p-limit intervals, we can convert it to a normal list by the following procedure:<br /> | ||
<br /> | <br /> | ||
| Line 214: | Line 224: | ||
<br /> | <br /> | ||
<!-- ws:start:WikiTextHeadingRule:2:&lt;h2&gt; --><h2 id="toc1"><a name="x-Normal val lists"></a><!-- ws:end:WikiTextHeadingRule:2 -->Normal val lists</h2> | <!-- ws:start:WikiTextHeadingRule:2:&lt;h2&gt; --><h2 id="toc1"><a name="x-Normal val lists"></a><!-- ws:end:WikiTextHeadingRule:2 -->Normal val lists</h2> | ||
If L is a list of n vals, we may write it as an nxm matrix, where the rows of the matrix are the vals, and m = pi(p), where p is the prime limit. To get the normal val list, we do the following:<br /> | If L is a list of n vals, we may write it as an nxm matrix, where the rows of the matrix are the vals, and m = pi(p), where p is the prime limit. To get the normal val list, we do the following:<br /> | ||
<br /> | <br /> | ||
(1) Hermite reduce the matrix for L<br /> | (1) Hermite reduce the matrix for L<br /> | ||
<br /> | <br /> | ||
(2) Throw away all rows which consist of nothing but zeros | (2) Throw away all rows which consist of nothing but zeros, resulting in a kxm matrix<br /> | ||
<br /> | <br /> | ||
( | (3) Find the <a class="wiki_link_ext" href="http://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse" rel="nofollow">Moore-Penrose pseudoinverse</a> of the kxm matrix, take its transpose, and multiply this from the left by the row vector [1 log2(3) log2(5) ... log2(p)]. If the ith entry in the result is negative, multiply the corresponding val by -1. Return the result as the normalized val list.<br /> | ||
and multiply | |||
[1 log2(3) log2(5) ... log2(p)]. If the ith entry in the result is negative, multiply the corresponding val by -1. Return the result as the normalized val list.<br /> | |||
<br /> | <br /> | ||
The point of steps three | The point of steps two and three is that now the vals on the list correspond to a list of generators which are all positive (written additively) or equivalently greater than 1 (written multiplicatively.) Just as a normal comma list can be used to classify an abstract regular temperament, so can a normal val list. The val list is what on <a class="wiki_link" href="/Graham%20Breed">Graham Breed</a>'s <a class="wiki_link_ext" href="http://x31eq.com/temper/" rel="nofollow">web site</a> is called a &quot;mapping&quot;, put into a canonical form.<br /> | ||
<br /> | <br /> | ||
<!-- ws:start:WikiTextHeadingRule:4:&lt;h2&gt; --><h2 id="toc2"><a name="x-Maple code"></a><!-- ws:end:WikiTextHeadingRule:4 -->Maple code</h2> | <!-- ws:start:WikiTextHeadingRule:4:&lt;h2&gt; --><h2 id="toc2"><a name="x-Maple code"></a><!-- ws:end:WikiTextHeadingRule:4 -->Maple code</h2> | ||
Below is Maple code for finding the normal interval and val list, given an interval list or a val list.<br /> | Below is Maple code for finding the normal interval and val list, given an interval list or a val list.<br /> | ||
<br /> | <br /> | ||
log2 := proc(x) evalf(ln(x)/ln(2)) end:<br /> | |||
<br /> | |||
transpos := proc(w)<br /> | |||
# transpose of listlist w<br /> | |||
local u;<br /> | |||
u := Matrix(w);<br /> | |||
u := LinearAlgebra[Transpose](u);<br /> | |||
convert(u, listlist) end:<br /> | |||
<br /> | |||
pseudo := proc(w)<br /> | |||
# pseudoinverse of listlist w<br /> | |||
local u;<br /> | |||
u := Matrix(w);<br /> | |||
u := LinearAlgebra[MatrixInverse](u, method='pseudo');<br /> | |||
convert(u, listlist) end:<br /> | |||
<br /> | <br /> | ||
psu := proc(w) transpos(pseudo(w)) end:<br /> | |||
<br /> | <br /> | ||
pril := proc(n)<br /> | pril := proc(n)<br /> | ||
| Line 253: | Line 271: | ||
convert(convert(v,array),list) end:<br /> | convert(convert(v,array),list) end:<br /> | ||
<br /> | <br /> | ||
orp := proc(w, p) padic[ordp](w, p) end:<br /> | |||
# | <br /> | ||
pim := proc(q)<br /> | |||
# rank of p-limit of q<br /> | |||
local r, i, p;<br /> | local r, i, p;<br /> | ||
r := 1;<br /> | r := 1;<br /> | ||
| Line 261: | Line 281: | ||
i := i+1;<br /> | i := i+1;<br /> | ||
p := ithprime(i);<br /> | p := ithprime(i);<br /> | ||
r := r*p^ | r := r*p^orp(q, p) od;<br /> | ||
if i=0 then RETURN(0) fi;<br /> | |||
i end:<br /> | i end:<br /> | ||
<br /> | |||
plim := proc(q)<br /> | |||
# prime limit of rational number q<br /> | |||
ithprime(pim(q)) end:<br /> | |||
<br /> | <br /> | ||
rat2monz := proc(q, n)<br /> | rat2monz := proc(q, n)<br /> | ||
| Line 308: | Line 333: | ||
norv := proc(l)<br /> | norv := proc(l)<br /> | ||
# normal val list from list of vals l<br /> | # normal val list from list of vals l<br /> | ||
local | local u, v, w, i, n, a;<br /> | ||
u := herm(l);<br /> | u := herm(l);<br /> | ||
n := rnk(u);<br /> | |||
v := NULL:<br /> | v := NULL:<br /> | ||
for i from 1 to | for i from 1 to n do<br /> | ||
v := v,u[i] od;<br /> | v := v,u[i] od;<br /> | ||
v := [v];<br /> | v := [v];<br /> | ||
u := psu(v);<br /> | |||
w := pril(n);<br /> | |||
a := op(matmul(w, u));<br /> | |||
a := | |||
u := NULL;<br /> | u := NULL;<br /> | ||
for i from 1 to | for i from 1 to n do<br /> | ||
if a[i] &lt; 0 then u := u,-v[i] fi;<br /> | if a[i] &lt; 0 then u := u,-v[i] fi;<br /> | ||
if a[i] &gt;= 0 then u := u,v[i] fi od;<br /> | if a[i] &gt;= 0 then u := u,v[i] fi od;<br /> | ||
[u] end:</body></html></pre></div> | [u] end:</body></html></pre></div> | ||