Baxter posets

We define a family of combinatorial objects, which we call Baxter posets. We prove that Baxter posets are counted by the Baxter numbers by showing that they are the adjacency posets of diagonal rectangulations. Given a diagonal rectangulation, we describe the cover relations in the associated Baxter poset. Given a Baxter poset, we describe a method for obtaining the associated Baxter permutation and the associated twisted Baxter permutation.


Introduction
The Baxter numbers B(n) = n + 1 1 −1 n + 1 2 −1 n k=1 n + 1 k − 1 n + 1 k n + 1 k + 1 count Baxter permutations [5], twisted Baxter permutations [10], certain triples of non-intersecting lattice paths [6], noncrossing arc diagrams consisting of only left and right arcs [13], certain Young tableaux [7], twin binary trees [7], diagonal rectangulations [1,8,10], and other families of combinatorial objects. In this paper, we define Baxter posets and prove that they are also counted by the Baxter numbers. Baxter posets are closely related to Catalan combinatorics. Specifically, Baxter posets (and the closely related diagonal rectangulations) can be realized through "twin" Catalan objects. Additionally, the relationship between Baxter posets and diagonal rectangulations is analogous to the relationship between two Catalan objects, specifically sub-binary trees and triangulations of convex polygons. As a prelude to our discussion of Baxter posets, we describe a few Catalan objects and bijections between them.
Let S n denote the set of permutations of [n] = {1, . . . , n}. We say that σ = σ 1 · · · σ n ∈ S n avoids the pattern 2-31 if there does not exist i < j such that σ j+1 < σ i < σ j . The Catalan number C(n) = 1 n 2n n counts the elements of S n that The author was partially supported by NSF grant DMS-1500949. avoid the pattern 2-31. The map τ b , described below and illustrated in Figure 1, assigns a triangulation of a convex (n + 2)-gon to each element of S n , and restricts to a bijection between permutations that avoid 2-31 and triangulations of polygons. Let σ = σ 1 · · · σ n ∈ S n and let P be a convex (n+2)-gon. For convenience, deform P so that P is inscribed in the upper half of a circle, and label each vertex of P , in numerical order from left to right, with an element of the sequence 0, 1, . . . , n + 1.
For each i ∈ {0, . . . , n}, construct a path P i from the vertex labeled 0 to the vertex labeled n+1 that visits the vertices labeled by elements of {σ 1 , . . . , σ i } in numerical order. The union of these paths defines τ b (σ), a triangulation of P . Given a triangulation ∆ of a convex (n + 2)-gon P , deform P (and ∆) as above. Construct a graph with an edge crossing each edge of ∆ except the horizontal diameter, as shown in red in the left diagram of Figure 1. (This is essentially the dual graph of ∆.) In what follows, we will call this the dual graph construction. Terminology for the resulting family of trees is mixed in the literature, with adjectives such as complete, planar, rooted, and binary appearing inconsistently. We will call the resulting tree a binary tree and provide a careful definition. For us, a binary tree is a rooted tree such that every non-leaf has exactly two children, with one child identified as the left child and the other as the right child. The dual graph construction gives a bijection between triangulations of a convex (n + 2)-gon and binary trees with 2n + 1 vertices. The root of the binary tree corresponds to the bottom triangle of ∆ and children are identified as left or right according to the embedding of ∆ in the plane. For a reason that will become apparent later, we deform each binary tree resulting from this bijection as shown in the right diagram of Figure 1 so that the root is the lowermost vertex. Removing the leaves of a binary tree and retaining the left-right labeling of each child, we obtain a sub-binary tree, a rooted tree in which every vertex has 0, 1, or 2 children, and each child is labeled left or right, with at most one child of each vertex receiving each label. The leafremoval map is a bijection between binary trees with 2n + 1 vertices and sub-binary trees with n vertices. In the example shown in Figure 1, the edges removed by this map are shown as dashed segments.
We will make use of a second similar map from permutations to triangulations. We say that a permutation avoids the pattern 31-2 if there does not exist i < i + 1 < j such that σ i+1 < σ j < σ i . The map τ t described below restricts to a bijection between elements of S n that avoid 31-2 and triangulations of a convex (n + 2)-gon. Let σ ∈ S n and P a convex (n + 2)-gon. Deform P and label its vertices as shown in the example in Figure 2. For each i ∈ {0, 1, . . . , n}, construct the path P i that begins at the vertex labeled 0, visits in numerical order each vertex  The union of these paths is τ t (σ). Performing the dual graph construction and then the leaf-removal map, we obtain corresponding binary and sub-binary trees. This time, we choose to deform the binary and sub-binary trees so that the root is the uppermost vertex, as illustrated in the right diagram of Figure 2. Although a sub-binary tree is an unlabeled graph, for each sub-binary tree with n vertices, there exists a unique labeling of its vertices by the elements of [n] such that every parent vertex has a label numerically larger than the labels of its left descendants and numerically smaller than its right descendants. An example of a sub-binary tree with such a labeling is show in Figure 3. Let T be a labeled sub-binary tree embedded in the plane as shown in Figure 3 and ∆ T the associated triangulation. View T as the Hasse diagram of a poset. We say that a total order L of the elements of T is a linear extension of T if x < T y implies that x < L y. The linear extensions of T , viewed as permutations in one-line notation, are exactly the permutations that map to ∆ T under τ b . To see why, label each triangle of ∆ T according to the label of its middle (from left to right) vertex, as illustrated in Figure 3. The linear extensions of T are exactly the permutations that map to ∆ T because x < T y if and only if the triangle labeled y is "above" the triangle labeled x. Similarly, given a sub-binary tree T ′ , embedded in the plane as illustrated in Figure 2, and associated triangulation ∆ T ′ , we obtain a labeling of T ′ such that the linear extensions of T ′ are exactly the permutations that map to ∆ T ′ under τ t .
We now relate the Catalan objects described above to Baxter objects. Specifically, we will see that diagonal rectangulations are made by gluing together binary trees, and we will construct Baxter posets so that they play the same role for diagonal rectangulations that sub-binary trees play for triangulations.
Twisted Baxter permutations are related to certain decompositions of a square into rectangles. Given σ ∈ S n , glue the binary trees corresponding to τ b (σ) and τ t (σ), called twin binary trees, along their leaves to obtain a decomposition of a square into n rectangles, and then rotate the resulting figure π/4 radians clockwise. The result of applying this binary tree gluing map to the permutation 52147862 is shown in the left diagram of Figure 4. The binary trees which are glued together in this example are shown in Figures 1 and 2. We call each decomposition resulting from this binary tree gluing map a diagonal rectangulation (defined precisely in Section 2) because the top-left to bottom-right diagonal of the square contains an interior point of each rectangle of the decomposition. The map restricts to a bijection between twisted Baxter permutations and diagonal rectangulations.
Given a diagonal rectangulation, label the rectangles of the decomposition according to the order in which they appear along the diagonal, labeling the upperleftmost rectangle with 1 and the lower-rightmost rectangle with n. We refer to the rectangle with label i as "rectangle i." Construct a poset P on [n] by declaring x < P y if the interior of the bottom or left side of rectangle y intersects the interior of the top or right side of rectangle x, and then taking the reflexive and transitive closure of these relations. Remark 6.7 in [10] explains that, before taking the reflexive and transitive closure, these relations are acyclic. Thus P is a partial order on [n]. This poset, which we call the adjacency poset of the diagonal rectangulation, is defined in [8,10]. (A more general set of posets, corresponding to elements of the Baxter monoid, are defined in [9].) Each adjacency poset captures the "right of" and "above" relations of the diagonal rectangulation just as each sub-binary tree captures the "above" relations of the corresponding triangulation. Additionally, given an adjacency poset P and the corresponding diagonal rectangulation D, the set of linear extensions of P is the set of permutations that map to D under the binary tree gluing map [10,Remark 6.7]. We note that two permutations σ and ψ map to the same diagonal rectangulation if and only if τ b (σ) = τ b (ψ) and τ t (σ) = τ t (ψ). Thus, the set of linear extensions of the adjacency poset of a diagonal rectangulation is the intersection of the sets of linear extensions of the labeled sub-binary trees obtained from τ b and τ t .
As a diagonal rectangulation can be constructed from twin binary trees, the adjacency poset of a diagonal rectangulation can be constructed using the corresponding labeled sub-binary trees. Let D be a diagonal rectangulation, P the associated adjacency poset, and T b and T t respectively denote the corresponding labeled sub-binary trees obtained from τ b and τ t . By declaring x < P y if x < T b y or x < Tt y and then taking the transitive closure, we obtain all of the relations of P . Although it is simple to use the relations of T b and T t to list the relations of P , it is not so straightforward to obtain a description of the Hasse diagram of P or to characterize the set of adjacency posets of diagonal rectangulations. In any poset P , we say that x covers y, denoted x ⋖ P y, if x < P y and there exists no z  such that x < P z < P y. In Theorem 3.2, the first main result of this paper, we show that x covers y in the adjacency poset P if and only if, in the associated diagonal rectangulation, rectangles x and y form one of the configurations shown in Figure 7. This theorem allows us to obtain a Hasse diagram for the adjacency poset from a diagonal rectangulation just as we easily obtain a sub-binary tree from a triangulation.
For our second result, which characterizes adjacency posets, we require the following definitions. A poset P is bounded if it has an element that is greater than all other elements and an element that is less than all other elements. Given a poset P on [n], a 2-14-3 chain is a chain b < P a ⋖ P d < P c of P such that a < b < c < d in numerical order. We similarly define a 3-14-2 chain, a 2-41-3 chain, and a 3-41-2 chain.
Given a partially ordered set P , construct a graph G such that the vertices of G are labeled by the elements of P and there is an edge joining vertex x to vertex y if and only if x ⋖ P y or y ⋖ P x. An embedding of G in R 2 is a Hasse diagram for P if and only if for all x ⋖ P y, vertex y is above vertex x in the plane and each edge of the embedding is a line segment. A planar embedding of a poset P is a Hasse diagram for P in which no two edges intersect. (1) P is bounded.
(2) If x ∈ P , then x is covered by at most two elements and covers at most two elements. (3) P contains no 2-14-3, no 3-14-2, no 2-41-3, and no 3-41-2 chains. (4) If [x, y] is an interval of P such that the open interval (x, y) is disconnected, then |x − y| = 1. (5) There exists a planar embedding of P such that for every interval [x, y] of P with (x, y) disconnected, if w, z ∈ (x, y) and w is left of z, then w < x < z in numerical order. We can now state our main result. Remark 1.3. One might hope for an unlabeled version of the Baxter poset from which the labeled poset can be obtained, just as sub-binary trees have a canonical labeling. However, without "decorating" the poset with additional combinatorial information, this is not possible. This is quickly apparent since, when n = 4, of the 22 Baxter posets, 20 of these are chains. Decorating each poset to indicate the numerical order of each pair x < P y with (x, y) disconnected is insufficient. Additionally, decorating every edge of the Hasse diagram to indicate the numerical order of the elements of the cover relation does not allow us to determine a unique Baxter poset.
The original Baxter object, Baxter permutations, have a pattern avoidance definition similar to the definition of the twisted Baxter permutations. A Baxter permutation σ = σ 1 · · · σ n is a permutation that avoids the patterns 2-41-3 and 3-14-2, i.e. there does not exist i < j < j + 1 < k such that σ j+1 < σ i < σ k < σ j or σ j < σ k < σ i < σ j+1 . Given a diagonal rectangulation D, the set of permutations that map to D under the binary tree gluing map contains a unique twisted Baxter permutation and a unique Baxter permutation (see Theorem 2.1). Other authors (see [10, Proof of Lemma 8.4], [8, Proof of Lemma 6.6]) have described algorithms for obtaining these permutations from a diagonal rectangulation. Our final results describe how to obtain these pattern avoiding permutations directly from a Baxter poset. Here, we describe a method of obtaining the Baxter permutation.
Let P be the natural embedding of a Baxter poset. The edges of the embedding separate the plane into maximal connected components. We call the closure of a bounded connected component a region of the embedding. Assign an arrow to each region of the embedding as follows: If the maximal element of a region is greater (in numerical order) than the minimal element of that region, then that region is assigned a right-pointing arrow, and otherwise the region is assigned a left-pointing arrow. An example is shown in Figure 5. If a region R i contains a right-pointing arrow and σ is a linear extension of P in which all labels of elements contained in the left side of R i precede all labels of elements contained in the right side of R i , then we say that σ respects the arrow of R i . Similarly, we say that σ respects the arrow of a region R i containing a left-pointing arrow if all labels contained in the right side of R i precede all labels of elements contained in the left side of R i . If σ respects the arrows of every region of P , then we say that σ respects the arrows of P . The existence of a linear extension of P that respects the arrows of P should not be immediately obvious to the reader. Theorem 1.4. Given a Baxter poset P with its natural embedding, the unique Baxter permutation that is a linear extension of P is the unique linear extension that respects the arrows of the embedding.
By adding a single relation for each region of the natural embedding of P , we obtain an alternate description of the map from an adjacency poset to its Baxter permutation. Specifically, for each region R with minimal element x and maximal element x + 1 we declare that the maximal element (with respect to the partial order P ) of the left component of (x, y) is less than the minimal element of the right component. Similarly, for each region R with maximal element x and minimal element x + 1, we declare that the maximal element of the right component of  In Section 2, we describe the map ρ from permutations to diagonal rectangulations that coincides with the binary tree gluing map already described and provide some background related to diagonal rectangulations. We prove Theorem 3.2 (the characterization of the cover relations of the adjacency poset) in Section 3. Our main result, Theorem 1.2, is proved in Section 4. Finally, in Section 5, we describe how to obtain a twisted Baxter permutation from a Baxter poset and then prove Theorem 1.4.

