# Lils using left inverse

This page is a work in progress. It is working towards being a replacement for the Log-integer-limit-squared section in D&D's guide, adding a "left-inverse" approach.

## Log-integer-limit-squared

Here's where things start to get pretty weird.

In the cases of the minimax-lils-S and minimax-E-lils-S tuning schemes, our complexity pretransformer is the size-sensitizing matrix composed with the log prime matrix, $ZL$ and thus its inverse is $(ZL)^{-1}$. Unfortunately, though, even though it looks like we should be able to say the dual norm $\text{lils-C}^{*}()$ should be $βπ(ZL)^{-1}β_β$, it's not that simple, that is, it's not as simple as the typical case where we can just take the dual power and the inverse pretransformer. The problem is that $ZL$ is a rectangular matrix, and so it could only have some sort of generalized inverse, not a true inverse. The Moore-Penrose inverse, AKA the pseudoinverse, is a classic example of a generalized inverse; however, it only works for some temperaments. What we really seek is a complete solution to the root problem.

We have three possible approaches here (which are closely related, mathematically):

1. the max-minus-min approach
2. the tipweil.py approach
3. the left-inverse approach

The first approach only works when $\text{dual}(q) = β$, such as with minimax-lils-S (but not with minimax-E-lils-S). The other two approaches work for any retuning magnitude norm power, $β$ or otherwise.

### The min-minus-max approach

Mike Battaglia worked out a proof that the dual norm to the log-integer-limit complexity is this:

\begin{align} \text{lils-C}^{*}(\textbf{π}) &= \max( \frac{r_1}{\log_2{\!p_1}}, \frac{r_2}{\log_2{\!p_2}}, \ldots, \frac{r_d}{\log_2{\!p_d}}, 0) \; - \\ & \quad\quad\quad \min(\frac{r_1}{\log_2{\!p_1}}, \frac{r_2}{\log_2{\!p_2}}, \ldots, \frac{r_d}{\log_2{\!p_d}}, 0) \end{align}

This can be used straight away in a numerical optimization problem solver, to find an approximate solution.

### The tipweil.py approach

This approach is also credited to Mike[1]. This approach integrates with the coinciding-damage method originally developed by Keenan Pepper for use with TOP tuning, in tiptop.py. Unlike the min-minus-max approach, this one can give exact solutions. This way achieves the dual norm through custom-applied augmentations to the relevant matrices as used in this method.

To see these tunings worked out with exact solutions in the form of generator embeddings, using Mike's technique, see Generator embedding optimization#Minimax-lils-S and Generator embedding optimization#Minimax-E-lils-S.

### The left-inverse approach

Either of the previous two methods require custom code paths to handle. We'd prefer to have a completely generic procedure, if possible. Is there a way to define a generalized inverse such that we still find the correct true optimum tunings we seek, but structure our approach in the same way as we can do it for all the other complexities? After a lengthy struggle, we have determined the answer to that question is "yes".

#### Generalized inverses

