\section{Preliminaries}\label{sec:prelim} \subsection{Permutations} We write $\sigma\in S_n$ in one-line notation, $\sigma=\sigma(0)\sigma(1)\cdots\sigma(n-1)$, and think of $\sigma$ as the set of cells $(x,\sigma(x))$ of an $n\times n$ board (row $x$, column $\sigma(x)$). $\ell(\sigma)$ is the number of inversions, $\sgn\sigma=(-1)^{\ell(\sigma)}$. A permutation $\sigma$ \emph{contains} a pattern $\pi\in S_m$ if some positions $t_1<\dots\sigma(c)$ and no $b\in(a,c)$ with $\sigma(c)<\sigma(b)<\sigma(a)$; here $\sigma\cdot(a\ c)$ exchanges the entries in positions $a$ and $c$. \emph{Symmetries.} Transposition $\sigma\mapsto\sigma^{-1}$ (cells $(x,j)\mapsto(j,x)$) and rotation $\sigma\mapsto w_0\sigma w_0$ (cells $(x,j)\mapsto(n-1-x,n-1-j)$) preserve $\ell$, the Bruhat order, and the set of smooth permutations ($1324$ and $2143$ are fixed by both symmetries). \subsection{Bands and rook sets} \begin{definition} A \emph{band} on an $n\times n$ board is a pair of weakly decreasing functions $\lo,\hi:\{0,\dots,n-1\}\to\mathbb Z$ with $0\le\lo$ and $\hi\le n-1$; row $x$ consists of the cells $(x,j)$ with $\lo(x)\le j\le\hi(x)$ (possibly none). Its \emph{rook set} is $\rook(B)=\{\sigma\in S_n:\lo(x)\le\sigma(x)\le\hi(x)\text{ for all }x\}$. For a cell $(r,j)$, $B(r\mid j)$ is the band on an $(n-1)\times(n-1)$ board obtained by deleting row $r$ and column $j$ and re-indexing; its functions are $\lo(x)-[\lo(x)>j]$ and $\hi(x)-[\hi(x)\ge j]$ on the remaining rows, again weakly decreasing. \end{definition} Thus $\rook(B(r\mid j))=\{\sigma^{(r)}:\sigma\in S_n,\ \sigma(r)=j,\ \lo(x)\le\sigma(x)\le\hi(x)\ (x\ne r)\}$. Transposing a band gives a band (column $j$ meets the interval of rows $x$ with $\lo(x)\le j\le\hi(x)$, whose ends decrease with $j$), and so does rotating it by $180^\circ$; rook sets transform by $\sigma\mapsto\sigma^{-1}$ and $\sigma\mapsto w_0\sigma w_0$. For $v\in S_n$ the band $\Gamma_v$ has $\lo(x)=\min\{v(0),\dots,v(x)\}$ and $\hi(x)=\max\{v(x),\dots,v(n-1)\}$. A cell $(x,j)$ lies in $\Gamma_v$ iff some position $\le x$ holds a value $\le j$ and some position $\ge x$ holds a value $\ge j$. This description shows $\Gamma_{v^{-1}}=\Gamma_v^{\mathsf T}$ and $\Gamma_{w_0vw_0}=$ the rotation of $\Gamma_v$, for every $v$. We call a cell \emph{in band} if it lies in $\Gamma_v$ and \emph{out of band} otherwise. \begin{lemma}[upper sets; {\cite[Prop.~4.1]{Sjo07}}]\label{lem:upper} For every band $B$, $\rook(B)$ is an upper set of the Bruhat order. \end{lemma} \begin{proof} It suffices to treat $\tau=\sigma\cdot(a\ c)$ with $a\hi(c)$. Then $\sigma$ is a minimal element of $\rook(B)$ iff every inversion of $\sigma$ is blocked. \end{lemma} \begin{proof} For an inversion $a\sigma(c)\ge\lo(c)$. So an unblocked inversion shows that $\sigma$ is not minimal. Conversely, if $\tau<\sigma$ with $\tau\in\rook(B)$, a maximal chain from $\tau$ to $\sigma$ lies in $\rook(B)$ by Lemma~\ref{lem:upper}, and its top step is $\sigma\cdot(a\ c)$ for an unblocked inversion $aj\}+\#\{x>r:\sigma(x)0$. If $M$ is totally nonnegative, $\Imm_y(M)\ge0$ \textup{(}\cite{RS06}, or by density of TP matrices in TNN matrices \cite{Whi52}\textup{)}. \end{lemma} (Corollary~4.19 of \cite{CSB21} follows from their Theorem~4.18, which states $(-1)^{\ell(y)}\det(M|_{\Gamma_y})>0$ for $k$-positive $M$ with $k$ the size of the largest square in $\Gamma_y$, together with~\eqref{eq:csb}; a TP matrix is $k$-positive for every $k$.) \begin{lemma}\label{lem:cofactor} Let $v\in S_n$ and $(r,j)$ a cell such that $\rook(\Gamma_v(r\mid j))=[y,w_0]$ with $y$ smooth. Then for every $n\times n$ matrix $X$, \[ \det\bigl((X|_{\Gamma_v})(r\mid j)\bigr)=(-1)^{\ell(y)}\Imm_y\bigl(X(r\mid j)\bigr). \] If $\rook(\Gamma_v(r\mid j))=\emptyset$, the left side is $0$. \end{lemma} \begin{proof} $(X|_{\Gamma_v})(r\mid j)=X(r\mid j)|_{\Gamma_v(r\mid j)}$, whose determinant is $\sum_{\tau\in[y,w_0]}\sgn(\tau)\,X(r\mid j)_\tau$; apply Lemma~\ref{lem:csb31}. \end{proof} \begin{definition} For smooth $v$ and a cell $(r,j)$ put $\varepsilon(v;r,j)=(-1)^{\ell(y)}$ if $\rook(\Gamma_v(r\mid j))=[y,w_0]$, and $\varepsilon(v;r,j)=0$ if it is empty. For positions $iv(k)$ (resp.\ $(v(i),v(k))$ if $v(i)