Domain basis: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Cmloegcmluin (talk | contribs)
note about non-JI
Cmloegcmluin (talk | contribs)
move section later
Line 109: Line 109:


For some advanced mathematical information about non-standard just intonation (JI) interval subspaces, as well as a gateway to browse temperaments within popular interval subspaces of this sort, see [[Just intonation subgroup|this page]].
For some advanced mathematical information about non-standard just intonation (JI) interval subspaces, as well as a gateway to browse temperaments within popular interval subspaces of this sort, see [[Just intonation subgroup|this page]].
= Non-JI interval subspaces =
The behavior of these are not yet well-described. For, for instance, is best to represent them as matrices? If a formal prime is <math>π/ɸ</math>, does the vinculum allow us to treat the two irrational numbers as separate basis elements? Perhaps, but as far as this author understands, this hasn't been pinned down yet. And so, for example, irrational numbers are not supported yet in the RTT library in Wolfram Language.


= Interval subspaces as subspaces of other interval subspaces =
= Interval subspaces as subspaces of other interval subspaces =
Line 906: Line 902:


Functions for finding interval rebases have been implemented in the [[RTT_library_in_Wolfram_Language]] as <code>getRforM</code> and <code>getRforC</code>. Although it also simply contains <code>changeB</code> which you can use directly on any temperament and it will do this step under the hood for you.
Functions for finding interval rebases have been implemented in the [[RTT_library_in_Wolfram_Language]] as <code>getRforM</code> and <code>getRforC</code>. Although it also simply contains <code>changeB</code> which you can use directly on any temperament and it will do this step under the hood for you.
= Non-JI interval subspaces =
The behavior of these are not yet well-described. For, for instance, is best to represent them as matrices? If a formal prime is <math>π/ɸ</math>, does the vinculum allow us to treat the two irrational numbers as separate basis elements? Perhaps, but as far as this author understands, this hasn't been pinned down yet. And so, for example, irrational numbers are not supported yet in the RTT library in Wolfram Language.


= Terminology: interval basis vs. subgroup =
= Terminology: interval basis vs. subgroup =

Revision as of 05:56, 9 January 2022

An interval basis is a basis for intervals.

Formal primes and non-standard interval bases

Interval bases are expressed as lists of formal primes, the building blocks of the intervals. They are notated by separating these formal primes with periods. The most common interval bases consist of literal prime numbers, which are the building blocks of the rational numbers we use for justly intoned interval ratios. Examples of such interval bases are 2.3.5, or 2.3.7.11.

When left unspecified, the interval basis is the [math]\displaystyle{ d }[/math] prime limit, or in other words, the sequence of the first [math]\displaystyle{ d }[/math] primes where [math]\displaystyle{ d }[/math] is the dimensionality. So, for example, given the regular temperament mapping [1 0 -4 -13 -25] 0 1 4 10 18], we should assume that its interval basis is 2.3.5.7.11. This is called a standard interval basis, and any other interval basis is called a non-standard interval basis.

The "formal" part of the term "formal prime" is there to capture an intentional flexibility: interval bases are possible which use non-primes as their building blocks, such as 2.9.5, or 2.15.7. There are also those with rational numbers, like 2.3/5.11/7, or even those with irrational numbers, like 2.√5.e.π.

The only real requirement is that each formal prime be positive, and almost always that it is greater than 1.

Interval bases for intervals