When $X$ is a rectangular complexity pretransformer, such as the $ZL$ that is used for $\text{lils-C}()$, there are alternative inverses available which will still effectively leverage the dual norm inequality in order to cap the maximum damage across all intervals. Specifically, any matrix $X^{-}$ (that's $X$ but with a superscript minus, as opposed to the superscript plus that we use for the Moore-Penrose inverse) which satisfies $X^{-}X=I$ will suffice. We call such a matrix a "left-inverse", because it cancels the original matrix out when it is left-multiplied by it.

There's also a thing called a right-inverse, which is the opposite. Tall matrices (more rows than columns) like $ZL$ have left-inverses (when they are full-rank. Wide matrices (more columns than rows) like mappings $M$ have right-inverses (again, when they are full-rank). Square matrices (same count of rows and columns) have matrices that are both left-inverses and right-inverses, or in other words, true inverses (again, when they are full-rank).

Fortunately for us, a left-inverse is the kind we need! That's because left-multiplication is the direction in which we need canceling out of $X$ to occur, because of the way it figures in the dual norm inequality, as shown here:

$\dfrac{|π\cancel{X^{-1}}\cancel{X}\textbf{i}|}{βX\textbf{i}β_1} \leq βπX^{-1}β_β$

(You may wish to review the relevant background info here: Dave Keenan & Douglas Blumeyer's guide to RTT: all-interval tuning schemes#Bringing it back to the dual norm inequality.)

Now it turns out that tall matrices have not just one left-inverse but a range of possible left-inverses (same goes for wide matrices and right-inverses, FWIW). These left-inverses follow a parameterized pattern, row-by-row, which you can learn about on this page, which is about a type of generalized inverse called a 1-inverse: https://mathworld.wolfram.com/Matrix1-Inverse.html. Left- and right- inverses are specific types of 1-inverse. Generalized inverses can be categorized by the subset of pseudoinverse conditions 1 through 4 that they satisfy. All generalized inverses must at least satisfy condition 1. A generalized inverse that satisfies conditions 1, 2, and 4 would be a (1,2,4)-inverse. So a 1-inverse is the most general of all types of generalized inverses. Condition 1 is that $AA^{-}A = A$. This condition could be satisfied by either a left-inverse or a right-inverse. A left-inverse would satisfy it because a left-inverse means $A^{-}A = I$ and so

\begin{align} A(A^{-}A) &= A \\ AI &= A \\ A &= A \end{align}

and a right-inverse would satisfy it because a right-inverse means $AA^{-} = I$ and so

\begin{align} (AA^{-})A &= A \\ IA &= A \\ A &= A \end{align}

As a consequence of this, there is no more general way of generating all possible left inverses of $Z$ than the method given at the MathWorld link above[2], so our proof that follows below is sufficient. Any algorithm that generates all possible 1-inverses will generate only left-inverses in the case where $Z$ is tall and full rank, as it is in the case of minimax-lils-S. And since there can be no left inverses $A^{-}A = I$ that are not also 1-inverses $AA^{-}A = A$, the algorithm must generate all possible left-inverses.[3]

#### Optimizable simplicity pretransformers

Now here's where things get really weird. The parameters of these left-inverses can themselves be optimized. In other words, when optimizing for a minimax-lils-S tuning, and attempting to use a left-inverse of our complexity pretransformer to do so, then we may find ourselves doing a nested optimization problem! (At least, it seems this way at first. We'll figure a way out of this problem soon enough.)

Said another way, when we're attempting to minimize $β(π - π)(ZL)^{-}β_β$, we're not just trying different values for $t_1$, $t_2$, etc. (the tunings of the primes), but by potentially using different values for the entries of $(ZL)^{-}$, we can still use the dual norm inequality to prove we've minimaxed lils-C-weight damage across all intervals (i.e. we can still validly cancel out $ZL$), but we can do it with the values of $(ZL)^{-}$ that let us get $β(π - π)(ZL)^{-}β_β$ as low as possible.

Understandably, since normal optimization problems can already be computationally intensive, doing an entire optimization problem within each one of the potentially thousands of steps of the outer optimization problem, may be so computationally intensive that most mathematical tools available to the public could not handle it. It would be much better if instead we had a simple closed-form expression for the parameters on this left-inverse.

Well, without further ado, here it is:

$Z^{β»} = \left[ \begin{array} {r} 1-kx & -kx & -kx & \cdots & -kx & x \\ -kx & 1-kx & -kx & \cdots & -kx & x \\ -kx & -kx & 1-kx & \cdots & -kx & x \\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots \\ -kx & -kx & -kx & \cdots & 1-kx & x \\ \end{array} \right]$

where

• $k$ is our size factor (so this works for hybrids, as well),
• $x = \dfrac{\max(πL^{-1}|0) + \min(πL^{-1}|0)}{\text{sum}(πL^{-1})}$,
• $\max()$, $\min()$, and $\text{sum}()$ are applied entry-wise to their covector arguments, and
• $πL^{-1}|0$ is the covector $πL^{-1}$ with a zero appended to its right-hand end.

Notice that there are no absolute values in that formula, and notice that it's $\max + \min$, not $\max - \min$ as appears in Mike's max-minus-min approach (which of course still works, but in a different, closely related way).

So, given $π$, we can calculate $πL^{-1}$. From that we calculate $x$. From that we calculate $Zβ»$. From that we calculate $(πL^{-1})Zβ»$. Essentially, we've defined $Z^{-}$ as a function of $π$. So when the solver (this assumes a numeric minimization, such as is described here) is then told to minimise $β(πL^{-1})Z^{-}β_{β}$ by changing $π$, it works a treat. No nested optimization anymore; it's just a single optimization, but the values of $π$ plug in a few more places than before.

This left-inverse matrix always gives the same results as the other two approaches from Mike, but can be written in the form of a pretransformed power-norm like all the other complexities as we wished. The main difference is that $Z^{-}$ is not a constant matrix throughout the minimization, as the simplicity pretransformation typicially tends to be.

We know that any $x$ we could possibly come up with still satisfy the requirement that $Z^{-}Z = I$, but only one $x$ will be optimal for our particular temperament's tuning.

#### Examples

For meantone temperament, with mapping [1 1 0] 0 1 4]}, with $k=1$ (minimax-lils-S), we find the optimal $x = 1$ with an optimal $π$ of 0.000 -3.393 0.000]. So the max is 0, the min is -3.393, and the sum is -3.393, so (max+min)/sum = (0-3.393)/-3.393 = 1. We can see that any tuning which has only a single prime with nonzero error is going to result in $x = 1$. When $x = 1$ and $k = 1$ like this, $Z^{-} = Z^{+}$, that is, the pseudoinverse of $Z$ is the optimal left-inverse.