Diagonal Rectangulations
A rectangulation of size n is an equivalence class of decompositions of a square S into n rectangles. Two decompositions R 1 and R 2 are members of the same equivalence class if and only if there exists a homeomorphism of the square, fixing its vertices, that takes R 1 to R 2 . We say that a rectangulation is a diagonal rectangulation if, for some representative of the equivalence class, the top-left to bottom-right diagonal of S contains an interior point of each rectangle of the decomposition. In our discussion of diagonal rectangulations, we often blur the distinction between an equivalence class and a representative of the equivalence class. We most often refer to a diagonal rectangulation using the distinguished representative with edges intersecting the diagonal in equally spaced points.
We now define a map ρ from S n to the set of diagonal rectangulation of size n. Figure 6 shows the construction of ρ(23154). The map ρ agrees with the map (described in Section 1) in which a diagonal rectangulation is constructed from a permutation by gluing together twin binary trees and then rotating the result. Our description of ρ matches the description in [10, Section 6] and is essentially equivalent to maps described in [1, Section 3], [2, Section 4], and [8, Section 5].
Let σ = σ 1 · · · σ n ∈ S n and S a square in R 2 with bottom-left vertex at (0, 0) and top-right vertex at (n, n). Place n + 1 points at (i, n − i) for i ∈ {0, . . . , n}. Label each of the n spaces between these points in order with an element of [n], starting with 1 in the upper-leftmost space and finishing with n in the lower-rightmost space. We construct ρ(σ) by considering the entries of σ sequentially from left to right. Let T i−1 denote the union of the left and lower boundaries of S and the rectangles of ρ(σ) constructed using the first i − 1 entries of σ. In step i of the construction, we form a new rectangle that contains the diagonal label σ i . We refer to this rectangle as rectangle σ i . We construct rectangle σ i as follows. If the point Otherwise, the lower-right corner of rectangle σ i is the first point of T i−1 hit by the downward pointing vertical ray with base point at l. In the arguments that follow, we will use the observation that, by construction, the left side and bottom of rectangle σ i are contained in T i−1 for all i ∈ [n]. We will also use the observation that, since the interior of each rectangle of a diagonal rectangulation D intersects the upper-left to bottom-right diagonal of S, no set of four rectangles of D share a vertex.
Theorem 2.1 ([10, Theorem 6.1, Corollary 8.7]). The map ρ restricts to a bijection between twisted Baxter permutations and diagonal rectangulations. The map ρ also restricts to a bijection between Baxter permutations and diagonal rectangulations.
Given a rectangulation R, a line segment that is not contained in the boundary of S and is a maximal (with respect to inclusion) union of edges of rectangles is called a wall of R.
Recall that a permutation σ is a twisted Baxter permutation if and only if it avoids the patterns 2-41-3 and 3-41-2. This pattern avoidance is equivalent to the requirement that if σ i > σ i+1 then either all values numerically between σ i+1 and σ i are left of σ i in σ, or all of these values are right of σ i+1 in σ.
We say that two permutations σ and ψ are related by a (3-14-2 ↔ 3-41-2) move if σ contains a subsequence σ i1 σ i2 σ i3 σ i4 that is an occurrence of one of these patterns and switching the positions of the adjacent entries σ i2 and σ i3 in σ results in the permutation ψ. We say that σ and ψ are related by a (2-14-3 ↔ 2-41-3) move if σ and ψ satisfy the same conditions with these patterns. Given ψ ∈ S n , define inv(ψ) = {(ψ i , ψ j ) | i < j and ψ i > ψ j }. If σ, ψ ∈ S n then we say that σ ≤ ψ in the right weak order if and only if inv(σ) ⊆ inv(ψ). This definition implies that σ ⋖ ψ in the right weak order if and only if ψ can be obtained from σ by transposing adjacent entries σ i and σ i+1 of σ which satisfy σ i < σ i+1 in numerical order.  1 Figure 6. The map ρ is applied to the permutation 23154.

