Polyurethane Toggles

We consider the involutions known as"toggles,"which have been used to give simplified proofs of the fundamental properties of the promotion and evacuation maps. We transfer these involutions so that they generate a group $\mathscr P_n$ that acts on the set $S_n$ of permutations of $\{1,\ldots,n\}$. After characterizing its orbits in terms of permutation skeletons, we apply the action in order to understand West's stack-sorting map. We obtain a very simple proof of a result that clarifies and extensively generalizes a theorem of Bouvel and Guibert and also generalizes a theorem of Bousquet-M\'elou. We also settle a conjecture of Bouvel and Guibert. We prove a result related to the recently-introduced notion of postorder Wilf equivalence. Finally, we investigate an interesting connection among the action of $\mathscr P_n$ on $S_n$, the group structure of $S_n$, and the stack-sorting map.

1. Introduction 1.1. Toggles, Trees, and Permutations. A linear extension of an n-element poset P is a bijection L : P → [n] such that L(x) ≤ L(y) whenever x ≤ P y. We often view L as a labeling of the elements of P, where L(x) is the label of x. Promotion and evacuation are bijections defined on the set L(P) of linear extensions of P that were first studied extensively by Schützenberger [36][37][38]. These maps have now received a large amount of attention in the growing field of dynamical algebraic combinatorics. We refer the reader to Stanley's beautiful survey article [40], which gives much more information about these important maps. Haiman [31] and Malvenuto-Reutenauer [34] simplified Schützenberger's approach by showing that promotion and evacuation can be defined in terms of much simpler involutions called toggles (see [35] for more information about toggles). More precisely, if i ∈ [n − 1] and L ∈ L(P ), then we obtain a new labeling swap i (L) of P by swapping the labels i and i + 1. Note that swap i (L) is a linear extension of P if and only if the element L −1 (i) ∈ P is incomparable to the element L −1 (i + 1) ∈ P. The toggle p i : L(P) → L(P) is defined by p i (L) = swap i (L), if swap i (L) ∈ L(P); L, otherwise.
Note that each map p i is an involution and that p i •p j = p j •p i whenever i and j are not consecutive integers. We let S Z denote the symmetric group on a set Z, which is the group of bijections from Z to itself. Thus, p 1 , . . . , p n−1 ∈ S L(P) . The toggle group of p 1 , . . . , p n−1 is the subgroup of S L(P) generated by p 1 , . . . , p n−1 .
A rooted plane tree is a rooted tree with finitely many vertices in which the (possibly empty) subtrees of each vertex are linearly ordered (from left to right). Note that, with this definition, there are infinitely many rooted plane trees with just two vertices because such a tree can have arbitrarily many empty subtrees. For example, one such tree consists of a root vertex that has 37 empty subtrees followed by a child that, in turn, is followed by 512 more empty subtrees. Binary plane trees, ternary plane trees, Motzkin trees, and many other natural trees are all examples of rooted plane trees. Given a set X of positive integers, a decreasing plane tree on X is a rooted plane tree whose vertices are bijectively labeled with the elements of X so that every nonroot vertex has a label that is smaller than the label of its parent. If X = [n], then this is the same as a linear extension of the poset whose Hasse diagram is the rooted plane tree (where the root is the maximum element and the leaves are the minimal elements). Let DPT be the set of decreasing plane trees. The skeleton of a decreasing plane tree T is the rooted plane tree obtained by removing the labels from T . A binary plane tree is a rooted plane tree in which each vertex has exactly 2 (possibly empty) subtrees (the "left" and "right" subtrees). Let DPT (2) ⊆ DPT be the set of decreasing binary plane trees.
Throughout this article, unless otherwise specified, we use the word "permutation" to refer to an ordering of a finite set of positive integers, written as a word. Let S n denote the set of permutations of [n]. We can obtain a permutation from a labeled tree using a tree traversal. One useful tree traversal that is defined on decreasing binary plane trees is the in-order traversal (sometimes called the symmetric order traversal). In order to read a decreasing binary plane tree in in-order, we read the left subtree of the root in in-order, then read the label of the root, and finally read the right subtree of the root in in-order. The in-order reading I(T ) of a decreasing binary plane tree T is a permutation of the set of labels of T . It is well known [3,39] that the in-order reading I is a bijection from DPT (2) to the set of all permutations. Define the skeleton of a permutation π to be the skeleton of I −1 (π).
Because each permutation π ∈ S n has an associated decreasing binary plane tree I −1 (π), which can be seen as a linear extension of a poset, we can transfer the toggles p 1 , . . . , p n−1 above to obtain toggles p 1 , . . . , p n−1 ∈ S Sn . 1 Thus, we obtain a group P n = p 1 , . . . , p n−1 ≤ S Sn . Note that P n is not a toggle group as we defined it above because different permutations could have different skeletons that then give rise to different posets. The permutations π and p i (π) always have the same skeleton, so all of the elements of P n preserve skeletons. We call the maps p 1 , . . . , p n−1 polyurethane toggles and call P n the n th polyurethane group. 2 Just as Haiman and Malvenuto-Reutenauer used toggles to simplify Schützenberger's proofs concerning promotion and evacuation, we will use the above toggles on S n to generalize and simplify the proofs of several results concerning West's stack-sorting map. This is a function s that sends permutations to permutations; we define it in Section 2.
Although we will not need this fact, we wish to remark that the polyurethane toggles fit into a more general context explored by Björner and Wachs [2]. Given π = π 1 · · · π n ∈ S n , let π −1 be the permutation whose π th i entry is i for all i ∈ [n]. Fix a binary plane tree T , and let A be the set of permutations in S n with skeleton T . A special consequence of one of the main results in [2] (written using different language) is that the set s(A) −1 = {s(π) −1 : π ∈ A} is an interval in the weak Bruhat order and that the inversion statistic and the major index are equidistributed on s(A) −1 .