In the simplest case, an interval basis is like a label for an interval vector; the entries of the vector provide the counts of harmonics in the interval, and the basis tells us what those harmonic values actually are. So the vector [-1 -1 1 with the interval basis 2.5.11 represents 11/10.


[math]\displaystyle{ \begin{array} {ccc} \scriptsize{2} \\ \scriptsize{5} \\ \scriptsize{11} \\ \end{array} \left[ \begin{array} {rrr} -1 \\ -1 \\ 1 \\ \end{array} \right] = 2^{-1}5^{-1}11^{1} = \dfrac{11}{2·5} = \dfrac{11}{10} }[/math]


And the same vector [-1 -1 1 but without any specified interval basis is assumed to the standard prime-limit based one. In this case, the interval has 3 entries, so that means the dimensionality [math]\displaystyle{ d }[/math] is equal to 3. So we want the prime limit up through the 3rd prime. The 3rd prime is 5, so our interval basis is 2.3.5. With that interval basis, this vector represents the interval 5/6.


[math]\displaystyle{ \begin{array} {ccc} \scriptsize{(2)} \\ \scriptsize{(3)} \\ \scriptsize{(5)} \\ \end{array} \left[ \begin{array} {rrr} -1 \\ -1 \\ 1 \\ \end{array} \right] = 2^{-1}3^{-1}5^{1} = \dfrac{5}{2·3} = \dfrac{5}{6} }[/math]


Interval bases for temperaments

In the context of a regular temperament, an interval basis serves as a minimal representation of all the intervals this temperament can temper (some of which it completely tempers out). The full set of these possible-to-temper intervals is called the interval subspace; it is a subspace, not a space, because the full interval space would include all conceivable intervals, even those outside the temperament.

So, for instance, a temperament in the 2.3.5 interval subspace cannot temper the intervals 7/6 or 11/8, because there is no way to represent either of those intervals using only the primes 2, 3, and 5. It could, however, temper 6/5, 5/4, 10/9, or 9/8, etc., because those intervals can be represented using only those three primes.

A regular temperament mapping is a kind of function, and its domain is an interval subspace. So, an interval basis may be used to label the columns of a mapping, with one formal prime per column. Here's slendric, a temperament with a 2.3.7 interval basis:


[math]\displaystyle{ \begin{array} {ccc} \begin{array} {ccc} \scriptsize{2} & \scriptsize{3} & \scriptsize{7} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 1 & 3 \\ 0 & 3 & -1 \\ \end{array} \right] \end{array} }[/math]


Similarly, an interval basis may be used to label the rows of a comma basis: one formal prime per row, just how we initially described could be done for individual interval vectors. Here's the comma basis for 5-ET with a 2.3.7 interval basis:


[math]\displaystyle{ \begin{array} {ccc} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{7} \\ \end{array} \left[ \begin{array} {rrr} -8 & -6 \\ 5 & 2 \\ 0 & 1 \\ \end{array} \right] }[/math]


Note for comparison that a comma basis is also a type of basis. In the same way that an interval basis is a minimal representation of all the intervals in the temperament, a comma basis is a minimal representation of all the commas in the temperament — to be precise, the subspace of all commas that are tempered out.[1]

Nonstandard JI interval subspaces

For some advanced mathematical information about non-standard just intonation (JI) interval subspaces, as well as a gateway to browse temperaments within popular interval subspaces of this sort, see this page.

Interval subspaces as subspaces of other interval subspaces

In the same way that an subspace is a part of the full space, a subspace can be seen as a part of another larger subspace. So we can say an interval subspace is itself a subspace of another interval subspace.

Any given interval subspace will be a subspace of infinitely many other interval subspaces.

Examples

Figure 1. The interval subspace 2.3 can be clearly seen to be a subspace of 2.3.7. The latter is simply many copies of the former, separated by 7's.

For example, the 2.3 interval subspace is a subspace of the 2.3.7 interval subspace; this is clearly apparent, because the 2.3.7 interval subspace is the same as the 2.3 interval subspace except with the addition of a new formal prime, 7 (see Figure 1).

Figure 2. Here we can see how the interval subspace 2.9 is a subspace of 2.3. The latter is simply two copies of the former, offset by 3.

For a perhaps less obvious example, the 2.9.5 interval subspace is a subspace of the 2.3.5 interval subspace; this may be surprising, because 2.9.5 is the one with a larger formal prime, but what this actually means is that it spans a smaller subspace, because while 2.3.5 contains all intervals with any power of 3, 2.9.5 contains only half of those, specifically those with even powers of 3, i.e., powers of 9 (see Figure 2).

Sometimes, neither interval subspace is a subspace of the other. Consider 2.3.5 and 2.3.7: the former lacks a 7, and the latter lacks a 5.

Application: determining whether it is possible to change the interval subspace

Understanding which interval subspaces are subspaces of each other is important when changing the interval subspace for an interval or temperament. This is because only certain changes are possible: specifically, it is only possible to change between interval subspaces where one is a subspace of the other. Otherwise, the interval subspaces are incomparable.

We then have further constraints, depending on which type of object we're changing the interval subspace for:

  • For objects that are made of intervals — such as individual intervals themselves, or comma bases — we can only change in the direction from the subspace to the superspace. This is because unless the target interval subspace completely contains the original interval subspace, there's no guarantee that we'll still have all the formal prime building blocks that we need to represent our intervals.
  • For objects that are made of maps, i.e. mappings, the opposite is true: we can only change from the superspace to the subspace. Think of it this way: maps are functions, and they only claim to know what to do with inputs from within their given domain, and their domain is the interval subspace. So we can restrict their behavior just fine, because there's no question about what they do with inputs that don't happen to use every available building block from their domain. But there's no unambiguous way to say what they should do with any inputs that use building blocks from outside that domain, if we were to try to expand it.

These two types of objects are in fact the only two types of objects we need to worry about in RTT. The technical term for the difference between these two types of objects is variance. There are only two variances: contravariant, and covariant. Intervals are contravariant, and maps are covariant.

So from these two opposing bulleted facts above, we can conclude that any for pair of interval subspaces where neither one is a subspace of the other, there would be no way for us to express either intervals or maps from one in the other. And that's why we could say that they're incomparable interval subspaces.

General method to determine whether an interval subspace is a subspace of another

A couple subsections ago, we provided a couple examples where we used natural language to explain — between two interval subspaces — which one was a subspace of the other. But we still need to describe a method to determine this in general. Let's do that next.

We can say that an interval subspace [math]\displaystyle{ B_1 }[/math] is a subspace of another interval subspace [math]\displaystyle{ B_2 }[/math] if when we merge [math]\displaystyle{ B_1 }[/math] and [math]\displaystyle{ B_2 }[/math] we just get [math]\displaystyle{ B_2 }[/math] again. In layperson's terms, if [math]\displaystyle{ B_1 }[/math] brings nothing to the table that [math]\displaystyle{ B_2 }[/math] hasn't already brought, then it is completely contained by [math]\displaystyle{ B_2 }[/math] and therefore is a subspace of it.

For more information on merging interval bases, see User:Cmloegcmluin/Interval_basis#Merging.

Example

For instance, we can demonstrate how 2.25/9.11/7 is a subspace of 2.5/3.7.11 using this approach. If you've really got a knack for this stuff, you may be able to eyeball even this somewhat intense example, but it's obviously good to have a rigorous method like this to fall back on, if only to convince ourselves that we've got the right answer (or to automate things with code, as has been done with these methods in the RTT library in Wolfram Language).

So, first, we do the first step of merging interval bases: concatenate them. That gets us 2.25/9.11/7.2.5/3.7.11.

The next step of merging is to canonicalize. To begin that, we convert our interval basis to a matrix [math]\displaystyle{ B }[/math]. Here, we've labeled the columns with the number-list representation of the interval basis, to help show the correspondence, as well as the rows with the basis elements:


[math]\displaystyle{ \begin{array} {ccc} \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \scriptsize{7} \\ \scriptsize{11} \\ \end{array} \\ \end{array} \begin{array} {ccc} \begin{array} {ccc} \scriptsize{2} & \scriptsize{25/9} & \scriptsize{11/7} & \scriptsize{2} & \scriptsize{5/3} & \scriptsize{7} & \scriptsize{11} \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & -2 & 0 & 0 & -1 & 0 & 0 \\ 0 & 2 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & -1 & 0 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 1 \\ \end{array} \right] \\ \end{array} }[/math]


