\documentclass[ALCO,ThmDefs,Unicode,epreuves]{cedram}
\OneNumberAllTheorems

\usepackage[all]{xy}

\usepackage{tikz}
\usetikzlibrary[calc,intersections,through,backgrounds,arrows,decorations.pathmorphing]


%\usepackage[normalem]{ulem}

\def\Sfrak{\mathfrak{S}}

\def\Bbf{\mathbf{B}}


\def\Acal{\mathcal{A}}
\def\Bcal{\mathcal{B}}
\def\Dcal{\mathcal{D}}
\def\Fcal{\mathcal{F}}
\def\Jcal{\mathcal{J}}
\def\Ocal{\mathcal{O}}
\def\Pcal{\mathcal{P}}
\def\Rcal{\mathcal{R}}
\def\Scal{\mathcal{S}}
\def\Tcal{\mathcal{T}}


\def\Cbb{\mathbb{C}}
\def\Nbb{\mathbb{N}}
\def\Pbb{\mathbb{P}}
\def\Rbb{\mathbb{R}}
\def\Zbb{\mathbb{Z}}


\def\bsym{\boldsymbol}
\def\ds{\displaystyle}
\def\hookra{\hookrightarrow}
\def\ov{\overline}
\def\pa{\partial}
\def\pr{\prime}
\def\prpr{\prime\prime}
\def\ra{\rightarrow}
\def\Ra{\Rightarrow}
\def\setm{\setminus}
\def\ss{\scriptstyle}
\def\un{\underline}
\def\wtil{\widetilde}

\DeclareMathOperator{\Asc}{Asc}
\DeclareMathOperator{\Bic}{Bic}
\DeclareMathOperator{\Cat}{Cat}
\DeclareMathOperator{\CLO}{CLO}
\DeclareMathOperator{\codim}{codim}
\DeclareMathOperator{\Con}{Con}
\DeclareMathOperator{\con}{con}
\DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\Des}{Des}
\DeclareMathOperator{\Gr}{Gr}
\DeclareMathOperator{\GT}{GT}
\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\init}{init}
\DeclareMathOperator{\JI}{JI}
\DeclareMathOperator{\lk}{lk}
\DeclareMathOperator{\MI}{MI}
\DeclareMathOperator{\NC}{NC}
\DeclareMathOperator{\NE}{NE}
\DeclareMathOperator{\NF}{\mathcal{N}}
\DeclareMathOperator{\NN}{NN}
\DeclareMathOperator{\rk}{rk}
\DeclareMathOperator{\Seg}{Seg}
\DeclareMathOperator{\stars}{star}
\DeclareMathOperator{\SW}{SW}
\DeclareMathOperator{\term}{term}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\up}{up}
\DeclareMathOperator{\starrm}{star}
\DeclareMathOperator{\M}{\mathsf{M}}
\DeclareMathOperator{\V}{\mathsf{V}}

%%%%%%%%% a placer avant \begin{document}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\mk}{\mkern -1mu}
\newcommand*{\Mk}{\mkern -2mu}
\newcommand*{\mK}{\mkern 1mu}
\newcommand*{\MK}{\mkern 2mu}

\hypersetup{urlcolor=purple, linkcolor=blue, citecolor=red}