Summary of Main Results
. Section 2 provides necessary background on the stack-sorting map, the postorder traversal, and permutation statistics. We begin Section 3 with a simple proof that two permutations in S n are in the same orbit under the action of the polyurethane group P n if and only if they have the same skeleton. We will also see that every orbit contains a unique 231-avoiding permutation and a unique 132-avoiding permutation. This allows us to give useful alternative definitions of two "sliding operators" that were defined and used heavily in [16] and [21]. We then give a new proof of one of the main theorems from [10] that is much simpler than the original proof and neatly explains why the permutation statistics appearing in that theorem are actually there. Our proof yields a result that is much stronger than the original theorem, and it allows us to prove a conjecture of Bouvel and Guibert as a simple consequence.
We prove that if π, π ∈ S n have the same skeleton, then there is a skeleton-preserving bijection ω : P −1 (π) → P −1 (π ), where P is the postorder traversal defined in Section 2. This result is very general because the collection of rooted plane trees is so broad. This result is also cited in [21], where it forms one of the crucial steps needed to produce infinitely many examples of what is called "postorder Wilf equivalence." We then consider a theorem of Bousquet-Mélou concerning "sorted permutations" and "canonical preimages." We give a vast generalization of her result in terms of what we call "higher-order twisted stack-sorting operators." In fact, this generalization simultaneously subsumes Bousquet-Mélous's theorem and the aforementioned conjecture of Bouvel and Guibert. We also show that the skeleton of a permutation in S n determines the skeleton of its canonical preimage (see Section 3 for definitions).
Finally, we will consider an interesting connection among the action of P n on S n , the group structure of S n , and the stack-sorting map. This allows us to give another description of one of the sliding operators from [16] and [21] that looks nothing like the alternative definitions of this operator that have been used before. We end with two open problems, one of which is the problem of determining the isomorphism type of the polyurethane group P n .
West also went through a great deal of effort to compute the fertilities of the permutations showing in particular that the first and last of these permutations have the same fertility. Bousquet-Mélou reproved this fact in [9], and the current author generalized it in [21] and [24].
The articles [10,13,17,19,21,24] are concerned with stack-sorting preimages of permutation classes. One motivation for this line of work comes from the fact that s −1 (Av(231)) is the set of 2stack-sortable permutations (see [3,10,17] for definitions). Another motivation comes from the fact that there are several permutation classes Av(τ (1) , τ (2) , . . .) such that s −1 (Av(τ (1) , τ (2) , . . .)) is also a permutation class (see [19,24] for examples). The articles [10,21,24] consider when the preimage sets of two permutation classes are counted by the same numbers, a phenomenon dating back to West that was named "fertility Wilf equivalence" in [21]. These articles also consider permutation statistics that are jointly equidistributed on the various preimage sets. We will see that the action of P n on S n yields a remarkably simple tool for analyzing fertility Wilf equivalence.
We defined the in-order tree traversal in the introduction. Another tree traversal, called the postorder traversal, is defined on all decreasing plane trees. We read a decreasing plane tree in postorder by reading the subtrees of the root from left to right (each in postorder) and then reading the label of the root. Letting P (T ) denote the postorder reading of a decreasing plane tree T , we find that P is a map from DPT to the set of all permutations. The fundamental link between the stack-sorting map and decreasing plane trees comes from the identity [3] (3) s = P • I −1 .
For example, we have 246153 which agrees with (1).
Throughout this article, we are interested in joint equidistribution of permutation statistics. The following definition formalizes this notion. Definition 2.1. A permutation statistic is a function from the set of normalized permutations to N ∪ {0}. Let A and A be sets of normalized permutations, and let E be a set of permutation statistics. We say that the elements of E are jointly equidistributed on A and A if there is a bijection g : A → A such that f (g(π)) = f (π) for all π ∈ A and all f ∈ E.
A descent of a permutation π = π 1 · · · π n is an index i ∈ [n − 1] such that π i > π i+1 . The descent set of π, denoted Des(π), is the set of descents of π. Let LenDes denote the set of all permutation statistics f such that f (π) only depends on the length and descent set of π. A few such statistics (see [10] or [14] for their definitions) are des, asc, maj, valley, peak, ddes, dasc, rir, rdr, lir, ldr. It is straightforward to show that an index i is a descent of π if and only if the vertex whose label is read i th in the in-order traversal of I −1 (π) has a right child. This means that the length and descent set of a permutation are determined by the permutation's skeleton.
Definition 2.2. We say a permutation statistic f is skeletal if for every permutation π, f (π) only depends on the skeleton of π.
There are several important skeletal statistics that are not in LenDes. A few examples (see [10] or [14] for their definitions) are rmax, lmax, indmax, slmax, slmax • rev. One of the main theorems from [10] gives a list of several permutation statistics and states that the statistics in that list are jointly equidistributed on s −1 (Av n (231)) and s −1 (Av n (132)) for every n ≥ 1. The statistics in the list appear somewhat arbitrary at first, but Theorem 3.2 below clarifies this matter, showing that all but one of those statistics appear in the list precisely because they are skeletal. The one remaining statistic is interesting; it appears in the list for a slightly different reason.
We will see that the polyurethane action allows us to understand joint equidistribution of statistics on "higher-order" preimages of permutations under s. In order to make this more precise, we make the following definition, which is motivated by the conjecture of Bouvel and Guibert mentioned above (which is stated below in (5)). Definition 2.3. Let rev denote the reversal operator defined on permutations by rev(π 1 · · · π n ) = π n · · · π 1 . A higher-order twisted stack-sorting operator is a map of the form s = ν m • ν m−1 • · · · • ν 1 , where ν 1 , . . . , ν m ∈ {s, rev} and ν 1 = s.

