A Consecutive Lehmer Code for Parabolic Quotients of the Symmetric Group

In this article we define an encoding for parabolic permutations that distinguishes between parabolic $231$-avoiding permutations. We prove that the componentwise order on these codes realizes the parabolic Tamari lattice, and conclude a direct and simple proof that the parabolic Tamari lattice is isomorphic to a certain $\nu$-Tamari lattice, with an explicit bijection. Furthermore, we prove that this bijection is closely related to the map $\Theta$ used when the lattice isomorphism was first proved in (Ceballos, Fang and M\"uhle, 2020), settling an open problem therein.


Introduction
A (right) inversion of a permutation w is a pair of indices (i, j) with i < j such that w(i) > w(j). The number of inversions of w can therefore be regarded as a degree of disorder of w. The Lehmer code associated with w, attributed to Lehmer [9] but can be traced back to Laisant [8], is the integer tuple whose i th entry counts the number of inversions of w of the form (i, ·).
Björner and Wachs defined a "consecutive" version of the Lehmer code in [2, Section 9], which we shall call the BW-code of w. This encoding associates an integer tuple with a permutation w whose i th entry counts the length k of the longest sequence such that (i, j) is an inversion for all j ∈ {i+1, i+2, . . . , i+k}.
In contrast to the original Lehmer code, the BW-code no longer uniquely determines a permutation. However, the permutations with the same BW-code form an interval in the (left) weak order on the group of all permutations, the symmetric group [2, Proposition 9.10]. This (left) weak order is defined by containment of (right) inversion sets.
Another consequence of [2,Proposition 9.10] is that among all permutations with the same BW-code, there is a unique permutation w which avoids the pattern 231, i.e., in which no three indices i < j < k exist such that w(k) < w(i) < w(j), and this permutation minimizes the number of inversions among all permutations with the same BW-code as w.
Let us denote the symmetric group of degree n by S n , and its subset of all 231-avoiding permutations by S n (231). The (left) weak order on S n is a lattice, i.e., every two elements have a unique lower bound and a unique upper bound. This property was established independently by Guilbaud and Rosenstiehl [7] and Yanagimoto and Okamoto [15]. The restriction of this lattice to S n (231) was proved to be a sublattice by Björner and Wachs [2, Theorem 9.6(i)] and a quotient lattice by Reading [13,Theorem 5.1]. In fact, the resulting lattice incarnates the famous Tamari lattice denoted by T n , first defined by Tamari in [14]. We can thus see the BW-code as a concrete and simple way to quotient the weak order on S n into T n .
An analogue of 231-avoiding permutations for parabolic quotients of S n was introduced by Mühle and Williams in [10], and it was shown that these permutations constitute a quotient lattice (but no longer a sublattice) of the corresponding (left) weak order, the parabolic Tamari lattice [10, Theorem 1]. Since any parabolic quotient of S n is naturally indexed by a composition α of n, we call the resulting lattice the α-Tamari lattice T α . The main purpose of this article is to define a parabolic analogue of the BW-code; see Definition 6. We prove that the componentwise order on these parabolic BW-codes is isomorphic to T α .
It was shown in [10, Theorem 1] that T α is in fact a quotient lattice of the weak order on S α with respect to a certain equivalence relation R α on S α . The corresponding equivalence classes form intervals in the weak order and if two α-permutations are equivalent, then one can be obtained from the other by a sequence of certain local moves. Moreover, each equivalence class contains a unique (α, 231)-avoiding permutation which is also the smallest element in the corresponding weak order interval. Globally, determining whether two α-permutations are equivalent is quite tedious, because one essentially has to compare the smallest elements in the corresponding equivalence classes. Our parabolic BW-code provides a simple criterion for equivalence, because we prove that two α-permutations are equivalent with respect to R α if and only if they have the same code; see Lemma 17.
If we denote the set of parabolic BW-codes by C α and the componentwise order on integer tuples (of the same length) by comp , then our first main result follows immediately. Theorem 1. For every n > 0 and every integer composition α of n it holds that T α ∼ = (C α , comp ).
Originally, the Tamari lattice was defined in terms of a "rotation" operation on parenthesizations, binary trees or equivalently Dyck paths. A northeast path is a lattice path in N 2 comprised of north steps (marked by N ) and east steps (marked by E) of unit length. A Dyck path of semilength n is equivalent to a northeast path that stays weakly above the staircase path (N E) n and uses n north and n east steps.
A rotation of a northeast path exchanges two portions of the path under certain conditions, and T n arises as the rotation order on the set of Dyck paths of semilength n. An extension of this construction was introduced by Préville-Ratelle and Viennot in [12]. In that paper, the set of all northeast paths weakly above a fixed northeast path ν, which start and end at the same coordinates as ν, was considered. Ordering this set by rotation produces another lattice, the ν-Tamari lattice [12, Theorem 1.1].
For any composition α = (α 1 , α 2 , . . . , α r ) of n, we can define the α-bounce path ν α = N α 1 E α 1 N α 2 E α 2 · · · N αr E αr . It was established by Ceballos, Fang and Mühle in [3, Theorem II] that T α is isomorphic to the ν α -Tamari lattice. The proof of this result is rather technical, using some deep lattice-theoretic properties of T α , namely the fact that T α is extremal and is thus uniquely determined by its Galois graph. The second main contribution of this article is a much simpler and direct proof of this result.
In general, the ν-Tamari lattice admits a simple encoding as the componentwise order on so-called ν-bracket vectors, given by Ceballos, Padrol and Sarmiento in [4,Theorem 4.2]. If ν = ν α , then the corresponding bracket vectors can be converted in a simple way into parabolic BW-codes. Since both parabolic BW-codes and bracket vectors are ordered componentwise, the proof of the next result follows readily.
In Section 4, we first recall the definitions of Dyck paths and northeast paths, as well as ordinary Tamari lattices and ν-Tamari lattices. We then prove Theorem 2 in Section 4.3 by describing an explicit conversion from parabolic BW-codes to ν α -bracket vectors. Finally, in Section 5, after introducing some classical constructions that we need, we give a combinatorial interpretation of the map Θ mentioned after Theorem 2 in terms of a certain stack-processing procedure, and relate the bijection between parabolic BWcodes and ν α -bracket vectors to Θ, thus solving [3, Open Problem 2.23].

α-permutations
Let α = (α 1 , α 2 , . . . , α r ) be a composition of n. For a ∈ [r], we define s a def = α 1 + α 2 + · · · + α a , and we set s 0 In other words, α (i) is the index of the α-region containing i. When no confusion will arise, we will drop the subscript α. For three indices i < j < k with (i) < (k), we say that j is in an α-region strictly between i and k if (i) < (j) < (k).
Let S n denote the symmetric group of degree n. We are interested in the subset of α-permutations, defined by Clearly, if α = (1, 1, . . . , 1), then S α = S n .
Remark 3. If we consider the subgroup G def = S |α 1 | × S |α 2 | × · · · × S |αr| of S n , then we may identify S α with the set of minimal-length representatives of the left cosets in S n /G.
Remark 4. In the case α = (1, 1, . . . , 1), the (α, 231)-avoiding permutations are exactly the classical 231-avoiding permutations: one can either require w i = w k + 1 or not, since if w has any 231-pattern, then one can find one with the extra condition w i = w k + 1. In the general case, these notions differ since i could belong to the same α-region as j. For example, 3 24 1 belongs to S (1,2,1) (231) whereas it has a classical 231-pattern with elements in different α-regions.

The weak order
For w ∈ S α , we define its (right) inversion set by This enables us to define a partial order-the (left) weak order -on S α by setting Two permutations u, v ∈ S α form a cover relation-denoted by u L v-if u < L v and there is no w ∈ S α with u < L w < L v. It follows from the analogous property of the weak order on the full group S n that in S α we have u L v if and only if there are two indices i < j in different α-regions, such that u i = u j − 1, and The partially ordered set (S n , L ) is a lattice by [15,Theorem 2.1]; see also [7]. For an arbitrary composition α of n, it follows from [1, Theorem 4.1] that (S α , L ) is an interval of (S n , L ), and thus also a lattice.
The partially ordered set T α def = S α (231), L is the α-Tamari lattice. This name is justified by the following result.

Encoding α-permutations
We consider the following set of integer tuples. Definition 6. Let C α denote the set of all integer tuples (c 1 , c 2 , . . . , c n ) with the following properties: and all a ∈ (i)+1, (i)+2, . . . , r−1 such that c i s a − s (i) .
the electronic journal of combinatorics 28(3) (2021), #P3.53 Remark 7. The statement of (C3) is directly true if a = r and trivial if i > s r−2 , hence the restriction to i ∈ [s r−2 ] and a < r.
Indeed, by (C1), c n = 0 so that the implication required by (C3) is trivially satisfied when a = r. If i > s r−2 , then (i) r − 1, so that the only case one could consider is again a = r.
For example, with n = 3 and α = (2, 1), all conditions boil down to 0 c 1 c 2 1 and c 3 = 0, hence three solutions. With n = 3 and α = (1, 2), one gets 0 c 1 2 and 0 c 2 c 3 0, again providing three solutions. One can check that they are indeed the codes obtained in Table 1 (right column).
To see all conditions of the definition play a role, one has to consider compositions of at least three parts and at least one greater than one. For example, if α = (1, 2, 1), one gets the following set of relations: 0 c 1 3, 0 c 2 c 3 1, c 4 = 0, and the extra condition coming from (C3): In practice, we have twelve tuples satisfying all conditions except the last one and this last condition gets rid of (2, 0, 1, 0) and (2, 1, 1, 0), hence providing a total of ten solutions. One can check that these solutions are exactly the codes obtained in Figure 2 (bottom elements in each cell of the drawing).
Given two tuples a = (a 1 , a 2 , . . . , a n ) and . We claim in Theorem 1 that the poset (C α , comp ) is isomorphic to T α . For example, one can check, again on Figure 2 that the bottom elements are indeed (partially) ordered by the componentwise order on their tuples.
As a first step towards proving Theorem 1, we associate an integer tuple with each w ∈ S α . Definition 8. For w ∈ S α , we define its α-code by In other words, c i counts the number of consecutive entries in the one-line notation of w that are smaller than w i , starting from the first entry in the α-region immediately after that of i. For α = (1, 1, . . . , 1), Definition 8 agrees with [2, Definition 9.9].
If code α (w) = (c 1 , c 2 , . . . , c n ), then we say that w i sees w k if 0 < k − s (i) c i . Clearly, if w i sees w k , then (i, k) ∈ Inv(w), and w i sees exactly c i elements for each index i.
In terms of patterns, c i is the number of 21-patterns where the 2 is at position i that are not 231-patterns. Examples of codes of α-permutations are shown in Table 1 and  Hence, c i n − s (i) , which establishes (C1). If (i) = (i + 1), then w i < w i+1 by construction, and thus c i c i+1 . This establishes (C2). Now let a ∈ (i)+1, (i)+2, . . . , r be such that c i s a − s (i) . In particular, w i sees w sa , meaning that w i > w sa . Since w sa is the rightmost, hence largest, element of its region, w i also sees any w j which is seen by w sa . This implies that c i c sa + s a − s (i) , which is (C3). Theorem 1.1 in [10] establishes that the α-Tamari lattice arises as a quotient lattice of the weak order on S α . This is established by proving that for every w ∈ S α there exists a unique maximal (α, 231)-avoiding permutation below w in the weak order. The next lemma records this fact.
. We now prove that code α is an order-preserving map from (S α , L ) to (C α , comp ).
By assumption, Inv(v) \ Inv(u) = (i, k) for some indices i < k in different α-regions such that v i = v k + 1. It follows that any entry which sees v k must be greater than v i , and any entry which does not see v i must be smaller than v k . Thus, a j = b j for all j = i. By construction, u i = v k and u k = v i . Since u i < u k , we conclude that u i does not see u k .
If v i sees v k , then a i < b i . This is the case precisely when every j in α-regions strictly between i and k satisfies v j < v i , which by Lemma 11 means that π ↓ α (u) = π ↓ α (v). If v i does not see v k , then there exists an index j in an α-region strictly between i and k such that v i < v j , which by Lemma 11 is equivalent to π ↓ α (u) = π ↓ α (v). If we choose j as small as possible with this property, then any j < j in an α-region strictly between i and k satisfies v i > v j , and thus Proof. This follows from repeated application of Lemma 12. Proof. Let code α (u) = (a 1 , a 2 , . . . , a n ) and code α (v) = (b 1 , b 2 , . . . , b n ) be chosen in such a way that code α (u) comp code α (v).
Assume that there exists (i, k) ∈ Inv(u)\Inv(v), and among all these inversions choose Now, there cannot be any element between u k + 1 and u i − 1 in the same α-region as u j . Indeed, if this was the case, since u j > u i , u j−1 would be such an element. But, since it is seen by u i by minimality of j, and since b i a i , the value v j−1 would be seen In that case, (j − 1, k) would be an inversion of u, not an inversion of v and would violate the minimality of (i, k) among such elements as defined earlier. So all elements between u k and u i belong to α-regions different from the α-region containing u j . Thus, among those, there is a smallest one u (which is not u k but can be u i ) that is on the left of u j . This element belongs to an (α, 231)-pattern in u: ( , j, ), where is the position of u − 1 in u, which is a contradiction.
Therefore, our assumption must have been wrong, and it follows Inv(u) ⊆ Inv(v), thus u L v by definition.
Note that we never used in the previous proof that v is (α, 231)-avoiding. This makes sense thanks to Lemma 10: its property has no equivalent going upwards so u and v do not play symmetrical roles.

Decoding α-codes
We proceed to prove that code α is a bijection from S α (231) to C α .
Lemma 15. If w ∈ S α (231), then the leftmost 0 in code α (w) corresponds to the position of the 1 in the one-line notation of w.
Proof. Let code α (w) = (c 1 , c 2 , . . . , c n ), and let j o ∈ [n] be such that w jo = 1. Moreover, if j = min{i | c i = 0}, then j j o , since c jo = 0. Let w j = a. Since the entries in an α-region are ordered increasingly, a is the smallest element in its α-region. Now, define m = min(w 1 , w 2 , . . . , w j ). Then, if m = a, since m is strictly to the left of a in w, it cannot be 1 either, so that we have a 231 pattern with the values m, a, and m − 1 necessarily in that order in w and in different regions. Otherwise m = a. If m = 1, the region of a cannot be the rightmost region of w since a − 1 did not appear in this prefix of w. Let b be the smallest element in the (j) + 1 -st α-region, and let k = s (j) + 1, i.e., w k = b. Since c j = 0, we have a < b. We then have a 231 pattern with the values a, b, and a − 1. So a = 1 and j = j o .
Proposition 16. For c ∈ C α there exists a unique w ∈ S α (231) such that code α (w) = c.
the electronic journal of combinatorics 28(3) (2021), #P3.53 Proof. We proceed by induction on n. For n 3, the claim can be checked directly (see Table 1), which establishes the induction base. Assume that the claim holds for all compositions of n < n.
Let c = (c 1 , c 2 , . . . , c n ) ∈ C α . By definition, c n = 0, which enables us to define j o = min j ∈ [n] | c j = 0 . By (C2), j o = s a−1 + 1 for some a ∈ [r], meaning that j o is the first element in the a th α-region.
Let α = (α 1 , α 2 , . . . , α r ) be the unique composition of n − 1 which is obtained by subtracting 1 from α a . (If α a = 1, then we simply remove this part.) We define s a = α 1 + α 2 + · · · + α a , and we obtain We define c = (c 1 , c 2 , . . . , c n−1 ) by setting It is straightforward to check that c ∈ C α . By induction hypothesis, there exists a unique w ∈ S α (231) with code α (w ) = c . We now "inject" 1 into w to construct a permutation w ∈ S n via Since j o is the first element in the a th α-region, it follows that w ∈ S α . Assume that w has an (α, 231)-pattern (i, j, k). Since w ∈ S α (231), it must be that k = j o , and w i = 2. By construction, w i = 1, implying that c i = 0. Since i < j o , it follows that c i = 0, contradicting the choice of j o . Thus, w ∈ S α (231). By construction, it follows that w is the only (α, 231)-avoiding permutation with code α (w) = c.  Proof of Theorem 1. Proposition 16 establishes that S α (231) and C α are in bijection, and Corollary 13 and Lemma 14 establish that for u, v ∈ S α (231) we have u L v if and only if code α (u) comp code α (v). This finishes the proof.

The α-Tamari lattices and the ν-Tamari lattices
Among other things, [10] introduces a bijection Θ from S α (231) to a certain family of northeast paths, denoted by L να . This map was simplified in [3] and used to show that the lattice T α is isomorphic to a certain lattice on L να , denoted by T να [3, Theorem II]. The proof of this result is only partially bijective, and relies on structural properties of both lattices, namely that they are both extremal and have isomorphic Galois graphs.
In the following, we show that our parabolic BW-codes induce a more direct and combinatorial proof of the isomorphism between T α and T να (Theorem 2). We start with the electronic journal of combinatorics 28(3) (2021), #P3.53 the definitions of related objects, then we will show that our parabolic BW-codes for T α are in bijection with ν α -bracket vectors in T να , leading to the wanted isomorphism.

Dyck paths and the ordinary Tamari lattice
We first consider up steps (of the form U def = (1, 1)) and down steps (of the form D def = (1, −1)). A Dyck path of semilength n is a lattice path using only up and down steps, starting and ending on the x-axis and never going below it. Consequently, any Dyck path uses as many up steps as it uses down steps. Let D n denote the set of Dyck paths of semilength n. The ordinate of a lattice point on a Dyck path is simply the value of its y-coordinate.
If P ∈ D n , then any up step U on P has a matching down step: this is the first down step D on P whose starting point has the same ordinate as the ending point of U . In particular, the portion of P strictly between U and D is a Dyck path (of strictly smaller semilength) in its own right.
A valley of P is a lattice point V on P preceded by a down step and followed by an up step. The rotation of P by a valley V is the Dyck path P ∈ D n obtained by swapping the down step before V and the portion of P (weakly) between the up step after V and its matching down step. The reflexive and transitive closure of this operation yields a partial order on D n .
The set of Dyck paths ordered by this rotation order forms the (ordinary) Tamari lattice T n , first described in [14].

Northeast paths and the ν-Tamari lattice
Now, we consider north steps (of the form N def = (0, 1)) and east steps (of the form E def = (1, 0)). A northeast path of length n is a lattice path using k north and n − k east steps which starts on the x-axis. The height of a lattice point on a northeast path is the value of its y-coordinate. A valley of a northeast path µ is a lattice point V on µ preceded by an east step and followed by a north step.
Given a northeast path ν, a ν-path is a northeast path which shares the starting and ending points with ν and never goes below ν. Let L ν denote the set of ν-paths. The horizontal distance of a lattice point Q on µ ∈ L ν , denoted by horiz ν (Q), is the largest number of east steps that can be added to Q without crossing to the other side of ν.
The rotation of µ by a valley V is the path µ ∈ L ν obtained by exchanging the east step before V with the portion of µ between V and the next lattice point W on µ satisfying horiz ν (V ) = horiz ν (W ). In this situation, we write µ ν µ . See Figure 3 for an illustration. The reflexive and transitive closure of this operation yields a partial order on L ν . For any northeast path ν, the set of ν-paths ordered by this rotation order forms the ν-Tamari lattice T ν introduced in [12].
Remark 19. Note that the definition implies that T ν ∼ = T n when ν = (N E) n . The isomorphism is given by substituting north steps by up steps and east steps by down steps.

The α-Tamari lattices are certain ν-Tamari lattices
In [4], it was shown that the ν-Tamari lattice can be realized using the componentwise order on so-called ν-bracket vectors. If ν is a northeast path of length n, then the minimal ν-bracket vector is the vector b min consisting of n+1 entries, whose i-th entry is the height of the i-th lattice point on ν. If ν has k north steps, then the fixed positions are the entries The set of ν-bracket vectors is denoted by B ν . The following theorem was proven by means of an explicit bijection in [4,Section 4].
It was shown in [3, Theorem II], that the α-Tamari lattice is isomorphic to a certain ν-Tamari lattice, namely, when ν is the α-bounce path, defined by where α = (α 1 , α 2 , . . . , α r ). The proof given in [3] is rather indirect and exploits certain lattice-theoretic properties of the α-and the ν-Tamari lattices. In this section, we give a direct proof using the realization of T α as the componentwise order on α-codes established in Theorem 1.
the electronic journal of combinatorics 28(3) (2021), #P3.53 In particular, we construct a bijection from the α-codes to the ν α -bracket vectors. Let us adapt the definitions to the particular case of ν α . The minimal ν α -bracket vector , denoted by b min α , is defined by We write B α instead of B να for the set of ν α -bracket vectors. For b ∈ B α , by (B1), there are n + 1 positions with fixed value in a vector of length 2n + 1. For simplification, we define a reduced version of ν α -bracket vectors. For b ∈ B α , we define its ν α -reduced vector r by It is clear that r is obtained from b by removing components whose indices are fixed positions. To recover b from r, we only need to fill in the positions of the fixed positions according to (B1). Let Λ red denote the "reduction" map from b to r, and let Λ ext be its inverse.
Such ν α -reduced vectors thus inherit the following properties from ν α -bracket vectors.
Proposition 21. A vector r ∈ N n is a ν α -reduced vector if, and only if: (R1) for 1 i n, we have s (i) r(i) n; (R2) for all i, j with i < j s (r(i)+1)−1 , we have r(j) r(i).
Proof. Let b be the ν α -bracket vector corresponding to r. We only need to show that the conditions for r are equivalent to those for b. Condition (B1) for b is satisfied by construction. The equivalence between (B2) for b and (R1) for r is trivial given the definition of b min α . Now for the equivalence between (B3) for b and (R2) for r, we observe that for (B3) to hold for b, for each i with b(i) = k, we only need to check for all j with i < j 2s (k+1)−1 , since all indices from 2s (k+1)−1 + 1 to f k are fixed positions.
We can thus take Proposition 21 as the definition of ν α -reduced vectors without passing through ν α -bracket vectors, and we denote by R α the set of all ν α -reduced vectors. By Proposition 21, (R α , comp ) is isomorphic to the ν α -Tamari lattice. We also have the following property.
Proposition 22. Given a ν α -reduced vector r, for any indices i < j with (i) = (j), we have r(i) r(j).
Proposition 23. Given a composition α of n, the transformation ∆ R is a bijection from R α to C α .
Proof. First, for r ∈ R α , let c = ∆ R (r) and let us check that c satisfies the conditions in Definition 6 using those in Proposition 21 for r. By (R1) for r and the definition of ∆ R , clearly c satisfies (C1). Proposition 22 and the definition of ∆ R imply that c satisfies (C2). To check (C3) for c given that it satisfies (C2), we only need to show that, for any i and j such that (i) < (j), if c i s (j) − s (i) , then we have c j + s (j) c i + s (i) . Translating to r, we need to check that, for any i and j with (i ) < (j ), if r(i ) s (j ) , then we have r(j ) r(i ). Now, suppose that r(i ) s (j ) . We have (r(i ) + 1) > (j ) by the definition of . As the values are integers, we have (j ) (r(i ) + 1) − 1, which means j s (j ) s (r(i )+1)−1 , and by (R2), we have r(j ) r(i ). Therefore, c also satisfies (C3). Now for the reverse direction, given c ∈ C α , let r = Γ R (c). It is clear that (C1) translates directly to (R1). We only need to show that (R2) holds for r. Suppose that 1 i < j s (r(i)+1)−1 . If (i) = (j), by the definition of Γ R and (C2) on c, we have r(j) r(i). Now we check the case (i) < (j). When translated to c, (R2) in this case means that we need to check for any i < j such that (i ) < (j ) (c i + s (i ) + 1) − 1, we have c j + s (j ) c i + s (i ) . By (C2), we may assume that j = s a for some a. By the definition of , we see that (s a ) (c i + s (i ) + 1) − 1 implies s a < c i + s (i ) + 1, thus s a c i + s (i ) since they are integers. By (C3), we have c sa c i − s a + s (i ) . Therefore, (R2) holds for r, meaning that r ∈ R α . This allows us to conclude to the announced simple proof of Theorem 2.
Proof of Theorem 2. Let T να denote the ν α -Tamari lattice. We have the following isomorphisms of lattices: Thm. 20 Note that the proof of Theorem 2 in [3] relies on lattice-theoretic properties of T α and T να , and is only partially bijective. Our proof here is fully bijective, which gives a clearer vision of the isomorphism.

A combinatorial anti-isomorphism on the ν α -Tamari lattice
As mentioned at the beginning of Section 4, the original proof of Theorem 2 used the bijection Θ first defined in [10], but only to show that it extends to an isomorphism between the Galois graphs of T α and T να . It is then natural to ask whether Θ extends to all elements of T α and T να , and this question was stated in [3] as Open Problem 2.23. Comparing with the bijection in our proof of Theorem 2 from T α to T να , we may wonder if it is equivalent in some sense to Θ.
We now provide a direct combinatorial interpretation of this equivalence, using our parabolic BW-codes and constructions from [3]. This settles [3, Open Problem 2.23]. More precisely, using a stack-processing procedure and the α-code for T α , we will show that Θ is in fact an anti-isomorphism from T α to T Flip(να) , where Flip(ν α ) is essentially the northeast path ν α read backwards. To this end, we will need to consider Dyck paths with certain sequence statistics, which are then used to prove that our α-codes are closely related to the bijection Θ.

ν-Tamari lattices are intervals of ordinary Tamari lattices
It was shown in [12,Theorem 3] in terms of binary trees that every ν-Tamari lattice is isomorphic to an interval in some ordinary Tamari lattice. This result was obtained through a bijection in [12, Section 2 and 3] between binary trees and pairs of non-crossing lattice paths, which is equivalent to the bijection β in [5] between Dyck paths and parallelogram polyominoes (see [5,Section 4]). We now restate the bijection β for our need, based on the definition of its inverse defined in [5,Section 4]. A northeast path is uniquely determined by the lengths of the runs of east steps at each height. In other words, if ν is a northeast path, then we can write it uniquely as By abuse of notation we will also write ν = [a 0 , a 1 , . . . , Construction 24. Given a northeast path ν composed of k north steps and n − k east steps, and for any µ ∈ L ν , we write ν and µ under the form ν = [a 0 , a 1 , . . . , a k ] and µ = [b 0 , b 1 , . . . , b k ]. We define the Dyck path Dyck(ν, µ) of semilength n + 1 by Conversely, if P ∈ D n+1 we can recover the pair (ν, µ) satisfying P = Dyck(ν, µ) by looking at the lengths of the runs of up and down steps in P , which determine the a i 's and b i 's, respectively.
The map Dyck is a bijection from the set (ν, µ) | ν has length n and µ ∈ L ν to D n+1 , and is illustrated in Figure 5. It was proved in [12], in terms of binary trees, that Dyck is an order isomorphism.
Proposition 25 ([12, Theorem 3]). Given a northeast path ν of length n, the map Dyck is an isomorphism from T ν to an interval I ν of T n+1 .

Two sequence statistics of Dyck paths
In preparation of things to come, we now consider an anti-isomorphism Conj of T n in terms of Dyck paths, first defined by Deutsch in [6], that exchanges two particular sequence statistics on Dyck paths. The exchange property can be deduced from the recent work the electronic journal of combinatorics 28(3) (2021), #P3.53 of Pons on Tamari interval posets [11]; see the paragraph after Theorem 23 therein. We translate the appropriate specialization of her result to the framework of Dyck paths. We then relate Conj and these statistics to ν-Tamari lattices via the map Dyck.
A rising contact of a Dyck path P is an up step in P that starts on the x-axis. Every Dyck path P of length n > 0 can be uniquely decomposed into P = P U P r D with P , P r both Dyck paths, by taking P to be the sub-path before the last rising contact of P . We denote by the empty Dyck path, and we define an involution Conj recursively by The following is well-known and can be proven by induction using the decomposition P = P U P r D.
Proposition 26. The involution Conj is an anti-isomorphism of T n .
We define Conj def = Dyck −1 • Conj • Dyck, which is simply Conj conjugated to the domain of ν-paths using Dyck. See Figure 6 for an example of Conj and Conj .

Corollary 27. The bijection Conj is an anti-isomorphism between T v and T Flip(v) .
We now consider two statistics on Dyck paths that are interchanged by Conj. Given a Dyck path P , we define its descent run sequence, denoted by Drun(P ) and indexed from 0 to n, as follows. We write P = D c 0 U D c 1 U · · · U D cn with some c i 0 (again, noting c 0 = 0), then we take Drun(P ) i = c n−i for all 0 i n. The map Drun is injective because P can be reconstructed from the c i 's.
We now define another sequence statistic. The contact sequence of P , denoted by Cont(P ) and indexed from 0 to n, is obtained by taking Cont(P ) 0 the number of rising contacts of P , and Cont(P ) i the number of rising contacts of the sub-Dyck path strictly between the i-th up step and its matching down step.
Examples for Cont and Drun are given in Figure 6. The following result, also illustrated in Figure 6, is well-known and can be proven inductively. In terms of binary trees, Cont (resp. Drun) describes maximal left (resp. right) descending paths, and the counterpart of Conj on binary trees is taking the vertical mirror image.
Here "0 a " means the entry 0 repeated a times. For an expression of Cont, we need some more definitions. We define the reverse horizontal distance to µ of a lattice point Q on ν, denoted by horiz µ (Q), to be the number of west steps (−1, 0) we can take from Q before crossing to the other side of µ. See Figure 6 for an example. This figure also illustrates the following result.
Proposition 29. Let P = Dyck(ν, µ) with ν, µ northeast paths of length n. Take the sequence (d i ) 0 i n with d i = horiz µ (Q i ), where Q i is the (i + 1)-st lattice point of µ. Then we have We now prove that d i is the ordinate of the starting point of the (i + 1)-st up step in P . We proceed by induction. For i = 0, we have d 0 = 0 = horiz µ (Q 0 ), as ν and µ start at the origin. Now suppose that d i−1 is the ordinate of the starting point of the i-th up step in P . We have two cases.
(i) If Q i is not the leftmost lattice point with its height, then its corresponding up step in P directly comes after the one associated with Q i−1 . Thus, the ordinate of the starting point of this up step is d i−1 + 1 = d i .
(ii) If Q i is the leftmost lattice point with height , then its corresponding up step is the first up step of the next run after the up step associated with Q i−1 . The ordinate of the up step associated with Q i is thus d i−1 + 1 − (b + 1), taking into account the length of the -th run of down steps in P . This is also equal to d i , as we reach Q i from Q i−1 by a north step, and it takes b less west steps to cross µ from Q i than from Q i−1 .
We thus conclude the induction. Now (4) is a translation of the definition of Cont in terms of the d i 's.
Proposition 30. The map ϕ is an isomorphism from T α to T να .
Proof. We write ϕ(w) = [f 0 , f 1 , . . . , f n ]. By the definition of ∆ R , we have We may rephrase this using ν α -reduced vectors. Let r = Γ R code α (w) denote the ν αreduced bracket vector associated with w. Then, the electronic journal of combinatorics 28(3) (2021), #P3.53 Now, if b = Λ ext (r) is the associated ν α -bracket vector, then the number of entries equal to i in b is f i + 1. According to [4,Definition 26], there exists a unique ν α -path with as many lattice points of height i as there are entries equal to i in b. (See also item (ii) in the proof of [4,Proposition 27].) We conclude that the ν α -path associated with b is precisely ϕ(w). Therefore, ϕ is precisely the isomorphism used in the proof of Theorem 2.
The second bijection, denoted by Θ, from (α, 231)-avoiding permutations to α-paths was first defined in [10]. We will use an equivalent definition derived from [3], using a family of trees called α-trees, which we will not explicitly define.
Construction 31. Given w ∈ S α (231), we construct a labeled plane tree T (w) by an insertion procedure. We start with a node labeled n + 1 as the root, and we read the elements of w from left to right. Upon reading of an element w(i), we start a walk from the root. When we reach a node v with label , if w(i) < , then we move to the left-most child of v; otherwise, we move to the first sibling of v on its right. When the destination node does not exist, we add it with label w(i) and terminate the walk. The labeled plane tree thus obtained is denoted by T (w). Now we construct a northeast path P from T (w). If the root of T (w) has k children, then we start P with k north steps. Then, for each a ∈ [r], we inspect the elements w(i) in the a-th α-region from right to left, i.e., i runs from s a down to s a−1 + 1. For each such w(i), let v i be the node with label w(i) in T (w), and we append EN k i to P , where k i is the number of children of v i . We define Θ(w) to be the path P thus obtained. See Figure 7 for an example. For w ∈ S α (231), the tree T (w) from Construction 31 has the following immediate property.
the electronic journal of combinatorics 28(3) (2021), #P3.53 Proposition 32 ( [3]). For w ∈ S α (231), let T (w) be the labeled plane tree constructed in Construction 31. Reading the labels of T (w) in postorder (i.e., for each node u, the children of u are increasing in order from left to right, all greater than u) gives 1, 2, . . . , n.
Remark 33. The map Θ in Construction 31 is in fact Θ −1 •Flip in [3]. We have altered the definition here for simplicity. In Construction 31, the tree T (w) is a labeled version of an αtree, and the map from w to T (w) is the map Λ perm in [3]. Moreover, the map from T (w) to Θ(w) is Ξ nn in that article, but our definition here is adapted from Lemma 1.31 of the same article. The validity of our definition of Θ is ensured by [3, Propositions 1.33 and 1.34]. The property in Proposition 32 follows from [3, Construction 1.14].

A stack-processing procedure
We now give another combinatorial definition of ϕ. For w ∈ S α (231), we define the companion of an element w(i) in w to be the last element it sees, or w(s (i) ) when w(i) sees no element. Then we can define ϕ(w) = [f 0 , f 1 , . . . , f n ], where f i is the number of elements in w with w(i) as its companion. We check that this definition of f i is the same as (5). We define the following stack processing that can be used to compute the companions of elements of w.
Construction 34. Given w ∈ S α (231), we start with an empty stack S and then perform the following steps on the α-regions in reverse order, i.e., k runs from r down to 1.
• (Popping) For i from 1 to α k , consider the i-th element w(s k−1 + i) in region k.
Pop elements from the stack until the top one is larger than w(s k−1 + i).
• (Pushing) For i from 1 to α k , push the element w(s k − i + 1) into the stack.
There are n elements in w, and each element passes through two steps, totaling to 2n steps. See Figure 8 for an example.
Remark 35. Note that in terms of popping elements we only need the popping step for the last element in each region, as it is also the largest. However, taking the popping step for each element into account is important to understand the link between ϕ and Θ. Namely, given w ∈ S α (231), the number of elements popped out in the popping step of w(i) is the number of children of the node with label w(i) in T (w) (Proposition 38), which is in turn the length of the corresponding run of north steps in Θ(w).
Lemma 36. For w ∈ S α (231), at each step of the stack processing of w with the stack S, we have: (i) the elements of S are increasing from top to bottom; (ii) for elements in S, their indices in w are increasing from top to bottom.
Proof. For the first point, we proceed by induction on the number of steps. The claim is clearly satisfied at the beginning, when S is empty. The popping step maintains the claim. Suppose that we are now pushing an element w(i) into S. If w(i) is the last element in its region, then by induction hypothesis, all elements smaller than w(i) should have been popped out; otherwise, the top of the stack is w(i + 1) > w(i). In both cases, pushing w(i) maintains our claim. We thus conclude the induction. For the second point, we observe that the claim is valid for the empty stack, and the pushing steps maintain the claim, since all the elements in the same region are pushed consecutively starting with the last element in the region. The popping steps clearly also maintains the claim.
Proposition 37. For w ∈ S α (231), we consider the popping step of an element w(i) in the stack processing of w with stack S. If after that popping step S is not empty with top element w(j), then the companion of w(i) is w(j − 1); if S is empty, then the companion of w(i) is w(n).
Proof. Assume that there is an index such that s (i) < < j and w( ) > w(i). We take the smallest such index . Then w( ) cannot be popped out of S before the treatment of the region (i), since an element w( ) that pops w( ) out must have s (i) < < and w( ) > w( ) > w(i), violating the minimality of . At this moment, w(j) is also in S. By Lemma 36(ii), w(j) is below w( ). Since w(j) is on top of S after the popping step of w(i), there is some w(i ) in the same region of i with i < i that popped w( ) out, meaning that w( ) < w(i ) < w(i), contradicting our hypothesis. Therefore, such w( ) does not exist. From the definition of the popping step, we have w(j) > w(i). Thus, the companion of w(i) is w(j − 1). In the case of empty stack, it means that no element in previously inserted regions is larger than w(i), thus the companion of w(i) is w(n).

Stack processing and the bijection Θ
We now describe a link between stack processing of w ∈ S α (231) and the tree T (w) in Construction 31. Given 1 k r, the nodes of region k of T (w) are those with labels corresponding to the values of w in the k-th α-region. We say that the root is of region 0, and that the region r + 1 is empty. From the insertion procedure, for a node of region k with its parent of region k , we have k > k . The active nodes for region k are nodes of region k k whose parent is of region k < k.
Proposition 38. For w ∈ S α (231), consider the stack processing of w with stack S. For 1 k r + 1, the elements in S after processing the k-th α-region are exactly the labels of the active nodes for region k in T (w). Furthermore, for a node u in T (w), the labels of its children are exactly the elements popped out by the label of u in the stack processing of w.
Proof. Let E k be the set of elements in S after processing the k-th α-region, and let L k be the set of labels of the active nodes of region k in T (w). We show that E k = L k . We proceed by induction on k from r + 1 to 1. For k = r + 1, the set E r+1 is empty, and there are no active nodes for region r + 1, so we have E r+1 = L r+1 . Suppose that E k+1 = L k+1 . We observe that, by Construction 34 and Lemma 36(i), we have where R k = {w(i) | (i) > k, w(i) < w(s k )}. Now, by the definition of active nodes, we split L k into two parts, L k for nodes of region k, and L (2) k for other nodes. It is clear that L k must be in some region k > k, and its parent in some other region k < k < k + 1. Therefore, L (2) k ⊆ L k+1 . Conversely, let u be a node with labels in L k+1 , and let v be the parent of u in region k v . If k v < k, then u is also in L (2) k ; otherwise, if k v = k, then u is not in L (2) k . We thus have Here, R k is the set of labels of nodes whose parents are of region k. Now, by the construction of T (w) in Construction 31, labels in R k must be in some region k > k, and they are smaller than some element in region k of w, therefore smaller than w(s k ). We thus have R k ⊆ R k . Conversely, suppose that R k \ R k is not empty, and let w(i) ∈ R k \ R k and u the node in T (w) with w(i) as label. We have (i) > k and w(i) < w(s k ). Let v be the parent of u in T (w), and w(j) the label of v. As w(i) ∈ R k , we know that v is in some region k v < k. Suppose that v is the node with label w(s k ). As w(i) < w(s k ), by Proposition 32, u precedes v in postorder. By the construction of T (w), we know that the region of a node is always strictly smaller than that of its children, and weakly smaller than that of its siblings to the right. Therefore, the node v of region k v < k must not be a descendant of v of region k. If v is a descendant of v, as u precedes v in postorder, meaning that v must be a sibling of u to the right, or a descendant of such a sibling, which is impossible because u is in region (i) > k. Therefore, v and v are not comparable in T (w), and along with the fact that u precedes v in postorder, v also precedes v in postorder. Now take the rightmost child of v, say u with label w(i ), which also precedes v in postorder. We have w(j) = w(i ) + 1 and w(s k ) > w(j) by Proposition 32. Furthermore, v is in region k v < k, while v is in region k and u is in a region k u (i) > k. We thus have an (α, 231)-pattern w(j), w(s k ), w(i ) in w, which is not possible. Therefore, w(i) cannot exist, and we have R k = R k .
Comparing (6) and (7), along with R k = R k and the induction hypothesis E k+1 = L k+1 , we have E k = L k , concluding the induction. Therefore, the first part of our claim holds for all 1 k r + 1.
For the second part, let w(i) be the label of u and w(j) an element popped out by w(i) in the stack processing, and v the node with w(j) as label. Suppose that u is of region k u . By the first part of our claim, v is an active node for region k u − 1 but not for region k u . Therefore, the parent of v is of region k u . By Proposition 32, the label of the parent of v must be the first element in region k u larger than w(j), which is w(i) according to the popping step of region k u . Thus, u is the parent of v, and we have the second part of our claim.
Now for the pair ν α , Θ(w) , for 0 i 2n, let Q i the (i + 1)-st lattice point Q i on ν α in reverse order. We define d i to be the number of north steps (0, 1) we can take from Q i without crossing to the other side of Θ(w). It is clear that d i is also the reverse horizontal distance of the (i + 1)-st lattice point of Flip(ν α ) with respect to Flip Θ(w) . By Proposition 29, Consider the stack processing of w with stack S. We now show that the number of elements in the stack after i steps of stack processing is d i . We proceed by induction on the number of steps we have taken in the stack processing. In the initial stage, d 0 = 0 agrees with the empty stack. When dealing with region k, we first perform the popping step. By the construction of Θ(w), for the i-th element in region k, the number of children of its correspondent node, which is also the number elements popped out by w(s k−1 + i) by Proposition 38, is the number of north steps of Θ(w) on abscissa s k − i + 1, which is exactly d 2n−2s k +i−1 − d 2n−2s k +i . Then for the pushing step, the stack size increases by 1 at each step, just as when we pass from d 2n−s k +i−1 to d 2n−s k +i . We thus conclude the induction.
Here, (g i ) 0 i n is a sequence of positive integers. The last 0 is from the last point, because it does not have any lattice point after it. In comparison to Drun ν α , ϕ(w) , it is clear that we only need to prove g = f + 1 for all . For = n, according to Proposition 37, an element w(j) has w(n) as its companion if and only if the stack is empty after its popping step, which is equivalent to d j = 0. Therefore, g n = f n + 1. For = 0, it is clear that g 0 = 1 = f 0 + 1, since ν α starts with a north step.