And now we reduce that big resultant matrix, using column-style Hermite normal form (the labels have been updated match the results, too):


[math]\displaystyle{ \begin{array} {ccc} \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \scriptsize{7} \\ \scriptsize{11} \\ \end{array} \\ \end{array} \begin{array} {lll} \begin{array} {lll}  & \scriptsize{2} & \scriptsize{5/3} & \scriptsize{7} & \scriptsize{11} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ \end{array} \right] \\ \end{array} }[/math]


The columns with all zeroes are not useful and so we can throw those away.

And so when we convert this back to the typical list of numbers form, we have 2.5/3.7.11 again. So this tells us that 2.25/9.11/7 is totally contained by 2.5/3.7.11, and so it's a subspace of it.

Canonicalization

The canonical form of an interval basis requires a few steps to achieve:

  1. Find the matrix representation of the interval basis.
  2. Put this matrix into column Hermite normal form. This step has the effect of sorting the formal primes so that those with higher primes as their basis elements come later, e.g. so that 7 comes after 9 even though 9 is a bigger number, because 9 factorizes into 3's.
  3. Eliminate any columns that are all zeros.
  4. Convert the matrix back into a list of numbers (separated by periods).
  5. Take the undirected value of each number; that is, if it is less than 1, replace it with its reciprocal (which will be greater than 1). So this would flip e.g. the "subratio" 3/5 into its "superratio" 5/3, or little phi φ (~0.618) into big phi Φ (~1.618).

Matrix conversion

The reduction method we will use as part of canonicalization is the Hermite normal form. If you are previously familiar with it, you may be surprised to see it here, because you may realize that it is defined for matrices, not lists of numbers. So far, when we've looked at subspaces — or at least looked at the bases that represent them — we've simply notated them as lists of numbers, such as 2.3.7. And in most contexts this number list notation is sufficient. However, in order to merge interval subspaces, we need to temporarily convert them into matrix form, in order to use the Hermite normal form.

Well, let's get to the matrix-ifying!