The adjacency poset of a diagonal rectangulation
In Section 1, we provided a definition of the adjacency poset of a diagonal rectangulation D. At times, we will make use of an equivalent definition.
Given a diagonal rectangulation D of size n in R 2 with bottom-left corner at (0, 0) and top-right corner at (n, n), define the partial order Q on [n] as follows: if there exist a point p in the interior of rectangle x and a point q in the interior of rectangle y such that q − p has positive coordinates declare x ≤ Q y, and then take the transitive closure of these relations.
Proposition 3.1. Given a diagonal rectangulation D of size n, the adjacency poset P is the poset Q defined above.
Proof. If x ⋖ P y then, by the definition of the adjacency poset, the interior of the bottom (or left side) of rectangle y intersects the interior of the top (or right side) of rectangle x. Thus there exist points p ∈ int(rectangle x) and q ∈ int(rectangle y) such that q − p has positive coordinates. Therefore, by the definition of Q, we have that x ≤ Q y.
If x ⋖ Q y, then there exist points p ∈ int(rectangle x) and q ∈ int(rectangle y) such that q − p has positive coordinates. Consider the line segment joining p to q. If this segment passes through the vertex of some rectangle, since D contains only finitely many vertices, we may perturb p or q, obtaining points p ′ and q ′ , so that p ′ and q ′ are respectively in the interiors of rectangles x and y, the segment joining p ′ and q ′ contains no vertices of D, and q ′ − p ′ has positive coordinates. Thus, we may assume that the segment joining p and q contains no vertices of D. The segment passes through the interiors of the sequence of rectangles x = z 0 , z 1 , . . . , z m−1 , y = z m . For all i ∈ [m], the segment exits rectangle z i−1 and enters rectangle z i at a point in the interior of a side of both rectangles so z i < P z i+1 . Therefore x < P y.
We note that the transitive closure in the definition of Q is required (since we have chosen to refer to each diagonal rectangulation using the representative with edges intersecting the diagonal in equally spaced points). Consider the rectangulation ρ(312465) shown in Figure 10. Since the interior of the right side of rectangle 2 intersects the interior of the left side of rectangle 4, we have that 2 < P 4. Similarly, 4 < P 6, so by transitivity 2 < P 6. However, there do not exist p ∈ int(rectangle 2) and q ∈ int(rectangle 6) such that q − p has positive coordinates.
We give a description of the Hasse diagram of the adjacency poset of a diagonal rectangulation by describing its cover relations.
x y (vi) Figure 7. Configurations in a diagonal rectangulation that correspond to cover relations in the adjacency poset. Proof. Let D be a diagonal rectangulation and P the adjacency poset of D. Assume that in D, rectangles x and y form one of the configurations shown in Figure 7. In each configuration, by definition, x < P y. Assume that rectangles x and y form configuration (i) and there exists some z ∈ [n] such that x < P z < P y. Since z < P y and P is acyclic, y ≮ P z. Thus rectangle z contains no interior points in the lined region of Figure 8. Similarly, since z ≮ P x, rectangle z contains no interior points in the dotted region of Figure 8. Therefore, any rectangle z such that x < P z < P y is completely contained in an unshaded region of Figure 8. However, by the definition of P , no label of a rectangle contained in the lower-right unshaded region of Figure 8 is covered by y. Similarly, in P no label of a rectangle contained in the upper-left unshaded region of Figure 8 covers x. Additionally, no label of a rectangle contained in the lower-right unshaded region is covered by the label of a rectangle contained in the upper-left unshaded region. Thus there exists no z such that x < P z < P y. Hence x ⋖ P y. For the remaining configurations of Figure 7, similar considerations demonstrate that x ⋖ P y.
To prove the other direction of the theorem, assume that x ⋖ P y. Since the set of linear extensions of P is the fiber ρ −1 (D) and x ⋖ P y, there exists a linear extension σ = σ 1 · · · σ n of P such that x = σ i and y = σ i+1 . Let T j−1 denote the union of the left and bottom boundaries of the square S and the partial diagonal rectangulation formed in the construction of ρ(σ) after considering the first j − 1 entries of σ. The bottom and left edge of rectangle σ j is contained in T j−1 for all j ∈ [n]. Using the definition of the adjacency poset from Section 1, since x ⋖ P y, we have that rectangles x and y are adjacent with rectangle x left of or below rectangle y. Thus, combining these requirements, rectangles x and y form one of the configurations shown in Figure 9.
To complete the proof of the theorem, we observe that configurations (a) and (c) of Figure 9 cannot occur in any diagonal rectangulation. In a diagonal rectangulation, the upper-left to bottom-right diagonal of S passes through every rectangle of the rectangulation, but this is impossible in a rectangulation containing either x y (e) x y (a) x y

