{'fraction_non_alphanumeric': 0.044270641186453186, 'fraction_numerical': 0.017708256474581272, 'mean_word_length': 4.296600234466588, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A group-theoretical classification of three-tone and four-tone harmonic chords

We classify three-tone and four-tone chords based on subgroups of the symmetric group acting on chords contained within a twelve-tone scale. The actions are inversion, major-minor duality, and augmented-diminished duality. These actions correspond to elements of symmetric groups, and also correspond directly to intuitive concepts in the harmony theory of music. We produce a graph of how these actions relate different seventh chords that suggests a concept of distance in the theory of harmony.


Introduction
Early on in music theory we learn of the harmonic triads: major, minor, augmented, and diminished. Later on we find out about four-note chords such as seventh chords. We wish to describe a classification of these types of chords using the action of the finite symmetric groups.
We describe the sounding of simultaneous notes by an ordered increasing list of integers in Z/12 surrounded by parentheses. For example, a major second interval M 2 would be represented by (0, 2), and a major chord would be represented by (0, 4, 7). We denote the set of all simultaneous k-notes by N k . So (0, 4, 7) ∈ N 3 .
We denote the set of all such partitions of 12 by P 12 , and we consider partitions unordered. To write a partition, we use square brackets, so that the partition associated to (0, 4, 7) is the partition [3,4,5]. Since we consider all partitions unordered, we usually write the numbers of a partition in increasing order. Under this scheme, different intervals or chords may correspond to the same partition. For example, the partition [3,4,5] is also associated to (0, 0 + 3, 0 + 3 + 5) = (0, 3,8).
To summarize, we can say that to each simultaneous playing of notes, we can assign a partition of twelve. Each partition may give rise to more than one way of playing a set of simultaneous notes, but since each way of doing so corresponds to a different way of adding up the partition of twelve, we can apply elements of the appropriate symmetric group to obtain every possible set of simultaneous notes. This is the basis of the classification scheme we introduce. We also use this classification scheme to create a graph showing how each chord is related with regard to each of the introduced group actions.
The method of studying group actions on chords goes back to [3]. Our method of relating chords is similar to the one used in [2] and, but the authors in that paper are not concerned with pitch classes or classifying from partitions. They also consider triads, whereas the main focus of this work is four-tone harmonic chords or seventh chords. The work of [1] is focused on seventh chords, but again is more concerned with absolute pitches. Also, unlike in these previous interesting studies, we are more concerned with deriving the basic harmonic three-tone and four-tone chords axiomatically and with representing this relationship graphically.

Acknowledgements
The author would like to thank Emily Polak for a conversation about naming the augmenteddiminished duality operator, and for inspiring this paper with her musical talent.

Three-tone harmonic chords
As a warmup for three-tone chords, we consider the following definition, which gives us the usual three-tone harmonic chords. Definition 2.1. A harmonic three-tone chord is any chord whose partition does not contain any x ≤ 2.
Therefore, the major chord (0, 4, 7), whose partition is [3,4,5], is an example of a harmonic chord since it does not contain 1 or 2. We will see now that this definition encompasses the usual harmonic chords that we learn in beginning music theory.
In order to classify harmonic three-tone chords, we first list all partitions of twelve that do not have any x ≤ 2 in them. There are three of these: [3,3,6], [3,4,5], and [4, 4, 4]. Each may correspond to many chords; however to list all such chords we just need to find one chord and apply element of the symmetric group S 3 to it. We start with [3,4,5]. One such corresponding chord is (0, 4, 7), the major chord. Here are the possibilities we are starting with: (1) (0, 4, 7) → [3, 4, 5], the major chord. We now consider two operations on chords. The first is inversion, named after the corresponding inversion in music theory. It is the function When no confusion is possible, we denote i k by i. Despite its name, inversion does not have order two except when k = 2, but we keep the terminology to be consistent with music theory. In fact, it is easily seen that i k has order k; that is, i k k = id, where id is the identity operator. There is a second operator, which we call major-minor duality, denoted by d k : Again, when k is clear, we denote d k by d. The duality operator satisfies d 2 = id. In this way, we get an action of the dihedral group D k on N k . Recall the dihedral group on k vertices is a group of order 2k and is given by generators and relations in the presentation The action of D k on N k is that of r acting as i k and s acting as d k .
Let us now return to k = 3, the situation of three-tone chords. In this case, D 3 = S 3 , where in general S k is the full symmetric group on k symbols. We now recall the chords we listed corresponding to all partitions satisfying the definition of a harmonic three-tone chord. By substituting these chords into the functions of inversion and duality, we will obtain all harmonic three-tone chords by definition. We have for inversion: ( We recognize this as the familiar minor chords and its inversions. In fact, we see from this that through duality, the root, first, and second inversions of the major chord correspond to the second, first, and root positions of the minor chord respectively. This follows from the relation property di k = i −k d satisfied by the dihedral group. Because the major and minor chords are dual, the d operator could be thought of as major-minor duality. (2) The diminished chord: under inversion, we obtain the chords: 3,9), i(0, 3, 9) = (0, 6, 9)} by successive applications of i. These are the root, first inversion, and second inversion of the diminished chord. Applying the duality operator gives d(0, 3, 6) = (0, 6, 9). Therefore, we conclude that the duality operator transposes the root and second inversion of the diminished chord and fixes the first inversion. So, under inversion, the augmented chord is stable. In some sense it is this fixed property of the augmented chord that actually demands resolution. Not only that, but d(0, 4, 8) = (0, 4, 8). Therefore, the augmented chord is both inversion stable and major-minor dual.