Polyurethane Actions and Some Applications
In the introduction, we defined the toggles p 1 , . . . , p n−1 ∈ S L(P) , where P is a poset with n elements and L(P) is the set of all linear extensions of P. We then said that we could view a binary plane tree as the Hasse diagram of a poset and use the in-order reading I to transfer these toggles so that they are defined on permutations. It will be convenient to have an equivalent definition of these maps that avoids any reference to linear extensions of posets. For π ∈ S n and i ∈ [n − 1], let swap i (π) be the permutation obtained from π by swapping the positions of i and i + 1. Similarly, for each decreasing plane tree T on [n], let swap i (T ) be the labeled tree obtained from T by swapping the labels i and i + 1 (the resulting tree is not necessarily a decreasing plane tree).
Definition 3.1. Define the polyurethane toggle p i ∈ S Sn by p i (π) = swap i (π), if there is an entry a > i + 1 appearing between i and i + 1 in π; π, otherwise.
Let P n = p 1 , . . . , p n−1 be the subgroup of S Sn generated by p 1 , . . . , p n−1 . We call P n the n th polyurethane group.
For example, p 2 (3547126) = swap 2 (3547126) = 2547136 because the entry 4 is larger than 3 and lies between 2 and 3 in 3547126. Note that p n−1 is just the identity element of S Sn . The elements of P n preserve the skeletons of the permutations on which they act. In other words, any two permutations in S n that lie in the same P n -orbit must have the same skeleton. The following theorem shows that the converse is also true. Proof. Suppose π ∈ S n contains the pattern 231. It is straightforward to check that there must be some i ∈ [n − 1] and some a ∈ [n] with a > i + 1 such that i + 1 appears to the left of a in π and i appears to the right of a in π. The permutation p i (π) contains strictly fewer copies of the pattern 231 than π does. This shows that we can repeatedly apply the polyurethane toggles until we eventually reach a 231-avoiding permutation. Hence, every orbit of the P n -action contains at least one 231-avoiding permutation. A similar argument shows that every orbit contains at least one 132-avoiding permutation. We know from (2) that there are C n 231-avoiding permutations (and C n 132-avoiding permutations) in S n , so there are at most C n orbits. It is well known that C n is the number of (unlabeled) binary plane trees on n vertices, so it is the number of skeletons of permutations in S n . We saw above that any two permutations in the same orbit must have the same skeleton, so there are at least C n orbits. This proves that there are exactly C n orbits. It follows that two permutations in S n with the same skeleton must be in the same orbit. Furthermore, each orbit contains a unique 231-avoiding permutation and a unique 132-avoiding permutation.
Many of the results in [16] and [21] depend on "sliding operators" swu, swd : S n → S n . Those two articles give different equivalent definitions of these maps. We can give a third definition of swu and swd with the help of Theorem 3.1; it is straightforward to check that the following definition is equivalent to the ones presented in [16] and [21]. Definition 3.2. Given π ∈ S n , let swu(π) be the unique 132-avoiding permutation with the same skeleton as π. Let swd(π) be the unique 231-avoiding permutation with the same skeleton as π.
Bouvel and Guibert gave a somewhat complicated proof of the above equidistribution result using generating trees. By contrast, we obtain a more general version of their theorem and prove their conjecture via a painless application of the polyurethane action. We first need the following simple lemma, which is the primary reason why the polyurethane toggles are useful for studying the stack-sorting map.
Proof. If p i (s(σ)) = swap i (s(σ)), then there must be an entry lying between i and i + 1 in s(σ) that is larger than i + 1. Since s(σ) = P (I −1 (σ)) by (3), it follows from the definition of the postorder traversal and the fact that I −1 (σ) is a decreasing plane tree that i is not a descendant of i + 1 in I −1 (σ). This means that there is an entry lying between i and i + 1 in σ that is larger than i + 1, so p i (σ) = swap i (σ). We have I −1 (p i (σ)) = swap i (I −1 (σ)), so it follows from (3) and the definition of the postorder traversal that s(p i (σ)) = P (I −1 (p i (σ))) = swap i (P (I −1 (σ))) = swap i (s(σ)) = p i (s(σ)).
Theorem 3.2. If s is a higher-order twisted stack-sorting operator and π, π ∈ S n have the same skeleton, then zeil and all of the skeletal statistics are jointly equidistributed on s −1 (π) and s −1 (π ). In particular, zeil and all of the skeletal statistics are jointly equidistributed on s −1 (Av n (231)) and s −1 (Av n (132)).
Proof. Theorem 3.1 tells us that π and π are in the same P n -orbit. Since P n is generated by the polyurethane toggles p 1 , . . . , p n−1 , it suffices to prove the first statement of the theorem in the case in which π = p i (π) for some i ∈ [n − 1]. The proof is trivial if π = π , so we can assume π = swap i (π).
Recall from Remark 3.1 that swu : Av n (231) → Av n (132) is a skeleton-preserving bijection. For each π ∈ Av n (231), we can use the first statement of the theorem to see that zeil and all of skeletal statistics are jointly equidistributed on s −1 (π) and s −1 (swu(π)). It follows that these statistics are jointly equidistributed on s −1 (Av n (231)) and s −1 (Av n (132)).
We now prove the surprising fact that the skeleton of a permutation π determines the entire set of rooted plane trees appearing as skeletons of trees in P −1 (π). This result is needed in [21] in order to produce infinitely many examples of postorder Wilf equivalence. The polyurethane action makes the proof remarkably simple.
Proof. We know by Theorem 3.1 that π and π are in the same P n -orbit. Because P n is generated by p 1 , . . . , p n−1 , it suffices to prove the theorem in the case in which π = p i (π) for some i ∈ [n − 1]. The proof is trivial if π = π , so we can assume π = swap i (π). Choose T ∈ P −1 (π). There must be an entry lying between i and i + 1 in π that is larger than i + 1. It follows from the definition of the postorder traversal and the fact that T is a decreasing plane tree that i is not a descendant of i + 1 in T . This means that swap i (T ) is a decreasing plane tree. Furthermore, P (swap i (T )) = swap i (P (T )) = swap i (π) = π . As T was arbitrary, this shows that swap i (P −1 (π)) ⊆ P −1 (π ). We can repeat this argument with the roles of π and π interchanged to prove that swap i (P −1 (π)) = P −1 (π ). We now put ω = swap i to complete the proof.
Most familiar skeletal permutation statistics (des, peak, maj, rmax, slmax, etc.) are easily seen to be skeletal. Theorem 3.2 provides us with several interesting skeletal statistics that are not at all obviously skeletal. One such statistic is the fertility statistic itself! We define this statistic by fer(π) = |s −1 (π)|. More generally, if s is a higher-order twisted stack-sorting operator, then we can define the higher-order twisted fertility statistic fer s by fer s (π) = |s −1 (π)|. Theorem 3.2 tells us that all of these statistics are skeletal. Another interesting statistic, which was introduced in [16] in order to understand so-called "uniquely sorted permutations," is the deficiency statistic def. Bousquet-Mélou [9] defined a permutation to be sorted if its fertility is positive. If π ∈ S n , then def(π) is defined to be the smallest nonnegative integer such that π(n + 1)(n + 2) · · · (n + ) is sorted. Because we now know that the fertility statistic fer is skeletal, it is easy to verify that def is also skeletal.
Bousquet-Mélou [9] defined a decreasing binary plane tree to be canonical if every vertex v that has a left child also has a nonempty right subtree T R v such that the first entry in I(T R v ) is smaller than the label of the left child of v. She defined a permutation π to be canonical if I −1 (π) is canonical. She then proved the following result.
Theorem 3.5 ( [9]). For every sorted permutation π, there is a unique canonical permutation σ ∈ s −1 (π). Moreover, the fertility of π and the set of binary plane trees that are skeletons of elements of s −1 (π) only depends on the skeleton of σ.
Given a sorted permutation π ∈ S n , we call the unique canonical permutation in s −1 (π) the canonical preimage of π. Theorem 3.5 led Bousquet-Mélou to ask for a general method for computing the fertility of a permutation from the skeleton of its canonical preimage. This was accomplished in [22][23][24] using different language. Invoking Theorem 3.2, we obtain the following strengthening of Bousquet-Mélou's theorem.
Corollary 3.1. If s is a higher-order twisted stack-sorting operator and π, π ∈ S n are sorted permutations whose canonical preimages have the same skeleton, then all of the skeletal statistics are jointly equidistributed on s −1 (π) and s −1 (π ).
One might ask if Theorem 3.5 actually tells us anything new. In other words, Corollary 3.1 would follow immediately from Theorem 3.2 (without the help of Theorem 3.5) if we could show that the skeleton of the canonical preimage of a sorted permutation π determines the skeleton of π. This turns out to be false. The sorted permutations 42135 and 32145 have different skeletons, but their canonical preimages 45231 and 35241 have the same skeleton. Thus, Corollary 3.1 applies when π = 42135 and π = 32145 even though Theorem 3.2 does not apply in this case. This also explains why we did not include the statistic zeil in the collection of jointly equidistributed statistics in Corollary 3.1. We have s −1 (42135) = {45231} and s −1 (32145) = {35241}, and zeil is not equidistributed on these two sets because zeil(45231) = 1 = 2 = zeil(35241). Let us remark, however, that we can add zeil to the collection of jointly equidistributed statistics in Corollary 3.1 if s ∈ {s, rev •s}.
We have just seen that the skeleton of the canonical preimage of a sorted permutation π does not determine the skeleton of π. The reverse dependency, however, does hold. Theorem 3.6. If π, π ∈ S n are sorted permutations that have the same skeleton, then the canonical preimages of π and π have the same skeleton.
Proof. As in the proofs of Theorems 3.2 and 3.4, it suffices to consider the case in which π = p i (π) = swap i (π) for some i ∈ [n − 1]. Let σ and σ be the canonical preimages of π and π , respectively. Lemma 3.1 tells us that s(p i (σ)) = p i (s(σ)) = p i (π) = π . We claim that p i (σ) is canonical. If we can prove this, then we will know that p i (σ) = σ because the canonical preimage of π is unique. This will prove that σ and σ have the same skeleton, as desired.
To prove the claim, we assume by way of contradiction that p i (σ) is not canonical. From this assumption, one can verify that i + 1 is the left child of a vertex v in I −1 (σ) and that v has a nonempty right subtree T R v such that the first entry of I(T R v ) is i. One can now check that every entry of P (I −1 (σ)) appearing between i and i + 1 is a descendant of i in I −1 (σ). Every such entry is necessarily smaller than i. Since P (I −1 (σ)) = s(σ) = π by (3), we find that there are no entries between i and i+1 in π that are greater than i+1. However, this means that p i (π) = π = swap i (π), which is a contradiction.
We end this section with a discussion of a somewhat unexpected connection among skeletons of permutations, the stack-sorting map, and the group structure of S n . One can naturally identify S n with the symmetric group S [n] by associating π = π 1 · · · π n ∈ S n with the bijection from [n] to [n] that sends i to π i for all i ∈ [n]. This defines a group operation · on S n . More precisely, if π = π 1 · · · π n and σ = σ 1 · · · σ n , then π · σ = π σ 1 · · · π σn . Let π −1 denote the inverse of π in the group S n . Note that π ∈ Av(231) if and only if π −1 ∈ Av(312).
The answer is the n th Catalan number C n . In fact, we can use Theorem 3.1 to obtain the following proposition.
In Definition 3.2, we defined a sliding operator swd. There are two alternative definitions of this operator (which better explain the name "sliding operator" and the symbol "swd") appearing in [16] and [21]. As consequence of Proposition 3.1, we obtain a fourth description of this operator that bears very little resemblance to the other three.

Open Problems
It would be interesting to determine the actual isomorphism types (or even just the orders) of the polyurethane groups P n . We know that p n−1 = 1 and that p 2 i = 1 for each i ∈ [n − 2]. It is also easy to see that p i p j = p j p i when i and j are not consecutive integers, and one can verify that (p i p i+1 ) 6 = 1. This shows that P n is a quotient of the Coxeter group with Coxeter graph . It is easy to see that P 3 has order 2. One can also show that P 4 is the Coxeter group G 2 , which is isomorphic to D 12 , the dihedral group of order 12.
We know by Theorem 3.2 that the statistic fer s 2 given by fer s 2 (π) = |s −2 (π)| is skeletal. It would be very interesting (and probably very useful) to have a method for determining fer s 2 (π) from the skeleton of π. Alternatively, one could attempt to follow the ideas introduced in [22][23][24] to produce a method for determining fer s 2 (π) from the skeleton of the canonical preimage of π when π is sorted (those articles are phrased in terms of "canonical valid hook configurations" instead of canonical preimages).