We can do this by factorizing the formal primes in just the same way we factorize intervals into prime count vectors, such as 5/4 factorizing to [-2 0 1. This is also the same way we represent comma intervals within the other key RTT basis: the comma basis.

But here, we're going one step deeper down! Now we're breaking down our formal primes — the building blocks of our intervals — into their own building blocks. We can call these deeper building blocks formal prime basis elements.

Then, each resulting vector becomes a column of our desired matrix.

So, for example, 2.9/7.5 in the form of a matrix [math]\displaystyle{ B }[/math] looks like this. For convenience, we've labeled each column with the formal prime, and each row with the basis element:


[math]\displaystyle{ \begin{array} {ccc} \begin{array} {rrr} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \scriptsize{7} \\ \end{array} \end{array} \begin{array} {ccc} \begin{array} {ccc} \scriptsize{2} & \scriptsize{9/7} & \scriptsize{5} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 1 \\ 0 & -1 & 1 \\ \end{array} \right] \end{array} }[/math]


To make a popular culture reference, you may be starting to get an Inception vibe here: we're breaking primes into deeper primes (perhaps we could call this "intervalception"?). Indeed, this might all seem dizzyingly abstract, but fortunately, we don't need to go any deeper than this. And we assure you that this matrix representation of the interval basis will be quite helpful for comparing different interval bases.

Column Hermite normal form

To be exact, we want to use the column-style Hermite normal form, sometimes called column Hermite normal form for short. All this means is that we put the HNF call in an anti-transpose sandwich, as described here).

Vs. canonicalization in temperament merging: do not defactor

There's an important difference between the canonicalization step as it's done with comma bases (and mappings) and how it's done with interval bases. With the former, it's typical to fully defactor them as well as normalize them, because enfactored representations of temperaments are pathological. Enfactored interval bases, however, are not pathological; they represent meaningfully distinct interval bases.[2]

For example, if we were to defactor the 2.9.5 interval basis, we'd get 2.3.5. But 2.9.5 is a perfectly reasonable interval basis that we don't wish to conflate with 2.3.5[3].

Example

Let's canonicalize 2.5/3.7/5.

First, we get a matrix representation of that, [math]\displaystyle{ B }[/math]:


[math]\displaystyle{ \begin{array} {ccc} \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \scriptsize{7} \\ \end{array} \\ \end{array} \begin{array} {lll} \begin{array} {lll}  & \scriptsize{2} & \scriptsize{5/3} & \scriptsize{7/5} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 1 & -1 \\ 0 & 0 & 1 \\ \end{array} \right] \\ \end{array} }[/math]


Now, column HNF it.


[math]\displaystyle{ \begin{array} {ccc} \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \scriptsize{7} \\ \end{array} \\ \end{array} \begin{array} {lll} \begin{array} {lll}  & \scriptsize{2} & \scriptsize{5/3} & \scriptsize{7/3} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & -1 & -1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right] \\ \end{array} }[/math]


There are no zero columns to eliminate, we've already got the thing as a list of numbers since we've updated the labels on the matrix columns, and all of those numbers are super already, so we're done! The answer is 2.5/3.7/3.

Merging

If you happen to already be familiar with temperament merging, merging[4] interval bases follows a similar pattern: concatenate, then canonicalize the result.

But first: a gentle introduction

Many times, it's easy to eyeball the merge of two interval bases. The basic idea is to just take everything that's in either one basis or the other. So 2.3.7 merged with 2.3.5 should just be 2.3.5.7, easy. Sometimes it can get kind of tricky, though. Like, what's the merge of 2.3.7/5 and 2.9.21/5? Not so obvious now. Hint: it's not 2.3.9.7/5.21/5!

Concatenate

This is the easy part. Suppose we're merging 2.3.5 and 2.3.7; the concatenation of those two is quite simply 2.3.5.2.3.7. Yes, that result contains a lot of repetition. But that's what the next step — the canonicalization step — is there to solve.

Canonicalize

See User:Cmloegcmluin/Interval basis#Canonicalization.

Notation

The notation used for merging here is the same as comma-merge: [math]\displaystyle{ B_1|B_2 }[/math][5].

Applications

Interval basis merging comes up in two key situations:

  1. Determining whether one interval subspace is a subspace of another: [math]\displaystyle{ B_1 }[/math] is a subspace of [math]\displaystyle{ B_2 }[/math] if [math]\displaystyle{ B_1|B_2 = B_2 }[/math]. For more details, see: User:Cmloegcmluin/Interval basis#General method to determine whether an interval subspace is a subspace of another.
  2. Comma-merging temperaments with different interval bases, in which case the comma-merged temperament's interval basis will be the merge of the all the input interval bases.

Intersecting

Finding the intersection of interval bases is surprisingly tricky[6]:

  1. Convert the interval bases to matrices, as with a merge.
  2. Create a block matrix by stacking two copies of one interval basis on the left side, and then setting one copy of the other interval basis on the right side, with the bottom-right quadrant of this block matrix filled in with all zeros.
  3. HNF this.
  4. The results we want are in the bottom-right. We take only half-columns, from the bottom half, and only half-columns where their corresponding top-half are all zeros (which will only happen to columns that are sorted to the right side).
  5. Canonicalize.