Four-tone harmonic chords
Four-tone harmonic chords are more complex than three-tone harmonic chords. Recall that we have defined a three-tone harmonic chord to be one whose partition does not contain 1 or 2. On the other hand, it makes less sense to define a four-tone harmonic chord in exactly the same way, since that would exclude seventh chords. Instead, we use the following.
Definition 3.1. A four-tone harmonic chord is a four-tone chord whose partition contains at most one x ≤ 2.
We have already described two operators i k and d k , called inversion and duality, that will operate on the set N k , the set of k-tone chords. However, in the case of k = 4, the symmetric group S 4 has 24 elements, which is larger than the dihedral group D 4 of eight elements. Can we obtain any additional actions on N 4 , and if so, do those actions contain any new operators of harmonic significance? We will answer this question now.
To begin, we again list all partition of 12 of length 4 that satisfy Definition 3.1 of a four-tone harmonic chord along with one example of each type. To keep the verbiage simple for seventh chords, we describe seventh chords first by their three-tone harmonic chord and the type of seventh added to them as follows: (1) (0, 4, 7, 11) → [4, 4, 3, 1], the major-major seventh (also known as the major seventh chord) (2) (0, 4, 7, 10) → [4, 3, 3, 2], the major-minor seventh chord (also known as the dominant seventh chord) (3) (0, 3, 6, 9) → [3, 3, 3, 3], the diminished-diminished seventh chord (also known as the fully diminished seventh chord) We can calculate how many chords we will find before we actually find them. For the permutations [4, 4, 3, 1] and [4, 3, 3, 2] there are 4!/2! = 12 possible chords, and there is only one possible chord for [3,3,3,3]. Therefore, there are 25 four-tone harmonic chords. As before, we write down all the possible chords we can obtain from these using the inversion and duality operators. Let us first discuss the major-major seventh. Its inversions are the orbit of the major-major seventh element (0, 4, 7, 11) under the inversion operator. Explicitly: Something else which is quite intriguing is that d(0, 4, 7, 11) = (0, 1, 5, 8). That is i 3 = d when restricted to the orbit of the major-major seventh under i. In other words, adding the major seventh interval to the major chord has stabilized the duality between major and minor, so that the dual of the major-major seventh orbit is again the major-major seventh orbit. The harmonic significance is that the inversions of the major-major seventh pair up as follows under This pairing of inversions means that in harmony, inversions of the major-major seventh according to this pairing also function as major-minor tension as well. This relationship was not present in three-tone chord harmony.
The root position of this set (the one which contains either a major or minor seventh interval from the lowest note) is (0, 3, 6, 10), which is the diminished-minor seventh chord. We have thus far only accounted for 9 of the 25 types of four-tone harmonic chords. We recall the reason for this is that the dihedral group D 4 only has 8 elements whereas S 4 has 24 elements. Therefore, we need to write down a new type of operator on chords to obtain the remaining types of four-tone harmonic chords.
We consider a new operator on four-tone chords called augmented-diminished duality: The reader will verify that a 2 = id, similar to duality. We note that we can also specify chords of the form (0, a 1 , a 2 , a 3 ) by an ordered partition. That is, the chord (0, a 1 , a 2 , a 3 ) corresponds to the ordered partition [a 1 , a 2 − a 1 , a 3 − a 2 , 12 − a 3 ]. The augmented-diminished operator a then corresponds to the map The augmented-diminished map is so-named because it transforms the major-major seventh inversions as follows: That is, the augmented-diminished operator a satisfies a(0, 4, 7, 11) = (0, 4, 8, 11). It transforms the major-major seventh into a augmented-major seventh. We note that the second set is not a set of inversions, although it contains some inversion pairs. Namely, the second inversion of (0, 4, 8, 11) is (0, 3, 4, 8). This finishes our analysis of all four-tone harmonic chords. We have summarized these classified into inversion orbits in Table 1.  Table 1. A table of all four-tone harmonic chords, where each row corresponds to an orbit under the inversion map. The single horizontal lines in the table group together dual sets of inversions; that is inversion that are taken to each other under major-minor duality. The double line separates the three orbits of the augmented-diminished operator, which also correspond to the three permutations that we originally used to derive all these chords.

The chord graph
Recall that we have used the augmented-diminished operator along with inversion and duality to derive all four-tone harmonic chords from the three permutations [4, 4, 3, 1], [4, 3, 3, 2], and [3,3,3,3]. In this section we talk a little about the harmonic significance of the augmented-diminished operator. In order to visualize more readily how the augmented-diminished operator acts, we examine the following directed graph showing the relations between all four-tone harmonic chords, where the relations are defined by the operators inversion, major-minor duality, and augmented-diminished duality: That is, this is the map that exchanges major with minor and augmented with diminished. If we attempt to extend this map to all chords, we find that the diminished-diminished chord is sent to the augmented-augmented chord, which is just an augmented triad together with the doubling of the root one octave higher. Leaving this aside for the moment, we see that there are four levels of harmonic similarity. At the most basic level, we have inversions. Then major-minor duality maps sets of inversions to sets of inversions. Augmentation is a little different, and highlights the difference between inversion sets. Finally, the isomorphism of the two components corresponding to two permutations provides a mirroring between two very different sets of chords.
Returning to the augmented-diminished operator, we see that it actually highlights the difference between inversions. This is a new facet of four-tone harmonic chords that is not present in three-tone harmonic chords. With three-tone harmonic chords, each inversion of a major or minor triad provides variation for voice leading and some harmonic instability especially for the second inversion. However, with four-tone harmonic chords, the addition of the seventh factor adds truly different harmonic functions to each inversion. For example the root position of a minor-major chord is stable under the augmented-diminished operator, whereas the first inversion of a minor-major chord is sent to the second inversion of a major-major chord. This shows that one inversion can behave much differently than another in music.