For porcupine temperament, with mapping [1 2 3] 0 -3 -5]}, we find the optimal $x = 0.5$ with an optimal $π$ of -6.172 0.000 -6.172]. So (max+min)/sum = -6.172/-12.344 = 0.5.

For 12-ET, with mapping [12 19 28]}, we find the optimal $x = 0.547$ with an optimal $π$ of -5.866 -7.093 0.000]. So (max+min)/sum = -7.093/-12.959 = 0.547.

#### Derivation

To derive the above $Z^{-}$ matrix which we've given in terms of $k$ and $π$ from MathWorld's take on the topic, we have a little work to do. So MathWorld says we're looking for matrices $P$ and $Q$ such that $J$ =

$\left[ \begin{array} {c} I & 0 \\ 0 & 0 \\ \end{array} \right]$

And $PAQ = J$. The reason why more than one possible generalize inverse exists arises from the fact that the $X$, $Y$ and $Z$ in MathWorld's final expression $A^{-}$ =

$Q \left[ \begin{array} {c} I & X \\ Y & Z \\ \end{array} \right] P$

have completely arbitrary entries; the only requirement is that their shape is correct. (Note: MathWorld's $Z$ is different than our $Z$; thankfully we won't need theirs much.) In our situation, we only have $X$ (no $Y$ or $Z$ needed), because the rank of our $A$ is equal to its width. In other words, if we take $Z$ and put it into something like Hermite Normal Form, for example, it will still have nonzero entries in every column; it will just have a row of all zeroes at the bottom. So our $J$ looks like

$\left[ \begin{array} {c} I \\ 0 \\ \end{array} \right]$

and our $A^{-}$ therefore looks like

$Q \left[ \begin{array} {c} I & X \\ \end{array} \right] P$

except that there's a further simplification due to this same fact: we won't require any column operations (only row operations) to get our $A$ into the form $J$ =

$\left[ \begin{array} {c} I \\ 0 \\ \end{array} \right]$

so $Q$ will be an identity matrix, and can therefore be omitted, giving

$A^{-} = \left[ \begin{array} {c} I & X \\ \end{array} \right] P$

where $P$ represents the row operations that are needed to convert $A$ to an upper identity matrix with lower zeros. i.e. $P$ such that

$PA = \left[ \begin{array} {c} I \\ 0 \\ \end{array} \right]$

When we use our $Z$ for $A$, that is, for a 5-limit temperament we'd have

$\left[ \begin{array} {c} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ k & k & k \\ \end{array} \right]$