\newcommand*{\romanenumi}{\renewcommand*{\theenumi}{\roman{enumi}}}
\newcommand*{\Romanenumi}{\renewcommand*{\theenumi}{\Roman{enumi}}}
\newcommand*{\alphenumi}{\renewcommand*{\theenumi}{\alph{enumi}}}
\newcommand*{\Alphenumi}{\renewcommand*{\theenumi}{\Alph{enumi}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Auteur

\author{\firstname{Alexander} \lastname{Garver}}

\address{Department of Mathematics\\
University of Michigan}

\email{alexander.garver@gmail.com}

\author{\firstname{Thomas} \lastname{McConville}}

\address{Department of Mathematics\\
 Kennesaw State University}

\email{thomasmcconvillea@gmail.com}

%%%%% Sujet

\subjclass{05A19, 06A07, 06B10}

\keywords{lattice, Catalan number, Cambrian lattice, noncrossing partition, nonkissing complex}


%%%%% Gestion

\DOI{10.5802/alco.142}
\datereceived{2020-01-03}
\dateaccepted{2020-08-02}


%%%%% Titre et résumé
\title{Chapoton triangles for nonkissing complexes}

\begin{abstract}
We continue the study of the nonkissing complex that was introduced by Petersen, Pylyavskyy, and Speyer and was studied lattice-theoretically by the second author. We introduce a theory of Grid--Catalan combinatorics, given the initial data of a nonkissing complex, and show how this theory parallels the well-known Coxeter--Catalan combinatorics. In particular, we present analogues of Chapoton's $F$-triangle, $H$-triangle, and $M$-triangle and give both combinatorial and lattice-theoretic interpretations of the objects defining these polynomials. In our Grid--Catalan setting, we prove that our analogue of Chapoton's $F$-triangle and $H$-triangle identity holds, and we conjecture that our analogue of Chapoton's $F$-triangle and $M$-triangle identity also holds. 
\end{abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\begin{document}

\maketitle

\section{Introduction}

The Catalan numbers famously enumerate many naturally occuring classes of objects in mathematics~\cite{stanley2015catalan}. Among the most significant of these classes is the set of maximal faces of the \emph{simplicial associahedron}. This is a simplicial complex whose vertices correspond to $2$-element subsets of $[n]:=\{1,\ldots,n\}$ that are not cyclically adjacent modulo $n$. Its faces are collections of noncrossing collections of $2$-element subsets of $[n]$. Here, two subsets $\{i,k\}, \{j,l\} \subseteq [n]$ are \emph{noncrossing} unless $i<j<k<l$.

The simplicial associahedron (joined with an $(n-1)$-simplex) arises as the Stanley--Reisner complex of a particularly nice degeneration of the Grassmannian of $2$-planes $\Gr(2,n)$, known as the Pl{\"u}cker algebra.
The desire for similarly good degenerations of higher Grassmannians led to the discovery of the \emph{noncrossing complex} $\Delta^{NC}(k,n)$ in~\cite{petersen.pylyavskyy.speyer:noncrossing} and~\cite{santos.stump.welker:noncrossing}. Abstractly, this is a simplicial complex on the $k$-element subsets of $[n]$, where the faces are defined by a noncrossing condition. Concretely, this complex is again a Stanley--Reisner complex that reflects many interesting properties of $\Gr(k,n)$. In particular, the number of its maximal faces is equal to the \emph{multidimensional Catalan number}; see~\cite{sloane60854line}.

This paper was motivated by our discovery of suprising enumerative properties of a generalization of the noncrossing complex called the \emph{nonkissing complex}, which we recall in Section~\ref{sec_nonkissing}. Briefly, given a finite induced subgraph $\lambda$ of the grid $\Zbb^2$ and a subset $\M$ of vertices of $\lambda$, we call $\lambda_{\M}$ a \emph{marked shape}. The nonkissing complex $\Delta^{NK}(\lambda_{\M})$ is a simplicial complex on certain paths inside $\lambda$. When $\lambda$ is a $k\times(n-k)$ rectangle and $\M$ is the set of vertices on the perimeter of the rectangle, the nonkissing complex $\Delta^{NK}(\lambda_{\M})$ is isomorphic to the noncrossing complex $\Delta^{NC}(k,n)$, as we recall in Section~\ref{subsec_comb_nonkissing}. 

We say that the number of facets of $\Delta^{NK}(\lambda_{\M})$ is a \emph{Grid--Catalan number}. We prove that the Grid--Catalan numbers enumerate two other classes of objects that we introduce in this paper: the \emph{nonfriendly sets} of segments and the \emph{wide sets} of segments supported by $\lambda_{\M}$. We let $\Gamma^{NF}(\lambda_{\M})$ denote the simplicial complex whose faces are nonfriendly sets and refer to this complex as the \emph{nonfriendly complex}. We let $\Psi(\lambda_{\M})$ denote the collection of wide sets ordered by inclusion. To each of these structures, ${\Delta}^{NK}(\lambda_{\M}),\ \Gamma^{NF}(\lambda_{\M})$, and $\Psi(\lambda_{\M})$, we associate a polynomial in two variables, labeled $F(x,y),\ H(x,y)$, and $M(x,y)$, respectively. See Section~\ref{sec_nonkissing} for the definitions of these objects and polynomials. Despite the differences among the three structures, we prove or give evidence for the following identities.



\begin{theorem}\label{thm_main_FH}
 For a marked shape $\lambda_{\M}$ with $r$ interior vertices, we have
 \[ H(x,y) = {(x-1)^r}F\left(\frac{1}{x-1}, \frac{1+x(y-1)}{x-1}\right). \]
\end{theorem}

\begin{conjecture}\label{conj_main_FM}
 For a marked shape $\lambda_{\M}$ with $r$ interior vertices, we have
 \[ M(x,y) = {(1-xy)^r}F\left(\frac{-x+xy}{1-xy}, \frac{xy}{1-xy}\right). \]
\end{conjecture}

Similar polynomials and identities were previously considered in the context of Coxeter--Catalan objects, which we recall in Section~\ref{sec_coxcat}. For each finite Coxeter system $(W,S)$, Chapoton defined three polynomials in two variables in~\cite{chapoton:2004enumerative} and~\cite{chapoton:2006nombre}, also labeled $F(x,y),\ H(x,y)$, and $M(x,y)$. They are now called Chapoton triangles as each of their Newton polygons is contained in a simple triangle. Chapoton conjectured that his three polynomials satisfy the same identities as in Theorem~\ref{thm_main_FH} and Conjecture~\ref{conj_main_FM}, which was proved in~\cite{thiel:2014h} and~\cite{athanasiadis:2007some}, respectively.

For a while, it was believed that these identities were intimately related to the combinatorics of Coxeter systems. The first indication that they may be meaningful for a wider range of complexes was given by Chapoton in~\cite{chapoton:2015stokes}. In that paper, he considers a simplicial complex of quadrangulations of a polygon, and he defines analogues of $F(x,y)$ and $H(x,y)$. He conjectures the identity in Theorem~\ref{thm_main_FH} for this setting, and a special case of this was proved in~\cite[Theorem 6]{manneville2018serpent} when $x = y = 1$.

To prove Theorem~\ref{thm_main_FH}, we use the lattice structure of the Grid--Tamari order discovered in~\cite{mcconville:2015lattice}, which we recall in Section~\ref{sec_tamari}. An essential result from that paper is that the Grid--Tamari order is a congruence-uniform lattice. Such lattices come equipped with two additional structures: the canonical join complex and the core label order. In the case of the Grid--Tamari order, we interpret these additional structures as the nonfriendly complex and the lattice of wide sets of segments, respectively. 

The rest of the paper is organized as follows. In Section~\ref{sec_coxcat}, we give a brief overview of the Coxeter--Catalan combinatorics that inspired this work. We then introduce the main combinatorial objects of this paper and their associated Chapoton triangles in Section~\ref{sec_nonkissing}. We refer to the study of bijections among these objects as \emph{Grid--Catalan combinatorics}. In Section~\ref{sec_tamari}, we recall the Grid--Tamari order and expand on the lattice structure of these posets in order to provide lattice-theoretic interpretations for the objects introduced in Section~\ref{sec_nonkissing}. Finally, we prove Theorem~\ref{thm_main_FH} and provide some evidence for Conjecture~\ref{conj_main_FM} in Section~\ref{sec_enumeration}.




\section{Coxeter--Catalan combinatorics}\label{sec_coxcat}

In this section, we briefly recall some combinatorial structures that arise in Coxeter--Catalan combinatorics. A thorough account on the development of this subject may be found in~\cite[Chapter 1]{armstrong:2009generalized}. The purpose of this section is to provide some context for our definitions of the polynomials $F(x,y),\ H(x,y)$, and $M(x,y)$ in the Grid--Catalan setting, which are given in Section~\ref{sec_nonkissing}. However, the results discussed in this section are independent from the rest of the paper. 



Given a rank $r$ Coxeter system $(W,S)$, the facets of the cluster complex, nonnesting partitions, and noncrossing partitions are each enumerated by $W$-Catalan numbers,
\[
\Cat(W)=\prod_{i=1}^r\frac{h+d_i}{d_i}
\]
where $h$ is the Coxeter number and $d_1,\ldots,d_r$ are the degrees of the generators of the ring of $W$-invariant polynomials $\Cbb[x_1,\ldots,x_r]^W$. Each of these objects were originally defined and studied in type $A$ before being extended to other types. We define each of these objects in turn, and describe some additional enumerative relationships among them originally conjectured by Chapoton.

Let $W$ be a finite real reflection group with root system $\Phi$ and simple roots $\Pi$. A root is \emph{almost positive} if it is either positive or the negation of a simple root. The set $\Phi_{\geq -1}$ of almost positive roots is the ground set of a flag simplicial complex $\Delta(W)$ known as the \emph{(root) cluster complex}. The faces of $\Delta(W)$ are collections of pairwise compatible almost positive roots, as defined in~\cite{fomin.zelevinsky:2003systems}. If $W$ is of type $A_{n-1}$, then the cluster complex is isomorphic to the simplicial associahedron defined in the introduction.

The cluster complex arises as a simplicial complex on cluster variables of a finite type cluster algebra. Cluster algebras were introduced by Fomin and Zelevinsky in the study of canonical bases and total positivity in Lie groups, but have since appeared in a wide variety of areas including quiver representations, Teichm{\"u}ller theory, and discrete dynamical systems; see \eg~\cite{fomin.williams.zelevinsky:2016introduction}.

In~\cite{chapoton:2004enumerative}, Chapoton introduced the \emph{$F$-triangle}, the polynomial in two variables defined~as
\[ F_W(x,y)=\sum_{F\in\Delta(W)}x^{|F\cap\Phi^+|}y^{|F\cap(-\Pi)|}. \]
One may recover the usual $f$-polynomial of the cluster complex by setting $x=y$ in the above formula.

For a crystallographic root system $\Phi$, the \emph{root poset} is defined as the poset $(\Phi^+,\leq)$ of positive roots where $\alpha\leq\beta$ if $\beta-\alpha$ is a nonnegative linear combination of simple roots. Postnikov defined the set $\NN(W)$ of \emph{nonnesting partitions} of $W$ to be the set of antichains of the root poset. Chapoton defined the \emph{$H$-triangle}~\cite{chapoton:2006nombre} to be the polynomial
\[ H_W(x,y)=\sum_{A\in\NN(W)}x^{|A|}y^{|A\cap\Pi|}. \]

Chapoton conjectured that the $F$-triangle and the $H$-triangle satisfy the same identity as in Theorem~\ref{thm_main_FH}, which was later proved in~\cite{thiel:2014h}. This is remarkable, in part because there is no bijection between nonnesting partitions and facets of the cluster complex that has been \emph{uniformly described} across all Lie types. Nonetheless, the relationship between the $F$-triangle and $H$-triangle only depends on the rank of the corresponding Coxeter system.






A third class of objects enumerated by $W$-Catalan numbers are the \emph{noncrossing partitions}. Noncrossing partitions were introduced by Kreweras~\cite{kreweras:partitions} as partitions of a finite subset of $\{1,\ldots,n\}$ arranged in clockwise order on a circle such that the convex hulls of any two blocks do not intersect. This was generalized to all types separately by Bessis~\cite{bessis:2003dual} and Brady and Watt~\cite{brady.watt:2002k} as follows.

A \emph{Coxeter element} $c$ is the product of the simple generators, taken in any order. To each root $\alpha$ in $\Phi$, we may associate a reflection that fixes a hyperplane and swaps $\alpha$ and $-\alpha$. For $w\in W$, we let $l_T(w)$ be the length of the shortest expression for $w$ as a prduct of reflections. Coxeter elements are maximal in the \emph{absolute order}, the poset on $W$ where $u\leq v$ if $l_T(u)+l_T(u^{-1}v)=l_T(v)$. The \emph{noncrossing partitions} $\NC(W,c)$ are all elements of $W$ in the interval $[1,c]$ in absolute order. To recover the original definition by Kreweras, we let $c$ be the long cycle $(12\ldots n)$, and replace an element $u\in[1,c]$ with the set of cycles that appear in the cycle decomposition of $u$.

The poset of noncrossing partitions is graded by the length function $l_T$. Chapoton used this grading to define the $M$-triangle~\cite{chapoton:2004enumerative} as the polynomial
\[ M_W(x,y)=\sum_{u\leq v}\mu(u,v)x^{\rk(v)}y^{\rk(u)}, \]
where $\mu(u,v)$ is the M{\"o}bius function on the poset of noncrossing partitions. In particular, one can interpret the absolute value of the M{\"o}bius function as counting certain faces of the cluster complex. It was conjectured in~\cite{chapoton:2004enumerative} and proved in~\cite{athanasiadis:2007some} that the $F$-triangle and $M$-triangle satisfy the same identity as in Conjecture~\ref{conj_main_FM}. 




\section{Grid--Catalan combinatorics}\label{sec_nonkissing}

Here, we introduce the fundamental combinatorial objects in our theory, as well as their associated Chapoton triangles.

\subsection{Routes and segments}\label{subsec_comb_paths_segments}
Let $\lambda$ be a finite induced subgraph of the grid {$\mathbb{Z}^2$}. Two vertices $\textsf{v} =(a,b)$ and $\textsf{v}^\prime = (c,d)$ belonging to $\lambda$ are joined by an edge of $\lambda$ if either $a=c$ and $|b-d|=1$ or $b=d$ and $|a-c|=1$. We refer to $\lambda$ as a \emph{shape}. We say that a vertex $\textsf{v} = (a,b)$ of $\lambda$ is \emph{immediately South} (resp., \emph{East}) of vertex $\textsf{v}^\prime = (c,d)$ in $\lambda$ if $a=c$ and $b=d-1$ (resp., $a=c+1$ and $b=d$). We orient all of the vertical edges down and the horizontal edges to the right. In Figure~\ref{lambda_ex1}$(a)$, we show an example of a shape $\lambda.$ 




\begin{figure}[htb]\centering
\begin{tabular}{c@{\quad\qquad}c}
\includegraphics[scale=1.5]{Figures/lambda_ex1_v3.pdf} & \includegraphics[scale=1.5]{Figures/lambda_ex2_v3.pdf} \\
$(a)$ & $(b)$
\end{tabular}

\caption{{In $(a)$, we show a shape $\lambda$. In $(b)$, we show a marked shape $\lambda_{\M}$. The interior vertices are shown in red, and the marked vertices are shown in blue. In later examples, we typically only use blue dots to depict marked vertices that are not boundary vertices.}}
\label{lambda_ex1}
\end{figure}










For our purposes, it will be convenient to work the initial data of what we call a marked shape. Let $\lambda$ be a shape, and let $\M$ be a subset of its vertices that contains all \emph{boundary vertices} of $\lambda$ (\ie all vertices whose degree is at most 3). We refer to the data of $\lambda$ and $\M$ as a \emph{marked shape}, and denote it by $\lambda_{\M}$. The \emph{vertices} and \emph{edges} of $\lambda_{\M}$ are defined as the vertices and edges of $\lambda$.


We say a vertex $\textsf{v}$ of $\lambda_{\M}$ is a \emph{marked vertex} if $\textsf{v} \in \M$. Similarly, a vertex $\textsf{v}$ of $\lambda_{\M}$ is an \emph{interior vertex} if $\textsf{v} \not \in \M$. Any shape $\lambda$ may be regarded as marked shape $\lambda_{\M}$ where $\M$ consists of only boundary vertices of $\lambda$. In this case, we may say the shape is \emph{unmarked}. See Figure~\ref{lambda_ex1}$(a)$ for an example of an unmarked shape and Figure~\ref{lambda_ex1}$(b)$ for an example of a marked shape. We let ${\V}^\circ = \V^\circ(\lambda_{\M})$ be the set of interior vertices and ${\V} = {\V}(\lambda_{\M})$ be the set of all vertices of $\lambda_{\M}$.

A \emph{route} of $\lambda_{\M}$ is a sequence of vertices $(\textsf{v}_0,\ldots, \textsf{v}_l)$ of $\lambda$ with $l \ge 2$ such that
\begin{itemize}
\item $\textsf{v}_0, \textsf{v}_l \in \M$,
\item $\textsf{v}_i$ is an interior vertex of $\lambda_{\M}$ for all $0<i<l$, and
\item $\textsf{v}_i$ is immediately South or East of $\textsf{v}_{i-1}$ for all $0<i\leq l$.
\end{itemize}
For a route $(\textsf{v}_0,\ldots, \textsf{v}_l)$, we say $\textsf{v}_0$ is its \emph{initial} vertex and $\textsf{v}_l$ is its \emph{terminal} vertex. Using this orientation of $(\textsf{v}_0,\ldots, \textsf{v}_l)$, we say the route \emph{enters} $\textsf{v}_i$ \emph{from the West} (resp., \emph{North}) if $\textsf{v}_{i-1}$ is immediately West (resp., immediately North) of $\textsf{v}_i$. Similarly, the route \emph{leaves} $\textsf{v}_i$ \emph{to the East} (resp., \emph{South}) if $\textsf{v}_{i+1}$ is immediately East (resp., immediately South) of $\textsf{v}_i$. 


\begin{exam}
We show three examples of routes and three non-examples of routes in Figure~\ref{routes_ex}.
\end{exam}

\begin{figure}[htb]\centering

\includegraphics[scale=1.5]{Figures/routes_ex1_v3.pdf}

\caption{We show three routes in red and three sequences that are not routes in orange. The marked shape appearing here is $\lambda_{\M}$ from Figure~\ref{lambda_ex1}$(b)$.}
\label{routes_ex}

\end{figure}



\begin{rema}
Previously, in~\cite{mcconville:2015lattice}, the term boundary path was used instead of the term route.
\end{rema}

\begin{exam}\label{rectangle_shape_example}
We frequently consider the special case where $\lambda$ is a $k\times(n-k)$ \emph{rectangle}, meaning that $\lambda$ is the shape with vertex set $\{(i,j):\ 0\leq i\leq n-k,\ 0\leq j\leq k\}$. In this case, routes in $\lambda$ may be extended to lattice paths from $(0,k)$ to $(n-k,0)$ consisting of south and east steps. We express these lattice paths as sequences of $S$'s and $E$'s of length $n$ where $S$ indicates a south step and $E$ indicates an east step. We may identify such lattice paths with the $k$-element subsets of $[n] = \{1,\ldots,n\}$ by expressing the path as a word in the letters $S,E$ and recording the positions of the $S$'s.

Figure~\ref{2x3_ex1} shows several routes in the shape $\lambda$ that is a $2\times 3$ rectangle. The initial vertex of any one these routes is a boundary vertex of $\lambda$ on the northern or western boundary of $\lambda$. As an example of the correspondences above, the red route in Figure~\ref{2x3_ex1} is mapped to the lattice path $(S,E,E,S,E)$, which in turn is mapped to the set $\{1,4\} \subseteq \{1, \ldots, 5\}$.
\end{exam} 






\begin{figure}[htb]\centering

\includegraphics[scale=1.25]{Figures/Ex_2x3_v3.pdf}

\caption{Some examples of routes in the $2\times 3$ rectangle. The edges indicate that corresponding routes are nonkissing. This is the reduced nonkissing complex $\wtil{\Delta}^{NK}(\lambda)$ where $\lambda$ is a $2\times 3$ rectangle.}
\label{2x3_ex1}
\end{figure}

It will be useful to define the \emph{transposition} of a shape $\lambda_{\M}$, denoted $\lambda^{\tr}_{\M}$. The shape $\lambda^{\tr}_{\M}$ has vertices of the form $(j, -i)$ where $(i,j)$ is a vertex of $\lambda_{\M}$ and two vertices of $\lambda^{\tr}_{\M}$ are connected by an edge if and only if the corresponding vertices of $\lambda_{\M}$ are connected by an edge. The marked vertices of $\lambda^{\tr}_{\M}$ are the images of $\M$ under the transposition map; we mildly abuse notation and write $\lambda^{\tr}_{\M}$, rather than the more cumbersome $\lambda^{\tr}_{\M^{\tr}}$.





A \emph{segment} of $\lambda_{\M}$ is a sequence of interior vertices $(\textsf{v}_0,\ldots, \textsf{v}_l)$ of $\lambda_{\M}$ with $l \geq 0$ 
such that $\textsf{v}_i$ is immediately South or East of $\textsf{v}_{i-1}$ for all $i$. We say $\textsf{v}_0$ is the \emph{initial} vertex, and $\textsf{v}_l$ is the \emph{terminal} vertex. We say a segment is \emph{lazy} if it only has one vertex. Observe that given any route $(\textsf{v}_0, \ldots, \textsf{v}_l)$ and any $i$ and $j$ where $1\le i \le j \le l-1$, the sequence $(\textsf{v}_i,\ldots, \textsf{v}_j)$ is a segment. 




We let $\Seg(\lambda_{\M})$ be the set of all segments supported by $\lambda_{\M}$. Transposition clearly defines a bijection $\Seg(\lambda_{\M}) \to \Seg(\lambda^{\tr}_{\M})$.

Two segments $s = (\textsf{v}_0, \ldots, \textsf{v}_l), t = (\textsf{w}_0, \ldots, \textsf{w}_m)$ may be \emph{concatenated} to obtain a new segment $s\circ t := (\textsf{v}_0, \ldots, \textsf{v}_l, \textsf{w}_0, \ldots, \textsf{w}_m)$ if the initial vertex of $t$ is immediately South or immediately East of the terminal vertex of $s$. 




\begin{exam}
Figure~\ref{Fig_ex_nonex_segs} shows some examples of segments and a non-example of a segment.
\end{exam}




\begin{figure}[htb]\centering
\includegraphics[scale=1.5]{Figures/lambda_ex1_v3_segs_final.pdf}

\caption{In red, we show a segment and a lazy segment of the shape $\lambda$ from Figure~\ref{lambda_ex1}. The orange path is not an example of a segment of~$\lambda$.}
\label{Fig_ex_nonex_segs}
\end{figure}






\begin{exam}
If $\lambda$ is a $2\times n$ rectangle, then the segments of $\lambda$ are in natural bijection with the positive roots of a type $A_{n-1}$ root system. Indeed, observe that $\Seg (\lambda) = \{t_{ij} \mid 1 \le i < j \le n\}$ where $t_{ij}$ denotes the unique segment that connects vertex $(i,1)$ to $(j-1,1)$. The map defined by $t_{ij} \mapsto \sum_{i \le \ell < j}\alpha_\ell$ gives the desired bijection. Two segments in $\Seg (\lambda)$ may be concatenated if and only if the sum of their corresponding positive roots is a positive root. 
\end{exam}


Given segments $s, t \in \Seg (\lambda_{\M})$, we write $t \subseteq s$ if every vertex of $t$ is a vertex of~$s$. In this situation, we say that $t$ is a \emph{subsegment} of $s$. A subsegment of a route is defined analogously. If $t\subseteq s$, we say that $t$ is a \emph{SW-subsegment} of $s$ if
\begin{itemize}
\item $s$ either has the same initial vertex as $t$ or enters $t$ from the North, and
\item $s$ either has the same terminal vertex as $t$ or leaves $t$ to the East.
\end{itemize}
A \emph{NE-subsegment} $t\subseteq s$ is defined in the same way, except that $s$ enters $t$ from the West and leaves to the South. Let $\SW(s) \subseteq \Seg (\lambda_{\M})$ and $\NE(s) \subseteq \Seg (\lambda_{\M})$ be the set of SW-subsegments and NE-subsegments of $s$, respectively. We note that $s$ is the unique common element of $\SW(s)$ and $\NE(s)$. We show examples of the sets $\SW(s)$ and $\NE(s)$ in Figure~\ref{Fig_As_Ks} where $\lambda$ is the $3\times 4$ rectangle.





In a similar manner, for any route $p$ supported by $\lambda_{\M}$ we define $\SW(p) \subseteq \Seg (\lambda_{\M})$ (resp., $\NE(p) \subseteq \Seg (\lambda_{\M})$) to be the set of subsegments of $p$ that it enters from the North (resp., West) and leaves to the East (resp., South). Observe that $p$ is not in $\SW(p)$ or $\NE(p)$ since routes are not segments.


\begin{figure}[htb]\centering
\begin{tabular}{c@{\qquad\quad}c}
\includegraphics[scale=1.5]{Figures/As_ex.pdf} & \includegraphics[scale=1.5]{Figures/Ks_ex.pdf} \\
$(a)$ & $(b)$
\end{tabular}

\caption{In $(a)$, we show the collection of segments $\SW(s)$ where~$s$ is the longest segment in the figure. In $(b)$, we show $\NE(s)$.}
\label{Fig_As_Ks}
\end{figure}


\subsection{The nonkissing complex}\label{subsec_comb_nonkissing}

\looseness-1
Throughout this section, we fix a marked shape $\lambda_{\textsf{M}}$. 

Two routes $p$ and $q$ of $\lambda_{\M}$ are \emph{kissing} along a common subsegment $s$ if both of the following conditions hold:
\begin{itemize}
\item $p$ enters $s$ from the West while $q$ enters from the North, and
\item $p$ leaves $s$ to the South while $q$ leaves to the East.
\end{itemize}
Two routes may kiss along several disjoint segments. If they do not kiss along any segment, we say that $p$ and $q$ are \emph{nonkissing}. In Figure~\ref{kissing_fig}, we show two routes $p$ and $q$ supported by the $3\times 4$ rectangle that are kissing along two disjoint segments. Also, see the caption of Figure~\ref{2x3_ex1}.



\begin{figure}[htb]\centering
\includegraphics[scale=1.5]{Figures/kissing_example_v3.pdf}

\caption{Two routes $p$ and $q$ that are kissing along two disjoint segments.}
\label{kissing_fig}
\end{figure}

Recall that an \emph{abstract simplicial complex} $\Delta$ is a collection of subsets of a given set called \emph{faces} such that for any face $F\in\Delta$ and any $G\subseteq F$ one has $G\in\Delta$. We define the dimension of a face $F \in \Delta$ to be $\dim (F) = |F|-1$ and the dimension of $\Delta$ to be $\dim (\Delta) = \sup_{F \in \Delta}\dim (F)$. Similarly, we define the \emph{codimension} of a face $F \in \Delta$ to be $\codim(F) := \dim (\Delta)-\dim (F)$. For the remainder of the paper, we assume that all simplicial complexes are finite dimensional.

\begin{defi}[\cite{mcconville:2015lattice, petersen.pylyavskyy.speyer:noncrossing}]
The \emph{nonkissing complex} $\Delta^{NK}(\lambda_{\M})$ is the abstract simplicial complex on the set of routes supported by $\lambda_{\M}$ whose faces are sets of pairwise nonkissing routes of $\lambda_{\M}$. 



If a route $p$ of $\lambda_{\M}$ only takes East steps or only takes South steps, we say it is a \emph{horizontal} or \emph{vertical} route, respectively. Horizontal and vertical routes are nonkissing with every other route, so they are cone points in the nonkissing complex. The \emph{reduced nonkissing complex} $\wtil{\Delta}^{NK}(\lambda_{\textsf{M}})$ is the subcomplex of $\Delta^{NK}(\lambda_{\textsf{M}})$ with all horizontal and vertical routes removed. See Figure~\ref{2x3_ex1} for an example of $\wtil{\Delta}^{NK}(\lambda_{\textsf{M}})$ when $\lambda = \lambda_{\M}$ is the $2\times 3$ rectangle. \end{defi} 


\begin{exam}
{When $\lambda$ is rectangle shape as in Example~\ref{rectangle_shape_example}, the reduced nonkissing complex is the boundary complex of a polytope known as the (simplicial) \emph{Grassmann associahedron}~\cite{santos.stump.welker:noncrossing}. When $\lambda$ is a $2\times n$ rectangle, this polytope is the usual simplicial associahedron.}
\end{exam}



A route $p$ of $\lambda_{\M}$ is an \emph{initial route} if it turns at a unique vertex $\textsf{v}$ and $p$ enters $\textsf{v}$ from the West and leaves to the South. 
The set of all initial routes supported by a marked shape $\lambda_{\textsf{M}}$ is a face of $\wtil{\Delta}^{NK}(\lambda_{\textsf{M}})$, which we denote by $F_0$. The first of our Chapoton triangles, the \emph{$F$-triangle} for the reduced nonkissing complex, is the polynomial
\[
F(x,y)=\sum_{F\in\wtil{\Delta}^{NK}(\lambda_{\textsf{M}})}x^{|F\setm F_0|}y^{|F\cap F_0|}.
\]

\begin{exam}\label{ex_Ftri}
The reduced nonkissing complex where $\lambda$ is a $2\times 3$ rectangle has already appeared in Figure~\ref{2x3_ex1}. Two routes are connected by an edge if and only if they lie in a common face. The red route and the green route are the only initial routes in $\lambda$. For this complex, we have the following $F$-triangle:
\[
F(x, y)= 1 + 3x + 2y + 2x^2 + 2xy + y^2.
\]
\end{exam}



The \emph{link} of face $F^\prime$ of a simplicial complex $\Delta$ is defined as \[\lk_{F^\prime}(\Delta) := \left\{F \in \Delta \mid F\cap F^\prime = \emptyset, F \cup F^\prime \in \Delta \right\}.\] The next lemma is one of our motivations for the notion of a marked shape.



\begin{lemma}\label{link_marked_shape_isom}
{Let $F_0^{\pr}$ be a subset of the set of initial routes of a marked shape $\lambda_{\M}$. Let $\textsf{W} \subseteq {\V}^\circ(\lambda_{\M})$ be the set of interior vertices $\textsf{v}$ such that there exists a route $p\in F_0^{\pr}$ that turns at $\textsf{v}$. Then the complex $\lk_{F_0^{\pr}}(\widetilde{\Delta}^{NK}(\lambda_{\M}))$ is isomorphic to $\widetilde{\Delta}^{NK}(\lambda_{\textsf{M}\cup \textsf{W}})$. }
\end{lemma}

\begin{proof}
Using induction, it is enough to prove the lemma when $F_0^{\pr}=\{p_0\}$ and $\textsf{W}=\{\textsf{v}\}$ are singletons. We define a map $g$ from the vertices of $\lk_{F_0^{\pr}}(\widetilde{\Delta}^{NK}(\lambda_{\M}))$ to the vertices of $\widetilde{\Delta}^{NK}(\lambda_{\textsf{M}\cup \textsf{W}})$ and show that this induces a simplicial isomorphism.

Let $p$ be a route distinct from $p_0$ that does not kiss $p_0$; \ie $\{p\}\in \lk_{F_0^{\pr}}(\widetilde{\Delta}^{NK}(\lambda_{\M}))$. If $p$ does not contain the vertex $\textsf{v}$, then set $g(\{p\})=\{p\}$. Otherwise, we may write $p=(\textsf{v}_0,\ldots, \textsf{v}_l)$ where $\textsf{v}=\textsf{v}_i$ for some $i$. Since $p$ and $p_0$ are nonkissing, either $(\textsf{v}_0,\ldots, \textsf{v}_i)$ is a horizontal route of $\lambda_{\textsf{M}\cup \textsf{W}}$, or $(\textsf{v}_i,\ldots, \textsf{v}_l)$ is a vertical route of $\lambda_{\textsf{M}\cup \textsf{W}}$, but not both. In the former case, define $g(\{p\})=(\textsf{v}_i,\ldots, \textsf{v}_l)$, and in the latter case, $g(\{p\})=(\textsf{v}_0,\ldots, \textsf{v}_i)$.



It is straightforward to verify that the map $g$ defined by $g(F) = \bigcup_{p \in F} g(\{p\})$ gives the desired isomorphism of simplicial complexes.
\end{proof}



\begin{coro}\label{passing_to_lambda}
For any marked shape $\lambda_{\M}$, there exists a subset $F^\prime_0$ of its initial routes such that there is an isomorphism $\mu: \widetilde{\Delta}^{NK}(\lambda_{\M}) \to \lk_{F^\prime_0}(\widetilde{\Delta}^{NK}(\lambda)).$ In addition, the map \[\mu(-)\cup F^\prime_0: \widetilde{\Delta}^{NK}(\lambda_{\M}) \to \widetilde{\Delta}^{NK}(\lambda)\] induces an injection from the facets of $\widetilde{\Delta}^{NK}(\lambda_{\M})$ to the facets of $\widetilde{\Delta}^{NK}(\lambda)$.
\end{coro}



{In a similar manner, one can identify the reduced nonkissing complex of an unmarked shape as the link of a nonkissing complex of a larger shape.}

\begin{lemma}\label{lem_subshape_link}
{Let $\lambda$ and $\widehat{\lambda}$ be shapes such that $\lambda$ is contained in $\widehat{\lambda}$. Let $F_0^{\pr}$ be the set of initial routes of $\widehat{\lambda}$ that do not turn at any interior vertex of $\lambda$. Then the complex $\lk_{F_0^{\pr}}(\widetilde{\Delta}^{NK}(\widehat{\lambda}))$ is isomorphic to $\widetilde{\Delta}^{NK}(\lambda)$.}
\end{lemma}



When $\lambda$ is an unmarked rectangle shape, 
\eg Example~\ref{ex_Ftri}, the reduced nonkissing complex was proved in~\cite{petersen.pylyavskyy.speyer:noncrossing} and~\cite{santos.stump.welker:noncrossing} to be a shellable pseudomanifold. Before extending this result to marked shapes, we recall some background on shellable pseudomanifolds.

 A \emph{facet} is a maximal face of $\Delta$. A simplicial complex is \emph{pure} if all of its facets have the same dimension. If $\Delta$ is pure, then the codimension 1 faces are called \emph{ridges}. A pure simplicial complex $\Delta$ is \emph{thin} if every ridge is contained in exactly two facets. It is \emph{gallery-connected} if for any two facets $F,F^{\pr}$, there is a sequence of facets $F=F^0,F^1,\ldots,F^m=F^{\pr}$ such that $F^{i-1}\cap F^i$ is a ridge for all $i$. We say $\Delta$ is a \emph{pseudomanifold} (without boundary) if it is pure, thin, and gallery-connected. 


A pure simplicial complex $\Delta$ is \emph{shellable} if its facets may be totally ordered as $F^1, F^2,\ldots$ such that for all $1\leq i<j$, there exists $k<j$ such that $F^k\cap F^j$ is a ridge that contains $F^i\cap F^j$. 
The ordering $F^1,F^2,\ldots$ is called a shelling order. Shellable complexes arise in many combinatorial settings and come with good topological properties. In particular, if $\Delta$ is a shellable complex, then it is homotopy equivalent to a wedge of spheres~\cite[Theorem 4.1]{bjorner1996shellable}. Furthermore, the link of any face of a shellable complex is shellable~\cite[Proposition 10.14]{bjorner.wachs:shellable_2}.

A well-known topological result is that any shellable pseudomanifold is a topological sphere~\cite[Corollary 1.28]{hudson1969piecewise}. This property extends to links of faces by the following lemma.

\begin{lemma}\label{lemma_shellable_pseudomanifold}
 If $\Delta$ is a shellable pseudomanifold and $F$ is a face of $\Delta$, then $\lk_F(\Delta)$ is a shellable pseudomanifold.
\end{lemma}

\begin{proof}
 As stated above, $\lk_F(\Delta)$ is a shellable complex. Purity and thinness of $\lk_F(\Delta)$ are immediate from the definitions, so it remains to show that the link is gallery-connected.

 Let $F^1,F^2,\ldots$ be a shelling order of the facets of $\lk_F(\Delta)$. Using induction, one can show that any initial subcomplex generated by $F^1,\ldots,F^k$ is gallery-connected, so the same holds for $\lk_F(\Delta)$.\end{proof}



We now obtain several properties of the reduced nonkissing complex of a marked shape.

\begin{theorem}
For any marked shape $\lambda_{\M}$, the complex $\wtil{\Delta}^{NK}(\lambda_{\M})$ is a shellable pseudomanifold of dimension $|{\V}^{\circ}| - 1$. 
\end{theorem}

\begin{proof}
First assume that $\lambda_{\M}$ is an unmarked shape, so that $\lambda_{\M} = \lambda$. Then it follows from~\cite[Corollary 3.3]{mcconville:2015lattice} and~\cite[Corollary 2.15, Theorem 2.17]{santos.stump.welker:noncrossing} that $\wtil{\Delta}^{NK}(\lambda)$ is a shellable pseudomanifold. Since $|F_0| = |\textsf{V}^\circ|$, we have that $\dim (\wtil{\Delta}^{NK}(\lambda)) = |\V^\circ|-1$.

Now assume that $\lambda_{\M}$ is a general marked shape. Then Corollary~\ref{passing_to_lambda} implies that \[\mu(\wtil{\Delta}^{NK}(\lambda_{\M})) \cong \lk_{F_0^\prime}(\wtil{\Delta}^{NK}(\lambda))\] for some subset $F_0^\prime$ of the initial routes of $\lambda_{\M}$. Lemma~\ref{lemma_shellable_pseudomanifold} implies that $\wtil{\Delta}^{NK}(\lambda_{\M})$ is a shellable pseudomanifold. It has the desired dimension for the same reason that $\wtil{\Delta}^{NK}(\lambda)$ does.
\end{proof}


\subsection{The nonfriendly complex}\label{subsec_comb_nonfriendly} 
Throughout this section, we fix a marked shape $\lambda_{\textsf{M}}$.

\begin{figure}[htb]
\begin{tabular}{c@{\qquad\quad}c}
\includegraphics[scale=1.5]{Figures/fr_ex1.pdf} & \includegraphics[scale=1.5]{Figures/nonfr_ex1.pdf} \\
$(a)$ & $(b)$
\end{tabular}
\caption{Friendly (resp., nonfriendly) red segments appear in $(a)$ (resp., $(b)$).}
\label{fr_nonfr_fig}
\end{figure}

\begin{defi}We say two distinct segments $s,t$ are \emph{friendly} along a common subsegment $u$ if $u$ is in $\SW(s)\cap \NE(t)$ or in $\NE(s)\cap \SW(t)$. Two segments are called \emph{nonfriendly} if they are not friendly along any common subsegment. The \emph{nonfriendly complex} $\Gamma^{NF}(\lambda_{\textsf{M}})$ is the simplicial complex with vertex set $\Seg(\lambda_{\textsf{M}})$ whose faces are sets of pairwise nonfriendly segments.\end{defi}



\begin{exam}\label{friendly_ex_1}
Observe that a segment $s \in \Seg(\lambda_{\M})$ is friendly with any segment $t \in \Seg(\lambda_{\M})$ that belongs $\SW(s)$ or $\NE(s)$. Moreover, in this case, the segment $t$ is the only subsegment of both $s$ and $t$ along which $s$ and $t$ friendly.
\end{exam}


\begin{exam}
In Figure~\ref{fr_nonfr_fig}$(a)$, we show two red segments of the $3 \times 4$ rectangle that are friendly along each of the two blue segments. Figure~\ref{fr_nonfr_fig}$(b)$ shows two nonfriendly segments. 
\end{exam}

\begin{figure}[htb]\centering

\includegraphics[scale=1.2]{Figures/2x3_cjcomplex.pdf}

\caption{{The nonfriendly complex where $\lambda$ is a $2\times 3$ rectangle. Two vertices are joined by an edge if and only if the two define a face of the nonfriendly complex.}}
\label{fig_2x3_cjc}

\end{figure}

\begin{exam}
In Figure~\ref{fig_2x3_cjc}, we show the nonfriendly complex $\Gamma^{NF}(\lambda_{\textsf{M}})$ where $\lambda$ is the $2\times 3$ rectangle. 
\end{exam}

We will need the following lemma for the next section.

\begin{lemma}\label{first_fr_lemma}
Given $t, s_1\circ \cdots \circ s_k \in \Seg (\lambda_{\M})$, assume that $s_1\circ \cdots \circ s_k \subseteq t$ and $s_1\circ \cdots \circ s_k$ and $t$ are friendly. Then there exists $i \in \{1, \ldots, k\}$ such that $s_i$ and $t$ are friendly.
\end{lemma}
\begin{proof}
We prove the statement by induction on $k$. If $k = 1$, then the statement holds. Now, assume that the statement holds for $t$ and any segment $s^\prime_{1}\circ \cdots \circ s^\prime_{k^\prime} \in \Seg (\lambda_{\M})$ satisfying $s^\prime_1 \circ \cdots \circ s^\prime_{k^\prime} \subseteq t$ and $k^\prime < k$. 

If $s_1$ and $t$ have the same initial vertex, then $s_1$ and $t$ are friendly along $s_1$. Similarly, if $s_k$ and $t$ have the same terminal vertex, then $s_k$ and $t$ are friendly along $s_k$. Therefore, we can assume that $s_1$ and $t$ do not have the same initial vertex and that $s_k$ and $t$ do not have the same terminal vertex. In addition, we can assume that $s_1$ and $t$ are not friendly, otherwise the statement holds.

We now have that the initial vertex of $s_1$ is either immediately South or immediately East of a vertex of $t$. Since $s_1\circ \cdots \circ s_k$ and $t$ are friendly, we know $s_1 \circ \cdots \circ s_k \in \SW(t)$ or $s_1 \circ \cdots \circ s_k \in \NE(t)$. In the former case, the initial vertex of $s_1$ is immediately South of a vertex of $t$ and the terminal vertex of $s_k$ is immediately West of a vertex of $t$. As $s_1$ and $t$ are not friendly, we know that the initial vertex of $s_2$ is immediately South of a vertex of $t$.

We obtain that $s_2\circ \cdots \circ s_k \in \SW(t)$, so $t$ and $s_2\circ \cdots \circ s_k$ are friendly. By induction, there exists $i \in \{2, \ldots, k\}$ such that $s_i$ and $t$ are friendly. The case where the initial vertex of $s_1$ is immediately East of a vertex of $t$ is analogous.
\end{proof}

A lazy segment $s$ in a set $S \subseteq \Seg(\lambda_{\textsf{M}})$ of segments is \emph{isolated} if it is not a subsegment of any other segment in $S$. Let $\epsilon(S)$ be the set of isolated lazy segments in $S$. We define the \emph{H-triangle} to be the polynomial
\[
H(x,y)=\sum_{F\in\Gamma^{NF}(\lambda_{\textsf{M}})}x^{|F|}y^{|\epsilon(F)|}.
\]

\begin{exam}
When $\lambda$ is the $2\times 3$ rectangle shape, the $H$-triangle is as follows: \[H(x,y) = 1 + x + 2xy + x^2y^2.\]
\end{exam}

\begin{rema}\label{rem_NF_link}
Let $\M$ and $\M^{\pr}$ be two sets of marked vertices of a shape $\lambda$, and suppose $\M\subseteq\M^{\pr}$. Contrary to the nonkissing complex, the nonfriendly complex of $\lambda_{\M^{\pr}}$ is typically not isomorphic to the link of a face of the nonfriendly complex of $\lambda_{\M}$. On the other hand, there is a correspondence between faces of $\Gamma^{NF}(\lambda_{\M^{\pr}})$ and faces of $\Gamma^{NF}(\lambda_{\M})$ with isolated lazy segments at each element of $\M^{\pr}\setm\M$.
\end{rema}


In Section~\ref{subsec_gt_joinreps}, we will give a bijection between the facets of $\widetilde{\Delta}^{NK}(\lambda_{\M})$ and the faces of $\Gamma^{NF}(\lambda_{\M})$. This bijection is \emph{canonical} given a lattice structure that we impose on the facets of the nonkissing complex in Section~\ref{subsec_GT_order}.



\subsection{Wide sets of segments}\label{subsec_transitive} Throughout this section, we fix a marked shape $\lambda_{\textsf{M}}$.

We say a subset $T$ of $\Seg(\lambda_{\textsf{M}})$ is \emph{wide} if all of the following conditions hold:
\begin{enumerate}[label=(\alph*)]
\item\label{sec3.4_a} %[a)] 
For all triples $s,t,u \in \Seg(\lambda_{\textsf{M}})$ with $s\circ t=u$, we have $|T\cap\{s,t,u\}|\neq 2$.
\item\label{sec3.4_b} %[b)] 
If $s,t\in T$ and $s$ and $t$ are friendly along $u$, then $u\in T$.
\item\label{sec3.4_c} %[c)] 
If $s=s_1\circ s_2\circ s_3$ where $s,s_2\in T$ and $s_2\in \SW(s)$ or $s_2\in \NE(s)$, then $s_1,s_3\in T$.
\end{enumerate}
The segments $s_1$ and $s_3$ in the third condition are allowed to be empty segments. 



A subset $T$ of $\Seg (\lambda_{\textsf{M}})$ is \emph{closed} if whenever $s,t\in T$ and $s\circ t \in \Seg (\lambda_{\textsf{M}}),$ then $s\circ t\in T$. We define the \emph{closure} of $T$, denoted $\overline{T}$, to be the smallest closed subset of $\Seg (\lambda_{\textsf{M}})$ that contains $T$. Equivalently, the closure $\ov{T}$ is the set of all possible concatenations of segments in $T$. 

Now let $T$ be any wide set. We let $\NF(T)$ be the set of all $s\in T$ such that \[\SW(s)\cap T=\{s\}=\NE(s)\cap T.\] Observe that the first property of wide sets shows that $T$ is closed. This implies that $\overline{\NF(T)} \subseteq T.$



\begin{prop}\label{prop_nonfriendly_transitive}
If $X$ is a nonfriendly set of segments, then $\ov{X}$ is a wide set such that $X=\NF(\ov{X})$. Conversely, if $T$ is a wide set, then $\NF(T)$ is nonfriendly and $T=\ov{\NF(T)}$. Consequently, nonfriendly sets of segments are in bijection with wide sets of segments.
\end{prop}

\begin{proof}

Let $X$ be a nonfriendly set of segments, and put $T=\ov{X}$. We claim that $T$ is wide. 

\ref{sec3.4_a}~Let $s,t,u\in \Seg (\lambda_{\textsf{M}})$ such that $u=s\circ t$. If $s,t\in T$, then $u\in T$ since $T$ is closed. To complete the proof of a), we can assume without loss of generality that $s,u\in T$. Let $u=s_{1}\circ\cdots\circ s_{m}$ for some $s_{1},\ldots,s_{m}\in X$. Let $s=s_{j_1}\circ\cdots\circ s_{j_k}$ for some $s_{j_1},\ldots,s_{j_k}\in X$. Then $s_{1}\subseteq s_{j_1}$ or $s_{j_1}\subseteq s_{1}$ holds. If $s_{1}\neq s_{j_1}$, then these segments are friendly, a contradiction. Similarly, we have $s_{2}=s_{j_2}$, $s_{3}=s_{j_3}$, etc. Hence, $t=s_{{k+1}}\circ\cdots\circ s_{m}\in T$, as desired.

\ref{sec3.4_c}~Let $s=t_1\circ t_2\circ t_3$ such that $s,t_2\in T$ and either $t_2\in \SW(s)$ or $t_2\in \NE(s)$. We show that $t_1,t_3\in T$. Without loss of generality, we may assume that $t_2$ is in $\SW(s)$. Since $t_2$ is in $T$, there exist $u_1,\ldots,u_l\in X$ such that $t_2=u_1\circ\cdots\circ u_l$. Some factor, say $u_i$, is in $\SW(t_2)$, which implies $u_i\in \SW(s)$. Let $s_1,\ldots,s_m\in X$ be segments satisfying $s=s_1\circ\cdots\circ s_m$, and assume $u_i \subseteq s_j \circ \cdots \circ s_\ell$ where $u_i \not \subseteq s_{j+1} \circ \cdots \circ s_\ell$ and $u_i \not \subseteq s_j \circ \cdots \circ s_{\ell-1}$.

We claim that $u_i = s_{j^\prime}$ where $s_{j^\prime} \in \{s_j,\ldots, s_\ell\}$. If $j = \ell$, then $u_i \in \SW(s_j)\cap \NE(u_i)$. Thus $u_i = s_j$, otherwise the two are friendly.

If $j < \ell$, then $u_i$ and $s_{j+1}\circ \cdots \circ s_{\ell}$ are friendly, otherwise $u_i$ and $s_j$ are friendly. If $j+1 = \ell$, then $u_i \cap s_\ell \in \NE(u_i)\cap \SW(s_\ell)$. Therefore, $u_i = s_\ell$, otherwise the two are friendly. We now have that $j+1 < \ell$. Since $u_i$ and $s_\ell$ are not friendly, we obtain that $u_i$ and $s_{j+1}\circ \cdots \circ s_{\ell-1}$ are friendly and $s_{j+1}\circ \cdots \circ s_{\ell-1} \subseteq u_i$. If $u_i \not \in \{s_{j+1}, \ldots, s_{\ell-1}\}$, then, by Lemma~\ref{first_fr_lemma}, $u_i$ is friendly with one of these segments. This is a contradiction.




We now have $s_1\circ\cdots\circ s_{j^\prime-1}=t_1\circ(u_1\circ\cdots\circ u_{i-1})$ and $s_{j^\prime+1}\circ\cdots\circ s_m=(u_{i+1}\circ\cdots\circ u_l)\circ t_3$. Since $T$ satisfies property a), these two equations imply that $t_1\in T$ and $t_3\in T$.



\ref{sec3.4_b}~Now let $s,t\in T$ such that $s$ and $t$ are friendly along a common subsegment $u$. We prove that $u\in T$ by induction on the sum of the lengths of $s$ and $t$. Since $s$ and $t$ are friendly, we can assume that at least one of them is not a lazy segment of $T$. Suppose $t$ is not a lazy segment. Then $t=t_1\circ t_2$ for some $t_1,t_2\in T$. 

If $u\subseteq t_i$ for some $i\in\{1,2\}$, then $t_i$ and $s$ are friendly along $u$. In this case, that $u\in T$ follows by induction. 

We reduce to the case that $u=u_1\circ u_2$ where $u_i \subseteq t_i$ for $i \in \{1,2\}$, $t_1$ and $u_1$ have the same terminal vertex, and $t_2$ and $u_2$ have the same initial vertex. We now have that $t_1$ is friendly with $s$ along $u_1$ or $t_2$ is friendly with $s$ along $u_2$. Without loss of generality, we assume that $t_2$ is friendly with $s$ along $u_2$, so $u_2\in T$ by induction. Let $s=s^{\pr}\circ u_2\circ s^{\pr\pr}$, where $s^{\pr\pr}$ may be empty. Note that $u_2 \in \SW(s)$ or $u_2 \in \NE(s)$. As $T$ satisfies property c), we have that $s^{\pr}\in T$. Since $s^{\pr}$ and $t_1$ are friendly along $u_1$, we have $u_1\in T$ by induction. Since $T$ is closed, this means $u=u_1\circ u_2\in T$.