Characterization of Adjacency Posets
To prove Theorem 1.2, we require the following definitions and results. Given a planar embedding of a poset P , the embedding separates the plane into maximal connected components. Recall that we call the closure of each bounded connected component a region of the embedding.
x ŷ 0 1 Figure 11. The shaded region shows S(x). Since y is not contained in S(x) and the left-pointing horizontal ray with base point at y intersects S(x), we say that x is left of y.
Given a planar embedding of a lattice P , for each x ∈ P , define S(x) to be the union of the chains of P containing x and the horizontal line segments whose endpoints are contained in these chains. In Figure 11, the gray region is S(x). We say that x is left of y in the embedding if y is not contained in S(x) and a leftpointing horizontal ray with vertex at y passes through S(x). We similarly define right of and note that since P is a lattice, x is left of y if and only if y is right of x. Furthermore, if x and y are incomparable in P , then either x is left of y or x is right of y.
Let L = {L 1 , . . . , L l } denote a collection of linear extensions of a poset P . We say that L is a realizer of P if the intersection of these total orders is P . The dimension of a poset P is the size of the smallest realizer.
The following is a well-known result, which we will use to find a realizer of an adjacency poset. In the proposition and its proof, given σ = σ 1 · · · σ n ∈ S n , we declare σ i < σ σ j if and only if i < j. We will routinely pass between a permutation and its associated total order. Proof. Let σ = σ 1 · · · σ n and ψ = ψ 1 · · · ψ n . Denote the intersection of the total orders σ and ψ by σ ∩ ψ.
Let u = u 1 · · · u n ∈ [σ, ψ] and assume that u is not a linear extension of σ ∩ ψ. Thus there exist i, j ∈ [n] with i < j such that u j < σ u i and u j < ψ u i . If u j > u i in numerical order, then (u j , u i ) ∈ inv(σ) and (u j , u i ) / ∈ inv(u), contradicting the assumption that σ ≤ u in the right weak order. If u j < u i in numerical order, then (u i , u j ) ∈ inv(u) and (u i , u j ) / ∈ inv(ψ) , contradicting the assumption that u ≤ ψ in the right weak order. Therefore, if u ∈ [σ, ψ], then u is a linear extension of σ ∩ ψ.
Since each congruence class of a lattice congruence on the right weak order is an interval [12, Section 2] and since each fiber of ρ is such a congruence class [10, Proposition 6.3], each fiber of ρ is an interval of the right weak order. Let D be a diagonal rectangulation and let L 1 and L 2 be respectively the minimum and maximum elements in the right weak order on S n such that ρ(L 1 ) = ρ(L 2 ) = D. By Proposition 4.1, and since any poset is determined by its set of linear extensions, L = {L 1 , L 2 } is a realizer of the adjacency poset of D.
Given a linear extension L = σ 1 · · · σ n of a poset P on [n], let π L : [n] → [n] be defined by π L (x) = i if and only if x = σ i . The inverse of the permutation σ 1 · · · σ n is π L (1) · · · π L (n). If P has realizer L = {L 1 , L 2 }, then the projection of L denoted by π L (P ) is a map from [n] to R 2 given by π L (x) = (π L1 (x), π L2 (x)). This is an embedding of P into the componentwise order on R 2 . To view this embedding of P as a Hasse diagram for P , we take "up" to be the direction of the vector 1, 1 . . If P is a lattice with realizer L = {L 1 , L 2 }, then the embedding of P into the componentwise order on R 2 given by π L (P ) is a planar embedding of P .
The following proposition is [3, p 32, Exercise 7(a)]. Since every Baxter poset is finite, bounded, and has a planar embedding, this proposition implies that every Baxter poset is a lattice.

