\documentclass[12 pt]{amsart}
\usepackage{amssymb, amsmath, amsfonts, amsthm}
\usepackage{graphicx}
\usepackage[hmargin=1 in, vmargin = 1 in]{geometry}
\usepackage{tikz-cd} 
\usetikzlibrary{matrix, calc, arrows}
%\usetikzlibrary{arrows}
%\usetikzlibrary{hobby}
\usepackage{hyperref}
\usepackage[all]{xy}

% When you first define a new word, use this macro to make it stand out
% EG We say that an abelian group $I$ is \newword{injective} if, for any
% injection $G \to H$, and any map $G \to I$, there is a map $H \to I$ making the
% obvious diagram commute.
\newcommand{\newword}[1]{\textbf{\emph{#1}}}

%Arrows
\newcommand{\into}{\hookrightarrow}
\newcommand{\onto}{\twoheadrightarrow}

%Things LaTeX names by appearance, rather than meaning
% By now, I've learned the standard LaTeX names, but I remember they used to give me trouble, so here are some macros
\newcommand{\isom}{\cong} %The isomorphism symbol
\newcommand{\union}{\cup}
\newcommand{\intersection}{\cap}
\newcommand{\bigunion}{\bigcup}
\newcommand{\bigintersection}{\bigcap}
\newcommand{\disjointunion}{\sqcup}
\newcommand{\bigdisjointunion}{\bigsqcup}


%This makes alternating tensors look right in displayed equations
\newcommand{\Alt}{\bigwedge\nolimits}


    %This allows matrix, bmatrix and pmatrix to take the same optional arguments as array. 
    %EG \begin{pmatrix}[cc|c] will make three centered columns with a vertical divider between the second and third. If you omit the optional argument, the commands work as normal.
    % Code from "stefan" at https://texblog.net/latex-archive/maths/amsmath-matrix/
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  \hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother    


\newenvironment{sbm}
    {\left[ \begin{smallmatrix}
    }
    { 
     \end{smallmatrix} \right]
    }


%Blackboard bold letters.
\renewcommand{\AA}{\mathbb{A}}
\newcommand{\BB}{\mathbb{B}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\DD}{\mathbb{D}}
\newcommand{\EE}{\mathbb{E}}
\newcommand{\FF}{\mathbb{F}}
\newcommand{\GG}{\mathbb{G}}
\newcommand{\HH}{\mathbb{H}}
\newcommand{\II}{\mathbb{I}}
\newcommand{\JJ}{\mathbb{J}}
\newcommand{\KK}{\mathbb{K}}
\newcommand{\LL}{\mathbb{L}}
\newcommand{\MM}{\mathbb{M}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\OO}{\mathbb{O}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\RR}{\mathbb{R}}
\renewcommand{\SS}{\mathbb{S}}
\newcommand{\TT}{\mathbb{T}}
\newcommand{\UU}{\mathbb{U}}
\newcommand{\VV}{\mathbb{V}}
\newcommand{\WW}{\mathbb{W}}
\newcommand{\XX}{\mathbb{X}}
\newcommand{\YY}{\mathbb{Y}}
\newcommand{\ZZ}{\mathbb{Z}}

%Calligraphic letters

\newcommand{\cA}{\mathcal{A}}
\newcommand{\cB}{\mathcal{B}}
\newcommand{\cC}{\mathcal{C}}
\newcommand{\cD}{\mathcal{D}}
\newcommand{\cE}{\mathcal{E}}
\newcommand{\cF}{\mathcal{F}}
\newcommand{\cG}{\mathcal{G}}
\newcommand{\cH}{\mathcal{H}}
\newcommand{\cI}{\mathcal{I}}
\newcommand{\cJ}{\mathcal{J}}
\newcommand{\cK}{\mathcal{K}}
\newcommand{\cL}{\mathcal{L}}
\newcommand{\cM}{\mathcal{M}}
\newcommand{\cN}{\mathcal{N}}
\newcommand{\cO}{\mathcal{O}}
\newcommand{\cP}{\mathcal{P}}
\newcommand{\cQ}{\mathcal{Q}}
\newcommand{\cR}{\mathcal{R}}
\newcommand{\cS}{\mathcal{S}}
\newcommand{\cT}{\mathcal{T}}
\newcommand{\cU}{\mathcal{U}}
\newcommand{\cV}{\mathcal{V}}
\newcommand{\cW}{\mathcal{W}}
\newcommand{\cX}{\mathcal{X}}
\newcommand{\cY}{\mathcal{Y}}
\newcommand{\cZ}{\mathcal{Z}}

\newcommand{\fm}{\mathfrak{m}}

\theoremstyle{definition}
\newtheorem*{thm}{Theorem}
\newtheorem*{prob}{Problem}
\newtheorem*{dfn}{Definition}
\newtheorem*{lem}{Lemma}
\newtheorem*{lemma}{Lemma}
\newtheorem*{ex}{Exercise}
\newtheorem*{eg}{Example}
\newtheorem*{Theorem}{Theorem}
\newtheorem*{theorem}{Theorem}
\newtheorem*{Lemma}{Lemma}
\newtheorem*{Corollary}{Corollary}
\newtheorem*{cor}{Corollary}
\newtheorem*{Remark}{Remark}
\newtheorem*{remark}{Remark}
\newtheorem*{Definition}{Definition}
\newtheorem*{Proposition}{Proposition}
\newtheorem*{proposition}{Proposition}
\newtheorem*{Conclusion}{Conclusion} 

\newcommand{\Covers}{\mathrm{Covers}}
\newcommand{\JIrr}{\mathrm{JIrr}}
\newcommand{\MIrr}{\mathrm{MIrr}}
\newcommand{\covers}{\gtrdot}
\newcommand{\covered}{\lessdot}
\newcommand{\join}{\vee}
\newcommand{\bigjoin}{\bigvee}
\newcommand{\meet}{\wedge}
\newcommand{\bigmeet}{\bigwedge}
\newcommand{\forces}{\Longrightarrow}
\newcommand{\forced}{\Longleftarrow}
\newcommand{\forceEquiv}{\Longleftrightarrow}
\newcommand{\slides}{\leadsto}

%%new command
\newcommand{\Fl}{\mathcal{F} \ell}

\DeclareMathOperator{\GL}{GL}


\begin{document}

\setcounter{tocdepth}{1}
\tableofcontents

\newpage

\section*{September 1 : Examples}

We write $[m] = \{ 1,2,\ldots, m \}$. Given an $m \times n$ matrix $M$, and subsets $I =  \subseteq [m]$ and $J \subseteq [n]$ with $\#(I) = \#(J)$, we define $\Delta^I_J(M) = \det (M_{ij})_{i \in I,\ j \in J }$, where we keep the elements of $I$ and the elements of $J$ in the same order. For example,
\[ \Delta^{13}_{25}(M) = \det \begin{bmatrix} M_{12} & M_{15} \\ M_{32} & M_{35} \\ \end{bmatrix} . \]
The $\Delta^I_J(M)$ are called the \newword{minors} of $M$. 

We say that $M$ is \newword{totally positive} if all the $\Delta^I_J(M)$ are positive, and \newword{totally nonnegative} if all the $\Delta^I_J(M)$ are nonnegative. We spent class working through two key examples:

\textbf{Example 1:} A $2 \times 2$ matrix $\begin{sbm} w&x \\ y&z \end{sbm}$ is totally nonnegative if $w$, $x$, $y$, $z$ and $wz-xy$ are all nonnegative. We can break this space up into strata according to which of these are positive and which are zero:

$0$ dimensional strata: $\begin{sbm} 0&0 \\ 0&0 \end{sbm}$.

$1$ dimensional strata: $\begin{sbm} \ast&0 \\ 0&0 \end{sbm}$, $\begin{sbm} 0&\ast \\ 0&0 \end{sbm}$, $\begin{sbm}  0&0 \\ \ast&0 \\ \end{sbm}$, $\begin{sbm}  0&0 \\ 0&\ast \\ \end{sbm}$.

$2$ dimensional strata: $\begin{sbm}  \ast&\ast \\ 0&0 \\ \end{sbm}$, $\begin{sbm}  0&\ast \\ 0&\ast \\ \end{sbm}$, $\begin{sbm}  0&0 \\  \ast&\ast \\\end{sbm}$,  $\begin{sbm}  \ast&0 \\  \ast&0 \\\end{sbm}$,  $\begin{sbm}  \ast&0 \\  0&\ast \\\end{sbm}$.

$3$ dimensional strata: $\begin{sbm}  \ast&\ast \\ 0&\ast \\ \end{sbm}$, $\begin{sbm}  \ast&0 \\ \ast&\ast \\ \end{sbm}$, $\{ \begin{sbm} w&x \\ y&z \end{sbm} : wz=xy \}$.

$4$ dimensional strata: $\{ \begin{sbm} w&x \\ y&z \end{sbm} : wz > xy \}$.

In order to visualize this, we intersect with the hyperplane $w+x+y+z=1$ to cut all the dimensions by $1$. The $2$-dimensional strata are thus cut down to line segments, and the first two of the $3$-dimensional strata are cut down to triangles. These two triangles fit together as shown below:

\[ \xymatrix{
{\begin{sbm} 1&0 \\ 0&0 \end{sbm}} \ar@{-}[r] \ar@{-}[d] \ar@{-}[dr] & {\begin{sbm} 0&1 \\ 0&0 \end{sbm}} \ar@{-}[d] \\
{\begin{sbm} 0&1 \\ 0&0 \end{sbm}} \ar@{-}[r] & {\begin{sbm} 0&0 \\ 0&1 \end{sbm}} \\ 
} \]

The closure of the remaining $3$-dimensional stratum cuts the hyperplane in what is topologically a square; we can parametrize it as
\[ \left\{ \begin{bmatrix} t u & t (1-u) \\ (1-t) u & (1-t)(1-u) \\ \end{bmatrix} : 0 \leq t,u \leq 1 \right\}.\]
The boundary of this square is glued to the four edges surrounding the two triangles, forming a sphere. 
The largest stratum fulls in the interior of the sphere.


\textbf{Example 2:} A matrix $\begin{sbm} 1&x&z \\ 0&1&y \\ 0&0&1 \end{sbm}$ is totally nonnegative if and only if $0 \leq x,y,z$ and $xy \geq z$.
The strata of this space are

$0$-dimensional strata: $\begin{sbm} 1&0&0 \\ &1&0 \\ &&1 \\ \end{sbm}$

$1$-dimensional strata: $\begin{sbm} 1&\ast&0 \\ &1&0 \\ &&1 \\ \end{sbm}$, $\begin{sbm} 1&0&0 \\ &1&\ast \\ &&1 \\ \end{sbm}$

$2$-dimensional strata: $\begin{sbm} 1&\ast&0 \\ &1&\ast \\ &&1 \\ \end{sbm}$, $\begin{sbm} 1&x&xy \\ &1&y \\ &&1 \\ \end{sbm}$

$3$-dimensional strata: $\begin{sbm} 1&x&z \\ 0&1&y \\ 0&0&1 \end{sbm}$ : $xy > z > 0$, $x$, $y > 0$.

If we slice with $x+y+z=1$, we get the equations $x+y \leq 1$, $xy+x+y \geq 1$, which we plot below:

\centerline{\includegraphics[width = 0.5 \textwidth]{A2Unipotent.eps}}

Here are some things to notice:
\begin{itemize}
\item Each stratum, topologically, is an open ball. The closure of each stratum is a closed ball. In other words, these spaces are regular CW complexes.
\item Algebraically, each stratum is rational. In fact, each stratum can be parametrized polynomially by $\RR_{>0}^d$ for the appropriate $d$.
\end{itemize}

\section*{September 3 : The Gessel-Lindstr\"om-Viennot Lemma}

We would like to find parametrizations of the various spaces of totally nonnegative matrices we have seen.
One way to do this is to multiply simpler totally positive matrices, since you will verify on Problem Set 1 that the product of two totally nonnegative matrices is totally nonnegative.
For example, we claim without proof that
\[ \begin{bmatrix} 1&x&0\\&1&0\\&&1 \end{bmatrix}  \begin{bmatrix} 1&0&0\\&1&y\\&&1 \end{bmatrix}  \begin{bmatrix} 1&z&0\\&1&0\\&&1 \end{bmatrix} \qquad x,y,z > 0 \]
is a bijective parametrization from $\RR_{>0}^3$ to the space of $3 \times 3$ matrices of the form $\begin{sbm} 1&\ast&\ast \\ &1&\ast \\ &&1 \\ \end{sbm}$ with all minors positive, except those that are forced to be zero by the upper triangularity.

A second way to do this, which we will explore today, is using directed graphs.
Let $G$ be a finite acyclic directed graph. Let $S$ and $T$ be two subsets of the vertices -- sources and targets -- and define a matrix $M(G)$ whose rows are indexed by $S$ and whose columns are indexed by $T$, by
\[ M(G)_{st} = \# \{ \mbox{directed paths from $s$ to $t$ } \} . \]
Better that that, let's attach a weight $w(e)$ to each edge. For a directed path $\gamma = (\bullet \overset{e_1}{\longrightarrow} \bullet  \overset{e_2}{\longrightarrow} \bullet \cdots  \overset{e_k}{\longrightarrow} \bullet)$, we set $w(\gamma) = \prod_{j=1}^k w(e_j)$. Then we define
\[ M(G)_{st} = \sum_{s \overset{\gamma}{\rightsquigarrow} t} w(\gamma) . \]
So our previous formula is the case of taking all weights $w(e)$ equal to $1$.

Note that our sum is finite because the graph is acyclic.

\begin{eg}
Let $G$ be
\[ \xymatrix{
s_1 \ar[r] & \bullet \ar[r] \ar[d]^x & \bullet \ar[r] & t_1 \\
s_2 \ar[r] & \bullet \ar[r]  & \bullet \ar[r] \ar[u]_y & t_2 \\ }.
\]
Here the unlabeled edges have weight $1$. Then $M(G)$ is
\[ \begin{bmatrix} 1+xy & x \\ y&1 \end{bmatrix} . \]
\end{eg}

When the weights $w(e)$ are positive, each matrix entry is clearly positive. We want more than this; we want to get all the matrix minors to be positive. We can achieve this using:

\begin{Theorem}[Gessel-Lindstr\"om-Viennot] Let $S = \{ s_1, s_2, \ldots, s_k \}$ and $T = \{ t_1, t_2, \ldots, t_k \}$. Suppose that $G$ is a planar graph and that $S$ and $T$ occur on the boundary of the outer face, in order $s_1$, $s_2$, \dots, $s_k$, $t_k$, \dots, $t_2$, $t_1$. Then
\[ \Delta^I_J(M) = \sum\nolimits_{s_1 \overset{\gamma_1}{\leadsto} t_1 ,\ s_2 \overset{\gamma_2}{\leadsto} t_2 ,\ \cdots ,\ s_k \overset{\gamma_k}{\leadsto} t_k,\ \mbox{$\gamma_j$ are vertex disjoint}} w(\gamma_1) w(\gamma_2) \cdots w(\gamma_k) \]
where the sum is over $k$-tuples of vertex disjoint paths $(\gamma_1, \gamma_2, \cdots, \gamma_k)$ where $\gamma_r$ is a path from $s_r$ to $t_r$.
\end{Theorem}

The diagram below shows the required geometry of the graph $G$, and the connectivity of the paths.

\usetikzlibrary{decorations.pathmorphing}
\centerline{
\begin{tikzpicture}[scale=1.25]
\draw (1,1) rectangle (5, 3);
\node (s1) at (1,2.5) {$\bullet$};
\node (s2) at (1,2) {$\bullet$};
\node (s3) at (1,1.5) {$\bullet$};
\node (t1) at (5,2.5) {$\bullet$};
\node (t2) at (5,2) {$\bullet$};
\node (t3) at (5,1.5) {$\bullet$};
\node (s1label) at (0.5,2.5) {$s_1$};
\node (s2label) at (0.5,2) {$s_2$};
\node (s3label) at (0.5,1.5) {$s_3$};
\node (t1label) at (5.5,2.5) {$t_1$};
\node (t2label) at (5.5,2) {$t_2$};
\node (t3label) at (5.5,1.5) {$t_3$};

\draw [->, line join=round, decorate, decoration={zigzag, segment length=10, amplitude=1.5,post=lineto, post length=2pt}] (s1) -- (t1);
\draw [->, line join=round, decorate, decoration={zigzag, segment length=10, amplitude=1.5,post=lineto, post length=2pt}] (s2) -- (t2);
\draw [->, line join=round, decorate, decoration={zigzag, segment length=10, amplitude=1.5,post=lineto, post length=2pt}] (s3) -- (t3);
\end{tikzpicture}}

\begin{proof}
If we expand the determinant directly, we get 
\[ \Delta^I_J(M) = \sum_{\sigma \in S_k} (-1)^{\sigma}  \sum\nolimits_{s_1 \overset{\beta_1}{\leadsto} t_{\sigma(1)} ,\ s_2 \overset{\beta_2}{\leadsto} t_{\sigma(2)} ,\ \cdots ,\ s_k \overset{\beta_k}{\leadsto} t_{\sigma(k)}} w(\beta_1) w(\beta_2) \cdots w(\beta_k) . \]
Here the outer sum is over the symmetric group $S_k$, and we are \textbf{not} imposing that the paths are vertex disjoint. 

We want to show that all terms which come from paths that are not vertex disjoint cancel each other. 
In other words, consider the set of $k$-tuples of paths $(\beta_1, \beta_2, \ldots, \beta_k)$ from $S$ to $T$ which are \textbf{not} vertex disjoint. 
We want to construct a bijection from this set to itself which will switch the sign of the permutation.

There are lots of ways to do this; here is one. 
Choose a total ordering on the vertices of $G$, so that $u$ comes before $v$ if we have an edge $u \longrightarrow v$.
Given a $k$-tuple $(\beta_1, \beta_2, \ldots, \beta_k)$, let $v$ be the first vertex on more than one path. Since it is the first such vertex, the incoming edges to $v$ are distinct. Choose a total order of the edges, and let $e$ and $f$ be the first two edges of $\bigcup \beta_j$ coming into $v$; let them be on paths $\beta_i$ and $\beta_j$. Make new paths $\beta'_k$ by switching paths $\beta_i$ and $\beta_j$ before vertex $v$. This switches the sign of the permutation $\sigma$. 

We have thus cancelled all $k$-tuples of crossing paths, and we have
\[ \Delta^I_J(M) = \sum_{\sigma \in S_k} (-1)^{\sigma}  \sum\nolimits_{s_1 \overset{\gamma_1}{\leadsto} t_{\sigma(1)} ,\ \cdots ,\ s_k \overset{\gamma_k}{\leadsto} t_{\sigma(k)},\ \mbox{$\gamma_j$ are vertex disjoint}} w(\gamma_1) w(\gamma_2) \cdots w(\gamma_k) . \]
But now our assumptions on the topology of $G$ imply that the only connectivity we can have with disjoint paths is $s_i \to t_i$, so this simplifies to
\[ \Delta^I_J(M) = \sum\nolimits_{s_1 \overset{\gamma_1}{\leadsto} t_1 ,\ s_2 \overset{\gamma_2}{\leadsto} t_2 ,\ \cdots ,\ s_k \overset{\gamma_k}{\leadsto} t_k,\ \mbox{$\gamma_j$ are vertex disjoint}} w(\gamma_1) w(\gamma_2) \cdots w(\gamma_k)  \qedhere \]
\end{proof}

\begin{cor}
Let the graph $G$ be as in the Gessel-Lindstr\"om-Viennot lemma and assume that all of the weights $w(e)$ are positive. Then the matrix $M(G)$ is totally nonnegative.
\end{cor}

We remark on how this construction relates to our earlier discussion of multiplying matrices: If we have a graph $G$ with sources $S$ and targets $T$, and another graph $H$ with sources $T$ and targets $U$, we can join them together to make a larger graph $GH$ as shown:
\smallskip

\centerline{
\begin{tikzpicture}[scale=1.25]
\draw (1,1) rectangle (4, 3);
\draw (5,1) rectangle (8, 3);
\node (s1) at (1,2.5) {$\bullet$};
\node (s2) at (1,2) {$\bullet$};
\node (s3) at (1,1.5) {$\bullet$};
\node (t1) at (4,2.5) {$\bullet$};
\node (t2) at (4,1.5) {$\bullet$};
\node (tt1) at (5,2.5) {$\bullet$};
\node (tt2) at (5,1.5) {$\bullet$};
\node (u1) at (8,2.75) {$\bullet$};
\node (u2) at (8,2.25) {$\bullet$};
\node (u3) at (8,1.75) {$\bullet$};
\node (u4) at (8,1.25) {$\bullet$};
\node (s1label) at (0.75,2.5) {$s_1$};
\node (s2label) at (0.75,2) {$s_2$};
\node (s3label) at (0.75,1.5) {$s_3$};
\node (t1label) at (3.75,2.5) {$t_1$};
\node (t2label) at (3.75,1.5) {$t_2$};
\node (tt1label) at (5.25,2.5) {$t_1$};
\node (tt2label) at (5.25,1.5) {$t_2$};
\node (u1label) at (8.25,2.75) {$u_1$};
\node (u2label) at (8.25,2.25) {$u_2$};
\node (u3label) at (8.25,1.75) {$u_3$};
\node (u4label) at (8.25,1.25) {$u_4$};
\node (G) at (2.5,2) {$\Large{G}$};
\node (H) at (6.5,2) {$\Large{H}$};

\draw[->] (t1) -- (tt1); \draw[->] (t2) -- (tt2);
 

\end{tikzpicture}}

Then $M(GH) = M(G) M(J)$.

\begin{proof}
Take $s \in S$ and $u \in U$. Any path from $s$ to $u$ through $GH$ must cross through exactly one of the elements of $T$. To the left of that crossing, it is a path from $s$ to $t$ through $G$; to the right it is a path from $t$ to $u$ through $H$. And, consversely, given a path $s \to t$ through $G$ and a path $t \to u$ through $H$, we can concatenate them to give a path $s \to u$ through $GH$. So
\[ M(GH)_{su} = \sum_{t \in T} M(G)_{st} M(H)_{tu} , \]
which is the formula for matrix multiplication.
\end{proof}

For example, the $3 \times 3$ matrix product from the start of lecture can be understood as the graph
\[ \xymatrix{
s_1 \ar[r] & \bullet \ar[rr] \ar[d]^x && \bullet \ar[r] \ar[d]^z & t_1 \\
s_2 \ar[r] & \bullet \ar[r] & \bullet \ar[r] \ar[d]^y & \bullet \ar[r] & t_2 \\
s_3 \ar[rr] && \bullet \ar[rr] && t_3 \\
}.
\]

Our goal for the next week will be to generalize the claim from the start of lecture to the $n \times n$ case. Namely, we will show that the graph below, with $n$ horizontal lines, parametrizes $n \times n$ upper triangular matrices with $1$'s on the diagonal and all the ``obvious" minors positive.

\begin{figure}[h]
\centerline{
\tikzset{
    edge/.style={->,> = latex'}
}


\begin{tikzpicture}[scale=1.25]

% vertices
\node (1) at (0,5) {$\bullet$};
\node (2) at (2,5) {$\bullet$};
\node (3) at (4,5) {$\bullet$};
\node (4) at (6,5) {$\bullet$};
\node (5) at (8,5) {$\bullet$};

\node (6) at (0,4) {$\bullet$};
\node (7) at (2,4) {$\bullet$};
\node (8) at (4,4) {$\bullet$};
\node (9) at (6,4) {$\bullet$};
\node (10) at (8,4) {$\bullet$};

\node (11) at (1,4) {$\bullet$};
\node (12) at (3,4) {$\bullet$};
\node (13) at (5,4) {$\bullet$};
\node (14) at (7,4) {$\bullet$};

\node (15) at (1,3) {$\bullet$};
\node (16) at (3,3) {$\bullet$};
\node (17) at (5,3) {$\bullet$};
\node (18) at (7,3) {$\bullet$};

\node (19) at (2,3) {$\bullet$};
\node (20) at (4,3) {$\bullet$};
\node (21) at (6,3) {$\bullet$};

\node (22) at (2,2) {$\bullet$};
\node (23) at (4,2) {$\bullet$};
\node (24) at (6,2) {$\bullet$};

\node (25) at (3,2) {$\bullet$};
\node (26) at (5,2) {$\bullet$};

\node (27) at (3,1) {$\bullet$};
\node (28) at (5,1) {$\bullet$};

\node (29) at (4,1) {$\bullet$};
\node (30) at (4,0) {$\bullet$};

\node (31) at (-2,5) {$1$}; \node (32) at (-2,4) {$2$}; \node (33) at (-2,3) {$3$}; \node (34) at (-2,2) {$4$}; \node (35) at (-2,1) {$5$}; \node (36) at (-2,0) {$6$};
\node (37) at (10,5) {$1$}; \node (38) at (10,4) {$2$}; \node (39) at (10,3) {$3$}; \node (40) at (10,2) {$4$}; \node (41) at (10,1) {$5$}; \node (42) at (10,0) {$6$};

\draw[edge] (31)--(1); \draw[edge] (1)--(2); \draw[edge] (2)--(3); \draw[edge] (3)--(4); \draw[edge] (4)--(5); \draw[edge] (5)--(37); 
\draw[edge] (32)--(6); \draw[edge] (6)--(11); \draw[edge] (11)--(7); \draw[edge] (7)--(12); \draw[edge] (12)--(8); \draw[edge] (8)--(13); \draw[edge] (13)--(9); \draw[edge] (9)--(14); \draw[edge] (14)--(10); \draw[edge] (10)--(38);
\draw[edge] (33)--(15); \draw[edge] (15)--(19); \draw[edge] (19)--(16); \draw[edge] (16)--(20); \draw[edge] (20)--(17);  \draw[edge] (17)--(21); \draw[edge] (21)--(18);  \draw[edge] (18)--(39); 
\draw[edge] (34)--(22); \draw[edge] (22)--(25); \draw[edge] (25)--(23); \draw[edge] (23)--(26); \draw[edge] (26)--(24);  \draw[edge] (24)--(40); 
\draw[edge] (35)--(27); \draw[edge] (27)--(29); \draw[edge] (29)--(28); \draw[edge] (28)--(41); 
\draw[edge] (36)--(30); \draw[edge] (30)--(42); 

\draw[edge] (1)--(6) node[midway, right] {$t_{1}$}; \draw[edge] (2)--(7) node[midway, right] {$t_{3}$}; \draw[edge] (3)--(8) node[midway, right] {$t_{6}$}; \draw[edge] (4)--(9) node[midway, right] {$t_{10}$}; \draw[edge] (5)--(10) node[midway, right] {$t_{15}$}; 
\draw[edge] (11)--(15) node[midway, right] {$t_{2}$}; \draw[edge] (12)--(16) node[midway, right] {$t_{5}$}; \draw[edge] (13)--(17) node[midway, right] {$t_{9}$}; \draw[edge] (14)--(18) node[midway, right] {$t_{14}$}; 
\draw[edge] (19)--(22) node[midway, right] {$t_{4}$}; \draw[edge] (20)--(23) node[midway, right] {$t_{8}$}; \draw[edge] (21)--(24) node[midway, right] {$t_{13}$}; 
\draw[edge] (25)--(27) node[midway, right] {$t_{7}$}; \draw[edge] (26)--(28) node[midway, right] {$t_{12}$};
\draw[edge] (29)--(30) node[midway, right] {$t_{11}$}; 
\end{tikzpicture}
}
\caption{The graph to parametrize upper triangular totally positive matrices} \label{UnipotentGraph}
\end{figure}

\section*{September 15 : Parametrizing totally positive unipotent matrices -- Part 1}

Consider the  $n\times n$ unipotent upper triangular matrices, which are matrices of the form
 \[\begin{bmatrix}
1 & * & \cdots & *\\
 & 1 & \cdots & *\\
 & & \ddots & \vdots\\
 & & & 1
\end{bmatrix}.\] Given $I=\{i_1<\cdots<i_k\}$ and $J=\{j_1<\cdots<j_k\}$, we would like to know whether or not it is even possible for the minor $\Delta_J^I(M)$ to be nonzero for some $n\times n$ unipotent upper triangular matrix $M$. 

First, suppose there is an index $\ell$ such that $j_\ell<i_\ell$.  Let $M$ be an arbitrary unipotent upper triangular matrix. Upon inspection, we find that within the first $\ell$ columns of $(M_{ij})_{i\in I,\,j\in J}$, nonzero entries can only appear in the first $\ell-1$ rows. This implies that first $\ell$ columns of $(M_{ij})_{i\in I,\,j\in J}$ are linearly dependent, so $\det((M_{ij})_{i\in I,\, j\in J})=\Delta_J^I(M)=0$. 

On the other hand, if $i_\ell\leq j_\ell$ for all $1\leq \ell\leq k$, then we can choose $M$ to be the unipotent upper triangular matrix satisfying \[M_{ij}=\begin{cases} 1, & \mbox{if } i=j\text{ or }(i,j)=(i_\ell,j_\ell)\text{ for some }1\leq \ell\leq k; \\ 0, & \mbox{otherwise.} \end{cases}\] 
Then $(M_{ij})_{i\in I,,j\in J}$ is a lower triangular matrix with $1$'s on its diagonal, so $\Delta_J^I(M)=1$. 

This shows that the natural notion of total positivity for unipotent upper triangular matrices is given by the requirement $\Delta_J^I(M)>0$ for all $I=\{i_1<\cdots<i_k\}$ and $J=\{j_1<\cdots<j_k\}$ satisfying $i_\ell\leq j_\ell$ for all $1\leq \ell\leq k$.
Our goal is now to prove that these matrices are parameterized by weighted graphs as in Figure~\ref{UnipotentGraph} with positive real edge weights. More precisely, we have the following theorem. 

\begin{thm}
Let the weights of the above graph range over $\mathbb R_{>0}^{\binom{n}{2}}$. This gives a homeomorphism between $\mathbb R_{>0}^{\binom{n}{2}}$ and the space of $n\times n$ unipotent upper triangular matrices $M$ for which $\Delta_J^I(M)>0$ whenever $i_\ell\leq j_\ell$ for all $1\leq \ell\leq k$. 
\end{thm}


\begin{proof}[Start of proof]
We already know by the Gessel--Lindstr\"om--Vienot lemma that this map is well-defined in the sense that every matrix $M$ in its image satisfies $\Delta_J^I(M)>0$ whenever $i_\ell\leq j_\ell$ for all $1\leq \ell\leq k$. In order to prove that it is a bijection, we construct its inverse explicitly. 

Suppose $M$ is such that $\Delta_J^I(M)>0$ whenever $i_\ell\leq j_\ell$ for all $1\leq \ell\leq k$. Choose $k\in[n]$ and $a\in[n-k]$. Let $i_\ell=a+\ell$ and $j_\ell=n-k+\ell$ for all $1\leq\ell\leq k$. There is only one collection of vertex-disjoint paths from the set $I$ of sources to the set $J$ of sinks, so the minor $\Delta_J^I(M)$ is a monomial formed by taking the product of some of the edge weights $t_r$. We can now solve for each edge weight as a quotient of products of minors of $M$. For example, in the above graph (with $n=5$), we have \[\Delta_{456}^{345}(M)=t_{11}t_{12}t_{13}\quad \text{and}\quad \Delta_{56}^{45}(M)=t_{11}t_{12},\] so $t_{13}=\dfrac{\Delta_{456}^{345}(M)}{\Delta_{56}^{45}(M)}$. Similarly, \[\Delta_{456}^{234}(M)=t_7t_8t_9t_{11}t_{12}t_{13}\quad \text{and}\quad \Delta_{56}^{34}(M)=t_7t_8t_{11}t_{12},\] so $t_9=\dfrac{\Delta_{456}^{234}(M)}{\Delta_{56}^{34}(M)\cdot t_{13}}=\dfrac{\Delta_{456}^{234}(M)\Delta_{56}^{45}(M)}{\Delta_{56}^{34}(M)\Delta_{456}^{345}(M)}$. Every one of the minors involved in one of these expressions for an edge weight $t_r$ has a column set of the form $\{n-k+1,\ldots,n\}$ for some $k$. By our hypothesis on the positivity of the minors of $M$, the resulting edge weights $t_r$ are all positive. 

At this point, we have constructed smooth maps from $\RR^{\binom{n}{2}}$ to the locus of totally positive unipotent matrices, and vice versa. And we have chosen our formula so that the composition $\RR^{\binom{n}{2}} \longrightarrow (\mbox{totally positive unipotent matrices}) \longrightarrow \RR^{\binom{n}{2}}$ is the identity. To complete our proof, we must show that the composition in the other order is also the identity.
\end{proof}

\section*{September 17 : Parametrizing totally positive unipotent matrices -- part 2}

Last time we constructed a polynomial map $f$ from $\RR_{>0}^{\binom{n}{2}}$ to the space of totally positive unipotent matrices.


\begin{remark}
This construction could be rephrased as follows. The map
$$\mathbb{R}^{\binom{n}{2}}_{>0} \rightarrow \{\text{positive unipotent }n\times n\text{ matrices}\}$$
gives rise to the following map of algebraic varieties
$$\mathbb{G}_{m}^{\binom{n}{2}} \rightarrow \mathrm{U}_{n},$$
where $\mathrm{U}_{n}$ is the unipotent radical of the group $\mathrm{GL}_{n}$. 
(Both domain and range are algebraic groups, but this is not a map of algebraic groups.)
This map could be seen as a torus chart for the group $\mathrm{U}_{n}$. That is the first example of a cluster chart which would be discussed later in the course.
\end{remark}

\subsection*{Reminder about the previous lecture}

To prove the theorem about isomorphism of two spaces we have constructed two maps:
\begin{itemize}
    \item $f: \mathbb{R}^{\binom{n}{2}}_{>0} \rightarrow \{\text{positive unipotent }n\times n\text{ matrices}\}$ which assigns a positive matrix to every set of parameters ${t_{i}}_{i = 1 \dots \binom{n}{2}}$;
    \item $g: \{\text{positive unipotent }n\times n\text{ matrices}\} \rightarrow \mathbb{R}^{\binom{n}{2}}_{>0}$ which gives a bunch of $t_i$'s from minors of a positive unipotent matrix.
\end{itemize}

We proved that $g \circ f = \mathrm{id}$. Now, let us prove that $f \circ g = \mathrm{id}$. We will give two conceptually different proofs of this fact below. 

\subsection*{``Brute force"} 
Consider an arbitrary positive unipotent matrix $M$. The matrix $f \circ g (M)$ is also positive and unipotent. Also, all flush right minors $\left\{\Delta^{a (a+1) \dots (a+k-1)}_{(n-k+1)\dots (n-1)n}\right\}$ of these two matrices coincide. So the following lemma proves that the matrices $M$ and $f \circ g (M)$ coincide, i.e., the equality $f \circ g = \mathrm{id}$ holds.

\begin{lemma}
A positive unipotent $n\times n$-matrix $N$ can be recovered from the set of flush right minors $\left\{\Delta(N)^{a (a+1) \dots (a+k-1)}_{(n-k+1)\dots (n-1)n}\right\}$.
\end{lemma}
\begin{proof}
We find entries $N_{ij}$ iteratively going from $n^{th}$ to $2^{nd}$ column, and from lowest to highest entries within each column.

$n^{th}$ column: the entries $N_{1n}, \dots, N_{n,n}$ coincide with the flush right minors $\Delta(N)^{1}_{n}, \dots, \Delta(N)^{n}_{n}$.
    
$(n-1)^{st}$ column: to find the entry $N_{(n-2)(n-1)}$ consider the minor $\Delta(N)^{(n-2)(n-1)}_{(n-1)n} = N_{(n-2)(n-1)} \cdot N_{(n-1)n} - \dots$. Next, $N_{(n-3)(n-1)}$ can be found from the $\Delta(N)^{(n-3)(n-2)}_{(n-1)n} = N_{(n-3)(n-1)} \cdot N_{(n-2)n} - \dots$.

In general, to find the $N_{(n-i)(n-j)}$ entry we use the minor $$\Delta(N)^{(n-i)\dots(n-i+j)}_{(n-j)\dots(n-1)n} = N_{(n-i)(n-j)} \cdot \Delta(N)^{(n-i-1)\dots(n-i-1+j)}_{(n-j-1)\dots(n-1)n} - \dots.$$
We emphasize that the coefficient $\Delta(N)^{(n-i-1)\dots(n-i-1+j)}_{(n-j-1)\dots(n-1)n}$ is positive, so we can divide by it, and the iterative scheme does give values of the entries $N_{ij}$.
\end{proof}



\subsection*{``Dimension count"} Firstly, both sets in question are open subsets of the space $\mathbb{R}^{\binom{n}{2}}$. Here we use the fact that the space of unipotent matrices is isomorphic to $\mathbb{R}^{\binom{n}{2}}$.

Secondly, from the equality $g \circ f = \mathrm{id}$ we see that the map $f$ is injective. Also, from the same equality we see that the differential $\mathrm{D}f$ is injective. So the map $f$ is an open immersion.

Finally, because $g \circ f = \mathrm{id}$ we see that $f \circ g$ restricted to the image of $f$ is $\mathrm{id}$.
We have now seen that $g \circ f$ is $\mathrm{id}$ on an open set (namely, the image of $f$).
Since $g \circ f$ is real analytic (in fact, given by rational functions), checking the equality $g \circ f = \mathrm{id}$ on an open set shows it everywhere.

\subsection*{Reflection on the proof} We can see that we actually proved a flush right statement. Namely, we also proved that the space of all positive unipotent matrices coincides with the space of unipotent matrices with positive flush right minors.

In other words , we replaced the exponential number of conditions on minors to the polynomial number. Moreover, the later number is minimal, in the sense that it coincides with the dimension of the space.

Analogous phenomena hold in a much general situations with positive spaces. 

\section*{September 22 : Introduction to the $0$-Hecke monoid}


Up to this point, we've let the content appear from nowhere. Let's give some references before we go on. 
The first big result in this direction is usually known as Fekete's theorem:

\begin{Theorem} [Fekete and Polya\footnote{M. Fekete, G. Polya, Uber ein Problem von Laguerre, Rend. C.M. Palermo 34 (1912) 89–120}] %I'm unsure if I assigned this correctly. Your email suggests it should be the UDL decomp attributed to Fekete?
An $m \times n$ matrix is totally positive if both:
\begin{itemize}
\item $\Delta_{I}^{\{n-k, n-k+1, \ldots, n\}} > 0$
\item $\Delta_{\{n-k, n-k+1, \ldots, n \}}^I > 0$
\end{itemize}
for all consecutive blocks $I = \{ a, a+1, \ldots, a+k \}$
\end{Theorem}

The first source that does the unipotent case specifically is probably Lusztig ``Total Positivity in Reductive Groups", 1994. Our approach is close to 
Berenstein, Fomin, and Zelevinsky, ``Parametrizations of canonical bases and totally positive matrices'', 1996.


\subsection*{Products of Chevalley generartors} 
Let $x_i(t) = I + t e_{i, i+1},$ where $e_{i,j} = e_i e_j.$ These are the upper triangular matricies with $1$'s along the diagonal, and $t$ in the $(i, i+1)$st entry.  Since $x_i(t)$ is totally nonnegative, for $t>0$, any product of $x_i(t)$'s is totally nonnegative.

We have the following identities:
$$x_i(\mathbb R_{>0}) x_j(\mathbb R_{>0}) = x_j(\mathbb R_{>0}) x_i(\mathbb R_{>0}), |i - j| \geq 2$$
$$x_i(\mathbb R_{>0}) x_{i+1} (\mathbb R_{>0}) x_i (\mathbb R_{>0}) = x_{i+1} (\mathbb R_{>0}) x_i (\mathbb R_{>0}) x_{i+1}(\mathbb R_{>0})$$
$$ x_i(\mathbb R_{>0}) x_i(\mathbb R_{>0}) = x_i(\mathbb R_{>0})$$
In the following proofs, we will make great use of the identity $$e_{i, j} e_{k, l} = \delta_{j,k} e_{i,l}$$
where $\delta_{j,k}$ is the kronecker delta function, which is $1$ if $j=k$ and $0$ otherwise. \\

For the first, we compute:

$$(I + t e_{i, i+1})(I + s e_{j, j+1}) = I + t e_{i, i+1} + s e_{j, j+1} + 0 = (I + s e_{j, j+1})(I + t e_{i, i+1})$$

Note we can invert this map easily, just read off the $(i, i+1)$ and $(j, j+1)$ entries to recover $s$ and $t.$ \\

For the second, we similarly find:

$$ (I + s e_{i, i+1})  (I + t e_{i+1, i+2}) (I + u e_{i, i+1})  = I + (s + u) e_{i, i+1} + t e_{i+1, i+2} + st e_{i, i+2}$$

while:

$$  (I + p e_{i+1, i+2}) (I + q e_{i, i+1}) (I + r e_{i+1, i+2}) = I + (p+r) e_{i+1, i+2} + q e_{i, i+1} + qr e_{i, i+2} $$

Observe that we can convert from one to the other by setting:
$$ p = tu/(s + u)$$
$$ q = s+u$$
$$ r = st/(s+u)$$

We can also recover $s$, $t$ and $u$ from the matrix using the method from last week, it's exactly a $3 \times 3$ upper triangular block. \\

To see the last:
$$( I + t e_{i, i+1}) (I + s e_{i, i+1}) = I + (s + t) e_{i, i+1}$$

and we recall that every positive number is the sum of $2$ positive numbers (and conversely). 

%\begin{ex}
%There are at least two proofs for each of these, the above proofs were very matrix algebra focused. Try converting each identity into the planar directed graphs corresponding to each side. %bleh wording
%\end{ex}

\subsection*{The $0$-Hecke monoid} We now turn to some combinatorial culture. The relations we've just seen for $x_i$'s are exactly those of the \newword{$0$-Hecke monoid}. If we fix $n$, the $0$-Hecke monoid has $n-1$ generators $e_i,$ with relations:
$$e_i e_j = e_j e_i \qquad |i-j| \geq 2$$
$$e_i e_{i+1} e_i = e_{i+1} e_i e_{i+1}$$
$$e_i^2 = e_i.$$
So it follows from our computation above that, for each element $e_{i_1} e_{i_2} \cdots e_{i_N}$ of the $0$-Hecke monoid, there is unique subset of the totally nonnegative unipotent matrices which are parametrized by $x_{i_1}(\RR_{>0}) x_{i_2}(\RR_{>0}) \cdots x_{i_N}(\RR_{>0})$. 



\begin{eg}
Let $n=3$. The $0$-Hecke monoid has  six elements: $1$, $e_1$, $e_2$, $e_1 e_2$, $e_2 e_1$ and $e_1 e_2 e_1 = e_2 e_1 e_2$. 

This should seem familiar, we've recovered our stratification of upper triangular totally non negative matrices from the first class. 
\end{eg}




We now introduce related algebraic structures to these. Not because we will use them, but to ease us into the broader community. 

First, one should recognize the similarity to the symmetric group, which has $n-1$ generators $s_i$ with relations

$$s_i s_j = s_j s_i \qquad |i-j| \geq 2$$
$$s_i s_{i+1} s_i = s_{i+1} s_i s_{i+1}$$
$$s_i^2 = 1$$

Note we've changed only the last relation, and suddenly it's a group!

Then, the braid monoid, which is generated $e_1, \ldots, e_{n-1}$ with relations

$$e_i e_j = e_j e_i \qquad |i-j| \geq 2$$
$$e_i e_{i+1} e_i = e_{i+1} e_i e_{i+1}$$

entirely omitting the last relation. One can also get the braid group by adjoining inverses. One can see how all of these monoids would have a strong relation to Tits' lemma as we saw it in the homework. The relations we leave untouched are exactly the transformations that go between reduced words. 

Finally, we mention that the $0$ in $0$-Hecke is not decorative. In general there is a $q$-Hecke algebra (or just Hecke algebra) with relations

$$e_i e_j = e_j e_i.    (|i-j| \geq 2$$
$$e_i e_{i+1} e_i = e_{i+1} e_i e_{i+1}$$
$$e_i^2 = (1-q)e_i + q$$
where $q$ is a commuting indeterminant. Note that the $1$-Hecke monoid is in fact the symmetric group algebra! One is free to leave $q$ as a commuting indeterminant, or to assign it a value from a ring.


\begin{ex}
Verify that the two $2$ dimensional subsets have disjoint images.
\end{ex}


Next time we will discuss the size of the $0$-Hecke monoid. The homeworks have already given us a strong hint that words in the monoid correspond to reduced words in the symmetric group. 



\section*{September 24 : The $0$-Hecke monoid continued}

Continuing the previous lecture, we are aiming to prove the following theorem.

\begin{theorem}\label{thm:card0Hecke}
There is a natural bijection between the $0$-Hecke monoid, $H_n$, and the symmetric group $S_n$. Namely, given $w \in S_n$, if $s_{i_1} s_{i_2} \cdots s_{i_N}$ is a reduced word for $w$, then we biject it to $e_{i_1} e_{i_2} \cdots e_{i_N}$ in $H_n$.
\end{theorem}

By the Tits Lemma, the map $S_n \to H_n$ in the Theorem statement is well defined. Denote this map by $\phi$.

Let us prove surjectivity of the map $\phi$:
\begin{lemma}
For any word $e_{i_1}e_{i_{2}}\dots e_{i_N}$ in $\mathcal{H}_{n}^{(0)}$, there exists $e_{j_1}e_{j_{2}}\dots e_{j_M}$ with the same product but reduced corresponding word $s_{j_1}s_{j_{2}}\dots s_{j_M}$ in $S_{n}$.
\end{lemma}
\begin{proof}
Induction on $N$. Base case $N=0$ is clear.

Take our word $e_{i_1}e_{i_{2}}\dots e_{i_N}$. By induction we can assume that $s_{i_1}s_{i_{2}}\dots s_{i_{N-1}}$ is reduced. Let $w = s_{i_1}s_{i_{2}}\dots s_{i_{N-1}}$ and $i := i_{N}$.

We have two possible cases:
\begin{itemize}
    \item $w \cdot s_{i}$ is reduced, then we are done.
    
    \item $w \cdot s_{i}$ is not reduced. In this case, $\ell(w\cdot s_{i}) = \ell(w) -1$, or, equivalently, $w(i) > w(i+1)$. By one of the HW problems, $w$ has a reduced word $s_{j_1}s_{j_2} \dots s_{j_{N-1}}$ with $j_{n-1} = i$. Therefore 
\[ e_{i_1}e_{i_{2}}\dots e_{i_N} = e_{i_1}e_{i_{2}}\dots e_{i_{N-2}} e_{i} e_{i} =  e_{i_1}e_{i_{2}}\dots e_{i_{N-2}} e_{i}. \]
    This word is a shorter word, to which we can apply the induction process. \qedhere
\end{itemize}
\end{proof}

Let us construct the inverse map for $\phi$. For this, we introduce the action of $H_n$ on $S_{n}$ by 

\[
e_{i} \circ w =
\begin{cases}
s_i w & \ell(s_i w) > \ell(w)\\
w & \ell(s_i w) < \ell(w) .\\
\end{cases}
\]

To prove that this gives an actual action, we need only check the correctness of the relations between the generators.

\begin{lemma}
The map $\psi: H_n \rightarrow S_{n} $ which is given by $\psi(x) := x \circ id$ is inverse for $\phi$.
\end{lemma}

The Theorem follows from two previous lemmata.

\subsection*{0-Hecke Monoid and Totally Non-Negative Matrices}

The original motivation to consider the 0-Hecke monoid is that for every element $e_{i_1}\dots e_{i_N}$ we get a subset of totally non-negative matrices, as the image of the $x_{i_1}(\mathbb{R}_{>0})\dots x_{i_N}(\mathbb{R}_{>0})$, and this subset in independent of the choice of word.

Each such subset we can identify by the value of the rank matrix $(r_{ij})_{1 \leqslant i,j \leqslant n+1}$. We recall (see Problem 4 of HW1) that for every upper-right matrix we can consider a matrix with the $(i, n+1-j)$-entry equal to rank of the submatrix formed out of first $i$ rows and last $j$ columns.

Entries of rank matrices satisfy some natural inequalities. Let us pronounce the most sophisticated one: the rank matrix cannot have a submatrix fo the form $$\begin{pmatrix}
r+1 & r \\
r+1 & r+1 
\end{pmatrix} \text{ for some }r \in \mathbb{Z}.$$

The following sets of matrices are equal:
\begin{itemize}
    \item those which occur as ranks of upper-right submatrices;
    \item those matrices obeying the listed inequalities between ranks;
    \item the matrices that occur as ranks of submatrices of permutation matrices.
\end{itemize}

Our next goal is to prove the following proposition.

\begin{proposition}
The totally non-negative unipotent matrices whose rank matrices match $w$ are parametrized bijectively using a reduced word for $w$.
\end{proposition}

\subsection*{Context from Algebraic Groups}
Bruhat decomposition in the theory of algebraic groups is analogous to the previous proposition. Recall that if $B_{+}$ is a Borel subgroup of $\mathrm{GL}_{n}$ (e.g., the group of upper-right matrices), and $B_{-}$ is an opposite Borel subgroup (lower-left matrices respectively). Then we have the decomposition
$$\mathrm{GL}_{n} = \bigsqcup_{w \in S_{n}} B_{-} w B_{-}.$$


\section*{September 29 : The product has the correct ranks}

The result we're aiming for over the next few classes is the following.

\medbreak
\noindent \textbf{Theorem.} Given $w\in S_n$, the set of $n\times n$ totally nonnegative unipotent upper triangular matrices, the ranks of whose upper-right submatrices match those of $w$, is homeomorphic to $\mathbb{R}^{\ell(w)}_{>0}$. A parameterization is given by 
\begin{equation*}
	(t_1,\dots, t_N) \mapsto x_{i_1}(t_1) \cdots x_{i_N}(t_N),
\end{equation*}
where $s_{i_1}\cdots s_{i_N}$ is a reduced word for $w$. 
\medbreak

We've already done some work toward this result: we showed that these $S_n$ rank conditions stratify the matrices we're interested in, and we've also shown that the map in the theorem is well-defined, i.e., that $x_{i_1}(t_1) \cdots x_{i_N}(t_N)$ doesn't depend on the reduced word for $w$. 

For the next few classes, we have three main goals toward this result.

\noindent\textbf{Goal 1.} Check that the matrix $x_{i_1}(t_1) \cdots x_{i_N}(t_N)$ has the right ranks corresponding to $w$. Once we learn about Bruhat decompositions, this will be the check that the image of the map in the theorem lies in $N_+ \cap B_{-}wB_{-}$.

\noindent\textbf{Goal 2.} Build the inverse to the map in the theorem. We will learn about flag manifolds, Grassmannians, etc. on our way to doing this. 

\noindent\textbf{Goal 3.} Check that $N_+\cap B_-wB_-$ is a manifold of dimension $\ell(w)$. 

Today, we started on Goal 1. As a warm-up, we considered the following situation. Let $M$ be a $k\times n$ matrix of rank $k$. Denote the $j^\textit{th}$ column of $M$ by $M_j$. Let $1\le q_1 < q_2 < \dots < q_k\le n$ be the unique indices such that $M_{q_j}$ is not in the span of $M_{q_{j+1}},\dots,M_{q_k}$. (These are the ``right-hand pivot columns'' of reduced row echelon form.)

We will abbreviate $\Delta^{[k]}_{J}(M)$ by $\Delta_J(M)$. 

\medbreak
\noindent\textbf{Problem 1.} Show that $\Delta_{q_1\cdots q_k}(M) \ne 0$. Show that if $1\le r_1<r_2<\cdots<r_k\le n$ are such that $\Delta_{r_1\cdots r_k}(M) \ne 0$, then $r_j\le q_j$ for each $j$. 
\medbreak
\noindent\textit{Solution.} The dimension of the span $\langle M_{q_1},\dots,M_{q_k} \rangle$ is $k$ by definition of the $q_j$. Thus these columns are linearly independent, and so $\Delta_{q_1\cdots q_k}(M) \ne 0$. In general, the columns $M_{a}$ for $a > q_{j}$ are in the span of $M_{q_{j+1}}, \dots, M_{q_k}$. Therefore, if $j$ is maximal such that $r_j>q_j$, the column $M_{r_j}$ is in the span of the columns $M_{r_{j+1}}=M_{q_{j+1}},\dots,M_{r_{k}}=M_{q_{k}}$, and thus $\Delta_{r_1\cdots r_k}(M) = 0$. 

\medbreak
\noindent\textbf{Problem 2.} Show that $\text{rank}(M_{a(a+1)\dots n}) = \#(\{a,a+1,\dots,n\}\cap Q)$, where $Q = \{q_1,\dots,q_k\}$. 
\medbreak
\noindent\textit{Solution.} Again, this follows from the statement that the columns $M_{a}$ for $a > q_{j}$ are in the span of $M_{q_{j+1}}, \dots, M_{q_k}$, since these columns are independent. 
\medbreak

Next we move to a situation closer to the one we're ultimately interested in. 
\medbreak
\noindent\textbf{Problem 3.} Let $M$ be a totally nonnegative $k\times n$ matrix of rank $k$ with right-hand pivot set $Q$. Let $t>0$. Show that the right-hand pivot set of $M\cdot x_i(t)$ is 
\begin{equation*}
	\begin{cases}
		(Q\cup\{i+1\})\setminus\{i\} & \text{if } i\in Q, i+1\notin Q \\
		Q & \text{otherwise}
	\end{cases}.
\end{equation*}
\medbreak
\noindent\textit{Solution.} Let $M' = M \cdot x_i(t)$, and let $M_j'$ denote the $j^\textit{th}$ column of $M'$. Right multiplication by $x_i(t)$ is a column operation; specifically, $M'_j = M_j$ for $j\ne i+1$, and $M'_{i+1} = M_{i+1}+tM_i$. It's relatively easy to verify the formula in all cases but one, namely when $i\notin Q$ and $i+1\in Q$. In this case, the only potential issue is that $M'_{i+1}$ is no longer independent of $M'_{q_j}$ for $q_j>i+1$. However, we have that 
\begin{equation*}
	\Delta_{Q}(M') = \Delta_Q(M) + t\Delta_{(Q\setminus\{i+1\})\cup\{i\}}(M)
\end{equation*}
by multilinearity of the determinant. The term $\Delta_Q(M)$ is positive, since the columns of $M$ in $Q$ are independent, and $M$ is totally nonnegative. Similarly, the second term is nonnegative, by positivity of $t$ and nonnegativity of $M$. Therefore, we see that the columns of $M'$ in $Q$ are indeed independent. 
\bigbreak 

Now let $i_1\cdots i_N$ be a word from the alphabet $\{1,2,\dots,n-1\}$, and let $t_1,\dots,t_N > 0$. 

\medbreak
\noindent\textbf{Problem 4.} Let $M$ be the top $k$ rows of $x_{i_1}(t_1) \cdots x_{i_N}(t_N)$. Show that the right-hand pivot set of $M$ is $[k]\cdot e_{i_1}\cdots e_{i_N}$, where $\cdot$ denotes the action of the $0$-Hecke monoid on subsets of $[n]$ of size $k$. 
\medbreak
\noindent\textit{Solution.} Let $I$ be the $k\times n$ matrix whose leftmost $k\times k$ submatrix is the identity matrix and all of whose other entries are 0. Clearly we have that the right-hand pivot set of $I$ is $[k]$. Therefore, by induction, it suffices to show: for any $k\times n$ totally nonnegative matrix $A$ of rank $k$ with right-hand pivot set $Q$, the right-hand pivot set of $A\cdot x_i(t_i)$ is $Q\cdot e_i$. This is exactly the content of Problem 3. 

This gives us enough information to compute the rank matrix of the product  $x_{i_1}(t_1) \cdots x_{i_N}(t_N)$. It remains to see that the result of this computation matches the permutation $w$. We'll finish this next time.

\section*{October 1 : Bruhat decomposition}
We start by finishing off our first goal from the previous class, which is to prove:

\begin{Proposition}
Let $e_{i_1}\cdots e_{i_N}$ be an element of the 0-Hecke monoid, corresponding to the permutation $w\in S_n$. Then the ranks of the upper right submatrices of $x_{i_1}(t_1)\cdots x_{i_N}(t_N)$, for $t_1,\ldots, t_N\subset \RR_{>0}$, are the same as those of the permutation matrix of $w$.
\end{Proposition}

In order to find the upper right ranks of our matrix, it is equivalent to find the right-hand pivot set of its first $k$ rows for each $k$. We concluded the last class by showing that that pivot set is $[k]\cdot e_{i_1}\cdots e_{i_N}$, using the action of the 0-Hecke monoid on subsets of $[n]$. It thus remains to show:

\begin{Proposition}
The top $k$ rows of the permutation matrix $w$ have pivot set $[k]\cdot e_{i_1}\cdots e_{i_N}$. 
\end{Proposition}

\begin{proof}
By induction on $N$. The base case $N = 0$ just reduces to looking at the identity matrix. Now suppose the proposition is true for $w'$ corresponding to $e_{i_1}\cdots e_{i_{N-1}}$. We then want to show that when we act on $w'$ on the right by the generator $e_i := e_{i_N}$ of the Hecke monoid, giving $w$, the effect on the pivot set of the first $k$ rows is likewise given by the action of $e_i$. Importantly, since we're working with submatrices of a permutation matrix, the pivot set will just be the set of columns which contain $1$.

This breaks into 6 cases, based on whether $w'(i) < w'(i+1)$ (case 1) or $w'(i+1) > w'(i)$ (case 2), as well as whether row $k$ lies above (case a), between (case b), or below (case c) rows $w'(i)$ and $w'(i+1)$. Fortunately, most of them are easy:

\begin{itemize}
\item[(1a), (2a)] If rows $w'(i)$ and $w'(i+1)$ both lie below row $k$, then neither $i$ nor $i+1$ is in the pivot set, and this remains true after we apply $e_i$. This is consistent with the fact that the action of $e_i$ does not affect a set containing neither $i$ nor $i+1$.
\item[(1c), (2c)] If rows $w'(i)$ and $w'(i+1)$ both lie at or above row $k$, then both $i$ and $i+1$ are in the pivot set, and this remains true after we apply $e_i$. This is consistent with the fact that the action of $e_i$ does not affect a set containing both $i$ and $i+1$.
\item[(1b)] If $w'(i)\leq k < w'(i+1)$, then $i$ is in the pivot set and $i+1$ is not. Applying $e_i$ exchanges columns $i$ and $i+1$, which removes $i$ from the pivot set and puts $i+1$ in. This is consistent with the action of $e_i$ on the set.
\item[(2b)] If $w'(i+1) \leq k < w'(i)$, then $i+1$ is in the pivot set and $i$ is not. Because $w'(i+1) < w'(i)$, applying $e_i$ does not affect $w'$, which is consistent with the action of $e_i$ on the set.
\end{itemize}
This finishes the induction step of our proof.
\end{proof}

Now that we've finished our first goal, we introduce the Bruhat decomposition. We let $B_+\subset \mbox{GL}_n$ be the subgroup of upper triangular matrices, and $B_-$ the subgroup of lower triangular matrices. We let $N_+\subset B_+$ and $N_-\subset B_-$ be the subgroups of such matrices with 1's on the diagonal.

\begin{thm}[Bruhat decomposition]
\[\mbox{GL}_n = \bigsqcup_{w\in S_n} B_- w B_+\]
Additionally, given a matrix $M\in \mbox{GL}_n$, it belongs in the subset given by the $w$ with the same upper left ranks.
\end{thm}

The formula is still true if we replace the $B_-$ on the left by $B_+$ and/or the $B_+$ on the right by $B_-$. The former swap replaces ``upper'' by ``lower'' in the second statement of the theorem, and the latter replaces ``left'' by ``right''. 

It will be easier for us to do this by induction by also considering partial permutation matrices, which need not be square. These are matrices which have \emph{at most} one $1$ in each row and column, with all other entries 0. We write $PP_{mn}$ to denote the set of $m\times n$ partial permutation matrices. With this in place, we can actually prove a more general version of the decomposition:
\[
\mbox{Mat}_{m\times n} = \bigsqcup_{\pi\in PP_{mn}} B_-(m) \pi B_+(n)
\]
where $B_-(m)$ and $B_+(n)$ are the subgroups of $m\times m$ and $n\times n$ matrices respectively.

To prove the decomposition, we first justify the second part of the theorem statement by showing that multiplication on the left by an element of $B_-$ does not change the ranks of upper left submatrices., and neither does multiplication on the right by an element of $B_+$. Specifically, multiplying on the left by an element of $B_-$ adds multiples of higher rows to lower ones, which does not change the space spanned by any set of consecutive rows starting from the top. Likewise, multiplying on the right by an element of $B_+$ adds multiples of columns to further right ones, which does not change the space spanned by any set of consecutive columns starting from the left. 

Next, we show that we can write any $m\times n$ matrix $X$ as $b_-\pi b_+$ for $b_-\in B_-$, $\pi\in PP_{mn}$, and $b_+\in B_+$, and that this $\pi$ is unique. We proceed by induction on $m$. The base case of a $0\times n$ matrix is trivial, since there is only one $0\times n$ matrix. 

Now consider $X$. By the inductive hypothesis, we can multiply on the right by an element of $B_-$ and on the left by an element of $B_+$ and produce a partial permutation matrix with an extra row added at the bottom, such as the example shown here:
\[
\begin{pmatrix}
0 & 1 & 0 & 0 & 0 \\
1 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 1 & 0\\
* & * & * & * & *
\end{pmatrix}
\]
For each column of the partial permutation matrix which contains 1, we can add a multiple of the row containing that 1 to the bottom row and cancel out its entry in that column:
\[
\begin{pmatrix}
0 & 1 & 0 & 0 & 0\\
1 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 1 & 0\\
0 & 0 & * & 0 & *
\end{pmatrix}
\]
Importantly, all of these operations correspond to multiplying on the left by elements of $B_-$.

Then, we can add a multiple of the first column which contains a nonzero entry in the bottom row to each other column which contains a nonzero entry in the bottom row and zero those entries out. These operations correspond to multiplying on the right by elements of $B_+$. Then, after a final scaling, we obtain a partial permutation matrix:
\[
\begin{pmatrix}
0 & 1 & 0 & 0 & 0\\
1 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 1 & 0\\
0 & 0 & 1 & 0 & 0
\end{pmatrix}
\]
Now, since we know that multiplication by $B_-$ on the left and $B_+$ on the right preserves upper left ranks, this partial permutation matrix will have the same such ranks. This also shows us that the partial permutation matrix we obtain in this way is unique.

With this, we have proven the Bruhat decomposition.

\begin{Remark}
As far as David Speyer knows, the original source for the rank matrix approach to Bruhat decomposition is surprisingly late: ``Flags, Schubert polynomials, degeneracy loci, and determinantal formulas", William Fulton, 1992. Another good source is Chapters 14 and 15 of \emph{Cominatorial Commutative Algebra}, by Ezra Miller and Bernd Sturmfels.
\end{Remark}

\begin{Remark} We can think of $B_+(m)$ as the subgroup of matrices which preserve the flag
\[
F_1 := \begin{pmatrix}
* \\ 0 \\ \vdots \\ 0 \\ 0
\end{pmatrix} \subset 
F_2 := \begin{pmatrix}
* \\ * \\ \vdots \\ 0 \\ 0
\end{pmatrix} \subset \cdots \subset
F_{m-1} := \begin{pmatrix}
* \\ * \\ \vdots \\ * \\ 0
\end{pmatrix} \subset
F_m := \begin{pmatrix}
* \\ * \\ \vdots \\ * \\ *
\end{pmatrix}
\]
and likewise as $B_-(n)$ as the subgroup of matrices which preserve the flag
\[
G_1 := \begin{pmatrix}
0 \\ 0 \\ \vdots \\ 0 \\ *
\end{pmatrix} \subset 
G_2 := \begin{pmatrix}
0 \\ 0 \\ \vdots \\ * \\ *
\end{pmatrix} \subset \cdots \subset
G_{n-1} := \begin{pmatrix}
0 \\ * \\ \vdots \\ * \\ *
\end{pmatrix} \subset
G_n := \begin{pmatrix}
* \\ * \\ \vdots \\ * \\ *
\end{pmatrix}
\]
If we view a matrix $M$ as an element of $\mbox{Hom}(\CC^n, \CC^m)$, then the upper left submatrix corresponds to the induced map $G_j\to \CC^m / F_{m-i}$. This more coordinate-agnostic interpretation is useful in the more general context of vector bundles, which is the main topic of Fulton's ``Flags, Schubert polynomials, degeneracy loci, and determinantal formulas", cited above. 
\end{Remark}

Looking forward, we note that, while the permutation $w$ or partial permutation $\pi$ in the Bruhat decomposition is unique, the full decomposition $b_-wb_+$ is not. For example, we can actually always obtain a decomposition of the form $N_-WB_+$, by factoring out the diagonal entries of the $B_-$ matrix as a diagonal matrix and commuting it through $W$ to the other side. In fact, we'll be able to fix this next time with the following:
\begin{thm}
Each matrix in $B_-wB_+$ has a unique factorization of each of the following forms:
\begin{align*}
&B_- w (w^{-1}N_+ w\cap N_+) \\
&(N_-\cap w N_- w^{-1})(B_- w\cap wB_+)(w^{-1} N_+w \cap N_+) \\
&(N_-\cap w N_- w^{-1})w B_+
\end{align*}
\end{thm}
We finish by looking at the extreme cases of this. When $w = \mbox{id}$, the top and bottom lines give unique factorizations of form $B_-N_+$ and $N_-B_+$---this is precisely LU decomposition. The middle line gives a unique factorization of the form $N_-TN_+$, where $T$ consists of the diagonal matrices, the intersection $B_-\cap B_+$---this is the LDU decomposition.

On the other hand, if $w = w_0$ is the longest word, which corresponds to the matrix
\[
\begin{pmatrix}
0 & \cdots & 0 & 1 \\
0 & \cdots & 1 & 0 \\
\vdots & \ddots & \vdots & \vdots \\
1 & \cdots & 0 & 0
\end{pmatrix}
\]
then we have $w_0N_-w_0^{-1} = N_+$, which makes the first factor in the second expression $N_-\cap N_+ = \{\mbox{id}\}$. The last factor likewise only includes the identity. Then $B_-w_0$ and $w_0B_+$ both give the set of matrices of the form
\[
\begin{pmatrix}
0 & \cdots & 0 & * \\
0 & \cdots & * & * \\
\vdots & \ddots & \vdots & \vdots \\
* & \cdots & * & *
\end{pmatrix}
\]
This is consistent with the fact that $B_- w_0 B_+$ consists of the matrices with the same upper left ranks as $w_0$.


\section*{October 6 : A unique Bruhat decomposition}
As we stated at the end of last time, while the permutation or partial permutation in the Bruhat decomposition is unique, the full decomposition $X = b_- w b_+$ is generally not. We now discuss getting a unique representation. For simplicity, we switch back to the case of permutation matrices. 

Here is where we are going:

\noindent\textbf{Theorem.} Each matrix in $B_- w B_+$ has a unique representation in the forms
\begin{equation*}
	B_- w (w^{-1}N_+ w \cap N_+) = (N_-\cap wN_-w^{-1})(B_- w \cap w B_+)(w^{-1}N_+ w \cap N_+) = (N_- \cap wN_- w^{-1}) wB_+.
\end{equation*}

Let $\Phi_+ = \{(i,j) : 1\le i<j \le n\}$. For any $X\subseteq \Phi_+$, let $N_+(X) = \{g\in N_+ : g_{ij} = 0 \text{ for } (i,j)\notin X\}$. 

\noindent\textbf{Problem 1.} Show that $N_+\cap wN_+w^{-1}$ is $N_+(X)$ for a certain set $X$, and describe $X$ explicitly. Show that $\# X = \binom{n}{2} - \ell(w)$. 

\noindent\textit{Solution.} The nonzero entries of elements of $N_+$ are those indexed by $\Phi_+$. For any matrix $M$, it is easy to see that $(w M w^{-1})_{ij} = M_{w^{-1}(i) w^{-1}(j)}$, so that the nonzero entries of elements of $wN_+w^{-1}$ are those indexed by $w\Phi_+ = \{(w(i),w(j)) : 1\le i < j \le n\}$. Thus we see that $N_+\cap w N_+ w^{-1}$ is $N_+(X)$ for $X = \Phi_+ \cap w\Phi_+ = \{(i,j) : 1\le i < j \le n, \; 1\le w^{-1}(i) < w^{-1}(j) \le n\}$, which is complement of the set of inversions of $w^{-1}$ in $\Phi_+$, and so we also have $\# X = \binom{n}{2} - \ell(w^{-1}) = \binom{n}{2}-\ell(w)$. 

\noindent\textbf{Problem 2.} For any subset $X$ of $\Phi_+$, show that every element of $N_+$ has a unique factorization of the form $N_+(X)N_+(\Phi_+\setminus X)$. 

\noindent\textit{Solution.} As an example, consider the $n=4$ case with $X = \{(1,2),(1,4),(2,3)\}$. We have 
\begin{equation*}
	\begin{bmatrix}
		1 & a & 0 & b \\
		  & 1 & c & 0 \\
		  &   & 1 & 0 \\
		  &   &   & 1
	\end{bmatrix} \begin{bmatrix}
		1 & 0 & x & 0 \\
		  & 1 & 0 & y \\
		  &   & 1 & z \\
		  &   &   & 1
	\end{bmatrix} = 
	\begin{bmatrix}
		1 & a & x & ay+b \\
		  & 1 & c & y+cz \\
		  &   & 1 & z \\
		  &   &   & 1
	\end{bmatrix},
\end{equation*} 
and it is easy to see the statement is true in this case. Moreover, one can see how this might generalize: the $(i,i+1)$ entry of the product is simply the $(i,i+1)$ entry of whichever factor is nonzero in that spot. Then, the $(i,i+2)$ entry is, up to addition of a polynomial in the entries already considered, the $(i,i+2)$ entry of whichever factor is nonzero in that spot. It is not hard to see that this pattern continues, and the pattern makes the result clear. 

\noindent\textbf{Problem 3.} Show that every element of $N_+$ has a unique factorization in the form 
\begin{equation*}
	(N_+\cap w^{-1}N_-w)(N_+ \cap w^{-1}N_+w).
\end{equation*} 

\noindent\textit{Solution.} By the same reasoning as in Problem 1, the left-hand term is $N_+(X)$, where $X$ is the set of inversions of $w^{-1}$, and the right-hand term is $N_+(\Phi_+\setminus X)$. Thus this follows from Problem 2. 

\noindent\textbf{Problem 4.} Show that every element of $B_+$ has a unique factorization in the form 
\begin{equation*}
	(B_+\cap w^{-1}B_-w)(N_+ \cap w^{-1}N_+w).
\end{equation*} 

\noindent\textit{Solution.} We have that $B_+\cap w^{-1}B_- w = D(N_+\cap w^{-1}N_-w)$, where $D \subset GL_n$ is the subgroup of diagonal matrices, and similarly, $B_+ = D N_+$. The factorization of $B_+$ in the form $DN_+$ is clearly unique, and thus so is the factorization in question. 

\noindent\textbf{Problem 5.} Show that, if any of the unique factorization claims in the theorem is true, then they all are true. 

\noindent\textit{Solution.} We have unique factorization of the form $B_+ = (B_+\cap w^{-1}B_-w)(N_+ \cap w^{-1}N_+w)$, and by transposing, we get unique factorization of the form $B_- = (N_- \cap wN_-w^{-1})(B_-\cap wB_+w^{-1})$. Now the equivalence of the unique factorization claims is a matter of moving the $w$ around and using these two unique factorizations above. 

\noindent\textbf{Problem 6.} Show that every matrix in $B_-wB_+$ has at least one factorization as in the theorem. 

\noindent\textit{Solution.} We have factorizations of the form $B_+ = (B_+\cap w^{-1}B_-w)(N_+ \cap w^{-1}N_+w)$ and $B_- = (N_- \cap wN_-w^{-1})(B_-\cap wB_+w^{-1})$. We also have that $(B_-w\cap wB_+)\subseteq (B_-\cap wB_+w^{-1})w(B_+\cap w^{-1}B_-w) = (B_-w\cap wB_+)(B_+\cap w^{-1}B_-w)$, since $(B_+\cap w^{-1}B_-w)$ contains the identity matrix. Therefore, by factoring $B_-$ and $B_+$ in $B_-wB_+$ as above, we have factorizations of the form $(N_-\cap wN_-w^{-1})(B_- w \cap w B_+)(w^{-1}N_+ w \cap N_+)$ as in the theorem. 

\section*{October 8: $B_- w B_- \cap N-+$ as a manifold}

\begin{Proposition}[Exercise 7.6]
    Every matrix in $B_- w B_+$ has at least one factorization in each of the forms:
    $$B_- w(w^{-1} N_+ w \cap N_+) = (N_- \cap w N_- w^{-1})(B_- w \cap w B_+) (w^{-1} N_+ w \cap N_+) = (N_- \cap w N_- w^{-1}) w B_+$$
\end{Proposition}

\begin{proof}
    By exercise 7.5, it suffices to show that every matrix in $B_- w B_+$ can be factored into the middle form $(N_- \cap w N_- w^{-1})(B_- w \cap w B_+) (w^{-1} N_+ w \cap N_+)$. From exercise 7.4 we know there are factorizations:
    $$B_- = (N_- \cap w N_- w^{-1})(B_- \cap w B_+ w^{-1})$$
    $$B_+ = (B_+ \cap w^{-1} B_- w)(N_+ \cap w^{-1} N_+ w)$$
    Therefore,
    \begin{align*}
        \overbrace{B_-}^{1} w \overbrace{B_+}^{2} &= \overbrace{(N_- \cap w N_- w^{-1})(B_- \cap w B_+ w^{-1})}^{1} w \overbrace{(B_+ \cap w^{-1} B_- w)(N_+ \cap w^{-1} N_+ w)}^{2} \\[-11pt]
        &~ \hphantom{= (N_- \cap w N_- w^{-1})}\underbrace{\hphantom{(B_- \cap w B_+ w^{-1}) w (B_+ \cap w^{-1} B_- w)}}_{3} \\[-3pt]
        &~ \hphantom{= (N_- \cap w N_- w^{-1})} \overbrace{w (w^{-1} B_- w \cap B_+)(B_+ \cap w^{-1} B_- w)}
    \end{align*}
    
    Now the middle part picked out by 3 is the product of the subgroup (the intersection of two subgroups is a subgroup) $B_+ \cap w^{-1} B_- w$ with itself, which gives us back the whole subgroup $B_+ \cap w^{-1} B_- w$, Passing in the multiplication by $w$, the middle term picked out by 3 becomes $B_- w \cap w B_+$. Thus,
    \begin{align*}
        B_- w B_+ &= (N_- \cap w N_- w^{-1}) \overbrace{(B_- w \cap w B_+)}^{3} (w^{-1} N_+ w \cap N_+)
    \end{align*}
    
    as desired.
\end{proof}

\begin{Proposition}[Exercise 7.7]
    Every matrix in $B_- w B_+$ has at most one factorization in the form:
    $$B_- w(w^{-1} N_+ w \cap N_+) = (N_- \cap w N_- w^{-1})(B_- w \cap w B_+) (w^{-1} N_+ w \cap N_+) = (N_- \cap w N_- w^{-1}) w B_+$$
\end{Proposition}

\begin{proof}
    We will use the factorization on the left hand side. First note that we already know that the permutation $w$ is determined by the rank function of the matrix. So if given two factorizations of the same matrix in this form, we must have:
    $$g_1 w h_1 = g_2 w h_2$$
    for some $g_1,g_2 \in B_-$, $h_1,h_2 \in (w^{-1} N_+ w \cap N_+)$ and some permutation matrix $w$. $B_-$ and $N_+$ are subgroups of the group of all matrices, so $g_i^{-1} \in B_-$ and $h_i^{-1} \in N_+$. Thus,
    $$g_2^{-1} g_1 = w h_2 h_1^{-1} w^{-1}$$
    The left side of the equation lies in the subgroup $B_-$. On the right side, $h_2 h_1^{-1}$ lies in $N_+ \cap w^{-1} N_+ w$. It follows that $w h_2 h_1^{-1} w^{-1} \in w N_+ w^{-1} \cap N_+ \subseteq N_+$. Therefore, $g_2^{-1} g_1, w h_2 h_1^{-1} w^{-1} \in N_+ \cap B_- = \{ e \}$, so $g_2^{-1} g_1 = w h_2 h_1^{-1} w^{-1} = e$ which implies $g_1 = g_2$ and $h_1 = h_2$.
    
    By exercise 7.5, this proves uniqueness for all the factorizations listed in the equality.
\end{proof}

%then did exercises 8.1, 8.2 about thinking about some space as a manifold

We now move on to proving that $N_+ \cap B_- w B_-$ is a manifold.

\begin{prob}
Let $w$ be the permutation matrix $51423$, i.e. the matrix 
$\begin{bmatrix}
e_5 & e_1 & e_4 & e_2 & e_3
\end{bmatrix}$. 
What is $N_- w \cap w N_+$? What open subset of it is $N_+B_- \cap N_- w \cap w N_+$?
\end{prob}
\begin{proof}
We will compute $N_-w\cap wN_+$ in two different ways. For the first method, we will just compute it directly:
\[
N_- w = 
    \begin{bmatrix}
    1 & 0 & 0 & 0 & 0 \\
    * & 1 & 0 & 0 & 0 \\
    * & * & 1 & 0 & 0 \\
    * & * & * & 1 & 0 \\
    * & * & * & * & 1 \\
    \end{bmatrix}
    \begin{bmatrix}
    & 1 & & & \\
    & & & 1 & \\
    & & & & 1 \\
    & & 1 & & \\
    1 & & & & \\
    \end{bmatrix}
= 
    \begin{bmatrix}
    0 & 1 & 0 & 0 & 0 \\
    0 & * & 0 & 1 & 0 \\
    0 & * & 0 & * & 1 \\
    0 & * & 1 & * & * \\
    1 & * & * & * & * \\
    \end{bmatrix}  \]
\[
w N_+ = 
    \begin{bmatrix}
    & 1 & & & \\
    & & & 1 & \\
    & & & & 1 \\
    & & 1 & & \\
    1 & & & & \\
    \end{bmatrix}
    \begin{bmatrix}
    1 & * & * & * & * \\
    0 & 1 & * & * & * \\
    0 & 0 & 1 & * & * \\
    0 & 0 & 0 & 1 & * \\
    0 & 0 & 0 & 0 & 1\\
    \end{bmatrix}
=
    \begin{bmatrix}
    0 & 1 & * & * & * \\
    0 & 0 & 0 & 1 & * \\
    0 & 0 & 0 & 0 & 1 \\
    0 & 0 & 1 & * & * \\
    1 & * & * & * & *\\
    \end{bmatrix} 
\]
%\end{align*} \]
and taking the intersection, we get
\[
N_- w \cap w N_+ = 
\begin{bmatrix}
    0 & 1 & 0 & 0 & 0 \\
    0 & 0 & 0 & 1 & 0 \\
    0 & 0 & 0 & 0 & 1 \\
    0 & 0 & 1 & * & * \\
    1 & * & * & * & *
\end{bmatrix}
\]
For the second method, we rewrite our desired intersection as $w(w^{-1}N_- w \cap N_+)$. 

Now we recall that previously, we had shown that the very similar looking set $wN_+w^{-1} \cap N_+$ could be written as $N_+(X)$, where $X$ was the complement of the inversion set of $w^{-1}$. We will apply a very similar argument to our intersection, to get a very similar result.
Since $(w^{-1}Mw)_{ij} = M_{w(i), w(j)}$, the ``free'' non-zero entries of elements of $w^{-1}N_- w$ are those indexed by $\{ ( w^{-1}(i), w^{-1}(j))\: | \: 1\leq j < i \leq n \} $, i.e. the set $\{(i,j) \: 1 \leq w(j) < w(i) \leq n\}$. Upon intersection with $N_+$, our ``free'' non-zero entries of $w^{-1}N_- w \cap N_+$ are 
\[
X=\{(i,j) \: | \: 1\leq w(j) <w(i) \leq n, \ 1\leq  i < j \leq n\},
\]
i.e. exactly the inversion set of $w$. In our case, this is $X=\{12, 13, 14, 15, 34, 35\}$.  Then we have that
\[
N_- w \cap wN_+ = w N_+(X) = 
\begin{bmatrix}
    & 1 & & & \\
    & & & 1 & \\
    & & & & 1 \\
    & & 1 & & \\
    1 & & & & 
\end{bmatrix}
\begin{bmatrix}
    1 & * & * & * & * \\
    0 & 1 & 0 & 0 & 0 \\
    0 & 0 & 1 & * & * \\
    0 & 0 & 0 & 1 & 0 \\
    0 & 0 & 0 & 0 & 1
\end{bmatrix}
=
\begin{bmatrix}
    0 & 1 & 0 & 0 & 0 \\
    0 & 0 & 0 & 1 & 0 \\
    0 & 0 & 0 & 0 & 1 \\
    0 & 0 & 1 & * & * \\
    1 & * & * & * & *
\end{bmatrix}
\]
So either way we get the same answer. Now, we should compute the open subset $N_+B_- \cap N_- w \cap wN_+$. Thinking of $N_+B_-$ as $N_+\pi B_-$ where $\pi$ is the identity permuation, since $N_+$ is acting on the right it does upwards row operations, and $B_-$ acting on the left does leftward column operations. So $N_+B_-$ is those matrices whose lower right ranks agree with the identity, i.e. the lower right submatrices are all full rank. Since it suffices to consider the square matrices, this means we are looking at the set
\[
\left\{M = \begin{bmatrix}
    0 & 1 & 0 & 0 & 0 \\
    0 & 0 & 0 & 1 & 0 \\
    0 & 0 & 0 & 0 & 1 \\
    0 & 0 & 1 & a & b \\
    1 & c & d & e & f
\end{bmatrix}
\: \bigg| \:
\substack{
\Delta^5_5(M)\neq 0,\ \Delta^{45}_{45}(M) \neq 0, \  \Delta^{345}_{345}(M) \neq 0, \\ \\ \Delta ^{2345}_{2345}(M) \neq 0,\ \Delta^{12345}_{12345}(M) \neq 0 }
\right\}.
\]
Simplifying these determinants, we get
\[
\left\{M = \begin{bmatrix}
    0 & 1 & 0 & 0 & 0 \\
    0 & 0 & 0 & 1 & 0 \\
    0 & 0 & 0 & 0 & 1 \\
    0 & 0 & 1 & a & b \\
    1 & c & d & e & f
\end{bmatrix}
\: \bigg| \:
d\neq 0,\ af\neq be, \  e\neq ad, \ c\neq 0 \right\}
\]
as our open subset. \end{proof}

Now that we have finished the warmup problem, we will head towards showing that $N_+\cap B_- w B_-$ is a manifold of dimension $\ell(w)$. To do this, we will progressively rewrite $N_+\cap B_- w B_-$, and our end goal is something which is more obviously an open subset of the correct dimensional space. To that end, here is our first rewriting:


\begin{prob}
Show that $N_+\cap B_- w B_- \cong (N_+ B_- \cap B_- w B_-) / B_-$. 
\end{prob}
Given a coset $mB_-$, where $m\in N_+B_- \cap B_- w B_-$, we want to show that this coset contains exactly one element of $N_+\cap B_- w B_-$. Existence is easy: since $m\in N_+B_-$, we can write $m=nb$ for $n\in N_+ $ and $b\in B_-$. Then $mb^{-1} = n \in N_+$, and is still in $B_- w B_-$. 
For uniqueness, suppose that there are $b_1,b_2\in B_-$ such that $mb_1, mb_2\in N_+$. Then we can write $mb_1 = n_1$ and $mb_2=n_2$ for $n_1,n_2\in N_+$, so that $n_2b_2^{-1}=m=n_1b_1^{-1}$. Now we rearrange so that $n_1^{-1}n_2=b_1^{-1}b_2$, and since $N_+$ and $B_-$ are subgroups, this product must be in $N_+\cap B_- = \{ I \}$.  

We now have a bijection between these sets, which in fact comes from the natural smooth map
\begin{tikzcd}
N_+ \cap B_- w B_-  \ar[hook,r] & N_+B_- \cap B_- w B_- \rar & (N_+ B_- \cap B_- w B_-) / B_-.
\end{tikzcd} Some methods were proposed for showing that this map is a homeomorphism. One option would be to show that this is an open map, since any open continuous bijection is a homeomorphism. Since this is a smooth map, another option is to explicitly write it out with coordinates in charts, and take derivatives.



\section*{October 13: Grassmannians}

\subsection*{Finishing up the previous class} Recall that we constructed a bijection from $N_+ \cap B_{-}wB_{-}$ to
$\left( N_+B_{-} \cap B_{-}wB_{-}\right)/B_{-}$. Furthermore, the fact that this map is smooth/algebraic follows
from the fact that multiplication of matrices is smooth/algebraic, and these properties continue to hold under
functorial constructions like products and quotients. To show that the map is an isomorphism in the smooth/algebraic
category, the only thing left to show is that the inverse is smooth. There are two ways to do this.
\begin{itemize}
\item The inverse map is obtained from the LU factorization of a matrix. One can check by hand that this is a
  smooth/algebraic map.
\item One can also compute the derivative of the multiplication map, which is the inverse of the factorization map. If
  the derivative is invertible, the inverse function theorem provides a local smooth inverse, which must be the global
  inverse as well.
\end{itemize}

\begin{prob}[Problem 8.2 from the worksheet]
  Show that
  \begin{equation*}
    \left( N_+B_{-} \cap B_{-}wB_{-} \right)/B_{-} \cong N_+B_{-} \cap \left( N_{-}w \cap wN_{+} \right)
  \end{equation*}
\end{prob}

The uniqueness statement of Bruhat decomposition let us factorize any element $b_{-}wb_{-}^{\prime}$ in the following
two ways.
\begin{align*}
  b_{-}wb_{-}^{\prime} &= n_{-}wb_{-} \\
                       &= wn_{+}b_{-}
\end{align*}
This means any element of $\left( B_{-}wB_{-} \right)/B_{-}$ can be uniquely written as
$n_{-}w$ and $wn_+$, i.e. as an element of $N_{-}w \cap wN_{+}$. Taking intersection with $N_+B_{-}$ on both
sides, we get the isomorphism claimed in the problem.

\begin{prob}[Problem 8.3 from the worksheet]
  Show that $N_+B_{-} \cap \left( N_{-}w \cap wN_+ \right)$ is an open subset of $N_{-}w \cap wN_{+}$, and
  $N_{-}w \cap wN_+ \cong \RR^{\ell(w)}$.
\end{prob}

Recall that $N_{+}B_{-}$ is an open subset of maximal dimension, which means its intersection with
$N_w \cap wN_+$  will be an open subset of the latter subspace. The dimension of $N_{-}w \cap wN_+$ is equal
to $\RR^{\ell(w)}$ following the discussion in a prior class.

We now switch to discussing Grassmannians:


\begin{Definition}
  The Grassmanian $G(k,n)$ is the set of $k$-dimensional subspaces of $\FF^n$ (where $\FF$ is a
  field\footnote{For this course, we'll work with $\FF = \RR$.}). Alternatively, it's the set of orbits of maximal rank $k \times n$ matrices under left
  multiplication by elements of $\mathrm{GL}(k)$.
\end{Definition}

\subsection*{Topologizing $G(k,n)$}

Observe that the second definition tells us any $k \times n$ matrix where some $k \times k$ minor is non-zero
corresponds to an element of $G(k,n)$. By multiplying on the left by an appropriate element of
$\mathrm{GL}(k)$, we can ensure that the non-vanishing minor is actually the identity matrix. This lets us
freely vary the other entries of the matrix, giving a locally bijective map from $G(k,n)$ to
$\RR^{k(n-k)}$. We can do this for all ${n \choose k}$ minors, and as a result, cover $G(k,n)$ with these
coordinate patches. This turns $G(k,n)$ into an $k(n-k)$-dimensional manifold/scheme (as long as we verify that the
transition maps are smooth/algebraic).

Another way to put additional geometric structure on $G(k,n)$ is to map it injectively into a closed subspace
of $\RR\PP^{{n \choose k} - 1}$. Given a matrix representative of an element in $G(k,n)$, we map it to the
vector of its $k \times k$ minors. The induced left action of $g \in \mathrm{GL}(k)$ on this space is
multiplication by $\mathrm{det}(g)$. Also, the image misses $0$, which means we get a well defined map, which
we'll call $P$, from $G(n,k)$ to $\RR\PP^{{n \choose k} - 1}$. We need to verify the following two facts.
\begin{itemize}
\item $P$ is injective.
\item The image of $P$ is closed.
\end{itemize}
Note that to verify that the map is injective, it will suffice to show that it's injective when restricted to
each coordinate chart corresponding to non-vanishing of some $k \times k$ minor. For if it were the case that
$P(x) = P(y)$ for some $x$ and $y$ not in the same coordinate chart, that would mean some $k \times k$ minor
vanished for $x$ but not $y$, or vice versa. But that would mean that their images under $P$ were not equal.
Without loss of generality, we can assume we're in the coordinate chart corresponding to the non-vanishing of
the left-most $k \times k$ minor. Let $[v] \in \RR\PP^{{n \choose k} - 1}$ be the image of a point in the
coordinate chart. We know that the first $k \times k$ block is the identity; to determine the value of the
$ij$\textsuperscript{th} entry $a_{ij}$, compute the minor of the first $k$ columns and the $j$\textsuperscript{th} column, except the $i$\textsuperscript{th} column. This minor will be $(-1)^i a_{ij}$, since all but one of the columns
have ones on the diagonals. Reading off the corresponding coordinate of $v$ tells us the value of $a_{ij}$, showing
that this map is invertible, and thus injective.

To show that the image of $P$ is closed, observe that the image can locally be described as the graph of a
continuous function: the input being the coordinates which directly give you the values of $a_{ij}$, the
output being all the other coordinates, and the continuous function being the one that maps a matrix to all of
its minors.

This shows that the map $P$ is injective, and its image is closed. This embedding is known as the Pl\"ucker
embedding, and the corresponding coordinates are known as Pl\"ucker coordinates.

\subsection*{Stratifying $G(k,n)$}
For every rank $k$ $k \times n$ matrix $M$, there exists a unique size $k$ subset $I_M$ of $[n]$, called the
pivot set, such that $M$ can be put into reduced row-echelon form where only the columns from $I_M$ have ones
on the diagonal, and zeroes elsewhere. Observe that in the reduced row echelon form, the only non-zero entries
other than the pivot columns are allowed to the right of the ones in their rows. What this means is that if
$I_{M}$ is not $\{1, 2, \ldots, k\}$, the number of non-zero entries will be less than $k(n-k)$. This process
breaks up $G(k,n)$ into a disjoint union of strata.
\begin{equation*}
  G(k,n) = \bigsqcup_{\substack{I \subset [n]\\ \text{\#}(I) = k}} \RR^{\#\left\{ (i, j) \mid i < j,\ i \in I,\ j \in [n] \setminus I \right\}}
\end{equation*}




\section*{October 15: The flag manifold, and starting to invert the unipotent product}

%%flag varieties

Today we defined the \newword{Flag manifold} abstractly as
$$\Fl_n = \{ \text{chains } F_1 \subseteq F_2 \subseteq \cdots \subseteq F_{n-1} \subseteq \mathbb{R}^n \mid F_i \text{ is an $i$-dimensional subspace}\} \subseteq \prod_{k=1}^{n-1} G(k,n)$$
which is a closed submanifold/subvariety of the product of Grassmannians written above.

One way to describe the flag variety is by iteratively picking a basis for $\RR^n$, where the first basis vector is a basis for $F_1$, and then the next comes from extending the basis to $F_2$, and so on. However, this is not a unique representation---we could rescale the first vector, and more generally we could replace the $k$th vector by any linear combination of the first $k$. If we put the vectors together into the columns of a $n\times n$ matrix, then our possibilities for the same flag are exactly described by acting on the right by $B_+$. 

More precisely, $g \in \GL_n/B_+$ (resp. $B_-$) corresponds to the Flag variety obtained by taking $F_k$ to be the span of the leftmost $k$ columns of $g$ (resp. rightmost $k$ columns). If we quotient on the left side instead, using $g \in B_+ \backslash \GL_n$ (resp. $B_-$), then $F_k$ is the span of the topmost $k$ rows of $g$ (resp. bottom $k$ rows).

We can cover $\GL_n/B_-$ with $n!$ charts, each isomorphic to $\RR^{\binom{n}{2}}$ as follows. 
Starting with $g \in \GL_n$, we will use leftward column operations to reduce $g$ to a unique representative with 1's in the position of a permutation matrix $w$ and 0's to the left of the prescribed 1's.


%%%%%%%%%%%%%
%
% w gets chosen after the process below
%
%%%%%%%%%%%%%

Explicitly, $g \in \GL_n$ is invertible, so its rightmost column in non-zero, so its rightmost column has at least one non-zero entry. Pick a non-zero entry and rescale it to 1; then use leftward column operations to reduce the other entries of $g$ in that row to 0. Column operations do not change the rank of a matrix, so we may repeat the process with the second from rightmost column, and so on until $g$ is in the desired form. Note that leftward column operations are given by right multiplication by an element of $B_-$, so we are reducing $g$ to another representative of the same coset in $\GL_n/B_-$.

\begin{eg}[Caution]
    In class we discussed possibly choosing $w$ before reducing $g$, by taking the 1's to be in positions where $g$ is non-zero. This is not always possible. Take
    \[
    w =
    \begin{bmatrix}
        & & 1 \\
        & 1 & \\
        1 & & 
    \end{bmatrix}
    \quad\textrm{ and }\quad
    g =
    \begin{bmatrix}
        0 & 1 & 1 \\
        1 & 1 & 1 \\
        1 & 0 & 1
    \end{bmatrix}
    \rightarrow 
    \begin{bmatrix}
        0 & 0 & 1 \\
        1 & 0 & 1 \\
        1 & -1 & 1
    \end{bmatrix}
    \]
    In the first step, our leftward row operations eliminate the 1 in position $(2,2)$, forcing us to take $(3,2)$ as the position with a 1 in the second column, instead of $(2,2)$ as prescribed by $w$. Therefore, we must instead produce $w$ as a result of the operations on $g$.
\end{eg}

Thus, we may choose a unique representative $g \in GL_n/B_-$ up to choice of $w$. For a fixed $w$, these representatives correspond to matrices with $\binom{n}{2}$ undetermined entries (those to the right of the prescribed 1's). To map this into $\RR^{k(n-k)}$, take the rightmost column for $k=1$. After that, use a leftward row operation to reduce the rightmost column, and then send the remaining non-zero entries of the rightmost two columns $\RR^{2(n-2)}$, and continue in this manner to obtain the map $\RR^{\binom{n}{2}} \hookrightarrow \prod_{k=1}^{n-1} \RR^{k(n-k)}$.
This gives a closed embedding of $\Fl_n$ into $\prod_{k=1}^{n-1} \RR^{k(n-k)}\subset \prod_{k=1}^{n-1} G(k,n)$ indexed by $\sigma([n-k+1, n-k+2, \ldots, n])$ in position $k$ (recall that the Pl\"ucker coordinates for $G(k,n)$ are indexed by subsets of $[n]$ of size $k$).
%%%%%%%%%%%%%%%
% i still don't actually understand this indexing actually. 
%%%%%%%%%%%%%%%%%


\begin{eg}
Consider the chart in $\GL_4/B_-$ consisting of matrices of the form
\[ \begin{bmatrix} 1&u&v&w \\ 0&1&x&y \\ 0&0&1&z \\ 0&0&0&1 \end{bmatrix}. \]
The first component, $F_1$, of the flag is spanned by $\begin{sbm} w\\y\\z\\1 \end{sbm}$, so it gives the point $(w,y,z)$ in the chart of $G(1,4)$ corresponding to lines of the form $\begin{sbm} \ast \\ \ast \\ \ast \\ 1\end{sbm}$. 
The second component, $F_2$, of the flag is the image of $\begin{sbm} v&w \\ x&y \\ 1&z \\ 0&1 \end{sbm}$, so the minor of the last two rows is nonzero. So it is in the chart of $G(2,4)$ corresponding to planes of the form $\begin{sbm} \ast&\ast \\ \ast&\ast \\ 1&0 \\ 0&1 \end{sbm}$. Explicitly, we can rewrite this plane as $\begin{sbm} v&w-vz \\ x&y-xz \\ 1&0 \\ 0&1 \end{sbm}$.
Similarly, the image of  $\begin{sbm} u&v&w \\ 1&x&y \\ 0&1&z \\ 0&0&1 \end{sbm}$ is the same as that of $\begin{sbm} u & v - u x & w - u y - v z + u x z \\ 1&0&0 \\ 0&1&0 \\ 0&0&1 \end{sbm}$. In short, we have computed that the point $(u,v,w,x,y,z)$ in this chart $\RR^{\binom{4}{2}} \subset \Fl_4$ maps to the point $(w,y,z) \times (v,w-vz,x,y-xz) \times (u, v-ux, w-uy-vz+uxz)$ in $\RR^{1(4-1)} \times \RR^{2(4-2)} \times \RR^{(3(4-3)} \subset G(1,4) \times G(2,4) \times G(3,4)$.
\end{eg}

In addition to covering $\Fl_n$ with $n!$ open charts, we can also stratify $\Fl_n$ into $n!$ affine spaces, using our Bruhat decompositions. 
We have
\[ GL_n = \bigsqcup_{w \in S_n} B_- w B_- = \bigsqcup_{w \in S_n} (w N_+ \cap N_- w) B_- \]
and, therefore,
\[ \Fl_n = \bigsqcup_{w \in S_n} B_- w B_-/B_- \cong \bigsqcup_{w \in S_n} (w N_+ \cap N_- w) . \]
The affine sets here are called \newword{Schubert cells}.

As a side note, let's count the number of points in $\Fl_n(\FF_q)$.
Using the quotient description, we have
\[ \# \Fl_n (\FF_q) = \frac{\# GL_n(\FF_q)}{\# B_-(\FF_q)} = \frac{\prod_{k=1}^{n-1} (q^n - q^k)}{(q-1)^n q^{\binom{n}{2}}} = \prod_{k=0}^{n-1} (1 + q + \cdots + q^j) . \]
Summing up over Schubert cells, we have
\[ \# \Fl_n (\FF_q) = \sum_{w \in S_n} \# (w N_+ \cap N_- w)(\FF_q) = \sum_{w \in S_n} q^{\ell(w)} .\]
This gives us the fun identity
\[  \sum_{w \in S_n} q^{\ell(w)} =  \prod_{k=0}^{n-1} (1 + q + \cdots + q^j) . \]


\subsection{Returning to the goal of inverting a unipotent product:}

 Recall that $x_i(t)$ corresponds to the matrix with 1's on the diagonal, $t$ in entry $(i,i+1)$ and 0's everywhere else:
\[
x_i(t) =
\begin{bmatrix}
    1 & & & & & \\
    & \ddots & & & & \\
    & & 1 & t & & \\
    & & & 1 & & \\
    & & & & \ddots & \\
    & & & & & 1
\end{bmatrix}
\]
%%maybe label rows + columns of matrix

Also recall that if the corresponding word in $S_n$, $s_{i_1} \cdots s_{i_N}$ is reduced, then the product $x_{i_1}(t_1) \cdots x_{i_N}(t_N)$ gives a map between manifolds of the same dimension, $\RR^N \to B_- w B_- \cap N_+ \cong N_- w \cap w N_+$.
The isomorphism between $B_- w B_- \cap N_+$ and $N_- w \cap w N_+$ consists of replacing a matrix $g$ by another matrix $g b_-$ which represents the same flag. This suggests we should use concepts based on flags to analyze this product.

%%running example
\begin{eg}
Recall our running example: the subproducts of $x_1(u)x_2(v)x_1(w)$ are
\[
\begin{bmatrix}
1 & & \\
 & 1 & \\
 & & 1 
\end{bmatrix},
\qquad
\begin{bmatrix}
1 & u & \\
 & 1 & \\
 & & 1 
\end{bmatrix}, \qquad
\begin{bmatrix}
1 & u & uv\\
 & 1 & v\\
 & & 1 
\end{bmatrix}, \qquad
\begin{bmatrix}
1 & u+w & uv\\
 & 1 & v \\
 & & 1 
\end{bmatrix}.
\]
By taking rightmost columns, these correspond to flags
\begin{align*}
\emptyset&:    &   \RR\begin{bmatrix} 0 \\ 0 \\ 1\end{bmatrix} &\subset  \RR\begin{bmatrix} 0 \\ 0 \\ 1\end{bmatrix} + \RR\begin{bmatrix} 0 \\ 1 \\ 0\end{bmatrix} \\
x_1(u)&:    &   \RR\begin{bmatrix} 0 \\ 0 \\ 1\end{bmatrix} &\subset  \RR\begin{bmatrix} 0 \\ 0 \\ 1\end{bmatrix} + \RR\begin{bmatrix} u \\ 1 \\ 0\end{bmatrix} \\
x_1(u)x_2(v)&:    &   \RR\begin{bmatrix} uv \\ v \\ 1\end{bmatrix} &\subset  \RR\begin{bmatrix} uv \\ v \\ 1\end{bmatrix} + \RR\begin{bmatrix} u \\ 1 \\ 0\end{bmatrix} \\
x_1(u)x_2(v)x_1(w)&:    &   \RR\begin{bmatrix} uv \\ v \\ 1\end{bmatrix} &\subset  \RR\begin{bmatrix} uv \\ v \\ 1\end{bmatrix} + \RR\begin{bmatrix} u+w \\ 1 \\ 0\end{bmatrix}
\end{align*}
\end{eg}

This example suggests the following proposition.

\begin{Proposition}
    Let $F_j$ be the Flag constructed from the $j$th partial product using the rightmost columns. More precisely, let $g_j = x_{i_1}(t_1)\cdots x_{i_j}(t_j)$, and let $F_j$ be the corresponding flag of right columns. Then $F^k_{j-1} = F^k_j$ for $k \neq n - i_j$.
\end{Proposition}

\begin{proof}
Right multiplication by $x_{j_j}(t_j)$ only affects column $i_j+1$. So clearly for columns to the right, the submatrices of the rightmost $k$ columns are the same between $g_{j-1}$ and $g_j$. So of course $F_{j-1}^k = F_{j}^k$ for $k>n-i_j$. 
The $(i_j+1)$st column of $g_j$ is $t_j$ times the $i_j$th column of $g_{j-1}$ plug the $(i_j+1)$st column of $g_{j-1}$. Thus the $i_j$th and $(i_j+1)$st columns of $g_j$ and $g_{j-1}$ have the same span, so $F_{j-1}^{n-i_j-1} = F_{j-1}^{n-i_j-1}$. And adding further (leftwards) linearly independent columns again will preserve equality of the spans of the two matrices, so this completes the proof.
\end{proof}

We can depict this graphically by labeling each chamber of the wiring diagram with a subspace, as in Figure~\ref{fig:space}. 
If we truncate the wiring diagram after the first $j$ crossings, the chambers which are open on the right of that truncated diagram are the subspaces in the flag $F_j$.

\begin{figure}[!h]

\centerline{\begin{tikzpicture}[scale=1.25]
\node (1L) at (-1.5,1) {$1$};
\node (2L) at (-1.5,2) {$2$};
\node (3L) at (-1.5,3) {$3$};
\node (1R) at (4.5,1) {$1$};
\node (2R) at (4.5,2) {$2$};
\node (3R) at (4.5,3) {$3$};
\node (line1) at (0.5, 2.5) {$\begin{sbm} 0\\0\\1 \end{sbm}$} ;
\node (plane1) at (-0.5, 1.5) {$\begin{sbm} 0&0\\1& 0\\0 & 1 \end{sbm} $} ;
\node (plane2) at (1.5, 1.5) {$\begin{sbm} u&0\\1&0\\0&1  \end{sbm} $} ;
\node (line2) at (2.5, 2.5) {$\begin{sbm} uv\\v\\1 \end{sbm}$} ;
\node (plane3) at (3.5, 1.5) {$\begin{sbm} u+w&uv\\1&v\\0&1 \end{sbm}$};
\draw (-1.4,1) to (0,1) to (1,2) to (2,3) to (3,3) to (4.4,3) ;
\draw (-1.4,2) to (0,2) to (1,1) to (2,1) to (3,2) to (4.4,2) ;
\draw (-1.4,3) to (0,3) to (1,3) to (2,2) to (3,1) to (4.4,1) ;
\end{tikzpicture}}
%\qquad \begin{tikzpicture}[scale=1.25]
%\node (1L) at (-1.5,1) {$1$};
%\node (2L) at (-1.5,2) {$2$};
%\node (3L) at (-1.5,3) {$3$};
%\node (1R) at (4.5,1) {$1$};
%\node (2R) at (4.5,2) {$2$};
%\node (3R) at (4.5,3) {$3$};
%\node (line1) at (0.5, 2.5) {$3$} ;
%\node (plane1) at (-0.5, 1.5) {$23$} ;
%\node (plane2) at (1.5, 1.5) {$13$} ;
%\node (line2) at (2.5, 2.5) {$1$} ;
%\node (plane3) at (3.5, 1.5) {$12$} ;
%\draw (-1.4,1) to (0,1) to (1,2) to (2,3) to (3,3) to (4.4,3) ;
%\draw (-1.4,2) to (0,2) to (1,1) to (2,1) to (3,2) to (4.4,2) ;
%\draw (-1.4,3) to (0,3) to (1,3) to (2,2) to (3,1) to (4.4,1) ;
%\end{tikzpicture}}
    \caption{Spaces labelled in the wiring diagram.}
    \label{fig:space}
\end{figure}

The \newword{height} of a chamber is the number of wires which go underneath it. The labels come from the wires which pass above the chamber.
We will compute a number to put in each chamber, which only depends on the subspace. Namely, this will be a ratio of Plu\"cker coordinates (since we need to be unaffected by scaling).




\begin{Proposition}
Let $V$ be a label of a chamber at height $k$. Then $\Delta^{(k+1)(k+2)\cdots n}(V)\neq 0$.
\end{Proposition}
\begin{proof}
$V$ is the span of the last $n-k$ columns of $g$, and the matrix $g$ is upper triangular, since it is a partial product of things in $N_+$. Thus the bottom right $(n-k)\times (n-k)$ minor of $g$ is non-zero.
\end{proof}

Label each chamber by the sources of the strands passing above it, as in Figure~\ref{chamber-labels}
\begin{figure}
\centerline{ \begin{tikzpicture}[scale=1.25]
\node (1L) at (-1.5,1) {$1$};
\node (2L) at (-1.5,2) {$2$};
\node (3L) at (-1.5,3) {$3$};
\node (1R) at (4.5,1) {$1$};
\node (2R) at (4.5,2) {$2$};
\node (3R) at (4.5,3) {$3$};
\node (line1) at (0.5, 2.5) {$3$} ;
\node (plane1) at (-0.5, 1.5) {$23$} ;
\node (plane2) at (1.5, 1.5) {$13$} ;
\node (line2) at (2.5, 2.5) {$1$} ;
\node (plane3) at (3.5, 1.5) {$12$} ;
\draw (-1.4,1) to (0,1) to (1,2) to (2,3) to (3,3) to (4.4,3) ;
\draw (-1.4,2) to (0,2) to (1,1) to (2,1) to (3,2) to (4.4,2) ;
\draw (-1.4,3) to (0,3) to (1,3) to (2,2) to (3,1) to (4.4,1) ;
\end{tikzpicture}}
\caption{Labeling chambers of the diagram} \label{chamber-labels}
\end{figure}

We claim that these are the topmost nonvanishing minors of the corresponding spaces. 
In Figure~\ref{top-minors}, we show the values of those minors:
\begin{figure}
\centerline{ \begin{tikzpicture}[scale=1.25]
\node (1L) at (-1.5,1) {$1$};
\node (2L) at (-1.5,2) {$2$};
\node (3L) at (-1.5,3) {$3$};
\node (1R) at (4.5,1) {$1$};
\node (2R) at (4.5,2) {$2$};
\node (3R) at (4.5,3) {$3$};
\node (line1) at (0.5, 2.5) {$1$} ;
\node (plane1) at (-0.5, 1.5) {$1$} ;
\node (plane2) at (1.5, 1.5) {$u$} ;
\node (line2) at (2.5, 2.5) {$uv$} ;
\node (plane3) at (3.5, 1.5) {$vw$} ;
\draw (-1.4,1) to (0,1) to (1,2) to (2,3) to (3,3) to (4.4,3) ;
\draw (-1.4,2) to (0,2) to (1,1) to (2,1) to (3,2) to (4.4,2) ;
\draw (-1.4,3) to (0,3) to (1,3) to (2,2) to (3,1) to (4.4,1) ;
\end{tikzpicture}}
\caption{Labeling chambers of the diagram with minors} \label{top-minors}
\end{figure}



We now set out on the goal of proving that these are, indeed, the topmost nonvanishing minors.
We first see how the chamber labels change. 
In general, they change by the action of the symmetric group. 
Figure~\ref{nonexample} shows an example with a non-reduced word.
However, as long as the word $s_{i_1} s_{i_2} \cdots s_{i_N}$ is reduced, the symmetric group action and the $0$-Hecke action coincide.
\begin{figure}[!h]
    \centering
    \begin{tikzpicture}[scale=2]
        \draw (0,0)--(1,0)--(2,1)--(3,0)--(4,0);
        \draw (0,1)--(1,1)--(2,0)--(3,1)--(4,1);
        
        \node at (-.15,0){$1$};
        \node at (-.15,1){$2$};
        \node at (4.15,0){$1$};
        \node at (4.15,1){$2$};
        
        \node at (.75,.5){$2$};
        \node at (2,.5){$1$};
        \node at (3.2,.5){$2$};
        
        \node at (1.5,-.25){$s_1$};
        \node at (2.5,-.25){$s_1$};
    \end{tikzpicture}
    \caption{When the word is non-reduced, the $x_i$ act like they're in the symmetric group, not the 0-Hecke monoid.}
    \label{nonexample}
\end{figure}





%
%Now consider taking the matrices on the left side of Figure~\ref{fig:space-strand} and taking the minors corresponding to rows from the label on the right side of the figure. Doing this, we get the diagram in Figure~\ref{fig:minor-label}.
%\begin{figure}[!h]
%    \centering
%    \includegraphics[width=0.7\textwidth]{wd-chamber-letters}
%    \caption{Chambers labelled by minors.}
%    \label{fig:minor-label}
%\end{figure}
%
%\begin{Remark}
%In a reduced word, the $e_i$'s multiply like $s_i$'s. A non-example is illustrated in Figure \ref{nonexample} below, where the geometric description of ``strands above'' is an $S_n$ word, not a Hecke word. 
%
%
%\end{Remark}


\begin{Proposition}
Suppose $s_{i_1}, \ldots, s_{i_N}$ is a reduced word, $V$ is a subspace in some chamber, and $I$ is the label of that chamber. Then $I$ is the topwards pivots of $V$, i.e. $\Delta^I(V)$ is the topmost non-zero minor.
\end{Proposition}
\begin{proof}

First, we note that when we right multiply by $x_{i_j}(t_j)$, this acts on the labels of the chambers via the Hecke action from right to left by swapping strand labels $(x_{i_{j+1}} \cdots x_N)^{-1}(j)$ and $(x_{i_{j+1}} \cdots x_N)^{-1}(j+1)$ when $(x_{i_{j+1}} \cdots x_N)^{-1}(j)$ is an above strand and $(x_{i_{j+1}} \cdots x_N)^{-1}(j+1)$ is not. 
%%%(???? no it doesn't ??? maybe on the re-numbered wire/?????)

We want to show that $\Delta^{([k+1,n]\cdot e_{i_1}\cdots e_{i_j})}$ is (the topmost) non-zero on the $(n-k)$-dimensional subspace of the $j$-th flag (with basis given by columns of the partial product).
Recall the following facts from a previous worksheet:
\begin{itemize}
\item The top right pivot set of $M$, where $M$ is the top $k$ rows of $x_{i_1}(t_1)\cdots x_{i_N}(t_N)$, is $[k]\cdot e_{i_1}\cdots e_{i_N}$; and
\item The upper right submatrices of $x_{i_1}(t_1)\cdots x_{i_N}(t_N)$ have the same subranks as those of $M$.
\end{itemize}
We now know the ranks of every upper right submatrix of the product. This is enough to either get the rightward pivots of the top row, or the top pivots of the right column.
\end{proof}

In Figure~\ref{fig:crossing-label}, we see the crossings labelled by the ratio of surrounding minors. In particular, the crossing label is $\frac{(\textrm{left}(\textrm{right})}{(\textrm{top})(\textrm{bottom})}$. This is how we'll recover the original partial products just from the information in the wiring diagram.

\begin{figure}
    \centering
    \includegraphics[width=0.7\textwidth]{wd-vertex-labels}
    \caption{Chambers labelled by minors; crossings labelled by ratio of surrounding minors.}
    \label{fig:crossing-label}
\end{figure}




\section*{October 20: Continuing to invert the unipotent product}

\subsection*{Remarks for the proof}

We give several remarks concerning the proof of the final Proposition from the last time.

\begin{itemize}
    \item Adding the factors $x_{i}(t)$ on the left of the product induces the action on the subspaces of flags. This action translates to the action of symmetric group $S_{n}$ on the labels for chambers. Because our product is in the reduced form (the corresponding $S_{n}$-word is reduced), we can equally think of this action as a 0-Hecke action.
    
    \item The latter action of 0-Hecke has the following (\textit{different from the previous}) form:
    $$
    e_{i} \circ S=
    \begin{cases}
    S \backslash \{i+1\} \cup \{i\} \text{ if }i+1\in S \text{ and }i\not\in S,\\
    S\text{ otherwise }.
    \end{cases}
    $$
    
    \item In the worksheet 5 the following Lemma was proved.
    \begin{Lemma}
    If $M$ is a tnn $n \times k$ matrix whose top non-zero minor is in position $S$, and $t>0$, then $x_{i}(t) \cdot M$ is tnn and has top nonzero minor in position $e_{i} \circ S$.
    \end{Lemma}
    The use of this fact simplifies the final part of the proof.
\end{itemize}

\subsection*{Formulas for arguments of elementary matrices via subproducts}

We can get back to the ideas pictorially represented on Figure~\ref{fig:crossing-label}.

Continue to assume that the word $s_{i_{1}}s_{i_{2}}\dots s_{i_{N}}$ is reduced. Let us focus on a crossing $j$. Abbreviate $i_j$ to $i$ and $t_j$ to $t$. Let the last $n-i_j+1$ columns of $g_{j-1}$ be $\begin{bmatrix}
| & | & \\
\vec{x} & \vec{y} & V\\
| & | &  
\end{bmatrix}$, so the last $n-n_j+1$ columns of $g_j$ are $\begin{bmatrix}
| & | & \\
\vec{x} & (t\vec{x}+\vec{y}) & V\\
| & | &  
\end{bmatrix}$. Let $a$ be the source of the strand going up through the $j$-th crossing and let $b$ be the source of the strand going down.


\begin{Lemma}
In previous notation, $a < b$.
\end{Lemma}
\begin{proof}
This follows from the reducedness of the word $s_{i_{1}}s_{i_{2}}\dots s_{i_{N}}$.
\end{proof}

\begin{Lemma}
$\Delta^{Ia}([y\;V]) = 0$.
\end{Lemma}
\begin{proof}
We know that $\Delta^{Ib}$ is the topmost non-zero minor of $[y \;V]$. But the previous lemma asserts $a<b$, so the statement follows.
\end{proof}

\begin{Lemma}
$\Delta^{Ia}([t\vec{x}+\vec{y}\;V]) = t\cdot \Delta^{Ia}([\vec{x}\;V])$.
\end{Lemma}
\begin{proof}
Easily follows from linearity of minors and the previous lemma.
\end{proof}

Last step before the main proposition is the following Lemma proved in Homework 3.

\begin{Lemma}
$\Delta^{Iab}([\vec{x}\;\vec{y}\;V]) \cdot \Delta^{I}([V]) = \Delta^{Ib}([\vec{y}\;V])\cdot \Delta^{Ia}([\vec{x}\;V]) - \Delta^{Ia}([\vec{y}\;V]) \cdot \Delta^{Ib}([\vec{x}\;V]).$
\end{Lemma}

Finally, putting all previous lemmata together, we have the desired statement:

\begin{Proposition}
In previous notation, we have the equality:
$$t = \frac{\Delta^{Ib}([\vec{y}\;V]) \cdot \Delta^{Ia}([t\vec{x}+\vec{y}\;V]}{\Delta^{Iab}([\vec{x}\;\vec{y}\;V]) \cdot \Delta^{I}([V])}.$$
\end{Proposition}

\textbf{Example.} Recall our running example from last time:
$$x_1(u)x_2(v)x_1(w) = \begin{bmatrix}
1 & u+w & uv\\
 & 1 & v \\
 & & 1 
\end{bmatrix},$$
and the wiring diagrams with subspace and with topmost non-zero minors\footnote{Remember that in this form bottom-most non-zero minors equal $1$; the entries in chambers are actually quotients of the topmost over bottom-most non-zero minors.} are
\begin{figure}[h]

\centerline{\begin{tikzpicture}[scale=1.25]
\node (1L) at (-1.5,1) {$1$};
\node (2L) at (-1.5,2) {$2$};
\node (3L) at (-1.5,3) {$3$};
\node (1R) at (4.5,1) {$1$};
\node (2R) at (4.5,2) {$2$};
\node (3R) at (4.5,3) {$3$};
\node (line1) at (0.5, 2.5) {$\begin{sbm} 0\\0\\1 \end{sbm}$} ;
\node (plane1) at (-0.5, 1.5) {$\begin{sbm} 0&0\\1& 0\\0 & 1 \end{sbm} $} ;
\node (plane2) at (1.5, 1.5) {$\begin{sbm} u&0\\1&0\\0&1  \end{sbm} $} ;
\node (line2) at (2.5, 2.5) {$\begin{sbm} uv\\v\\1 \end{sbm}$} ;
\node (plane3) at (3.5, 1.5) {$\begin{sbm} u+w&uv\\1&v\\0&1 \end{sbm}$};
\draw (-1.4,1) to (0,1) to (1,2) to (2,3) to (3,3) to (4.4,3) ;
\draw (-1.4,2) to (0,2) to (1,1) to (2,1) to (3,2) to (4.4,2) ;
\draw (-1.4,3) to (0,3) to (1,3) to (2,2) to (3,1) to (4.4,1) ;
\end{tikzpicture}

 \begin{tikzpicture}[scale=1.25]
\node (1L) at (-1.5,1) {$1$};
\node (2L) at (-1.5,2) {$2$};
\node (3L) at (-1.5,3) {$3$};
\node (1R) at (4.5,1) {$1$};
\node (2R) at (4.5,2) {$2$};
\node (3R) at (4.5,3) {$3$};
\node (line1) at (0.5, 2.5) {$1$} ;
\node (plane1) at (-0.5, 1.5) {$1$} ;
\node (plane2) at (1.5, 1.5) {$u$} ;
\node (line2) at (2.5, 2.5) {$uv$} ;
\node (plane3) at (3.5, 1.5) {$vw$} ;
\draw (-1.4,1) to (0,1) to (1,2) to (2,3) to (3,3) to (4.4,3) ;
\draw (-1.4,2) to (0,2) to (1,1) to (2,1) to (3,2) to (4.4,2) ;
\draw (-1.4,3) to (0,3) to (1,3) to (2,2) to (3,1) to (4.4,1) ;
\end{tikzpicture}}
%\caption{Labeling chambers of the diagram with minors}
\label{top-minorsExample}
\end{figure}

Then if $(a, b) = (1, 2)$, then $V = \begin{sbm} 0\\0\\1 \end{sbm}$ ($I = \{3\}$), $\vec{y} = \begin{sbm} 0\\1\\0 \end{sbm}$, $\vec{x} = \begin{sbm} 1\\0\\0 \end{sbm}$ and $t = u$. 
Indeed in this case, we have the equality
$$u = \frac{\Delta^{Ib}([\vec{y}\;V]) \cdot \Delta^{Ia}([t\vec{x}+\vec{y}\;V]}{\Delta^{Iab}([\vec{x}\;\vec{y}\;V]) \cdot \Delta^{I}([V])} = 
\frac{\Delta^{2,3}(\begin{sbm} 0&0\\1& 0\\0 & 1 \end{sbm}) \cdot \Delta^{1,3}(\begin{sbm} u&0\\1&0\\0&1  \end{sbm}}{\Delta^{1,2,3}(\begin{sbm} 1&0&0\\0&1&0\\0&0&1 \end{sbm}]) \cdot \Delta^{3}(\begin{sbm} 0\\0\\1 \end{sbm})} = \frac{1\cdot u}{1 \cdot 1}.$$

\subsection*{$B_{+}$-matrices in $(N_{-}w\cap w N_{+})B_{-}$-form}

It will be useful for further considerations to have the explicit example of subproducts in the $(N_{-}w\cap w N_{+})B_{-}$-form.

We continue to consider the example of $x_1(u)x_2(v)x_1(w)$. The subproducts are 
\[
\begin{bmatrix}
1 & & \\
 & 1 & \\
 & & 1 
\end{bmatrix},
\qquad
\begin{bmatrix}
1 & u & \\
 & 1 & \\
 & & 1 
\end{bmatrix}, \qquad
\begin{bmatrix}
1 & u & uv\\
 & 1 & v\\
 & & 1 
\end{bmatrix}, \qquad
\begin{bmatrix}
1 & u+w & uv\\
 & 1 & v \\
 & & 1 
\end{bmatrix}.
\]
The corresponding $(N_{-}w\cap w N_{+})B_{-}$-forms are
\[
\begin{bmatrix}
1 & & \\
 & 1 & \\
 & & 1 
\end{bmatrix},
\qquad
\begin{bmatrix}
 & 1 & \\
1 & \frac{1}{u} & \\
 & & 1 
\end{bmatrix}, \qquad
\begin{bmatrix}
 &  & 1\\
1 &  & \frac{1}{u}\\
 & 1 & \frac{1}{uv} 
\end{bmatrix}, \qquad
\begin{bmatrix}
 &  & 1\\
 & 1 & \frac{1}{u} \\
1 & \frac{u+w}{vw} & \frac{1}{uv} 
\end{bmatrix}.
\]

Note that the ratios of Pl\"ucker coordinates are the same for matrices in different forms, e.g.,
$$\frac{\Delta^{13}}{\Delta^{23}}\left( \begin{bmatrix}
1 & u & \\
 & 1 & \\
 & & 1 
\end{bmatrix} \right) = u = \frac{\Delta^{13}}{\Delta^{23}}\left( \begin{bmatrix}
 & 1 & \\
1 & \frac{1}{u} & \\
 & & 1 
\end{bmatrix} \right),$$
$$\frac{\Delta^{12}}{\Delta^{13}}\left( \begin{bmatrix}
1 & u+w & uv\\
 & 1 & v \\
 & & 1 
\end{bmatrix} \right) = (u+w)v-uv = vw = \frac{-1}{\frac{1}{uv}-\frac{u+w}{uvw}} = \frac{\Delta^{12}}{\Delta^{13}}\left( \begin{bmatrix}
 &  & 1\\
 & 1 & \frac{1}{u} \\
1 & \frac{u+w}{vw} & \frac{1}{uv} 
\end{bmatrix}\right).$$


\section*{October 22 -- Continuing to invert the unipotent product}

Suppose $s_{i_1} \cdots s_{i_N}$ is a reduced word in $S_n$ and $t_1,\ldots,t_N \in \RR_{>0}$. Let $g_r$ be the partial product
$$g_r = x_{i_1}(t_1) \cdots x_{i_r}(t_r)$$
Note that $g_r \in N_+ \cap B_- w_r B_+$ where $w_r = s_{i_1} \cdots s_{i_r}$. We showed on worksheets 7 and 8 that we can find a unique $f_r \in N_- w_r \cap w_r N_+$ with $g_r B_- = f_r B_-$.

\begin{eg}
    The current running example involves the partial products of $x_1(t_1) x_2(t_2) x_1(t_1)$, $n = 3$.
    
    \begin{figure}[!h]
        \centering
        \begin{minipage}{.5\textwidth}
            \centering
            \begin{tikzpicture}[scale=1.5]
                \node at (-.15,0){$1$};
                \node at (-.15,1){$2$};
                \node at (-.15,2){$3$};
                \node at (4.15,0){$1$};
                \node at (4.15,1){$2$};
                \node at (4.15,2){$3$};
                
                \draw (0,0)--(1,0)--(3,2)--(4,2);
                \draw (0,1)--(1,1)--(2,0)--(4,0);
                \draw (0,2)--(2,2)--(3,1)--(4,1);
                
                \node at (1.5,1){$t_1$};
                \node at (2.5,2){$t_2$};
            \end{tikzpicture}
            
            \[
            g_2 = 
            \begin{bmatrix}
                1 & t_1 & t_1 t_2 \\
                & 1 & t_2 \\
                & & 1
            \end{bmatrix}, ~~
            f_2 =
            \begin{bmatrix}
                & & 1 \\
                1 & & t^{-1} \\
                & 1 & t_1^{-1} t_2^{-1}
            \end{bmatrix}
            \]
            
            \caption{$r = 2$}
        \end{minipage}%
        \begin{minipage}{.5\textwidth}
            \centering
            \begin{tikzpicture}[scale=1.5]
                \node at (-.15,0){$1$};
                \node at (-.15,1){$2$};
                \node at (-.15,2){$3$};
                \node at (5.15,0){$1$};
                \node at (5.15,1){$2$};
                \node at (5.15,2){$3$};
                
                \draw (0,0)--(1,0)--(3,2)--(5,2);
                \draw (0,1)--(1,1)--(2,0)--(3,0)--(4,1)--(5,1);
                \draw (0,2)--(2,2)--(4,0)--(5,0);
                
                \node at (1.5,1){$t_1$};
                \node at (2.5,2){$t_2$};
                \node at (3.5,1){$t_3$};
            \end{tikzpicture}
            
            \[
            g_3 = 
            \begin{bmatrix}
                1 & t_1 + t_3 & t_1 t_2 \\
                & 1 & t_2 \\
                & & 1
            \end{bmatrix}, ~~
            f_3 =
            \begin{bmatrix}
                & & 1 \\
                & 1 & t^{-1} \\
                1 & \frac{t_1 + t_3}{t_1 t_2} & t_1^{-1} t_2^{-1}
            \end{bmatrix}
            \]
            
            \caption{$r = 3$}
        \end{minipage}
    \end{figure}
\end{eg}

\begin{Remark}
    Since $g B_- = f B_-$, $g$ and $f$ give the same flag via the rightmost column construction. This follows from the fact the right actions by $B_-$ correspond to leftward row operations, which do not change the span of the rightmost columns.
\end{Remark}

\begin{Lemma}
The $k$-th column of $f$ is the unique vector in the span of columns $k$, $k+1$, \dots, $n$ of $g$ which has a $1$ in position $(w(k), k)$ and $0$'s in positions $(w(m), m)$ for $k<m \leq n$. 
\end{Lemma}

This Lemma was said a bit sketchily in the class discussion; here is a detailed proof.

\begin{proof}
By the description in terms of flags, the span of the rightmost $n-k+1$ columns of $f$ is the same as that of $g$. So the $k$-th column of $f$ is in the span of the required vectors, and it clearly has $1$'s and $0$'s in the correct spots. What remains is to show that no other vector in the span of these columns of $f$ has the same entries in rows $\{ w(k), w(k+1), \ldots, w(n) \}$. To show this uniqueness, we need to know that the minor in rows $\{ w(k), w(k+1), \ldots, w(n) \}$ and columns $\{ k, k+1, \ldots, n \}$ is invertible. If we reorder the rows of this minor by the permutation $w$, we get an upper triangular matrix with $1$'s on the diagonal.
\end{proof}

\begin{Proposition}[Exercise 11.1]
    The $(i_r + 1)$st column of $f_{r-1}$ is the same as the $i_r$th column of $f_r$. And for $k \neq i_r$,  $i_r + 1$, the $k$th columns of $f_{r-1}$ and $f_r$ are the same.
\end{Proposition}

In the example above, this proposition says that the first column of $f_3$ should be the same as the second column of $f_2$ (and it is!).

\begin{proof}
    Note that the right action of $x_{i_r}$ adds $t_r$ times the $i_r$th column of the matrix to the $(i_r + 1)$st column of the matrix:
    \[
    \begin{bmatrix}
        & \mid & \mid & \\
        \cdots & v_{i_r} & v_{i_r+1} & \cdots \\
        & \mid & \mid &
    \end{bmatrix}
    \xrightarrow{\cdot ~ x_{i_r}}
    \begin{bmatrix}
        & \mid & \mid & \\
        \cdots & v_{i_r} & t_r v_{i_r} + v_{i_r + 1} & \cdots \\
        & \mid & \mid & 
    \end{bmatrix}
    \]


    Thus (as we have mentioned before) the span of the columns $\{ k, k+1, \ldots, n \}$ is only possibly changed when $k = i+1$, and the positions of the $1$'s in the matrix $w$ is only changed in columns $i$ and $i+1$. 
    So the Lemma shows that the $k$-th column of $f$ is unchanged for $k \neq i$, $i+1$.
    
    Finally, we address the case of $k = i_r$. Using the Lemma, we need to show that the $(i_r+1)$-st column of $f_{r-1}$ is in the span of columns $\{ i_r, i_r+1, \ldots, n \}$ of $g_r$, and has $1$'s and $0$'s in the right places. The statement about $1$'s and $0$'s is clear. The span of columns  $\{ i_r, i_r+1, \ldots, n \}$ of $g_r$ is the same as the span of columns  $\{ i_r, i_r+1, \ldots, n \}$ of $g_{r-1}$, which is the same as the span of those column in $f_{r-1}$. The vector we are talking about is the $(i_r+1)$-st column of $f_{r-1}$, so it is clearly in the span of columns $\{ i_r, i_r+1, \ldots, n \}$.
    
%    Thus (as we have mentioned before) the span of the $k$ rightmost columns is only possibly changed when $k = i+1$. So if $k > i_r + 1$ or $k \leq i_r$, then the $k$th column of $f_r$ is in the span of columns $k, k+1, \ldots, n$ columns of $f_{r-1}$ (or equivalently, the span of columns $k, k+1, \ldots, n$ of $g_{r-1}$). 
%    
%    Furthermore, we know that the $k$th column of $f_r$ has a 1 in row $w_r(k)$ and 0's in rows $w_r(k+1),\ldots,w_r(n)$ (to the left of other 1's in the matrix). There is exactly one such vector in the span of the $n - k$ (linearly independent) columns and having the $n-k$ determined entries, so the $k$th column of $f_r$ is the same as the $k$th column of $f_{r-1}$.
\end{proof}

\begin{Proposition}[Exercise 11.2]
    The span of the columns $\{i_r+1,i_r+2,\ldots,n\}$ of $f_{r-1}$ is the same as the span of the columns $\{ i_r,i_r+2,\ldots,n\}$ of $f_r$. If $k \neq i_r+1$, then the span of the columns $\{ k,\ldots,n\}$ of $f_{r-1}$ and $f_r$ have the same span.
\end{Proposition}

\begin{proof}
    
    We know that $f_i$ and $g_i$ give the same flags via the rightmost columns construction, so it suffices prove the statement for $g_{r-1} = x_{i_1} \cdots x_{i_{r-1}}$, $g_r = x_{i_1} \cdots x_{i_r}$. The action of $x_{i_r}$ on the right adds $t_r$ times the $i$th column of the matrix to the $(i+1)$st column:
    \[
    \begin{bmatrix}
        & \mid & \mid & \\
        \cdots & v_{i_r} & v_{i_r+1} & \cdots \\
        & \mid & \mid &
    \end{bmatrix}
    \xrightarrow{\cdot ~ x_{i_r}}
    \begin{bmatrix}
        & \mid & \mid & \\
        \cdots & v_{i_r} & t_r v_{i_r} + v_{i_r + 1} & \cdots \\
        & \mid & \mid & 
    \end{bmatrix}
    \]
    
    with all other columns unchanged. Starting from the right and going to the left this only (potentially) changes the span at the $i_{r}+1$th spot. However when we add the $i_r$th column, the span of the columns to the right stabilises once again. Now passing again to the description of $f_{r-1}$ and $f_{r}$ we see that the spans of $\{i_{r}+2,\ldots, n\}$ in both $f_r$ and $f_{r-1}$ must be the same. And since we already showed that $i_{r}+1$ of $f_{r-1}$ is equal to column $i_r$ of $f_r$, the result follows. 
    For the general case we can pass to the $g_{r-1}$ and $g_{r}$ once again and the result follows from the fact that the flags are equal except for $k=n-i_r$.
\end{proof}

\begin{Proposition}[Exercise 11.3]
    Let $q < r$. The span of the $\{ k, k+1, \ldots, n \}$ columns of $f_q$ is the same as the span of the $\{ k, k+1, \ldots, n \} s_{i_{q+1}} \cdots s_{i_r}$ columns of $f_r$, where the $s_i$ act as elements of $S_n$ on the right.
\end{Proposition}

\begin{proof}
    We will induct on $r - q$. The previous proposition proves this in the case when $q = r-1$ (i.e. $r - q = 1$).
    
    In the general case, we want to show that the $\{ k,k+1,\ldots,n \}$ columns of $f_q$ have the same span as the $\{ k, k+1, \ldots, n \} s_{i_{q+1}} \cdots s_{i_r}$ columns of $f_r$. The inductive hypothesis tells us that
    $$\text{columns } \{ k,k+1,\ldots,n \} \text{ of } f_q$$
    have the same span as
    $$\text{columns } \{ k,k+1,\ldots,n \} s_{i_{q+1}} \cdots s_{i_{r-1}} \text{ of } f_{r-1}$$
    We left the proof to be finished at the beginning of next class.
\end{proof}

\section*{October 27 -- Finishing the inversion of the unipotent product}
From last time, we recall that $s_{i_1}\cdots s_{i_N}$ is a reduced word in $S_n$, $t_1,\ldots, t_N$ are positive real numbers, and $g_r = x_{i_1}(t_1)\cdots x_{i_r}(t_r)$. Letting $w_r := s_{i_1}\cdots s_{i_r}$, we recall that $f_r$ is the unique element of $N_-w_r\cap w_r N_+$ whose columns (starting from the right) induce the same flag as $g_r$'s.

Fix some indices $q$, $1\leq q\leq N$, and $k$, $1\leq k\leq n$. We define $C_q := \{k, k+1,\ldots, n\}$ and, for $r > q$, $C_r = C_qs_{i_{q+1}}s_{i_{q+2}}\cdots s_{i_r}$.

When we last left off, we were proving the following proposition:

\begin{Proposition}
The span of columns $C_r$ of $f_r$ is independent of $r$.
\end{Proposition}

\begin{proof}
We proceed by induction on $r$, showing that the span of columns $C_r = C_{r-1}s_{i_r}$ of $f_r$ equals the span of columns $C_{r-1}$ of $f_{r-1}$. This breaks into four cases:

\paragraph{\bf Case 1.} $i_r\notin C_{r-1}, i_r + 1\notin C_{r-1}$. 

In this case, columns $C_{r-1}$ of $f_{r-1}$ are identical to columns $C_r$ of $f_r$.

\paragraph{\bf Case 2.} $i_r\in C_{r-1}, i_r + 1\in C_{r-1}$.

We know from Exercise 11.1 from last time that $f_r$ differs from $f_{r-1}$ only in columns $i_r$ and $i_{r+1}$, and that column $i_r$ of $f_r$ equals column $i_r+1$ of $f_{r-1}$. We now claim further that column $i_r+1$ of $f_r$ is a linear combination of columns $i_r$ and $i_r + 1$ of $f_{r-1}$.

To do this, we again use the Lemma from last time. Let $w_r = s_{i_1}\cdots s_{i_r}$. Then we know that column $i_r+1$ of $f_r$ is the unique vector in the span of columns $i_r+1,\ldots, n$ of $g_r$ with a 1 in row $w_r(i_r+1)$ and 0's in columns $w_r(i_r+2),\ldots, w_r(n)$. We claim that there is a linear combination of columns $i_r$ and $i_r+1$ of $f_{r-1}$ which satisfies these properties. 

First, any such linear combination is 0 in the appropriate places, because the lemma tells us that columns $i_r$ and $i_r+1$ of $f_{r-1}$ both are. 

Second, we note that the span of columns $i_r+1,\ldots, n$ of $g_r$ (call it $S$) has codimension 1 inside the span of columns $i_r,\ldots, n$ of $g_r$, which is the same as the span of columns $i_r,\ldots, n$ of $g_{r-1}$. This space equals the span of columns $i_r,\ldots, n$ of $f_{r-1}$, which also contains the 2-dimensional span of columns $i_r$ and $i_r+1$, which must then intersect $S$ nontrivially.

Finally, we claim that the columns in this intersection have a nonzero entry in row $w_r(i_r+1)$, so in particular we can choose such a column with a 1 in the appropriate place by scaling. Because $s_{i_1}\cdots s_{i_r}$ is a reduced word, we have $w_{r-1}(i_r) < w_{r-1}(i_r+1)$ and $w_r(i_r) > w_r(i_r+1)$. In particular, the first inequality implies that row $w_r(i_r+1) = w_{r-1}(i_r)$ of column $i_r+1$ of $f_{r-1}$ must be 0, since this entry lies above row $w_{r-1}(i_r+1)$. Thus any linear combination of columns $i_r$ and $i_r+1$ of $f_{r-1}$ which is 0 in row $w_r(i_r+1)$ must actually be a scalar multiple of column $i_r+1$ of $f_{r-1}$, or equivalently column $i_r$ of $f_r$. On the other hand, if such a column belonged to the span of columns $i_r+1,\ldots, n$ of $g_r$ (equivalently, of $f_r$) it would imply that columns $i_r,\ldots, n$ of $f_r$ are linearly dependent, a contradiction.

Once we know that column $i_r+1$ of $f_r$ is a linear combination of columns $i_r$ and $i_r+1$ of $f_{r-1}$, we see that the span of columns $C_r = C_{r-1}$ of $f_r$ equals the span of columns $C_{r-1}$ of $f_{r-1}$. 

\paragraph{\bf Case 3.} $i_r\notin C_{r-1}, i_r+1\in C_{r-1}$.

In this case, columns $C_{r-1}$ of $f_{r-1}$ are again identical to columns $C_r$ of $f_r$, by Exercise 11.1 from last time.

\paragraph{\bf Case 4.} $i_r\in C_{r-1}, i_r+1\notin C_{r-1}$.

This case is impossible. This can be illustrated with a wiring diagram for our permutation, such as the following one for $s_1s_2s_1s_3s_2s_1$.

\begin{center}
\begin{tikzpicture}

\node at (-0.5, 3) {1};
\node at (-0.5, 2) {2};
\node at (-0.5, 1) {3};
\node at (-0.5, 0) {4};

\draw[very thick] (0, 3) -- (1, 3) -- (2, 2) -- (3, 1) -- (4, 0) -- (8, 0);
\draw[very thick] (0, 2) -- (1, 2) -- (2, 3) -- (4, 3) -- (5, 2) -- (6, 1) -- (8, 1);
\draw[very thick, red] (0, 1) -- (2, 1) -- (3, 2) -- (4, 2) -- (5, 3) -- (6, 3) -- (7, 2) -- (8, 2);
\draw[very thick, red] (0, 0) -- (3, 0) -- (4, 1) -- (5, 1) -- (6, 2) -- (7, 3) -- (8, 3);
\end{tikzpicture}
\end{center}

Here we've marked in red the strands which keep track of the set $C_r$ as we apply successive transpositions. Case 1 corresponded to two black strands crossing; Case 2, to two red strands crossing; and Case 3, to a red strand going up crossing a black strand going down. This case would correspond to a red strand going down crossing a black strand going up. However, because the red strands start out at the bottom, for this to happen those two strands would necessarily have previously crossed. This cannot happen because we took our word to be reduced.
\end{proof}

This proposition is the final step we need to recover the original parameters $t_i$. We saw previously that we can recover these parameters as ratios of certain right-justified minors of the partial products $g_q$. These match the corresponding right-justified minors of $f_q$, because the columns of $f_q$ and $g_q$ starting from the right determine the same flag. But the proposition further shows that a right-justified minor of $f_q$ can be computed as a minor of the complete product $f_N$ using columns $\{k,k+1,\ldots, n\}s_{i_{q+1}}s_{i_{q+2}}\cdots s_{i_n}$.

Thus we now have maps
\begin{center}
\begin{tikzcd}
\RR^N_{> 0} \arrow{d}{(t_1,\ldots, t_N)\mapsto x_1(t_1)\cdots x_N(t_N)} \\
(N_+\cap B_-wB_-)_{> 0} \arrow{d}{\text{unique representative}} \\
\{M\in N_-w\cap wN_+\mid \text{appropriate minors are positive}\} \arrow{d}{\text{the map we just constructed}} \\
\RR^N_{> 0}
\end{tikzcd}
\end{center}
whose composition is the identity. 

Furthermore, we know from previous results that each of the terms here is given by an open subset of $\RR^N$, thus an $N$-dimensional manifold, and the maps are given by rational functions. From this we conclude that each map is an isomorphism.

Finally, we note, as we did when we parametrized the totally positive unipotent matrices, that our inversion only required checking a certain subset of minors, so those minors give a positivity test. This again clues connections with cluster algebras. 

Specifically, we're interested in terms of the form $(\text{top nonzero minor})/(\text{bottom nonzero minor})$ for various subsets of the columns. In our representation as an element of $N_-w \cap wN_+$ (the $f$ matrix above), each of these top nonzero minors will be 1, so the coordinates we need to check for positivity (cluster variables) are reciprocals of bottom-justified minors. (There is a $\pm 1$ which shows up here; we'll account for this on PSet 6.)

Looking ahead, we'll spend the rest of the course (before final presentations) considering two topics: general totally nonnegative matrices (rather than just unipotent ones) and Postnikov's totally nonnegative Grassmannian.

\section*{October 29 -- Chevalley generators in $\GL_n(\RR)$}



We recall
$$x_i (t) = I + t e_{i, i+1}.$$
We now will want to work in addition with a second set of Chevalley generators,
$$y_i (t) = I + t e_{i+1, i}.$$

These satisfy all the expected commutivity relations. We've proven these results for $x_i$ already, but we recall them here. Fix $i<n, j \leq n$ with $|i-j| \geq 2$
\newcommand{\SNRP}{\RR_{>0}} 
$$ x_i (\SNRP) x_{i+1} (\SNRP) x_i (\SNRP) = x_{i+1}(\SNRP) x_i(\SNRP) x_{i+1} (\SNRP)$$
$$x_i(\SNRP) x_j(\SNRP) = x_j(\SNRP) x_i (\SNRP)$$
$$x_i (\SNRP) x_i(\SNRP) = x_i (\SNRP)$$

Taking the transpose of these gives the associated relations for $y_i:$

$$ y_i (\SNRP) y_{i+1} (\SNRP) y_i (\SNRP) = y_{i+1}(\SNRP) y_i(\SNRP) y_{i+1} (\SNRP)$$
$$y_i(\SNRP) y_j(\SNRP) = y_j(\SNRP) y_i (\SNRP)$$
$$y_i (\SNRP) y_i(\SNRP) = y_i (\SNRP)$$

We also have the following when $i \neq j$:
\begin{equation}
x_i(\SNRP) y_j (\SNRP) = y_j(\SNRP) x_i(\SNRP) \label{SNswap}
\end{equation}

This last follows from the matrix product $(I + t e_{i,i+1}) (I + s e_{j+1,j}) = I + t e_{i, i+1} + s e_{j+1, j},$ where we've used that $e_{i, i+1} e_{j+1, j} = 0.$ A similar computation for the other side gives the result. 

We also introduce $\delta_j(t) = I + (t-1) e_{j,j}$, in other words, an identity matrix with a $t$ on the $j$th diagonal entry instead of a $1.$ Since this is a diagonal matrix, we get the relations:

$$\delta_i(\SNRP) \delta_j(\SNRP) = \delta_j(\SNRP) \delta_i(\SNRP)$$
$$\delta_i(\SNRP) x_j(\SNRP) = x_j(\SNRP) \delta_i(\SNRP)$$
$$\delta_i(\SNRP) y_j(\SNRP) = y_j(\SNRP) \delta_i(\SNRP) $$
$$\delta_i(\SNRP) \delta_i(\SNRP) = \delta_i(\SNRP).$$

We also have the following new relation, giving us commutativity in the presence of appropriate $\delta$'s.

\begin{equation}
x_i(\SNRP) y_i (\SNRP) \delta_i(\SNRP) \delta_{i+1}(\SNRP) = y_i(\SNRP) x_i (\SNRP) \delta_i(\SNRP) \delta_{i+1}(\SNRP) \label{SNswap2}
\end{equation}

This last one is new enough to warrant proof. We note that all the changes are happening in the $2\times2$ block containing the $i$ and $i+1$st diagonal entries. So we can check the identity there. Computing the product on both sides we find:

$$\begin{pmatrix} a(1 + tu) & bt \\ au & b \end{pmatrix} = \begin{pmatrix} a' & b't' \\ a'u' & b' (1 + t' u') \end{pmatrix}$$

where $a,b,t,u$ and their primes are the inputs to the left and right hand sides respectively. Equating entries, we find that 

$$a' = a (1 + tu)$$
$$u' = \frac u {1 + tu}$$
$$t' = \frac t {1 - t (u / (1+tu)} = \frac {t (1+tu)} {1}$$
$$b' = \frac b {1 + t' u'}$$

We note that since $a,b,t,u$ are all positive, $a', u', t'$ and hence $b'$ are positive too. We can see the other direction for positivity must hold by taking the transpose and using commutivity of the $\delta_i.$ 

With all of these relations in mind, we can finally identify\footnote{Though not prove, yet. This is the eventual goal. If you are feeling impatient, see ``Double Bruhat Cells and Total Positivity'' by Fomin and Zelevinsky. JAMS vol 12, 1999} the positive contents of a \emph{double bruhat cell}. Let $u,v$ be permutations with reduced words $s_{i_1} s_{i_2} s_{i_3} \cdots s_{i_{\ell (u)}}$ and $s_{j_1} s_{j_2} s_{j_3} \cdots s_{j_{\ell (v)}}$ respectively. We define $M^{u,v}$ as

$$M^{u,v} := \big ( \prod_{k=1}^{\ell(u)} x_{i_k}(\SNRP) \big ) \big ( \prod_{k=1}^{\ell(v)} y_{j_k} (\SNRP) \big ) \prod_{k=1}^n \delta_k(\SNRP)$$

Thanks to our commutivity relations, we know that we can rearrange this product a great deal. 

\begin{Proposition} %or should it be lemma? Remark? I like proposition.
$M^{u,v}$ contains any product of $x_i (\SNRP), y_j (\SNRP), \delta_k(\SNRP),$ provided we have at least one $\delta_k$ term for every $k,$ and that if $i_1, \ldots, i_N$ and $j_1, \ldots j_M$ are the sequences of subscripts of $x_i$ and $y_j$ respectively, then $u = e_{i_1} * e_{i_2} * \cdots * e_{i_N}$ and $v = e_{j_1} * e_{j_2} * \cdots * e_{j_M}$ in the $0$-Hecke Monoid. 
\end{Proposition} 

The proof is really nice, we can arrange this product into the form we used to define $M$ by commuting the $\delta_k$'s around and swapping all the $x_i$'s to the left of any $y_j,$ using the identities \ref{SNswap} and \ref{SNswap2}.

We then observe

\begin{Proposition}
$$M^{u,v} \subset B_- u B_- \cap B_+ v B_+$$ 
\end{Proposition}

Which follows from the same proof as the previous. We will argue containment in $B_- u B_-,$ the other case is just the transpose. Rearrange the product of any element in $M^{u,v}$ so that all the $x_i$ terms appear first. We know from our unipotent work that the product of the $x_i$ terms is in $B_- u B_-,$ and it's easy to see that the product of the $y_j$'s and $\delta_k$s are contained in $B_-.$ Hence the product is in $B_- u B_-.$

Going forward, we will introduce the $LDU$ factorization of matricies in general (Those with a computational background may already be familiar). 

Our worksheet concluded with a fun problem, which we restate here:

\begin{ex}
Show that there is a continuous (or better, polynomial) function $g : \RR_{\geq 0} \rightarrow GL_n(\RR)$ such that $g(t)$ is totally postitive for $t > 0$ and $g(0) = Id_n.$
\end{ex}
%
%This exercise is very accessible if we apply the Gessel-Lindstrom-Viennot lemma from September $3$rd. For a hint: Let $u=v$ be the longest element of $S_n.$ Then we want to take the product of some element in $M^{u,u},$ with $t$ as the input of each $x_i, y_j$ and $\delta_k.$ 

\begin{proof}[Proof sketch]
Choose a reduced word $s_{i_1} s_{i_2} \cdots s_{i_N}$ for the longest element of $S_n$, and put
\[ g(t) = x_{i_1}(t) x_{i_2}(t) \cdots x_{i_N}(t) y_{i_1}(t) y_{i_2}(t) \cdots y_{i_N}(t) . \]
For $t=0$, this is the identity. As a product of totally nonnegative matrices, it is totally nonnegative and, since we used the longest word in $S_n$, it is in fact totally positive.
\end{proof}

\section*{November 5 -- LDU decomposition, double Bruhat cells, and total positivity for $\GL_n(\RR)$}

Let $X \in \GL_n$. We define an $LDU$ factorization of $X$ to be an expression of $X$ as a product $X = LDU$ with $L \in N_-$, $D$ diagonal and invertible and $U \in N_+$.

\begin{ex}[13.1]
If $X$ has an $LDU$ factorization, then $\Delta^{[k]}_{[k]}(X)\neq 0$ for all $1\leq k \leq n$.
\end{ex}
\begin{proof}
Using Cauchy-Binet, we compute
\begin{align*}
\Delta^{[k]}_{[k]}(LDU) &= \sum_{J} \Delta^{[k]}_J(L) \Delta^{J}_{[k]}(DU) \\
    &= \Delta^{[k]}_{[k]}(L)\Delta^{[k]}_{[k]}(DU) \\
    &= \Delta^{[k]}_{[k]}(L)\sum_J \Delta^{[k]}_J(D) \Delta^{J}_{[k]}(U) \\
    &= \Delta^{[k]}_{[k]}(L) \Delta^{[k]}_{[k]}(D)\Delta^{[k]}_{[k]}(U) \\
    &= \Delta^{[k]}_{[k]}(D)
\end{align*}
where we are using that $\Delta^{[k]}_{[k]}(L)= \Delta^{[k]}_{[k]}(U)=1$ because the are lower/upper triangular matrices with 1's on the diagonal. So since $D\in\GL_n$, $\Delta^{[k]}_{[k]}(X)\neq 0$.
\end{proof}

\begin{ex}[13.2]
If $X$ is an $n\times n$ matrix and $\Delta^{[k]}_{[k]}(X)\neq 0$ for all $1\leq k \leq n$, then $X$ has an LDU decomposition.
\end{ex}
\begin{proof}
Since each $\Delta^{[k]}_{[k]}(X)\neq 0$, this means each upper left $k\times k$ submatrix of $X$ has rank $k$. So the upper left $i\times j$ submatrix has rank $\min(i,j)$, and using the Bruhat decomposition we have $X\in B_-B_+$. 
\end{proof}

\begin{ex}[13.3]
If our decomposition is $X=LDU$, then 
\begin{align*}
L_{ij} &= \frac{\Delta^{[j-1]\cup \{i\}}_{[j]}(X)}{\Delta^{[j]}_{[j]}(X)} \quad \textrm{ for $i>j$,}     &
U_{ij} &= \frac{\Delta^{[i]}_{[i-1]\cup \{j\}}(X)}{\Delta^{[i]}_{[i]}(X)} \quad \textrm{ for $i<j$} \\
D_{jj} &= \frac{\Delta^{[j]}_{[j]}(X)}{\Delta^{[j-1]}_{[j-1]}(X)}
\end{align*}
\end{ex}
\begin{proof}
From our work in Exercise~13.1, $\Delta^{[k]}_{[k]}(X) = \Delta^{[k]}_{[k]}(D) = D_{11}\cdots D_{kk}$. 
For the entries of $U$, use Cauchy-Binet to compute
\begin{align*}
\Delta^{[i]}_{[i-1]\cup\{j\}}(X) &= \Delta^{[i]}_{[i]}(L)\Delta^{[i]}_{[i-1]\cup\{j\}}(DU) \\
    &= \sum_J \Delta^{[i]}_J(D) \Delta^J_{[i-1]\cup \{j\}}(U) \\
    &= \Delta^{[i]}_{[i]}(D)\Delta^{[i]}_{[i-1]\cup\{j\}}(U).
\end{align*}
Since $U\in N_+$, taking rows in $[i]$ and columns in $[i-1]\cup\{j\}$ gives an upper triangular matrix, whose diagonal entries are $1$'s and then $U_{ij}$. Thus $\Delta^{[i]}_{[i-1]\cup\{j\}}(X) = \Delta^{[i]}_{[i]}(X)U_{ij}$.

For the entries of $L$, just take the transpose of everything in the argument for $U$.
\end{proof}



Now we would like to prove the following theorem:
\begin{thm}
Suppose $X$ is a totally nonnegative matrix in $\GL_n$. Then $X$ has an LDU factorization composed of TNN matrices.
\end{thm}

Our first goal is to show that there is an $LDU$ factorization at all, so we want to show that $\Delta^{[k]}_{[k]}(X) \neq 0$.
Since $X\in \GL_n$, we have $\Delta^{[n]}_{[n]}(X)\neq 0$. Now we proceed by contradiction, and suppose there is some index $m$ such that $\Delta^{[m-1]}_{[m-1]}(X)=0$ but $\Delta^{[m]}_{[m]}(X)\neq 0$.

\begin{ex}[14.1 \& 14.2]
The upper left $m\times (m-1)$ and $(m-1)\times m$ submatrices of $X$ are rank $m-1$, and there exists some $p,q$ such that $\Delta^{[m]\setminus p}_{[m-1]}(X)\neq 0$ and $\Delta^{[m]}_{[m]\setminus q}(X)\neq 0$.
\end{ex}
\begin{proof}
For the second part, note that if we expand along the last column, we get
\[
\Delta^{[m]}_{[m]}(X) = \sum_{i=1}^m (-1)^{i+m}X_{im}\Delta^{[m]\setminus i}_{[m-1]}(X) = \sum_{i=1}^{m-1} (-1)^{i+m}X_{im}\Delta^{[m]\setminus i}_{[m-1]}(X) 
\]
since $\Delta^{[m-1]}_{[m-1]}(X)=0$. Since the sum is non-zero, there's a non-zero minor of our desired form $\Delta^{[m]\setminus p}_{[m-1]}(X)$. This means we have $m-1$ linearly independent rows in the $m\times (m-1)$ upper left submatrix of $X$, which gives our rank result.

To get the result for $\Delta^{[m-1]}_{[m]\setminus q}(X)$ and the $(m-1)\times m$ upper left submatrix, do the same thing but expand along rows. 
\end{proof}

\begin{ex}[14.3]
Arrive at the contradiction using this identity from PSet~3:
\[
\Delta^{[m]}_{[m]}(X)\Delta^{[m-1]\setminus p}_{[m-1]\setminus q}(X) = \Delta^{[m-1]}_{[m-1]}(X)\Delta^{[m]\setminus p}_{[m]\setminus q}(X) - \Delta^{[m]\setminus p}_{[m-1]}(X) \Delta^{[m-1]}_{[m]\setminus q}(X)
\]
\end{ex}
\begin{proof}
The left hand side is positive because $X$ is totally non-negative. The first term on the right hand side is zero because $\Delta^{[m-1]}_{[m-1]}(X)=0$ by assumption. Including the negative sign, the second term is negative because by 14.2 both $\Delta^{[m]\setminus p}_{[m-1]}(X)$ and $\Delta^{[m-1]}_{[m]\setminus q}(X)$ are non-zero, and because $X$ is TNN they are in fact both positive. This gives our desired contradiction.
\end{proof}

So now we know that $\Delta^{[k]}_{[k]}(X)\neq 0$ for all $k$, and thus by Exercise~13.2 $X$ has an LDU decomposition, $X=LDU$. 

\begin{ex}[14.4]
The diagonal matrix $D$ is totally non-negative since by Exercise~13.3, the diagonal entries are just ratios of minors of $X$.
\end{ex}

\begin{ex}[14.5]
Suppose $X$ is totally positive. Then the left justified minors of $L$ and the top justified minors of $U$ are both totally positive.
\end{ex}
\begin{proof}
Multiplication by $D$ only scales the minors by positive amounts.
Right multiplication by $U$ is rightwards column operations, and thus doesn't affect the left justified minors. Similarly, left multiplication by $L$ is downwards row operations, and thus doesn't affect top justified minors.
\end{proof}

We know that the left justified minors of a lower triangular matrix, or the top justified minors of an upper triangular matrix form positivity tests, so this shows that $L$ and $U$ are totally positive (in the sense for lower/upper triangular matrices) if $X$ is totally positive. 

Now we need to deal with the case that $X$ is just totally nonnegative, but perhaps not totally positive. 
REcall from last class that there exists a continuous (polynomial) function $g: \RR_{\geq 0} \to \GL_n(\RR)$ such that $g(t)$ is totally positive for $t>0$ and $g(0)=\textrm{Id}_n$. Let $X\in \GL_n$ be TNN. 

\begin{ex}[14.6]
Show $g(t)Xg(t)$ is totally positive for $t>0$.
\end{ex}
\begin{proof}
Use Cauchy-Binet yet again and see
\[
\Delta^{I}_J(g(t)Xg(t)) = \sum_{L_1,L_2} \Delta^{I}_{L_1}(g(t))\Delta^{L_1}_{L_2}(X)\Delta^{L_2}_J(g(t)).
\]
The outer factors $\Delta^{I}_{L_1}(g(t))$ and $\Delta^{L_2}_{J}(g(t))$ are each positive, and the inner factor is nonnegative, so it is a sum of nonnegative terms. If $L_1=L_2=[k]$, then the inner factor is in fact positive, so there is at least one positive term, and so the whole sum is positive.
\end{proof}

We can now finally do Exercise~14.7 which is to finish the proof of the theorem: Let $X\in \GL_n$ be TNN. From a previous worksheet, we know that $Y\mapsto (L,D,U)$ is a continuous map. If we precompose with the map $t\mapsto g(t)Xg(t)$, we get a continuous map
\[
t\mapsto g(t)Xg(t) \mapsto (L(t), D(t), U(t)).
\]
In particular, both $L(t)$ and $U(t)$ are continuous functions of $T$, and are TP for $t>0$. Thus they stay TNN if we take $\lim_{t\to 0}$, and we get $L(0)=L$ and $U(0)=0$ from our decomposition of $X$. Combined with Exercise~14.4, this completes the proof of the theorem that TNN invertible matrices have TNN LDU decompositions.


Someone brought up a question of whether we really needed to take $g(t)Xg(t)$. Could we get away with just doing something like $g(t)X$? In fact we could! Since $X$ is invertible, it has enough non-zero minors that a similar argument would work, but we would have to work harder to show that.


Now that we know we can factor into TNN things, we want to see how this interacts with our Bruhat decomposition. If we just intersect two Bruhat decompositions of $\GL_n$, we get the \newword{double Bruhat cell} decomposition
\[
\GL_n = \bigsqcup_{u,v}(B_+uB_+ \cap B_- v B_-).
\]

\begin{ex}[15.1]
If $X\in B_+ uB_+\cap B_-vB_-$, then $L\in B_+uB_+\cap N_-$ and $U\in B_-vB_-\cap N_+$.
\end{ex}
\begin{proof}
By assumption, $L\in N_-$ and $U\in N_+$. Since $D$ scales and $U$ does rightwards column operations, $X$ has the same left justified ranks as $L$, which means it's in the same $B_+uB_+$ coset as $X$.
Similarly, $L$ does downwards row operations, so $X$ has the same top justified ranks as $U$, which means it's in the same $B_-vB_-$ coset.
\end{proof}


\begin{ex}[15.2]
Show $(L,D,U)\mapsto LDU$ is a diffeomorphism
\[
(B_+uB_+\cap N_-)_{\geq 0} \times \RR^n_{>0} \times (B_-vB_-\cap N_+)_{\geq 0} \to (B_+uB_+\cap B_- v B_-)_{\geq 0}
\]
where the subscript $\geq 0$ means "TNN".
\end{ex}
\begin{proof}
From Worksheet~13, we know the map \(N_-\times T \times N_+\to \{\textrm{matrices with $\Delta^{[k]}_{[k]}(X)\neq 0$}\}\) is a diffeomorphism, where $T$ is the torus, i.e. the set of diagonal matrices. From Worksheet~14, we know this restricts to a diffeomorphism $(N_-)_{\geq 0}\times T_{>0} \times (N_+)_{\geq 0} \to (\GL_n)_{\geq 0}$. Finally, Exercise~15.1 shows that restricting to the double Bruhat cell on the right gives our desired restriction on the left, and so we have our diffeomorphism.
\end{proof}

Now consider any product where each term is of the form $x_i(\RR_{>0})$, $y_j(\RR_{>0})$, $\delta_k(\RR_{>0})$ and where each of $\delta_1(\RR_{>0}, \ldots, \delta_n(\RR_{>0})$ appears exactly once. Let $i_1,\ldots, i_M$ be the sequence of subscripts of the $x_i$ factors and let $j_1,\ldots, j_N$ be the sequence of subscripts of the $y_j$ factors. Suppose that $s_{i_1}s_{i_2}\cdots s_{i_M}$ is a reduced word for $u$ and that $s_{j_1}\cdots s_{j_N}$ is a reduced word for $v$.
\begin{ex}[15.3]
Show that the product gives a diffeomorphism $\RR_{>0}^{\ell(u)+\ell(v)+n}\to (B_+uB_+\cup B_-vB_-)_{\geq 0}$.
\end{ex}
\begin{proof}
From previous work, we know that the $x_i$'s parametrize $B_+uB_+\cap N_-$ correctly so that we get a map $(B_+uB_+\cap N_-)$ to $\RR^M_{>0}$. Similarly the $y_j$'s parametrize $B_-vB_-\cap N_+$ correctly so that we get a map $(B_-vB_-\cap N_+)$ to $\RR^N_{>0}$. Combining this with our result above, we get maps
\begin{center}
\begin{tikzcd}
B_+uB_+\cap B_- v B_- \rar["\cong"] & (B_+u B_+ \cap N_-) \times T \times (B_-vB_-\cap N_+) \rar["\cong"] & \RR^M_{>0}\times \RR^n_{>0} \times \RR^N_{>0}
\end{tikzcd}
\end{center}
which give our desired result.
\end{proof}


\section*{November 10 -- Kasteleyn labelings}


Over the next few lectures, we will begin to discuss totally non-negative (tnn) points of the Grassmannian. A point $p \in G(k,n) \subseteq \PP^{\binom{n}{k}}$, considered in the Pl\"ucker embedding, is totally non-negative if all of its non-zero coordinates have the same sign. One question we might ask is:

\vspace*{1em}

\textbf{Question:} How do we find tnn points of the Grassmannian?

\vspace*{1em}

One way to find tnn points of $G(k,n)$ is to start with a tnn $n \times n$ matrix $M$ (which we can obtain from graphs via the Gessel-Lindstr\"om-Viennot lemma) and take the point in the Grassmannian corresponding to the first $k$ rows of $M$. Another way to obtain tnn points is through dimer covers of a bipartite graph, which we explored today.

\begin{dfn}
    Let $G$ be a bipartite graph. A \newword{dimer cover} of $G$ is a collection of edges that covers each vertex exactly once.
\end{dfn}

\begin{eg}
    Let $G$ be the 4-cycle bipartite graph (drawn below); the two possible dimer covers are drawn on the right.
    \begin{figure}[!h]
        \centering
        \begin{minipage}{0.33333\textwidth}
            \centering
            \begin{tikzpicture}[scale=2]
                \draw[thick] (.1,0)--(.9,0);
                \draw[thick] (1,.1)--(1,.9);
                \draw[thick] (.9,1)--(.1,1);
                \draw[thick] (0,.1)--(0,.9);
            
                \draw (0,0) circle (.1);
                \filldraw (1,0) circle (.1);
                \draw (1,1) circle (.1);
                \filldraw (0,1) circle (.1);
            \end{tikzpicture}
        \end{minipage}%
        \begin{minipage}{0.33333\textwidth}
            \centering
            \begin{tikzpicture}[scale=2]
                \draw[thick] (1,.1)--(1,.9);
                \draw[thick] (0,.1)--(0,.9);
            
                \draw (0,0) circle (.1);
                \filldraw (1,0) circle (.1);
                \draw (1,1) circle (.1);
                \filldraw (0,1) circle (.1);
            \end{tikzpicture}
        \end{minipage}%
        \begin{minipage}{0.33333\textwidth}
            \centering
            \begin{tikzpicture}[scale=2]
                \draw[thick] (.1,0)--(.9,0);
                \draw[thick] (.9,1)--(.1,1);
            
                \draw (0,0) circle (.1);
                \filldraw (1,0) circle (.1);
                \draw (1,1) circle (.1);
                \filldraw (0,1) circle (.1);
            \end{tikzpicture}
        \end{minipage}
        \caption{A bipartite graph $G$ and its two dimer covers.}
    \end{figure}
\end{eg}

Kasteleyen was interested in finding a generating function for dimer covers of a bipartite graph. A generating function can be obtained by weighting each edge of $G$ and weighting a dimer cover $M$ by the product of weights of its edges. Returning to our example above:

\begin{eg}
    Let $G$ be the 4-cycle bipartite graph (drawn below); the two possible dimer covers are drawn on the right.
    \begin{figure}[!h]
        \centering
        \begin{minipage}{0.33333\textwidth}
            \centering
            \begin{tikzpicture}[scale=2]
                \draw[thick] (.1,0)--(.9,0);
                \draw[thick] (1,.1)--(1,.9);
                \draw[thick] (.9,1)--(.1,1);
                \draw[thick] (0,.1)--(0,.9);
            
                \draw (0,0) circle (.1);
                \filldraw (1,0) circle (.1);
                \draw (1,1) circle (.1);
                \filldraw (0,1) circle (.1);
                
                \node at (.5,-.15){$z$};
                \node at (1.15,.5){$y$};
                \node at (.5,1.15){$x$};
                \node at (-.15,.5){$w$};
                
                \node at (-.25,0){$1$};
                \node at (1.25,0){$4$};
                \node at (1.25,1){$2$};
                \node at (-.25,1){$3$};
            \end{tikzpicture}
        \end{minipage}%
        \begin{minipage}{0.33333\textwidth}
            \centering
            \begin{tikzpicture}[scale=2]
                \draw[thick] (1,.1)--(1,.9);
                \draw[thick] (0,.1)--(0,.9);
            
                \draw (0,0) circle (.1);
                \filldraw (1,0) circle (.1);
                \draw (1,1) circle (.1);
                \filldraw (0,1) circle (.1);
                
                \node at (1.15,.5){$y$};
                \node at (-.15,.5){$w$};
                
                \node at (-.25,0){$1$};
                \node at (1.25,0){$4$};
                \node at (1.25,1){$2$};
                \node at (-.25,1){$3$};
            \end{tikzpicture}
        \end{minipage}%
        \begin{minipage}{0.33333\textwidth}
            \centering
            \begin{tikzpicture}[scale=2]
                \draw[thick] (.1,0)--(.9,0);
                \draw[thick] (.9,1)--(.1,1);
            
                \draw (0,0) circle (.1);
                \filldraw (1,0) circle (.1);
                \draw (1,1) circle (.1);
                \filldraw (0,1) circle (.1);
                
                \node at (.5,-.15){$z$};
                \node at (.5,1.15){$x$};
                
                \node at (-.25,0){$1$};
                \node at (1.25,0){$4$};
                \node at (1.25,1){$2$};
                \node at (-.25,1){$3$};
            \end{tikzpicture}
        \end{minipage}
        
        \vspace{1em}
        
        \begin{minipage}{0.33333\textwidth}
            \centering
            $ $
        \end{minipage}%
        \begin{minipage}{0.3\textwidth}
            \centering
            $~~~~~wy$
        \end{minipage}%
        \begin{minipage}{0.06666\textwidth}
            \centering
            $+$
        \end{minipage}%
        \begin{minipage}{0.3\textwidth}
            \centering
            $xz$
        \end{minipage}%
        \caption{A bipartite graph $G$ and its two dimer covers.}
    \end{figure}
\end{eg}

Kasteleyn noticed that this generating function is almost the determinant of the adjacency matrix (that is, the matrix with columns indexed by white vertices, rows indexed by black vertices and entry $(i,j)$ having the weight of the edge from white vertex $i$ to black vertex $j$). In our example, the adjacency matrix is
%%%%
%
% I guess for us the weighting is just a formula variable?
% Would be a good place to introduce the x(e) notation
%%%%
\[
\begin{bmatrix}
    w & x \\
    z & y
\end{bmatrix}
\]
and it has determinant $wy-xz$, which is very close to $wy + xz$.
%%%%%%%%%%%%%%%%5
%
% ^ could mention that in fact the generating function is always the permanent of the adjacency matrix, i.e. the sum over S_n but all terms positive instead of scaled by sign.
% and that permanent computation in general is #P-complete (as opposed to determinent O(n^3)
% but (i guess) in this special case ends up being computable
%
%%%%%%%%%%%%%%



\begin{dfn}
    A \newword{Kasteleyen labelling} for a bipartite graph $G$ assigns weight $\kappa(e)$ to each edge, with the condition that
    $$(-1)^k \kappa(e_1) \kappa(e_3) \cdots \kappa(e_{2k-1}) = \kappa(e_2) \kappa(e_4) \cdots \kappa(e_{2k})$$
    whenever $e_1,e_2,\ldots,e_{2k-1},e_{2k}$ are the (ordered) edges of a cycle $C$ in $G$ and $G \setminus C$ is matchable (contains a matching).
    %%%%%
    %
    % For consistency w/ in-class worksheet might want to instead say that $\kappa$ is the name of the labelling, and then typo, the condition should have $\kappa$ instead of x
    %
    %%%%%%
\end{dfn}

The next proposition proves that the cycle condition on weights given in the definition guarantees that the weighted edges will give the determinant the right signs

\begin{Proposition}[Exercise 16.1]
    Let $\kappa$ be a Kasteleyen labeling of $G$. Let $A^\kappa$ be the matrix formed by replacing $x(e)$ by $\kappa(e)x(e)$ in $A$. Show that
    $$\det A^\kappa = c \sum_M x(M)$$
    for some scalar $c$.
\end{Proposition}

\begin{proof}
    %%fix a base dimer cover M_0; we will show that with the Kasteleyen labelling, all base dimer covers have the same sign and coefficient as M_0
    
    Fix a dimer cover $M_0$ on $G$; we will show that with a Kasteleyen labelling, all base dimer covers have the same sign and coefficient as $M_0$. Thinking of the determinant of the adjacency matrix as a sum over $\sigma \in S_n$, we can relabel the vertices of $G$ so that $x(M)$ corresponds to the identity permutation.
    %%%%%
    %
    % ^ mention that any sign change of the determinent as a relsult gets absorbed into c?
    %
    %%%
    
    
    %%observation about union of two matchings; note that the complement of a union cycle is matchable (just choose what's left over from the base matching)
    
    \textbf{Key Observation:} The (multi-graph) union of two matchings is a union of doubled edges and cycles. This is clear because in each matching, each vertex has one edge, so in the union each vertex has two edges. The only way this can happen is when the vertex lies on a cycle or at the end of a doubled edge.
    
    Moreover, if $C$ is a cycle in $M \cup M_0$, then the edges of $M_0$ not in $C$ give a matching on the complement of $C$. Therefore, the complement of $C$ is matchable, so the weights of its edges satisfy the cycle condition in the definition of Kasteleyen labeling.

    %%so we reduce to swapping one cycle at a time
    Therefore, we reduce to swapping one cycle between $M, M_0$ at a time. For simplicty, we reduce to the case where $M_0 \cup M = G$ is a cycle of length $2k$ (with odd edges in $M_0$ and even edges in $M$). Note that since we labeled the vertices so that $M_0$ would correspond to the identity permutation, the edges of $M_0$ connect white vertex $i$ to black vertex $i$ and the edges of $M$ connect white vertex $i$ to black vertex $i-1$ (mod $k$).
    %%%%
    %
    % ^ is just having M_0 be the identity good enough?
    % for k=4, couldn't we have M_0 be identity and M match w4 -> b2, w2 -> b3, w3 -> b1, w1 -> b4?
    % we need to possibly simultaneously permute the white & black vertices
    %
    %%%
    
    After collapsing the edges of $M_0$, we can read off the permutation corresponding to $M$. It is a cycle of length $k$, so the sign on $x(M)$ in the determinant is $(-1)^{k-1}$. Now in $\det A^\kappa$, $x(M)$ gets the coefficient 
    $$\mbox{sgn}(\sigma) (-1)^{k-1} \kappa(e_2) \cdots \kappa(e_{2k}) = \kappa(e_1) \kappa(e_3) \cdots \kappa(e_{2k-1})$$
    %%%
    %
    % If you change to kappa's above, change it here too
    %
    %%
    since $\mbox{sgn}(\sigma) = (-1)^{k-1}$ and because of the cycle condition. This is the coefficient (with the same sign) of $x(M)$ in $\det A^\kappa$.
\end{proof}

\newpage

\begin{eg}[Exercise 16.2, 16.3]
    Find a Kasteleyen labelling for the graph below and find a cycle $C$ in $G$ so that $G \setminus C$ is not matchable. Does this cycle satisfy the cycle condition for Kasteleyen labellings?
    \begin{figure}[!h]
        \centering
        \begin{tikzpicture}
            \foreach \i in {0,...,3} {
                \draw (\i,0)--(\i,2);
            }
            
            \foreach \j in {0,...,2} {
                \draw (0,\j)--(3,\j);
            }
        
            \draw[fill=white] (0,0) circle (.1);
            \filldraw (1,0) circle (.1);
            \draw[fill=white] (2,0) circle (.1);
            \filldraw (3,0) circle (.1);
            \filldraw (0,1) circle (.1);
            \draw[fill=white] (1,1) circle (.1);
            \filldraw (2,1) circle (.1);
            \draw[fill=white] (3,1) circle (.1);
            \draw[fill=white] (0,2) circle (.1);
            \filldraw (1,2) circle (.1);
            \draw[fill=white] (2,2) circle (.1);
            \filldraw (3,2) circle (.1);
        \end{tikzpicture}
    \end{figure}
    
    \vspace{1em}
    
    We can make an educated guess for the labelling:
    \begin{figure}[!h]
        \centering
        \begin{tikzpicture}
            \foreach \i in {0,...,3} {
                \draw (\i,0)--(\i,2);
            }
            
            \foreach \j in {0,...,2} {
                \draw (0,\j)--(3,\j);
            }
        
            \draw[fill=white] (0,0) circle (.1);
            \filldraw (1,0) circle (.1);
            \draw[fill=white] (2,0) circle (.1);
            \filldraw (3,0) circle (.1);
            \filldraw (0,1) circle (.1);
            \draw[fill=white] (1,1) circle (.1);
            \filldraw (2,1) circle (.1);
            \draw[fill=white] (3,1) circle (.1);
            \draw[fill=white] (0,2) circle (.1);
            \filldraw (1,2) circle (.1);
            \draw[fill=white] (2,2) circle (.1);
            \filldraw (3,2) circle (.1);
            
            \node at (.5,2.25){$1$};
            \node at (1.5,2.25){$1$};
            \node at (2.5,2.25){$1$};
            \node at (.5,-.25){$1$};
            \node at (1.5,-.25){$1$};
            \node at (2.5,-.25){$1$};
            \node at (.5,1){$1$};
            \node at (1.5,1){$1$};
            \node at (2.5,1){$1$};
            
            \node at (-.3,.5){$-1$};
            \node at (.75,.5){$1$};
            \node at (1.7,.5){$-1$};
            \node at (2.75,.5){$1$};
            \node at (-.25,1.5){$1$};
            \node at (.7,1.5){$-1$};
            \node at (1.75,1.5){$1$};
            \node at (2.7,1.5){$-1$};
        \end{tikzpicture}
        \caption{A Kasteleyen labelling.}
    \end{figure}
    and one can check that this labelling is indeed a Kasteleyen labelling. The complement of the circuit highlighted below is not matchable because the white vertex left in the middle cannot be matched.
    \begin{figure}[!h]
        \centering
        \begin{tikzpicture}
            \foreach \i in {1,3} {
                \draw (\i,0)--(\i,2);
            }
            
            \foreach \j in {0,2} {
                \draw (2,\j)--(3,\j);
            }
            
            \draw (0,1)--(3,1);
            
            \draw[dashed, thick, red] (0,0)--(2,0)--(2,2)--(0,2)--cycle;
        
            \draw[fill=white] (0,0) circle (.1);
            \filldraw (1,0) circle (.1);
            \draw[fill=white] (2,0) circle (.1);
            \filldraw (3,0) circle (.1);
            \filldraw (0,1) circle (.1);
            \draw[fill=white] (1,1) circle (.1);
            \filldraw (2,1) circle (.1);
            \draw[fill=white] (3,1) circle (.1);
            \draw[fill=white] (0,2) circle (.1);
            \filldraw (1,2) circle (.1);
            \draw[fill=white] (2,2) circle (.1);
            \filldraw (3,2) circle (.1);
            
            \node at (.5,2.25){$1$};
            \node at (1.5,2.25){$1$};
            \node at (.5,-.25){$1$};
            \node at (1.5,-.25){$1$};
            \node at (-.3,.5){$-1$};
            \node at (2.25,.5){$-1$};
            \node at (2.25,1.5){$1$};
            \node at (-.25,1.5){$1$};
        \end{tikzpicture}
        \caption{A circuit whose complement is \textbf{not} matchable.}
    \end{figure}
    
    Starting from the leftmost bottom edge and going counter-clockwise, the odd edges have product $(1)(-1)(1)(1) = -1$ and the even edges have product $(1)(1)(1)(-1) = -1$. But the length of the cycle is $8$, so $(-1)^{8-1} = -1$ and the even and odd edges should produce opposite signs. Therefore, the circuit condition does not always hold when $G \setminus C$ is not matchable.
\end{eg}

\begin{Remark}
    We will prove next class that when $G$ is planar it is enough to check the cycle condition on faces of $G$.
\end{Remark}



\section*{November 12 -- Kasteleyn labellings continued}
We continue from where we left off last time, discussing Kasteleyn labellings of bipartite graphs.

\begin{ex}[16.4]
Let $G$ be a planar graph where every interior face is a disk and let $\kappa$ be a function from the edges of $G$ to $\CC^\times$. Suppose that condition
\[
(-1)^{k-1}\kappa(e_1)\kappa(e_3)\cdots \kappa(e_{2k-1}) = \kappa(e_2) \kappa(e_4)\cdots \kappa(e_{2k}) \tag{$\ast$} \label{eq:kast-cond}
\]
holds whenever $e_1, e_2, \ldots, e_{2k-1}, e_{k2}$ is the boundary of a face of $G$. Show that this is a Kasteleyn labelling.
\end{ex}
\begin{proof}
Suppose cycle $C = e_1,\ldots, e_{2k}$ is such that its complement admits a matching. Since this means that both any vertices inside of $C$ and any vertices outside of $C$ must be matched separately, we can without loss of generality assume that $C$ forms the boundary of our planar graph.  The intuition is that we can build $C$ out of its interior faces, and that this will get the conditions~(\ref{eq:kast-cond}) to fit together nicely. 

More precisely, we need some way of assigning ``even'' versus ``odd'' edges of a cycle, since our condition treats them differently. So for each face and for our cycle $C$, orient the edges going clockwise and say that an edge is even if it goes from white to black within the cycle, and it is odd if it goes from black to white within the cycle. Every interior edge thus appears in exactly two faces with a different assignment in each. We can view (\ref{eq:kast-cond}) as telling us the sign when we quotient the weights of even edges by odd edges. So if we multiply together the condition for each interior face, all of the interior faces will appear once in the numerator and once in the denominator and thus will cancel, leaving us with a quotient of the even exterior edges by the odd  exterior edges. 


In summary, so far we have shown that we could rewrite (\ref{eq:kast-cond}) for $C$ as
\begin{align*}
(-1)^{k-1} &= \frac{\kappa(e_2) \kappa(e_4)\cdots \kappa(e_{2k})}{\kappa(e_1)\kappa(e_3)\cdots \kappa(e_{2k-1})} = \frac{\kappa(e_2) \kappa(e_4)\cdots \kappa(e_{2k})}{\kappa(e_1)\kappa(e_3)\cdots \kappa(e_{2k-1})} \cdot \frac{\prod_{e\textrm{ interior edge}} \kappa(e) }{\prod_{e\textrm{ interior edge}} \kappa(e) } \\
&= \prod_{f\textrm{ interior face}} 
\frac{\prod_{e\textrm{ even edge of $f$}} \kappa(e)}{\prod_{e\textrm{ odd edge of $f$}} \kappa(e)}
\end{align*}
Thus it suffices to show that that 
\[
\prod_{f\textrm{ interior face}} (-1)^{|f|/2-1} = (-1)^{k-1}
\]
where $|f|$ means the number of edges on the boundary of face $f$. We can turn this into an equation on the exponents, getting that we want
\[
\sum_{f\textrm{ interior face}} (|f|/2 - 1) \equiv k-1 \mod 2.
\]
Since summing over interior faces counts each interior edge exactly twice and each exterior edge exactly once, this means we can simplify to wanting to show
\[
\frac{\#(\textrm{exterior edges})}{2} + \#(\textrm{interior edges} - \#(\textrm{faces})  \equiv \frac{\#(\textrm{exterior edges})}{2} - 1 \mod 2.
\]
Cancelling the exterior edges term on each side, we want to show
\[
\#(\textrm{interior edges}) - \#(\textrm{faces}) \equiv 1 \mod 2.
\]
Now recall Euler's formula for planar graphs, which says that $V-E+F=1$ where $V$, $E$, and $F$ represent the number of vertices, edges, and faces, respectively. $C$ being an even length cycle, there must be an even number of vertices on the boundary of the graph. Since $G\setminus C$ is matchable, there must also be an even number of interior vertices. Thus $V\equiv 0 \mod 2$. And since again $C$ is an even length cycle, $E \equiv \#(\textrm{interior edges})\mod 2$. Thus Euler's formula becomes
\[
0 - \#(\textrm{interior edges}) + \#(\textrm{faces})\equiv 1 \mod 2
\]
which is exactly what we wanted to prove. Thus the result holds.
\end{proof}

\begin{ex}[16.5]
Show that every planar bipartite graph has a Kasteleyn labelling. (If you like, you may restrict to the case that every face bounds a disk, although you don't need to).
\end{ex}
\begin{proof}
Suppose we are in the case where every face bounds a disk. By the previous result, we just need to show that our graph has a labelling which satisfies (\ref{eq:kast-cond}) on faces. We will induct on the number of faces. If there are no faces or just 1 face, the result clearly holds. Now suppose there are $n$ faces, and pick a face $f$ which borders the boundary of the graph on at least one edge. If we remove all such exterior edges in $f$, we get a bipartite planar graph $G'$ with one fewer face than $G$. By induction, this $G'$ has a Kasteleyn labelling. 

\begin{figure}[h]
{ \setlength{\unitlength}{1mm}
\begin{picture}(125,50)
\multiput(0,0)(80,0){2}{
%%%%%%%
% Vertices
%%%%%%%
% rows 1 & 3
\multiput(0,0)(30,0){2}{\multiput(0,0)(0,30){2}{\circle{2}}}
\multiput(15,0)(30,0){2}{\multiput(0,0)(0,30){2}{\circle*{2}}}
% rows 2 & 4
\multiput(0,0)(30,0){2}{\multiput(0,15)(0,30){2}{\circle*{2}}}
\multiput(15,0)(30,0){2}{\multiput(0,15)(0,30){2}{\circle{2}}}
%%%%%%%
% Edges
%%%%%%%%
% rows
\multiput(0,0)(0,15){4}{\multiput(1,0)(15,0){3}{\line(1,0){13}}}
% columns
\multiput(0,1)(15,0){4}{\line(0,1){13}}
\multiput(0,31)(15,0){2}{\line(0,1){13}}
\put(45,31){\line(0,1){13}}
}
%%%%%%%%%%%
% the different column
{\linethickness{1mm}
\multiput(0,16)(45,0){2}{\line(0,1){13}}
}
% the label
\put(17, 21){face $f$}
\end{picture}
}
\caption{On the left is the graph $G$. The face $f$ is the face in the middle, which has two edges bordering the boundary (highlighted). On the right is the graph $G'$ which comes as a result of removing the exterior edges of $f$.}
\end{figure}
We now need to figure out how to assign weights to the edges we removed. If there are multiple removed edges, assign all but one of them to have weight 1. Now we have a single edge left to assign a weight. Suppose the boundary of this face $f$ gives a cycle of length $2k$. Then if $k$ is even, assign this edge to have weight $(1$, and if $k$ is odd then we assign this edge to have weight $1$. By construction, this satisfies (\ref{eq:kast-cond}) on face $f$ and it doesn't affect the condition on the other faces we already labelled. Thus this construction satisfies (\ref{eq:kast-cond}) on \emph{all} faces, and by Exercise~16.4 this means it is a Kasteleyn labelling for $G$.
\end{proof}

We discussed an alternate inductive approach to Exercise~16.4. It was not as nice of an approach as the Euler formula method so we did not formalize it, but here was the big picture idea: we induct on the number of faces inside the cycle. But in order to avoid issues with the condition that $G\setminus C$ be matchable, we strengthen our induction hypothesis to the following. We prove that if a cycle has an even number of interior vertices it satisfies condition (\ref{eq:kast-cond}); if a cycle has an odd number of interior vertices then condition (\ref{eq:kast-cond}) is off by a sign. Then we could proceed similarly to in the proof of Exercise~16.5 by peeling off an interior face bordering the cycle and checking that the conditions work out.

We also discussed proof techniques. One group was running into messiness with the inductive approach. The issue was that they were approaching things via starting from a graph and adding one more face, as opposed to the above which starts with the graph and removes a face. While these seem similar, in this case thinking from the perspective of removing a face made the arguments easier to state clearly. 



\section*{November 17 -- Using graphs in a disc to parametrize the totally nonnegative Grassmannian}
Let $G$ be a graph embedded in a disc $D$ such that all the vertices on $\partial(D)$ are white. We'll write $\partial(G)$ for these white boundary vertices, $W_0$ for the interior white vertices and $B$ for the black vertices. Let $\#(W_0) = m$, $\#(B) = m+k$ and $\#(\partial(G)) = n$, and fix a labeling of $\partial(G)$ by $[n]$ in counterclockwise order.


We'll define an \newword{almost perfect matching} $M$ to be a collection of edges which covers every vertex in $B \cup W_0$ exactly once, and every vertex in $\partial(G)$ at most once. For an almost perfect matching $M$, define $\partial(M)$ to be the set of edges in $\partial(G)$ which are covered by $M$. For a $k$-element subset $I$ of $[n]$, define
\[ \mu_I(G) = \sum_{\partial(M) = I} x(M) . \]
We call the $\mu_I$ the \newword{boundary measurements} of $G$.
To avoid silly cases, assume that $G$ has at least one almost perfect matching.


We discussed the following result:
\begin{theorem}
Let $A$ be the $(m+k) \times (m+n)$ adjacency matrix of $G$. Show that there is a Kasteleyn labeling $\kappa$ of $G$ such that $\Delta^B_{W_0 \cup I}(A^{\gamma}) = \mu_I(G)$.
\end{theorem}

We sketched two proofs and didn't finish either. We then showed

\begin{theorem}
Let $A^{\kappa}$ be as above. There is a $k \times n$ matrix $B$ such that $\Delta_I(B) = \Delta^B_{W_0 \cup I}(A^{\kappa})$.
\end{theorem}

\begin{proof}[Proof sketch]
Because $G$ has an almost perfect matching, there is some $I_0$ for which $\Delta^B_{W_0 \cup I_0}(A^{\kappa})$ is nonzero. Thus, the submatrix in columns $W_0 \cup I_0$ has rank $m+k$. We deduce that the submatrix in columns $W_0$ has rank $m$, and thus there is some subset $B_0$ of $B$ such that $\Delta^{B_0}_{W_0}(A^{\kappa})$ is nonzero. Thus, if we sort rows $B_0$ and columns $W_0$ to the top/left, our matrix looks like
\[ \begin{bmatrix}[c|c]
S&T \\ \hline  U&V \\ 
\end{bmatrix} \]
with $S$ invertible. Left multiplying by an appropriate matrix, which will not change the minors in question, we can replace this by
\[ \begin{bmatrix}[c|c]
\mathrm{Id} &\ast\\ \hline  0&B \\ 
\end{bmatrix} .\]
The new matrix $B$ in the lower right then has the required property.
\end{proof}

\section*{November 19 -- cyclic rank matrices}
\begin{dfn}
Let $M$ be a $k \times n$ matrix of rank $k .$ For any $i \in \mathbb{Z},$ let $M_{i}$ be the column of $M$ whose position is $i \bmod n .$ For $a \leq b,$ define
$$
r_{a b}(M)=\operatorname{rank}\left(M_{a}, M_{a+1}, M_{a+2}, \ldots, M_{b}\right)
$$
It is also convenient to put $r_{i(i-1)}(M)=0$.
\end{dfn}

\begin{prob}
Show that, for any $M$, the matrix $r_{i j}(M)$ has the following properties:
\begin{enumerate}
    \item $r_{(i+1) j} \leq r_{i j} \leq r_{(i+1) j}+1$ and $r_{i(j-1)} \leq r_{i j} \leq r_{i(j-1)}+1$
    \item If $r_{(i+1)(j-1)}=r_{(i+1) j}=r_{i(j-1)}$ then $r_{i j}=r_{(i+1)(j-1)}$
    \item  $r_{i j}=k$ if $j \geq i+n-1$
    \item $r_{i j}=r_{(i+n)(j+n)}$
\end{enumerate}
\end{prob}

\begin{proof}
\begin{enumerate}
    \item In the first case if $i=j$ then the problem is trivial. So assume that $i<j$ and $i\not \equiv j\mod n$. In this the problem reduces to saying that adding a vector to a list of vector can at-most increase the dimension by $1$, which is self evident.
    The second part is similar.
    \item In this case we see that if $j>i+n$ then the rank stabilises. For the case $i<j<i+n$, this is equivalent to saying that if we have a finite list of vectors to which we append two more vectors such that neither of them change the dimension of the span, then the two vectors must be in the span of the original list.
    \item This is clear since the rank of $M$ is $k$ and it has $n$ columns.
    \item This is clear by cyclicity.
\end{enumerate}
\end{proof}

\begin{dfn}
We define a matrix $r_{i j}$ obeying the conditions of the previous problem  (for some parameters $(k, n)$ to be a cyclic rank matrix.
\end{dfn}

\begin{prob}
Let $r$ be a cyclic rank matrix. For each $i \in \mathbb{Z},$ show that there is a unique index $f(i)$ such that
\[
r_{i f(i)}=r_{(i+1)f(i)} =r_{i(f(i)-1)}=r_{(i+1)(f(i)-1)}+1
\]
\end{prob}
\begin{proof}
For every $j$, we have $r_{ij} - r_{(i+1)j} \in \{ 0, 1 \}$. For $j$ sufficiently positive, $r_{ij} = r_{(i+1)j} = k$, so $r_{ij} - r_{(i+1)j} = 0$. For $j$ sufficiently negative, we have $r_{ij} - r_{(i+1)j} = (-i+j+1) - (-(i+1)+j+1) = 1$. So there must be some index $j$ for which $r_{i(j-1)} - r_{(i+1)(j-1)} = 1$ and $r_{ij} - r_{(i+1)j} = 0$. Let $j$ be such an index. We have $0 \leq r_{ij} - r_{i(j-1)}$ and $r_{(i+1)j} - r_{(i+1)(j-1)} \leq 1$ and so $-r_{ij} + r_{(i+1)j} - r_{i(j-1)} + r_{(i+1)(j-1} \leq 1$. But we have $-r_{ij} + r_{(i+1)j} - r_{i(j-1)} + r_{(i+1)(j-1} = 1$, by subtracting the two previous equations, so we must have equalities:  $0 = r_{ij} - r_{i(j-1)}$ and $r_{(i+1)j} - r_{(i+1)(j-1)} =1$. So we have $r_{i j}=r_{(i+1)j} =r_{i(j-1)}=r_{(i+1)(j-1)}+1$

We now establish uniqueness. Suppose, for the sake of contradiction, that we have two indices $j_1 < j_2$ with $r_{i j_1}=r_{(i+1)j_1} =r_{i(j_1-1)}=r_{(i+1)(j_1-1)}+1$ and $r_{i j_2}=r_{(i+1)j_2} =r_{i(j_2-1)}=r_{(i+1)(j_2-1)}+1$. Then there must be some $j$ with $j_1 < j \leq j_2$ with $r_{i(j-1)} = r_{(i+1)(j-1)}$ and $r_{ij} = r_{(i+1)j}+1$. But the inequalities $r_{ij} - r_{i(j-1)} \leq 1$ and $0 \leq r_{(i+1)j} - r_{(i+1)(j-1)}$ then force $r_{i(j-1)} = r_{(i+1)(j-1)} = r_{(i+1)j} = r_{ij}-1$, contradicting the second condition in the definition of a cyclic rank matrix.\qedhere
%Observe that $r_{ij}\geq r_{i+1,j}$ and for $j=i$ we have $r_{ij}=1$ and $r_{i+1,j}=0$ and moreover we know that for $j$ large enough the rank stabilises i.e. $r_{i,j}=r_{i+1,j}$. So there must be an index $\ell$ so that $r_{i,\ell}=r_{i+1,\ell}=k$ but $r_{i,\ell-1}=r_{i+1,\ell-1}+1$ which is the index we want.
\end{proof}

\begin{prob}
Let $r$ be a cyclic rank matrix and let $f: \mathbb{Z} \rightarrow \mathbb{Z}$ be the function defined in the previous problem. Show that
\begin{enumerate}
    \item $f: \mathbb{Z} \rightarrow \mathbb{Z}$ is a bijection. 
    \item $f(i+n)=f(i)+n$
    \item  $i \leq f(i) \leq f(i)+n=i+n$
    \item $\frac{1}{n} \sum_{i=1}^{n}(f(i)-i)=k$
\end{enumerate}
\end{prob}
\begin{proof}
\begin{enumerate}
    \item
   
    To prove surjectivity, fix an index $j$ we then have that for $i=j$ we have $r_{i,j-1}=0$ and $r_{i,j}=1$. Moreover  $r_{i,j-1}\leq r_{i,j}$ and for small enough $i$ we must have $r_{i,j}=k$. Repeating the same argument as in the problem on the existence of $f(i)$, we see that there must be a unique index $i$ so that $f(i)=j$. But this also shows injectivity.
    \item This is clear by periodicity since $r_{i+n,j+n}=r_{i,j}.$
    \item It is clear that $f(i)\geq i$. Now $r_{ij}=k$ if $j\geq i+n-1$ and $r_{i+1,j}=k$ if $j\geq i+n$ and so the result follows.
    \item In each row $i$ there are $k$-places $I_{i}:=\{j^1_{i},\ldots,j^k_{i}\}$ where the rank increases. 
    
    Now suppose $i$ is such that $r_{ii}=1$, then note that $i\in I_i$ and moreover we must have that $f(i)\in I_{i+1}$.
    Further note that if $i\notin I_{i}$ then we must have $r_{ii}=0$ and moreover $f(i)=i$.
    
    All in all we have
    $$I_{i+1}=(I_{i}\setminus \{i\})\cup\{f(i)\}.$$
    
    Taking sum we must then have
    $$\sum_{j\in I_{i+1}}j=\sum_{j\in I_i}j+(f(i)-i).$$
    
    Then we have
    \begin{equation*}
    \begin{split}
        \sum_{i\in [n]}(f(i)-i)&=\sum_{i\in [n]}(\sum_{j\in I_{i+1}}j-\sum_{j\in I_i}j)\\
        &=\sum_{j\in I_{i+n}}j-\sum_{j\in I_i} j\\
        &=\underbrace{k+\ldots+k}_\text{n times}\\
        &=nk.
    \end{split}
    \end{equation*}
    Thus the result follows.
\end{enumerate}
\end{proof}

\begin{dfn}
We will define a function $f$ obeying these conditions to be a bounded affine permutation of type $(k, n)$.
\end{dfn}


\begin{prob}
Show that cyclic rank matrices are in bijection with bounded affine permutations (for the same $(k, n))$
\end{prob}

While we did not give a proof of this in detail we remarked that since we have shown one direction, namely that given a cyclic rank matrix, one can construct a bounded affine permutation. To go the other way one proceed as in the case of permutation matrices and rank matrices.


Another remark that was made was that it is not clear that such cyclic rank matrices are realised i.e. if it is possible to actually write down a matrix so that its cyclic rank matrix is the one given. We will discuss this after break.


We finally ended with some remarks by Prof. Speyer on some combinatorial culture which might be discussed in detail after the break. 

Bounded affine permutations and cyclic rank matrices are in fact two of about half a dozen combinatorial objects which are all in bijection with each other. These are a family of objects discovered by Alexander Postnikov (although though these particular examples were discovered by Speyer, Knutson and Lam).

We give a quick list of other objects in the family above.

\begin{itemize}
    \item Cyclic rank matrices (Knutson, Lam and Speyer),
    \item Bounded affine permutations (Knutson, Lam and Speyer),
    \item Decorated permuations i.e. permutations with fixed points colored in two distinct colors (Postnikov),
    \item All possible rank matrices of $(k,n)$ matrices (Knutson, Lam and Speyer),
    \item All possible patterns of which minors vanish on the totally non-negative Grassmanian, $G(k,n)_{tnn}$ (Postnikov),
    \item All oriented matroids of rank $k$ on $[n]$ where the corresponding `chirotope' is totally non-negative (Ardila, Rincon and Williams),
    \item Grassman necklaces ($I_1 \mod n, I_2 \mod n, \ldots, I_n \mod n$) (Postnikov),
\end{itemize}
 and many more \ldots .

The above area gets labelled by the word ``positroids".

\section*{December 1 -- More on cyclic rank matrices}

Today we continued talking about cyclic rank matrices. Recall that given a full rank $k \times n$ matrix $M$ (with columns $M_i$) the dimension of the linear span of the $i$th through $j$th columns $M_i,M_{i+1},\ldots,M_j$ (all indices modulo $n$), when $i \leq j$. When $i > j$, we adopt the convention that $r_{ij} = -i + j + 1$. 

Cyclic rank matrices satisfy and are determined by the following axioms:

\begin{enumerate}
    \item $r_{(i+1)j} \leq r_{ij} \leq r_{(i+1)j} + 1$ and $r_{i(j-1)} \leq r_{ij} \leq r_{i(j-1)} + 1$.
    \item If $r_{(i+1)(j-1)} = r_{(i+1)j} = r_{i(j-1)}$, then $r_{ij} = r_{(i+1)(j-1)}$.
    \item $r_{ij} = k$ if $j \geq i + n - 1$.
    \item $r_{ij} = -i + j + 1$ if $i > j$.
    \item $r_{ij} = r_{(i+n)(j+n)}$.
\end{enumerate}

We can also define a \newword{bounded affine permutation of type} $(k,n)$ $f: \ZZ \to \ZZ$ from our cyclic rank matrix via $f(i) = j$ if and only if $r_{ij} = r_{(i+1)j} = r_{i(j-1)} = r_{(i+1)(j-1)} + 1$. Recall that a bounded affine permutation are determined by the following axioms:

\begin{enumerate}
    \item $f: \ZZ \to \ZZ$ is a bijection.
    \item $f(i+n) = i + n$.
    \item $i \leq f(i) \leq i + n$.
    \item $\frac{1}{n} \sum_{i=1}^n (f(i) - i) = k$.
\end{enumerate}

\begin{Proposition}[Exercise 19.1]
    Let $M$ be a full rank $k \times n$ matrix with corresponding cyclic rank matrix $r$ and bounded affine permutation $f$. We have:
    \begin{enumerate}
        \item $f(i) = i$ if and only if $M_i = 0$.
        \item $f(i) = i+1$ if and only if $M_i$ and $M_{i+1}$ are parallel, nonzero vectors.
        \item $f(i) = i+n$ if and only if $M_i$ is not in the span of $M_{i+1},\ldots,M_{i+n-1}$.
    \end{enumerate}
\end{Proposition}

\begin{proof}
    \begin{enumerate}
        \item By definition $f(i) = i$ if and only if
        $$r_{ii} = r_{(i+1)i} = r_{i(i-1)} = r_{(i+1)(i-1)} + 1$$
        Since $i+1 > i-1$, we can determine the leftmost term:
        $$r_{(i+1)(i-1)} = -(i+1) + (i-1) + 1 = -1$$
        Therefore, $r_{ii} = 0$, so we must have $M_i = 0$.
        \item By definition $f(i) = i+1$ if and only if
        $$r_{i(i+1)} = r_{(i+1)(i+1)} = r_{ii} = r_{(i+1)i} + 1$$
        Again $i+1 > i$, so
        $$r_{(i+1)i} = -(i+1) + i + 1 = 0$$
        Therefore $r_{i(i+1)} = 2$, which can only happen if $M_i,M_{i+1}$ are parallel, nonzero vectors.
        \item By definition $f(i) = i+n$ if and only if
        $$r_{i(i+n)} = r_{(i+1)(i+n)} = r_{i(i+n-1)} = r_{(i+1)(i+n-1)} + 1$$
        Note that the term $r_{i(i+n-1)}$ is the rank of all the columns, which we know is $k$. Moreover, this is one greater than $r_{(i+1)(i+n-1)}$, which represents the rank of all the columns except $M_i$. Thus, $M_i$ cannot be in the span of the other columns.
    \end{enumerate}
\end{proof}

\begin{Proposition}[Exercise 19.2]
    We have $f(i) = j$ if and only if $M_i \in \mbox{Span}(M_{i+1},\ldots,M_{j-1},M_j)$ and $M_i \not\in \mbox{Span}(M_{i+1},\ldots,M_{j-1})$. (This observation was made by Allen Knutson.)
\end{Proposition}

\begin{proof}
    $M_i \in \mbox{Span}(M_{i+1},\ldots,M_{j-1},M_j)$ implies that $r_{ij} = r_{(i+1)j}$. Also, $M_i \notin \mbox{Span}(M_{i+1},\ldots,M_{j-1})$ implies $r_{i(j-1)} = r_{(i+1)(j-1)} + 1$.
    
    Now since $M_i \in \mbox{Span}(M_{i+1},\ldots,M_{j-1},M_j)$ but $M_i \notin \mbox{Span}(M_{i+1},\ldots,M_{j-1})$, that means we can write $M_i$ as a linear combination of $M_{i+1},\ldots,M_{j-1},M_j$ with the coefficient of $M_j$ nonzero. Thus, we can solve for $M_j$ in terms of $M_i,M_{i+1},\ldots,M_{j-1}$, so $r_{ij} = r_{i(j-1)}$.
    
    Putting it all together, we get
    $$r_{ij} = r_{i(j-1)} = r_{(i+1)j} = r_{(i+1)(j-1)} + 1 \iff f(i) = j$$
\end{proof}

Now fix an index $i$ and consider $r_{ij}$ with $j$ increasing from $i$ to $i+n-1$. The matrix $M$ has rank $k$, so there are $k$ indices (corresponding to the pivot columns) where $r_{ij}$ increases as we increase $j$. We call this set of pivot indices $\tilde{I}_i$ and denote its reduction modulo $n$ by $I_i$. Note that the subscripts are cyclic modulo $n$.

\begin{Proposition}[Exercise 19.3]
    We can reconstruct $f$ from $I_i$ by the following recipe:
    \begin{enumerate}
        \item If $i \not\in I_i$, then $f(i) = i$.
        \item If $i \in I_i$ and $I_i = I_{i+1}$, then $f(i) = i+n$.
        \item If $i \in I_i$ and $I_i \neq I_{i+1}$, then $f(i)$ is determined by the conditions that $I_{i+1} \setminus I_i = \{ \overline{f(i)}^n \}$ and $i \leq f(i) < i + n$.
    \end{enumerate}
\end{Proposition}

\begin{proof}
    \begin{enumerate}
        \item The only way that the first column of a matrix can fail to be a pivot column is if it is zero, so if $i \not\in I_i$, $M_i = 0$. By Exercise 19.1(1), this happens if and only if $f(i) = i$.
        \item By the same argument as above, $i \in I_i$ implies that $M_i \neq 0$. Also, $i \in I_{i+1}$ if and only if $i \not\in \mbox{Span}(M_{i+1},\ldots,M_{i+n-1})$. Thus by 19.1(3), $f(i) = i + n$.
        \item By Exercise 19.2, $M_i \in \mbox{Span}(M_{i+1},\ldots,M_{f(i)-1},M_{f(i)}$, but not in $\mbox{Span}(M_{i+1},\ldots,M_{f(i)-1})$. Therefore, $M_{f(i)}$ is a pivot column when starting at $i+1$, but not when starting at $i$. In other words, $f(i) \in I_{i+1}$, $f(i) \not\in I_i$.
        
        Moreover, if $j \neq i$ is a pivot index when starting at $i$, it must also be a pivot index when starting at $i+1$, hence $I_i \setminus \{ i \} \subseteq I_{i+1}$. It follows that $I_{i+1} \setminus I_i$.
        
        Now we know $f(i)$ modulo $n$ and we know that $i < f(i) < i+n$ (since $M_i \neq 0$, $f(i) \neq i$), so we can uniquely determine $f(i)$.
    \end{enumerate}
\end{proof}

\begin{cor}[Exercise 19.4]
    Define a \newword{Grassmann necklace of type} $(k,n)$ to be a sequence $(I_1,I_2,\ldots,I_n)$ of $k$-element subsets of $[n]$ such that, for each $i$, we have $I_i \setminus \{i\} \subseteq I_i+1$. Show that Grassmann necklaces are in bijection with bounded affine permutations of type $(k,n)$.
\end{cor}

For the remainder of the course, we will continue to focus on the connection between the totally non-negative Grassmannian $G(k,n)_{\geq 0}$ and other combinatorial objects. Here is our main goal:
\begin{theorem}
Let $V$ be a point of $G(k,n)_{\geq 0}$. Then there is a planar graph $G$, with positive weights on the edges of $G$, such that $\mu^I(G) = \Delta^I(V)$.
\end{theorem}


 Our goal will be to show that every point of $G(k,n)_{\geq 0}$ is the boundary measurement of a planar bipartite graph. 

Here are all the things that we sadly \textbf{won't} get to:
\begin{enumerate}
    \item Looking at a graph, all of the points of $G(k,n)_{\geq 0}$ it gives have the same cyclic rank matrix. This is easy to prove and an analogue of the 0-Hecke product.
    \item There are ``reduced" graphs for which this gives a diffeomorphism between points of $G(k,n)_{\geq 0}$ with specified cyclic ranks and $R_{>0}^L$. This is an analogue of reduced words. See Postnikov, \emph{Total Positivity, Grassmannians and Networks}.
    \item There are explicit formulas to invert this map. This is the analogue of the ratio of minors. See Muller and Speyer, \emph{The twist for positroid varieties}.
    \item Any two reduced graphs with the same cyclic ranks are linked by certain mutations.  This is the analogue of reduced words being linked by braid moves. Postnikov has a sketchy proof. You can find better proofs in D. Thurston, \emph{From dominos to hexagons} or in Oh and Speyer, \emph{Links in the complex of weakly separated collections}, which builds on Oh, Postnikov and Speyer \emph{Weak Separation and Plabic Graphs}.
\end{enumerate}


We now start proving the Theorem. Let $V \in G(k,n)_{\geq 0}$ and let $f$ be the corresponding decorated permutation. Our first goal is to reduce to the case that $i < f(i) < i+n$ for all $i$. To do this, we introduce two transformations which turn a planar graph $G$ with $n$ boundary vertices into modified graphs $G_{\circ}$ and $G_{\bullet}$ with $n+1$ boundary vertices.


Let $G$ be a  planar bipartite graph, embedded in the plane so that the boundary vertices (all white) lie on a circle and the remaining vertices lie in the interior of the circle. We let $\#(W_0) = m$ be the number of white interior vertices, $\#(B) = m+k$ be the number of black vertices, and $\#(\partial G) = n$ be the number of boundary vertices. We also fix a labelling of $\partial G$ by $[n]$ in counterclockwise order.

There are two ways we will add a boundary vertex to $G$, shown in Figure~\ref{lollipops}. The first, $G_\circ$, is made by adding just a white vertex in position $i$. The second, $G_\bullet$, is made by adding a white vertex in position $i$, adding a new black vertex to the interior and connecting the two new vertices with an edge. This operation is known as \newword{adding a lollipop}.

\begin{figure}[!h]
    \centering
    \begin{minipage}{.333333\textwidth}
        \centering
        \begin{tikzpicture}
            \draw (0,0) circle (2cm);
            \foreach \a in {0, 1, 2, 3, 5} {
                \draw[fill=white] (\a*30:2cm) circle (.1cm);
                \draw (\a*30:2cm) circle (.1cm);
            }
            \node at (150:2.5cm){$i+1$};
            \node at (90:2.3cm){$i+n$};
            \node at (0,0){$G$};
        \end{tikzpicture}
    \end{minipage}%
    \begin{minipage}{.333333\textwidth}
        \centering
        \begin{tikzpicture}
            \draw (0,0) circle (2cm);
            \foreach \a in {0, 1, 2, 3, 5} {
                \draw[fill=white] (\a*30:2cm) circle (.1cm);
                \draw (\a*30:2cm) circle (.1cm);
            }
            \node at (150:2.5cm){$i+1$};
            \node at (90:2.3cm){$i+n$};
            \node at (0,0){$G_\circ$};
            
            \draw[fill=white] (120:2cm) circle (.1cm);
            \draw (120:2cm) circle (.1cm);
            \node at (120:2.3cm){$i$};
        \end{tikzpicture}
    \end{minipage}%
    \begin{minipage}{.333333\textwidth}
        \centering
        \begin{tikzpicture}
            \draw (0,0) circle (2cm);
            \foreach \a in {0, 1, 2, 3, 5} {
                \draw[fill=white] (\a*30:2cm) circle (.1cm);
                \draw (\a*30:2cm) circle (.1cm);
            }
            \node at (150:2.5cm){$i+1$};
            \node at (90:2.3cm){$i+n$};
            \node at (0,0){$G_\bullet$};
            
            \draw[thick] (120:2cm)--(120:1cm);
            \draw[fill=white] (120:2cm) circle (.1cm);
            \draw (120:2cm) circle (.1cm);
            \node at (120:2.3cm){$i$};
            \filldraw (120:1cm) circle (.1cm);
        \end{tikzpicture}
    \end{minipage}%
    
    \caption{The two ways to add lollipops.} \label{lollipops}
\end{figure}

The graphs $G$, $G_\circ$ and $G_\bullet$ each correspond to a bounded affine permutation $f$, $f_\circ$, $f_\bullet$ of types $(k,n)$, $(k,n+1)$ and $(k+1,n+1)$ respectively.

\begin{Proposition}[Exercise 20.1]
    We have $f_\circ(i) = i$ and $f_\bullet(i) = i + (n+1)$. Then for $i + 1 \leq j \leq i + n$, we have $f_\circ(j) = f_\bullet(j) = f(j)$.
\end{Proposition}

\begin{Proposition}[Exercise 20.2]
    Let $f, f_\circ, f_\bullet$ be bounded affine permutations as above. There are isomorphisms between the regions of $G(k,n)$, $G(k,n+1)$ and $G(k+1,n+1)$ with bounded affine permutations $f, f_\circ$ and $f_\bullet$. More specifically, if $M$, $M_\circ$, $M_\bullet$ are corresponding matrices, we have $\Delta^I(M) = \Delta^I(M_\circ) = \Delta^{I \cup \{ i \}}(M_\bullet)$ for $I \subseteq \{ i+1,\ldots,i+n \}$; we have $\Delta^J(M_\circ) = 0$ if $i \in J$ and $\Delta^K(M_\bullet) = 0$ if $i \not\in K$.
\end{Proposition}

\begin{proof}
    In $G_\bullet$, if $i \notin I$ then $\mu^I(G_\bullet) = 0$ because $M_i$ is not in the span of the other $n - 1$ columns. The corresponding matrix is:
    \[ M_\bullet =
    \begin{bmatrix}
        1 & 0 \\
        0 & M
    \end{bmatrix}
    \]
    
    In $G_\circ$, if $i \in I$, then $\mu^I(G_\circ) = 0$ because $i$ is not part of any matching (since it is not connected to any black vertices). If $i \notin I$, then $\mu^I(G) = \mu^I(G_\circ)$ because there are no new matchings. The corresponding matrix is:
    \[ M_\circ =
    \begin{bmatrix}
        \vert & \vert & & \vert \\
        0 & M_{i+1} & \cdots & M_{i+n-1} \\
        \vert & \vert & & \vert
    \end{bmatrix}
    \]
\end{proof}

\section*{December 3 -- Bridges and Chevalley generators}






Previously we saw that we can get a bounded affine permutation $f$ from a given element of $G(k,n)$ by looking at the relative ranks of column intervals. Today we will show that for every $f$ there is also an element of $G(k,n)$ that has $f$ as its affine permutation. For this we will need two graph constructions:

\begin{enumerate}

\item Lollipops 

\begin{figure}[h]
\includegraphics[scale=0.4]{Lollipop Graphs.png}
\caption{The two Lollipop gifts}
\end{figure}

Where we've created a new boundary vertex $\nu$ between $i$ and $i+1,$ attached either to nothing or to a new black vertex. The interior of $G$ remains unchanged otherwise. Both open and closed (the subscript open/filled circle) versions of this increase the dimension of the matrix $M$ associated with $G.$  We saw how these affected the matrix earlier, and by Knutson's observation (see problem 19.2) it follows that these add either a fixed point of $f$ or a point where $f(i) = i+n.$ 

\item Bridges 

\begin{figure}[h]
\includegraphics[scale=0.4]{Bridge Graph.png}
\caption{Building a Bridge}
\end{figure}

This one is new. We create a total of $4$ new verticies for our graph, two of which replace the boundary verticies $i, i+1$ from the boundary of $G'$ (I've marked the boundary verticies of $G'$ with subscripts, and likewise for $G.$ $j_{G'} = j_G$ for $j$ distinct from $i, i+1$.) We attach $5$ new edges, marked in red, exactly one of which has weight $t,$ while the rest are weight $1.$ To think about how this changes the boundary measurements of $G',$ and hence $f,$ it suffices to draw the possible matchings on these new elements (matched edges in blue). 



\begin{figure}[h]
\includegraphics[scale=0.4]{Bridge Matchings.png}
\caption{The possible matchings of the new edges.}
\end{figure}

As a consequence of these cases, let $I$ be a $k$-element subset of $[n].$ Then the boundary measurements of $G$ (our graph after having a bridge) and $G'$ (Our graph before bridge building) obey the following:

\begin{enumerate}
\item If $i+1 \not \in I$ then $\mu^I(G) = \mu^I(G')$

\item If $i+1 \in I$ and $i \not \in I$ then $\mu^I(G) = \mu^I(G') + t \mu^{I - \{i+1\} \cup \{ i \}} (G')$

\item If $i, i+1 \in I$ then $\mu^I(G) = \mu^I(G')$
\end{enumerate}

If $M$ and $M'$ are the matrices associated to $G$ and $G'$ respectively, then we can get the minors of $M$ and $M'$ to be related in this way if we replace $M'_i$ with $M_i = M'_i + t M'_{i+1}$. In other words, we replace $M$ by $M x_i(t)$ where $x_i$ is the Chevalley generator from earlier. (Remark: if $i=n$, the Chevalley generator ``wraps around." This is related to the affine Kac-Moody group of type $\tilde{A}$.)

To see how this transformation changes our bounded affine permutation, we proceed as follows: 
Assume that $f'(i) > f'(i+1).$ First, note that $\mathrm{rank}(M_a, M_{a+1}, \ldots, M_b)$ is unchanged whenever $a \neq i+1$, so we should only expect $f(i)$ and $f(i+1)$ to possibly change. Once we identify how one of these has changed, the other follows since $f$ must be a bijection. It turns out that $f(i) = f'(i+1)$ and $f(i+1) = f'(i).$ Applying Knutsons observation we know that:


$$M'_i \in \text {Span} (M'_{i+1}, \ldots , M'_{f'(i)} )$$
$$M'_i \not \in \text {Span}(M'_{i+1}, \ldots , M'_{f'(i)-1})$$

and

$$M'_{i+1} \in \text {Span} (M'_{i+2}, \ldots , M'_{f'(i+1)} )$$
$$M'_{i+1} \not \in \text {Span}(M'_{i+2}, \ldots , M'_{f'(i+1)-1})$$

Therefore 
$$M_{i+1} = M'_{i+1} + t M'_i \in \text{Span}(M'_{i+2}, \ldots , M'_{f'(i)} ) = \text{Span}(M_{i+2}, \ldots , M_{f'(i)} )$$

as both $M'_i$ and $M'_{i+1}$ are in this span. However

$$M_{i+1} = M'_{i+1} + t M'_i \not \in \text{Span}(M'_{i+2}, \ldots , M'_{f'(i)-1} ) = \text{Span}(M_{i+2}, \ldots , M_{f'(i)-1} )$$

As if it were, we would have $M'_i$ in the span of $M'_{i+1}, \ldots , M'_{f'(i)-1}.$ Contradicting Knutson's observation for $f'(i).$

Let $I_{i}$ be the column indicies (modulo n) where $r_{ij}$ increases. By the previous, we know that $I_j = I'_j$ for $j \neq i+1$ and $I_{i+1} = I'_{i+1} \setminus \{ f(i) \} \cup \{ f(i+1) \},$ as these are the only spans that changed.

This completes problems $21.1$ through $21.3$ from the worksheets.


\end{enumerate}

Now, with these two operations in mind: Suppose we have some bounded affine permutation $f$ of type $(k,n).$ 
If $f(i) = i$ then we may reduce $f$ by removing every integer $m = i (n),$ and reindexing the remaining integers (preserving the linear order). Call the result $f'.$ 
In other words, if $\sigma : \ZZ \to \ZZ$ is the order preserving bijection with $\sigma(j+n-1) = \sigma(j)+n$ and $\sigma(\ZZ) = \{ x \in \ZZ : x \not\equiv i \bmod n \}$, then $f(\sigma(x)) = \sigma(f'(x))$. 
We apply an identical transformation if instead $f(i) = i+n,$ deleting all of these fixed points mod $n$ and regrouping the reindexing. 




Why can we make these transformations? Because they are exactly redone by giving our graph $G$ a lollipop of one kind or the other\footnote{If you like, in this step we are taking candy from a Matrix.}. If we find a matrix corresponding to this affine permutation, then we will be able to find one for $f$. 

Going forward, we will assume $f$ has no fixed points modulo $n.$ 

Our last few observations tell us how we can simplify our permutation to one with fixed points. First, notice that every $f$ will have some index where $f(i) < f(i+1),$ as bounded permutations cannot decrease for very long. We have to stay above our input: $f(i) \geq i.$ Let $i$ be such an index. We change $f$ to $f'$ as follows:

$$f'(j) = \begin{cases} f(j) & \text{ for } j \neq i, i+1 (n) \\ f(i+1) & \text{ for } j = i (n) \\ f(i) & \text{ for } j=i+1 (n) \end{cases}$$

Note the similarity to how adding a bridge transformed the associated permutation. It remains only to check that $f'$ is also a bounded affine permutation. 

\begin{enumerate}
\item $f'$ is a bijection.

This follows from the definition, we have only rearranged the outputs of $f.$ 

\item $f'(j + n) = f'(j) + n.$

Observe that we have defined the outputs modulo $n,$ and that $f$ satisfies these equalities. So we will too. 

\item $j \leq f'(j) \leq f'(j)+n.$

This is where we need that $f$ has no fixed points, and hence these inequalities are strict for $f.$ Hence we satisfy these inequalities for all $j \neq i, i+1$ modulo $n.$ Now we check

$$i < i+1 < f'(i) = f(i+1) \leq i + n$$ 

$$i+1 \leq f(i) = f'(i+1) < i+n < i+n+1 $$

\item $\frac 1 n \sum_{j=1}^n (f'(j) - j)= k.$

Note we have only rearranged the values appearing in this sum, so it is preserved.
\end{enumerate}


So now we need only realize we're done! First, convince yourself we can make a graph (and hence matrix) with any given bounded affine permutation when $n$ is sufficiently small. Then note that our simplifying operations on $f$ correspond to taking lollipops and burning bridges, so that we can reverse them by the corresponding operations. Then, finally, observe that we can only perform the swap operation from $f$ to $f'$ so many times before creating a fixed point, so we can argue by induction on $n$ that every bounded affine permutation comes from a graph! 


What remains to show that we can represent every element of $G(k,n)_{\geq 0}$. Following the strategy of this approach, we take a matrix $M$ with bounded affine permutation $f$, find an index $i$ and try to write $M$ as $M' x_i(t)$ where $M'$ is totally nonnegative with permutation $f'$. If we can do this, we win. Inductively, we can assume that $M'$ comes from a graph $G'$, and we can then add a bridge to $G'$ to make a graph $G$ for $M$. Note that the choice of $M'$ is determined by $t$, since $M' = M x_i(-t)$. But we need to choose $t$ very carefully! If $t$ is too large, then $M x_i(-t)$ won't be totally positive. If $t$ is too small, then $M x_i(-t)$ will have the same bounded affine permutation as $M$, rather than dropping ranks to make a new permutation $f'$.


\section*{December 8 -- finishing the proof}

Our goal is to show that any point of the totally nonnegative Grassmannian can be obtained  as the boundary measurements of some planar bipartite graph. Last time, we showed a weaker result: any bounded affine permutation can be obtained from a point of the totally nonnegative Grassmannian given by the boundary measurements of some planar bipartite graph. Today, we'll refine the argument from last time to finish off the main result.

Our proof will have the same inductive structure as the one given last time. Let $M$ be a matrix representing a point of the totally nonnegative Grassmannian and let $f$ be its associated affine permutation. If $f(i) = i$ or $f(i) = i+n$, we've already seen that this corresponds to the $i$th column of $M$ being 0 or linearly indepedent of all the other columns (respectively), and that if $M'$ is the matrix obtained by removing that column, we can obtain a graph for $M$ from a graph for $M'$ by adding a lollipop. 

Then if $f$ doesn't have any fixed points, we proceed as follows:
\begin{itemize}
\item Find an index $i$ such that $f(i) < f(i+1)$.
\item Define the permutation $f'$ by
\[
f'(j) = \begin{cases}
f(j+1) & j \equiv i \mbox{ mod } n \\
f(j-1) & j \equiv i+1 \mbox{ mod } n \\
f(j) & \text{otherwise}
\end{cases}
\]
\item Find a matrix $M'$ associated to the bounded affine permutation $f'$, such that $M = M'x_i(t)$ for some positive $t$. Then if $M'$ is given by the boundary measurements of a graph $G'$, we can obtain a graph $G$ whose boundary measurements give $M$ by appending a bridge to $G'$, as detailed last time.
\end{itemize}
By repeatedly performing swaps on our bounded affine permutation as indicated above, we will eventually reach one that has a fixed point mod $n$. We can then reduce $n$ with the lollipop technique and continue.

This argument is laid out in detail on Worksheet 22, which we now summarize.

First, consider the case that $f(i) = i+1$. In this case, we can simply define our matrix $M'$ by replacing the $(i+1)$th column of $M$ with 0's. 

\begin{Proposition}[Problem 22.1]
In this case, $M = M'x_i(t)$ for some positive $t$, and $M'$ has bounded affine permutation $f'$.
\end{Proposition}

\begin{proof}
In general, $f(i) = j$ means that $M_i$ lies in the span of $M_{i+1},\ldots, M_{j}$, but not in the span of $M_{i+1},\ldots, M_{j-1}$. In particular, $f(i) = i+1$ means that $M_i$ is a scalar multiple of $M_{i+1}$, but not 0. So suppose that $M_{i+1} = tM_i$ for some $t$. Then $M = M'x_i(t)$ (we add $t$ times the $i$th column to the 0 column of $M'$, filling in $M_{i+1}$). 

Then let $f''$ be the bounded affine permutation of $M'$. We have $f''(i+1) = i+1 = f(i)$ (since the column is 0) and $f''(j) = f(j)$ for $j\neq i,i+1$ (since zeroing out column $i+1$ does not change the spans relevant to calculating these values). Thus $f'' = f'$.
\end{proof}

This completes the above steps when $f(i) = i+1$, so we now assume that $f(i) > i+1$. We write $f(i) = a$ and $f(i+1) = b$. By our assumptions, we have $i+1 < a < b < i+n-1$. We first nail down precisely how the Grassmann necklace of $M$ behaves.

\begin{Proposition}[Problem 22.2]
There is a $(k-2)$-element subset $R$ of $[n]$ such that
\begin{align*}
I_i &= R\cup \{i, i+1\} \\
I_{i+1} &= R\cup \{i+1, a\} \\
I_{i+2} &= R\cup \{a, b\}
\end{align*}
\end{Proposition}

\begin{proof}
Our assumption that $f(i) > i+1$ means that $i$ is not a scalar multiple of $I_{i+1}$. In particular, $M_i\neq 0$, so $i\in I_i$ and $M_{i+1}$ (itself nonzero, because $f(i+1) > i+1$) is linearly indepdent of $M_i$, so $i+1\in I_i$. Thus we define $R = I_i \backslash \{i,i+1\}$.

We then need to show that $I_{i+1} = I_i \backslash \{i\} \cup \{a\}$. If $i\in I_{i+1}$, that would imply that $M_i$ is linearly independent of all other columns of $M$, or equivalently that $f(i) = i+n$, a contradiction. All the elements of $I_i$ other than $i$ still index pivot columns, so it remains to show that $a$ is in $I_{i+1}$ but not $I_i$. Since $M_i$ is a linear combination of $M_{i+1},\ldots, M_a$ but not of $M_{i+1},\ldots, M_{a-1}$, $M_a$ must be linearly independent of $M_{i+1},\ldots, M_{a-1}$, so it lies in $I_{i+1}$, but it is dependent with $M_i,\ldots, M_{a-1}$, so it is not in $I_i$.

Finally, we show that $I_{i+2} = I_{i+1} \backslash \{i+1\}\cup\{b\}$. This follows from the same reasoning as above, with $i$ replaced by $i+1$ and $a$ replaced by $b$.
\end{proof}

Knowing these pivot sets, we can then prove that a key minor of $M$ is nonzero. We adjust notation once more to write $S = R\cup\{a\}$.

\begin{Proposition}[Problem 22.3]
\[
\Delta^{S\cup\{i\}}(M) > 0.
\]
\end{Proposition}

\begin{proof}
We have the Pl\"ucker relation
\[
\Delta^{R\cup\{i,a\}}\Delta^{R\cup\{i+1,b\}} = \Delta^{R\cup\{i,b\}}\Delta^{R\cup\{i+1,a\}} + \Delta^{R\cup\{i,i+1\}}\Delta^{R\cup\{a,b\}}
\]
Then by the previous result, both of the multiplicands of the rightmost term are nonzero (since they're indexed by pivot sets). Since $M$ is totally nonnegative, the whole expression must then be positive. In particular, since the left side is nonzero, $\Delta^{R\cup\{i,a\}} = \Delta^{S\cup\{i\}}$ is nonzero (and thus positive).
\end{proof}

With this setup, we can now define the matrix $M'$. Let
\[
t = \frac{\Delta^{S\cup\{i+1\}}(M)}{\Delta^{S\cup\{i\}}(M)}
\]
(which is well-defined by the previous proposition) and let
\[
M' = Mx_i(-t).
\]

First, we check that our parameter $t$ actually is positive, so that our graph will still have positive edge weights:
\begin{Proposition}[Problem 22.4]
\[
t > 0.
\]
\end{Proposition}
\begin{proof}
We know that $\Delta^{S\cup\{i\}}(M) > 0$, and $\Delta^{S\cup\{i+1\}}(M) = \Delta^{I_{i+1}}(M) > 0$ because it is indexed by a pivot set.
\end{proof}

Next, we compute how the $k\times k$ minors of $M'$ compare to those of $M$.

\begin{Proposition}[Problem 22.5]
Let $I$ be a $k$-element subset of $[n]$. Then
\[
\Delta^I(M') = \begin{cases}
\Delta^I(M) & i+1\notin I \\
\Delta^I(M) - t\Delta^{I\backslash\{i+1\}\cup\{i\}}(M) & i+1\in I
\end{cases}
\]
\end{Proposition}
\begin{proof}
We obtain $M'$ from $M$ by subtracting $t$ times column $i$ from column $i+1$. Thus, if $I$ does not contain $i+1$, nothing changes, and if it does, by linearity of the determinant we subtract $t$ times the minor with column $i+1$ replaced by column $i$. 
\end{proof}

Now we verify the properties that we need from $M'$. First, we show that it has the bounded affine permutation we expect:
\begin{Proposition}[Problem 22.6]
The bounded affine permutation of $M'$ is $f'$.
\end{Proposition}
\begin{proof}
Let $f''$ be the bounded affine permutation of $M'$.

First, we note that $M_{i+1} \neq 0$ (since $f(i+1)\neq i+1$) and $M'_{i+1}\neq 0$ (if it were, $M_i$ and $M_{i+1}$ would be linearly dependent, in which case $f(i) = i+1$ and we return to a previous case). Then
\[
\mbox{span}(M'_i, M'_{i+1}) = \mbox{span}(M_i, M_{i+1})
\]
In particular, for $j\neq i$ and any index $c$, we have
\[
\mbox{span}(M'_{j+1},\ldots, M'_{c}) = \mbox{span}(M_{j+1},\ldots, M_{c}).
\]
because $M'_{i+1}$ is the only column of $M'$ which differs from its counterpart in $M$. It follows that for $j\neq i,i+1$, $f''(j) = f(j)$.\footnote{At this point in class, the proof took a different direction, but in retrospect it's unclear whether it works.}

Then we claim that there are only two possibilities for $f''$. The bijectivity of $f''$, together with the bounds $i+1 < a < b < i+n+1$, implies that $f''(i+1)$ is either $f(i) = a$ or $f(i+1) = b$. Then the condition $\frac{1}{n}\sum_{i=1}^n(f''(i) - i) = k$ implies, respectively, that $f''(i) = b$ (in which case $f'' = f'$) or $f''(i) = a$ (in which case $f'' = f$.)

If $f'' = f$, then the Grassmann necklaces of $M'$ and $M$ are the same. However, setting $I = I_{i+1} = S\cup\{i+1\}$ in the formula from Problem 22.5, the definition of $t$ implies that
\[
\Delta^{I_{i+1}}(M') = \Delta^{I_{i+1}}(M) - t\Delta^{S\cup\{i\}}(M) = \Delta^{S\cup\{i+1\}}(M) - \Delta^{S\cup\{i+1\}}(M) = 0
\]
That is, we chose $t$ to be the precise value which makes $\Delta^{I_{i+1}}(M')$ vanish. In particular, columns $I_{i+1}$ of $M'$ are linearly dependent, so they cannot be pivot columns, and the Grassmann necklace of $M'$ is different from that of $M$. Thus $f'' = f'$.
\end{proof}

Next, we show that we haven't subtracted too much from $M''$, and it is still totally nonnegative:

\begin{Proposition}[Problem 22.7]
If $i+1\notin I$, then $\Delta^I(M') \geq 0$.
\end{Proposition}
\begin{proof}
In this case $\Delta^I(M') = \Delta^I(M)\geq 0$.
\end{proof}

\begin{Proposition}[Problem 22.8]
If $I = T\sqcup\{i+1\}$, then $\Delta^I(M') \geq 0$.
\end{Proposition}
\begin{proof}
We showed on Homework 8 that, if $S\sqcup \{1\}$ is the set of pivot columns of a $k\times n$ matrix and $T\sqcup\{1\}$ is another size-$k$ set of linearly independent columns, then
\[
\Delta^{S\cup\{n\}}(M)\Delta^{T\cup\{1\}}(M) \geq \Delta^{S\cup\{1\}}(M) \Delta^{T\cup\{n\}}(M)
\]
If we replace $M$ by the cyclic shift of $M$ with column $i+1$ coming first, $S$ becomes the set $S$ from above, and we have
\[
\Delta^{S\cup\{i\}}(M)\Delta^{T\cup\{i+1\}}(M) \geq \Delta^{S\cup\{i+1\}}(M) \Delta^{T\cup\{i\}}
\]
Dividing both sides by $\Delta^{S\cup\{i\}}$ gives
\[
\Delta^{T\cup\{i+1\}}(M) \geq \frac{\Delta^{S\cup\{i+1\}}(M)}{\Delta^{S\cup\{i\}}(M)}\Delta^{T\cup\{i\}}(M) = t\Delta^{T\cup\{i\}}(M)
\]
and so
\[
\Delta^I(M') = \Delta^{T\cup\{i+1\}}(M) - t\Delta^{T\cup\{i\}}(M) \geq 0
\]
\end{proof}

Once we know that $M'$ is totally nonnegative, we can repeat this process until we reach a permutation with a fixed point mod $n$, reduce $n$, find an appropriate planar bipartite graph for that matrix by the induction hypothesis, and then build a planar bipartite graph for $M'$ by adding a lollipop and bridges.


\end{document}