The reason this works is that wherever the corresponding top-half columns are all zeros, this was achieved through linear combinations of vectors from both interval bases, which means the information below them represents vectors that are in both of them. In other words, if [math]\displaystyle{ (x, x) + (y, 0) = (0, z) }[/math] and [math]\displaystyle{ x }[/math] is in [math]\displaystyle{ B_1 }[/math] and [math]\displaystyle{ y }[/math] is in [math]\displaystyle{ B_2 }[/math], then we must have [math]\displaystyle{ x + y = 0 }[/math] and [math]\displaystyle{ z = x }[/math][7]. We're sort of abusing HNF as a way to solve a system, kind of like when we calculate the null-space[8].

But first: a gentle introduction

As with the interval basis merge, it is sometimes practical to eyeball the answer. The basic idea is just to take only formal primes that in both of the interval bases. So the intersection of 2.3.5 and 2.3.7 is plainly just 2.3. But other times the answer may not be so clear. Such as: What is the intersection of 2.5/3.9/7 and 2.9.5? Hint: It's not just 2!

Example

Let's find the intersection of 2.5/3 and 2.9.5.

First, the two interval bases as matrices:


[math]\displaystyle{ \begin{array} {ccc} \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \end{array} \end{array} \begin{array} {ccc} \begin{array} {ccc} \scriptsize{2} & \scriptsize{5/3} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 \\ 0 & -1 \\ 0 & 1 \\ \end{array} \right] \end{array} \hspace{1cm} \begin{array} {ccc} \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \end{array} \end{array} \begin{array} {ccc} \begin{array} {ccc} \scriptsize{2} & \scriptsize{9} & \scriptsize{5} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 1 \\ \end{array} \right] \end{array} }[/math]


Now we must combine them into one big block matrix. Two copies of the first on the left, one copy of the other in the top-right, and zeros to pad out:


[math]\displaystyle{ \left[ \begin{array} {rr|rrr} 1 & 0 & 1 & 0 & 0 \\ 0 & -1 & 0 & 2 & 0 \\ 0 & 1 & 0 & 0 & 1 \\ \hline 1 & 0 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ \end{array} \right] }[/math]


Now, HNF that (column-style, so zeros end up in the top right):


[math]\displaystyle{ \left[ \begin{array} {rrrrr} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 & 2 \\ 0 & -1 & 0 & 0 & -2 \\ \end{array} \right] }[/math]


Now we're looking for any half-columns in the bottom half wherever there are all zeroes in the corresponding top half. Such zeroes are highlighted red here, and what we're looking for is highlighted in yellow:


[math]\displaystyle{ \left[ \begin{array} {rrrrr} 1 & 0 & 0 & \colorbox{pink}0 & \colorbox{pink}0 \\ 0 & 1 & 0 & \colorbox{pink}0 & \colorbox{pink}0 \\ 0 & 0 & 1 & \colorbox{pink}0 & \colorbox{pink}0 \\ \hline 0 & 0 & 0 & \colorbox{yellow}1 & \colorbox{yellow}0 \\ 0 & 1 & 0 & \colorbox{yellow}0 & \colorbox{yellow}2 \\ 0 & -1 & 0 & \colorbox{yellow}0 & \colorbox{yellow}{-2} \\ \end{array} \right] }[/math]


So let's focus in on that result:


[math]\displaystyle{ \left[ \begin{array} {rrr} 1 & 0 \\ 0 & 2 \\ 0 & -2 \\ \end{array} \right] }[/math]


Canonicalization time. That's already in matrix form, and HNF even (yes, we use HNF again here). No all zeros columns. Converted back to a list of numbers we at first have 2.9/25. But the last step is to take the undirected value, which reciprocates 9/25 to its super form which is 25/9. So the intersection of 2.5/3 and 2.9.5 is 2.25/9.

Notation

The notation for interval basis intersecting we'll use here is just the intersection symbol: [math]\displaystyle{ B_1∩B_2 }[/math].

Applications

The intersection of interval bases comes up with doing a map-merge of temperaments. The resulting temperament's interval basis will be the intersection of all the input interval bases. For more information, see: User:Cmloegcmluin/Temperament_merging_across_interval_bases#Map-merge.

Changing interval basis

Given an interval, comma basis, or mapping — anything that has an associated interval basis — it is possible to change it from one interval basis to another. We can accomplish this using an interval rebase, an object that works like a two-way bridge between two interval bases.

