Domain basis: Difference between revisions

Cmloegcmluin (talk | contribs)
canonicalization → canonical form
Cmloegcmluin (talk | contribs)
nest merging and intersecting under new section for operations
Line 396: Line 396:
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.
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 =
= Operations =
 
== Merging ==


If you happen to already be familiar with [[temperament merging]], merging<ref>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.</ref> interval bases follows a similar pattern: concatenate, then canonicalize the result.
If you happen to already be familiar with [[temperament merging]], merging<ref>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.</ref> interval bases follows a similar pattern: concatenate, then canonicalize the result.


== But first: a gentle introduction ==
=== 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!
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 ==
=== 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.
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 ==
=== Canonicalize ===


See [[Interval basis#Canonical form]].
See [[Interval basis#Canonical form]].


== Notation ==
=== Notation ===


The notation used for merging here is the same as comma-merge: <math>B_1|B_2</math><ref>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.</ref>.
The notation used for merging here is the same as comma-merge: <math>B_1|B_2</math><ref>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.</ref>.


== Applications ==
=== Applications ===


Interval basis merging comes up in two key situations:  
Interval basis merging comes up in two key situations:  
Line 422: Line 424:
# 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.
# 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 =
== Intersecting ==


Finding the intersection of interval bases is surprisingly tricky<ref>This approach was found by Sintel here: https://math.stackexchange.com/questions/1560411/basis-for-the-intersection-of-two-integer-lattices/2472784#2472784</ref>:
Finding the intersection of interval bases is surprisingly tricky<ref>This approach was found by Sintel here: https://math.stackexchange.com/questions/1560411/basis-for-the-intersection-of-two-integer-lattices/2472784#2472784</ref>:
Line 434: Line 436:
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>(x, x) + (y, 0) = (0, z)</math> and <math>x</math> is in <math>B_1</math> and <math>y</math> is in <math>B_2</math>, then we must have <math>x + y = 0</math> and <math>z = x</math><ref>credit this explanation to Tom Price on Discord</ref>. We're sort of abusing HNF as a way to solve a system, kind of like [[Douglas Blumeyer's RTT How-To#Null-space|when we calculate the null-space]]<ref>Credit this explanation to Sintel on Discord</ref>.
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>(x, x) + (y, 0) = (0, z)</math> and <math>x</math> is in <math>B_1</math> and <math>y</math> is in <math>B_2</math>, then we must have <math>x + y = 0</math> and <math>z = x</math><ref>credit this explanation to Tom Price on Discord</ref>. We're sort of abusing HNF as a way to solve a system, kind of like [[Douglas Blumeyer's RTT How-To#Null-space|when we calculate the null-space]]<ref>Credit this explanation to Sintel on Discord</ref>.


== But first: a gentle introduction ==
=== 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!
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 ==
=== Example ===


Let's find the intersection of 2.5/3 and 2.9.5.
Let's find the intersection of 2.5/3 and 2.9.5.
Line 589: Line 591:
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.
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 ==
=== Notation ===


The notation for interval basis intersecting we'll use here is just the intersection symbol: <math>B_1∩B_2</math>.
The notation for interval basis intersecting we'll use here is just the intersection symbol: <math>B_1∩B_2</math>.


== Applications ==
=== 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: [[Temperament merging across interval bases#Map-merge]].
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: [[Temperament merging across interval bases#Map-merge]].