We now show that $X = \NF(\overline{X})$. First, assume that $s \in \NF(\overline{X})$. Since $\NF(\overline{X}) \subseteq \overline{X}$, it is enough to show that $s \not \in \overline{X}$. To do so, suppose $s = s_1\circ s_2$ where $s_1, s_2 \in \overline{X}$ are nonempty segments. Either $s_1 \in \NE(s)$ or $s_1 \in \SW(s)$. Without loss of generality, suppose the former is true. Then $s_1,s \in \NE(s)\cap \overline{X}$, which contradicts that $s \in \NF(\overline{X})$. We obtain that $s \in X$.

Next, assume that $s \in X$. Suppose $s \not \in \NF(\overline{X})$. Then $\SW(s)\cap \overline{X} \neq \{s\}$ or $\NE(s)\cap \overline{X} \neq \{s\}$. Without loss of generality, assume that there exists a segment $t \in \SW(s)\cap \overline{X}$ that is distinct from $s$. Since $t \in \overline{X}$, write $t = t_1\circ \cdots \circ t_k$ where $t_i \in X$ for each $i \in \{1,\ldots, k\}$. Observe that there exists $i \in \{1,\ldots, k\}$ such that $t_i \in \SW(s)$. Therefore, $t_i \in \SW(s)\cap \NE(t_i)$. This implies that $s$ and $t_i$ are friendly along $t_i$, a contradiction.


Conversely, suppose that $T$ is a wide set. To see that $\NF(T)$ is a nonfriendly set, let $s_1, s_2 \in \NF(T)$ be distinct segments, and suppose they are friendly along $u$. Up to reversing the roles of $s_1$ and $s_2$, this means $u \in \SW(s_1)$ and $u \in \NE(s_2)$. Now since $T$ is wide, $u \in T$. We obtain $u, s_1 \in \SW(s_1) \cap T$ and $u, s_2 \in \NE(s_2)\cap T$. As $u$ is a proper subsegment of at least one of $s_1$ and $s_2$, this contradicts that both $s_1$ and $s_2$ belong to $\NF(T)$.

Next, we show that $T = \overline{{\NF}(T)}$. We have already established that $\overline{\NF(T)} \subseteq T$ so it remains to show that $T \subseteq \overline{\NF(T)}$. Suppose $t \in T$. If $t \in \NF(T)$, we are done. So assume that $t \not \in \NF(T)$. We prove that $t \in \overline{\NF(T)}$ under the assumption that all segments $s \in T$ whose length is strictly less than that of $t$ belong to $\overline{\NF(T)}$. Now, without loss of generality, there exists $s \in \SW(t) \cap T$ where $s \neq t$ and either $t = s_1 \circ s \circ s_2$, $t = s_1 \circ s$, or $t = s\circ s_2$ for some nonempty segments $s_1, s_2 \in \Seg (\lambda_{\textsf{M}})$. By induction, $s \in \overline{\NF(T)}$.