Elsewhere, these have been called subgroup basis matrices, but that terminology will not be used here, for the same reasons as are described in the last section of this article (here: User:Cmloegcmluin/Interval basis#Terminology: interval basis vs. subgroup) as well as the additional reason that such a name can easily be conflated with the interval basis itself. Sometimes the superspace interval basis is an identity matrix, in which case the interval rebase will be the same as the subspace interval basis, but this is not always the case.

As discussed earlier, only certain interval basis changes are possible: (here: User:Cmloegcmluin/Interval basis#Application: determining whether it is possible to change the interval subspace). To quickly recap here, it is only possible to change between interval subspaces where one is a subspace of the other. So when we say a given interval rebase works like a two-way bridge, there's a more specific way to say what we mean: an interval rebase allows us to change either from the subspace to the superspace, or from the superspace to the subspace. Which direction we go just depends on which side we enter the bridge from: the right side or the left side.

Constructing an interval rebase

Here are the steps:

  1. Set up a matrix with [math]\displaystyle{ d_L }[/math] rows, where [math]\displaystyle{ d_L }[/math] is the dimensionality of the superspace, and [math]\displaystyle{ d_s }[/math] columns, where [math]\displaystyle{ d_s }[/math] is the dimensionality of the subspace[9].
  2. Label the rows with the superspace interval basis.
  3. Label the columns with the subspace interval basis.
  4. Fill in each entry with the count of formal primes from the superspace basis for this row that could be used to build the formal primes in the subspace interval basis for this column.

Example

Let's construct the interval rebase [math]\displaystyle{ R }[/math] between 2.25/9.11/7 and 2.5/3.7.11. As we proved earlier, the former is a subspace of the latter. So this will be a 4×3 matrix.

  • The first column is easy. There's no change to prime 2 between these two interval bases.
  • The second column isn't so tricky, if you can recognize that 25/9 is simply 5/3 squared. So we need a 2 in the cell connecting those two formal primes, and zeroes elsewhere.
  • The third column isn't so tricky either. It's just one 11 in the numerator, so that's a +1, and one 7 in the denominator, so that's a -1.

And here's the final result:


[math]\displaystyle{ \begin{array} {ccc} \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{5/3} \\ \scriptsize{7} \\ \scriptsize{11} \\ \end{array} \\ \end{array} \begin{array} {lll} \begin{array} {lll}  & \scriptsize{2} & \scriptsize{25/9} & \scriptsize{11/7} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & -1 \\ 0 & 0 & 1 \\ \end{array} \right] \\ \end{array} }[/math]


Using the interval rebase

For intervals and comma bases, which can only be changed from a subspace to a superspace, we left-multiply by the interval rebase; this process is identical to the process used when mapping intervals with ordinary temperament mappings, except replacing the mapping with the interval rebase.

As for changing such temperament mapping matrices themselves — which can only be changed the other way, from a superspace to a subspace — we instead right-multiply by the interval rebase. So, strangely, this is also identical to the process used when mapping intervals with ordinary temperament mappings, except replacing the intervals with the interval rebase.

Examples

Suppose we have the interval rebase [math]\displaystyle{ R_{s↔L} }[/math] between 2.9/7.5/3 [math]\displaystyle{ B_s }[/math] and 2.3.5.7 [math]\displaystyle{ B_L }[/math]. The superspace is 2.3.5.7, so that's the columns, and 2.9/7.5/3 is the subspace, so that's the rows. And so here's our [math]\displaystyle{ R_{s↔L} }[/math]:


[math]\displaystyle{ \begin{array} {ccc} \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \scriptsize{7} \\ \end{array} \\ \end{array} \begin{array} {lll} \begin{array} {lll}  & \scriptsize{2} & \scriptsize{5/3} & \scriptsize{9/7} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & -1 & 2 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \\ \end{array} \right] \\ \end{array} }[/math]


First, let's use this to convert a comma basis [math]\displaystyle{ C_s }[/math] (that's in the [math]\displaystyle{ B_s }[/math] interval subspace) to the [math]\displaystyle{ B_L }[/math]interval subspace, by doing [math]\displaystyle{ R_{s↔L}.C }[/math]:


[math]\displaystyle{ \begin{array} {ccc} \\ \begin{array} {rrr} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \scriptsize{7} \\ \end{array} \end{array} \begin{array} {ccc} C_L \\ \begin{array} {ccc} \\ \end{array} \\ \left[ \begin{array} {rrr} -8 & -4 \\ -11 & -3 \\ 11 & 5 \\ 0 & -1 \\ \end{array} \right] \end{array} \hspace{0.5cm} \large{←} \normalsize{} \hspace{0.5cm} \begin{array} {ccc} \\ \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \scriptsize{7} \\ \end{array} \end{array} \begin{array} {ccc} R_{s↔L} \\ \begin{array} {ccc} \scriptsize{2} & \scriptsize{5/3} & \scriptsize{9/7} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & -1 & 2 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \\ \end{array} \right] \end{array} \hspace{0.5cm} \large{×} \normalsize{} \hspace{0.5cm} \begin{array} {ccc} \\ \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{5/3} \\ \scriptsize{9/7} \\ \end{array} \\ \begin{array} {rrr} \\ \end{array} \\ \end{array} \begin{array} {ccc} C_s \\ \begin{array} {ccc} \\ \end{array} \\ \left[ \begin{array} {rrr} -8 & -4 \\ 11 & 5 \\ 0 & 1 \\ \end{array} \right] \\ \begin{array} {rrr} \\ \end{array} \\ \end{array} }[/math]


