# Gencom

A **gencom** is a list of generators for a temperament followed by commas for the temperament, in a specific order. The generators are transversal generators, meaning rational intervals belonging to the JI group the temperament tempers, which it tempers to generators for the temperment. The gencom is denoted [generator list; comma list], with a semicolon between the generators and the commas. For instance, [16/15 25/24; 81/80] is a gencom for 5-limit meantone. On the other hand, the exact same intervals with a different placement of the semicolon is a gencom for 5-limit JI: [16/15 25/24 81/80;], and another, [16/15; 25/24 81/80] gives 5-limit 7-equal.

The reason for putting the generators together with the commas is that notating the gencom as a list of monzos allows it to be treated as a matrix. The group of intervals generated by the gencom is the same no matter how we place the semicolon, and so is the matrix. When this group is a full p-limit group, as in the example above, the matrix is a unimodular matrix. Inverting and transposing it gives a matrix whose rows are vals; if r is the rank of the temperament then the first r rows are the mapping matrix corresponding to the generator transversal. More interesting is the case where the gencom generates a JI subgroup of some p-limit. In all cases the transpose of the pseudoinverse of the matrix of monzos gives a matrix of vals whose first r rows we call the gencom mapping, and which in its entirety we call the extended gencom mapping. The extended gencom mapping is only a unimodular matrix, and the inversion ordinary matrix inversion, in the case of the full p-limit. However in all cases the transpose pesudoinverse of the gencom matrix is the extended gencom mapping, and the transpose pseudoinverse of the extended mapping is the gencom matrix.

The rows of the extended gencom mapping are in general fractional vals, meaning the coefficients are allowed to be rational numbers. When applied to elements of the subgroup generated by the gencom, these fractional vals always return an integer value, which gives the number of times the corresponding generator or comma appears in the expression of the interval in terms of the gencom. However, the converse is not the case: if the gencom mapping returns integer values, it does not mean the interval must belong to the gencom subgroup.

Converting a gencom to a normal interval list gives a canonical form for the subgroup, which is an invariant of the temperament. Doing the same to just the commas produces another invariant, and together these determine the temperament: it is the unique temperament on the given group tempering out the given commas. The normal list defined by the generators alone is not an invariant of the temperament, since the generators give only a transversal for the tempered intervals of the temperament, not the full set of intervals being tempered. Hence, for instance, [2 40/27; 81/80] and [2 3/2; 81/80] both define 5-limit meantone, but the normal list for [2 40/27] is 2.27/5 and for [2 3/2] is 2.3. However, the extended gencom mapping can be used to determine if an interval q is in the group of the temperament. Suppose [c1 c2 ... cn] is a gencom and [v1 v2 ... vn] is the corresponding extended mapping. Then each of v1(q), v2(q) ... vn(q) must be an integer, and moreover we must have q = c1^v1(q) * c2^v2(q) ... cn^vn(q). This provides sufficient conditions as well as necessary ones.