Proposition 4.3. A finite planar poset P is a lattice if and only if P is bounded.
The following lemma is [4, Lemma 2.1]: Lemma 4.4. Let P be a bounded poset such that every chain of P is of finite length. If, for any x and y in P such that x and y both cover some element z, the join x ∨ y exists, then P is a lattice.
We now have the necessary tools to prove our main result.
(Proof of Theorem 1.2). Let D be a diagonal rectangulation of size n and P the associated adjacency poset. We first demonstrate that P satisfies the five conditions of Definition 1.1. The rectangle x of D whose lower-left corner coincides with the lower-left corner of S contains interior points below and left of interior points of all other rectangles of D. Thus for every y ∈ [n]−{x}, we have that x < P y . Similarly, the label of the rectangle of D whose upper-right corner coincides with the upperright corner of S is greater, in P , than every other element of P . Therefore, P is a bounded poset.
Observe that any rectangle x of D is the left rectangle of at most one of the configurations shown in Figure 7 and the bottom rectangle of at most one of the configurations shown in Figure 7. Thus, x is covered by at most two elements of P . Similarly, x covers at most two elements of P .
To show that P meets Condition 3 of Definition 1.1, for a contradiction assume that P contains a 2-14-3, a 3-14-2, a 2-41-3 or a 3-41-2 chain. This implies that some linear extension σ of P contains this pattern with the "4" and "1" adjacent. By Proposition 2.2, transposing the "4" and "1" in this linear extension results in a permutation σ ′ such that ρ(σ) = ρ(σ ′ ). Since the fiber ρ −1 (D) is the set of linear extensions of P , the permutation σ ′ is also a linear extension of P . However, this contradicts the assumption that the "4" and the "1" are related in P .
Since the labeling of the rectangles of D comes from the map ρ from permutations to diagonal rectangulations, to demonstrate that P meets Condition 4 of Figure 12. Given that x ⋖ P x a and x ⋖ P x r with x a = x r , in diagonal rectangulation D rectangles x, x a and x r form one of the three configurations shown.

