# Patent val/Properties

This page shows some properties of patent vals as well as generalized patent vals (GPVs), although currently it is all about the latter.

## To tell if a val is a GPV

Suppose we have a *p*-limit val V, to tell if it is a GPV:

For every prime *q* in the *p*-limit, solve

[math] \displaystyle \operatorname {round} (n \log_2 q) = v_{\pi (q)} [/math]

for *n*. The solution is

[math] \displaystyle \frac {v_{\pi (q)} - 1/2}{\log_2 (q)} \lt n \lt \frac {v_{\pi (q)} + 1/2}{\log_2 (q)} [/math]

Let N_{1}, N_{2}, …, N_{π (p)} denote the solution sets. Find

[math] \displaystyle \mathrm {N} = \bigcap_{i = 1}^{\pi (p)} \mathrm {N}_i [/math]

Then V is a GPV of every edo in N if N is non-empty and not a singleton (i.e. a single point); otherwise it is not a GPV.

## Cardinality

Given a finite prime limit, the set of all GPVs are countably infinite.

## Sorting property

Given a finite prime limit, the set of all GPVs can be ordered in this way such that all but one entry in the GPV V_{k} and its next GPV V_{k + 1} are the same, and for the different entry, the latter increments the former by 1.

This property states that, for example, if it is known that ⟨12 19 28] is a GPV, then the next GPV is one of ⟨13 19 28], ⟨12 20 28], or ⟨12 19 29].

This also holds for any rationally independent subgroups, such as 2.3.7 and 2.9.7, and even *some* rationally dependent subgroups, such as 2.3.9.7. It does not hold, however, for other rationally dependent subgroups, such as 2.3.27.7, where at certain points of edo number *n*, both the mappings for 3 and 27 increment.

**Proof**

By definition, the *p*-limit GPV of *n*-edo is V (*n*) = round (*n* log_{2} (Q)), where Q is the prime basis ⟨2 3 5 … *p*].

The sorting property is equivalent to

- for any prime
*q*_{i}in Q, there is a point of*n*to cause*v*_{i}to increment to*v*_{i}+ 1; and - for any distinct primes
*q*_{i},*q*_{j}in Q, there is*not*a point of*n*to cause both*v*_{i}and*v*_{j}to increment to*v*_{i}+ 1 and*v*_{j}+ 1, respectively;

where an increment of *f* (*x*) at *x*_{0} is defined as lim *x*→*x*_{0}^{+} *f* (*x*) = lim *x*→ *x*_{0}^{-} *f* (*x*) + 1.

#1 holds immediately following the definition of the round function, and the point is *n* = (*v*_{i} + 1/2)/log_{2} (*q*_{i}).

To prove #2, let us assume there exists such an *n*. By the definition of the round function, an increment of *y* = round (*x*) occurs only if 2*x* ∈ **Z**. Thus, for any distinct primes *q*_{i}, *q*_{j} in Q, 2*n* log_{2} (*q*_{i}) ∈ **Z**, and 2*n* log_{2} (*q*_{j}) ∈ **Z**. If that is the case, then their quotient (2*n* log_{2} (*q*_{i}))/(2*n* log_{2} (*q*_{j})) = log_{qj} (*q*_{i}) ∈ **Q**, which contradicts Gelfond–Schneider theorem. Therefore, the hypothesis is false, and such an *n* does not exist.

## Application

Given a finite prime limit, the above properties offer a way to iterate through all GPVs. To roll forwards:

- Enter a GPV. Set
*i*= 1. - Copy the input and increment its
*i*-th entry by 1. - Test if it is a GPV.
- If it is, return it and back to step 1; otherwise, increment
*i*by 1 and back to step 2.

To roll backwards:

- Enter a GPV. Set
*i*= 1. - Copy the input and decrement its
*i*-th entry by 1. - Test if it is a GPV.
- If it is, return it and back to step 1; otherwise, increment
*i*by 1 and back to step 2.

Notice that the all-zero val is a GPV, you can always enter it for the first one. It is guaranteed that you can iterate through all GPVs in this method. In practice it is recommended to start with the last entry and going backwards in step 2 for better performance, because the largest prime is most likely to increment.