And now let's use [math]\displaystyle{ R_{s↔L} }[/math] to convert a mapping the other way, from [math]\displaystyle{ B_L }[/math] to [math]\displaystyle{ B_s }[/math], by doing [math]\displaystyle{ M_L.R_{s↔L} }[/math]:


[math]\displaystyle{ \begin{array} {ccc} M_L \\ \begin{array} {ccc} \scriptsize{2} &  \scriptsize{3} & \scriptsize{5} &  \scriptsize{7} \\ \end{array} \\ \left[ \begin{array} {rrr} 12 & 19 & 28 & 34 \end{array} \right] \end{array} \hspace{0.5cm} \large{×} \normalsize{} \hspace{0.5cm} \begin{array} {ccc} \\ \begin{array} {ccc} \\ \end{array} \\ \begin{array} {rrr} \scriptsize{2} \\ \scriptsize{3} \\ \scriptsize{5} \\ \scriptsize{7} \\ \end{array} \end{array} \begin{array} {ccc} R_{s↔L} \\ \begin{array} {ccc} \scriptsize{2} & \scriptsize{5/3} & \scriptsize{9/7} \\ \end{array} \\ \left[ \begin{array} {rrr} 1 & 0 & 0 \\ 0 & -1 & 2 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \\ \end{array} \right] \end{array} \hspace{0.5cm} \large{→} \normalsize{} \hspace{0.5cm} \begin{array} {ccc} M_s \\ \begin{array} {ccc} \scriptsize{2} & \scriptsize{5/3} & \scriptsize{9/7} \\ \end{array} \\ \left[ \begin{array} {rrr} 12 & 9 & 4 \end{array} \right] \\ \begin{array} {rrr} \\ \end{array} \\ \end{array} }[/math]


Wolfram implementation

Functions for finding interval rebases have been implemented in the RTT_library_in_Wolfram_Language as getRforM and getRforC. Although it also simply contains changeB which you can use directly on any temperament and it will do this step under the hood for you.

Non-JI interval subspaces

The behavior of these are not yet well-described. For, for instance, is best to represent them as matrices? If a formal prime is [math]\displaystyle{ π/ɸ }[/math], does the vinculum allow us to treat the two irrational numbers as separate basis elements? Perhaps, but as far as this author understands, this hasn't been pinned down yet. And so, for example, irrational numbers are not supported yet in the RTT library in Wolfram Language.

Terminology: interval basis vs. subgroup

In some other RTT writings on the wiki, the term "subgroup basis", or sometimes "subgroup" for short, is used to refer to non-standard interval bases. This article breaks from that terminology, considering it to be confusing and unhelpful, for a number of reasons.

Mixing terminology from different mathematical fields

The term "subgroup basis" mixes mathematical terminology from different mathematical fields: "subgroup" comes from group theory, while "basis" comes from linear algebra. The equivalent term for "subgroup" in linear algebra is "subspace", and the equivalent term for "basis" in group theory is "minimal generating set". So the consistent terminology would be to either call something a "subspace basis" (such as a "null-space basis") or to call it a "subgroup minimal generating set". So "subgroup basis" is already problematic as an inconsistent mix of different fields' terminology.

Simple vs. advanced math: linear algebra vs. group theory

Regarding the choice between these two internally consistent versions of this term, then, this article prefers "subspace basis". This is because group theory is a relatively obscure and advanced field of mathematics, and this article prefers to leverage terminology from the more well-known and basic field of linear algebra whenever possible.

"Subgroup" and "subspace" are indeed analogous, but due to differences between group theory and linear algebra, they are not completely synonymous. Essentially, group theory takes some of the convenient assumptions which we rely on when doing linear algebra and sets them aside. Doing so can be powerful, and some argue that RTT cannot be sufficiently described using only linear algebra. This article, however, prioritizes pedagogy of the basics over any potential considerations arising from such advanced RTT problems.

Generic math terms vs. specialized application terms

For the previous two reasons — consistency, and simplicity — choosing "subspace basis" over "subgroup basis" would be preferable. But this article thinks it can do even better.