in order to clear the bottom row, we need to subtract each of the other rows from it $k$ times. So we start with $P$ as a (4,4)-shaped identity matrix and do the same to it.

So we have $P$ =

$\left[ \begin{array} {c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ -k & -k & -k & 1 \\ \end{array} \right]$

Since $A^{-} = [I X]P$, and $P$ is square, then $[I X]$ must have the same shape as $A^{-}$, which must be the transpose of the shape of $A$. So $[I X]$ must be (3,4)-shaped and $X$ must be (3,1)-shaped, as follows. $X$ =

$\left[ \begin{array} {c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right]$

And $[I X]$ =

$\left[ \begin{array} {c} 1 & 0 & 0 & x_1 \\ 0 & 1 & 0 & x_2 \\ 0 & 0 & 1 & x_3 \\ \end{array} \right]$

And therefore $A^{-} = [I X]P$ =

$\left[ \begin{array} {c} 1 & 0 & 0 & x_1 \\ 0 & 1 & 0 & x_2 \\ 0 & 0 & 1 & x_3 \\ \end{array} \right] \left[ \begin{array} {c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ -k & -k & -k & 1 \\ \end{array} \right] = \left[ \begin{array} {c} 1-kx_1 & -kx_1 & -kx_1 & x_1 \\ -kx_2 & 1-kx_2 & -kx_2 & x_2 \\ -kx_3 & -kx_3 & 1-kx_3 & x_3 \\ \end{array} \right]$

#### A visual demonstration

Bringing it back to our goal of optimizing tuning, in general we want to find $\min(βπL^{-1}Z^{-}β_{\text{dual}(q)})$, so we want to find the $x$ parameter of $Z^{-}$ that allows us to do this.

For convenience we'd like a way to refer to the $πL^{-1}$ part of the expression. Let's make that $π$. For a 5-limit example, we have $π$ = $e_1$ $e_2$ $e_3$]. So the inside of our dual norm, $πL^{-1}Z^{-} = πZ^{-}$ =

$\left[ \begin{array} {c} e_1 & e_2 & e_3 \\ \end{array} \right] \left[ \begin{array} {c} 1-kx_1 & -kx_1 & -kx_1 & x_1 \\ -kx_2 & 1-kx_2 & -kx_2 & x_2 \\ -kx_3 & -kx_3 & 1-kx_3 & x_3 \\ \end{array} \right] = \\[30pt] \left[ \begin{array} {c} e_1-k(e_1x_1+e_2x_2+e_3x_3) & e_2-k(e_1x_1+e_2x_2+e_3x_3) & e_3-k(e_1x_1+e_2x_2+e_3x_3) & e_1x_1+e_2x_2+e_3x_3 \\ \end{array} \right]$

Note that for our minimax-lils-S example, we know that all $x_i$ will be the same, which is why we showed it simply as $x$ above, but here we'll show it in a more general form, with a vector $π$ of different values for each row.

To remove some clutter here, let's define a $c = (e_1x_1+e_2x_2+e_3x_3) = β¨e_1 e_2 e_3][x_1 x_2 x_3β© = ππ$. So now we can simplify the above to:

$\left[ \begin{array} {c} e_1-kc & & e_2-kc & & e_3-kc & & c \\ \end{array} \right]$

Note that the last term does not include a $k$. That's a $c$ by itself. (By the way, this $c$ is equal to $-r$ as it is used in Mike's proof here: https://en.xen.wiki/w/Dual_of_the_Weil_norm_proof)

So remember, this was all just the stuff inside our norm bars. So we have

\begin{align} \text{lil-C}^{*}(π) &= βπL^{-1}Z^{-}β_{β} \\ &= β\left[ \begin{array} {r} e_1-kc & & e_2-kc & & e_3-kc & & c \end{array} \right]β_{β} \\ &= \max(|e_1-kc|, |e_2-kc|, |e_3-kc|, |c|) \end{align}

And we want the minimum of that:

$\min(\text{lil-C}^{*}(π)) = \min(\max(|e_1-kc|, |e_2-kc|, |e_3-kc|, |c|))$

Remember, $k$ is just a constant we choose as part of our tuning scheme config. And $π = π - π = πM - π$ where $M$ is the mapping for the temperament we're optimizing a tuning for and $π$ is the corresponding just tuning map. So our only unknowns that we're optimizing for are $π$ and $c$. We don't actually care what $c$ is, so long as we can find the value for it that allows us to come away from this with the $π$ that we know minimizes the particular simplicity-weight damage from $π = πM$ versus using just intonation with $π$.

So then we ask, as Mike did, what value of $c$ will minimize this? Here's a visual demonstration of how we know.

Visualize $e_1$, $e_2$, and $e_3$ plotted on a real number line. For now, imagine that $e_2$ and $e_3$ are random positive values and $e_1$ is a smaller negative value, making a pattern of dots like this:


|
|
-----------β’-+----β’----β’---
πβ|    πβ   πβ
|



And notice that the maximum of their absolute values is just the distance to the origin of whichever dot is most distant from the origin. In this case, $|e_3|$. Note that it's $e_3$ here because $e_3 = \max(\left[ \begin{array} {r} e_1 & e_2 & e_3 \end{array} \right])$.

Now recognize that subtracting some constant from all of them would shift the pattern of dots to the left. For some constant $k$ we could end up with this.


|
|
----β’------β’-+--β’----------
πβ     πβ|  πβ
-π    -π | -π



Now $e_1-k$ is the one furthest from the origin, so the maximum of their absolute values will be $|e_1-k|$. Note that it's $e_1$ here because $e_1$ = $\min(\left[ \begin{array} {r} e_1 & e_2 & e_3 \end{array} \right])$.

Clearly the maximum absolute value will be minimized for some choice of $k$ where the most positive dot and the most negative dot are the same distance from the origin, like this:


|
|
-------β’-----+β’----β’--------
πβ    |πβ   πβ
-π    |-π  -π



And now realize that we have a minus $k$ essentially built in to our information already. We're actually looking at points that are these $e_i$ values but with $kc$ subtracted from them!


|
|
-------β’-----+β’----β’--------
πβ    |πβ   πβ
-ππ    |-ππ  -ππ



So while $k$ is fixed by our tuning scheme config, we can adjust $c$, our "centering constant", in order to slide these points left and right; $k$ simply affects by how much we have to change $c$ to make this happen. For example, with $k = 0.5$, the hybrid halfway between minimax-S and minimax-lils-S, we'd have to change $c$ by twice as much in order to shift things by the same amount as we would with $k = 1$. This isn't important right now but will be in a little bit.

In the case we've shown above, then the maximum distance from the origin will be half the distance between $e_1-kc$ and

\begin{align} e_3-kc &= ((e_1-kc) - (e_3-kc))/2 \\ &= (e_1-kc-e_3+kc)/2 \\ &= (e_1-\cancel{kc}-e_3+\cancel{kc})/2 \\ &= (e_1-e_3)/2 \end{align}

So the $kc$ part has mercifully canceled out.

But remember that the example with $e_1$ and $e_3$ was only an arbitrary illustrative example. Extrapolating from it, we can see that if we want to state this in general, the minimized value, i.e. $\min(\max(|e_1-kc|, |e_2-kc|, |e_3-kc|))$ will be $\dfrac{\max(e_1, e_2, e_3) - \min(e_1, e_2, e_3)}{2}$, which is just another way of expressing this centering idea; it asks us to imagine whatever the situation looks like before we start shifting left or right, just take the distance from the leftmost point to the rightmost point, and divide it by 2.

Also note that this works even if every $e_i$ is positive or every $e_i$ is negative, i.e. that all of them are on the same side of the origin. This is basically explained by the fact that the absolute value of the max and min are not taken. So if the min is negative, it's subtracted, for a net positive, as it should be, and if it's positive, it's subtracted, for a net negative, as it should be. (More on this later.)

Okay, but it's not quite this simple, however. Because so far we've only dealt with the first three elements in that list of values whose max we're taking. We haven't dealt with the fourth element $|c|$ yet.

Let's first consider the simplest case where $k = 1$. Here, we could think of it as we're looking for

$\min(\max(|e_1-c|, |e_2-c|, |e_3-c|, |c|))$

or in other words

$\min(\max(|e_1-c|, |e_2-c|, |e_3-c|, |0-c|))$

so we're just including 0 among the points being shifted by $c$.

This would only make a difference if all values of $e_i$ are positive or all are negative. (Which may never happen anyway?) Or we could just think of it as plotting $c$ on our number line along with the other $e_i$ values. And here we can also see that $c$ will only be our maximum absolute value when all values of $e_i$ are positive or all are negative. In this case it's because if, say, the $\min(π) = 0$ and the $\max(π) = 5$, then $c$ will be 2.5, and the $\min(π) - c = 0$ will be -2.5 and the $\max(π) - c = 0$ will be 2.5, so in this case $c$ will be exactly tied with the $\max(π) - c$, but if we went any further past this with min also positive, then $c$ would finally exceed $\max(π) - c$.

And in the general case where $k$ may equal something else, we have no choice but to think of it in this second manner, with $c$ plotted on the number line along with our $e_i$ values, but its relationship with them is a bit more complicated, e.g. for $k = 0.5$, we can already see $c$ being the maximum absolute value even if the mininum is not on the same side of the origin as the max, but within half of the distance of the max from the origin. (And if $k = 0$, then we can't slide anything with $c$, so it doesn't matter what we set $c$ to, so we may as well have it at 0, so then we're just taking our $e_i$ values as they are. And as $k β 0$, then $c β β$, which seems crazy, because then $c$ will almost certainly dominate, and one would think that there'd be a smooth continuum from lp-C to lils-C, but this seems like there'd be some craziness happening in the zone right outside of lp-C.)

(If anyone can explain what the sliding back and forth of these $e_i$ values has to do with log integer limit, by the way, that would be wonderful. But perhaps that relationship is wildly indirect at this point, so thre's no intuitive link between them.)

#### Solving for the centering constant

Back on our $e_1$ and $e_3$ example, both points are equidistant from the origin, so we have:

\begin{align} -(e_1-kc) &= (e_3-kc) \\ kc - e_1 &= e_3 - kc \\ 2kc &= e_1 + e_3 \\ c &= (e_1 + e_3)/2k \end{align}

But in the general case, that's

$c = \max(\left[ \begin{array} {r} e_1 & e_2 & e_3 & c \end{array} \right] + \min(\left[ \begin{array} {r} e_1 & e_2 & e_3 & c \end{array} \right])$

So its.... circularly defined?! Except, it's fine when we realize that generally $c$ is neither the min or max. And if $c$ is the max, then we have $c = c + \min()$ so that just implies the min is 0. And if $c$ is the min, then we have $c = \max() + c$ so that just implies that the max is 0. So we can just simplify it to say that

$c = \max(\left[ \begin{array} {r} e_1 & e_2 & e_3 & 0 \end{array} \right] + \min(\left[ \begin{array} {r} e_1 & e_2 & e_3 & 0 \end{array} \right])$

That is, the same thing, but now with 0's instead of $c$'s.

The reason we wanted to solve for $c$ is that we want to solve for our optimum $Z^{-}$. Which means we need to know $π$.

Now substitute $(e_1x_1+e_2x_2+e_3x_3)$ = $e_1$ $e_2$ $e_3$][$x_1$ $x_2$ $x_3$ = $ππ$ back in for $c$ to find:

\begin{align} ππ &= \max(\left[ \begin{array} {r} e_1 & e_2 & e_3 & 0 \end{array} \right] + \min(\left[ \begin{array} {r} e_1 & e_2 & e_3 & 0 \end{array} \right]) \\ π &= \max(\left[ \begin{array} {r} e_1 & e_2 & e_3 & 0 \end{array} \right] + \min(\left[ \begin{array} {r} e_1 & e_2 & e_3 & 0 \end{array} \right]) / π \\ π &= \max(π, 0) + \min(π, 0) / π \\ \end{align}

So $x_1$, for example, is $\dfrac{\max(π, 0) + \min(π, 0)}{e_1}$. And then you just need to plug those values into:

$\left[ \begin{array} {c} 1-kx_1 & -kx_1 & -kx_1 & x_1 \\ -kx_2 & 1-kx_2 & -kx_2 & x_2 \\ -kx_3 & -kx_3 & 1-kx_3 & x_3 \\ \end{array} \right]$

And that will be the optimum $Z^{-}$ for any given $π$. And equipped with that, we can just plug this in for $Z^{-}$ anywhere we'd normally have our dual norm's matrices. It's just that unlike most cases, the same parameters that affect $π$, that is, $π$, also affect $Z^{-}$.

#### Exact solutions

Mike's tipweil.py approach essentially shortcuts the whole optimal left-inverse process, going straight to the an exact solution. But what if we still want to find an exact solution. Will we find that using the $Z^{-}$ as we've understood it here, in the coinciding-damage method, will give the same results?

The values of Mike's augmented generators, the ones we throw away when we optimize for minimax-lil-S tunings, and which Mike calls $r$ in the Tenney-Weil article, for every example we've checked, it was related to the max damage by similar proportions as we see with the formulas for $x$ and $c$ as demonstrated above. This augmented generator is basically there to allow us to shift the log-product scaled retunings into their best balance between each other.

Perhapse we can show how Mike does it in tipweil.py, but with our variable names (note that $L^{-1}$ here is the diagonal of $L^{-1}$):

$\left[ \begin{array} {r} g_1 & g_2 & c \\ \end{array} \right] \left[ \begin{array} {r} \frac{m_{11}}{s_{\text{p}1}} & \frac{m_{12}}{s_{\text{p}2}} & \frac{m_{13}}{s_{\text{p}3}} & 0 \\ \frac{m_{21}}{s_{\text{p}1}} & \frac{m_{22}}{s_{\text{p}2}} & \frac{m_{23}}{s_{\text{p}3}} & 0 \\ k & k & k & -1 \\ \end{array} \right] - \left[ \begin{array} {r} j_1 & j_2 & j_3 & 0 \\ \end{array} \right]$

Is the same as minimizing:

$\left[ \begin{array} {r} g_1 & g_2 \\ \end{array} \right] \left[ \begin{array} {r} m_{11} & m_{12} & m_{13} \\ m_{21} & m_{22} & m_{23} \\ \end{array} \right] \left[ \begin{array} {r} 1-kx_1 & -kx_1 & -kx_1 & x_1 \\ -kx_2 & 1-kx_2 & -kx_2 & x_2 \\ -kx_3 & -kx_3 & 1-kx_3 & x_3 \\ \end{array} \right] - \left[ \begin{array} {r} j_1 & j_2 & j_3 & 0 \\ \end{array} \right]$

That is, those being the inside of our norm bars.

It seems like there's a pretty good chance this works out to the same thing. Until it's totally worked out, though, we haven't really answered how it works to find an exact solution. And my first attempts to do this have failed, unfortunately. But I probably just goofed somewhere. And have run out of time for now. Best of luck to the interested reader!

1. β https://yahootuninggroupsultimatebackup.github.io/tuning-math/topicId_21029.html
2. β from JodΓ‘r et al, 1991
3. β Note that even if a wide matrix is not full-rank, i.e. it is (row-)rank-deficient, it may still have a generalized inverse satisfying $AA^{-}A = A$, i.e. even if $A^{-}A β I$. And similarly, even if a tall matrix is not full-rank, i.e. it is (column-)rank-deficient, it may still have a 1-inverse that satisfies that weaker condition that $AA^{-}A = A$. Tall and wide matrices have different strong conditions, but share the same weaker condition. And as for a square matrix, when full-rank, it has a true inverse $A^{-1}$ which satisfies both the right-inverse condition $AA^{-1} = I$ and the left-inverse condition $A^{-1}A = I$. Otherwiseβββwhen it is rank-deficientβββit does not; however, it may still have a generalized inverse called a 1-inverse which satisfies the weaker condition that $AA^{-}A = A$.