Definition 1.1, we rely on observations about this map. Consider an interval [x, y]
of P such that (x, y) is disconnected. There exist x r = x a such that x ⋖ P x r and x ⋖ P x a . By Theorem 3.2, since no four rectangles of a diagonal rectangulation share a vertex, rectangles x, x a , and x r form one of the configurations shown in Figure 12. In Diagram (i), the left side of rectangle x a is missing to indicate that the lower-left vertex of rectangle x a coincides with or is left of the upper-left vertex of rectangle x. The bottom of rectangle x r is missing in Diagram (ii) to similarly indicate that the lower-left vertex of rectangle x r coincides with or is below the lower-right vertex of rectangle x.
First assume that rectangles x, x a , and x r are in the configuration shown in Diagram (i) of Figure 12 and let W be the vertical wall on the right side of rectangle x. The lower-right vertex of rectangle x and the lower-left vertex of rectangle x r coincide, so rectangle x is the lowermost rectangle on the left side of W . By the definition of ρ, rectangle x + 1 is the uppermost rectangle adjacent to the right side of W and the lower-left corner of rectangle x + 1 is below the upper-right corner of rectangle x. Since the interiors of the right edge of rectangle x a and the left edge of rectangle x + 1 intersect, we have that x a < P x + 1. Since the upper-right corner of rectangle x + 1 is strictly right of W and above rectangle x r , we have that x r < P x + 1. We wish to show that x + 1 = y, i.e., there does not exist z < P x + 1 such that x a < P z and x r < P z. We will prove a stronger statement: x a ∨ x r exists and x a ∨ x r = x + 1. Since x + 1 is an upper bound for x a and x r , it suffices to demonstrate that any other upper bound z satisfies x + 1 ≤ P z. To obtain a contradiction, assume that x + 1 P z for some upper bound z. We use an argument similar to the argument used in the proof of Theorem 3.2. Since x < P z, we have that z P x. Thus rectangle z contains no interior points that are both left of the vertical line containing W and below the horizontal line containing the top of rectangle x. Since x + 1 P z, rectangle z contains no interior points that are both right of the vertical line containing W and above the horizontal line containing the bottom of rectangle x + 1. Thus z is contained in either the region left of the vertical line containing W and above the horizontal line containing the top of rectangle x or the region right of the vertical line containing W and below the horizontal line containing the bottom of rectangle x + 1. Note that these regions are disjoint, that rectangle x a is contained in the first region, and that rectangle x r is contained in the second region. In P , the label of a rectangle contained in the first region cannot cover the label of a rectangle contained in the second region and vice versa. Thus x a ≮ P z or x r ≮ P z, a contradiction. Therefore x a ∨ x r = x + 1.
When rectangles x, x a and x r form the configuration shown in Diagram (ii) of Figure 12, by considering the horizontal wall W above rectangle x and the rightmost rectangle above W , rectangle x − 1, we similarly show that y = x − 1 and that x a ∨ x r = x − 1. In the case illustrated in Diagram (iii) of Figure 12, we first observe that since D is a diagonal rectangulation, the wall above or on the right side of rectangle x extends beyond the upper-right corner of rectangle x. In either case, using the previous arguments, we show that y = x + 1 or y = x − 1 and y = x a ∨ x r .
To demonstrate that P meets Condition 5 of Definition 1.1, note that by Condition 1 of the definition, and since we verified that y = x a ∨ x r in each case of the proof of Condition 4, Lemma 4.4 implies that P is a lattice. Let L 1 and L 2 be respectively the minimum and maximum elements in the right weak order on S n such that ρ(L 1 ) = ρ(L 2 ) = D. By Proposition 4.1, L = {L 1 , L 2 } is a realizer of P . By Theorem 4.2, the Hasse diagram obtained from π L (P ) is a planar embedding of P . Let [x, y] be an interval of P such that (x, y) is disconnected. Let x ⋖ P x l and x ⋖ P x r where x l is left of x r in the planar Hasse diagram obtained from π L (P ). Let π L (x l ) = (a, b) and π L (x r ) = (c, d). Since x l and x r are incomparable with x l left of x r in the planar Hasse diagram, we have that a < c and b > d in numerical order. This implies that x l precedes x r in L 1 and x l follows x r in L 2 . Since L 1 ≤ L 2 in the right weak order, (x l , x r ) ∈ inv(L 2 ). Thus x l < x r in numerical order.
Rectangles x, x l , and x r form one of the configurations shown in Figure 12 (with x l replacing x a ). In every diagram of Figure 12, since each rectangle x i such that x l ≤ P x i < P y is contained in the region above the horizontal line containing the top of rectangle x and left of the vertical line containing the left side of rectangle y, rectangle x i intersects the diagonal of S in that region. This implies that x i < x in numerical order. Additionally, for each x j such that x r ≤ P x j < P y, since rectangle x j intersects the diagonal of D in the region right of the vertical line containing the right side of rectangle x and below the horizontal line containing the bottom of rectangle y, we have that x < x j in numerical order. Thus one connected component of (x, y) contains elements numerically smaller than x and y while the other connected component contains elements numerically larger than x and y. Since x l < x r in numerical order with x l contained in the left component of (x, y) and x r contained in the right component, given w, z ∈ (x, y) such that w is left of z in this planar embedding of P , we have that w < x < z in numerical order.
We have shown that the adjacency poset P satisfies each of the conditions in Definition 1.1, so P is a Baxter poset. Now let P be a Baxter poset. To demonstrate that P is an adjacency poset, we first show that the set of linear extensions of P is a union of fibers of ρ.
In what follows, we assume that P is embedded as described in Condition 5 of Definition 1.1. Let σ = σ 1 · · · σ n be a linear extension of P and suppose ψ = σ 1 · · · σ j−1 σ j+1 σ j σ j+2 · · · σ n such that ρ(σ) = ρ(ψ). We will show that ψ is also a linear extension of P . Since ρ(σ) = ρ(ψ) and σ ⋖ ψ or ψ ⋖ σ in the right weak order, by Proposition 2.2, the permutations σ and ψ are related by a single (2-41-3 ↔ 2-14-3) or (3-41-2 ↔ 3-14-2) move. Let aσ j σ j+1 b be an occurrence of one of these four patterns in σ such that swapping σ j and σ j+1 is a move. Since σ is a linear extension of P , the permutation ψ is also a linear extension of P if and only if σ j and σ j+1 are incomparable in P . To proceed via contradiction, assume that σ j and σ j+1 are comparable in P . Because σ j precedes σ j+1 in σ and σ is a linear extension of P , we have that σ j+1 ≮ P σ j . Thus σ j < P σ j+1 . This implies that σ j ⋖ P σ j+1 since any σ k such that σ j < P σ k < P σ j+1 would be between σ j and σ j+1 in every linear extension of P (and in particular in σ). By Condition 3 of Definition 1.1, at least one of {a, b} is incomparable with at least one of {σ j , σ j+1 }. We assume that a is incomparable with σ j or σ j+1 and note that if b is instead incomparable with σ j or σ j+1 , then the argument is analogous. Since a precedes σ j in σ, our assumption implies that either a < P σ j+1 and a and σ j are incomparable, or a is incomparable with both σ j and σ j+1 . In either case, a and σ j are incomparable.
By Proposition 4.3, P is a lattice so we may consider S(a) and S(σ j ). First assume that a is left of σ j and consider the maximal chain C 1 of P from a to the minimal element of P , denoted0, that follows the right boundary of S(a). Let C 2 denote the maximal chain of P from σ j to0 that follows the left boundary of S(σ j ). Note that C 1 and C 2 intersect at a ∧ σ j and let C ′ 1 and C ′ 2 denote the chains from a and σ j to a ∧ σ j obtained by truncating C 1 and C 2 respectively. Figure 13 shows an example of the chains C ′ 1 and C ′ 2 . Each edge of C ′ 1 and C ′ 2 is the edge of a region of P that lies right of C ′ 1 and left of C ′ 2 . Starting at a, traveling down C ′ 1 to a ∧ σ j , label the sequence of regions right of and adjacent to C ′ 1 with R 1 , . . . , R l . Starting at a ∧ σ j , and traveling up C ′ 2 to σ j , continue by labeling the sequence of regions left of and adjacent to C ′ 2 with R l , R l+1 , . . . , R m . In Figure 13, l = 4 and m = 6. For each i ∈ [m − 1], by Condition 2 of Definition 1.1, the region R i shares an edge with the region R i+1 . (Otherwise C 1 is not the right boundary of S(a) or C 2 is not the left boundary of S(σ j ).) Since P is a lattice, for i ∈ [m], each region R i has a minimal element, denoted r i contained in the boundary of and that region's minimal element is not on C ′ 1 ∪ C ′ 2 , then again either C 1 is not the right boundary of S(a) or C 2 is not the left boundary of S(σ j ).) For each i ∈ [l], the minimal element r i is contained in the left side of the region R i+1 . Thus, by Condition 5 of Definition 1.1, we have that a < r 1 < · · · < r l = a ∧ σ j in numerical order. For each i ∈ {l + 1, . . . , m}, the minimal element r i is contained in the right side of region R i−1 . Thus a ∧ σ j = r l < r l+1 < · · · < r m < σ j in numerical order. Combining these strings of inequalities, we conclude that a < σ j in numerical order.
In a similar way, construct a sequence of regions S 1 , . . . , S p using the section of the right boundary of S(a) from a to a ∨ σ j+1 and the section of the left boundary of S(σ j+1 ) from σ j+1 to a ∨ σ j+1 . If a < P σ j+1 , then a ∨ σ j+1 = σ j+1 . Whether a < P σ j+1 or a and σ j+1 are incomparable in P , using the sequence of maximal elements of these regions together with Condition 5 of Definition 1.1, we obtain a chain of inequalities and conclude that a < σ j+1 in numerical order. However, combining the conclusions that a < σ j and a < σ j+1 contradicts to the assumption that aσ j σ j+1 b is an occurrence of a 2-41-3, a 2-14-3, a 3-41-2 or a 3-14-2 pattern.
If σ j is left of a in P , then to construct sequence of regions R 1 , . . . , R m , let C 1 be the right boundary of S(σ j ) and C 2 be the left boundary of S(a). To construct the sequence of regions S 1 , . . . , S p , use the right boundary of S(σ j+1 ) and the left boundary of S(a). Using these sequences and the corresponding chains of inequalities, we conclude that in numerical order σ j < a and σ j+1 < a. This conclusion again contradicts the assumption that aσ j σ j+1 b is an occurrence of a 2-41-3, a 2-14-3, a 3-41-2 or a 3-14-2 pattern. In both cases, we see that σ j and σ j+1 are incomparable in P . Therefore the set of linear extensions of P is a union of fibers of ρ.