Setting aside the specialized use it has taken on in these RTT writings, a subgroup (or subspace) in the general mathematical sense is just a generic mathematical structure, like a matrix or vector. This article prefers to use specialized terminology for objects in our RTT application, so that we can clearly discuss them independently from the mathematical structures that represent them. Just like how we call certain objects represented by matrices "mappings" and certain objects represented by vectors "intervals", this article prefers using a specialized term for this RTT object — one that cannot be confused with a generic mathematical structure.

A common need when dealing with interval subspaces is determining whether they are subspaces of other interval subspaces, as we discussed in the earlier section User:Cmloegcmluin/Interval basis#Interval subspaces as subspaces of other interval subspaces. If the name for the specialized RTT object was simply "subspace" instead of "interval subspace", then each use of the word "subspace" could be unclear whether it was referring to the specialized RTT object or to the generic mathematical structure. Communicating about such things would become terribly confusing (as it is at present, in existing writings that use the term "subgroup" in both senses).

Furthermore, interval subspaces are not the only subspaces in our RTT application. Comma bases, being bases, are just as much subspace bases: bases for comma subspaces. It may be argued that interval bases, being a more fundamental mathematical object, have more right to the generic "subspace basis" term than comma bases do. But there's another powerful argument that comma bases are the more basic concept that far more users of regular temperaments will ever need to understand, and so they should be the basis that gets the generic name "subspace". Neither argument can win, and why fight anyway. Why needlessly obfuscate the issue when we could simply choose less ambiguous terminology.

A fresh start re: not excluding standard prime-limit interval subspaces

"Subgroup" in its typical RTT usage is apparently intended to exclude the standard prime-limit subgroups. This article sees several issues with this:

  • It is confusing because prime-limit subgroups are still very much subgroups — of the entire space of primes, for one example.
  • It's also simply an unnecessary complexity that doesn't help much.
  • And it hurts by making it more difficult than necessary to communicate about the standard prime-limit interval bases.

For all these three reasons, the interval basis terminology makes no such exclusion.

Footnotes

  1. In the case of a comma basis, both the basis vectors and all of the spanned vectors are commas. But in the case of an interval basis, only the basis vectors are formal primes. The spanned vectors in general are not formal primes. This is why we do not call an interval basis a "formal prime basis".
  2. Here's a key difference between an enfactored comma basis and an enfactored interval basis, by example. 2-enfactored meantone is [-8 8 -2], representing a temperoid where somehow 6561/6400 = (81/80)² is tempered out but 81/80 is not, a situation which is musically absurd, and this is the crux of why comma basis enfactoring is pathological. We can achieve a similar but non-pathological situation with a nonstandard interval basis. In the 2.3.25 interval basis, the comma basis [-8 8 1] represents the temperament where 6561/6400 is tempered out. But this isn't absurd, because the temperament doesn't explicitly say that 81/80 is not tempered out. In this temperament, 81/80 doesn't even exist! The page Sane and insane temperaments contains some more discussion of ideas in this vicinity.
  3. Even 4.9.25 is an acceptable interval basis. It's not a special situation where there's a common factor in the powers on each formal prime, which in this case is 2.
  4. The technical mathematical term for this is "sumset", not "union" as we might expect; in many contexts, "union" is the dual operation to "intersection", but for vector spaces, the dual operation to intersection is "sumset" (see page 4 of https://www2.math.upenn.edu/~siegelch/Notes/linalg.pdf). The difference between union and sumset can be explained like this: if we had two planes in a volume, their union would be both the planes, but their sumset would be the volume.
  5. Using ∩ for intersection, which seems obvious. But the merge notation is tricky. We could use ∪, of course. But technically speaking, it's not a union, but a sumset, and the notation for that is unfortunately just the plus sign +, which could be confusing. Furthermore, in the context of merging temperaments, we don't use either of those symbols. Actually, we use two different symbols there, depending on what we're merging! We use & if it's maps, and | if it's commas. At least, that's the notation used on the Meet and join and Temperament merging pages. And because intersections also arise for temperament matrices like mappings and comma bases, this article has gone with consistent notation for interval bases. Interval bases concatenate horizontally, like comma bases, so we use | and consider it a "basis-merge" symbol, i.e. it works on both comma bases and interval bases.
  6. This approach was found by Sintel here: https://math.stackexchange.com/questions/1560411/basis-for-the-intersection-of-two-integer-lattices/2472784#2472784
  7. credit this explanation to Tom Price on Discord
  8. Credit this explanation to Sintel on Discord
  9. We're borrowing [math]\displaystyle{ L }[/math] and [math]\displaystyle{ s }[/math] from MOS scale theory; there's no direct conceptual connection here, nor any need to understand anything about such scale theory at this moment, but if you happen to be familiar with the conventional use of [math]\displaystyle{ L }[/math] for "Large" and [math]\displaystyle{ s }[/math] for "small" in that other xenharmonic topic, then this variable choice may be particularly helpful for you.