Consider the case where $t = s_1\circ s \circ s_2$. Note that $s, t \in T$ and $s \in \SW(t)$. Since $T$ is wide, we have that $s_1, s_2 \in T$. By induction, this implies that $s_1, s_2 \in \overline{\NF(T)}.$ Thus $t = s_1\circ s \circ s_2 \in \overline{\NF(T)}.$

Now consider the case where $t = s_1\circ s$. As $T$ is wide, we know that $|T\cap \{s, s_1, t\}| \neq 2$. We also have that $s, t \in T$ so $s_1 \in T$. By induction, this implies that $s_1 \in \overline{\NF(T)}$. Thus $t = s_1\circ s \in \overline{\NF(T)}.$ The case where $t = s \circ s_2$ is argued similarly.\end{proof}


Let $\Psi(\lambda_{\M})$ be the poset of wide sets of segments of $\lambda_{\M}$, ordered by inclusion.

\begin{theorem}\label{thm_wide_set_graded}
 The poset $\Psi(\lambda_{\M})$ is graded. The rank of a wide set $T$ is $|\NF(T)|$.
\end{theorem}

\begin{proof}
 Let $T,U$ be wide sets on $\lambda_{\M}$ such that $T\subsetneq U$ holds. We show that there exists $T^{\pr}\in[T,U]$ such that $|\NF(T^{\pr})|=|\NF(T)|+1$. We prove this holds by induction on $|\NF(U)|$.

 Among the elements of $\NF(U)$, choose a segment $s$ whose initial vertex $\textsf{v}$ is as far Northwest as possible. Then any other segment $t\in U$ that contains $\textsf{v}$ must be friendly with $s$ along an initial subsegment of $s$. Since $U$ is a wide set, this initial subsegment must belong to $U$. By the definition of $\NF(U)$, this forces $s$ to be a subsegment of $t$. If $s$ is a proper initial subsegment of $t$, we let $t\setm s \in U$ be the segment such that $t = s\circ (t\setm s)$.

 We first assume $s\notin T$. If $s$ is not contained in any element of $\NF(T)$, then $\NF(T)\cup\{s\}$ is a nonfriendly set of size $|\NF(T)|+1$. Otherwise, there is a unique segment $t_1\in\NF(T)$ such that $s$ is properly contained in $t_1$ and $t_1\setm s \in U$. Consider the set $X_1=\NF(T)\setm\{t_1\}\cup\{s, t_1\backslash s\}$. Then $s$ is nonfriendly with every other element of $X_1$. 
 

 
 Suppose $t_1\backslash s$ is friendly with some $t_2\in\NF(T)\backslash\{t_1\}$
 along a common maximal subsegment $u_1$. If no such segment $t_2$ exists, then $T^\prime := \overline{X_1} \in [T,U]$ is the desired wide set. Up to transposition
 symmetry, we may assume $u_1\in \SW(t_1\backslash s)$ and $u_1\in \NE(t_2)$. Since $t_1$ and $t_2$ are nonfriendly, $u_1\notin \SW(t_1)$.
 Hence, $u_1$ must be an initial subsegment of $t_1\backslash s$ and $s\in \SW(t_1)$.
 Consequently, the terminal vertex of $s$ is immediately West of the initial vertex of $u_1$. We claim that $u_1$ is an initial subsegment of $t_2$.
 



 If $u_1$ is not an initial subsegment of $t_2$, then $t_2$ contains the terminal vertex of $s$, so it meets $s$ at a maximal subsegment $u_1^{\pr}$ that is terminal in $s$. If $u_1^{\pr} \in \NE(s)$, then $u_1^{\pr}$ must be in $\SW(t_2)$, which contradicts the assumption that $t_2$ and $s$ are nonfriendly. Thus, we have $u_1^{\pr}\circ u_1\in \NE(t_2)$ and $u_1^{\pr} \in \SW(s)$.
 But this means $u_1^{\pr}\circ u_1\in \SW(t_1)$ so $t_1$ and $t_2$ are friendly, a contradiction.

 Suppose there exists $t_3 \in \NF(T)\backslash\{t_1,t_2\}$ that is friendly with $t_1\backslash{s}$ along some segment $v$. By the above argument, $v$ is an initial subsegment of $t_3$ and of $t_1\backslash s$. Therefore, $t_2$ and $t_3$ have a common initial subsegment, so they are friendly. This is a contradiction. Thus, $t_2$ is the unique element of $\NF(T)\backslash\{t_1\}$ that is friendly with $t_1\backslash s$.
 

 
 Now, define
 \[
 X_2 := \begin{cases}
 \NF(T)\backslash\{t_1\} \cup \{s\circ u_1, t_1\backslash (s\circ u_1)\} & \text{if $u_1$ is a proper subsegment of $t_1\backslash s$} \\ & \text{and $t_2$}, \\ \NF(T)\backslash\{t_1\}\cup \{s, t_1\backslash (s\circ u_1)\} & \text{if $u_1 = t_2$}, \\ \NF(T)\backslash\{t_1,t_2\} \cup \{s,t_1\backslash s, t_2\backslash u_1\}& \text{if $u_1 = t_1\backslash s$}. \end{cases}
 \]
Without of loss of generality, we assume that $u_1$ is a proper subsegment of $t_1\backslash s$ and $t_2$; the argument is similar in the other cases.




It is clear that $s\circ u_1$ is nonfriendly with all other elements of $X_2$, and $t_1\backslash(s\circ u_1)$ is nonfriendly with $t_2$. If $t_1\backslash(s\circ u_1)$ is nonfriendly with all other elements of $X_2$, then $T^\prime := \overline{X_2} \in [T,U]$ is the desired wide set. If not, repeating the arguments above show that there is a unique segment $t_3 \in \NF(T)\backslash\{t_1,t_2\}$ that is friendly with $t_1\backslash(s\circ u_1)$. Furthermore, these segments are friendly along a common maximal subsegment $u_2$ that is initial both. Therefore, we define 
 \[
 X_3 := \begin{cases}\NF(T)\backslash\{t_1\} \cup \{s\circ u_1\circ u_2, t_1\backslash (s\circ u_1\circ u_2)\} & \text{if $u_2$ is a proper subsegment of}\\ & \text{$t_1\backslash(s\circ u_1)$ and $t_3$}, \\ \NF(T)\backslash\{t_1\}\cup \{s, t_1\backslash(s\circ u_1 \circ u_2)\} & \text{if $u_2 = t_3$}, \\ \NF(T)\backslash\{t_1,t_3\} \cup \{s, t_1\backslash(s\circ u_1), t_3\backslash u_2\}& \text{if $u_2 = t_1\backslash(s\circ u_1)$}. \end{cases}
 \]


 By continuing this process, we will produce a nonfriendly set $X$. Therefore, $T^{\pr} := \ov{X}$ is a wide set with $T^{\pr}\in[T,U]$ and $|\NF(T^{\pr})|=|X|=|\NF(T)|+1$, as desired.

 Now consider the case where $s\in T$. As $s\in\NF(U)$, we have
 \[ \SW(s)\cap U=\{s\}=\NE(s)\cap U. \]
 By intersecting with $T$ instead, it follows that $s\in\NF(T)$. Consider $Y=\NF(T)\setm\{s\}$ and $Z=\NF(U)\setm\{s\}$. It is clear that $\ov{Y}\subsetneq\ov{Z}$ is a proper inclusion of wide sets. By the induction hypothesis on $|\NF(U)|$, there exists $T^{\pr\pr}\in[\ov{Y},\ov{Z}]$ such that $|\NF(T^{\pr\pr})|=|Y|+1$. Let $X=\NF(T^{\pr\pr})\cup\{s\}$. The initial vertex $\textsf{v}$ of $s$ is not contained in any element of $Z$, so $s$ is not friendly with any element of $\ov{Z}$. It follows that $X$ is a nonfriendly set. Setting $T^{\pr}=\ov{X}$, we get $T^{\pr}\in[T,U]$ and $|\NF(T^{\pr})|=|X|=|\NF(T)|+1$, as desired.
\end{proof}