Twisted Baxter and Baxter Permutations from Baxter Posets
Let P be a poset. We say that a subset I of the elements of P is an order ideal of P if and only if for every a ∈ I, if b < P a, then b ∈ I. We say that an ordering a 1 · · · a i of a subset of the elements of P is a partial linear extension of P if {a 1 , . . . , a j } is an order ideal of P for all j ∈ [i]. Given a poset P on [n], the permutation σ is a linear extension of P if and only if σ satisfies the definition of a partial linear extension. Given a partial linear extension σ 1 · · · σ i−1 of P , we define A i ⊆ [n] by u ∈ A i if and only if σ 1 · · · σ i−1 u is a partial linear extension of P . We label this set A i because it forms an antichain (a set of pairwise incomparable elements) of P .
Theorem 5.1. Given a Baxter poset P , the unique twisted Baxter permutation σ = σ 1 · · · σ n that is a linear extension of P is constructed by choosing σ i = min(A i ) for each i ∈ [n].
Note that min(A i ) denotes the smallest, in numerical order, element of A i . If a Baxter poset P is given a natural embedding, then this selection is equivalent to choosing the leftmost (in the embedding) element of A i for each i ∈ [n].
Proof. Let P be a Baxter poset and D the associated diagonal rectangulation. By Theorem 1.2, the total order σ is a linear extension of P if and only if ρ(σ) = D.
Since ρ restricts to a bijection between diagonal rectangulations and twisted Baxter permutations (Theorem 2.1), there is a unique linear extension σ = σ 1 · · · σ n of P that is a twisted Baxter permutation. To construct σ one entry at a time, we must describe a method for choosing σ i from A i . By Proposition 2.3, the permutation σ is the minimal element of the right weak order such that ρ(σ) = D. That is, σ is the linear extension of P that contains the fewest inversions. Therefore, σ i = min(A i ) for all i ∈ [n].
The following results will be used in the proof of Theorem 1.4. The next lemma is equivalent to Corollary 4.2 in [10] which states that σ is a Baxter permutation if and only if σ −1 is a Baxter permutation.
Lemma 5.2. The permutation σ is a Baxter permutation if and only if σ contains no subsequence σ i σ j σ k σ l such that |σ l −σ i | = 1 and the subsequence is an occurrence of the pattern 2-4-1-3 or the pattern 3-1-4-2.
By Theorem 2.1, there exists a unique linear extension of P that is a Baxter permutation.
Lemma 5.3. Let P be a Baxter poset and σ be the unique Baxter permutation that is a linear extension of P . Then σ respects the arrows of P .
Proof. Let P be a Baxter poset with a natural embedding. Let σ denote a linear extension that does not respect the arrow of some region R of P . Let min R and max R respectively denote the minimal and maximal elements of R. By Condition 4 of Definition 1.1, we have that min R and max R differ in value by one. Since σ does not respect the arrow of R, there exists a subsequence min R σ i σ j max R of σ such that σ i and σ j are contained in the boundary of R, one of these contained in the left component of (min R , max R ) and the other contained in the right component of (min R , max R ), and this subsequence is an occurrence of a 2-4-1-3 or a 3-1-4-2 pattern. Thus, by Lemma 5.2, σ is not a Baxter permutation.
We make several useful observations about the map ρ. Given a diagonal rectangulation D, if W is a horizontal wall of D and rectangle a is the leftmost rectangle below and adjacent to W , then rectangle a − 1 is the rightmost rectangle above and adjacent to W and a precedes a − 1 in every permutation σ such that ρ(σ) = D. Each rectangle below and adjacent to W has a label larger than a and each rectangle above and adjacent to W has a label smaller than a − 1. Similarly, if W is a vertical wall of D and rectangle a is the lowermost rectangle left of and adjacent to W , then rectangle a + 1 is the uppermost rectangle right of and adjacent to W and a precedes a + 1 in every permutation σ such that ρ(σ) = D. Additionally, every rectangle left of and adjacent to W has label smaller than a and every rectangle right of and adjacent to W has label larger than a + 1.
The lemma below follows from the definition of a Baxter permutation, the above observations, and Lemma 5.2.
Lemma 5.4. Let D be a diagonal rectangulation and σ = σ 1 · · · σ n ∈ S n such that ρ(σ) = D. If σ is a Baxter permutation, then σ satisfies the following properties: • If rectangles σ i and σ j are adjacent to a horizontal wall W with rectangle σ i below W and rectangle σ j above W , then σ i precedes σ j in σ and • If rectangles σ i and σ j are adjacent to a vertical wall W with rectangle σ i left of W and rectangle σ j right of W , then σ i precedes σ j in σ.
To complete the proof of Theorem 1.4, we refer to a second family of rectangulations, called generic rectangulations. We need generic rectangulations exclusively to prove Lemma 5.7, a lemma about diagonal rectangulations, so we only provide the required background related to generic rectangulations from [11]. We say that a rectangulation R is a generic rectangulation if and only if there exists no set of four rectangles of R that share a vertex. The set of diagonal rectangulations with n rectangles is a subset of the set of generic rectangulations with n rectangles.
As with diagonal rectangulations, there is a map γ that takes a permutation on [n] to a generic rectangulation of size n (see [11,Section 3]) and restricts to a bijection between a subset of S n and generic rectangulations containing n rectangles. We will not need a complete description of γ, so we instead quote the required results.
Given a generic rectangulation R and a wall W of R, the wall shuffle of W , denoted σ W , records the order in which the rectangles adjacent to W appear along W . Specifically, let W be a horizontal wall of R. To find the wall shuffle of W , temporarily label each vertex contained in W as follows. If the vertex is the upper-left vertex of some rectangle x, then label the vertex with x. Otherwise, the vertex is the lower-right vertex of some rectangle y, and we label it with y. The left-to-right ordering of the vertices along W provides an ordering of these vertex labels, and this ordering is σ W . Similarly, if W is a vertical wall of R, we temporarily label the vertices contained in W . We label a vertex with x if it is the lower-right vertex of rectangle x. Otherwise, the vertex is the upper-left vertex of some rectangle y and we label the vertex with y. The bottom-to-top order of these labels along W gives us σ W .
The map γ constructs a generic rectangulation R from a permutation in two steps. Given σ ∈ S n , we first construct ρ(σ). Then, for each wall of ρ(σ), the vertices are labeled as described above. Finally, the vertices (and the attached edges) are reordered along each wall so that the wall shuffle of each wall is a subsequence of σ. For us, the key point is that, to specify a generic rectangulation, it suffices to identify the associated diagonal rectangulation and an order of the vertices along each wall (i.e. a wall shuffle for each wall).
Given a Baxter permutation σ, the conditions given in Lemma 5.4 specify the wall shuffles of the associated generic rectangulation γ(σ). As a result, we can make use of generic rectangulations to prove the following lemma.
Lemma 5.7. Let D be a diagonal rectangulation. Then there is a unique permutation σ such that ρ(σ) = D and such that σ satisfies the properties given in Lemma 5.4. This permutation σ is the Baxter permutation associated with D.
Proof. Let D be a diagonal rectangulation and σ the unique Baxter permutation such that ρ(σ) = D. The permutation σ satisfies the properties given in Lemma 5.4. Assume that there exists a second permutation ψ such that ρ(ψ) = D and ψ satisfies the properties given in Lemma 5.4. Since ρ(σ) = ρ(ψ) and the wall shuffles of γ(σ) agree with the wall shuffles of γ(ψ), we have that γ(σ) = γ(ψ). Thus, by Proposition 5.6, the permutations σ and ψ are related by a sequence of adjacent transpositions in which each transposition is a (2-4-15-3↔ 2-4-51-3) move, a (4-2-15-3 ↔ 4-2-51-3) move, a (3-15-2-4 ↔ 3-51-2-4) move, or a (3-15-4-2↔3-51-4-2) move. This implies that some subsequence of σ is an occurrence of one of these eight patterns. First, assume that σ i σ j σ k σ k+1 σ l is an occurrence of the pattern 2-4-15-3 in σ. This means that σ k < σ i < σ l < σ j < σ k+1 in numerical order. However, this implies that the subsequence σ j σ k σ k+1 σ l is an occurrence of the pattern 3-14-2 in σ, contradicting our assumption that σ is a Baxter permutation. If σ contains an occurrence of one of the other seven patterns, then we similarly show that σ is not a Baxter permutation. We conclude that the unique permutation mapping to D under ρ and satisfying the properties of Lemma 5.4 is the Baxter permutation σ. Proof. To show that σ satisfies the properties of Lemma 5.4, we will show that σ satisfies these properties for each possible configuration of rectangles adjacent to the wall.
First assume that on at least one side of the wall W there is only one adjacent rectangle. Let W be a horizontal wall with a single rectangle, rectangle r 1 , below W and sequence of rectangles r 2 , . . . , r l above W . For all i ∈ {1, . . . , l − 1}, an interior point of rectangle i is strictly below and left of an interior point of rectangle i + 1. Thus, by the definition of the adjacency poset and Theorem 1.2, we have that r 1 < P r 2 < P · · · < P r l . If W is horizontal with a single rectangle, rectangle r l , above W and sequence of rectangles r 1 , . . . , r l−1 below W , then we reach the same Figure 14. Illustrations for the proof of Lemma 5.8.
conclusion. In either case, in P , the labels of the rectangles adjacent to W form a chain and, in this chain, all labels of rectangles below W precede all labels of rectangles above W . When W is a vertical wall with a single rectangle either left of or right of W , the argument is the same. In these cases, we conclude that the labels of rectangles adjacent to W form a chain in P and the labels of rectangles left of W precede the labels of rectangles right of W in this chain. Thus every linear extension of P satisfies the properties of Lemma 5.4 for walls that are adjacent to exactly one rectangle on at least one side. Now assume that on both sides of the wall W there are at least two adjacent rectangles. We will prove the claim that if W is a horizontal wall, then the labels of rectangles adjacent to W form a subset of the labels adjacent to some region of P . Let W be horizontal and, as illustrated in the left diagram of Figure 14, label from left to right the rectangles adjacent to and below W with the sequence b 1 , . . . , b i . Label the rectangles adjacent to and above W , again from left to right, a 1 , . . . , a j . Since D is diagonal and rectangles b 1 and a 1 are the leftmost rectangles adjacent to W , these rectangles form the configuration shown in Diagram (i) of Figure 7. Thus, by Theorem 3.2, we have that b 1 ⋖ P a 1 . If a 1 < P b 2 , then there exists a sequence of x k s such that a 1 ⋖ P x 1 ⋖ P · · · ⋖ P x l ⋖ b 2 . Since b 1 ⋖ P a 1 , and b 2 < P a j , for each k ∈ [l] we have that b 1 < P x k < P a j . Thus each rectangle x k is contained either in the region above W and left of the line containing the left side of rectangle a j or below W and right of the line containing the right side of rectangle b 1 . But in P , no rectangle in the first of these regions covers a rectangle in the second of these regions. We see by this contradiction that a 1 ≮ P b 2 . Since b 1 < P b 2 and a 1 ≮ P b 2 , there exists some c such that b 1 ⋖ P c and c = a 1 . By Theorem 3.2, rectangle c is adjacent to the right side of rectangle b 1 . Since rectangles b 1 , a 1 and c form a configuration shown in Diagram (ii) or (iii) of Figure 12, we have that a 1 ∨ c = a j (as shown in the proof of Theorem 1.2). This implies that b 1 and a j are contained in a shared region R of the embedded poset. Observe that for each k ∈ [i], the lower-left vertex of rectangle b k is strictly below and left of the upper-right vertex of rectangle b i so b k < P b i < P a j . Similarly, for each l ∈ [j], we have that a l < P a j .
For a contradiction, assume that there exists a label of a rectangle adjacent to W that is not contained in the boundary of R. We consider the case in which some a l is not contained in the boundary of R, as illustrated in the right diagram of Figure 14. Since a l < b 1 in numerical order, a l is contained in the left connected component of the interval (b 1 , a j ). Since a l is not contained in the left boundary of R, the element a l is contained in the left boundary of some other region, R ′ . Let d denote an element contained in the right boundary of R ′ . The planarity of the embedding of P implies that d satisfies b 1 < P d. Thus d ≮ P b 1 , implying that that no interior points of rectangle d are strictly left of and below the upper-right corner of rectangle b 1 . Additionally, a l ≮ P d so no interior points of rectangle d are strictly right of and above the lower-left corner of rectangle a l . Since d and a l are contained respectively in the right and left boundaries of R ′ , we have that a l < d in numerical order. This implies that rectangle d is contained in the section of the diagonal rectangulation D below the horizontal line containing W and right of the vertical line containing the right side of rectangle b 1 . Thus b 1 < d in numerical order. However, this contradicts the assumption that P is embedded naturally in the plane. We conclude that each a l for l ∈ [j] is contained in the left boundary of R. A similar argument demonstrates that each b k for k ∈ [i] is contained in the right boundary of R. Thus, the claim holds.
Since W is horizontal, b 1 − 1 = a j , implying that the arrow of R points to the left. By assumption, σ respects the arrows of R so each b k occurs before every a l in σ, i.e. for every horizontal wall, σ satisfies the first condition of Lemma 5.4.
A virtually identical argument demonstrates that if W is vertical, and on both sides of W there are at least two adjacent rectangles, then σ satisfies the second condition of the lemma.
Proof of Theorem 1.4. Let P be a Baxter poset, X be the set of linear extensions of P that respect the arrows of P and let σ be the Baxter permutation that is a linear extension of P . By Lemma 5.3, the Baxter permutation σ is in X. By Lemma 5.8, each element of X satisfies the properties given in Lemma 5.4. However, by Lemma 5.7, only one linear extension of P satisfies these properties so X = {σ}.