%% if you are submitting an initial manuscript then you should have submission as an option here
%% if you are submitting a revised manuscript then you should have revision as an option here
%% otherwise options taken by the article class will be accepted
\documentclass[finalversion]{FPSAC2018}
\articlenumber{75}
%% but DO NOT pass any options (or change anything else anywhere) which alters page size / layout / font size etc

%% note that the class file already loads {amsmath, amsthm, amssymb}

%%STUFF I ADDED


\usepackage{graphicx,verbatim, amsmath, amssymb, amsfonts, ifthen,mathtools,mathabx,epstopdf,placeins,longtable, float, placeins, hyperref, enumitem, array, tikz}
\epstopdfsetup{suffix=}
\DeclareGraphicsExtensions{.ps}
\DeclareGraphicsRule{.ps}{pdf}{.pdf}{`ps2pdf -dEPSCrop -dNOSAFER #1 \noexpand\OutputFile}
%\usepackage[margin=1in]{geometry}


\newtheorem{proposition}{Proposition}[section]
\newtheorem{theorem}[proposition]{Theorem}
\newtheorem{corollary}[proposition]{Corollary}
\newtheorem{lemma}[proposition]{Lemma}
\newtheorem{prop}[proposition]{Proposition}
\newtheorem{cor}[proposition]{Corollary}
\newtheorem{conj}[proposition]{Conjecture}

\newtheorem{example}[proposition]{Example}
\newtheorem{definition}[proposition]{Definition}
\newtheorem{question}[proposition]{Question}

\newtheorem{remark}[proposition]{Remark}
\newtheorem{problem}[proposition]{Problem}

% This is for setting off words we define in a separate typeface.
\newcommand{\newword}[1]{\textbf{\emph{#1}}}
\newcommand{\arrangement}{\mathcal{A}}
\newcommand{\poset}{\mathcal{P}}
\newcommand{\R}{\mathbb R}
\newcommand{\g}{\mathbf{g}}
\newcommand{\x}{\mathbf{x}}
\newcommand{\z}{\mathbf{z}}
\newcommand{\eulerian}{\genfrac{\langle}{\rangle}{0pt}{}}
\newcommand{\ep}{\varepsilon}
\newcommand{\set}[1]{\left\lbrace#1\right\rbrace}
\renewcommand{\Join}{\bigvee}
\newcommand{\Meet}{\bigwedge}
\newcommand{\inv}{\operatorname{inv}}
\newcommand{\des}{\operatorname{des}}
\newcommand{\Con}{\operatorname{Con}}
\newcommand{\supp}{\operatorname{supp}}
\renewcommand{\th}{^{\text{th}}}
\newcommand{\meet}{\wedge}
\newcommand{\join}{\vee}
\newcommand{\A}{\mathcal{A}}
\newcommand{\E}{\mathcal{E}}
\newcommand{\F}{\mathcal{F}}
\newcommand{\G}{\mathcal{G}}
\newcommand{\C}{\mathcal{C}}
\renewcommand{\H}{\mathcal{H}}
\newcommand{\K}{\mathcal{K}}
\newcommand{\T}{\mathcal{T}}
\newcommand{\M}{\mathcal{M}}
\renewcommand{\O}{\mathcal{O}}
\newcommand{\SNM}{\mathcal{S}\mathcal{N}\mathcal{M}}
%\newcommand{\bC}{\mathcal{BC}}
\newcommand{\Camb}{\operatorname{\mathbf{Camb}}}
\newcommand{\bC}{\operatorname{\mathbf{biCamb}}}
\newcommand{\Cat}{\operatorname{Cat}}
%\newcommand{\bC}{\operatorname{biCamb}}
\newcommand{\pidown}{\pi_\downarrow}
\newcommand{\piup}{\pi^\uparrow}
\newcommand{\covers}{{\,\,\,\cdot\!\!\!\! >\,\,}}
\newcommand{\covered}{{\,\,<\!\!\!\!\cdot\,\,\,}}
\newcommand{\1}{\hat{1}}
\newcommand{\0}{\hat{0}}
\newcommand{\2}{\mathbf{2}}
\newcommand{\onto}{\twoheadrightarrow}
\newcommand{\reals}{\mathbb{R}}
%\renewcommand{\o}{^{\circ}}
\newcommand{\refines}{{\,\underline{\ll}\,}}
\newcommand{\can}{\operatorname{can}}
\newcommand{\cov}{\operatorname{cov}}
\newcommand{\Irr}{\operatorname{Irr}}
\newcommand{\ijr}{\operatorname{ijr}}
\newcommand{\Del}{\operatorname{\Delta}}
\newcommand{\covdown}{\cov_{\downarrow}}
\newcommand{\covup}{\cov^{\uparrow}}
\newcommand{\wedgesum}{\mathbin{\rotatebox[origin=c]{270}{$\succ$}}}
\newcommand{\Row}{\operatorname{Row}}
\newcommand{\tors}{\operatorname{tors}}
\newcommand{\lk}{\operatorname{lk}}


\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
%%END OF STUFF I ADDED	


\usepackage[backend=bibtex]{biblatex}
%
\addbibresource{75-Barnard.bib}

%% define your title in the usual way
\title{The Canonical Join Complex of the Tamari lattice}

%% define your authors in the usual way
%% use \addressmark{1}, \addressmark{2} etc for the institutions, and use \thanks{} for contact details
\author{Emily
Barnard\thanks{\href{mailto:e.barnard@northeastern.edu}{e.barnard@northeastern.edu}}\addressmark{1}}

%% then use \addressmark to match authors to institutions here
\address{\addressmark{1}Department of Mathematics, College of Science,
Northeastern University, Boston, MA}

%% put the date of submission here
\received{November 14, 2017}

%% leave this blank until submitting a revised version
%\revised{}

%% put your English abstract here, or comment this out if you don't have one yet
%% please don't use custom commands in your abstract / resume, as these will be displayed online
%% likewise for citations -- please don't use \cite, and instead write out your citation as something like (author year)
\abstract{In this paper, we study a simplicial complex on the elements of the Tamari lattice in types A and B called the canonical join complex.
The canonical join representation of an element $w$ in a lattice $L$ is the unique lowest expression $\bigvee A$ for $w$.
We abuse notation and also say that the set $A$ is a canonical join representation (when we mean $\bigvee A$ is a canonical join representation).
The collection of all such subsets is an abstract simplicial complex called the canonical join complex of $L$.
We realize the canonical join complex of the Tamari lattice as a complex of noncrossing arc diagrams, give a shelling order on its facets, and show that it is homotopy equivalent to a wedge of Catalan-many spheres.}

%% put your French abstract here, or comment this out if you don't have one
\resume{
Dans cet article, nous \'{e}tudions un complexe simplicial sur les \'{e}l\'{e}ments du Treillis de Tamari en types A et B appel\'{e} complexe sup-canonique.
Nous caract\'{e}risons le complexe sup-canonique du Treillis de Tamari comme
 un complexe de diagrammes d'arcs non crois\'{e}s, 
donnons un ordre d'\'epluchage sur ses facettes, 
et montrons qu'il est homotope \'{a} un ``wedge'' de plusieurs sph\'{e}res de type Catalan.
}

%% put your keywords here, or comment this out if you don't have them yet
%\keywords{math, maths, mathematics}

%% you can include your bibliography however you want, but using an external .bib file is STRONGLY RECOMMENDED and will make the editor's life much easier
%% regardless of how you do it, please use numerical citations, ie. [xx, yy] in the text

%% this sample uses biblatex, which (among other things) takes care of URLs in a more flexible way than bibtex
%% but you can use bibtex if you want
%\usepackage[backend=bibtex]{biblatex}
%\addbibresource{sample.bib}
%% note the \printbibliography command at the end of the file which goes with these biblatex commands

\begin{document}

\maketitle
%% note that you DO NOT have to put your abstract here -- it is generated by \maketitle and the \abstract and \resume commands above

\section{Introduction}
In this paper, we study a certain simplicial complex on the elements of the Tamari lattice arising from a lattice-theoretic ``factorization'' called the canonical join representation.
Informally, the canonical join representation of an element~$w$ is the unique lowest irredundant expression $\Join A$ for $w$.
An expression $\Join A$ is irredundant if for each $A'\subsetneq A$, the join $\Join A'$ is strictly smaller than $\Join A$.
In Section~\ref{lattice background}, we make the notion of ``lowest'' precise  by comparing the order ideal generated by $A$ under containment, for each such expression.
For example, the canonical join representation of an element in the boolean lattice is the join of the atoms below it.
In the Tamari lattice shown in Figure~\ref{pentagon}, the top element $\1$ has three irredundant join representations: $\Join \{\1\}$, $\Join \{x,z\}$, and $\Join \{x,y\}$.
The canonical join representation is the lowest among these, the join of the atoms~$\{x,y\}$.
When $\Join A$ is the canonical join representation for some element $w\in L$, we will abuse notation and say that the set $A$ is a canonical join representation (when, more precisely, we mean that the expression $\Join A$ is a canonical join representation).


In a finite lattice $L$, each element admits a canonical join representation if and only if $L$ satisfies a certain weakening of the distributive law called join-semidistributivity.
(For a non-example, see Example~\ref{nonexample} and Figure~\ref{modular}.)
In this case, we say that $L$ is join-semidistributive. 
We define the \newword{canonical join complex} of $L$ to be the abstract simplicial complex whose faces are the subsets $A$ of~$L$ such that $A$ is a canonical join representation.
(By \cite[Proposition~2.2]{arcs} this is indeed a complex.)
In general, the canonical join complex is not a pure complex.
In particular, the canonical join complex of the Tamari lattice is very different from the associahedron.
\begin{figure}[h]
  \centering
   \scalebox{.7}{   
  \begin{picture}(0,75)(0,50)
  \put(-100,50){ \includegraphics{boolean.pdf}}
  \put(0, 60){
     \scalebox{.9}{
\begin{tikzpicture}
\draw [black, ultra thick, fill=gray] (1,0) -- (-1,0) -- (0,1.73)--(1,0);
\draw [fill] (1,0) circle [radius=0.075];
\draw [fill] (-1,0) circle [radius=0.075];
\draw [fill] (0,1.73) circle [radius=0.075];
\node at (-1.5,.1) {$a$};
\node at (1.5,.1) {$c$};
\node at (0,2.1) {$b$};
\end{tikzpicture}}
  }
   \put(-35,80){$c$}
   \put(-68,84){$b$}
   \put(-105.5,80){$a$}
   \end{picture}

   }
   %\vspace{3pt}
     \caption{The canonical join complex of the Boolean lattice is a simplex on its atoms.}
        \label{boolean fig}
\end{figure}
\begin{figure}[h]
  \centering
   \scalebox{.8}{ \includegraphics{Pentagon.pdf}
   \begin{picture}(0,50)(0,50)
   \put(-2,82){$y$}
   \put(-2,106){$z$}
   \put(-68.5,82){$x$}
   \end{picture}
   \qquad \qquad
      \scalebox{.8}{ \includegraphics{canonicalgraph.pdf}
   \begin{picture}(0,50)(0,50)
   \put(-9.5,65){$y$}
   \put(-27,95){$z$}
   \put(-60.5,65){$x$}
   \end{picture}}}
     \caption{A Tamari lattice and its canonical join complex.}
        \label{pentagon}
\end{figure}

For each finite Coxeter group $W$ and each orientation $c$ of its associated Coxeter diagram, there is a lattice quotient of the weak order on $W$ called the \newword{$c$-Cambrian lattice}.
The canonical join representation of its elements is closely related to the associated cluster algebra and to the noncrossing partition lattice $NC(W,c)$ \cite{typefree}.
In type A, each $c$-Cambrian lattice is a lattice quotient of the weak order on $S_n$, consisting of certain pattern avoiding permutations.
In particular, when $c$ is a linear orientation -- an orientation in
which all of the arrows point in the same direction -- the corresponding $c$-Cambrian lattice is a Tamari lattice.
For one choice of linear orientation, the elements of this quotient are the 312-avoiding permutations.
Throughout, we write $T_n$ for this realization of the Tamari lattice.
That is, $T_n$ is the subset of the weak order on $S_n$ induced by the set of 312-avoiding permutations.
(For the opposite orientation, the elements of the corresponding $c$-Cambrian lattice avoid the pattern 231.) 
%Throughout we write $T_n$ for the lattice quotient of the weak order on $S_n$ consisting of the set of 312-avoiding permutations.

As with the classical Tamari lattice, the type-B Tamari lattice can be realized as a partial order on certain triangulations of a fixed convex polygon or certain bracket vectors.
We realize the type-B Tamari lattice~$T_{n}^s$ as a $c$-Cambrian lattice for the type-B Coxeter group $B_n$ where $c$ is a linear orientation for the type-B Coxeter diagram.
See \cite[Section~7]{cambrian} and~\cite{Hugh_noncrossing}.

%Below we give our main results.
In the following theorems and throughout this abstract, we do not distinguish between an abstract simplicial complex and its geometric realization.
In the statements, $\Cat(A_{r-1})=\frac{1}{r+1}\binom{2r}{r}$ is the classical Catalan number, $\Cat(B_r)=\binom{2r}{r}$ is the type-B analogue, and $\Cat^+(B_r)=\binom{2r-1}{r-1}$ is the type-B positive Catalan number.
\begin{theorem}\label{thm: linear cambrian complex type A}
The canonical join complex of the Tamari lattice $T_n$ is shellable.
It is contractible when $n$ is even and homotopy equivalent to a wedge of $\Cat(A_{r-1})$ many spheres, all of dimension $r-1$, when $n=2r+1$.
\end{theorem}

\begin{theorem}\label{thm: linear cambrian complex type B}
The canonical join complex of the type-B Tamari lattice $T_n^s$ is shellable.
\begin{enumerate}
\item When $n=2r$, the canonical join complex is homotopy equivalent to a wedge of $\Cat(B_r)$ many spheres all of dimension $r-1$.
\item When $n=2r-1$ for $r>1$, the canonical join complex is homotopy equivalent to a wedge of $\Cat^+(B_{r})-\Cat(A_{r-2})=2\binom{2r-2}{r-2}$ many spheres, equally distributed in dimensions $r-1$ and $r-2$.
\end{enumerate}
\end{theorem}
%\Cat^+(B_{k})-\Cat(A_{k-2})$=2\binom{2k-2}{k-2}
%The following theorem considers the more general $c$-Cambrian lattices in type A.\

Canonical join representations have played a key role in Coxeter--Catalan combinatorics \cite[Section~8]{typefree} and in Coxeter-biCatalan combinatorics \cite{bicat}.
More recently, canonical join representations have appeared in the study of the lattice of torsion classes over a finite dimensional associative algebra \cite{B-C-Z}.
The topology of a join-semidistributive lattice is closely related the combinatorics of its canonical join complex.
For example, see \cite[Theorem~1.2 and Corollary~1.3]{flag}.

The canonical join complex was first defined in \cite{arcs}, and studied in depth in \cite{flag}.
In \cite{arcs}, Reading considered the canonical join complex of the symmetric group $S_n$ (ordered according to the weak order) and its connections to enumerative problems involving pattern avoiding-permutations.
%for the special case of the symmetric group (ordered according to the weak order), and studied in connection with several enumerative problems involving pattern-avoiding permutations.
The canonical join representation of a permutation is encoded by a noncrossing arc diagram, a generalization of the bump diagram for a noncrossing partition.
Each diagram consists of a collection of curves, called arcs, that satisfy certain compatibility relations.
For example, no two arcs may intersect in their interiors.
(See Section~\ref{arc background} for the complete definition.)
Each arc corresponds to a vertex of the canonical join complex, and a collection of arcs corresponds to a face if and only if each pair of arcs is compatible.
(This is \cite[Corollary~3.5]{arcs}.)
Figure~\ref{S3 arcs} shows the noncrossing arc diagrams that correspond to the faces in the canonical join complex of the weak order on $S_3$.
\begin{figure}[h]
  \centering
   \scalebox{1.1}{ \includegraphics{Sym3.pdf}}
     \caption{The faces in the canonical join complex of the weak order on $S_3$.}
        \label{S3 arcs}
\end{figure}

Like the $h$-complex of the Coxeter complex defined in \cite{hcomplex}, the entries of the $f$-vector of the canonical join complex of the weak order on the symmetric group are equal to the Eulerian numbers.
(However, in general, the canonical join complex of the symmetric group is not isomorphic, or even homotopy-equivalent, to the $h$-complex of the Coxeter complex.)
Similar statements hold for the canonical join complex of the Tamari lattice and each $c$-Cambrian lattice:
The entries of the $f$-vector of the canonical join complex of the Tamari lattice (in both types A and B) are equal to the Narayana numbers (of type A and B respectively).
As an immediate consequence of Theorems~\ref{thm: linear cambrian complex type A} and \ref{thm: linear cambrian complex type B}, the alternating sum of the Narayana numbers is either zero or a signed Catalan number.
For $n$ even, the alternating sum of type-B Narayana numbers is the type-B Catalan number.
These identities are well-known and also appear as specializations of Coker's identities. 
See \cite{coker}, or \cite[Equation~1.1]{alt_sum} for the type-A case and
\cite[Equation~2.1]{alt_sum} for the type-B case.


We conclude this introduction by considering the topology the canonical join complex of the more general $c$-Cambrian lattices in type A.
\begin{theorem}\label{thm: vertex decomp}
For each orientation $c$ of the type-A Coxeter diagram, the canonical join complex of the corresponding $c$-Cambrian lattice is vertex decomposable.
\end{theorem}
Since vertex decomposability implies shellability, and the Tamari lattice is an example of a $c$-Cambrian lattice, Theorem~\ref{thm: vertex decomp} implies the shellability assertion in Theorem~\ref{thm: linear cambrian complex type A}.
(We highlight Theorem~\ref{thm: linear cambrian complex type A} here because its proof is more approachable, and it will motivate the proof of the analogous type-B result.)
The particularly nice topological results for the Tamari lattice and the Tamari-like $c$-Cambrian lattices in type A do not extend to other finite Coxeter groups.
For example, for each orientation $c$, the $c$-Cambrian lattice in the type-$D_5$ Coxeter group is not shellable.
% and the canonical join complex for the weak order on the symmetric group is generally not shellable. 
%\subsection{The shard intersection order}

\section{Background}
\subsection{Lattice-theoretic background}\label{lattice background}
In this section, we briefly review the necessary lattice-theoretic terminology.
Throughout, we assume that $L$ is a finite lattice.
A \newword{join representation} for an element $w\in L$ is an expression $\Join A$ that evaluates to~$w$, where $A$ is a subset of $L$.
A join representation $\Join A$ is a \newword{irredundant} if $\Join A' <\Join A$ for each proper subset $A'\subsetneq A$.
Observe that if $\Join A$ is irredundant, then $A$ is an antichain.
We write $\ijr(w)$ for the collection of irredundant join representations of $w$.
We partially order $\ijr(w)$ as follows: $A \refines B$ whenever the order ideal generated by $A$ is contained in the order ideal generated by $B$.
(This relation is also sometimes called \newword{join-refinement} \cite[Section I.3]{free_lattice}.)
The \newword{canonical join representation} of $w$ is the unique minimal element of $\ijr(w)$, when such an element exists.
%The elements $j\in A$ are called the \newword{canonical joinands} of $w$.
%At times we say that the set $A$ is a canonical join representation when we mean that the expression $\Join A$ is a canonical join representation.

\begin{example}\label{ex: join irreducible}
Recall that $j$ is join-irreducible if, whenever $j=\Join A$, we have $j\in A$.
(Equivalently, $j$ is join-irreducible if and only if it covers precisely one element in $L$.)
Thus, if $j$ is join-irreducible then $\Join \{j\}$ is its canonical join representation.
On the other hand, if $\Join A$ is a canonical join representation, then each element $a\in A$ is join-irreducible.
\end{example}

\begin{figure}[h]
  \centering
   \scalebox{.7}{\includegraphics{M3.pdf}}
     \caption{The canonical join representation of the top element does not exist.}
        \label{modular}
\end{figure}
\begin{example}\label{nonexample}
Let $w$ be the top element of the lattice shown in Figure~\ref{modular}.
Each pair of atoms is a minimal join representation for $w$.
Thus, $w$ does not have a canonical join representation.
\end{example}

When $L$ is finite and each element admits a canonical join representation, we say that $L$ is \newword{join-semidistributive}.
If the dual lattice is also join-semidistributive, then we say that $L$ is \newword{semidistributive}.
(There is an equivalent definition that involves a weakening of the distributive law. 
See \cite[Theorem~2.24]{free_lattice}.)

Suppose that $L$ is a finite join-semidistributive lattice.
We define the \newword{canonical join complex} of $L$ to be the collection of subsets $A$ such that $A$ is a canonical join representation.
Observe that the vertex set for the canonical join complex is just the set of join-irreducible elements in $L$.
%That is, $A$ satisfies of $L$ satisfying:
%There is some element $w\in L$ such that $\Join A=w$ and $A$ is the canonical join representation of $w$.
Since $L$ is join-semidistributive, the number of faces in the canonical join complex is equal to the number of elements in $L$.
The next proposition is \cite[Proposition~2.2]{arcs}, and it implies that the canonical join complex is indeed a simplicial complex.
\begin{proposition}\label{simplicial complex}
Suppose $L$ is a finite lattice and $A$ is a canonical join representation in $L$. 
Then each subset of $A$ is a canonical join representation.
 \end{proposition} 
 
\subsection{The noncrossing arc complex}\label{arc background}
In this section, we review the definition of a noncrossing arc diagram, establish some useful notation, and review the connection to canonical join representations.
The definitions here are based on \cite{arcs}, where the reader will find additional examples.
For the remainder of the paper, we write $[n]$ for the set $\{1,2,\ldots, n\}$ and $[i,k]$ for the set $\{i, i+1, \ldots, k\}$ when $i<k$.

A \newword{noncrossing arc diagram} consists of $n$ nodes arranged vertically and labeled in increasing order from bottom to top, together with a (possibly empty) collection of curves called \newword{arcs}.
Each arc connects two distinct nodes and travels monotonically upward from its lower endpoint to its higher endpoint, passing either to the left or to the right of each node in between.
In addition, each pair of arcs $\alpha$ and $\alpha'$ must satisfy:
\begin{enumerate}[label={(C\arabic*)}]
\item $\alpha$ and $\alpha'$ do not share the same top endpoint or the same bottom endpoint;\label{c1}
\item $\alpha$ and $\alpha'$ do not intersect in their interiors.\label{c2}
\end{enumerate}

The \newword{support \textit{of an arc}} $\alpha$, written $\supp(\alpha)$, with endpoints $i<l$ is the set of numbers $\{i, i+1, \ldots, l\}$.
We write $\supp(\alpha)^\circ$ for the set $\{i+1, \ldots, l-1\}$.
When $\supp(\alpha)^{\circ}$ is empty, we say that $\alpha$ is a \newword{simple arc}.
We say that the arcs $\alpha$ and $\alpha'$ are \newword{combinatorially equivalent} if $\alpha$ and $\alpha'$ have the same endpoints and for each $k\in\supp(\alpha)^\circ$, $\alpha$ and $\alpha'$ pass on the same side (either left or right) of $k$.
Each arc is considered only up to combinatorial equivalence.
Two arcs are \newword{compatible} if there is a noncrossing arc diagram that contains them.
The next proposition is \cite[Proposition~3.2]{arcs}.
\begin{proposition}\label{compatibility}
Given any collection of pairwise compatible arcs, there is a noncrossing arc diagram whose arcs are combinatorially equivalent to the given arcs.
\end{proposition}
\begin{figure}[h]
  \centering
   \scalebox{.9}{ \includegraphics{leftarcs.pdf}}
     \caption{Nonempty faces of the noncrossing arc complex on seven nodes.}
        \label{some diagrams}
\end{figure}

The \newword{noncrossing arc complex} on $n$ nodes is the simplicial complex whose faces are the collections of pairwise compatible arcs.
We view each collection of compatible arcs as a noncrossing arc diagram.
For example, Figure~\ref{some diagrams} depicts some of the nonempty faces in the noncrossing arc complex on seven nodes.
To avoid confusion, we will only use the word \textit{vertex} to refer to a vertex of the noncrossing arc complex; that is, a diagram that contains precisely one arc.
The endpoint of an arc will always be referred to as a \textit{node}. 

The next theorem is \cite[Corollary~3.4]{arcs}.
\begin{theorem}\label{arc complex}
The canonical join complex of the weak order on $S_n$ is isomorphic to the noncrossing arc complex on $n$ nodes.

\end{theorem}

Restricting to the set of 312-avoiding permutations, we obtain the canonical join complex of the Tamari lattice $T_n$.
In the statement below, a \newword{right arc} is an arc that does not pass to the left of any node between its endpoints.
For example, the left-most noncrossing arc diagram in Figure~\ref{some diagrams} contains only right arcs.
(See also \cite[Example~4.9]{arcs}.)
\begin{corollary}\label{tamari complex}
The canonical join complex of the Tamari lattice $T_n$ is isomorphic to the subcomplex of the noncrossing arc complex on $n$ nodes induced by the set of right arcs.
\end{corollary}

Recall that a complex is \newword{flag} if each of its minimal non-faces has size 2.
As an immediate consequence of Proposition~\ref{compatibility} and Corollary~\ref{tamari complex}, the canonical join complex of the Tamari lattice $T_n$ is flag.
%(See \cite[Corollary~3.6]{arcs}.)
(Indeed, the canonical join complex of any finite semidistributive lattice is flag.
This is one direction of \cite[Theorem~1.1]{flag}.)

We write $\alpha_{i,k}$ for the right arc with endpoints $i<k$.
(Observe that there is precisely one right arc for each pair of nodes $i,k\in [n]$.)
Throughout the remainder of the paper, we write $\Delta(n)$ for the complex of compatible right arcs on $n$ nodes.
At times it is convenient to restrict the node set of an arc diagram to a contiguous subset of $[n]$.
We write $\Delta([i,k])$ for the subcomplex of $\Delta(n)$ induced by restricting to the nodes $[i,k]$. 

%[NOTATION]
%\begin{itemize}
%\item A \newword{centrally symmetric arc} is either an arc fixed by the central symmetry, or a pair of arcs that is fixed by the central symmetry.
%Given a pair of arcs $\alpha_{i,k}$ and $\alpha_{-k,-i}$ that are fixed by the central symmetry, we write $\alpha_{i,k}^s$ for the centrally symmetric arc in $\Delta^s(n)$, where $k>i$ and $k>-i$.
%\item Suppose that $I= \{i_1<i_2<\ldots<i_k\}$ is an increasing subset $[n]$, with $S\subset I$ and $T=I\setminus S$.
%We write $\Delta^{s}(I,S,T)$ for the complex that is obtained by restricting $\Delta(\{-i_{k},\ldots i_k\}, S\cup -T, T\cup -S)$ to the collection of centrally symmetric arcs.
%\item When $I=[n]$ we write $\Delta^s(n, S,T)$.
%\item When $I=[n]$ and $S$ is empty, we write $\Delta^s(n)$.
%\end{itemize}

%\subsection{Noncrossing perfect matchings}\label{background}
%In this section, we introduce and count certain matchings on graphs.
%Recall that the \newword{Coxeter-Catalan number} corresponding to the Coxeter group $W$ is the number \[\Cat(W)= \prod_{i=1}^n \frac{e_i+h+1}{e_i+1},\] where $\{e_1,\ldots e_n\}$ are the exponents for $W$, and $h$ is its Coxeter number (see \cite[Section~3.20]{humphreys}).
%When $W$ is rank 0, the formula for $\Cat(W)$ is the empty product, which we interpret to be 1.
%In the identities given below, it is convenient for us to write $B_0$ and $B_1$.
%We interpret $B_0$ as the rank 0 Coxeter group, and we interpret $B_1$ as the rank 1 Coxeter group.
%So, we have $\Cat(A_0)=\Cat(B_0)=~1$, and also $\Cat(B_1)=\Cat(A_1)=2$.
%The \newword{positive Catalan number} is the number \[\Cat^+(W)= \prod_{i=1}^n \frac{e_i+h-1}{e_i+1}.\]
%
%The next lemma follows immediately from the formulas for $\Cat(B_n)$ and $\Cat^+(B_n)$.
%(Recall that, the Coxeter number for $B_n$ is equal to $2n$, and its exponents are $1,3,\ldots 2n-1$.)
%\begin{lemma}\label{2cat+ = cat}
%$\Cat(B_n) = 2\Cat^+(B_n)$, for $n>0$.
%\end{lemma}
%The next lemma is essentially \cite[Proposition~3.7]{ga}, specialized to $W=B_{n-1}$ and $k=n-1$.
%\begin{lemma}\label{cat+ B formula}
%$\Cat^+(B_n) = \sum_{i=0}^{n-2} \Cat(B_i) \Cat(A_{n-i-2}) + \Cat(B_{n-1})$
%\end{lemma}
%
%A \newword{perfect matching} on the set $[2n]$ is a partition of $[2n]$ into blocks of size two.
%We will represent a perfect matching in the following way: 
%Draw~$2n$ nodes vertically, and label them in increasing order $1,2,\ldots, 2n$ from bottom to top.
%We draw the edges in a matching so that they pass to the right of the nodes between their endpoints.
%%If $i<j$ are in a block together, then we draw an arc connecting $i$ and $j$ that passes to the right of each node between $i$ and $j$.
%%To distinguish the arcs in a matching from the arcs in a noncrossing arc diagram, we call the former \newword{curves} or \newword{blocks}.
%A perfect matching is \newword{noncrossing} if no two edges cross in their interiors.
%It is well-known that there are $\Cat(A_{n-1})$ many noncrossing perfect matchings on $\{1,2,\ldots, 2n\}$.
%(See for example \cite[Exercise~6.19]{EC2}.)
%
%Consider the set of noncrossing perfect matchings on $[\pm n]$.
%We label the nodes in increasing order $-n,\ldots,-1,1,\ldots, n$.
%Such a matching~$M$ is \newword{symmetric} if it is fixed by negation.
%That is, the set $\{a,b\}$ is an edge in $M$ if and only if $\{-a, -b\}$ is also an edge.
%We say that the edge $\{-a, a\}$ is \newword{fixed by negation}.
%Write $O_r$ for the number of symmetric noncrossing perfect matchings on the set $[\pm(2r-1)]$, and~$E_r$ for the number of symmetric noncrossing perfect matchings on the set $[\pm(2r)]$.
%
%
%\begin{proposition}\label{symmetric matchings}
%Let $O_r$ and $E_r$ be defined as above.
%\begin{enumerate}
%\item $O_r = \Cat^+(B_r)$, when $r\ge 1$ 
%\item $E_r = \Cat(B_r)$, when $r\ge 0$
%\end{enumerate}
%\end{proposition}
%\begin{proof}
%We prove the proposition by induction.
%The base cases are trivial.
%We assume that for each $i<r$, both statements hold.
%We count symmetric noncrossing perfect matchings on the set $[\pm(2r-1)]$ in which $j$ is the largest positive number such that $\{-j,j\}$ is an edge. 
%Because the restriction to the (possibly empty) set $\{j+1,\ldots,2r-1\}$ is a noncrossing perfect matching, $j$ is odd.  
%
%When $j=2r-1$, we remove this edge to obtain a symmetric noncrossing perfect matching on $[\pm(2r-2)]$.
%By induction, there are $\Cat(B_{r-1})$ many such matchings.
%In general, for $j= 2i+1$, we map our matching to a pair $(A, B)$ where~$A$ is a noncrossing perfect matching on the nodes $\{j+1,\ldots,2r-1\}$, and~$B$ is a symmetric noncrossing perfect matching on the set $[\pm (j-1)]$.
%By induction there are $\Cat(B_{i}) \Cat(A_{r-i-2})$ many matchings.
%Summing over $i\ge 0$ (and adding the term where $j=2r-1$), we obtain $O_r= \sum_{i=0}^{r-2} \Cat(B_i) \Cat(A_{r-i-2})+\Cat(B_{r-1})$.
%By Lemma~\ref{cat+ B formula}, we conclude that $O_r = \Cat^+(B_r)$.
%
%For each symmetric noncrossing perfect matching on $[\pm 2r]$, write $j$ for the number that is paired with $2r$.
%(So, $j$ ranges over the set $\{1,3,\ldots, 2r-1\}\cup \{-2r\}$.)
%Our argument above implies that there are $\Cat^+(B_n)$ many matchings with $j=-2r$.
%Take $j=2i+1$, with $i\in [0,r-2]$.
%Each matching maps bijectively to a pair $(A,B)$, where $A$ is a noncrossing perfect matching on the set $\{j+1, \ldots, 2r-1\}$, and $B$ is a symmetric noncrossing perfect matching on the set $[\pm (j-1)]$.
%By induction, we have $\Cat(B_i)\Cat(A_{r-i-2})$ many diagrams.
%Summing over all $i$, we obtain $\sum_{i=0}^{r-2}\Cat(B_i) \Cat(A_{r-i-2}) + \Cat(B_{r-1})$.
%Finally, we add the term $\Cat^+(B_n)$, where $j=-2r$.
%Together Lemma~\ref{cat+ B formula} and Lemma~\ref{2cat+ = cat} imply $E_r = \Cat(B_r)$.
%\end{proof}
%
%We write $\M_n$ for the set of symmetric noncrossing perfect matchings on $[\pm n]$ that satisfy either of the two conditions below:
%\begin{itemize}
%\item $M$ contains an edge $\{k,-k\}$ where $k>1$.
%\item There exists no edge in $M$ that is fixed by negation.
%%\item $M$ does not contain a block of the form $\{k, -k\}$, for any $k\in [n]$.
%\end{itemize} 
%Equivalently, $M\not\in \M_n$ if and only if $\{-1,1\}\in M$, and this is the \textit{only} edge in $M$ that is fixed by negation.
%When $n$ is even, every noncrossing perfect matching belongs to $\M_n$.
%In the next proposition we count $\M_n$ for $n$ odd.
%\begin{proposition}\label{odd counting}
%Suppose that $n=2r-1$.
%The number of elements in $\M_n$ is equal to $\Cat^+(B_{r})-\Cat(A_{r-2})=2\binom{2r-2}{r-2}$.
%\end{proposition}
%\begin{proof}
%Let $j$ be the largest positive number satisfying $\{-j,j\}\in M$.
%Observe that, when $n$ is odd, $M\notin M_n$ precisely when the number $j=1$.
%Each matching with $j=1$ maps bijectively to a noncrossing perfect matching on $[2,n]$.
%The statement follows from Proposition~\ref{symmetric matchings}.
%\end{proof}


\section{Shellability of the Tamari lattices}

\subsection{The Tamari lattice in type A}\label{linear cambrian}
In this section we prove a more detailed version of Theorem~\ref{thm: linear cambrian complex type A}.
Before we begin, we recall some terminology.
A \newword{$d$-complex} is a simplicial complex in which the maximal dimension of the faces is equal to $d$.
A $d$-complex is \newword{pure} if each of its facets has dimension $d$.
For each $n>2$, the complex of compatible right arcs $\Delta(n)$ is not pure.
%(See Figure~\ref{pentagon} for a concrete example.)
%(Indeed the canonical join complex for the weak order on any finite Coxeter group $W$ is not pure.)

A (not necessarily pure) complex is \newword{shellable} if its facets can be arranged in a linear order $F_1, \ldots, F_m$ so that the subcomplex $\left(\bigcup_{i=1}^{k-1}\overline{F_i}\right)\cap \overline{F_k}$ is a pure simplicial complex of dimension $\dim(F_k)-1$ for all $k\in [2,m]$.
(We write $\overline{F_k}$ for the collection of faces in $F_k$.)
Such a linear order is called a \newword{shelling}. 
A facet $F$ is a \newword{homology facet} if $\left(\bigcup_{i=1}^{k-1}\overline{F_i}\right)\cap \overline{F_k}$ is equal to the entire boundary of $F_k$.
The following theorem is a combination of \cite[Theorem~3.4 and Theorem~4.1]{simplicial_top}.
\begin{theorem}\label{top h-vector}
%A shellable $d$-complex has the homotopy type of a wedge of spheres in which each $r$-dimensional homology facet contributes a copy of the $r$-dimensional sphere.
Suppose that $\Delta$ is a shellable complex.
Then $\Delta$ is homotopy equivalent to a wedge of spheres where each $r$-dimensional sphere corresponds to an $r$-dimensional homology facet.
\end{theorem}
%Observe that a facet $F_k$ has $|F_k|=|\mathcal{R}(F_k)|$ if and only if $\left(\bigcup_{i=1}^{k-1}\overline{F_i}\right)\cap \overline{F_k}$ is equal to the entire boundary of $F_k$.
%In light of Theorem~\ref{top h-vector}, we call such a facet a \newword{homology facet}. 


Suppose that $\mathcal{L} = F_1, F_2, \ldots, F_m$ is a shelling of the facets for a non-pure simplicial complex.
The \newword{rearrangement lemma} \cite[Lemma~2.6]{simplicial_top}, says that $\mathcal{L}$ can be rearranged so that it satisfies the following condition.
(We write $(DD)$ for ``decreasing dimension''.)
\begin{equation}\label{degree condition}\tag{$DD$}
\text{For facets $F$ and $F'$, if $|F|> |F'|$ then $F$ precedes $F'$ in $\mathcal{L}$.}
\end{equation}
We will see that this condition is sufficient for shelling the facets of $\Delta(n)$.

Fix some non-simple right arc $\alpha_{i,k}\in\Delta(n)$.
Suppose that $\alpha'$ is a right arc that is compatible with $\alpha_{i,k}$.
Note that $\alpha'$ does not have $i$ as its bottom endpoint, nor $i+1$ as its top endpoint (otherwise the two arcs share bottom endpoints or they cross).
Also, since $\alpha'$ is a right arc, it does not pass between $i$ and $i+1$.
Thus, $\{\alpha', \alpha_{i, i+1}\}$ is a face in $\Delta(n)$.
Similarly, $\{\alpha', \alpha_{k-1,k}\}\in \Delta(n)$.
Since~$\Delta(n)$ is a flag complex, we obtain the following lemma.

\begin{lemma}\label{type A swap}
%Suppose that $j$ is a non-simple join-irreducible element in $A_n$ whose corresponding arc $\delta(j)$ has endpoints $i<k$.
%Then, the set of simple reflections $\{s_{k-1}, s_i\}$ is a face in $lk(j')$ for each join-irreducible element $j'\in lk(j)$.
Suppose that $\alpha_{i,k}$ is a right arc in $\Delta(n)$ with $1\le i<k-1\le n-1$.
Then, for each face $F\cup \{\alpha_{i,k}\}$ in $\Delta(n)$, the set $F\cup \{\alpha_{i,i+1}, \alpha_{k-1,k}\}$ is in $\Delta(n)$.
\end{lemma}

For each arc $\alpha$ in $\Delta(n)$ write $S(\alpha)$ for the set of simple arcs that are compatible with it.
In the next lemma we show that the degree of a face $J$ is determined by the set $\bigcap_{\alpha\in J} S(\alpha)$.
Recall that the \newword{degree} of $F$, denoted $\deg(F)$, is $\max\{|F'|: F'\supseteq F\}$.
%the maximal size of the faces containing~$F$.

\begin{lemma}\label{max degree}
Suppose that $J$ is a face in $\Delta(n)$, and write $S'= \bigcap_{\alpha\in J} S(\alpha)$.
Then, $S'\cup J$ is a facet of $\Delta(n)$, and every other face $F$ that contains $J$ has size strictly smaller than $|J\cup S'|$.
In particular, $\deg(J) = |J\cup S'|$.
\end{lemma}
\begin{proof}
%Let $J$ be a face in $\Delta(n)$, and let $S'= \bigcap_{\alpha\in J} S(\alpha)$.
Observe that $S'$ is the unique maximal set of simple arcs that are compatible with each arc in $J$.
Since any two simple arcs are compatible, $S'\cup J$ is in~$\Delta(n)$.
Suppose that $\alpha_{i,k}$ is a non-simple right arc satisfying: the set $J\cup S' \cup \{\alpha_{i,k}\}$ is in $\Delta(n)$.
(In particular, $\alpha_{i,k}$ is compatible with each arc in $S'$.)
Then Lemma~\ref{type A swap} implies that $J\cup S' \cup\{\alpha_{i,i+1}, \alpha_{k-1,k}\}$ is also in $\Delta(n)$.
The maximality of $S'$ implies that $\{\alpha_{i,i+1}, \alpha_{k-1,k}\}\in S'$.
But $\alpha_{i,k}$ is \textit{not} compatible with either $\alpha_{i,i+1}$ or $\alpha_{k-1,k}$ because, for example, $\alpha_{i,k}$ and $\alpha_{i,i+1}$ share a bottom endpoint.
We have reached a contradiction.

Suppose that $F$ is a face in $\Delta(n)$ containing $J$, and $F \not\subseteq J\cup S'$.
Thus, $F$ contains some non-simple arc that does not belong to $J$.
Applying Lemma~\ref{type A swap}, we replace each such non-simple arc (not in $J$) with a pair of simple arcs and obtain a chain of faces that is strictly increasing in size.
This chain terminates in a face of the form $J\cup S''$, where $S''$ is a collection of simple arcs.
Thus $S''\subseteq S'$, and we conclude that $|F|< |J\cup S'|$.
\end{proof}

Finally, we prove a more detailed version of Theorem~\ref{thm: linear cambrian complex type A}.
\begin{theorem}\label{thm: linear cambrian complex type A detailed}
Let $\mathcal{L} = F_1, \ldots, F_m$ be a linear ordering of the facets of $\Delta(n)$ satisfying~(\ref{degree condition}).
Then $\mathcal{L}$ is a shelling for $\Delta(n)$, and $F_k$ is a homology facet if and only if it contains no simple arcs.
Moreover,
\begin{itemize}
\item when $n=2r$, each facet contains a simple arc; 
\item and when $n=2r+1$, each homology facet has precisely $r$ arcs and maps bijectively to a noncrossing perfect matching on $[2r]$.
\end{itemize} 
\end{theorem}

\begin{proof}[Proof of Theorem~\ref{thm: linear cambrian complex type A detailed} and Theorem~\ref{thm: linear cambrian complex type A}]
Let $F_1, \ldots, F_m$ be a linear ordering of the facets of $\Delta(n)$ satisfying~(\ref{degree condition}), and consider the complex $\overline{F_k} \bigcap \left(\bigcup_{i=1}^{k-1} \overline{F_i}\right)$, where~$k$ ranges over the set $[2,m]$.
We write $J$ for the set of non-simple arcs in $F_k$ and $S'$ for the set of simple arcs in $F_k$.
Lemma~\ref{max degree} implies that every other facet containing $J$ occurs after $F_k$ in this linear ordering.
So, each face of $\overline{F_k} \bigcap \left(\bigcup_{i=1}^{k-1} \overline{F_i}\right)$ is contained in $(J\cup S') \setminus \{\alpha\}$, for some $\alpha$ belonging to $J$.
Lemma~\ref{type A swap} says that we can swap out~$\alpha$ in $J$ for a pair of simple arcs, and obtain a face with strictly larger size.
We conclude that $(J\cup S') \setminus \{\alpha\}$ is a facet of $\overline{F_k} \bigcap \left(\bigcup_{i=1}^{k-1} \overline{F_i}\right)$ for each $\alpha\in J$.
We have proved that $F_1,\ldots, F_m$ is a shelling of $\Delta(n)$, and $F_k$ is a homology facet  if and only if it contains no simple arcs.
We write $\H(n)$ for the set of noncrossing arc diagrams that are facets in $\Delta(n)$ and that do not contain any simple arcs.
In general, we write $\H([i,k])$ for the set of noncrossing arc diagrams that are facets in $\Delta([i,k])$ and that do not contain any simple arcs.

Suppose that $n=2r$, and $F$ is a facet of $\Delta(n)$.
We prove by induction on $r$ that $F$ contains a simple arc.
Since $F$ is a facet, there is some arc that has 1 as its bottom endpoint and $l\le n$ as its top endpoint.
If $l$ is equal to 2, then we are done; assume that $l$ is greater than 2.
%Either $\alpha$ shares a top endpoint with another arc, or its top endpoint is $n+1$.
We remove this arc and both of its endpoints.
If some other arc $\alpha'$ in $F$ had $l$ as its bottom endpoint, then we shift $\alpha'$ down so that it now has a bottom endpoint at the node $l-1$.
(No other arc in $F$ has $l-1$ as a bottom endpoint. 
Otherwise it would either cross the arc $\alpha_{1,l}$ or share a top endpoint with it.)
We obtain a facet of $\Delta(n-2)$.
Since this procedure preserves the size of the support of each arc in $F\setminus \{\alpha_{1,l}\}$, we are done by induction.
%We obtain a facet $F'$ of $\Delta([n-2])$, and each arc in $F'$ corresponds to an arc in $F\setminus \{\alpha\}$. 
%In particular, each simple arc in $F'$ maps bijectively to a simple arc in $F\setminus \{\alpha\}$.
%By induction, $F'$ has a simple reflection, and we have proved the desired result.
%Since each arc in $F'$ corresponds to an arc in $\delta(F)\setminus \{\alpha\}$, we have proved the desired result.
%Thus, the canonical join complex for $\Camb(A_n,c)$ is contractible.

\begin{figure}[h]
  \centering
  \scalebox{.4}{  
\begin{tikzpicture}
\node at (0,7) {};
%\draw[fill] (0,7) circle [radius=.1];
\draw[fill] (0,6) circle [radius=.1];
\draw[fill] (0,5) circle [radius=.1];
\draw[fill] (0,4) circle [radius=.1];
\draw[fill] (0,3) circle [radius=.1];
\draw[fill] (0,1) circle [radius=.1];
\draw[fill] (0,0) circle [radius=.1];
\draw[fill] (0,2) circle [radius=.1];
%\draw[fill] (0,-1) circle [radius=.1];
\node at (0,-1) {};

\draw [black, line width=.85mm] (0,0) to [out= 20, in =-20] (0,2);
\draw [black, line width=.85 mm] (0, 2) to [out= 20, in =-20 ] (0,4);
\draw [black, line width=.85 mm] (0, 4) to [out= 20, in =-20 ] (0,6);


\node at (4,3.75) {\Huge{Pull apart}};
\draw [black, ultra thick, ->] (2,3) to (6,3);
\end{tikzpicture}}
\quad \scalebox{.38}{  
\begin{tikzpicture}
\draw[fill] (0,7) circle [radius=.1];
\draw[fill] (0,6) circle [radius=.1];
\draw[fill] (0,5) circle [radius=.1];
\draw[fill] (0,4) circle [radius=.1];
\draw[fill] (0,3) circle [radius=.1];
\draw[fill] (0,1) circle [radius=.1];
\draw[fill] (0,0) circle [radius=.1];
\draw[fill] (0,2) circle [radius=.1];
\draw[fill] (0,-1) circle [radius=.1];

\draw [black, line width=.85mm] (0,-1) to [out= 20, in =-20] (0,1);
\draw [black, line width=.85 mm] (0, 2) to [out= 20, in =-20 ] (0,4);
\draw [black, line width=.85 mm] (0, 5) to [out= 20, in =-20 ] (0,7);

\node at (4.5,4.5) {\Huge{Delete isolated}};
\node at (4.5, 3.75) {\Huge{nodes}};
\draw [black, ultra thick, ->] (2.5,3) to (6.5,3);
\end{tikzpicture} } \quad \scalebox{.38}{  
\begin{tikzpicture}
\draw[fill] (0,7) circle [radius=.1];
%\draw[fill] (0,6) circle [radius=.1];
\draw[fill] (0,5) circle [radius=.1];
\draw[fill] (0,4) circle [radius=.1];
%\draw[fill] (0,3) circle [radius=.1];
\draw[fill] (0,1) circle [radius=.1];
%\draw[fill] (0,0) circle [radius=.1];
\draw[fill] (0,2) circle [radius=.1];
\draw[fill] (0,-1) circle [radius=.1];

\draw [black, line width=.85mm] (0,-1) to [out= 20, in =-20] (0,1);
\draw [black, line width=.85 mm] (0, 2) to [out= 20, in =-20 ] (0,4);
\draw [black, line width=.85 mm] (0, 5) to [out= 20, in =-20 ] (0,7);


\end{tikzpicture} }
  
%   \scalebox{1.1}{ \includegraphics{pullapart.pdf}
%   \begin{picture}(0,50)(0,50)
%   \put(-155,110){\tiny{Pull apart}}
%   \put(-85,117){\tiny{Deleted isolated}}
%   \put(-65,110){\tiny{nodes}}
%    \put(-66,100){\LARGE{$\longrightarrow$}}
%    \put(-151,100){\LARGE{$\longrightarrow$}}
%    
%   \end{picture}}
     \caption{A demonstration of the map $\mu$.}
        \label{fig: pull apart}
\end{figure}

When $n=2r+1$, we define a map $\mu$ from $\H(n)$ to the set of noncrossing perfect matchings on the set $[n-1]$ as follows:
Each pair of arcs in a homology facet $F$ that share an endpoint are pulled apart, and isolated nodes are deleted.
See Figure~\ref{fig: pull apart}.
%It is not difficult to check that $\mu$ is a well-defined bijection by induction.
%We describe the argument that $\mu$ is well-defined: 
%As above, each facet contains an arc $\alpha_{1,l}$.
%This arc encloses a noncrossing arc diagram $F'\in \H([2,l-1])$.
%The remaining arcs form a noncrossing arc diagram $F''\in \H([l, n])$.
%By induction $\mu(F')$ is a noncrossing perfect matching $M'$ on $[2,l-2]$, and $\mu(F'')$ is a noncrossing perfect matching $M''$ on $[l, n-1]$.
%Thus, we have $\mu(F) = \{1, l-1\}\cup M'\cup M''$ is a noncrossing perfect matching on $[n-1]$.
%
%Observe that each noncrossing perfect matching on [2r] has $r$ edges.
%Under the map $\mu$, arcs become edges.
%The last item of Theorem~\ref{thm: linear cambrian complex type A detailed} follows.
%%Theorem~\ref{thm: linear cambrian complex type A} follows from the fact that there are  $\Cat(A_{k-1})$ many noncrossing perfect matchings on $[2k]$.
\end{proof} 


\subsection{The Tamari lattice in type B}\label{type B tamari}
We now turn to the type-B Tamari lattice.
Throughout, we write $[\pm n]$ for the set $\{-n,\ldots,-1,1,\ldots,n\}$ and~$S_{\pm n}$ for the symmetric group on $[\pm n]$.
A \newword{signed permutation} (in full one-line notation) is a permutation $w_{-n}\ldots w_{-1}w_1\ldots w_n$ satisfying $w_{-i} = -w_i$.
We realize $B_n$, the type-B Coxeter group of rank~$n$, as the subposet of the weak order on $S_{\pm n}$ induced by the set of signed permutations.
 The \newword{type-B Tamari lattice} $T_n^s$ is the subposet of the weak order on $B_n$ induced by the set of signed permutations that avoid the 312-pattern where the ``2'' is positive.
%the 231-pattern where the ``2'' is negative.
%Indeed the symmetry condition that defines a signed permutation means that if $w$ avoids the 321-pattern (with the ``2'' positive) then it will also avoid the 213-pattern (with the ``2'' negative).

Consider the noncrossing arc diagram of a permutation $w\in S_{\pm n}$, with nodes labeled $-n,\ldots, -1, 1,\ldots, n$ from bottom to top.
A noncrossing arc diagram that is fixed by a half-turn rotation that sends each node $i$ to $-i$ is called a \newword{symmetric noncrossing arc diagram}.
A \newword{symmetric arc} is either a pair of arcs that are related by this half-turn rotation or a single arc this is fixed by this rotation.
%Throughout the remainder of the paper, we write $\alpha^s$ for a symmetric arc.
See Figure~\ref{fig: type B swap} for some examples.
The next corollary is \cite[Proposition~3.2.10]{thesis}.
\begin{figure}[h]
  \centering
   \scalebox{.9}{ \includegraphics{type_B_example_1.pdf}}
     \caption{Each diagram contains two symmetric arcs.}
     %Not every non-simple symmetric arc in $\Delta^s(n)$ can be swapped out for two simple symmetric arcs.
     %The leftmost diagram depicts a face of $\Delta^s(3)$. In the middle diagram we replace $\alpha_{-1,3}^s$ with the simple symmetric arc $\alpha_{3,2}^s$. In the rightmost diagram, we replace $\alpha_{-2,2}^s$ with $\alpha_{2,1}^s$.}
        \label{fig: type B swap}
\end{figure}

%\begin{remark}\label{symmetric arc}
%Observe that an arc that is fixed by the half-turn rotation of the diagram corresponds (via $\delta$) to a descent $w_{-1}>w_{1}$.
%Since each signed permutation has at most one such descent, we conclude that each symmetric noncrossing arc diagram contains at most one arc that is fixed by the half-turn rotation.
%\end{remark}

\begin{corollary}\label{type b tamari}
The canonical join complex of the type-B Tamari lattice $T_{n}^s$ is isomorphic to the subcomplex of symmetric noncrossing arc diagrams on $[\pm n]$ induced by set of symmetric arcs which do not pass to the left of any positive node or to the right of any negative node.
\end{corollary}

We write $\Delta^s(n)$ for the canonical join complex of the type-B Tamari lattice $T_{n}^s$.
There is precisely one symmetric arc for each pair of nodes in $[\pm n]$.
Given a pair of arcs $\alpha_{i,k}$ and $\alpha_{-k,-i}$ that together comprise a symmetric arc in $\Delta^s(n)$, we write $\alpha_{i,k}^s$ for the corresponding symmetric arc, where $k>i$ and $k>-i$.
When the endpoints of a symmetric arc are not specified, we simply write~$\alpha^s$.
To distinguish the arc $\alpha_{i,k}$ from the symmetric arc $\alpha_{i,k}^s$, we sometimes refer to the former as an \newword{ordinary arc}.
A \newword{simple symmetric arc} is either a pair of simple arcs fixed by the half-turn rotation through the center of the diagram, or the ordinary simple arc with endpoints $-1$ and $1$.
\begin{theorem}\label{thm: type b shelling}
Let $\mathcal{L}=F_1,\ldots, F_m$ be a linear ordering of the facets of $\Delta^s(n)$ satisfying~(\ref{degree condition}) and the following condition:
If $F_i$ and $F_k$ are facets with the same size and if the number of simple symmetric arcs in $F_i$ is greater than the number of simple symmetric arcs in $F_k$, then $i<k$.
Then $\mathcal{L}$ is a shelling of $\Delta^s(n)$, and $F_i$ is a homology facet if and only if it does not contain any simple symmetric arcs.
\end{theorem}
To conserve space, we will not prove Theorem~\ref{thm: type b shelling}.
(See \cite[Theorem~3.3.8]{thesis} for the complete proof.)
Instead, we sketch how to count the homology facets for $\Delta^s(n)$, when $n=2r$.
%Next, we count the homology facets for $\Delta^s(n)$.
Let $\H^s(n)$ denote the set of symmetric noncrossing arc diagrams that are facets in $\Delta^s(n)$ and that contain no simple symmetric arcs.
We define a map $\mu_s$ from $\H^s(n)$ to the set of symmetric noncrossing perfect matchings on $[\pm n]$.
A \newword{symmetric noncrossing perfect matching} on $[\pm n]$ is a noncrossing perfect matching $M$ that satisfies $\{a,b\}\in M$ if and only if $\{-a,-b\}\in M$.
The following proposition is \cite[Proposition~3.2.13]{thesis}.

\begin{proposition}\label{symmetric matchings}
There are $\Cat(B_r)= \binom{2r}{r}$ many symmetric noncrossing perfect matchings on the set $[\pm (2r)]$.
\end{proposition}

Suppose that $F\in \H^s(n)$.
We would like to use the map $\mu$ (defined at the end of the proof for Theorem~\ref{thm: linear cambrian complex type A detailed}) whenever possible.
To that end, we write $P(F)$ for the set of arcs $\alpha_{i,k}^s\in F$ with $0<i<k$, and $N(F)$ for the set of arcs $\alpha_{i,k}^s\in F$ with $i<0<k$.
Observe that the set $P(F)$ decomposes into a collection of smaller noncrossing arc diagrams, each of which is either a maximal collection of non-simple ordinary right arcs or, symmetrically, a maximal collection of non-simple ordinary ``left arcs''.
We will apply the map $\mu$ to each collection of right arcs and, by symmetry, to each collection of left arcs.
That leaves us with one main challenge:
how to pair off the endpoints of the arcs in~$N(F)$.
We visualize a simplified version of this ``pairing off'' below.
(The technical details can be found in \cite[Section~3.3.2]{thesis}.)
\\[1em]
\noindent
\textit{First step.}
Cut every arc in $N(F)$ where it passes between $-1$ and 1.
We call the resulting curves, each of which have precisely one endpoint, \newword{arc segments}.
We write $\alpha_a$ for the arc segment whose endpoint is $a$.
Reflect the negative half of the diagram about the vertical column of the nodes, so that each arc and arc segment passes to the right of each node.\\[1 em]
\noindent
%\textit{Second step.}
%Apply the map $\mu$ to each of the diagrams $F_1, F_{-i_l},\ldots, F_{k_l}$, as described above.
%The effect of shifting our indices up is to ``pull apart'' two adjacent arcs (as in Figure~\ref{fig: pull apart}).
%For each $a\in \{-i_{l},\ldots, k_l\}$, the bottom arc in $F_a$ is pulled apart from the arc segment $\alpha_{a}$ that is below it.
%The one exception occurs when we shift up the indices of $\mu(F_1)$:
%In this case, the shift makes~1 an isolated node.
%We carry out the symmetric process on the negative half of the diagram.\\[1 em]
%\noindent
\textit{Second step.}
Write $N(F) = \{\alpha_{i_1,k_1}^s, \alpha_{i_2,k_2}^s, \ldots, \alpha_{i_l,k_l}^s\}$ where $k_1<\cdots <k_l$.
After cutting the arcs in the step above, $-i_l$ is the top endpoint of the arc segment closest to the node 1.
Anchor this arc segment to 1 and symmetrically anchor $\alpha_{i_l}$ to~$-1$, unless $i_l=-1$.
If $i_l=-1$, then we glue the segments $\alpha_{-i_l}$ and $\alpha_{i_l}$ together between~$-1$ and 1.
We glue each remaining arc segment $\alpha_a$ to the corresponding negative segment $\alpha_{-a}$.
See Figure~\ref{SFG example 1} and Figure~\ref{SFG example 2}.
%(In the pictures, we focus on the cutting and gluing.
%We leave out all but the bottom node from each of the diagrams $F_1, F_{-i_l},\ldots, F_{k_l}$.)\\




%Changes begin here:

%We write $N(F) = \{\alpha_{i_1,k_1}^s, \alpha_{i_2,k_2}^s, \ldots, \alpha_{i_l,k_l}^s\}$ where $k_1<\cdots <k_l$.
%The upshot of Lemma~\ref{endpoint compatibility} is that $-i_l<\cdots <-i_1<k_1$.
%This tells us exactly how the arcs in $P(F)$ are distributed.
%For example, consider the restriction of $F$ to the nodes $[k_l, n]$.
%This is a maximal collection of ordinary right arcs, none of which are simple.
%Thus, this restriction is an element of $\H([k_l, n])$.
%Also, the restriction to $[(-i_l-1)]$ is a maximal collection of ordinary right arcs.
%This diagram is an element of $\H(-i_l-1)$. 
%The nodes between any consecutive pair in $\{-i_l<\cdots-i_1<k_1<\cdots< k_l\}$, are filled in with a maximal collection of right arcs.
%(See Figure~\ref{fig: NF}.)
%So, for example, the restriction of~$F$ to the set $[k_{j-1}, k_j-1]$ belongs to $\H([k_{j-1}, k_{j}-1])$, for each $j\in [1,l-1]$.
%The analogous statement holds for the restriction to $[-i_j, -i_{j-1}-1]$, where $j\in [2,l]$, and for the restriction to $[-i_1,k_1-1]$.
%We write $F_1, F_{-i_l},\ldots, F_{k_l}$ for the collection of these smaller noncrossing arc diagrams, where we index each diagram by its bottom node.
%
%We are now prepared to describe the map $\mu_s$.
%We apply the map $\mu$ to each of the diagrams $F_1, F_{-i_l},\ldots, F_{k_l}$.
%Recall that $\mu$ sends a maximal collection of non-simple right arcs on the nodes $[a,b]$ to a matching on the set $[a,b-1]$.
%It is convenient for us to shift the indices of the image of $\mu$ up by one instead.
%So, for example, we map the noncrossing arc diagram $F_1$ on $[1, -i_l-1]$ to a noncrossing perfect matching on $[2,-i_{l}-1]$, and we send $F_{-i_j}$ (a noncrossing arc diagram on $[-i_j, -i_{j-1}-1]$) to a matching on $[-i_j+1, -i_{j-1}-1]$.
%Then, we insert each of the corresponding negative edges.
%
%Thus, we have paired off every number in $[\pm n]$, except $1\le -i_l<\cdots< k_l$ (and the corresponding negative numbers).
%We complete the matching as follows:
%We add the edges $\{1, -i_l\}$ and $\{-1, i_l\}$, unless $-i_l = 1$.
%If $-i_l = 1$, then we add the edge $\{-1, 1\}$.
%Finally, for each number $a\in \{-i_{l-1}<\cdots<k_{l-1}\}$ we add the edge $\{-a,a\}$.
%If $k_{l}\ne -i_l$, then we also add $\{-k_l, k_l\}$.
%(Note that if $k_l=-i_l$, then $l=1$.)
%We can visualize the entire construction in three steps as follows:\\[1em]
%\noindent
%\textit{First step.}
%Cut every arc in $N(F)$ where it passes between $-1$ and 1.
%We call the resulting curves, which have precisely one endpoint, \newword{arc segments}.
%We write $\alpha_a$ for the arc segment whose endpoint is $a$.
%Reflect the negative half of the diagram about the vertical column of the nodes, so that each arc and arc segment passes to the right of each node.\\[1 em]
%\noindent
%\textit{Second step.}
%Apply the map $\mu$ to each of the diagrams $F_1, F_{-i_l},\ldots, F_{k_l}$, as described above.
%The effect of shifting our indices up is to ``pull apart'' two adjacent arcs (as in Figure~\ref{fig: pull apart}).
%For each $a\in \{-i_{l},\ldots, k_l\}$, the bottom arc in $F_a$ is pulled apart from the arc segment $\alpha_{a}$ that is below it.
%The one exception occurs when we shift up the indices of $\mu(F_1)$:
%In this case, the shift makes 1 an isolated node.
%We carry out the symmetric process on the negative half of the diagram.\\[1 em]
%\noindent
%\textit{Third step.}
%Anchor the arc segment $\alpha_{-i_l}$ to 1 and symmetrically anchor $\alpha_{i_l}$ to~$-1$, unless $i_l=-1$.
%If $i_l=-1$, then we glue the segments $\alpha_{-i_l}$ and $\alpha_{i_l}$ together between~$-1$ and 1.
%We glue each remaining arc segment $\alpha_a$ to the corresponding negative segment $\alpha_{-a}$.
%See Figure~\ref{SFG example 1} and Figure~\ref{SFG example 2}.
%(In the pictures, we focus on the cutting and gluing.
%We leave out all but the bottom node from the diagrams $F_1, F_{-i_l},\ldots, F_{k_l}$.)\\



\begin{figure}[h]
  \centering   
  \begin{picture}(0,85)(0,50)
  \put(-100,44){\includegraphics{mumapexample1.pdf}}
  \put(70,44){\includegraphics{mumapexample2.pdf}}
  \put(-40, 46.5){
  
     \scalebox{.38}{\begin{tikzpicture}
%\draw[fill] (0,-5) circle [radius=.1];
\draw[fill] (0,-4) circle [radius=.1];
\draw[fill] (0,-3) circle[radius=.1];
\draw[fill] (0,-2) circle[radius=.1];
\draw[fill] (0,-1) circle[radius=.1];
%\draw[fill] (0, 5) circle [radius=.1];
\draw[fill] (0, 4) circle [radius=.1];
\draw[fill] (0, 3) circle [radius=.1];
\draw[fill] (0, 2) circle [radius=.1];
\draw[fill] (0, 1) circle [radius=.1];

%\draw[black, thick] (0,-5) arc [radius= 3, start angle=-90, end angle=-180];
%\draw [black,domain=1.5:0, smooth, line width=.85 mm] plot (\x, 5*sqrt(1-.44*\x^2);
%\draw [black,domain=-1.5:0, smooth,  line width=0.85mm] plot (\x, -5*sqrt(1+.44*\x^2);

\draw [black,domain=-.99:0, smooth, line width=.9 mm] plot (\x,
{-4*sqrt(1+\x^2)});
\draw [black,domain=.99:0, smooth, line width=.9 mm] plot (\x,
{4*sqrt(1-\x^2)});

\draw [black,domain=-0.73:0, smooth, line width=.9 mm] plot (\x,
{-3*sqrt(1+1.78*\x^2)});
\draw [black,domain=0.73:0, smooth, line width=.9 mm] plot (\x,
{3*sqrt(1-1.78*\x^2)});

\draw [black,domain=-0.45:0, smooth, line width=.9 mm] plot (\x,
{-2*sqrt(1+4*\x^2)});
\draw [black,domain=0.45:0, smooth, line width=.9 mm] plot (\x,
{2*sqrt(1-4*\x^2)});

%\draw [black,domain=-0.2:0, smooth, line width=.9 mm] plot (\x, -1*sqrt(1+16*\x^2);
%\draw [black,domain=0.2:0, smooth, line width=.9 mm] plot (\x, 1*sqrt(1-16*\x^2);

%\draw [gray, dashed] (1.4,-1.4) arc [radius=2, start angle=-45, end angle= 45];

\end{tikzpicture}
    
  }}
  
 \put(20, 46.5){
  \scalebox{.38}{\begin{tikzpicture}
%\draw[fill] (0,-5) circle [radius=.1];
\draw[fill] (0,-4) circle [radius=.1];
\draw[fill] (0,-3) circle[radius=.1];
\draw[fill] (0,-2) circle[radius=.1];
\draw[fill] (0,-1) circle[radius=.1];
%\draw[fill] (0, 5) circle [radius=.1];
\draw[fill] (0, 4) circle [radius=.1];
\draw[fill] (0, 3) circle [radius=.1];
\draw[fill] (0, 2) circle [radius=.1];
\draw[fill] (0, 1) circle [radius=.1];

%\draw[black, thick] (0,-5) arc [radius= 3, start angle=-90, end angle=-180];
%\draw [black,domain=3:0, smooth, line width=.9 mm] plot (\x, -5*sqrt(1-.11*\x^2);
%\draw [black,domain=3:0, smooth,  line width=0.9mm] plot (\x, 5*sqrt(1-.11*\x^2);

\draw [black,domain=1.97:0, smooth, line width=.9 mm] plot (\x,
{-4*sqrt(1-.25*\x^2)});
\draw [black,domain=1.97:0, smooth, line width=.9 mm] plot (\x,
{4*sqrt(1-.25*\x^2)});

\draw [black,domain=0.97:0, smooth, line width=.9 mm] plot (\x,
{-3*sqrt(1-\x^2)});
\draw [black,domain=0.97:0, smooth, line width=.9 mm] plot (\x,
{3*sqrt(1-\x^2)});

\draw [black,domain=0.42:0, smooth, line width=.9 mm] plot (\x,
{-2*sqrt(1-4*\x^2)});
\draw [black,domain=0.42:0, smooth, line width=.9 mm] plot (\x,
{2*sqrt(1-4*\x^2)});

%\draw [black,domain=0.2:0, smooth, line width=.9 mm] plot (\x, -1*sqrt(1-16*\x^2);
%\draw [black,domain=0.2:0, smooth, line width=.9 mm] plot (\x, 1*sqrt(1-16*\x^2);

%\draw [gray, dashed] (1.4,-1.4) arc [radius=2, start angle=-45, end angle= 45];

\end{tikzpicture}
  
  }}

   \end{picture}

\caption{An illustration of the map $\mu_s$ when $i_l \ne-1$.}
        \label{SFG example 1}
\end{figure}



\begin{figure}[h]
  \centering   
  \begin{picture}(0,110)(0,50)
  \put(-100,39){\includegraphics{negative_endpoints_map.pdf}}
  \put(70,39){\includegraphics{negative_endpoints_matching.pdf}}
  \put(-40, 46.5){
  
     \scalebox{.38}{\begin{tikzpicture}
\draw[fill] (0,-5) circle [radius=.1];
\draw[fill] (0,-4) circle [radius=.1];
\draw[fill] (0,-3) circle[radius=.1];
\draw[fill] (0,-2) circle[radius=.1];
\draw[fill] (0,-1) circle[radius=.1];
\draw[fill] (0, 5) circle [radius=.1];
\draw[fill] (0, 4) circle [radius=.1];
\draw[fill] (0, 3) circle [radius=.1];
\draw[fill] (0, 2) circle [radius=.1];
\draw[fill] (0, 1) circle [radius=.1];

%\draw[black, thick] (0,-5) arc [radius= 3, start angle=-90, end angle=-180];
\draw [black,domain=1.5:0, smooth, line width=.85 mm] plot (\x,
{5*sqrt(1-.44*\x^2)});
\draw [black,domain=-1.5:0, smooth,  line width=0.85mm] plot (\x,
{-5*sqrt(1+.44*\x^2)});

\draw [black,domain=-.99:0, smooth, line width=.9 mm] plot (\x,
{-4*sqrt(1+\x^2)});
\draw [black,domain=.99:0, smooth, line width=.9 mm] plot (\x,
{4*sqrt(1-\x^2)});

\draw [black,domain=-0.735:0, smooth, line width=.9 mm] plot (\x,
{-3*sqrt(1+1.78*\x^2)});
\draw [black,domain=0.735:0, smooth, line width=.9 mm] plot (\x,
{3*sqrt(1-1.78*\x^2)});

\draw [black,domain=-0.475:0, smooth, line width=.9 mm] plot (\x,
{-2*sqrt(1+4*\x^2)});
\draw [black,domain=0.475:0, smooth, line width=.9 mm] plot (\x,
{2*sqrt(1-4*\x^2)});

\draw [black,domain=-0.2:0, smooth, line width=.9 mm] plot (\x,
{-1*sqrt(1+16*\x^2)});
\draw [black,domain=0.2:0, smooth, line width=.9 mm] plot (\x,
{1*sqrt(1-16*\x^2)});

%\draw [gray, dashed] (1.4,-1.4) arc [radius=2, start angle=-45, end angle= 45];

\end{tikzpicture}
    
  }}
  
 \put(20, 46.5){
  \scalebox{.38}{\begin{tikzpicture}
\draw[fill] (0,-5) circle [radius=.1];
\draw[fill] (0,-4) circle [radius=.1];
\draw[fill] (0,-3) circle[radius=.1];
\draw[fill] (0,-2) circle[radius=.1];
\draw[fill] (0,-1) circle[radius=.1];
\draw[fill] (0, 5) circle [radius=.1];
\draw[fill] (0, 4) circle [radius=.1];
\draw[fill] (0, 3) circle [radius=.1];
\draw[fill] (0, 2) circle [radius=.1];
\draw[fill] (0, 1) circle [radius=.1];

%\draw[black, thick] (0,-5) arc [radius= 3, start angle=-90, end angle=-180];
\draw [black,domain=3:0, smooth, line width=.9 mm] plot (\x,
{-5*sqrt(1-.11*\x^2)});
\draw [black,domain=3:0, smooth,  line width=0.9mm] plot (\x,
{5*sqrt(1-.11*\x^2)});

\draw [black,domain=1.97:0, smooth, line width=.9 mm] plot (\x,
{-4*sqrt(1-.25*\x^2)});
\draw [black,domain=1.97:0, smooth, line width=.9 mm] plot (\x,
{4*sqrt(1-.25*\x^2)});

\draw [black,domain=0.98:0, smooth, line width=.9 mm] plot (\x,
{-3*sqrt(1-\x^2)});
\draw [black,domain=0.98:0, smooth, line width=.9 mm] plot (\x,
{3*sqrt(1-\x^2)});

\draw [black,domain=0.48:0, smooth, line width=.9 mm] plot (\x,
{-2*sqrt(1-4*\x^2)});
\draw [black,domain=0.48:0, smooth, line width=.9 mm] plot (\x,
{2*sqrt(1-4*\x^2)});

\draw [black,domain=0.2:0, smooth, line width=.9 mm] plot (\x,
{-1*sqrt(1-16*\x^2)});
\draw [black,domain=0.2:0, smooth, line width=.9 mm] plot (\x,
{1*sqrt(1-16*\x^2)});

%\draw [gray, dashed] (1.4,-1.4) arc [radius=2, start angle=-45, end angle= 45];

\end{tikzpicture}
  
  }}

   \end{picture}

\caption{An illustration of the map $\mu_s$ when $i_l =-1$.}
        \label{SFG example 2}
\end{figure}

\begin{proposition}\label{type B counting}
The map $\mu_s$ is a bijection from $\H^s(n)$ to the set of symmetric noncrossing perfect matchings on $[\pm n]$.
\end{proposition}

\printbibliography


\end{document}
