# Preimage

For a regular temperament, the **preimage** of a mapped interval is the set of all (typically justly intoned) intervals that map to it.

For any interval that's a member of such a preimage, altering it by any one of the tempered-out commas of the temperament finds another interval that's also a member of the same preimage. Preimages thereby technically contain an infinite number of such intervals, but usually only the simplest ones are of any interest.

## Examples

This section uses curly brackets for generator-count vectors representing mapped intervals. This helps distinguish them from the angle brackets used for prime-count vectors representing (unmapped) intervals.

### A temperament with only one comma

For the meantone mapping [⟨1 1 0] ⟨0 1 4]⟩, let's find the preimage of the mapped interval [-1 2}. One member of the preimage is 10/9 AKA [1 -2 1⟩ because [⟨1 1 0] ⟨0 1 4]⟩[1 -2 1⟩ = [-1 2}. Another member of the preimage is 9/8 AKA [-3 2 0⟩ because [⟨1 1 0] ⟨0 1 4]⟩[-3 2 0⟩ = [-1 2} as well. Notice that these two intervals are one meantone comma (that's 81/80, or [-4 4 -1⟩) apart: [1 -2 1⟩ + [-4 4 -1⟩ = [-3 2 0⟩.

The meantone comma is the only comma tempered out by meantone (meantone is a nullity-1 temperament, which means its comma-basis or null-space contains only a single interval), so any mapped interval's preimage here is going to be simply a series of intervals off from each other by yet another meantone comma. So more members can be found by repeatedly adding this one comma.

First we find [-3 2 0⟩ + [-4 4 -1⟩ = [-7 6 -1⟩ which is 729/640; then from there we find [-7 6 -1⟩ + [-4 4 -1⟩ = [-11 10 -2⟩ = 59049/51200; then we find [-11 10 -2⟩ + [-4 4 -1⟩ = [-15 14 -3⟩ = 4782969/4096000. We could go on like this literally forever, but clearly these intervals are quickly getting wildly complex. Furthermore, with each additional comma we add, the difference between the original interval's size (such as measured in cents) and its tempered size grows greater, so they are of less interest in that respect as well.

We could also proceed along this series of meantone-comma-separated members of [-1 2}'s preimage in the other direction, by repeatedly *subtracting* meantone commas from 9/8. But we won't work through that because we know a similar effect will happen: the intervals found will grow steadily more complex and with greater error under the temperament.

### A temperament with multiple commas

We could repeat this experiment but with septimal meantone, [⟨1 0 -4 -13] ⟨0 1 4 10]⟩, which is still rank-2 but due to the one extra dimensionality according to the rank-nullity theorem is nullity-2. The additional comma it tempers out is 126/125 [1 2 -3 1⟩, the starling comma. Here, 10/9 [1 -2 1 0⟩ and 9/8 [-3 2 0 0⟩ both still map to [-1 2}, so they are still members of [-1 2}'s preimage, along with all the intervals listed in the previous section. But here we have some additional members which are off by multiples of the second comma as well, such as [1 -2 1 0⟩ + [1 2 -3 1⟩ = [2 0 -2 1⟩, which is 28/25, or [-3 2 0 0⟩ - [1 2 -3 1⟩ = [-4 0 3 -1⟩, which is 125/112.

So in this case the full member set of the preimage for any mapped interval of this temperament such as [-1 2} could be arranged as a 2D grid, with members differing by a meantone comma along one axis and members differing by a starling comma along the other axis.

## Image

The "preimage" is literally "that which came before the image", or in other words, the set of possible things that the image might have been projected from.

A mapping in RTT always maps any given interval to only a single other interval. The **image** for an interval is that one interval that it's mapped to by a (regular) temperament.

## Terminology

The terms "image" and "preimage" come from general mathematics where they are used regarding mathematical functions and their inputs (their domain) and outputs (their range). They are used in the same sense in regular temperament theory; in our application, mappings are the functions, intervals are the inputs, and mapped intervals are the outputs.