Let $\rk(T)=|\NF(T)|$ be the rank of a wide set $T$ in $\Psi(\lambda_{\M})$. Recall that the \emph{M{\"o}bius function} $\mu$ of a poset $P$ is the unique function on closed intervals of $P$ such that for $a\leq b$ 
\[
\sum_{c:\ a\leq c\leq b}\mu(a,c)=
\begin{cases}1 &\mbox{if }a=b\\0 &\mbox{if }a\neq b.
\end{cases}
\] 
Letting $\mu$ be the M{\"o}bius function on $\Psi(\lambda_{\M})$, we define the \emph{$M$-triangle} to be the polynomial
\[M(x,y)=\sum_{\substack{X,Y\in\Psi(\lambda_{\textsf{M}})\\Y\subseteq X}}\mu(Y,X)x^{\rk(X)}y^{\rk(Y)}.\]

\begin{exam}
An important family of examples of the posets $\Psi(\lambda_\textsf{M})$ are the lattices of noncrossing partitions of the set $[n]$.

{Let $\lambda$ be a $2\times n$ rectangle shape. Then $\lambda$ has the set of segments $\{t_{ij}:\ 1\leq i<j\leq n\}$ where $t_{ij}\subseteq t_{kl}$ exactly when $k\leq i<j\leq l$. In addition, for any $i, j, k \in \{1,\ldots, n\}$ with $i < j < k$ we have that $t_{ik} = t_{ij}\circ t_{jk}$. 

A partition $\Bbf$ of $[n]$ is \emph{noncrossing} in the classical sense if there do not exist two distinct blocks $B_1,B_2\in\Bbf$ and $i,k\in B_1,\ j,l\in B_2$ such that $i<j<k<l$ holds. Given a partition $\Bbf$, we may consider the set $T$ of segments $t_{ij}$ such that $i$ and $j$ are in the same block of $\Bbf$. Then the partition $\Bbf$ is noncrossing if and only if $T$ is wide.}

{In Figure~\ref{fig_2x3_psi}, we show the lattice $\Psi(\lambda)$ when $n = 3$. In this case, the $M$-triangle is as follows: 
\[ 
M(x,y) = 1 + 3xy + x^2y^2 - 3x - 3x^2y + 2x^2.
\]}%
\end{exam}


\begin{figure}[htb]
\includegraphics[scale=1.2]{Figures/2x3_psi.pdf}

\caption{{The lattice $\Psi(\lambda)$ where $\lambda$ is a $2\times 3$ rectangle.}}
\label{fig_2x3_psi}
\end{figure}




\section{Lattice theory of the Grid--Tamari order}\label{sec_tamari}



{In this section, we consider a partial ordering called the Grid--Tamari order on the facets of the nonkissing complex. This poset is known to be a lattice with very good properties. We will use these lattice properties to reinterpret some of the objects introduced in Section~\ref{sec_nonkissing}.}


\subsection{Lattices}\label{subsec_gt_lattice}

We give some background on lattice theory with a view toward our combinatorial applications. The key definitions are the canonical join complex of a semidistributive lattice and the core label order of a congruence-uniform lattice. Throughout this section, we let $(P, \le)$ denote a finite poset.

Given a poset $(P,\leq)$, its \emph{dual} has the same underlying set, but has the opposite order relations. Many lattice properties come in dual pairs. An \emph{order ideal} $X$ of a poset $P$ is a subset of $P$ such that if $x\leq y$ and $y\in X$ then $x\in X$. 


Given $x,y\in P$ the \emph{join} $x\vee y$ is the least upper bound of $\{x,y\}$ if it exists. Dually, the \emph{meet} $x\wedge y$ is the greatest lower bound of $\{x,y\}$ if it exists. The poset is a \emph{lattice} if the join and meet of any two elements are defined. An element $j$ of a lattice $L$ is \emph{join-irreducible} if for $x,y\in L$ such that $j=x\vee y$, either $j=x$ or $j=y$. If $L$ is finite, $j$ is join-irreducible exactly when it covers a unique element, which we call $j_*$. A \emph{meet-irreducible} element $m$ is defined dually and is covered by a unique element $m^*$. We let $\JI(L)$ and $\MI(L)$ denote the sets of join-irreducible and meet-irreducible elements of $L$, respectively.

A \emph{join-representation} for an element $x$ is an identity of the form $x=\bigvee A$ for some set of elements $A$. To simplify the language, we say that $A$ is a join-representation of $x$ if $x=\bigvee A$. A {join-representation} $A$ is \emph{irredundant} if $x>\bigvee B$ for all proper subsets $B\subsetneq A$. We observe that an element $x$ is \emph{join-irreducible} if and only if the only irredundant join-representation of $x$ is $\{x\}$. We partially order irredundant join-representations of $x$, where $A\leq B$ means that for all $a\in A$ there exists $b\in B$ with $a\leq b$. If the set of irredundant join-representations of $x$ has a minimum element, this minimum representation is called the \emph{canonical join-representation} of $x$. The elements in a canonical join-representation are necessarily join-irreducible.

A lattice $L$ is \emph{semidistributive} if
\begin{align*}
x\vee z &=y\vee z\ \ \mbox{implies}\ \ x\vee z=(x\wedge y)\vee z\ \ \mbox{and}\\
x\wedge z &= y\wedge z \ \ \mbox{implies}\ \ x\wedge z=(x\vee y)\wedge z 
\end{align*}
for all $x,y,z\in L$. Equivalently~\cite[Theorem 2.24]{freese.jezek.nation:1995free}, a lattice is semidistributive if and only if every element admits a canonical join-representation and a canonical meet-representation, defined dually.

If a set $A$ is a canonical join-representation of some element, then so is any subset of $A$. Hence, the set of canonical join-representations is the set of faces of a simplicial complex, known as the \emph{canonical join complex}. In~\cite{barnard:2016canonical}, it was shown that for any finite semidistributive lattice $L$, the canonical join complex is flag. For example, the faces of the canonical join complex of the lattice of order ideals of a finite poset $P$ is the set of antichains of $P$. The canonical join complex of the weak order of type A is a simplicial complex of noncrossing arc diagrams~\cite{reading:2015noncrossing}. This complex contains the canonical join complex of the Tamari lattice. 





Let $L$ be a semidistributive lattice. If $x=\bigvee A$ is the canonical join-representation of some element $x\in L$, then there is a bijection between lower covers of $x$ and the elements of $A$~\cite{barnard:2016canonical}. Conversely, if $x=\bigwedge B$ is a canonical meet-representation, then the upper covers of $x$ are in bijection with the elements of $B$.



An equivalence relation $\Theta$ on a lattice $L$ is a \emph{lattice congruence} if whenever $x\equiv y\mod\Theta$, we have $x\wedge z\equiv y\wedge z\mod\Theta$ and $x\vee z\equiv y\vee z\mod\Theta$. For $x\in L$, we let $[x]=[x]_{\Theta}$ be the $\Theta$-equivalence class of $x$. The \emph{quotient lattice} $L/\Theta$ where $\Theta$ is a lattice congruence of $L$ is the lattice of $\Theta$-equivalence classes where $[x]\vee[y]=[x\vee y]$ and $[x]\wedge[y]=[x\wedge y]$ for $x,y\in L$. The following characterization of lattice congruences of finite lattices is well-known; see \eg~\cite[Proposition 9-5.2]{reading:2016lattice}.

\begin{lemma}\label{lem_lattice_congruence}
An equivalence relation $\Theta$ on a lattice $L$ is a lattice congruence if and only if
\begin{itemize}
\item the equivalence classes of $\Theta$ are all closed intervals of $L$, and
\item the maps $\pi^{\uparrow}: L \to L$ and $\pi_{\downarrow}: L \to L$ taking an element of $L$ to the largest and smallest elements of its $\Theta$-equivalence class are both order-preserving.
\end{itemize}
\end{lemma}

In particular, if $x$ covers $y$ in $L$, then either $[x]=[y]$ or $[x]$ covers $[y]$ in $L/\Theta$. The following stronger result holds, which we will use to determine the lattice congruences of the Grid--Tamari order.

\begin{lemma}\label{lem_lattice_quotient_cover}~\cite[Proposition 2.2]{reading:lattice_congruence}
Let $L$ be a finite lattice with lattice congruence $\Theta$. If $x$ is the minimum element in its $\Theta$-equivalence class, then for each $y\in L$ covered by $x$, the class $[y]$ is covered by $[x]$ in $L/\Theta$. Furthermore, this is a bijection between lower covers of $x$ and lower covers of $[x]$. Dually, if $x$ is the maximum element in its $\Theta$-equivalence class, then there is a similar bijection between the upper covers of $x$ and the upper covers of $[x]$.
\end{lemma}


Given a lattice $L$, its set of lattice congruences $\Con(L)$ forms a distributive lattice under refinement order. Hence when $L$ is finite, $\Con(L)$ is isomorphic to the lattice of order ideals of $\JI(\Con(L))$. If $y$ covers $x$, we write $\con(x,y)$ for the minimal lattice congruence in which $x\equiv y\ (\con(x,y))$ holds.

For any finite lattice $L$ with lattice congruence $\Theta$, we have
\[\Theta=\bigvee_{\substack{j\in \JI(L)\\ j\equiv j_*\mod\Theta}}\con(j_*,j).\]
Hence, the join-irreducible congruences are always of the form $\con(j_*,j)$ for some $j\in \JI(L)$. A finite lattice $L$ is \emph{congruence-uniform} (or \emph{bounded}) if
\begin{itemize}
\item the map $j\mapsto\con(j_*,j)$ is a bijection from $\JI(L)$ to $\JI(\Con(L))$, and
\item the map $m\mapsto\con(m,m^*)$ is a bijection from $\MI(L)$ to $\MI(\Con(L))$.
\end{itemize}
Alternatively, finite congruence-uniform lattices may be characterized as homomorphic images of free lattices with bounded fibers or as lattices constructible from the one-element lattice by a sequence of interval doublings~\cite{day:congruence}.



For $x\in L$, let $\psi(x)$ be the set
\[\left\{\con(w,z):\ \bigwedge_{i=1}^l y_i\leq w\lessdot z\leq x\right\},\]
where $y_1,\ldots,y_l$ are the elements covered by $x$. The \emph{core label order} $\CLO(L)$ is the collection of sets $\psi(x)$, ordered by inclusion. For a congruence-uniform lattice $L$, the map $x\mapsto\psi(x)$ is a bijection between $L$ and $\CLO(L)$. 
This formulation in lattice-theoretic terms was given by Reading~\cite{reading:2016lattice} and was used in~\cite{garver.mcconville:2016oriented} to give a correspondence between noncrossing tree partitions and some of the partial triangulations of a polygon.



\subsection{The Grid--Tamari order}\label{subsec_GT_order}




If $\Delta$ is a pure simplicial complex, its \emph{dual graph} is the graph whose vertices are the facets of $\Delta$ with edges $\{F,F^{\pr}\}$ whenever $F\cap F^{\pr}$ is a ridge. 
When $F\cap F^{\pr}$ is a ridge, we simply say that $F$ and $F^{\pr}$ are \emph{adjacent} facets. In~\cite{mcconville:2015lattice}, it was shown that one may associate a segment to adjacent facets of the nonkissing complex by using the following lemma.

\begin{lemma}\label{lem_GT_labeling}
 Let $\lambda_{\textsf{M}}$ be a marked shape, and let $F$ and $F^{\pr}$ be adjacent facets of $\Delta^{NK}(\lambda_{\textsf{M}})$. Let $p\in F$ and $q\in F^{\pr}$ such that $F\setm\{p\}=F^{\pr}\setm\{q\}$. Then there is a unique segment $s$ such that $p$ and $q$ kiss along $s$.
\end{lemma}

\begin{proof}
This was proven for unmarked shapes in~\cite[Theorem 3.2.3]{mcconville:2015lattice}. Using Corollary~\ref{passing_to_lambda}, we may identify $F$ and $F^\prime$ with facets of $\Delta^{NK}(\lambda)$. Via this identification, we obtain the desired result by again applying~\cite[Theorem 3.2.3]{mcconville:2015lattice}.
\end{proof}




\begin{defi}
For any two adjacent facets $F,F^{\pr}\in\Delta^{NK}(\lambda_{\textsf{M}})$ with $p,q,s$ defined as in Lemma~\ref{lem_GT_labeling}, we orient the edge $F\ra F^{\pr}$ if $p$ enters $s$ from the West and leaves to the South and $q$ enters $s$ from the North and leaves to the East. We say that $F^{\prime}$ may be obtained from $F$ by a (directed) \emph{flip}.



The \emph{Grid--Tamari order}, denoted $\GT(\lambda_{\textsf{M}})$, is defined as the reflexive, transitive closure of the flip relation on facets of $\Delta^{NK}(\lambda_{\textsf{M}})$. That is, $F\le F^{\prime}$ holds if $F^{\prime}$ may be obtained from $F$ by a sequence of flips.
\end{defi} 


\begin{exam}
In Figure~\ref{walls_ex}, we show the Grid--Tamari order for the $2\times3$ rectangle shape. To simplify the figure, we omit the vertical and horizontal routes from each facet of $\Delta^{NK}(\lambda)$.\end{exam}

\begin{figure}[htb]\centering
\includegraphics[scale=1]{Figures/A2_GT_v3.pdf}

\caption{{The Grid--Tamari order $\GT(\lambda)$ (with the vertical and horizontal routes omitted) where $\lambda$ is a $2\times 3$ rectangle. In $\lambda$, $s_1 = (\textsf{v}_1)$ and $s_2 = (\textsf{v}_2)$. }}
\label{walls_ex}
\end{figure}



In~\cite{mcconville:2015lattice}, $\GT(\lambda)$ was proved to be a lattice by identifying it with a lattice quotient of a different lattice. We will recall the lattice quotient description of $\GT(\lambda)$ and extend it to marked shapes in the following section.


\subsection{Biclosed sets}\label{subsec_gt_biclosed}


Recall from Section~\ref{subsec_transitive} that a collection $X \subseteq \Seg(\lambda_{\M})$ of segments is \emph{closed} if whenever $s,t\in X$ and $s\circ t$ is well-defined then $s\circ t\in X$. We say $X$ is \emph{biclosed} if it is closed and its complement $X^c:=\Seg(\lambda_{\textsf{M}})\setm X$ is closed. The set $\Bic(\lambda_{\textsf{M}})$ of biclosed subsets of $\Seg(\lambda_{\M})$ forms a poset under inclusion. That is, if $X,Y\in\Bic(\lambda_{\textsf{M}})$, we set $X\leq Y$ if $X\subseteq Y$.

In~\cite{mcconville:2015lattice}, the poset $\Bic(\lambda)$ was proved to be a congruence-uniform lattice for an unmarked shape $\lambda$. More precisely, the following was shown.




\begin{theorem}\label{thm_bic_prop}\cite[Theorem 5.2, Theorem 5.5]{mcconville:2015lattice}
The poset of biclosed sets has the following properties. These three properties together imply that $\Bic(\lambda)$ is a congruence-uniform lattice.
\begin{enumerate}
\item The poset $\Bic(\lambda)$ is graded, with rank function $X\mapsto|X|$.
\item\label{thm_bic_prop_2} The poset $\Bic(\lambda)$ is a lattice where
\[
X,Y,W\in\Bic(\lambda),\ W\subseteq X\cap Y\ \ \mbox{implies}\ \ W\cup\ov{(X\cup Y)\setm W}\in\Bic(\lambda).
\]
\item If $u\in\ov{\{s,t\}}\setm\{s,t\}$, then $u=s\circ t$.
\end{enumerate}
\end{theorem}

We note that taking $W=\emptyset$ in~\eqref{thm_bic_prop_2}, we have $\ov{X\cup Y}$ is biclosed whenever $X$ and $Y$ are biclosed. Since $\ov{X\cup Y}$ is the smallest closed set containing both $X$ and $Y$, this set is the join of $X$ and $Y$. 





In order to extend the proof of congruence-uniformity to biclosed sets on marked shapes, we make use of the following lemma.

\begin{lemma}\label{lem_bic_marked}
 Let $\lambda_\textsf{M}$ be any marked shape.
 \begin{enumerate}
 \item\label{lem_bic_marked_1} The inclusion $\Seg(\lambda_{\textsf{M}})\subseteq\Seg(\lambda)$ induces an inclusion of lattices $\Bic(\lambda_{\textsf{M}})\hookra\Bic(\lambda)$. 
 \item\label{lem_bic_marked_2} The map $X\mapsto X\cap\Seg(\lambda_{\textsf{M}})$ from subsets of $\Seg(\lambda)$ to subsets of $\Seg(\lambda_{\textsf{M}})$ induces a lattice quotient map $\Bic(\lambda)\twoheadrightarrow\Bic(\lambda_{\textsf{M}})$.
 \end{enumerate}
\end{lemma}

\begin{proof}
\eqref{lem_bic_marked_1} Let $X$ be a set of segments of $\Seg(\lambda_{\M})$. We claim that $X$ is biclosed as a subset of $\Seg(\lambda_{\textsf{M}})$ if and only if it is biclosed as a subset of $\Seg(\lambda)$. It is clear that if $X$ is in $\Bic(\lambda)$ then $X$ is in $\Bic(\lambda_{\textsf{M}})$ since being biclosed relative to the marked shape $\lambda_{\textsf{M}}$ imposes fewer conditions on $X$.

Suppose $X\in\Bic(\lambda_{\textsf{M}})$, and let $s,t,u\in\Seg(\lambda)$ such that $s\circ t = u$. If $s,t\in X$, then $u$ is in $\Seg(\lambda_{\textsf{M}})$, so $u\in X$ holds. If $u\in X$, then both $s$ and $t$ are in $\Seg(\lambda_{\textsf{M}})$, so $s\in X$ or $t\in X$.

We have shown that the inclusion $\Seg(\lambda_{\textsf{M}})\subseteq\Seg(\lambda)$ induces an inclusion of sets $\Bic(\lambda_{\textsf{M}})\hookra\Bic(\lambda)$. Moreover, the latter inclusion identifies $\Bic(\lambda_{\textsf{M}})$ as a closed interval of $\Bic(\lambda)$, so it inherits the lattice structure from $\Bic(\lambda)$.

\eqref{lem_bic_marked_2} Set $S=\Seg(\lambda_{\textsf{M}})$. We observe that $X\cap S$ is biclosed whenever $X\in\Bic(\lambda)$ by a similar argument as in the proof of~\eqref{lem_bic_marked_1}. So the map $\Bic(\lambda)\ra\Bic(\lambda_{\textsf{M}})$ is well-defined, and its surjectivity follows from~\eqref{lem_bic_marked_1}.

To show that the map preserves joins, we let $X,Y\in\Bic(\lambda)$ and claim that $\ov{(X\cup Y)\cap S}=\ov{X\cup Y}\cap S$ holds. Indeed, the elements of $\ov{(X\cup Y)\cap S}$ are concatenations of segments in $X$ and $Y$ that are each in $\Seg(\lambda_{\textsf{M}})$. On the other hand, the elements of $\ov{X\cup Y}\cap S$ are those segments in $\Seg(\lambda_{\textsf{M}})$ that may be formed by concatenating segments in $X$ and $Y$. But if $s=s_1\circ\cdots\circ s_k$, then $s\in\Seg(\lambda_{\textsf{M}})$ if and only if $s_i\in\Seg(\lambda_{\textsf{M}})$ for all $i$. Hence, the claim is established, and we have
\begin{align*}
 (X\cap S)\vee(Y\cap S) &= \ov{(X\cap S)\cup(Y\cap S)}\\
 &= \ov{(X\cup Y)\cap S}\\
 &= \ov{X\cup Y}\cap S\\
 &= (X\vee Y)\cap S.
\end{align*}

As complementation commutes with the map $\Bic(\lambda)\twoheadrightarrow\Bic(\lambda_{\textsf{M}})$, we deduce that meets are preserved as well.
\end{proof}

\begin{coro}\label{latt_str_marked_bic}
{Let $\lambda_{\M}$ be any marked shape. Then $\Bic(\lambda_{\M})$ is a congruence-uniform lattice with the following properties.}
\begin{enumerate}
\item The poset $\Bic(\lambda_{\M})$ is graded, with rank function $X \mapsto |X|$.
\item\label{latt_str_marked_bic_2} For any $X,Y \in \Bic(\lambda_{\M})$, one has $X\vee Y = \overline{X \cup Y}$.
\item\label{latt_str_marked_bic_3} For any $X,Y \in \Bic(\lambda_{\M})$, one has $X \wedge Y = (X^c\vee Y^c)^c$.
\end{enumerate}
\end{coro}
\begin{proof}
That $\Bic(\lambda_{\M})$ is congruence-uniform follows from Theorem~\ref{thm_bic_prop} and from Lemma~\ref{lem_bic_marked}~\eqref{lem_bic_marked_2}. That $\Bic(\lambda_{\M})$ is graded with the given rank function Theorem~\ref{thm_bic_prop} and Lemma~\ref{lem_bic_marked}~\eqref{lem_bic_marked_1}. Property~\eqref{latt_str_marked_bic_2} is a consequence of the discussion following Theorem~\ref{thm_bic_prop} and Lemma~\ref{lem_bic_marked}~\eqref{lem_bic_marked_1}.

It remains to prove property~\eqref{latt_str_marked_bic_3}. Assume that $s \in X^c\vee Y^c$. We prove that $s \in (X\wedge Y)^c$ under the assumption that all segments $s^\prime \in X^c\vee Y^c$ with strictly smaller length than $s$ belong to $(X\wedge Y)^c$. Now write $s = s_1\circ \cdots \circ s_k$ for some segments $s_i \in X^c\cup Y^c$. If $k = 1$, then $s \in X^c \cup Y^c$. Therefore, $s \in (X \cap Y)^c$ so $s \in (X\wedge Y)^c$.

Suppose $k \ge 2$. By induction, $s_1, s_2\circ \cdots \circ s_k \in (X\wedge Y)^c$. Since $(X\wedge Y)^c$ is closed, we have that $s \in (X\wedge Y)^c$. We obtain that $X\wedge Y \subseteq (X^c \vee Y^c)^c$.



To prove the opposite inclusion, observe that 
\[
X \wedge Y = \displaystyle \bigvee_{\substack{Z \in \Bic (\lambda_{\M})\\ Z \subseteq X, Z\subseteq Y}} Z.
\] Now notice that if $s \in (X^c \vee Y^c)^c$, then $s \not \in X^c$ and $s \not \in Y^c$. This implies that $s \in X$ and $s \in Y$. Thus $(X^c \vee Y^c)^c \subseteq X$ and $(X^c \vee Y^c)^c \subseteq Y$. Since $(X^c \vee Y^c)^c \in \Bic (\lambda_{\M})$, it follows that $(X^c \vee Y^c)^c$ is a joinand in the join-representation of $X \wedge Y$ shown above. We obtain that $(X^c \vee Y^c)^c \subseteq X \wedge Y$.
\end{proof}


In~\cite[Section 8]{mcconville:2015lattice}, the Grid--Tamari order $\GT(\lambda)$ was shown to be isomorphic to both a quotient lattice and a sublattice of $\Bic(\lambda)$. We recall the quotient lattice and sublattice maps below in order to extend them to marked shapes.

We recall the definition of the map $\eta$ from $\Bic(\lambda)$ to $\GT(\lambda)$ as follows. If $X \subseteq \Seg(\lambda)$ is a set of segments, let $\widehat{\eta}(X)$ be the set of routes
\[\widehat{\eta}(X)=\{p_e:\ e \mbox{ is a vertical edge of }\lambda\}\]
where $p_e=(\textsf{v}_0,\ldots, \textsf{v}_l)$ is the unique route such that $e=(\textsf{v}_{j-1}, \textsf{v}_j)$ for some $j$, and the following two conditions hold.
\begin{itemize}
\item For $1\leq i\leq j-1$, the vertex $\textsf{v}_{i-1}$ is North of $\textsf{v}_i$ if $p_e[\textsf{v}_i,\textsf{v}_{j-1}] := (\textsf{v}_i,\ldots, \textsf{v}_{j-1})\in X$ and $\textsf{v}_{i-1}$ is West of $\textsf{v}_i$ if $(\textsf{v}_i,\ldots, \textsf{v}_{j-1})\notin X$.
\item For $j\leq k<l$, the vertex $\textsf{v}_{k+1}$ is East of $\textsf{v}_k$ if $p_e[\textsf{v}_j, \textsf{v}_k] := (\textsf{v}_j,\ldots, \textsf{v}_k)\in X$ and $\textsf{v}_{k+1}$ is South of $\textsf{v}_k$ if $(\textsf{v}_j,\ldots, \textsf{v}_k)\notin X$.
\end{itemize}

The set $\widehat{\eta}(X)$ does not contain any horizontal routes, though it may contain some vertical routes. Define $\eta(X)$ to be the subset of all non-vertical routes of $\widehat{\eta}(X)$.

\begin{theorem}[{\cite[Section 8]{mcconville:2015lattice}}]
If $X$ is biclosed, then the set $\eta(X)$ is a facet of $\wtil{\Delta}^{NK}(\lambda)$. Furthermore, $\eta:\Bic(\lambda)\ra\GT(\lambda)$ is a surjective lattice map.
\end{theorem}


\begin{lemma}[{\cite[Claim 8.2]{mcconville:2015lattice}}]\label{lem_AK}
Let $X\in\Bic(\lambda)$. For $p\in\eta(X)$, we have $\SW(p)\subseteq X$ and $\NE(p)\cap X=\emptyset$.
\end{lemma}




Let $\Theta$ be the equivalence relation on biclosed sets where $X\equiv Y\mod\Theta$ if $\eta(X)=\eta(Y)$. Since $\eta$ is a lattice map, $\Theta$ is a lattice congruence. For $X\in\Bic(\lambda)$, the minimum biclosed set $\Theta$-equivalent to $X$ is the set
\[X^{\downarrow}=\{s\in X:\ \SW(s)\subseteq X\},\]
where $\SW(s)$ is the set of SW-subsegments of $s$ defined in Section~\ref{subsec_comb_paths_segments}; see~\cite[Claim 8.9]{mcconville:2015lattice}. Using~\cite[Claim 7.4]{mcconville:2015lattice}, it follows that the maximum biclosed set $\Theta$-equivalent to $X$ is
\[X^{\uparrow}=\{s\in\Seg(\lambda):\ \NE(s)\cap X\neq\emptyset\}.\]

Let $\phi:\GT(\lambda)\ra\Bic(\lambda)$ be the function where $\phi(F)=\bigvee_{p\in F}\SW(p)$. As $\SW(p)$ is minimal in its $\Theta$-equivalence class, so is the join of any set of elements of the form $\SW(p)$. It was proved in~\cite[Section 8]{mcconville:2015lattice} that $\phi$ is an embedding of the poset $\GT(\lambda)$ in $\Bic(\lambda)$. Hence, $\phi$ identifies $\GT(\lambda)$ with a join-subsemilattice of $\Bic(\lambda)$. We claim that this map also preserves meets, so it is a sublattice map. We prove the following equivalent lemma.

\begin{lemma}\label{lem_sublattice}
If $X$ and $Y$ are $\Theta$-minimal biclosed sets of segments, then so is $X\wedge Y$.
\end{lemma}

\begin{proof}
Let $\Theta^{\tr}$ be the congruence on $\Bic(\lambda^{\tr})$ induced by the map $\eta:\Bic(\lambda^{\tr})\ra\GT(\lambda^{\tr})$ ({see Section~\ref{subsec_comb_paths_segments}}). Via the natural bijection on segments $\Seg(\lambda)\ra\Seg(\lambda^{\tr})$, the complement of a $\Theta$-minimal set $X$ in $\Bic(\lambda)$ is a $\Theta^{\tr}$-maximal element of $\Bic(\lambda^{\tr})$.

Let $X,Y$ be $\Theta$-minimal elements of $\Bic(\lambda)$, and let $X^{\pr}=\Seg(\lambda^{\tr})\setm X^{\tr},\ Y^{\pr}=\Seg(\lambda^{\tr})\setm Y^{\tr}$. Then $X^{\pr}$ and $Y^{\pr}$ are $\Theta^{\tr}$-maximal elements. The join $X^{\pr}\vee Y^{\pr}$ is equal to $\ov{X^{\pr}\cup Y^{\pr}}$. We claim that this set is $\Theta^{\tr}$-maximal. Let $s,t\in\Seg(\lambda^{\tr})$ such that $t\in \NE(s)$ and $t\in\ov{X^{\pr}\cup Y^{\pr}}$. Then $t=t_1\circ\cdots\circ t_l$ where each $t_i$ is in $X^{\pr}\cup Y^{\pr}$. Then $t_i\in \NE(t)$ for some $i$, which means $t_i\in \NE(s)$. Since $t_i$ is in $X^{\pr}$ or $Y^{\pr}$ and both sets are $\Theta^{\tr}$-maximal, we have $s\in X^{\pr}\cup Y^{\pr}$. Consequently, the join of $X^{\pr}$ and $Y^{\pr}$ is $\Theta^{\tr}$-maximal, so the meet of $X$ and $Y$ is $\Theta$-minimal.
\end{proof}


\begin{prop}\label{sub_quot_phi_eta}
The lattice $\GT(\lambda)$ is both a sublattice and a quotient lattice of $\Bic(\lambda)$. Moreover, given any facet ${F} \in \GT(\lambda)$ and any biclosed set $X \in \Bic(\lambda)$, one has $\eta\circ \phi(F) = F$ and $\phi\circ \eta(X) = X^{\downarrow}.$
\end{prop}

The first sentence of the proposition is a consequence of Proposition~\ref{lem_sublattice} and~\cite[Theorem 8.12]{mcconville:2015lattice}. The remaining assertions follow from~\cite[Claim 8.7, 8.8]{mcconville:2015lattice}.


In order to extend the definition of the lattice maps $\eta$ and $\phi$ to cover marked shapes, we need to understand how the lattices and their maps change under restriction. We begin with the following proposition, which gives a way to identify $\GT(\lambda_{\textsf{M}})$ as an interval of $\GT(\lambda)$. For a face $F$ of $\Delta^{NK}(\lambda)$, let $\stars(F)$ be the set of facets containing~$F$.



Before presenting the proof of Proposition~\ref{prop_fan_poset_star}, we need to define a partial order on nonkissing routes of $\lambda_{\M}$ that contain an edge $e$ of $\lambda_{\M}$. Fix an edge $e$ of $\lambda_{\M}$, and let $p_1$ and $p_2$ be distinct nonkissing routes of $\lambda_{\M}$ that contain $e$. The two routes agree on some maximal common subpath $p_1[\textsf{v},\textsf{v}^\prime] = (\textsf{v}, \ldots, \textsf{v}^\prime)$ containing $e$ where $\textsf{v}$ or $\textsf{v}^\prime$ is an interior vertex; the sequence $p_1[\textsf{v},\textsf{v}^\prime]$ might not be a segment. 

We write $p_2 \prec_e p_1$ if $p_2$ enters $\textsf{v}$ from the North or $p_2$ leaves $\textsf{v}^\prime$ to the South, or both. Given a face $F \in \widetilde{\Delta}^{NK}(\lambda),$ we say the maximal route (resp., minimal route) in $F$ with respect to $\prec_e$ is the \emph{top route} (resp., \emph{bottom route}) at $e$. This partial order was originally defined for unmarked shapes in~\cite{mcconville:2015lattice}.


\begin{prop}\label{prop_fan_poset_star}
For $F\in\wtil{\Delta}^{NK}(\lambda)$, the set $\stars(F)$ is a closed interval of $\GT(\lambda)$.
\end{prop}

\begin{proof}
Let $F$ be a face of $\wtil{\Delta}^{NK}(\lambda)$. 
We claim that $\stars(F)$ is a closed interval of $\GT(\lambda)$. Since $\wtil{\Delta}^{NK}(\lambda)$ is a flag complex,
\[\stars(F)=\bigcap_{p\in F}\stars(\{p\}).\]
In a finite lattice, the intersection of a collection of closed intervals is itself a closed interval. Hence, it suffices to show that $\stars(\{p\})$ is an interval.

Let $\SW(p)$ and $\NE(p)$ be the collections of SW-subsegments and NE-subsegments of $p$, respectively. Consider the closed interval $I=[\SW(p),\Seg(\lambda)\setm \NE(p)]$ in $\Bic(\lambda)$. We show that $\eta(I)=\stars(\{p\})$, which implies $\stars(\{p\})$ is isomorphic to the quotient interval $[[\SW(p)]_{\Theta},[\Seg(\lambda)\setm \NE(p)]_{\Theta}]$.

Let $F^{\pr}\in\stars(\{p\})$. Since $\eta\circ\phi(F^{\pr})=F^{\pr}$, we have $\SW(p)\subseteq\phi(F^{\pr})$ and $\NE(p)\cap\phi(F^{\pr})=\emptyset$ by Lemma~\ref{lem_AK}. Hence, $\phi(F^{\pr})\in I$, and $F^{\pr}\in\eta(I)$.



Now let $X\in I$ be given. Let $e$ be a vertical edge of $\lambda$, and let $p_e$ be the top route at $e$ in $\eta(X)$. We show that $p$ is nonkissing with $p_e$. Since $\eta(X)$ is a maximal nonkissing collection, this would imply that $p\in\eta(X)$.

Suppose to the contrary that $p$ and $p_e$ kiss along a common segment $s$. Then $s$ is either a SW-subsegment of $p$ and a NE-subsegment of $p_e$ or vice versa. If $s$ is a SW-subsegment of $p$, then $s\in X$ since $\SW(p)\subseteq X$. But $s\in \NE(p_e)$ implies $s\notin X$ by Lemma~\ref{lem_AK}, a contradiction. Similarly, if $s$ is a NE-subsegment of $p$, then $s\notin X$ since $X\subseteq\Seg(\lambda)\setm \NE(p)$. However, $s\in \SW(p_e)$ implies $s\in X$ by Lemma~\ref{lem_AK}, a contradiction.

We have now established that $\eta(I)=\stars(\{p\})$, as desired.
\end{proof}


By Lemma~\ref{lem_subshape_link}, the facets of $\Delta^{NK}(\lambda_{\textsf{M}})$ are in natural bijection with the facets of $\Delta^{NK}(\lambda)$ containing $F_0^{\pr}$. Thus, the facets of $\Delta^{NK}(\lambda_{\textsf{M}})$ are in natural bijection with $\starrm(F_0^{\pr}) \subseteq \Delta^{NK}(\lambda)$. With this identification, we immediately deduce the following corollaries.

\begin{coro}\label{cor_marked_interval}
 The poset $\GT(\lambda_{\textsf{M}})$ is a closed interval of $\GT(\lambda)$.
\end{coro}

\begin{coro}\label{cor_fan_poset_star}
 For $F\in\wtil{\Delta}^{NK}(\lambda_{\textsf{M}})$, the set $\stars(F)$ is a closed interval of $\GT(\lambda_{\textsf{M}})$.
\end{coro}


It follows from Corollary~\ref{cor_marked_interval} that $\GT(\lambda_{\textsf{M}})$ is a sublattice of $\GT(\lambda)$. We let $\iota:\GT(\lambda_{\M})\ra\GT(\lambda)$ be the natural inclusion. Composing with $\phi$, we get an injective lattice map
\[ \phi\circ\iota:\GT(\lambda_{\M})\ra\Bic(\lambda). \]
We also consider the lattice map
\[ \eta\big|_{\Bic(\lambda_{\textsf{M}})}:\Bic(\lambda_{\textsf{M}}) \ra \GT(\lambda). \]

\begin{lemma}\label{lem_marked_restrictions}
 For the marked shape $\lambda_{\textsf{M}}$, we have the following identity:
 \[ \im\left(\eta|_{\Bic(\lambda_{\textsf{M}})}\right) = \iota(\GT(\lambda_{\textsf{M}})). \]
\end{lemma}

\begin{proof}
 Let $F\in\GT(\lambda_{\textsf{M}})$ be given, and set $F^{\pr}=\iota(F)$. 
 We claim that $\phi(F^{\pr})$ is contained in $\Seg(\lambda_{\textsf{M}})$.

Let $s\in\phi(F^{\pr})$ be given. Then $s=s_1\circ\cdots\circ s_l$ where each $s_i$ is in $\SW(p)$ for a route $p\in F$. Suppose $s_i$ contains a marked vertex $\textsf{v}\in\textsf{M}$. Let $q\in F_0^{\pr}$ be the initial route of $\lambda$ that only turns at $\textsf{v}$. Then $s_i$ is an element of $\NE(q)$. Since $p$ and $q$ are nonkissing, we must have $\SW(p)\cap \NE(q)=\emptyset$, a contradiction.

Since $\phi(F^{\pr})\in\Bic(\lambda)$ and $\phi(F^{\pr})\subseteq\Seg(\lambda_{\textsf{M}})$, it follows that $\phi(F^{\pr})\in\Bic(\lambda_{\textsf{M}})$. Since $\eta(\phi(F^{\pr}))=F^{\pr}$, we conclude that
\[ \im\left(\eta|_{\Bic(\lambda_{\textsf{M}})}\right) \supseteq \GT(\lambda_{\textsf{M}}). \]

Conversely, let $X\in\Bic(\lambda_{\textsf{M}})$ be given. We claim that if $q\in F_0^{\pr}$, then $q\in\eta(X)$.

Let $q\in F_0^{\pr}$ be an initial route of $\lambda$ that turns at $\textsf{v}\in\textsf{M}$. If $q$ is not in $\eta(X)$, then there must exist $p\in\eta(X)$ such that $p$ and $q$ are kissing. Suppose this is true, and let $s$ be a segment such that $p$ and $q$ are kissing along $s$. This implies $s\in \NE(q)\cap \SW(p)$ or $s\in \SW(q)\cap \NE(p)$. But, the set $\SW(q)$ is empty and every segment in $\NE(q)$ contains $\textsf{v}$, so $s$ is an element of $\SW(p)$ that contains $\textsf{v}$. Since $\phi(\eta(X))\subseteq X$ and $X\subseteq\Seg(\lambda_{\textsf{M}})$, we must have $s\in\Seg(\lambda_{\textsf{M}})$, a contradiction. We conclude that $q$ is in $\eta(X)$, as desired.\end{proof}


By Lemma~\ref{lem_marked_restrictions}, we have lattice maps $\Bic(\lambda_{\textsf{M}})\ra\GT(\lambda_{\textsf{M}})$ and $\GT(\lambda_{\textsf{M}})\ra\Bic(\lambda_{\textsf{M}})$, obtained by restricting the corresponding maps for unmarked shapes. When the marked shape is clear from context, we continue to label these restricted maps by $\eta$ and $\phi$, respectively. Furthermore, we deduce the following corollary.

\begin{coro}
 The lattice map $\eta:\Bic(\lambda_{\M})\ra\GT(\lambda_{\M})$ is surjective. The lattice map %\newline 
 $\phi:\GT(\lambda_{\M})\ra\Bic(\lambda_{\M})$ is injective.
\end{coro}


\subsection{Canonical join complex}\label{subsec_gt_joinreps}

Throughout this section, we fix a marked shape $\lambda_{\M}$. The main result in this section is Theorem~\ref{thm_NF_CJ}, which states that the canonical join complex of the Grid--Tamari order $\GT(\lambda_{\M})$ is isomorphic to the nonfriendly complex of $\lambda_{\M}$. As a consequence, we characterize the faces of $\Gamma^{NF}(\lambda_{\M})$ as descent sets of elements of $\GT(\lambda_{\M})$; see Corollary~\ref{cor_lower_cover}. We first need two lemmas.


\begin{lemma}\label{cl_join-irreducible}
If $s\in\Seg(\lambda_{\M})$, then $\eta(\SW(s))$ is join-irreducible.
\end{lemma}

\begin{proof}
For $s\in\Seg(\lambda_{\M})$, if $\eta(\SW(s))=F\vee F^{\pr}$, then by Proposition~\ref{sub_quot_phi_eta}
\[\SW(s)=\phi\circ\eta(\SW(s))=\phi(F\vee F^{\pr})=\phi(F)\vee\phi(F^{\pr}).\]
Since $\SW(s)$ is join-irreducible in $\Bic(\lambda_{\M})$, we deduce that $\SW(s)=\phi(F)$ (or $\SW(s)=\phi(F^{\pr})$), so $\eta(\SW(s))=F$. Hence, $\eta(\SW(s))$ is join-irreducible.
\end{proof}

Let $f:\Seg(\lambda_{\M})\ra \JI(\GT(\lambda_{\M}))$ where $f(s)=\eta(\SW(s))$.

\begin{lemma}\label{cl_join-irreducible_bijection}
The function $f$ is a bijection.
\end{lemma}

\begin{proof}
Clearly $f$ is injective, since if $\eta(\SW(s))=\eta(\SW(t))$ for some $s,t\in \Seg(\lambda_{\M})$, then $\SW(s)=\phi\circ\eta(\SW(s))=\phi\circ\eta(\SW(t))=\SW(t)$ by Proposition~\ref{sub_quot_phi_eta}. As $s$ (resp.~$t$) is the unique maximal length segment in $\SW(s)$ (resp. $\SW(t)$), this means $s=t$.

Let $F$ be a join-irreducible element of $\GT(\lambda_{\M})$. Then $\phi(F)=\bigvee_{p\in F}\SW(p)$, so by Proposition~\ref{sub_quot_phi_eta} we have
\[F=\eta\circ\phi(F)=\eta\left(\bigvee_{p\in F} \SW(p)\right)=\bigvee_{p\in F}\eta(\SW(p)).\]
Since $F$ is join-irreducible, $F=\eta(\SW(p))$ for some $p\in F$. If $s$ is the largest SW-subsegment of $p$, then $F=\eta(\SW(s))=f(s)$, as desired.
\end{proof}

\begin{theorem}\label{thm_NF_CJ}
For $X\subseteq\Seg(\lambda_{\M})$, the set $X$ is a face of the nonfriendly complex if and only if there exists $F\in\GT(\lambda_{\M})$ such that $F=\bigvee_{s\in X}f(s)$ is the canonical join-representation of $F$.
\end{theorem}

\begin{exam}
In Figure~\ref{NF_to_NK}, we show an example of the bijection established in Theorem~\ref{thm_NF_CJ}. Using the bijection from Example~\ref{rectangle_shape_example}, the collection of routes on the right in Figure~\ref{NF_to_NK} are those corresponding to the following 4-element subsets of $[8]$: $\{3,4,5, 7\}$, $\{1,5, 6, 7\}$, $\{1, 4,5, 7\}$, $\{1, 3, 7, 8\}$, $\{1, 3, 6,7\}$, $\{1, 3, 5, 7\}$, $\{1, 3, 4, 5\}$, $\{1, 2, 3, 7\}$, $\{1,2,3,5\}.$ 
\end{exam}

\begin{figure}[htb]\centering
$\begin{array}{ccccccccccc}\includegraphics[scale=1.7]{Figures/NF_to_NK_1_v3.pdf} & \raisebox{.8in}{$\mapsto$} & \includegraphics[scale=1.7]{Figures/NF_to_NK_2_v3.pdf} & \raisebox{.8in}{$\mapsto$} & \includegraphics[scale=.43]{Figures/NF_to_NK_3.pdf}\\
X \in \Gamma^{NF}(\lambda) & \mapsto & \bigvee_{s \in X} \SW(s) & \mapsto & \bigvee_{s \in X} f(s) \in \wtil{\Delta}^{NK}(\lambda) \end{array}$
\caption{{A face of the nonfriendly complex and the corresponding face of the reduced nonkissing complex.}}
\label{NF_to_NK}
\end{figure}



\begin{proof}
Since the nonfriendly complex and the canonical join complex are both flag complexes, it suffices to prove the statement when $|X|\leq 2$.

The empty set is both a face of the nonfriendly complex and the canonical join-representation of $F_0$, so the statement holds for $|X|=0$. The case $|X|=1$ was handled in Lemma~\ref{cl_join-irreducible_bijection} since the only elements in a lattice whose canonical join-representation is itself are the join-irreducible elements.

Let $X=\{s,t\}$, $s\neq t$. Assume $s$ and $t$ are friendly. Thus there exists a common subsegment $u$ of $s$ and $t$ along which $s$ and $t$ are friendly. We note that there may be many valid choices for $u$, which we will choose from arbitrarily.

Without loss of generality, we may assume $s$ either starts with $u$ or enters $u$ from the West, and $s$ either ends with $u$ or leaves $u$ to the South. Similarly, $t$ either starts with $u$ or enters $u$ from the North, and $t$ either ends with $u$ or leaves $u$ to the East. Divide $s$ into three segments $s=s_1\circ u\circ s_2$ where $s_1$ or $s_2$ may be an empty segment. Since $u$ is a SW-subsegment of $t$, we have $\SW(u)\subseteq \SW(t)$. Similarly, $s_1$ and $s_2$ are SW-subsegments of $s$, so $\SW(s_i)\subseteq \SW(s)$ for $i=1,2$. Hence,
\[
\begin{aligned}
\SW(s)\vee \SW(t) & \subseteq  (\SW(s_1)\vee \SW(s_2)\vee \SW(u))\vee \SW(t)\\ 
& =  \SW(s_1)\vee \SW(s_2)\vee \SW(t)\\ 
& \subseteq  \SW(s)\vee \SW(t),
\end{aligned}
\]
so we have $\eta(\SW(s))\vee\eta(\SW(t))=\eta(\SW(s_1))\vee\eta(\SW(s_2))\vee\eta(\SW(t))$. If both $s_1$ and $s_2$ are empty, then the join-representation $\eta(\SW(s))\vee\eta(\SW(t))$ is redundant. Otherwise, since $\eta(\SW(s_1))<\eta(\SW(s))$ and $\eta(\SW(s_2))<\eta(\SW(s))$, we have found a join-refinement of $\eta(\SW(s))\vee\eta(\SW(t))$.

Now assume that $s$ and $t$ are nonfriendly. It is clear that neither segment is a SW-subsegment of the other, so $\SW(s)\vee \SW(t)$ is irredundant. Suppose we have another irredundant join-representation so that $\SW(s)\vee \SW(t)=\bigvee_{i=1}^l \SW(u_i)$ for some segments $u_1,\ldots,u_l$. We prove that $s\in \SW(u_i)$ and $t\in \SW(u_j)$ for some $i$ and $j$. This would imply that $\eta(\SW(s))\vee\eta(\SW(t))$ is a canonical join-representation.

Suppose to the contrary that $s\notin \SW(u_i)$ for any $i$. Then $s=u_1^{\pr}\circ\cdots\circ u_m^{\pr},\ m>1$ where each $u_i^{\pr}$ is in $\SW(u_j)$ for some $j$ (depending on $i$). There exist indices $i\leq j$ such that if $u^{\pr}=u_i^{\pr}\circ u_{i+1}^{\pr}\circ\cdots\circ u_j^{\pr}$:
\begin{itemize}
\item $s\neq u^{\pr}$,
\item either $i=1$ or $s$ enters $u^{\pr}$ from the West, and
\item either $j=m$ or $s$ leaves $u^{\pr}$ to the South.
\end{itemize}
Since $u^{\pr}\in \SW(s)\vee \SW(t)$, we have $u^{\pr}=t_1\circ\cdots\circ t_k$ where each $t_i$ is a SW-subsegment of $s$ or $t$. By the hypotheses on $u^{\pr}$, either $t_1\in \SW(t)$ or $t_k\in \SW(t)$ must hold. Suppose $t_1\in \SW(t)$. Choose $j$ maximal such that $t_1\circ\cdots\circ t_j$ is a SW-subsegment of $t$. If $j=k$, then $u^{\pr}$ is a SW-subsegment of $t$, and $s$ and $t$ are friendly along $u^{\pr}$. If $j<k$ then $t_{j+1}$ is a SW-subsegment of $s$, so $s$ leaves $t_j$ to the South while $t$ either ends at $t_j$ or leaves $t_j$ to the East. In either case, we conclude that $s$ and $t$ are friendly along $t_1\circ\cdots\circ t_j$. Since $s$ and $t$ were assumed to be nonfriendly, we have obtained a contradiction.
\end{proof}


Let $L$ be a semidistributive lattice. For any covering $x\lessdot y$ in $L$, there exists a unique join-irreducible $j$ such that $x\vee j=y$ and $x\wedge j=j_*$~\cite[Lemma 3.3]{barnard:2016canonical}. Furthermore, Barnard proved that $y=\bigvee A$ is a canonical join-representation if and only if $A$ is the set of join-irreducibles $j$ such that there exists $x\lessdot y$ where $x\vee j=y$ and $x\wedge j=j_*$. We identify the join-irreducible elements corresponding to covering relations in the Grid--Tamari order in the following claim.

\begin{lemma}\label{cl_join-irreducible_label}
Let $F$ and $F^{\pr}$ be adjacent facets of $\wtil{\Delta}^{NK}(\lambda_{\M})$. If $F\stackrel{s}{\ra}F^{\pr}$, then $F\vee\eta(\SW(s))=F^{\pr}$ and $F\wedge\eta(\SW(s))=\eta(\SW(s))_*$. 
\end{lemma}

\begin{proof}
If $F\stackrel{s}{\ra}F^{\pr}$, then all proper SW-subsegments of $s$ are in $\phi(F)$, but not $s$ itself. Since $\SW(s)\setm\{s\}$ is biclosed, we have $\phi(F)\wedge \SW(s)=\SW(s)\setm\{s\}$. Since $\SW(s)$ is the minimum biclosed set whose image under $\eta$ is equal to $\eta(\SW(s))$, we have $\eta(\SW(s)\setm\{s\})<\eta(\SW(s))$. By Lemma~\ref{lem_lattice_quotient_cover}, $\eta(\SW(s))$ covers $\eta(\SW(s)\setm\{s\})$. Since $\eta(\SW(s))$ is join-irreducible, we have $\eta(\SW(s)\setm\{s\})=\eta(\SW(s))_*$. Putting this together, we have 
\begin{align*}
F\wedge\eta(\SW(s)) &= \eta\circ\phi(F)\wedge\eta(\SW(s))\\
&=\eta(\phi(F)\wedge \SW(s))\\
&=\eta(\SW(s)\setm\{s\})\\
&=\eta(\SW(s))_*.
\end{align*}

Since $F$ and $\eta(\SW(s))$ are incomparable, $F<F\vee\eta(\SW(s))$. But $\SW(s)\subseteq\phi(F^{\pr})$, so $\eta(\SW(s))\leq F^{\pr}$. This implies that $F\vee\eta(\SW(s))\leq F^{\pr}$. As $F^{\pr}$ covers $F$, we conclude that $F\vee\eta(\SW(s))=F^{\pr}$, as desired.
\end{proof}


Given an element $F\in\GT(\lambda_{\M})$, we define the \emph{descent set} $\Des(F)$ to be the set of segments $s$ such that there exists a facet $F^{\pr}$ adjacent to $F$ with $F^{\pr}\stackrel{s}{\ra}F$. Dually, the \emph{ascent set} $\Asc(F)$ is the set of segments $s$ such that $F\stackrel{s}{\ra}F^{\pr}$ for some facet $F^{\pr}$. By the discussion before Lemma~\ref{cl_join-irreducible_label}, we obtain the following corollary to Theorem~\ref{thm_NF_CJ}.

\begin{coro}\label{cor_lower_cover}
For $X\subseteq\Seg(\lambda_{\M})$, there exists $F\in\GT(\lambda_{\M})$ such that $X=\Des(F)$ if and only if $X$ is a face of the nonfriendly complex.
\end{coro}

\begin{exam}
We showed the nonfriendly complex of the $2\times 3$ rectangle shape in Figure~\ref{fig_2x3_cjc}, which, by Theorem~\ref{thm_NF_CJ}, is isomorphic to the canonical join complex of the Grid--Tamari order defined by the same shape. We see an example of Corollary~\ref{cor_lower_cover} by comparing Figure~\ref{fig_2x3_cjc} and the Grid--Tamari order shown in Figure~\ref{walls_ex}.
\end{exam}




\subsection{Lattice congruences}\label{subsec_gt_cong}

For this section, we partially order the set of segments $\Seg (\lambda_{\M})$ by inclusion: $s\leq t$ if $s\subseteq t$. We show an example of $\Seg(\lambda_{\M})$ as a partial order in Figure~\ref{seg_poset}.

\begin{figure}[htb]\centering
\begin{tabular}{cc} \raisebox{.35in}{\includegraphics[scale=1.5]{Figures/3x3_shape.pdf}} & \includegraphics[scale=1.25]{Figures/poset_of_segments.pdf}\\ & $\Seg(\lambda)$
\end{tabular}

\caption{On the right we show the poset $\Seg(\lambda)$ when $\lambda$ is the $3\times 3$ rectangle shape shown on the left.}
\label{seg_poset}
\end{figure}




Since $\GT(\lambda_{\M})$ is a congruence-uniform lattice, the join-irreducible elements of $\GT(\lambda_{\M})$ are in bijection with the join-irreducible elements of $\Con(\GT(\lambda_{\M}))$ via the map $j\mapsto\con(j_*,j)$ for $j\in \JI(\GT(\lambda_{\M}))$. Composing with $f$ defines a bijection between $\Seg(\lambda_{\M})$ and join-irreducibles of $\Con(\GT(\lambda_{\M}))$. In fact, we have the following theorem.

\begin{theorem}\label{thm_congruences}
The poset $\Con(\GT(\lambda_{\M}))$ is isomorphic to the lattice of order ideals of the dual poset of $\Seg(\lambda_{\M})$.
\end{theorem}


\begin{proof}By Lemma~\ref{cl_join-irreducible_label}, if $F\stackrel{s}{\ra}F^{\pr}$, then $F\equiv F^{\pr}\mod\con(\eta(\SW(s))_*,\eta(\SW(s)))$ and $\eta(\SW(s))_*\equiv\eta(\SW(s))\mod\con(F,F^{\pr})$.



For a segment $s$ let $\up(s)$ be the set of segments in $\Seg(\lambda)$ containing $s$. We claim that $X^{\pr}=\ov{X^{\downarrow}-\up(s)}$ is biclosed for any segment $s$ and biclosed set $X$. It is immediate that $X^{\pr}$ is closed, so it is enough to show it is co-closed. If not, then there is some $t\in X^{\pr}$ such that $t=t_1\circ t_2$ and $t_1,t_2\notin X^{\pr}$.


For $X\in\Bic(\lambda_{\M})$, define $X_{-s}=\ov{X\setm S_{\geq s}}$, where $S_{\geq s}$ is the set of segments containing $s$. It is straight-forward to check that $X_{-s}$ is biclosed. Moreover the relation $X\equiv Y\mod\Theta_s$ if $(X^{\downarrow})_{-s}=(Y^{\downarrow})_{-s}$ is a lattice congruence of $\Bic(\lambda_{\M})$ coarser than $\Theta$. Since $\GT(\lambda_{\M})$ is isomorphic to $\Bic(\lambda_{\M})/\Theta$, this congruence decends to a lattice congruence on $\GT(\lambda_{\M})$. From the discussion following Lemmas~\ref{cl_join-irreducible_bijection} and~\ref{cl_join-irreducible_label}, the congruence $\Theta_s$ contracts exactly those covering relations in $\GT(\lambda_{\M})$ labeled by a segment~$t$ containing $s$.

To complete the proof of Theorem~\ref{thm_congruences}, it remains to show that \[\con(\eta(\SW(s))_*,\eta(\SW(s)))=\Theta_s.\]

\begin{lemma}\label{cl_end_contraction}
Let $s,t$ be segments such that $s$ is an initial or terminal subsegment of~$t$. Then $\eta(\SW(t))_*\equiv\eta(\SW(t))\mod\con(\eta(\SW(s))_*,\eta(\SW(s)))$.
\end{lemma}

\begin{proof}
We assume $t=s\circ s^{\pr}$ for some segment $s^{\pr}$. The case $t=s^{\pr}\circ s$ is similar.

Let $X=\ov{\SW(s)\cup \SW(s^{\pr})}$. Then $X$ consists of segments that can be decomposed as a terminal SW-subsegment of $s$ and an initial SW-subsegment of $s^{\pr}$. From this observation, we deduce that the sets \[X-\{s\},X-\{s^{\pr}\},X-\{s,t\},X-\{s^{\pr},t\},X-\{s,t,s^{\pr}\}\] are all biclosed. Moreover, as $X$ constains all SW-subsegments of $s,s^{\pr}$ and $t$, only one of these covering relations is contracted by $\Theta$. That is, this hexagonal subposet of $\Bic(\lambda_{\M})$ is mapped to a pentagonal subposet of $\GT(\lambda_{\M})$ under $\eta$. In particular, there are covering relations $(Y,Z),(Y^{\pr},Z^{\pr})$ in $\Bic(\lambda_{\M})$ not contracted by $\Theta$ and labelled $s,t$ respectively such that $Y^{\pr}\equiv Z^{\pr}\mod\con(Y,Z)$.

Then $\eta(Y)\stackrel{s}{\ra}\eta(Z)$, $\eta(Y^{\pr})\stackrel{t}{\ra}\eta(Z^{\pr})$ are covering relations of $\GT(\lambda_{\M})$ since $(Y,Z)$ and $(Y^{\pr},Z^{\pr})$ are not contracted by $\Theta$. Moreover, $\eta(Y^{\pr})\equiv\eta(Z^{\pr})\mod\con(\eta(Y),\eta(Z))$. By Lemma~\ref{cl_join-irreducible_label}, we deduce that 
\[
\eta(\SW(t))_*\equiv\eta(\SW(t))\mod\con(\eta(\SW(s))_*,\eta(\SW(s))),
\]
 as desired.
 \end{proof}

If $s\subseteq t$, then by first extending $s$ to an initial subsegment of $t$ and applying Lemma~\ref{cl_end_contraction} twice, we deduce that 
\[
\eta(\SW(t))_*\equiv\eta(\SW(t))\mod\con(\eta(\SW(s))_*,\eta(\SW(s))).
\]
 Therefore, $\con(\eta(\SW(s))_*,\eta(\SW(s)))=\Theta_s$ holds, and Theorem~\ref{thm_congruences} is proved.\end{proof}





\subsection{{The core label order}} 

{In this section, we interpret wide sets of segments in $\Seg(\lambda_{\M})$ in terms of the lattice theory of $\GT(\lambda_{\M})$. 
We use this description to conclude that $\CLO(\lambda_{\M})$ is isomorphic to $\Psi(\lambda_{\M})$. Before doing so, it will be useful to show how intervals of $\Bic (\lambda_{\M})$ such as those appearing in the definition of $\CLO(\lambda_{\M})$ may be regarded as lattices of biclosed sets on a restricted set of segments (see Proposition~\ref{prop_faces_GT}) as follows.} 

If $S$ is a subset of $\Seg(\lambda_{\M})$, we say that a subset $X\subseteq S$ is \emph{closed relative to $S$} if $X=\ov{X}\cap S$. It is \emph{coclosed relative to $S$} if $(S\setm X)=\ov{S\setm X}\cap S$. We define $\Bic(S)$ as the collections of segments that are closed and coclosed relative to $S$, ordered by inclusion.


\begin{lemma}\label{meet_of_B_is}
Let $X \in \Bic (\lambda)$, and let $s_1, \ldots, s_l \in X$ be segments such that each $X\backslash\{s_i\}$ is biclosed. Then $\bigwedge_{i = 1}^l X\backslash\{s_i\} = X\backslash\overline{\{s_1,\ldots, s_l\}}$.\end{lemma}
\begin{proof}
Set $S=\ov{\{s_1,\ldots,s_l\}}$. Since each $X\backslash\{s_i\}$ is biclosed, we know that $X^c\cup \{s_i\}$ is biclosed for each $i \in [l]$. 

We claim that $X^c \cup S$ is closed. It is enough to show that given composable segments $s \in X^c$ and $s_{i_1}\circ \cdots \circ s_{i_\ell} \in S$ we have $s \circ s_{i_1}\circ \cdots \circ s_{i_\ell} \in X^c\cup S.$ Since $X^c \cup \{s_{i_1}\}$ is closed, we know that $s \circ s_{i_1} \in X^c\cup S$. Moreover, $s \circ s_{i_1} \in X^c$ since $s \not \in S$. Since $X^c \cup \{s_{i_2}\}$ is closed, we obtain that $s \circ s_{i_1}\circ s_{i_2} \in X^c\cup S$. As above, $s \circ s_{i_1} \circ s_{i_2} \in X^c$ since $s \not \in S$. Continuing with this argument, we obtain that $X^c \cup S$ is closed.

Now Corollary~\ref{latt_str_marked_bic}~\eqref{latt_str_marked_bic_3} implies the following
\[\begin{aligned}[b]{}
\bigwedge_{i = 1}^l X\backslash\{s_i\} 
& =  \left(\bigvee_{i=1}^l X^c \cup \{s_i\}\right)^c \\
& =  \left(\overline{\bigcup_{i=1}^l X^c \cup \{s_i\}}\right)^c \\
& =  \left(\overline{X^c \cup (\bigcup_{i=1}^l \{s_i\})}\right)^c \\
& =  \left(\overline{X^c \cup \overline{\{s_1,\ldots, s_l\}}}\right)^c \\
& =  \left(X^c \cup S\right)^c && \text{(using that $X^c \cup S$ is closed)} \\
& =  X\backslash S.
\end{aligned}\qedhere
\]
\end{proof}

Given $S\subseteq\Seg(\lambda_{\M})$ and $X\in\Bic(S)$, we define
 \[ X^{\downarrow S} = \{s\in X\ |\ (\SW(s)\cap S)\subseteq X\}. \]

We let $\ov{\Theta}$ be the equivalence relation on $\Bic(S)$ where $Y_1 \equiv Y_2 \mod \overline{\Theta}$ if and only if $Y_1^{\downarrow S} = Y_2^{\downarrow S}$.



\begin{prop}\label{prop_faces_GT}
Let $X$ be a biclosed set of segments, and let $s_1,\ldots,s_l\in X$ be the segments such that $X\setm\{s_i\}$ is biclosed. Set $S=\ov{\{s_1,\ldots,s_l\}}$. Then $\Bic(S)$ is isomorphic to the interval $[\bigwedge_{i=1}^l X\setm\{s_i\},\ X]$. Furthermore, this isomorphism descends to the quotient mod $\Theta$; that is,
\[
\Bic(S)/\overline{\Theta}\cong\left[\bigwedge_{i=1}^l X\setm\{s_i\},\ X\right]/\Theta.
\]
\end{prop}

\begin{proof}
We first show that for any $s_i$ and $s_j$ there does not exist a segment $t \in \Seg(\lambda)$ such that $s_i\circ t = s_j.$ Suppose that such a segment $t$ does exist. As $s_i \not \in X\setm\{s_i\}$ and $X\setm\{s_i\}$ is biclosed, we have $t \in X\setm\{s_i\}$. This implies $t \in X$ and thus $t \in X\setm\{s_j\}$. However, this means that $s_i, t \in X\setm\{s_j\}$, but $s_j = s_i\circ t \not \in X\setm\{s_j\}$. This contradicts that $X\setm\{s_j\}$ is biclosed.

Next, we show that the map $Y^\prime \mapsto Y^\prime \cap S$ from $[\bigwedge_{i = 1}^l X\backslash\{s_i\}, X]$ to $\Bic (S)$ is an isomorphism of posets. It is easy to see that this map is well-defined and order-preserving. On the other hand, its inverse $Y \mapsto Y^\prime := (\bigwedge_{i=1}^l X\backslash \{s_i\}) \cup Y$ is clearly order-preserving so it remains to prove that its inverse is well-defined. To do so, we show that $Y^\prime \in \Bic(\lambda)$. 

To see that $Y^\prime$ is closed, it is enough show that if $t_1 \in \bigwedge_{i=1}^l X\backslash \{s_i\}$ and $t_2 \in Y$ are composable, then $t_1\circ t_2 \in Y^\prime$. Since $X$ is closed, we know $t_1\circ t_2 \in X$. Suppose $t_1 \circ t_2 \not \in \bigwedge_{i=1}^l X\backslash \{s_i\}$. By Lemma~\ref{meet_of_B_is}, we know that $t_1\circ t_2 = s_{i_1}\circ \cdots \circ s_{i_k}$ for some $s_{i_1}, \ldots, s_{i_k} \in S.$ Now write $t_2 = s_{j_1}\circ \cdots \circ s_{j_r}$ where $s_{j_1}, \ldots, s_{j_r} \in Y$. If $s_{i_k} \subseteq s_{j_r}$, then $s_{j_r} = s_{i_k} \circ t^\prime$ for some segment $t^\prime \in \Seg (\lambda)$. However, such an equation contradicts the result from the first paragraph of the proof. The analogous argument shows $s_{j_r}$ is not properly contained in $s_{i_k}$. We conclude that $s_{j_r} = s_{i_k}$. By repeating this argument and removing pairs of equal segments $s_{j_n} = s_{i_m}$ with $n \le r$ and $m \le k$, we either obtain an equation $t_1 \circ s_{j_1}\circ \cdots \circ s_{j_{n-1}} = s_{i_1}$ or $t_1 = s_{i_1}\circ \cdots \circ s_{i_{m-1}}$. In either case, we reach a contradiction.

We now show that $Y^\prime$ is co-closed. Let $t_1, t_2 \not \in Y^\prime$ be composable. We can assume $t_1\circ t_2 \in X$, otherwise we are done. Since $X$ is co-closed, we can assume $t_2 \in X$. We also know that $\bigwedge_{i=1}^l X\backslash \{s_i\}$ is co-closed so $t_1\circ t_2 \not \in \bigwedge_{i=1}^l X\backslash \{s_i\}$. Now by Lemma~\ref{meet_of_B_is}, we have $t_1\circ t_2 = s_{i_1}\circ \cdots \circ s_{i_k}$ for some $s_{i_1},\ldots, s_{i_k} \in S$ and $t_2 = s_{j_1}\circ \cdots \circ s_{j_r}$ for some $s_{j_1}, \ldots, s_{j_r} \in S.$ Using the argument from the previous paragraph, we either obtain an equation $t_1 = s_{i_1}\circ \cdots \circ s_{i_{m-1}}$ so $t_1 \in X\backslash Y^\prime$. We conclude that $t_1\circ t_2 \in X\backslash Y^\prime$. It follows that $\Bic(S)$ is isomorphic to the interval $[\bigwedge_{i=1}^l X\setm\{s_i\},\ X]$.

Lastly, we show that this isomorphism descends to the quotient mod $\Theta$. To do so, we show that for any $Y_1^\prime, Y_2^\prime \in \Bic(\lambda)$ with corresponding relatively biclosed sets $Y_1, Y_2 \in \Bic(S)$, one has $(Y_1^\prime)^\downarrow = (Y_2^\prime)^\downarrow$ if and only if $Y_1^{\downarrow S} = Y_2^{\downarrow S}$. We only show that the latter implies the former as the converse is clear.

Suppose that $Y_1^{\downarrow S} = Y_2^{\downarrow S}$. Let $s \in (Y_1^\prime)^\downarrow$. Note that $\SW(s) = (\SW(s)\cap (\bigwedge_{i=1}^lX\backslash\{s_i\}))\sqcup (\SW(s) \cap Y_1)$ so it is enough to show that any segment $t \in \SW(s)\cap Y_1$ belongs to $Y_2$. If $t \in \SW(s)\cap Y_1$, then $\SW(t) \subseteq \SW(s)$ so $t \in (\SW(t)\cap S) \subseteq Y_1$. By assumption, $t \in (\SW(t)\cap S) \subseteq Y_2$. We conclude that $s \in (Y_2^\prime)^\downarrow$. The proof of the opposite inclusion is similar.\end{proof}












Let $\CLO(\lambda)$ be the core label order of the congruence-uniform lattice $\GT(\lambda)$. Let $f:\Seg(\lambda)\ra\JI(\GT(\lambda))$ be the bijection from Lemma~\ref{cl_join-irreducible_bijection}, namely $f(s)=\eta(\SW(s))$. As $\GT(\lambda)$ is congruence-uniform, this extends to a bijection $\hat{f}:\Seg(\lambda)\ra\JI(\Con(\GT(\lambda)))$ where $\hat{f}(s)=\con(f(s)_*,f(s))$.


\begin{theorem}\label{thm_lattice_shard_intersection}
A set $T$ of segments is wide if and only if there exists an element $x\in\GT(\lambda)$ such that
\[\{\hat{f}(s):\ s\in T\}=\left\{\con(w,z):\ \bigwedge_{i=1}^l y_i\leq w\lessdot z\leq x\right\},\]
where $y_1,\ldots,y_l$ are the elements covered by $x$. Consequently, the posets $\Psi(\lambda)$ and $\CLO(\lambda)$ are isomorphic.
\end{theorem}



\begin{proof}
Let $x\in\GT(\lambda)$, and set
\[
T=\left\{\hat{f}^{-1}(\con(w,z)):\ \bigwedge_{i=1}^l y_i\leq w\lessdot z\leq x\right\},
\]
where $y_1,\ldots,y_l$ are the elements of $\GT(\lambda)$ covered by $x$. Then, we have
\[
T=\left\{s:\ \exists w\stackrel{s}{\ra}z,\ \bigwedge_{i=1}^l y_i\leq w\lessdot z\leq x\right\}.
\]

Let $X=\phi(x)$, and let $s_i$ be the segment labeling $y_i\stackrel{s_i}{\ra}x$. Then $\{s_1,\ldots,s_l\}$ is a face of the nonfriendly complex. Since $\eta(X\setm\{s_i\})=y_i$, the interval $[\bigwedge_{i=1}^l X\setm\{s_i\},X]$ maps to $[\bigwedge_{i=1}^l y_i,x]$ under $\eta$. By Proposition~\ref{prop_faces_GT}, the interval $[\bigwedge_{i=1}^l y_i,x]$ is isomorphic to $\Bic(\ov{\{s_1,\ldots,s_l\}})/{\overline{\Theta}}$, and this isomorphism preserves the edge labels. Hence, $T$ is equal to $\ov{\{s_1,\ldots,s_l\}}$. By Proposition~\ref{prop_nonfriendly_transitive}, this set is wide.

Next, we prove the converse statement. Let $T$ be a wide set and $X=\NF(T)$. Then $\bigvee_{s\in X}\eta(\SW(s))$ is the descent set of some element $x\in\GT(\lambda)$. Hence,
\[X=\Des(x)=\{\hat{f}^{-1}(\con(y,x)):\ y\lessdot x\}.\]
By Proposition~\ref{prop_nonfriendly_transitive}, we have $T=\ov{X}$. By the previous argument,
\[
\ov{X}=
\left\{\hat{f}^{-1}(\con(w,z)):\ \bigwedge_{i=1}^ly_i\leq w\lessdot z\leq x\right\}
\]
where $y_1,\ldots,y_l$ are the elements of $\GT(\lambda)$ covered by $x$.
\end{proof}













\section{Enumeration}\label{sec_enumeration}




\subsection{\texorpdfstring{$f$}{f}-vector and \texorpdfstring{$h$}{h}-vector}\label{subsec_fhpoly}

Given a simplicial complex $\Delta$, let $f_d$ be the number of $d$-dimensional faces of $\Delta$ for each $d\in\{-1,0,1,\ldots\}$. Every nonvoid simplicial complex contains the \emph{empty face}, which is the unique face of dimension $-1$. The \emph{$f$-vector} $(f_{-1},f_0,f_1,\ldots)$ is the sequence of face numbers of $\Delta$. The \emph{$f$-polynomial} is
\[
f(t)=\sum_df_{d-1}x^d.
\]

If the largest face is of dimension $r-1$, then the \emph{$h$-vector} $(h_0,h_1,h_2,\ldots,h_r)$ is the sequence of integers defined by the identity
\[
\sum_{d=0}^r f_{d-1}(x-1)^{r-d}=\sum_{d=0}^r h_dx^{r-d}.
\]
The polynomial $h(x)=\sum_{d=0}^r h_dx^{r-d}$ is the \emph{$h$-polynomial} of $\Delta$. The above identity may be compactly expressed as $h(x+1)=x^rf(1/x)$.

\begin{exam}
If $\Delta = \wtil{\Delta}^{NK}(\lambda)$ where $\lambda$ is a $2\times 3$ rectangle, then
\[f(x)=1+5x+5x^2,\ \hspace{5mm} h(x)=(x-1)^2 + 5(x-1) + 5=1+3x+x^2.\] \end{exam}



If $\Delta$ is shellable, then for each index $j$, there exists a unique minimal face $R(F_j)$ of $F_j$ not contained in $\bigcup_{i<j}F_i$. In this situation, the $h$-polynomial of $\Delta$ is equal to $\sum_j x^{|R(F_j)|}$.




\begin{lemma}\label{lem_shellable}
Any linear extension of $\GT(\lambda_{\M})$ is a shelling order on the facets of the reduced nonkissing complex $\wtil{\Delta}^{NK}(\lambda_{\M})$. Moreover, the $h$-polynomial of the reduced nonkissing complex $\wtil{\Delta}^{NK}(\lambda_{\M})$ equals the $f$-polynomial of the nonfriendly complex $\Gamma^{NF}(\lambda_{\M})$.
\end{lemma}


\begin{proof}
 Let $F^1,F^2,\ldots$ be a linear extension of $\GT(\lambda_{\M})$. Let $i<j$ and set $F=F^i\cap F^j$. To prove that the given linear extension is a shelling order, we must show that there exists a ridge containing $F$ of the form $F^j\cap F^k$ with $k<j$.

 By Corollary~\ref{cor_fan_poset_star}, the star $I=\stars(F^i\cap F^j)$ is a closed interval of $\GT(\lambda_{\M})$. Since~$I$ contains $F^i$ and $F^j$, it also contains $F^i\wedge F^j$. Now let $F^k\in [F^i\wedge F^j, F^j]$ such that $F^k$ is a lower cover of $F^j$. Then $k<j$ and $F^k\cap F^j$ is a ridge containing $F$, as desired.

 To prove the second statement, we observe that the $f$-polynomial of the nonfriendly complex is equal to $\sum x^{|\Des(F^j)|}$, so it suffices to show that $|\Des(F^j)|=|R(F^j)|$ for all $j$. For a given index $j$,
\[ F^j\cap \left(\bigcup_{i<j} F^i\right) = \bigcup_{F^k\lessdot F^j} F^k\cap F^j. \]
Then
\[ R(F^j)= \{p\in F^j\ |\ \exists k<j,\ F^k\lessdot F^j,\ p\notin F^k\}, \]
which has cardinality equal to the number of lower covers of $F^j$.
\end{proof}





\subsection{\texorpdfstring{$F$}{F}-triangle and \texorpdfstring{$H$}{H}-triangle}\label{subsec_triangle_FH}

We recall the $F$-triangle and $H$-triangle from Section~\ref{sec_nonkissing}. Fix a marked shape $\lambda_{\M}$. Recall that a route $p$ is \emph{initial} if it turns at a unique vertex $\textsf{v}$ and $p$ enters $\textsf{v}$ from the West and leaves to the South. Otherwise, we say $p$ is \emph{non-initial}.


\begin{defi}
The \emph{positive part} of the reduced nonkissing complex $\wtil{\Delta}^{NK}_+(\lambda_{\M})$ is defined as the full subcomplex of $\wtil{\Delta}^{NK}(\lambda_{\M})$ on the non-initial routes.
\end{defi}


We fix some notation that we will use throughout this section. Let $r=|{\V}^\circ|$, and label the interior vertices $\textsf{v}_1,\ldots, \textsf{v}_r$. For $i\in[r]$, let $t_i$ be the lazy segment supported at $\textsf{v}_i$, and let $q_i$ be the initial route that turns at $\textsf{v}_i$. 

The $F$-triangle introduced in Section~\ref{subsec_comb_nonkissing} is the polynomial
\[
F(x,y)=\sum_{F\in\wtil{\Delta}^{NK}(\lambda_{\M})}x^{|F\setm F_0|}y^{|F\cap F_0|}=\sum_{i,j}f_{ij}x^{i-j}y^j.
\]
We remark that $f_{ij}=0$ unless $0\leq j\leq i\leq r$. We consider the following multivariate extension of this polynomial:
\[F(x,y_1,\ldots,y_r) = \sum_{F\in\wtil{\Delta}^{NK}(\lambda_{\M})}x^{|F\setm F_0|}\prod_{q_i\in F}y_i.\]
It is clear that this polynomial extends the $F$-triangle in the sense that $F(x,y)=F(x,y,\ldots,y)$.

If $\Gamma=\Gamma^{NF}(\lambda_{\M})$ is the nonfriendly complex, the $H$-triangle introduced in Section~\ref{subsec_comb_nonfriendly} is the polynomial
\[H(x,y)=\sum_{F\in\Gamma}x^{|F|}y^{|\epsilon(F)|}=\sum_{i,j}h_{ij}x^iy^j,\]
where $\epsilon(F)$ is the set of isolated lazy segments in $F$. Once again, $h_{ij}=0$ unless $0\leq j\leq i\leq r$ holds. We observe that $f_j=\sum_{i=0}^jf_{ij}$ for all $j$ where $f_j$ is the $j$th entry of the $f$-vector of $\widetilde{\Delta}^{NK}(\lambda_{\M})$. Moreover, using Lemma~\ref{lem_shellable}, $h_j=\sum_{i=0}^jh_{ij}$ for all $j$ where $h_j$ is the $j$th entry of the $h$-vector of $\widetilde{\Delta}^{NK}(\lambda_{\M})$. 


As above, there is a multivariate extension of the $H$-triangle given by
\[H(x,y_1,\ldots,y_r)=\sum_{F\in\Gamma}x^{|F|}\prod_{t_i\in\epsilon(F)}y_i.\]




\begin{theorem}\label{thm_FH}
For any marked shape $\lambda_{\M}$, the following identity holds:
\begin{align}
\label{thm_FH_eqn} H(x+1,\ y_1+1, \ldots,y_r+1) = x^r F\left(\frac{1}{x},\ \frac{1+y_1(x+1)}{x}, \ldots, \frac{1+y_r(x+1)}{x}\right).
\end{align}
\end{theorem}


\begin{proof}

Let $\Delta=\wtil{\Delta}^{NK}(\lambda_{\M})$ be the reduced nonkissing complex. 
Let $I \subseteq [r]$ where $r$ is the number of interior vertices of $\lambda_{\M}$, and let $\lk_I(\Delta)$ denote the link of $\Delta$ with respect to the face consisiting only of initial routes of $\lambda_{\M}$ that turn only at vertices in $I$. The positive part of $\lk_I(\Delta)$, denoted $\lk_I(\Delta)_+$, is the subcomplex of $\lk_I(\Delta)$ obtained by removing all initial routes from faces of $\lk_I(\Delta)$. Then $\Delta$ decomposes as
\[\Delta=\bigsqcup_{I\subseteq [r]}\{\{q_i:\ i\in I\}\cup F:\ F\in\lk_I(\Delta)_+\}.\]

Using this decomposition of $\Delta$, we may rewrite the right-hand side of the identity in the statement of the theorem as follows:
%\begin{align*}
%x^r F\left(\frac{1}{x},\ \frac{1+y_1(x+1)}{x}, \ldots, \frac{1+y_r(x+1)}{x}\right) &= \sum_{F\in\Delta}x^{r-|F|}\prod_{q_i\in F}(1+y_i(x+1))\\
%&= \sum_{J\subseteq[r]}\sum_{F\in\lk_J(\Delta)_+}x^{r-|J|-|F|}\prod_{i\in J}(1+y_i(x+1))\\
%&= \sum_{J\subseteq[r]}\sum_{F\in\lk_J(\Delta)_+}x^{r-|J|-|F|}\sum_{I \subseteq J}(x+1)^{|I|}\prod_{i\in I}y_i\\
%&= \sum_{I\subseteq[r]}(x+1)^{|I|}\sum_{I\subseteq J\subseteq[r]}\sum_{F\in\lk_J(\Delta)_+}x^{r-|J|-|F|}\prod_{i\in I}y_i\\
%&= \sum_{I\subseteq[r]}(x+1)^{|I|}f_I(x)\prod_{i\in I}y_i
%\end{align*}
\begin{align*}
\sum_{F\in\Delta}x^{r-|F|}\prod_{q_i\in F}(1+y_i(x+1))
&= \sum_{J\subseteq[r]}\sum_{F\in\lk_J(\Delta)_+}x^{r-|J|-|F|}\prod_{i\in J}(1+y_i(x+1))\\
&= \sum_{J\subseteq[r]}\sum_{F\in\lk_J(\Delta)_+}x^{r-|J|-|F|}\sum_{I \subseteq J}(x+1)^{|I|}\prod_{i\in I}y_i\\
&= \sum_{I\subseteq[r]}(x+1)^{|I|}\sum_{I\subseteq J\subseteq[r]}\sum_{F\in\lk_J(\Delta)_+}x^{r-|J|-|F|}\prod_{i\in I}y_i\\
&= \sum_{I\subseteq[r]}(x+1)^{|I|}f_I(x)\prod_{i\in I}y_i
\end{align*}
where $f_I(x)$ is defined as
\[
f_I(x)=\sum_{I\subseteq J\subseteq[r]}\sum_{F\in\lk_J(\Delta)_+}x^{r-|J|-|F|}.
\]

Using the decomposition
\[
\lk_I(\Delta)=\bigsqcup_{I\subseteq J\subseteq[r]}\{\{q_j:\ j\in J\}\cup F:\ F\in\lk_J(\Delta)_+\},
\]
we have
\[
f_I(x)=\sum_{F\in\lk_I(\Delta)}x^{(r-|I|)-|F|}.
\]
Therefore, the polynomial $x^{r-|I|}f_I(1/x)$ is the $f$-polynomial of $\lk_I(\Delta)$.

Now expand the left-hand side:
\begin{align*}
H(x+1,\ y_1+1, \ldots, y_r+1) &= \sum_{F\in\Gamma}(x+1)^{|F|}\prod_{t_i\in\epsilon(F)}(1+y_i)\\
& = \sum_{F\in\Gamma}(x+1)^{|F|}\sum_{I \subseteq \epsilon(F)}\prod_{i\in I}y_i\\
&= \sum_{I\subseteq[r]}\sum_{\substack{F\in\Gamma\\I\subseteq\epsilon(F)}}(x+1)^{|F|}\prod_{i\in I}y_i\\
&= \sum_{I\subseteq[r]}(x+1)^{|I|}\sum_{\substack{F\in\Gamma\\I\subseteq\epsilon(F)}}(x+1)^{|F| - |I|}\prod_{i\in I}y_i.
\end{align*}
In the above calculation, we abuse notation and write $I\subseteq\epsilon(F)$ to mean that $\{t_i:\ i\in I\}$ is a subset of $\epsilon(F)$.



Now fix some $I \subseteq [r]$. Consider the nonfriendly complex $\Gamma^{NF}(\lambda_{\textsf{N}})$ where $\textsf{N} := \{\textsf{v}_i \mid i \in I\} \cup \M$. Observe that \[\sum_{\substack{F\in\Gamma\\I\subseteq\epsilon(F)}}(x+1)^{|F| - |I|} = \sum_{F\backslash I \in \Gamma^{NF}(\lambda_{\textsf{N}})}(x+1)^{|F|-|I|}\] and the latter is the $f$-polynomial of $\Gamma^{NF}(\lambda_{\textsf{N}})$ evaluated at $x+1$. Using Lemma~\ref{lem_shellable} and Lemma~\ref{link_marked_shape_isom}, we have
\begin{align*}
H(x+1,\ y_1+1, \ldots, y_r+1) &= \sum_{I\subseteq[r]}(x+1)^{|I|}h_I(x+1)\prod_{i\in I}y_i,
\end{align*}
where $h_I(x)$ is the $h$-polynomial of $\lk_I(\Delta)$. Using the identity $x^rf(1/x) = h(x+1)$ satisfied by all $f$- and $h$-polynomials on the same simplicial complex, we obtain that $h_I(x+1) = f_I(x)$. The desired result follows.
\end{proof}



Setting $y=y_1=\cdots=y_r$, we obtain the immediate corollary. Theorem~\ref{thm_main_FH} then follows from a simple substitution of variables.

\begin{coro} For any marked shape $\lambda_{\M}$, the following identity holds:
\[
H(x+1,y+1)= x^r F\left(\frac{1}{x},\ \frac{1+y(x+1)}{x}\right).
\]
\end{coro}






\subsection{\texorpdfstring{$F$}{F}-triangle and \texorpdfstring{$M$}{M}-triangle}\label{subsec_FM}


Let $\Psi=\Psi(\lambda_{\M})$ be the shard intersection order for the shape $\lambda_{\M}$. The $M$-triangle (introduced in Section~\ref{subsec_transitive}) is the polynomial
\[M(x,y)=\sum_{\substack{X,Y\in\Psi\\Y\leq X}}\mu(Y,X)x^{\rk(X)}y^{\rk(Y)}=\sum_{i,j=0}^rm_{ij}x^iy^j.\]

This polynomial is well-defined since $\Psi$ is graded by Theorem~\ref{thm_wide_set_graded}. We conjecture that the $M$-triangle and $F$-triangle satisfy the identity in Conjecture~\ref{conj_main_FM}. This conjecture has been verified using Sage~\cite{sage} for the $3\times 4$ rectangle shape, along with its subgraphs.






\begin{exam}

Let $\lambda$ be a $3\times 4$ rectangle. We represent the $F$-triangle, $H$-triangle, and $M$-triangle for this shape by three $7\times 7$ lower-triangular matrices as follows.

If $f_{ij}$ is the coefficient of $x^{i-j}y^j$ in $F(x,y)$, then
\[(f_{ij}) = \left(\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0\\22 & 6 & 0 & 0 & 0 & 0 & 0\\141 & 82 & 15 & 0 & 0 & 0 & 0\\395 & 344 & 123 & 20 & 0 & 0 & 0\\548 & 620 & 319 & 94 & 15 & 0 & 0\\371 & 506 & 332 & 134 & 37 & 6 & 0\\98 & 154 & 121 & 60 & 22 & 6 & 1\end{matrix}\right).\]

Letting $h_{ij}$ and $m_{ij}$ be the coefficients of $x^iy^j$ in $H(x,y)$ and $M(x,y)$, respectively, we have
\begin{align*}
(h_{ij}) &= \left(\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0\\16 & 6 & 0 & 0 & 0 & 0 & 0\\46 & 52 & 15 & 0 & 0 & 0 & 0\\31 & 76 & 63 & 20 & 0 & 0 & 0\\4 & 20 & 40 & 34 & 15 & 0 & 0\\0 & 0 & 3 & 6 & 7 & 6 & 0\\0 & 0 & 0 & 0 & 0 & 0 & 1\end{matrix}\right),\\ 
\intertext{and}
%\\
(m_{ij}) &= \left(\begin{matrix}1 & 0 & 0 & 0 & 0 & 0 & 0\\-22 & 22 & 0 & 0 & 0 & 0 & 0\\141 & -254 & 113 & 0 & 0 & 0 & 0\\-395 & 965 & -760 & 190 & 0 & 0 & 0\\548 & -1627 & 1726 & -760 & 113 & 0 & 0\\-371 & 1265 & -1627 & 965 & -254 & 22 & 0\\98 & -371 & 548 & -395 & 141 & -22 & 1\end{matrix}\right).
\end{align*}

It is routine to check that these three triangles satisfy the identities in Theorem~\ref{thm_main_FH} and Conjecture~\ref{conj_main_FM}.

\end{exam}









%\section*{Acknowledgements}

\longthanks
Thomas McConville thanks Fr{\'e}d{\'e}ric Chapoton for insightful discussion on Chapoton triangles. Alexander Garver received support from NSERC grant RGPIN/05999-2014 and the Canada Research Chairs program.


\bibliographystyle{amsplain-ac}
\bibliography{ALCO_McConville_398}
%\bibliographystyle{plain}

\end{document}











