BOP tuning: Difference between revisions
No edit summary |
better proof |
||
| Line 12: | Line 12: | ||
First, we | First, we note that for any tuning map, call it <math>T</math>, there is an associated vector called a '''signed error map'''. This is given by <math>E = T-J</math>, where <math>J</math> is the JIP. If we assume that we are in a prime-limit, then the signed error map will contain the signed error on each prime. We assume that all errors are unweighted so far. | ||
For | For any such error map, we can then divide the unweighted error by the desired weighting on each prime to get the weighted error map. This can be viewed as a change of coordinates to a "weighted" coordinate system. Assuming our tuning maps are row vectors, this can be expressed as a matrix right-multiplication by some diagonal weighting matrix <math>W</math>, where the diagonal entries are the desired weights on each prime. We will then denote the weighted error by <math>F = E\cdot W</math>. | ||
For any such error map, we can then evaluate the maximum ''unsigned'' weighted error on the primes. This quantity is equal to the maximum of the absolute values of the coefficients of the signed weighted error map, or equivalently the [https://en.wikipedia.org/wiki/Norm_(mathematics)#Maximum_norm_(special_case_of:_infinity_norm,_uniform_norm,_or_supremum_norm) L-inf] norm of the signed error map in the weighted coordinate system. | |||
The Linf norm has the property of being the [https://en.wikipedia.org/wiki/Dual_norm dual norm] of the L1 norm on the dual space, which is the space of monzos. This means that it has the following property: | |||
<math>\|F\|_\infty = \sup_M \frac{|<F|M>|}{\|M\|_1}</math> | |||
<math> | where the supremum is taken over all monzos <math>M</math> in the ''inverse-weighted'' coordinate system on the dual space. That is, if <math>m</math> were a monzo in unweighted coordinates, its representation in this space would be <math>M=W^{-1}\cdot m</math>, where we are left-multiplying by the inverse of the weighting matrix from before. | ||
where | This tells us that the max weighted error on the primes has the property of also being the max weighted error on ''all'' monzos in the prime-limit, and that this weighted error will always be obtained at a prime, where the weighting is given by the dual L1 norm. | ||
Now, if our weighting matrix is the usual <math>1/log(p)</math> Tenney-weighting matrix, then the above is equivalent to [[Paul Erlich]]'s theorem that minimizing the max Tenney-weighted error on the primes minimizes the max Tenney-weighted error on all intervals. However, if we instead change the weighting matrix to <math>1/p^s</math> instead, then our Linf norm will be dual to a different, somewhat unusual weighted L1 norm on monzos: the one where the weighting on the primes is given by <math>p^s</math>, and the weighting for an arbitrary monzo <math>m = |a\, b\, c\, ...\rangle</math> is given by | |||
<math>\text{sopfr}^s(m) = 2^s|a| + 3^s|b| + 5^s|c| + ...</math> | |||
where the notation on the left will be explained shortly. | |||
Now, we note that this unusually weighted L1 norm does not provide the weighting we want on all rationals, which is <math>(nd)^s</math>. Rather, when <math>s=1</math>, this is called the [[Wilson Height|Wilson norm]], and is equivalent to the [http://mathworld.wolfram.com/SumofPrimeFactors.html sum of prime factors with repetition] of the ratio <math>n/d</math> in question, often written <math>\text{sopfr}(n/d)</math>. For arbitrary <math>s\geq 1</math>, this is the sum of the <math>s</math>'th power of the prime factors with repetition of the ratio, which we will denote <math>\text{sopfr}^s(n/d)</math>. However, we note that this strange weighting ''does'' equal the weighting we want on the primes, where we have <math>\text{sopfr}^s(n/d) = (n/d)^s</math> - it only diverges on the composite numbers. | |||
We now want to show that minimizing the max weighted-error according to this strangely weighted L1 norm is equivalent to minimizing the max weighted-error according to the true weighting that we want. To do this, we consider what happens to the evaluation of max-weighted error on all rationals, for any given tuning, if we keep the tuning as is but simply change the weighting on the rationals to the thing we want. To prove our result, we need only show that | |||
1. Changing the weighting scheme to the thing we want does not make the max weighted error on all rationals any better | |||
2. Likewise, it doesn't make it any worse | |||
The first part is easy: for any tuning map, we know that the max "strange L1"-weighted error is equal to that of one of the primes, and we know that the primes agree in weighting on both metrics. Since we know that the weighting on the worst prime doesn't change, we know that after we switch weightings, the new max error can be no better than the thing we had. | |||
To show the second part, all we need to show is that all rationals are weighted more '''strongly''' with our strange L1 metric than with the true metric we want. In particular, we want to show the following: | |||
<math> | <math>\text{sopfr}^s(n/d) \leq (n/d)^s</math> | ||
where the left hand side is our strange metric and the right hand side is the true metric. Since we are ''dividing'' by this weighting, for any rational, the weighted error for the same amount of mistuning will be larger given the weighting scheme on the left than the weighting scheme on the right. This means that we have | |||
<math>\frac{\text{err}_{n/d}}{\text{sopfr}^s(n/d)} \geq \frac{\text{err}_{n/d}}{(n/d)^s}</math> | |||
To show this is fairly easy. Remember our definition of the strange L1 metric: | |||
<math>\text{sopfr}^s(m) = 2^s|a| + 3^s|b| + 5^s|c| + ...</math> | |||
In comparison, the true weighting we want on monzos is: | |||
<math>\text{true}^s(m) = 2^{s|a|} \cdot 3^{s|b|} \cdot 5^{s|c|} \cdot ...</math> | |||
<math>\text{ | |||
So we want to show that the following inequality holds for all monzos: | |||
<math>2^s|a| + 3^s|b| + 5^s|c| + ... \leq 2^{s|a|} \cdot 3^{s|b|} \cdot 5^{s|c|} \cdot ...</math> | <math>2^s|a| + 3^s|b| + 5^s|c| + ... \leq 2^{s|a|} \cdot 3^{s|b|} \cdot 5^{s|c|} \cdot ...</math> | ||
| Line 68: | Line 69: | ||
# For any particular prime <math>p</math> with integer coefficient <math>q</math>, <math>p^s|q| \leq p^{s|q|}</math> | # For any particular prime <math>p</math> with integer coefficient <math>q</math>, <math>p^s|q| \leq p^{s|q|}</math> | ||
# Since the nonzero terms on the left side are strictly positive, their sum must be less than their product, which is in turn less than the product of the associated "true" terms given above. | # Since the nonzero terms on the left side are strictly positive, their sum must be less than their product, which is in turn less than the product of the associated "true" terms given above. | ||
As a result, we have shown that for any particular tuning map, the max weighted error according to our strange L1 weighting will be the max weighted error according to the true metric we want: it gets no better and gets no worse. Since both are given by the Linf norm on error maps -- aka the max-abs <math>1/p^s</math> weighted error on the primes -- finding the tuning map in a particular temperament that minimizes this quantity is equivalent to finding the tuning map that minimizes the weighted error on all rationals according to ''both'' metrics. | |||
As a result, we have our main theorem: | |||
'''Theorem:''' to minimize the <math>1/(nd)^s</math> weighted error on all rationals, one needs only minimize the <math>1/p^s</math> weighted error on the primes. | '''Theorem:''' to minimize the <math>1/(nd)^s</math> weighted error on all rationals, one needs only minimize the <math>1/p^s</math> weighted error on the primes. | ||