Schubert puzzles and integrability I: \\ invariant trilinear forms
Allen Knutson
Paul Zinn-Justin
The {\em puzzle rules\/ for computing Schubert calculus on $d$-step flag manifolds, proven in \cite{KT for $1$-step, in \cite{BKPT for $2$-step, and conjectured in \cite{CV for $3$-step, lead to vector configurations (one vector for each puzzle edge label) that we recognize as the weights of some minuscule representations. The $R$-matrices of those representations (which, for $2$-step flag manifolds, involve triality of $D_4$) degenerate to give us puzzle formul\ae\ for two previously unsolved Schubert calculus problems: $K_T(2$-step flag manifolds$)$ and $K(3$-step flag manifolds$)$. % while giving cleaner proofs of some known results. The $K(3$-step flag manifolds$)$ formula, which involves 151 new puzzle pieces, implies Buch's correction to the first author's 1999 conjecture for $H^*(3$-step flag manifolds$)$. \junk{We conclude with a (computer-based) proof that, under certain assumptions, there will be {\em no\/ puzzle-based combinatorial formula for $H^*_T(3$-step$)$ nor for $H^*(4$-step$)$.
eqrh.tex
\def\eqrh{3/(32)((21)0)/3/(32)((21)0)/-1,3/(32)((21)0)/(21)0/((32)1)0/-1,3/(32)1/2(10)/((32)1)0/-1,3/(3(21))(10)/3/(3(21))(10)/-1,3/(3(21))(10)/10/((32)1)0/-1,3/(32)(10)/3/(32)(10)/-1,3/(3(21))0/3/(3(21))0/-1,3(((32)1)0)/(21)0/3(((32)1)0)/(21)0/-1,3/(32)(10)/20/((32)1)0/-1,3(((32)1)0)/10/3(((32)1)0)/10/-1,3(((32)1)0)/0/3(((32)1)0)/0/-1,3/(3(2(10)))0/3/(3(2(10)))0/-1,3/(32)0/21/((32)1)0/-1,32/(3(21))(10)/32/(3(21))(10)/-1,32/(3(21))0/32/(3(21))0/-1,3/2/3((21)0)/((32)1)0/-1,32/(3(2(10)))0/32/(3(2(10)))0/-1,32/(31)0/32/(31)0/-1,32/21/3(10)/(21)0/-1,32/2(10)/32/2(10)/-1,(32)((21)0)/10/(32)((21)0)/10/-1,(32)((21)0)/0/(32)((21)0)/0/-1,3(21)/(3(2(10)))0/3(21)/(3(2(10)))0/-1,32/1/3(20)/(21)0/-1,3(21)/(31)0/3(21)/(31)0/-1,3/21/3(10)/((32)1)0/-1,3(21)/2(10)/3(21)/2(10)/-1,(32)1/(21)0/(32)1/(21)0/-1,3(21)/20/3(21)/20/-1,(32)1/10/(32)1/10/-1,(3(21))(10)/0/(3(21))(10)/0/-1,3/(21)0/32/((32)1)0/-1,32/10/3(21)/(21)0/-1,(32)1/0/3(2(10))/30/-1,3(21)/0/3(2(10))/10/-1,32/10/32/10/-1,3(21)/0/3(21)/0/-1,3/2(10)/3/2(10)/-1,3/(21)0/3/(21)0/-1,(32)1/0/(32)1/0/-1,3(2(10))/(31)0/3(2(10))/(31)0/-1,3/2(10)/30/((32)1)0/-1,3(2(10))/20/3(2(10))/20/-1,3(2(10))/1/3(2(10))/1/-1,3((21)0)/10/3((21)0)/10/-1,(32)(10)/0/3(2(10))/31/-1,3((21)0)/0/3((21)0)/0/-1,(32)(10)/0/(32)(10)/0/-1,3(20)/((32)1)0/3(20)/((32)1)0/-1,32/0/3(2(10))/(21)0/-1,3/20/31/((32)1)0/-1,3(20)/(21)0/3(20)/(21)0/-1,3(20)/10/3(21)/1/-1,3(20)/10/3(20)/10/-1,3(20)/0/3(2(10))/1/-1,31/((32)1)0/31/((32)1)0/-1,3/1/3(20)/((32)1)0/-1,31/(21)0/32/20/-1,31/(21)0/31/(21)0/-1,31/10/3(21)/20/-1,3/10/3(21)/((32)1)0/-1,31/0/3(2(10))/20/-1,3(10)/0/3(2(10))/21/-1,3/0/3(2(10))/((32)1)0/-1,2/((32)1)0/3/(31)0/-1,2/((32)1)0/2/((32)1)0/-1,2/(21)0/32/(31)0/-1,2/(21)0/2/(21)0/-1,2/1/3(20)/(31)0/-1,21/10/3(21)/(32)0/-1,21/10/21/10/-1,2/10/3(21)/(31)0/-1,21/0/3(2(10))/(32)0/-1,21/0/21/0/-1,2/10/2/10/-1,2(10)/0/3(2(10))/(32)1/-1,2(10)/0/2(10)/0/-1,2/0/3(2(10))/(31)0/-1,1/0/3(2(10))/(3(21))0/-1,1/0/1/0/-1,3/((32)1)0/3/((32)1)0/-2,32/(21)0/32/(21)0/-2,3(21)/10/3(21)/10/-2,3(2(10))/0/3(2(10))/0/-2,32/((32)1)0/32/((32)1)0/-3,3(21)/((32)1)0/3(21)/((32)1)0/-3,3(21)/(21)0/3(21)/(21)0/-3,3(2(10))/((32)1)0/3(2(10))/((32)1)0/-3,3(2(10))/(21)0/3(2(10))/(21)0/-3,3(2(10))/10/3(2(10))/10/-3}
Ktri.tex
\def\Ktriup{10/10/10/1, 10/20/(21)0/1, 10/30/(31)0/1, 10/(32)0/((32)1)0/1, 
 10/3(20)/(3(2(10)))0/1, 20/20/20/1, 20/21/2(10)/1, 20/30/(32)0/1, 
 20/31/(32)(10)/1, 21/21/21/1, 21/2(10)/20/1, 21/31/(32)1/1, 
 21/3(10)/(32)0/1, (21)0/1/2(10)/1, (21)0/10/20/1, 
 (21)0/30/(3(21))0/1, (21)0/31/(3(21))(10)/1, 2(10)/20/21/1, 
 2(10)/30/(32)1/1, 30/30/30/1, 30/31/3(10)/1, 30/32/3(20)/1, 
 30/3(21)/3((21)0)/1, 31/31/31/1, 31/3(10)/30/1, 31/32/3(21)/1, 
 (31)0/1/3(10)/1, (31)0/10/30/1, (31)0/2/3((21)0)/1, 
 (31)0/32/3(((32)1)0)/1, 3(10)/30/31/1, 3(10)/32/3(2(10))/1, 
 32/32/32/1, 32/3(20)/30/1, 32/3(21)/31/1, 32/3(2(10))/3(10)/1, 
 32/3(((32)1)0)/(31)0/1, (32)0/2/3(20)/1, (32)0/20/30/1, 
 (32)0/21/3(10)/1, 3(20)/30/32/1, (32)1/2/3(21)/1, (32)1/21/31/1, 
 (32)1/2(10)/30/1, 3(21)/31/32/1, 3(21)/3((21)0)/30/1, 
 ((32)1)0/1/(32)(10)/1, ((32)1)0/10/(32)0/1, ((32)1)0/2/(32)((21)0)/1, 
 (3(21))0/1/3(20)/1, (32)(10)/2/3(2(10))/1, (32)(10)/20/31/1, 
 3((21)0)/30/3(21)/1, 3(2(10))/3(10)/32/1, 3(2(10))/(3(21))(10)/1/1, 
 (3(2(10)))0/10/3(20)/1, (3(21))(10)/1/3(2(10))/1, 
 (32)((21)0)/20/3(21)/1, 3(((32)1)0)/(31)0/32/1, 
 20/(3(21))0/((32)1)0/2, 20/3((21)0)/(3(2(10)))0/2, 
 21/3((21)0)/(3(21))0/2, 21/(3(21))(10)/((32)1)0/2, 
 (21)0/(31)0/((32)1)0/2, (21)0/3(10)/(3(2(10)))0/2, 
 ((32)1)0/20/(3(21))0/2, ((32)1)0/21/(3(21))(10)/2, 
 (3(21))0/21/3((21)0)/2, (3(21))0/31/3(((32)1)0)/2, 
 3((21)0)/31/3(2(10))/2, 3((21)0)/3(10)/3(20)/2, 
 3(2(10))/3((21)0)/31/2, (3(2(10)))0/20/3((21)0)/2, 
 (3(2(10)))0/30/3(((32)1)0)/2, (32)((21)0)/21/3(2(10))/2, 
 (32)((21)0)/2(10)/3(20)/2, 3(((32)1)0)/(32)0/3(21)/2, 
 3(((32)1)0)/(3(21))0/31/2, 3(((32)1)0)/(3(2(10)))0/30/2, 
 ((32)1)0/2(10)/(3(2(10)))0/3, ((32)1)0/((32)1)0/((32)1)0/3, 
 3((21)0)/3((21)0)/3((21)0)/3, 3(((32)1)0)/(32)1/3(2(10))/3, 
 3(((32)1)0)/(32)(10)/3(20)/3, 3(((32)1)0)/(3(21))(10)/3(10)/3, 
 3(((32)1)0)/(32)((21)0)/3((21)0)/4, 
 3(((32)1)0)/3(((32)1)0)/3(((32)1)0)/5}

\def\Ktridown{1/2(10)/(21)0/1, 1/3(10)/(31)0/1, 1/3(20)/(3(21))0/1, 
 1/(32)(10)/((32)1)0/1, 1/3(2(10))/(3(21))(10)/1, 2/3(20)/(32)0/1, 
 2/3(21)/(32)1/1, 2/3((21)0)/(31)0/1, 2/3(2(10))/(32)(10)/1, 
 2/(32)((21)0)/((32)1)0/1, 20/(21)0/10/1, 20/3(21)/(32)((21)0)/1, 
 2(10)/(21)0/1/1, 30/(31)0/10/1, 30/(32)0/20/1, 30/(32)1/2(10)/1, 
 30/(3(21))0/(21)0/1, 31/(32)1/21/1, 31/(32)(10)/20/1, 
 31/(3(21))(10)/(21)0/1, 3(10)/(31)0/1/1, 3(10)/(32)0/21/1, 
 (32)0/((32)1)0/10/1, 3(20)/(32)0/2/1, 3(20)/(3(21))0/1/1, 
 3(20)/(3(2(10)))0/10/1, 3(21)/(32)1/2/1, 3(21)/(32)((21)0)/20/1, 
 (3(21))0/(21)0/30/1, (32)(10)/((32)1)0/1/1, 3((21)0)/(31)0/2/1, 
 3(2(10))/(32)(10)/2/1, (3(21))(10)/(21)0/31/1, 
 (32)((21)0)/((32)1)0/2/1, 
 (21)0/(21)0/(21)0/2, 
21/3(2(10))/(32)((21)0)/2, 
2(10)/3(20)/(32)((21)0)/2, (31)0/(31)0/(31)0/2, 
 (31)0/(32)0/(3(21))0/2, (31)0/(32)1/(3(21))(10)/2, 
 (31)0/((32)1)0/(21)0/2, 3(10)/(32)(10)/2(10)/2, 
 3(10)/(3(2(10)))0/(21)0/2, (32)0/(32)0/(32)0/2, 
 (32)0/(32)1/(32)(10)/2, (32)0/(3(21))0/(31)0/2, 
 3(20)/(32)((21)0)/2(10)/2, (32)1/(32)1/(32)1/2, 
 (32)1/(32)(10)/(32)0/2, (32)1/(3(21))(10)/(31)0/2, 
 ((32)1)0/(21)0/(31)0/2, (3(21))0/(31)0/(32)0/2, 
 (3(21))0/((32)1)0/20/2, (32)(10)/(32)0/(32)1/2, 
 (3(2(10)))0/(21)0/3(10)/2, (3(21))(10)/(31)0/(32)1/2, 
 (3(21))(10)/((32)1)0/21/2, (3(21))0/(32)1/(32)((21)0)/3, 
 (32)(10)/(32)(10)/(32)(10)/3, (32)(10)/(3(2(10)))0/(31)0/3, 
 (3(2(10)))0/(31)0/(32)(10)/3, (3(2(10)))0/(32)0/(32)((21)0)/3, 
 (3(2(10)))0/((32)1)0/2(10)/3, (3(21))(10)/(32)(10)/(32)((21)0)/4}


linkpattern.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%LINK PATTERN ROUTINE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% requires tikz (calc,decorations.markings,positioning,fit). uses pgfkeys for optional args
%
%
%TODO
%need to rationalize use of counters vs macros
%
\makeatletter
\newcommand{\gettikzxy}[3]{% returns coordinates
  \tikz@scan@one@point\pgfutil@firstofone#1\relax
%  \edef#2{\the\pgf@x}%
%  \edef#3{\the\pgf@y}%
\pgfmathsetmacro{#2}{\the\pgf@x/\linkpatternunit}
\pgfmathsetmacro{#3}{\the\pgf@y/\linkpatternunit}
}
% fixes the anchoring issue with labels
% what it does is as follows:
% - suppresses the automatic label anchor placement (the anchor is the place of the border of the label which gets glued to the main node)
% - allows to manually specify an angle or other placement choice for label anchor
% - by default, makes the anchor the center of the label (which looks really ugly)
% - drawback: the auto placement is clever and in particular knows about global transformations. we don't...
\tikzset{label anchor/.code={%
    \let\tikz@auto@anchor=\pgfutil@empty
    \def\tikz@anchor{#1}
  },
  label anchor/.default=center
}
\makeatother
%
% a useful macro
\tikzset{arrow/.style={postaction={decorate,thick,decoration={markings,mark = at position #1 with {\arrow{>}}}}},arrow/.default=0.5}
\tikzset{invarrow/.style={postaction={decorate,thick,decoration={markings,mark = at position #1 with {\arrow{<}}}}},invarrow/.default=0.5}
%
\newdimen\linkpatternunit%
\newcount\linkpatternsize%
\newcount\lpsize%the global internal variable... ugly but \foreach forces us to use a global variable
%
%the optional arguments
\newif\iflinkpatterninverted%mirror symmetry
\newif\iflinkpatterntikzstarted%in principle, shouldn't be needed -- tests itself
\newif\iflinkpatternboxed%draw a box around link patterns/tangles
\newif\iflinkpatternaxis%draw a line at starting/endpoints
\newif\iflinkpatternstraightlines%draw pipedream style
\newif\iflinkpatternnumbered%write labels
\newif\iflinkpatternalias%the vertices can be accessed via their label rather than their normal indexation. turn off for complicated labels
\newif\iflinkpatternnode%creates a node surrounding the linkpattern
\newif\iflinkpatterncentered%automatically centers the picture if outside \tikz{}
%
\newcount\linkpatternfused%for fused link patterns, level of fusion
%
%change dir to /linkpattern, then list of optional arguments
%note the use of /.style vs /.code: /.style means execute a series of pgfkeys, whereas /.code means execute a series of latex commands
\pgfkeys{/linkpattern/.cd,centered/.is if=linkpatterncentered,inverted/.is if=linkpatterninverted,numbered/.is if=linkpatternnumbered,tikzstarted/.is if=linkpatterntikzstarted,straight lines/.is if=linkpatternstraightlines,boxed/.is if=linkpatternboxed,axis/.is if=linkpatternaxis,vertexcolor/.store in=\linkpatternvertexcolor,edgecolor/.store in=\linkpatternedgecolor,boxcolor/.code={\linkpatternboxedtrue\def\linkpatternboxcolor{#1}},tikzoptions/.style={every linkpattern/.append style={#1}},size/.code={\linkpatternsize=#1},numbering0/.code={\def\lpnumbering{#1}\def\linkpatternnumbering{#1}},numbering/.style={numbered,numbering0={#1}},unit/.code={\linkpatternunit=#1},height/.store in=\linkpatternheight,shape/.store in=\linkpatternshape,looseness/.store in=\linkpatternlooseness,squareness/.store in=\linkpatternsquareness,extra space/.store in=\linkpatternextraspace,width/.store in=\linkpatternwidth,alias/.is if=linkpatternalias,pos/.store in=\linkpatternpos,labeloptions/.style={labeloptionslist/.append style={#1}},labeloptionslist/.style={inner sep=2pt,font=\scriptsize,execute at begin node=$,execute at end node=$,label anchor={#1+180}},nodeon/.is if=linkpatternnode,node/.style={nodeon,nodeoptionslist/.append style={#1}},nodeoptionslist/.style={},
%a few predefined styles
pipedream/.style={shape=pipedream,looseness=0,straight lines,numbering0=tangle},
tangle/.style={shape=tangle,numbering0=tangle},
%general stuff
every linkpattern/.style={x=\linkpatternunit,y=\linkpatternunit},
fused/.code={\linkpatternfused=#1},%semi-implemented
%
%vertex/.style={circle,thin,solid,draw=black,fill=\linkpatternvertexcolor,inner sep=0.2pt+0.07\linkpatternunit,draw opacity=1,transform shape},%note the transform shape to avoid all kinds of pbls. but! it makes the size of vertices vary with "scale"
vertex/.style={circle,thin,solid,draw=black,fill=\linkpatternvertexcolor,inner sep=1.5pt,draw opacity=1,transform shape},%note the transform shape to avoid all kinds of pbls
edge/.style={very thick,solid,draw=\linkpatternedgecolor,draw opacity=1}}
%
%default values *if arguments are not mentioned*
%these are global variables that can in principle be modified in the program
\linkpatterncenteredfalse%
\linkpatterninvertedfalse%
\linkpatternnumberedfalse%
\linkpatterntikzstartedfalse%
\linkpatternboxedfalse%
\linkpatternaxistrue%
\linkpatternaliastrue%
\linkpatternunit=0.6cm%
\linkpatternsize=0%
\linkpatternfused=1%
\linkpatternstraightlinesfalse%
\def\linkpatternlooseness{0.2}% how much arches go straight to their partner
\def\linkpatternsquareness{0.35}% how much arches go orthogonally
\def\linkpatternvertexcolor{red}%
\def\linkpatternedgecolor{blue}%
\def\linkpatternboxcolor{none}%
\def\linkpatternheight{0}
\def\linkpatternwidth{0}
\def\linkpatternshape{default}
\def\linkpatternnumbering{default}
\def\linkpatternpos{(0,0)}
\def\linkpatternextraspace{0}
\linkpatternnodefalse
%same, these can be modified in principle -- though this is not very clean code... should be hidden in /linkpattern and command line options should modify them
%
%
\def\firstchar#1#2\empty{#1}%
% generic mechanism to modify output depending on \linkpattern#2
\def\linkpatterndo#1#2{
\edef\param{\csname linkpattern#2\endcsname}
\edef\firstcharparam{\expandafter\firstchar\param\empty}
\expandafter\ifcat\firstcharparam a
\expandafter\ifx\csname linkpattern#1\param\endcsname\relax
%we got something unknown
\csname linkpattern#1unknown\endcsname
\else
\csname linkpattern#1\csname linkpattern#2\endcsname\endcsname
\fi
\else
%we got something unknown
\csname linkpattern#1unknown\endcsname
\fi
}%
% geometry macros
% these take argument \x = vertex number and spit out coordinate and angle
\def\linkpatterncoorddefault{\xdef\lpcoordx{\x}\xdef\lpcoordy{0}\xdef\lpangle{90}}%
\def\linkpatterncoordtangle{\ifnum\x>\lphalfsize\pgfmathparse{\lpsize+1-\x}\xdef\lpcoordx{\pgfmathresult}\xdef\lpcoordy{\lpheight}\xdef\lpangle{270}\else\xdef\lpcoordx{\x}\xdef\lpcoordy{-\lpheight}\xdef\lpangle{90}\fi}
\def\linkpatterncoordcircle{%
 \pgfmathparse{180+(\x-1)*360/\lpsize}
 \xdef\lpangle{\pgfmathresult}
 \pgfmathparse{-cos(\lpangle)}
\xdef\lpcoordx{\pgfmathresult}
 \pgfmathparse{-sin(\lpangle)}
 \xdef\lpcoordy{\pgfmathresult}
}%
\def\linkpatterncoordpipedream{\ifnum\x>\lphalfsize\pgfmathparse{\lpsize+1-\x-0.5}\xdef\lpcoordx{\pgfmathresult}\xdef\lpcoordy{0}\xdef\lpangle{270}\else\pgfmathparse{0.5-\x}\xdef\lpcoordy{\pgfmathresult}\xdef\lpcoordx{0}\xdef\lpangle{0}\fi}
\def\linkpatterncoordrectangle{
\ifnum\x>\lptqsize
\pgfmathparse{\lpsize+1-\x-0.5}\xdef\lpcoordx{\pgfmathresult}\xdef\lpcoordy{0}\xdef\lpangle{270}
\else\ifnum\x>\lphalfsize
\pgfmathparse{\x-\lptqsize-0.5}\xdef\lpcoordy{\pgfmathresult}\xdef\lpcoordx{\linkpatternwidth}\xdef\lpangle{180}
\else\ifnum\x>\linkpatternheight
\pgfmathparse{\x-\linkpatternheight-0.5}\xdef\lpcoordx{\pgfmathresult}\xdef\lpcoordy{-\linkpatternheight}\xdef\lpangle{90}
\else
\pgfmathparse{0.5-\x}\xdef\lpcoordy{\pgfmathresult}\xdef\lpcoordx{0}\xdef\lpangle{0}
\fi\fi\fi
}%
\def\linkpatterncoordunknown{\message{link pattern: unknown shape}}%
%
% draw axis
\def\linkpatterndrawaxisdefault{\draw (1-\linkpatternextraspace,0) -- (\lpsize+\linkpatternextraspace,0);}%
\def\linkpatterndrawaxistangle{\draw (1-\linkpatternextraspace,-\lpheight) -- (\lphalfsize+\linkpatternextraspace,-\lpheight) (1-\linkpatternextraspace,\lpheight) -- (\lphalfsize+\linkpatternextraspace,\lpheight);}%
\def\linkpatterndrawaxiscircle{\draw (0,0) circle (1);}%
\def\linkpatterndrawaxispipedream{\draw (0,-\lphalfsize) -- (0,0) -- (\lphalfsize,0);}%
\def\linkpatterndrawaxisrectangle{\draw (0,-\linkpatternheight) rectangle (\linkpatternwidth,0);}%
\def\linkpatterndrawaxisunknown{\message{link pattern: unknown shape}}%
%
% draw box
\def\linkpatterndrawboxdefault{\draw[fill=\linkpatternboxcolor] (0.5-\linkpatternextraspace,0) rectangle (\lpsize+0.5+\linkpatternextraspace,\lpheight);}%
\def\linkpatterndrawboxtangle{\draw[fill=\linkpatternboxcolor] (0.5-\linkpatternextraspace,-\lpheight) rectangle (\lphalfsize+0.5+\linkpatternextraspace,\lpheight);}
\def\linkpatterndrawboxcircle{\draw[fill=\linkpatternboxcolor] (0,0) circle (1);}%
\def\linkpatterndrawboxunknown{\message{link pattern: unknown shape}}%
\def\linkpatterndrawboxpipedream{\draw[fill=\linkpatternboxcolor] (0,-\lphalfsize) rectangle (\lphalfsize,0);}%
\def\linkpatterndrawboxrectangle{\draw[fill=\linkpatternboxcolor] (0,-\linkpatternheight) rectangle (\linkpatternwidth,0);}%
%
% set size if determined by the geometry
\def\linkpatternsetsizeunknown{
\global\lpsize=\linkpatternsize%this is the size as given by option size
%}%
%\def\linkpatternsetsizetangle{
%\global\lpsize=\linkpatternsize%this is the size as given by option size
%but we also want to fix height if not set manually (useful only for tangles and boxed link patterns)
\if\linkpatternheight0
\xdef\maxsep{0}
\foreach \x/\xx in \mylist%
{%
\edef\tempx{\withoutprime{\x}}
\edef\tempxx{\withoutprime{\xx}}
\pgfmathparse{max(\maxsep,abs(\tempx-\tempxx))}
\xdef\maxsep{\pgfmathresult}
}%
\pgfmathparse{0.25+0.8*\linkpatternsquareness*\maxsep}
\xdef\lpheight{\pgfmathresult}
\else
\xdef\lpheight{\linkpatternheight}
\fi
}
%
\def\linkpatternsetsizerectangle{
\pgfmathtruncatemacro{\tempsize}{2*\linkpatternwidth+2*\linkpatternheight}%lame
\global\lpsize=\tempsize
\pgfmathtruncatemacro{\tempsize}{\linkpatternwidth+2*\linkpatternheight}
\xdef\lptqsize{\tempsize}%why one counter and one macro??
}%
%
% numbering macros
% try to guess size
\newcount\tempsize
\def\linkpatternrightmostunknown{
\global\lpsize=0
\global\tempsize=0
\foreach\x/\labx in \linkpatternnumbering
{
\edef\tempx{\withoutprime{\x}}%not great... (prime not treated)
\ifnum\lpsize<\tempx\global\lpsize=\tempx\fi
\global\advance\tempsize by 1
}
\ifnum\tempsize>\lpsize\global\lpsize=\tempsize\fi
}%
\def\linkpatternrightmostdefault{
\global\lpsize=0
\global\tempsize=0
\foreach \x/\y in \mylist
{
\edef\tempx{\withoutprime{\x}}%not great... (prime not treated)
\ifnum\lpsize<\tempx\global\lpsize=\tempx\fi
\ifx\x\y
\global\advance\tempsize by 1
\else
\edef\tempy{\withoutprime{\y}}
\ifnum\lpsize<\tempy\global\lpsize=\tempy\fi%
\global\advance\tempsize by 2
\fi
}
\ifnum\tempsize>\lpsize\global\lpsize=\tempsize\fi
}%
\def\linkpatternrightmosttangle{
\global\lpsize=0
\global\tempsize=0
\foreach \x/\y in \mylist
{
\edef\tempx{\withoutprime{\x}}
\ifnum\lpsize<\tempx\global\lpsize=\tempx\fi
\ifx\x\y
\global\advance\tempsize by 1
\else
\edef\tempy{\withoutprime{\y}}
\ifnum\lpsize<\tempy\global\lpsize=\tempy\fi%
\global\advance\tempsize by 2
\fi
}
\global\advance\lpsize by\lpsize% not so great either: guess doubling because of 's
\ifnum\tempsize>\lpsize\global\lpsize=\tempsize\fi
}%
\def\linkpatternrightmosthalftangle{\linkpatternrightmosttangle}
%
% numbering. 
\def\linkpatternnumberingdefault{\xdef\lpnumbering{1,...,\lpsize}}%
\def\linkpatternnumberingtangle{%
%have to do it manually...
\xdef\lpnumbering{1,...,\lphalfsize}
\foreach\x in {1,...,\lphalfsize}
{\xdef\lpnumbering{\lpnumbering,\x'}}
}%
\def\linkpatternnumberinghalftangle{%
%have to do it manually...
\xdef\lpnumbering{1,...,\lphalfsize}
\foreach\x in {1,...,\lphalfsize}
{\xdef\lpnumbering{\lpnumbering,\x'/}}
}%
\def\linkpatternnumberingunknown{%
%manual numbering. nothing to do
}%
%
\newcommand\linkpattern[2][]{%universal command
{%we want the macro modifications to be local only
\pgfkeys{/linkpattern/.cd,#1}%parse the list of optional arguments
%
\edef\mylist{#2}%to avoid some annoying bugs
%
\def\primetest##1'{}%
\def\hasaprime##1{\expandafter\primetest##1''}%aha!
\def\internalwithoutprime##1'{##1}%
\def\withoutprime##1{\if\hasaprime##1 %
\expandafter\internalwithoutprime##1\else ##1\fi}%
%
\iflinkpatternnumbered%
\iflinkpatterninverted%the label anchoring hack forces us to distinguish cases
\tikzset{/linkpattern/lbl/.style n args={3}{label={[/linkpattern/labeloptionslist=-##1,##3] ##1:##2}}}%
\else%
\tikzset{/linkpattern/lbl/.style n args={3}{label={[/linkpattern/labeloptionslist=##1,##3] ##1:##2}}}%
\fi%
\else%
\tikzset{/linkpattern/lbl/.style={}}%
\fi%
\tikzifinpicture{\linkpatterntikzstartedtrue%
\begin{scope}[shift=\linkpatternpos,/linkpattern/every linkpattern]%should it be there? can't decide. and order of shift and every...
}{%
\linkpatterntikzstartedfalse%
\iflinkpatterncentered
\begin{tikzpicture}[baseline=(current  bounding  box.center),/linkpattern/every linkpattern]%
\else
\begin{tikzpicture}[baseline=0,/linkpattern/every linkpattern]%
\fi
}%
\begin{scope}[local bounding box=link pattern box]
\iflinkpatterninverted%
\begin{scope}[yscale=-1]%
\fi%
\linkpatterndo{setsize}{shape}%in case geometry dictates size
\ifnum\lpsize=0
%otherwise try to guess size
%by finding rightmost vertex: we do it differently in case of renumbering
\linkpatterndo{rightmost}{numbering}
\fi
\pgfmathtruncatemacro{\lphalfsize}{\lpsize/2}%should probably be transferred somewhere above
%now do the automatic numbering if needed
\linkpatterndo{numbering}{numbering}
%draw line or box (depending on shape)
\iflinkpatternboxed
\linkpatterndo{drawbox}{shape}
\else
\iflinkpatternaxis
\linkpatterndo{drawaxis}{shape}
\fi
\fi
%now place vertices
\foreach\xx/\xlab/\opt in \lpnumbering
{
\ifx\xlab\opt\def\opt{}\fi%if no option avoid repeat of \xlab
%tangle type numbering also tolerated
\if\hasaprime\xx %
\pgfmathtruncatemacro{\xx}{\lpsize+1-\withoutprime{\xx}}
\fi
%
%
% primitive way of getting fused to work. should not be used for exotic geometries
\ifnum\linkpatternfused>1
\pgfmathsetmacro{\x}{0.4*(0.5+\linkpatternfused*(0.5+floor((\xx-1)/\linkpatternfused)))+0.6*\xx}
\else
\def\x{\xx}
\fi
%
\linkpatterndo{coord}{shape}
%
\iflinkpatternalias\def\xlabb{\xlab}\else\def\xlabb{\xx}\fi
\path (\lpcoordx,\lpcoordy) coordinate[/linkpattern/vertex,/linkpattern/lbl={\lpangle+180}{\xlab}{\opt},alias=v\xlabb] (v\xx) ++(\lpangle:\linkpatternunit) coordinate[alias=vv\xlabb] (vv\xx); 
%coordinate vv is there only for direction purposes (lame)
}
%finally, draw edges
\foreach \a/\b/\c in \mylist
{
\if\hasaprime\a %
\pgfmathtruncatemacro{\a}{\lpsize+1-\withoutprime{\a}}
\fi
\ifx\b\c\def\c{}\fi%set option to empty if they're not there
\draw[/linkpattern/edge]
\ifx\a\b
%singleton
(v\a)
\c
--
++(0,\lpheight);
\else
%pair
\pgfextra{
\if\hasaprime\b %
\pgfmathtruncatemacro{\b}{\lpsize+1-\withoutprime{\b}}
\fi
\gettikzxy{(v\a)}{\ax}{\ay}
\gettikzxy{(v\b)}{\bx}{\by}
\gettikzxy{(vv\a)}{\axx}{\ayy}
\gettikzxy{(vv\b)}{\bxx}{\byy}
\pgfmathsetmacro{\dist}{sqrt((\ax-\bx)*(\ax-\bx)+(\ay-\by)*(\ay-\by))}
\pgfmathsetmacro{\abx}{(\axx-\ax)*\dist*\linkpatternsquareness+(\bx-\ax)*\linkpatternlooseness)}
\pgfmathsetmacro{\aby}{(\ayy-\ay)*\dist*\linkpatternsquareness+(\by-\ay)*\linkpatternlooseness)}
\pgfmathsetmacro{\bax}{(\bxx-\bx)*\dist*\linkpatternsquareness+(\ax-\bx)*\linkpatternlooseness)}
\pgfmathsetmacro{\bay}{(\byy-\by)*\dist*\linkpatternsquareness+(\ay-\by)*\linkpatternlooseness)}
}
(v\a)
\c%option
\iflinkpatternstraightlines
\pgfextra{
%straight lines: need to compute an intersection a,a+ab inter b,b+ba
\pgfmathsetmacro{\t}{((\ax-\bx)*\bay-(\ay-\by)*\bax)/(\aby*\bax-\abx*\bay)}
\pgfmathsetmacro{\abx}{\t*\abx}
\pgfmathsetmacro{\aby}{\t*\aby}
}
[rounded corners=0.2\linkpatternunit] -- ++(\abx,\aby) -- (v\b);
\else
%round lines
.. controls ++(\abx,\aby) and ++(\bax,\bay) .. 
\fi
(v\b);
\fi
}
\end{scope}
\iflinkpatternnode
\node[fit=(link pattern box),/linkpattern/nodeoptionslist] {};
\fi
\iflinkpatterninverted
\end{scope}
\fi
\iflinkpatterntikzstarted
\end{scope}
\else%
\end{tikzpicture}%
\fi%
}}%
%
% end main command
%
% convenient for putting a tangle and a link pattern on top of each other
\newcommand\tanglelinkpattern[3][]{%
{%we want the macro modifications to be local only
\pgfkeys{/linkpattern/.cd,#1}
\iflinkpatterninverted
\begin{tikzpicture}[/linkpattern/every linkpattern,baseline=\linkpatternunit]%
\else
\begin{tikzpicture}[/linkpattern/every linkpattern,baseline=-\linkpatternunit]%
\fi
\linkpattern[#1,tikzstarted,numbered=false]{#3}
\pgfmathtruncatemacro{\lptempsize}{2*\linkpatternsize}
%
\iflinkpatterninverted
\begin{scope}[yshift=0.5*\linkpatternunit]
\else
\begin{scope}[yshift=-0.5*\linkpatternunit]
\fi
\linkpattern[tangle,#1,tikzstarted,size=\lptempsize,
numbering=halftangle,
height=0.5]{#2}
\end{scope}
\end{tikzpicture}%
}}
%
%
% schubert variety equations diagrams
\newcommand\diag[4][]{%
\pgfkeys{/linkpattern/.cd,#1}%parse the list of optional arguments
\iflinkpatterntikzstarted\else%
\begin{tikzpicture}[scale=0.5]%TEMP
\fi%
\iflinkpatterninverted%
\begin{scope}[yscale=-1]%
\fi%
\draw (0,0) grid (#2,#3);
\edef\mylist{#4}%to avoid some annoying bugs
\foreach\y/\x/\z in \mylist
{
\ifx\x\z
\draw[decorate,decoration={zigzag,
amplitude=1pt,segment length=5pt}]
(\x-0.5,#3) -- (\x-0.5,\y-0.5) node[circle,fill=black,inner sep=2pt] {} -- (#2,\y-0.5);
\else
\node at (\x-0.5,\y-0.5) {$\z$};
\fi
}
\iflinkpatterninverted
\end{scope}
\fi
\iflinkpatterntikzstarted\else%
\end{tikzpicture}%
\fi%
}
%
%boundary link pattern stuff
\makeatletter
\tikzset{circle split part fill/.style  args={#1,#2}{%
 alias=tmp@name,
  postaction={%
    insert path={
     \pgfextra{% 
     \pgfpointdiff{\pgfpointanchor{\pgf@node@name}{center}}%
                  {\pgfpointanchor{\pgf@node@name}{east}}%            
     \pgfmathsetmacro\insiderad{\pgf@x}
      \fill[#1] (\pgf@node@name.base) ([xshift=-\pgflinewidth]\pgf@node@name.east) arc
                          (0:180:\insiderad-\pgflinewidth)--cycle;
      \fill[#2] (\pgf@node@name.base) ([xshift=\pgflinewidth]\pgf@node@name.west)  arc
                           (180:360:\insiderad-\pgflinewidth)--cycle;                    }}}}}  
 \makeatother
\tikzset{bdot/.style={circle,circle split,draw,circle split part fill={black,white},thin,inner sep=1pt}}%
\tikzset{wdot/.style={circle,circle split,draw,circle split part fill={white,black},thin,inner sep=1pt}}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% OUTDATED: circlelinkpattern kept because fused hasn't been reimplemented
%
\newcommand\circlelinkpattern[2][]{%in principle, could be merged
{%we want the macro modifications to be local only
\pgfkeys{/linkpattern/.cd,#1}%parse the list of optional arguments
\iflinkpatterntikzstarted\else%
\begin{tikzpicture}[/linkpattern/every linkpattern]%
\fi%
\iflinkpatterninverted%
\begin{scope}[yscale=-1]%
\fi%
%find rightmost vertex
\global\lpsize=\linkpatternsize
\edef\mylist{#2}%to avoid some annoying bugs
%find rightmost vertex
\foreach \x/\y in \mylist
{
\ifnum\x>\lpsize\global\lpsize=\x\fi
\ifnum\y>\lpsize\global\lpsize=\y\fi
}
%
%\draw[fill=white] (0,0) circle (1);
\iflinkpatternaxis
\draw (0,0) circle (1);
\fi
\foreach\x in {1,...,\lpsize}
{
\pgfmathparse{(0.3*floor((\x-1)/\linkpatternfused)+0.7*((\x-0.5)/\linkpatternfused-0.5))*\linkpatternfused*360/\lpsize}
\coordinate[/linkpattern/vertex] (v\x) at (\pgfmathresult:1);
}
%finally, draw edges
\foreach \x/\y/\z in \mylist
{
\ifx\y\z%
\draw[/linkpattern/edge] (v\x) .. controls ($0.5*(v\x)$) and  ($0.5*(v\y)$) .. (v\y);
\else
%\draw[/linkpattern/edge,decoration={markings,mark = at position 0.5 with { \arrow[semithick]{\z} }},postaction={decorate}] (v\x) .. controls ($0.5*(v\x)$) and  ($0.5*(v\y)$) .. (v\y);
\draw[/linkpattern/edge] \z (v\x) .. controls ($0.5*(v\x)$) and  ($0.5*(v\y)$) .. (v\y);
\fi
}
\iflinkpatternnumbered%
\pgfmathparse{\lpsize/\linkpatternfused}
\global\lpsize=\pgfmathresult
\def\linkpatternnumbering{1,...,\lpsize}
\newdimen\angle
\foreach\x/\xx/\opt in \linkpatternnumbering
{
  \pgfmathsetmacro{\angle}{360/\lpsize*(\x-1)}
\ifx\xx\opt%
  \node[outer sep=1pt,anchor=180+\angle] at (\angle:1) {$\scriptstyle\xx$}; % note the subtle anchoring: if we used for example "label", the anchoring would be restricted to the cardinal points i.e. north, north east, etc. instead we're using angle as anchor (documented in sec 39)
\else
  \node[outer sep=1pt,anchor=180+\angle,\opt] at (\angle:1) {$\scriptstyle\xx$}; % note the subtle anchoring: if we used for example "label", the anchoring would be restricted to the cardinal points i.e. north, north east, etc. instead we're using angle as anchor (documented in sec 39)
\fi
}
\fi%
\iflinkpatterninverted%
\end{scope}
\fi%
\iflinkpatterntikzstarted\else%
\end{tikzpicture}%
\fi%
}}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% loop configuration macros
\newdimen{\loopcellsize}\setlength{\loopcellsize}{0.75cm}
\tikzset{bgplaq/.style={draw=black,fill=\linkpatternboxcolor}}
%
\def\plaqwest{}
\def\plaqeast{}
\def\plaqnorth{}
\def\plaqsouth{}
%
%pieces first 
\def\plaqa{
\draw[/linkpattern/edge,\plaqwest,\plaqnorth] (0,0.5) .. controls (0,0.2) and (-0.2,0) .. (-0.5,0);
\draw[/linkpattern/edge,\plaqeast,\plaqsouth] (0,-0.5) .. controls (0,-0.2) and (0.2,0) .. (0.5,0);
}
\def\plaqb{
\draw[/linkpattern/edge,\plaqwest,\plaqsouth] (0,-0.5) .. controls (0,-0.2) and (-0.2,0) .. (-0.5,0);
\draw[/linkpattern/edge,\plaqeast,\plaqnorth] (0,0.5) .. controls (0,0.2) and (0.2,0) .. (0.5,0);
}
\def\plaqc{
\draw[/linkpattern/edge,\plaqsouth,\plaqnorth] (0,0.5) -- (0,-0.5);
\draw[/linkpattern/edge,\plaqwest,\plaqeast] (0.5,0) -- (-0.5,0);
}
%
\pgfkeys{/linkpattern/.cd,west/.store in=\plaqwest,east/.store in=\plaqeast,north/.store in=\plaqnorth,south/.store in=\plaqsouth}
\def\plaqname{plaq}%default name
\newcommand\plaq[2][]{
\node[bgplaq,rectangle,draw,use as bounding box,minimum size=\loopcellsize,transform shape] (\plaqname) {};
\pgfkeys{/linkpattern/.cd,#1}%parse the list of optional arguments
\ifx#2\empty\else
\begin{scope}[x=\loopcellsize,y=\loopcellsize]
\csname plaq#2\endcsname
\end{scope}\fi
}
%
\newcommand\halfplaq[1][]{
\node[draw=none,fill=none,rectangle,use as bounding box,minimum size=\loopcellsize,transform shape] (\plaqname) {};
\pgfkeys{/linkpattern/.cd,#1}%parse the list of optional arguments
\begin{scope}[x=\loopcellsize,y=\loopcellsize]
\draw[bgplaq] (-0.5,-0.5) -- ++(1,1) -- ++(-1,0) -- cycle;
\draw[/linkpattern/edge,\plaqwest,\plaqnorth] (0,0.5) .. controls (0,0.2) and (-0.2,0) .. (-0.5,0);
\end{scope}
}
%
\tikzset{loop/.code={\def\plaqname{loop-\the\pgfmatrixcurrentrow-\the\pgfmatrixcurrentcolumn}},loop/.append style={matrix,row sep={\loopcellsize,between origins},column sep={\loopcellsize,between origins}}}%note: define loop-row-col as name for each elementary plaquette
puzzles.tex
\documentclass[12pt,a4paper]{amsart}
\usepackage{amssymb,stmaryrd,blkarray}
\usepackage[a4paper,left=2.25cm,right=2.25cm,top=3cm,bottom=3cm,headsep=1cm]{geometry}
\usepackage{euler} \renewcommand{\familydefault}{ppl}
\setlength{\parskip}{1pt}
%tikz stuff
\usepackage{tikz}\usetikzlibrary{graphs,quotes,fit,positioning,matrix,calc,decorations.markings,angles,decorations.pathmorphing,decorations.pathreplacing}%,matrix,fit,shapes.geometric}
\newcommand\horiz{\tikz{\draw[thick] (0,0) -- (1,0); }}
\newcommand\NW{\tikz{\draw[thick] (0,0) -- (120:1); }}
\newcommand\NE{\tikz{\draw[thick] (0,0) -- (240:1); }}
%
\tikzset{mynode/.style={circle,draw=black,fill=black,inner sep=1.8pt,outer sep=0pt}}
\tikzset{edgelabel/.style={\mcol,inner sep=0pt}}
\tikzset{invlabel/.style={draw=black,text=black,circle,inner sep=0pt,minimum size=3mm}}
%this is a useful command: only start tikz if not only started
\newcommand\tikzif[2][]{
%\tikzifinpicture{\begin{scope}[#1]#2\end{scope}}{\begin{tikzpicture}[#1]#2\end{tikzpicture}}  
\tikzifinpicture{#2}{\begin{tikzpicture}[#1]#2\end{tikzpicture}}% don't process options if not
}
% useful macros
\tikzset{math mode/.style = {execute at begin node=$, execute at end node=$}}%makes all nodes math mode
%
\def\dr{red!80!black} % \def\dr{red!50!black}
\def\dg{green!80!black} % \def\dg{green!50!black}
\def\db{blue!80!black} % \def\db{blue!80!black}
%\tikzset{d/.style={line width = .5}} 
\tikzset{d/.style={ultra thick}}
\tikzset{dr/.style={draw=\dr,d}}
\tikzset{dg/.style={draw=\dg,d}}
\tikzset{db/.style={draw=\db,d}} 
% label style
\def\mcol{black}
\def\m#1{{\color{\mcol}#1}}
% root style
\tikzset{rt/.style={text=blue,execute at begin node=$\sf,execute at end node=$}}
\def\rt#1{{\color{blue}\mathsf{#1}}}
%
\input linkpattern.tex
%
\newlength\myshift
\newcommand\getshift{%
%\pgfgettransformentries{\mya}{\myb}{\myc}{\myd}{\mys}{\myt}%
% coordinate (x,y) is transformed to (ax + by + s, cx + dy + t)  
\pgfmathsetlength{\myshift}{0.8mm}
%\pgfmathsetlength{\myshift}{min(\mya*1.25mm,2mm)}
}
\newcommand\rh[5][]{
\tikzif[baseline=0,scale=1.25]{
\getshift
\draw[thick,black] (0,0) coordinate (ad) -- node[edgelabel,left,xshift=\myshift] {$#2$} ++(-60:1) coordinate (ba) -- node[edgelabel,right,xshift=-\myshift] {$#3$} ++(60:1) coordinate (cb) -- node[edgelabel,right,xshift=-\myshift] {$#4$} ++(120:1) coordinate (dc) -- node[edgelabel,left,xshift=\myshift] {$#5$} cycle;
\ifx\&#1\&\else\node[invlabel] at (0.5,0) {$\ss#1$};\fi
}}
\newcommand\eqrh[2]{\rh[-1]{#1}{#2}{#1}{#2}}
\newcommand\uptri[4][]{
\tikzif[baseline=-2mm,scale=1.25]{
\getshift
\draw[thick,black] (-0.5,-0.433013) -- node[edgelabel] (horiz) {$#3$} ++(0:1) -- node[edgelabel,right,xshift=-\myshift] (NE) {$#4$} ++(120:1) -- node[edgelabel,left,xshift=\myshift] (NW) {$#2$} ++(240:1);
\ifx\&#1\&\else\node[invlabel] at (0,-0.1) {$\ss#1$};\fi
}}
\newcommand\downtri[4][]{
\tikzif[baseline=0,scale=1.25]{
\getshift
\begin{scope}[scale=-1]
\draw[thick,black] (-0.5,-0.433013) -- node[edgelabel] (horiz) {$#3$} ++(0:1) -- node[edgelabel,left,xshift=\myshift] (NE) {$#4$} ++(120:1) -- node[edgelabel,right,xshift=-\myshift] (NW) {$#2$} ++(240:1);
\ifx\&#1\&\else\node[invlabel] at (0,-0.1) {$\ss#1$};\fi
\end{scope}
}}
%
\usepackage{hyperref}
%\usepackage{showlabels}
%
\setlength{\multlinegap}{0pt}
\allowdisplaybreaks[1]
%
\renewcommand\ss{\scriptstyle}
\newcommand\sss{\scriptscriptstyle}
%
\newcommand\agemo{\!\!\tikz[baseline=-1mm]{\node[rotate=180]{$\omega$}}\!\!}
%
\DeclareMathOperator{\codim}{codim}
\DeclareMathOperator{\Ker}{Ker}
\let\Im\relax\DeclareMathOperator{\Im}{Im}
\newcommand\ZZ{{\mathbb Z}}
\newcommand\QQ{{\mathbb Q}}
\newcommand\CC{{\mathbb C}}
\newcommand\PP{{\mathbb P}}
\newcommand\RR{{\mathbb R}}
%
\theoremstyle{plain}
\newtheorem{thm}{Theorem}
\newtheorem{conj}{Conjecture}
\newtheorem{prop}{Proposition}
\newtheorem{lem}{Lemma}
\newtheorem{cor}{Corollary}
\newtheorem{pty}{Property}
\theoremstyle{remark}
\newtheorem*{rmk*}{Remark}
\newtheorem*{ex*}{Example}
%
%
\title[Schubert puzzles and integrability I]{Schubert puzzles and integrability I: \\ invariant trilinear forms}
\author{Allen Knutson}
\address{Allen Knutson, Cornell University, Ithaca, New York}
\email{allenk@math.cornell.edu}
\author{Paul Zinn-Justin}
\address{Paul Zinn-Justin, School of Mathematics and Statistics, The University of Melbourne, 
Parkville, Victoria 3010, Australia}
\email{pzinn@unimelb.edu.au}
\thanks{PZJ was supported by ARC grant FT150100232.
  %Computerized checks of the results of this paper were performed
  %with the help of Macaulay 2 \cite{M2}.
}
\date{\today}

\long\def\rem#1{{\color{red!30!purple!70!black}{\bf [#1]}}}
%\long\def\rem#1{}
\long\def\junk#1{}
%
\begin{document}

\begin{abstract}
  The {\em puzzle rules}\/ for computing Schubert calculus
  on $d$-step flag manifolds, proven in \cite{KT} for 
  $1$-step, in \cite{BKPT} for $2$-step, and 
  conjectured in \cite{CV} for $3$-step, 
  lead to vector configurations (one vector for each puzzle edge label) 
  that we recognize as the weights of some minuscule representations.
  The $R$-matrices of those representations (which, for $2$-step flag
  manifolds, involve triality of $D_4$) degenerate to give us puzzle
  formul\ae\ for two previously unsolved Schubert calculus problems:
  $K_T(2$-step flag manifolds$)$ and $K(3$-step flag manifolds$)$.
%  while giving cleaner proofs of some known results. 
  The $K(3$-step
  flag manifolds$)$ formula, which involves 151 new puzzle pieces,
  implies Buch's correction to the first author's 1999 conjecture for
  $H^*(3$-step flag manifolds$)$. 
  \junk{We conclude with a (computer-based) proof that, under
  certain assumptions, there will be {\em no}\/ puzzle-based
  combinatorial formula for $H^*_T(3$-step$)$ nor for $H^*(4$-step$)$.}
\end{abstract}

\vspace*{-1cm}
\maketitle
\vspace*{-0.5cm}

\tableofcontents

\newcommand\defn[1]{{\bf #1}}
\newcommand\into\hookrightarrow
\newcommand\onto\twoheadrightarrow
\newcommand\otno\twoheadleftarrow
\newcommand\dom\backslash
\newcommand\tensor\otimes
\newcommand\iso\cong
\newcommand\lie[1]{{\mathfrak {#1}}}

\junk{For Allen to do:
  \begin{enumerate}
\junk{  \item \checkmark write up a proof of this single-number thing, for $d\leq 3$.
  \item \checkmark ? Try to process the monomial rule into something readable.
  \item \checkmark Discuss the $E_6$ rep, i.e. lemma~\ref{lem:greend3}.
  \item    \checkmark  Stop claiming manifest duality of $K_T(2$-step$)$
  \item    \checkmark Does the set of labels have a name?
  \item \checkmark Fix the unnumbered eq AFTER EQ \ref{eq:stdtri}!!!
  \item \checkmark? Clarify the example in 2.2 
  \item \checkmark rewrite theorem~\ref{thm:classif}
  \item \checkmark Fix citations (put them in biblio.bib)
  \item \checkmark Unify/standardize the numbering of Dynkin diagrams/irreps  
  \item \checkmark fix the factor of $2$ in $B$ compared to inversion number
\item \checkmark Have $A_d$ generated by $f_0,\ldots,f_d$
\item \checkmark Fix \S\ref{sec:finalproof}
\item \checkmark
  Fill in the part p27 about sum over reduced words after lemma
  \ref{lem:D4a}
\item \checkmark Define $B$ for general $d$
\item \checkmark fill the gaps in sect.~2.1, 2.2.
\item fix Theorem 4, or remove remark after it.
\item read the remaining comments and respond if necessary
}
\end{enumerate}
}

\section{Introduction}
In 1912 Weyl asked what the spectrum of a sum of two Hermitian
matrices could be, knowing the spectra of the matrices individually.
This received two solutions in the 1990s (we recommend the surveys
\cite{FultonSurvey,Zelevinsky}): a geometric one due to Klyachko (extending
work of Helmke--Rosenthal, Hersch--Zwahlen, and Totaro, among others) based on
Schubert calculus of Grassmannians, and a combinatorial one \cite{KTW}
in terms of certain triangular tilings called ``puzzles''. 
We take from this coincidence the oracular statement that 
{\em puzzles should be related to Schubert calculus;} hopefully not just for 
ordinary cohomology of Grassmannians, but also for more exotic cohomology
theories of \defn{$d$-step flag manifolds}
$\{V_1 \leq V_2 \leq \ldots \leq V_d \leq \CC^n:\ \dim V_i = n_i\}$.
Many Schubert calculus problems have been solved with puzzles,
some in no other ways; see \cite{KT, Vakil,
  BKPT, KPur, BuchHT, PY, artic67, artic68}.

\subsection{Puzzles for the $d=1$ case, of Grassmannians}
We will index the Schubert classes $\{S^\lambda\}$ on $P_- \dom GL_n(\CC)$ 
(precise definitions given in \S\ref{sec:gen}) by strings $\lambda$
in $0,1,\ldots,d$, where the number of $j$s in the string is
$n_{j+1}-n_j$ (by convention $n_0 = 0, n_{1+d} = n$).
In particular those on the Grassmannian $Gr_k(\CC^n)$ of $k$-planes have%
\footnote{%
  One can get away with the dual convention $k\leftrightarrow n-k$ when dealing
  with only Grassmannians, but this becomes untenable when going to higher $d$.}
content $0^k 1^{n-k}$. We define three \defn{edge labels} $L_1 := \{0,1,10\}$, 
and three \defn{puzzle pieces}:
\begin{equation}\label{eq:d1tri}
  \uptri{0}{0}{0} \qquad \uptri{1}{1}{1} \qquad \uptri{1}{10}{0} 
  \qquad\text{plus all rotations, but not reflections}   
\end{equation}
A \defn{Grassmannian puzzle of size $n$} is a size $n$ triangle (oriented like $\Delta$)
decomposed into $n^2$ puzzle pieces, whose boundary labels are only $0$ or $1$,
not $10$. For example, here are the two puzzles whose NW and NE boundaries 
are both labeled $0,1,0,1$:

\begin{center}\def\ss{}
\begin{tikzpicture}[math mode,nodes={\mcol},x={(-0.577cm,-1cm)},y={(0.577cm,-1cm)},scale=1.5]
\draw[thick] (0,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,0) -- node {\ss 10} ++(-1,1); 
\draw[thick] (0,1) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,1) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,2) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,2) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (0+1,2) -- node {\ss 0} ++(-1,1); 
\draw[thick] (0,3) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,3) -- node[pos=0.5] {\ss 10} ++(1,0); \draw[thick] (0+1,3) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,0) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,1) -- node[pos=0.5] {\ss 10} ++(0,1); \draw[thick] (1,1) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,1) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,2) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,2) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (1+1,2) -- node {\ss 1} ++(-1,1); 
\draw[thick] (2,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (2,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (2+1,0) -- node {\ss 10} ++(-1,1); 
\draw[thick] (2,1) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (2,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (2+1,1) -- node {\ss 1} ++(-1,1); 
\draw[thick] (3,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (3,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (3+1,0) -- node {\ss 0} ++(-1,1); 
\end{tikzpicture}
\qquad
\begin{tikzpicture}[math mode,nodes={\mcol},x={(-0.577cm,-1cm)},y={(0.577cm,-1cm)},scale=1.5]
\draw[thick] (0,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,0) -- node {\ss 10} ++(-1,1); 
\draw[thick] (0,1) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,1) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,2) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,2) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,2) -- node {\ss 10} ++(-1,1); 
\draw[thick] (0,3) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,3) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,3) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,0) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,1) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,1) -- node[pos=0.5] {\ss 10} ++(1,0); \draw[thick] (1+1,1) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,2) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,2) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,2) -- node {\ss 0} ++(-1,1); 
\draw[thick] (2,0) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (2,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (2+1,0) -- node {\ss 1} ++(-1,1); 
\draw[thick] (2,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (2,1) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (2+1,1) -- node {\ss 0} ++(-1,1); 
\draw[thick] (3,0) -- node[pos=0.5] {\ss 10} ++(0,1); \draw[thick] (3,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (3+1,0) -- node {\ss 1} ++(-1,1); 
\end{tikzpicture}
\end{center}

The connection to \defn{Schubert calculus}, the study of the
product of Schubert classes $\{S^\lambda\}$, is simple \cite{KTW}: 
\begin{equation}
  \label{eq:LR}
  % \int_{Gr_k(\CC^n)} 
  S^\lambda\, S^\mu \ =\  
  \sum_\nu \#\left(\text{puzzles labeled \tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\nu}{\mu}}
      left to right (not clockwise) }\right) \ S^\nu 
\end{equation}
In particular, the right-hand side would be nonsensical if $\lambda,\mu,\nu$ 
were strings with different content (numbers of $0$s and $1$s). 
Here is one proof that that can't happen:

\newcommand\vf{\vec f}

\begin{lem}\label{lem:greend1}
  To each edge of a $\Delta$ triangle in a puzzle $P$, we assign a
  $2$-dimensional vector, rotation-equivariantly:
%  \centerline{\includegraphics[height=1.5in]{d1vecs}}
\begin{center}
\begin{tikzpicture}[>=latex]
\draw[thick,->] (0,0) -- (90:1.5);
\draw[thick,->] (0,0) -- (210:1.5);
\draw[thick,->] (0,0) -- (-30:1.5);
\begin{scope}[shift={(0.75,1.5)}]\uptri{}{0}{}\end{scope}
\begin{scope}[shift={(2,1.5)}]   \uptri{1}{}{}\end{scope}
\begin{scope}[shift={(3.25,1.5)}]\uptri{}{}{10}\end{scope}
%
\begin{scope}[shift={(1.75,-0.75)}]\uptri{}{10}{}\end{scope}
\begin{scope}[shift={(3,-0.75)}]   \uptri{0}{}{}\end{scope}
\begin{scope}[shift={(4.25,-0.75)}]\uptri{}{}{1}\end{scope}
%
\begin{scope}[shift={(-1.75,-0.75)}]\uptri{}{1}{}\end{scope}
\begin{scope}[shift={(-3,-0.75)}]   \uptri{10}{}{}\end{scope}
\begin{scope}[shift={(-4.25,-0.75)}]\uptri{}{}{0}\end{scope}
\end{tikzpicture}
\end{center}
%\] \uptri{}{0}{} \mapsto up \qquad \uptri{}{1}{} \mapsto WSW \qquad   \uptri{}{10}{} \mapsto ESE \]
  Then every puzzle piece has vector sum $\vec 0$:
  \begin{center}
    \tikz[scale=1.8,>=latex]{
      \uptri{0}{0}{0}
      \draw[->] (horiz.center) -- ++(90:0.25);
      \draw[->] (NE.center) -- ++(210:0.25);
      \draw[->] (NW.center) -- ++(-30:0.25);
    }
    \qquad
    \tikz[scale=1.8,>=latex]{
      \uptri{1}{1}{1}
      \draw[->] (NW.center) -- ++(90:0.25);
      \draw[->] (horiz.center) -- ++(210:0.25);
      \draw[->] (NE.center) -- ++(-30:0.25);
    }
    \qquad
    \tikz[scale=1.8,>=latex]{
      \uptri{1}{10}{0}
      \draw[->] (NW.center) -- ++(90:0.25);
      \draw[->] (horiz.center) -- ++(-30:0.25);
      \draw[->] (NE.center) -- ++(210:0.25);
    }
    % \uptri{10}{10}{10}
  \end{center}
  To edges of $\nabla$ triangles, we assign the negatives of these
  vectors, obtaining a cancelation at each internal edge of $P$.

  Then by Green's theorem the boundary of $P$ has vector sum
  $\vec 0$, which forces the content (the numbers of $0$s and $1$s) on
  the three sides to be the same.
\end{lem}

The original result \cite{KTW} about ordinary cohomology of
Grassmannians has been generalized (for Grassmannians) to equivariant
cohomology \cite{KT,artic46}, to $K$-theory \cite{Vakil}, and recently to
equivariant $K$-theory \cite{PY,artic68}, in each case adding some pieces. 
Our methods in this paper are closest to those of \cite{artic68},
which recognizes the three vectors above as the
{\em weights\junk{We warn the reader that
    this leads to an unfortunate collision later:
    puzzle labels get weights in one weight lattice, 
    but puzzle pieces are also given weights, in a different weight lattice,
    for an entirely different reason.}
 of the standard representation} $V^{A_2}_{\omega_1}$ of $SL_3(\CC)$
and makes use of the corresponding $R$-matrix and the
Yang--Baxter equation it satisfies.
However, our proof in \S\ref{sec:proofs} is cleaner 
than that of \cite{artic68} even in the $d=1$ case,
through exploitation of the bootstrap equation of the relevant $R$-matrix.

There is another way to label the edges of a $\Delta$ and still
get vector sum $\vec 0$: $\uptri{10}{10}{10}$. 
\junk{
  If we take a puzzle piece and rotate the vectors {\em in place,} not
  rotating the triangle, we get
  \[ \uptri{1}{10}{0} \to \uptri{10}{0}{1} \to \uptri{0}{1}{10} \to 
  \uptri{1}{10}{0} \qquad \qquad
  \uptri{0}{0}{0} \to\uptri{1}{1}{1} \to\uptri{10}{10}{10} \to\uptri{0}{0}{0} 
  \]
  suggesting that a new $\uptri{10}{10}{10}$ piece has a role to play.
}
And indeed, if we add this piece {\em but only in the $\Delta$ orientation}%
\footnote{If one includes both orientations, the resulting product rule
  is again commutative associative. We will address this
  in a future publication \cite{SchubII}.}
we get a rule for the $K$-theory product, with respect to the
basis of structure sheaves of Schubert varieties \cite[theorem~4.6]{Vakil};
whereas if we add this piece {\em but only in the $\nabla$ orientation}
we get a rule for the $K$-theory product, with respect to the dual basis 
(the ideal sheaves of boundaries of Schubert varieties) \cite{artic68}.

To be precise, equation (\ref{eq:LR}) is modified in this $K$-theory
product, because each $K$-piece carries a \defn{fugacity}\footnote{%
  In prior publications it seemed natural to call this a ``weight'',
  but that might cause confusion with the ``weights'' we assign
  to edge labels, and ``fugacity'' is a standard term 
  in the physics literature for such local contributions.}
of $-1$,
and the \defn{fugacity of a puzzle} is defined as the product of the fugacities 
of its pieces. Then we sum the fugacities of the puzzles, 
rather than simply counting them. 
Luckily, in this formula all the puzzle fugacities contributing to a given
coefficient have the same sign so there is no cancelation.

An important difference between $K(Gr_k(\CC^n))$ and $H^*(Gr_k(\CC^n))$ 
is that the latter is a graded ring.
Equation (\ref{eq:LR}) for $H^*$ then implies that 
$\ell(\lambda)+\ell(\mu)=\ell(\nu)$, where 
\[
 \ell(\kappa) \  := \  \#\{i<j\ :\ \kappa_i > \kappa_j\} \  
= \frac{1}{2} \deg S^\kappa
\]
is the number of \defn{inversions} of the string $\kappa$.

In \S\ref{ssec:Bmatrix} we define the ``inversion number'' of a
path through a puzzle, and in particular, the inversion number 
of (a clockwise path around) a puzzle piece. If two paths $\gamma$,
$\gamma'$ through a puzzle have the same start and end points,
then the difference of their inversion numbers is proven in
\S\ref{ssec:Bmatrix} to be the sum of the inversion numbers of 
the pieces in between $\gamma$ and $\gamma'$.

It is straightforward to calculate the inversion numbers of puzzle pieces;
the ones in \eqref{eq:d1tri} have vanishing inversion number, whereas
the $K$-pieces have inversion number $1$.
We'll always draw our pieces with their inversion numbers in the center, e.g. 
$\uptri[1]{10}{10}{10}$, omitting it only when the inversion number is zero.

\subsection{Puzzles for $d=2$ flag manifolds}
In 1999 the first author trusted the oracle and looked for puzzles to
compute Schubert calculus of $2$-step flag manifolds, where the 
Schubert classes (hence the boundaries of the puzzles) are strings in $0,1,2$. 
Already with puzzles of edge-length $3$, 
one discovers the following eight labels $L_2$ and puzzle pieces:
\begin{equation}\label{eq:d2tri}
\uptri{0}{0}{0} \quad \uptri{1}{1}{1} \quad \uptri{2}{2}{2} 
\qquad \uptri{1}{10}{0} \quad \uptri{2}{20}{0} \quad \uptri{2}{21}{1} 
\qquad \uptri{21}{(21)0}{0} \quad \uptri{2}{2(10)}{10}
\end{equation}
(again permitting rotations but not reflections). 
We will call parenthesized expressions $X$ such as these
(really encoding planar binary trees with labeled leaves) \defn{multinumbers}, 
and call a multinumber $X$ \defn{valid} if it appears in a puzzle rule 
(i.e., on one of the puzzle piece edges here in \eqref{eq:d2tri}, 
or later in \S\ref{ssec:d3puz}).
Write $|X|$ for the number of digits in $X$ (i.e. $|X|=1$ exactly
for ``single-numbers''). 
Proving the analogue of equation (\ref{eq:LR}) for $d=2$,
% that these pieces suffice to compute $2$-step Schubert calculus, 
and its generalization to equivariant cohomology, 
took until 2014 \cite{BKPT,BuchHT}.

The $d=2$ analogue of lemma~\ref{lem:greend1} is an assignment with
values in $D_4$'s weight lattice of row vectors
$\{(a_1,a_2,a_3,a_4)\ :\ 2a_i\in \ZZ,\ a_i-a_j \in \ZZ\}$.  
We regard the $120^\circ$ rotation $\tau$ as acting on this lattice 
on the right by
\[
\tau = \frac{\ 1\ }{2} 
\begin{bmatrix} -&-&-&- \\ +&-&-&+ \\ +&+&-&- \\ +&-&+&- \end{bmatrix}
\]
and mention that the corresponding automorphism of the Lie algebra 
$D_4$ is outer, the triality automorphism.

\begin{lem}\label{lem:greend2}
  To each of the bottom labels $L_2$ in the puzzle pieces above, we assign a 
  weight in the $D_4$ weight lattice:
  \begin{align*}
    \m2&\mapsto(+,0,0,0)     &\m1&\mapsto(0,+,0,0)&\m0&\mapsto(0,0,+,0)&\m{10}&\mapsto(0,0,0,+)\\
    \m{(21)0}&\mapsto(-,0,0,0)&\m{20}&\mapsto(0,-,0,0)&\m{2(10)}&\mapsto(0,0,-,0)&\m{2 1}&\mapsto(0,0,0,-)
  \end{align*}
  and assign $D_4$ weights to labels on other sides in a
  rotation-equivariant way, using the $4\times 4$ matrix above.

  Then every puzzle piece has vector sum $\vec 0$. By Green's theorem
  the boundary of the whole puzzle does too, which forces the content 
  (the numbers of $0$s, $1$s, and $2$s) on the three sides to be the same.
\end{lem}

These eight vectors are the weights of the standard representation 
$V^{D_4}_{\omega_1}$ of $\lie{so}(8)$, 
whose $\ZZ/3$ rotations are the two spin
representations $\tau\cdot V^{D_4}_{\omega_1} \iso V^{D_4}_{\omega_2}$ and
$\tau^2\cdot V^{D_4}_{\omega_1} \iso V^{D_4}_{\omega_3}$.

At this point, the assignments in lemmas~\ref{lem:greend1} and
\ref{lem:greend2} may look quite magical.  In \S\ref{sec:gen} we will
explain a recipe that produces them without effort, at least up to $d\leq 4$.

With the clue provided by lemma~\ref{lem:greend2}, the methods of \cite{artic68}
generalize straightforwardly to give our first major theorem of this paper.
To state it, we first recall

\begin{thm}\label{thm:HTd2}\cite{BuchHT}\cite[for $d=1$]{KT}\label{thm:Buch}
  To compute Schubert calculus in $T$-equivariant cohomology of a 
  $2$-step flag manifold, whose coefficients live in
  $H^*_T(pt) := \ZZ[y_1,\ldots,y_n]$,
  one needs the following \defn{equivariant rhombi}:
  \[
\eqrh{1}{0}\quad\eqrh{2}{0}\quad\eqrh{2}{1}\quad\eqrh{21}{0}\quad
  \eqrh{2}{10}\quad\eqrh{21}{10}\quad\eqrh{2(10)}{0}\quad\eqrh{2}{(21)0}
\]
  These may not be rotated. The \defn{fugacity of an equivariant rhombus}
  is $y_i-y_j \in H^*_T(pt)$, where lines drawn Southwest and Southeast
  from the rhombus hit the bottom edge at positions $i<j$.
  The \defn{fugacity $fug(P)$ of a puzzle $P$} 
  is the product of the fugacities of its rhombi. Then
  \begin{equation}
    \label{eq:LRT}
    % \int_{Gr_k(\CC^n)} 
    S^\lambda\, S^\mu \ =\  
    \sum_\nu \left( \sum \Bigg\{fug(P)\ :
      \ \text{puzzles $P$ with boundary }\tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\nu}{\mu}}\Bigg\} \right)
    \ S^\nu 
  \end{equation}
\end{thm}

The ${\ss -1}$s in these pieces are to indicate that they, too, spoil 
lemma~\ref{lem:sympd1}'s inversion count, 
but in the opposite way from $K$-theory; more detail 
will come in \S\ref{ssec:Bmatrix}.
This formula~\eqref{eq:LRT} is positive in the sense of \cite{Graham}.

We come to our first major new result of the paper, the
extension of the above to $T$-equivariant $K$-theory,
for which there was no known positive formula (in the
sense of \cite{AGM}) or even extant conjecture
for the structure constants.
These live in 
$K_T(pt)\cong \ZZ[u_1^{\pm},\ldots,u_n^{\pm}]$.
%which we will coordinatize as $\ZZ[\exp(\pm y_1),\ldots,\exp(\pm y_n)]$
%for best comparison to $H_T^*(pt)$. 

\begin{thm}\label{thm:KTd2}
  Equation \eqref{eq:LRT} generalizes
  to compute Schubert calculus in equivariant $K$-theory of a 
  $2$-step flag manifold. One needs the equivariant rhombi
  from theorem~\ref{thm:Buch}, whose fugacities are now $1-u_j/u_i$,
  and also the following \defn{$K$-pieces}:
  \begin{gather*}
    \uptri[1]{10}{10}{10}\qquad\qquad \uptri[1]{20}{20}{20}\qquad\qquad \uptri[1]{21}{21}{21}
    \\
    \uptri[1]{2(10)}{20}{21}\quad 
    \uptri[1]{21}{2(10)}{20}\quad \uptri[1]{20}{21}{2(10)}
    \\
    \uptri[1]{(21)0}{10}{20}\quad     \downtri[1]{20}{(21)0}{10}\quad
        \uptri[1]{10}{20}{(21)0}
    \qquad    \qquad
    \downtri[1]{1}{2(10)}{(21)0}\quad \uptri[1]{(21)0}{1}{2(10)}\quad
    \downtri[1]{2(10)}{(21)0}{1}
    \\
    \downtri[2]{(21)0}{(21)0}{(21)0}
  \end{gather*}
  (no other rotations!) each with fugacity $-1$, or $(-1)^2$ for the last one.

  \junk{below needs more gluing, e.g. discussion of vertical rhombi...  
    Both usual rhombi and $K$-rhombi also acquire an extra monomial fugacity
    (which does not factor as a product over triangles). The power of
    $u_j/u_i$ ($0$ or $1$) in the fugacity can be obtained by the
    following ad hoc rule:}
  Some vertical rhombi $\rh{X}{Y}{Z}{W}$
  also acquire an extra monomial fugacity $u_j/u_i$
  (which does not factor as a product over triangles):  
  a rhombus gets a $u_j/u_i$ if $|W|+|Z| > |X|+|Y|$, 
  or in the case $|W|+|Z| = |X|+|Y|$ and $\max(Z) > \max(Y)$.
\end{thm}

\junk{if the sum of lengths of top
  multi-numbers is greater than that of bottom multi-numbers -- in
  case of equality, if it satisfies $\max(\text{NE})>\max(\text{SE})$.}

In particular, rotation-invariant rhombi (such as equivariant rhombi)
get no $u_j/u_i$, and among a rhombus and its
$180^\circ$ rotation, assuming they're distinct and valid (i.e., not
involving unrotatable $K$-pieces), exactly one gets a $u_j/u_i$.

\begin{ex*}\def\ss{}
$c^{0102,0201}_{0210}$ is computed from one puzzle
\begin{center}
\begin{tikzpicture}[math mode,nodes={\mcol},x={(-0.577cm,-1cm)},y={(0.577cm,-1cm)},scale=1.5]
\draw[thick] (0,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,0) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (0+1,0) -- node {\ss 20} ++(-1,1); 
\draw[thick] (0,1) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (0,1) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (0+1,1) -- node {\ss 2} ++(-1,1); 
\draw[thick] (0,2) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,2) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (0+1,2) -- node {\ss 0} ++(-1,1); 
\draw[thick] (0,3) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,3) -- node[pos=0.5] {\ss 10} ++(1,0); \draw[thick] (0+1,3) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,0) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,1) -- node[pos=0.5] {\ss 20} ++(0,1); \draw[thick] (1,1) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,1) -- node {\ss 2} ++(-1,1); 
\draw[thick] (1,2) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,2) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (1+1,2) -- node {\ss 1} ++(-1,1); 
\draw[thick] (2,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (2,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (2+1,0) -- node {\ss 10} ++(-1,1); 
\draw[thick] (2,1) -- node[pos=0.5] {\ss 21} ++(0,1); \draw[thick] (2,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (2+1,1) -- node {\ss 2} ++(-1,1); 
\draw[thick] (3,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (3,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (3+1,0) -- node {\ss 0} ++(-1,1); 
\end{tikzpicture}
\end{center}
whose fugacity is $u_3/u_2$, whereas the opposite multiplication
$c^{0201,0102}_{0210}$ comes from two puzzles
\begin{center}
\begin{tikzpicture}[math mode,nodes={\mcol},x={(-0.577cm,-1cm)},y={(0.577cm,-1cm)},scale=1.5]
\draw[thick] (0,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,0) -- node {\ss 10} ++(-1,1); 
\draw[thick] (0,1) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,1) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,2) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,2) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (0+1,2) -- node {\ss 0} ++(-1,1); 
\draw[thick] (0,3) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (0,3) -- node[pos=0.5] {\ss 20} ++(1,0); \draw[thick] (0+1,3) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,0) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,1) -- node[pos=0.5] {\ss 10} ++(0,1); \draw[thick] (1,1) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,1) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,2) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (1,2) -- node[pos=0.5] {\ss 21} ++(1,0); \draw[thick] (1+1,2) -- node {\ss 1} ++(-1,1); 
\draw[thick] (2,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (2,0) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (2+1,0) -- node {\ss 20} ++(-1,1); 
\draw[thick] (2,1) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (2,1) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (2+1,1) -- node {\ss 2} ++(-1,1); 
\draw[thick] (3,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (3,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (3+1,0) -- node {\ss 0} ++(-1,1); 
\end{tikzpicture}
\qquad
\begin{tikzpicture}[math mode,nodes={\mcol},x={(-0.577cm,-1cm)},y={(0.577cm,-1cm)},scale=1.5]
\draw[thick] (0,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,0) -- node {\ss 10} ++(-1,1); 
\draw[thick] (0,1) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,1) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,2) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,2) -- node[pos=0.5] {\ss 21} ++(1,0); \draw[thick] (0+1,2) -- node {\ss (21)0} ++(-1,1); 
\node[invlabel,text=black] at (0+0.7,2+0.7) {\sss 1};
\draw[thick] (0,3) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (0,3) -- node[pos=0.5] {\ss 20} ++(1,0); \draw[thick] (0+1,3) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,0) -- node {\ss 0} ++(-1,1); 
\draw[thick] (1,1) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (1,1) -- node[pos=0.5] {\ss 0} ++(1,0); 
\node[invlabel,text=black] at (1+0.5,1+0.5) {\sss -1};
\draw[thick] (1,2) -- node[pos=0.5] {\ss 10} ++(0,1); \draw[thick] (1,2) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (1+1,2) -- node {\ss 1} ++(-1,1); 
\draw[thick] (2,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (2,0) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (2+1,0) -- node {\ss 20} ++(-1,1); 
\draw[thick] (2,1) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (2,1) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (2+1,1) -- node {\ss 2} ++(-1,1); 
\draw[thick] (3,0) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (3,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (3+1,0) -- node {\ss 0} ++(-1,1); 
\end{tikzpicture}
\end{center}
whose fugacities are $1$ and $(-1)(1-u_3/u_2)$, respectively.
\end{ex*}

Theorem~\ref{thm:HTd2} is recovered by writing $u_i=\exp(y_i)$ and
expanding at first nontrivial order in the $y_i$.  \junk{'sfine}

Define \defn{dual Schubert classes} $\{S_\lambda\}$ by 
$\left< S^\lambda S_\mu\right>=\delta^\lambda_\mu$,
where $\langle \rangle$ is the $K$-theoretic analogue of integration,
definable by $\langle S^\lambda \rangle = 1\ \forall \lambda$.
Then theorem~\ref{thm:KTd2} also provides a dual puzzle rule
\[
S_\lambda\, S_\mu \ =\  
    \sum_\nu \left( \sum \Bigg\{fug(P)\ :
      \ \text{puzzles $P$ with boundary }\tikz[scale=1.8,baseline=0mm]{\downtri{\lambda}{\nu}{\mu}}\Bigg\} \right)
    \ S_\nu 
\]
where boundary labels are again read left-to-right.

For future reference, we comment that the
tensor square of $V^{A_2}_{\omega_1} \iso \tau\cdot V^{A_2}_{\omega_1}$ is
\begin{align*}
(V^{A_2}_{\omega_1})^{\tensor 2} 
&\iso V^{A_2}_{2\omega_1} \oplus (V^{A_2}_{\omega_1})^*
\\
\intertext{and similarly, the tensor product of two of $D_4$'s minuscule 
fundamental irreps is}
V^{D_4}_{\omega_1} \tensor V^{D_4}_{\omega_2}
&\iso V^{D_4}_{\omega_1+\omega_2} \oplus (V^{D_4}_{\omega_3})^* 
&&\text{(though note, $(V^{D_4}_{\omega_3})^* \iso V^{D_4}_{\omega_3}$)}
\end{align*}
We get away with tensoring $V^{A_2}_{\omega_1}$ with ``itself'' because
the action of $\ZZ/3$ on the $A_2$ lattice is by an inner automorphism,
but with $D_4$ we must face up to the three different representations
associated with the three edge orientations.

Our rules for $K_T(Gr_k(\CC^n))$ and $H^*_T(2$-step$)$ have a 
duality symmetry: one may reflect a puzzle left-right while 
replacing each number $i$ with $d-i$. This $K_T(2$-step$)$ rule does not,
directly, enjoy this symmetry (even though the structure constants do); 
rather this gives us a second puzzle rule for $K_T(2$-step$)$. 
% But the two rules turn out to be related by 
% local moves, as we show in \S\ref{sec:d2}.

\subsection{Puzzles for $d=3$ flag manifolds}\label{ssec:d3puz}
The $d=3$ labels and pieces turn out to be (up to rotation)
\begin{gather}\notag
\uptri{i}{i}{i} \quad i=0,1,2,3 \qquad \uptri{j}{ji}{i} \quad 0\leq i<j \leq 3
\\\label{eq:d3tri}
\uptri{kj}{(kj)i}{i}\quad \uptri{k}{k(ji)}{ji} \qquad 0\leq i<j<k \leq 3 
\qquad\qquad \uptri{32}{(32)(10)}{10}
\\\notag
 \uptri{3(2(10))}{(3(2(10)))0}{0} \qquad
\uptri{3(21)}{(3(21))(10)}{10} \qquad
\uptri{32}{(32)((21)0)}{(21)0} \qquad
\uptri{3}{3(((32)1)0)}{((32)1)0}
\end{gather}
where the bottom four are Buch's correction \cite{CV} to the first author's
incomplete 1999 conjecture. 

\begin{lem}\label{lem:greend3}
  There is an action of $\ZZ/3$ on $E_6$'s weight lattice, 
  and a map from the $27$ edge labels above to the weights of the
  standard representation $V^{E_6}_{\omega_1}$ of $E_6$ 
  (then extended to other edge orientations $\ZZ/3$-equivariantly), 
  such that each puzzle piece has vector sum $\vec 0$.
  By Green's theorem
  the boundary of the whole puzzle does too, which forces the content 
  (the numbers of $0$s, $1$s, $2$s, and $3$s) on the three sides to be the same.
\end{lem}


Rather than writing out the vectors, we give the correspondence with 
the crystal of the $27$-dimensional representation, whose edges are labeled
by the simple roots of $E_6$:
\[
  \tikz[every label/.style={rt,above}]
  {\draw (0,0) node[mynode,label=c'] {} -- ++(1,0)
    node[mynode,label=a'] {} -- ++(1,0)
    node[mynode,label={[name=aa]above right:a}] (a) {} -- ++(1,0)
    node[mynode,label={[name=bb]b}] (b) {} -- ++(1,0)
    node[mynode,label={[name=cc]c}] (c) {}; \draw (2,0) --
    (2,1) node[mynode,label=b'] {};
%    \node[rectangle,draw=green!50!black,fit=(a) (b) (c) (aa) (bb) (cc)] {};
}
\]

\[
\tikz{\useasboundingbox (-7.5,-0.2) rectangle (7.5,4.7);
\node[rotate=45,scale=1.15]{%!!
\begin{tikzpicture}[>=latex,nodes={rotate=-45,font=\tiny,\mcol},on grid,math mode,every edge quotes/.style={rt,auto,pos=0.25}]%,transform canvas={rotate=45,scale=1.15}]
\coordinate (prev) at (0,0);
\foreach \pos/\name/\alt
in {right/3,right/2,right/1,right/0,right/10,right/32,
below/3(2(10))/3o2o10cc,left/2(10)/2o10c,left/21,below right/20,
right/3(21)/3o21c,right/3(20)/3o20c,below/3(10)/3o10c,
left/31,left/(21)0/o21c0,below/((32)1)0/oo32c1c0,right/(32)1/o32c1,
right/(32)(10)/o32co10c,right/(32)0/o32c0,above/30,right/3((21)0)/3oo21c0c,
below/(32)((21)0)/o32coo21c0c,below/(3(21))(10)/o3o21cco10c,
left/(31)0/o31c0,below right/(3(21))0/o3o21cc0,
below/(3(2(10)))0/o3o2o10ccc0,below/3(((32)1)0)/3ooo32c1c0c}
{ \node ({\alt}) [\pos=1.3cm and 1.3cm of prev,alias=prev] {\name}; }
\path[->] 
(3) edge["c"] (2)
(2) edge["b"] (1)
(1) edge["a"] (0)
(0) edge["a'"] (10) edge["b'"] (21)
(10) edge["c'"] (32) edge["b'"] (2o10c)
(32) edge["b'"] (3o2o10cc)
(21) edge["a'"] (2o10c)
(2o10c) edge["c'"] (3o2o10cc) edge["a"] (20)
(3o2o10cc) edge["a"] (3o21c)
(20) edge["c'"] (3o21c) edge["b"] (o21c0)
(3o21c) edge["a'"] (3o20c) edge["b"] (31)
(3o20c) edge["b"] (3o10c)
(o21c0) edge["c'"] (31) edge["c"] (oo32c1c0)
(31) edge["a'"] (3o10c) edge["c"] (o32c1)
(3o10c) edge["a"] (30) edge["c"] (o32co10c)
(30) edge["b'"] (3oo21c0c) edge["c"] (o32c0)
(3oo21c0c) edge["c"] (o32coo21c0c)
(oo32c1c0) edge["c'"] (o32c1)
(o32c1) edge["a'"] (o32co10c)
(o32co10c) edge["a"] (o32c0)
(o32c0) edge["b'"] (o32coo21c0c) edge["b"] (o31c0)
(o32coo21c0c) edge["b"] (o3o21cco10c)
(o31c0) edge["b'"] (o3o21cco10c)
(o3o21cco10c) edge["a"] (o3o21cc0)
(o3o21cc0) edge["a'"] (o3o2o10ccc0)
(o3o2o10ccc0) edge["c'"] (3ooo32c1c0c)
%1=c 2=b' 3=b 4=a 5=a' 6=c'
;
%\node [rotate=45,transform shape,rectangle,draw=green!50!black,fit=(3) (0)] {};
%\node [rotate=45,xscale=0.65,yscale=0.9,transform shape,rectangle,draw=green!50!black,fit=(3o2o10cc) (o32c1)] {};
\end{tikzpicture}
};
}
\]
In this case the techniques of \cite{artic68} do {\em not}\/ work right out of
the box; during the degeneration there is a divergence, due to
the proliferation of equivariant rhombi with negative inversion number.
It also seems related to the fact that
\[
 (V^{E_6}_{\omega_1})^{\tensor 2} \iso 
V^{E_6}_{2\omega_1} \oplus (V^{E_6}_{\omega_1})^* \oplus
%\text{another summand,} 
V^{E_6}_{\omega_3}
\]
has three summands (the Cartan product, the invariant trilinear form,
and another) unlike the $d=1,2$ cases that had only two summands.

We can partially rescue the argument, but at the cost of $T$-equivariance.
This gives our other main result:
\begin{thm}\label{thm:d3}
  Buch's correction holds: the puzzle pieces above (and their
  rotations) correctly compute Schubert calculus in the ordinary
  cohomology of $3$-step flag manifolds.

  One can also obtain formul\ae\ for Schubert calculus in 
  the $K$-theory of $3$-step flag manifolds, with respect to either
  the standard basis (of structure sheaves) or the dual basis 
  (of ideal sheaves of the boundaries). This requires another 151 pieces,
  which we list in appendix \ref{app:d3}.
\end{thm}

\begin{ex*}
$c^{103213,103213}_{323011}=4$ (in nonequivariant $K$-theory),
as counted by the following puzzles:
\begin{center}
\begin{tikzpicture}[math mode,nodes={\mcol},x={(-0.577cm,-1cm)},y={(0.577cm,-1cm)},scale=1.1]
\draw[thick] (0,0) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,0) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,0) -- node {\ss 31} ++(-1,1); 
\draw[thick] (0,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,1) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,1) -- node {\ss 30} ++(-1,1); 
\draw[thick] (0,2) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (0,2) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (0,3) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (0,3) -- node[pos=0.5] {\ss 21} ++(1,0); \draw[thick] (0+1,3) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,4) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,4) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,4) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,5) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (0,5) -- node[pos=0.5] {\ss 31} ++(1,0); \draw[thick] (0+1,5) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,0) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (1+1,0) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,1) -- node[pos=0.5] {\ss 21} ++(1,0); \draw[thick] (1+1,1) -- node {\ss (21)0} ++(-1,1); 
\draw[thick] (1,2) -- node[pos=0.5] {\ss 3(21)} ++(0,1); \draw[thick] (1,2) -- node[pos=0.5] {\ss 21} ++(1,0); \draw[thick] (1+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (1,3) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,3) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (1+1,3) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,4) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (1,4) -- node[pos=0.5] {\ss 31} ++(1,0); \draw[thick] (1+1,4) -- node {\ss 1} ++(-1,1); 
\draw[thick] (2,0) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (2,0) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (2+1,0) -- node {\ss 2} ++(-1,1); 
\draw[thick] (2,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (2,1) -- node[pos=0.5] {\ss 32} ++(1,0); \draw[thick] (2+1,1) -- node {\ss (32)0} ++(-1,1); 
\node[invlabel,text=black] at (2+0.7,1+0.7) {\sss 2};
\draw[thick] (2,2) -- node[pos=0.5] {\ss 31} ++(0,1); \draw[thick] (2,2) -- node[pos=0.4] {\ss\ \ (31)0} ++(1,0); \draw[thick] (2+1,2) -- node {\ss 0} ++(-1,1); 
\draw[thick] (2,3) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (2,3) -- node[pos=0.5] {\ss 30} ++(1,0); \draw[thick] (2+1,3) -- node {\ss 0} ++(-1,1); 
\draw[thick] (3,0) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (3,0) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (3+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (3,1) -- node[pos=0.6] {\ss (3(21))0\ } ++(0,1); \draw[thick] (3,1) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (3+1,1) -- node {\ss 3(21)} ++(-1,1); 
\draw[thick] (3,2) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (3,2) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (3+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (4,0) -- node[pos=0.5] {\ss 30} ++(0,1); \draw[thick] (4,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (4+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (4,1) -- node[pos=0.5] {\ss 21} ++(0,1); \draw[thick] (4,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (4+1,1) -- node {\ss 2} ++(-1,1); 
\draw[thick] (5,0) -- node[pos=0.5] {\ss 31} ++(0,1); \draw[thick] (5,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (5+1,0) -- node {\ss 3} ++(-1,1); 
\end{tikzpicture}
\quad
\begin{tikzpicture}[math mode,nodes={\mcol},x={(-0.577cm,-1cm)},y={(0.577cm,-1cm)},scale=1.1]
\draw[thick] (0,0) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,0) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,0) -- node {\ss 31} ++(-1,1); 
\draw[thick] (0,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,1) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,1) -- node {\ss 30} ++(-1,1); 
\draw[thick] (0,2) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (0,2) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (0,3) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (0,3) -- node[pos=0.5] {\ss 21} ++(1,0); \draw[thick] (0+1,3) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,4) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,4) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,4) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,5) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (0,5) -- node[pos=0.5] {\ss 31} ++(1,0); \draw[thick] (0+1,5) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,0) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (1+1,0) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,1) -- node[pos=0.5] {\ss 21} ++(1,0); \draw[thick] (1+1,1) -- node {\ss (21)0} ++(-1,1); 
\node[invlabel,text=black] at (1+0.7,1+0.7) {\sss 1};
\draw[thick] (1,2) -- node[pos=0.4] {\ss 3(21)} ++(0,1); \draw[thick] (1,2) -- node[pos=0.6] {\ss\ (3(21))(10)} ++(1,0); \draw[thick] (1+1,2) -- node {\ss 10} ++(-1,1); 
\draw[thick] (1,3) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,3) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (1+1,3) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,4) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (1,4) -- node[pos=0.5] {\ss 31} ++(1,0); \draw[thick] (1+1,4) -- node {\ss 1} ++(-1,1); 
\draw[thick] (2,0) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (2,0) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (2+1,0) -- node {\ss 2} ++(-1,1); 
\draw[thick] (2,1) -- node[pos=0.4] {\ss 31} ++(0,1); \draw[thick] (2,1) -- node[pos=0.5] {\ss 32} ++(1,0); \draw[thick] (2+1,1) -- node {\ss 3(21)} ++(-1,1); 
\node[invlabel,text=black] at (2+0.3,1+0.3) {\sss 1};
\draw[thick] (2,2) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (2,2) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (2+1,2) -- node {\ss 0} ++(-1,1); 
\draw[thick] (2,3) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (2,3) -- node[pos=0.5] {\ss 30} ++(1,0); \draw[thick] (2+1,3) -- node {\ss 0} ++(-1,1); 
\draw[thick] (3,0) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (3,0) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (3+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (3,1) -- node[pos=0.5] {\ss (3(21))0} ++(0,1); \draw[thick] (3,1) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (3+1,1) -- node {\ss 3(21)} ++(-1,1); 
\draw[thick] (3,2) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (3,2) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (3+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (4,0) -- node[pos=0.5] {\ss 30} ++(0,1); \draw[thick] (4,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (4+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (4,1) -- node[pos=0.5] {\ss 21} ++(0,1); \draw[thick] (4,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (4+1,1) -- node {\ss 2} ++(-1,1); 
\draw[thick] (5,0) -- node[pos=0.5] {\ss 31} ++(0,1); \draw[thick] (5,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (5+1,0) -- node {\ss 3} ++(-1,1); 
\end{tikzpicture}
\quad
\begin{tikzpicture}[math mode,nodes={\mcol},x={(-0.577cm,-1cm)},y={(0.577cm,-1cm)},scale=1.1]
\draw[thick] (0,0) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,0) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,0) -- node {\ss 31} ++(-1,1); 
\draw[thick] (0,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,1) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,1) -- node {\ss 30} ++(-1,1); 
\draw[thick] (0,2) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (0,2) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (0,3) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (0,3) -- node[pos=0.5] {\ss 21} ++(1,0); \draw[thick] (0+1,3) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,4) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,4) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,4) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,5) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (0,5) -- node[pos=0.5] {\ss 31} ++(1,0); \draw[thick] (0+1,5) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,0) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (1+1,0) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,1) -- node[pos=0.5] {\ss (32)1} ++(1,0); \draw[thick] (1+1,1) -- node {\ss ((32)1)0} ++(-1,1); 
\draw[thick] (1,2) -- node[pos=0.5] {\ss\ 3(21)} ++(0,1); \draw[thick] (1,2) -- node[pos=0.5] {\ss (32)1\ \ } ++(1,0); \draw[thick] (1+1,2) -- node {\ss 2} ++(-1,1); 
\node[invlabel,text=black] at (1+0.3,2+0.3) {\sss 1};
\draw[thick] (1,3) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,3) -- node[pos=0.5] {\ss 32} ++(1,0); \draw[thick] (1+1,3) -- node {\ss (32)1} ++(-1,1); 
\node[invlabel,text=black] at (1+0.7,3+0.7) {\sss 1};
\draw[thick] (1,4) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (1,4) -- node[pos=0.5] {\ss 31} ++(1,0); \draw[thick] (1+1,4) -- node {\ss 1} ++(-1,1); 
\draw[thick] (2,0) -- node[pos=0.5] {\ss 32} ++(0,1); \draw[thick] (2,0) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (2+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (2,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (2,1) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (2+1,1) -- node {\ss 30} ++(-1,1); 
\draw[thick] (2,2) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (2,2) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (2+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (2,3) -- node[pos=0.5] {\ss 21} ++(0,1); \draw[thick] (2,3) -- node[pos=0.6] {\ss (21)0} ++(1,0); \draw[thick] (2+1,3) -- node {\ss 0} ++(-1,1); 
\draw[thick] (3,0) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (3,0) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (3+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (3,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (3,1) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (3+1,1) -- node {\ss 0} ++(-1,1); 
\draw[thick] (3,2) -- node[pos=0.4] {\ss 3((21)0)} ++(0,1); \draw[thick] (3,2) -- node[pos=0.6] {\ss (21)0} ++(1,0); \draw[thick] (3+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (4,0) -- node[pos=0.5] {\ss 30} ++(0,1); \draw[thick] (4,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (4+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (4,1) -- node[pos=0.5] {\ss 21} ++(0,1); \draw[thick] (4,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (4+1,1) -- node {\ss 2} ++(-1,1); 
\draw[thick] (5,0) -- node[pos=0.5] {\ss 31} ++(0,1); \draw[thick] (5,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (5+1,0) -- node {\ss 3} ++(-1,1); 
\end{tikzpicture}
\quad
\begin{tikzpicture}[math mode,nodes={\mcol},x={(-0.577cm,-1cm)},y={(0.577cm,-1cm)},scale=1.1]
\draw[thick] (0,0) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,0) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,0) -- node {\ss 31} ++(-1,1); 
\draw[thick] (0,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (0,1) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,1) -- node {\ss 30} ++(-1,1); 
\draw[thick] (0,2) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (0,2) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (0+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (0,3) -- node[pos=0.5] {\ss 2} ++(0,1); \draw[thick] (0,3) -- node[pos=0.5] {\ss 21} ++(1,0); \draw[thick] (0+1,3) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,4) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (0,4) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (0+1,4) -- node {\ss 1} ++(-1,1); 
\draw[thick] (0,5) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (0,5) -- node[pos=0.5] {\ss 31} ++(1,0); \draw[thick] (0+1,5) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,0) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (1+1,0) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,1) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (1,1) -- node[pos=0.5] {\ss (32)1} ++(1,0); \draw[thick] (1+1,1) -- node {\ss ((32)1)0} ++(-1,1); 
\node[invlabel,text=black] at (1+0.7,1+0.7) {\sss 2};
\draw[thick] (1,2) -- node[pos=0.4] {\ss 3(21)} ++(0,1); \draw[thick] (1,2) -- node[pos=0.6] {\ss\ (3(21))(10)} ++(1,0); \draw[thick] (1+1,2) -- node {\ss 10} ++(-1,1); 
\draw[thick] (1,3) -- node[pos=0.5] {\ss 1} ++(0,1); \draw[thick] (1,3) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (1+1,3) -- node {\ss 1} ++(-1,1); 
\draw[thick] (1,4) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (1,4) -- node[pos=0.5] {\ss 31} ++(1,0); \draw[thick] (1+1,4) -- node {\ss 1} ++(-1,1); 
\draw[thick] (2,0) -- node[pos=0.5] {\ss 32} ++(0,1); \draw[thick] (2,0) -- node[pos=0.5] {\ss 2} ++(1,0); \draw[thick] (2+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (2,1) -- node[pos=0.4] {\ss 21} ++(0,1); \draw[thick] (2,1) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (2+1,1) -- node {\ss 3(21)} ++(-1,1); 
\draw[thick] (2,2) -- node[pos=0.5] {\ss 0} ++(0,1); \draw[thick] (2,2) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (2+1,2) -- node {\ss 0} ++(-1,1); 
\draw[thick] (2,3) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (2,3) -- node[pos=0.5] {\ss 30} ++(1,0); \draw[thick] (2+1,3) -- node {\ss 0} ++(-1,1); 
\draw[thick] (3,0) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (3,0) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (3+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (3,1) -- node[pos=0.5] {\ss (3(21))0} ++(0,1); \draw[thick] (3,1) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (3+1,1) -- node {\ss 3(21)} ++(-1,1); 
\draw[thick] (3,2) -- node[pos=0.5] {\ss 3} ++(0,1); \draw[thick] (3,2) -- node[pos=0.5] {\ss 3} ++(1,0); \draw[thick] (3+1,2) -- node {\ss 3} ++(-1,1); 
\draw[thick] (4,0) -- node[pos=0.5] {\ss 30} ++(0,1); \draw[thick] (4,0) -- node[pos=0.5] {\ss 0} ++(1,0); \draw[thick] (4+1,0) -- node {\ss 3} ++(-1,1); 
\draw[thick] (4,1) -- node[pos=0.5] {\ss 21} ++(0,1); \draw[thick] (4,1) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (4+1,1) -- node {\ss 2} ++(-1,1); 
\draw[thick] (5,0) -- node[pos=0.5] {\ss 31} ++(0,1); \draw[thick] (5,0) -- node[pos=0.5] {\ss 1} ++(1,0); \draw[thick] (5+1,0) -- node {\ss 3} ++(-1,1); 
\end{tikzpicture}
\end{center}
\end{ex*}

\junk{recycle the first part of sect 4 here?}The situation is even worse for $d=4$, in the sense that even nonequivariant
triangles with negative inversion number proliferate, 
leading to more divergences. We shall not formulate any puzzle rule
for $d\ge 4$ in the present paper.

In all three cases $d=1,2,3$, 
as observed above, there exists a trilinear invariant form
acting on a tensor product of three minuscule representations of $A_2,D_4,E_6$, 
related by an automorphism of order $3$ 
(whose action on the weight lattice is given
by $\tau$). In fact, we shall see that the nonequivariant 
puzzle rules are nothing but a diagrammatic description of 
(a degenerate, and in $K$-theory, $q$-deformed, version of) 
this trilinear invariant form.



\subsection{Plan of the paper}
In \S\ref{sec:gen}, after providing basic definitions (\S\ref{ssec:schub}),
we lay out the general construction of the
vectors $\vec f_X$ we assign to multinumbers $X$
(\S\ref{ssec:X}), from which we derive
the $A_2,D_4,E_6$ representations above (\S\ref{ssec:weight}).
We also explain the counting of inversions (\S\ref{ssec:Bmatrix}). 
\S\ref{sec:proofs} is concerned with the proofs of the main results:
first, a general framework is introduced, leading to our main theorem 
(\S\ref{ssec:mainthms}), which is then applied to $d=2$ equivariant Schubert
calculus in \S\ref{sec:d2}, and to $d=3$ nonequivariant Schubert calculus
in \S\ref{sec:d3}, thus proving
theorems~\ref{thm:KTd2} and \ref{thm:d3}. 
\junk{Finally, in \S\ref{sec:neg} we discuss the difficulties associated
with extending our method to higher $d$, and
prove, subject to certain assumptions,
%motivated in \S\ref{sec:gen}, 
that there are {\em no}\/ possible 
puzzle rules for $H^*_T(3$-step$)$ or $H^*(4$-step$)$.}

\subsection*{Acknowledgments} 
We are grateful to Sergey Fomin, Gleb Koshevoy, 
Bernard Leclerc, David E Speyer, Terry Tao, 
and Michael Wheeler for useful discussions,
and AK is especially grateful to Anders Buch for persevering
with $3$-step puzzles when AK had given up hope.

\section{The general construction}\label{sec:gen}
\subsection{Schubert classes}\label{ssec:schub}
Let $B_\pm \leq GL_n(\CC)$ denote the upper/lower triangular matrices,
with intersection $T$ the diagonal matrices,
and let $P_- \geq B_-$ be a standard parabolic with Levi factor
$\prod_{i=0}^d GL_{p_i}(\CC)$.  Our Schubert cycles 
$X^w := P_- \dom \overline{P_- w B_+}$
are right $B$-orbit closures
on $P_- \dom GL_n(\CC)$, indexed by $\prod_{i=0}^d \mathcal{S}_{p_i} \dom \mathcal{S}_n$,
which we identify with strings of length $n$ in an ordered alphabet
with multiplicities given by the $(p_i)$. 
The codimension of the cycle is given by the number of inversions in the string.
Schubert cycles define classes in cohomology, 
$T$-equivariant cohomology, $K$-theory, and $T$-equivariant $K$-theory.

In each case, these classes form a basis for whatever sort of 
cohomology group, considered as a module over the same cohomology of a point: 
$H(pt) \iso K(pt) \iso \ZZ$, $H_T(pt) \iso \ZZ[y_1,\ldots,y_n]$, 
$K_T(pt) \iso \ZZ[u_1^\pm,\ldots,u_n^\pm]$. Our goal is to compute 
as in \eqref{eq:LRT} the coefficients, living in this base ring, of
the expansion in the basis of the product of two basis elements.

One benefit of working equivariantly is that we can replace 
equation \eqref{eq:LRT} with its restriction to $T$-fixed points,
as this operation is well-known to be injective. The equation becomes
a {\em list} of equations between elements of the base ring $K_T$,
one for each $T$-fixed point $\sigma$:
\begin{equation}
  \label{eq:LRTrestricted}
  % \int_{Gr_k(\CC^n)} 
  S^\lambda|_\sigma\, S^\mu|_\sigma \ =\  
  \sum_\nu \left( \sum \Bigg\{fug(P)\ :
    \ \text{puzzles $P$ with boundary }\tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\nu}{\mu}}\Bigg\} \right)
  \ S^\nu|_\sigma
\end{equation}
These restrictions $S^\pi|_\sigma$ themselves have interpretations as state sums,
much like puzzles, and in \S \ref{ssec:mainthms} it is this equation
\eqref{eq:LRTrestricted}
we will find most amenable to the framework of quantum integrable systems.

\subsection{Functoriality}\label{ssec:funct}
If $Q_- \geq P_-$, then we have a projection
$P_-\dom GL_n(\CC) \onto Q_-\dom GL_n(\CC)$, and pullback maps
on these cohomology theories. Under these maps Schubert classes
go to Schubert classes (and products to products), taking
a string with content $(q_i)$ to the unique string with content $(p_i)$
that refines it and has the same number of inversions. For example,
\[
\begin{array}{rcl}
  \begin{array}{ccccc}   2&+&(3+2)&+&(1+3) \\   aa && fffgg && jkkk  \end{array}
 &\onto&
 \begin{array}{ccccc} 2&+&5&+&4   \\ aa && fffff && jjjj  \end{array}\\ 
 f\ j\ a\ k\ f\ a\ k\ f\ g\ k\ g&\mapsfrom&f\ j\ a\ j\ f\ a\ j\ f\ f\ j\ f
\end{array}
\]
where the top two rows indicate the coarsening ($Q_- \geq P_-$)
and the bottom row gives an example of a refinement.
This rule tells us what to do with the boundary labels on a $(Q_-)-$puzzle
to make them into the boundary of a $(P_-)-$puzzle computing the
same coefficient. So we can naturally hope that the refinement rule extends
to the interior of the puzzle as well, giving a correspondence on puzzles,
not just on their boundaries.

In this way, for each $d>1$ we get a lower bound on the set of
expected multinumber labels, derived from each $d'<d$. For example,
at $d=2$ we expect to see $10$, $20$, $21$ (in addition to 
the numbers $0,1,2$) derived from $d=1$, but the $2(10)$, $(21)0$
labels are new. At $d=3$ we expect to see $ji$ for $3\geq j>i\geq 0$
from $d=1$, and $k(ji)$, $(kj)i$ for $3\geq k>j>i\geq 0$ from $d=2$,
but e.g. the $(32)(10)$ label is new.

Each $T$-fixed point on $P_-\dom GL_n(\CC)$ is uniquely of the form
$P_-\dom P_- w$ for $w \in \prod_i \mathcal{S}_{p_i} \dom \mathcal{S}_n$;
for convenience we write this set $W_P\dom W$.
Let $\lambda$ be an element of $W_P\dom W$, and $\lambda'$ its image
in $W_Q\dom W$. Let $\mu \in W_Q\dom W$, and $\tilde\mu \in W_P\dom W$
its refinement as discussed above. (So $(\tilde\mu)' = \mu$,
but $\widetilde{(\lambda')}$ isn't necessarily $\lambda$.)
Then considering the functoriality of the composite
\[
pt \quad\mapsto\quad P_-\dom P_- \lambda \quad\mapsto\quad 
Q_-\dom Q_- \lambda'
\]
gets us a match on restrictions, $S^{\tilde\mu}|_\lambda = S^{\mu}|_{\lambda'}$.
In particular, if $\lambda_1,\lambda_2 \in W_P\dom W$ lie over the
same $\lambda' \in W_Q\dom W$, 
then $S^{\tilde\mu}|_{\lambda_1} = S^{\tilde\mu}|_{\lambda_2}$.

\junk{
  A consequence of this functoriality is that to prove our theorems
  for $d\leq 3$ it will suffice to prove them in the $d=3$ cases.}

\subsection{The vectors $\vf_X$}\label{ssec:X}
Fix $d$, the number of steps in the flag. 
At $d=1,2$ we learn there are two types of puzzle pieces,
up to rotation:
\begin{equation}\label{eq:stdtri}
\uptri{i}{i}{i} \quad i = 0,\ldots,d, \qquad\text{and}\qquad
\uptri{Y}{YX}{X} \quad \text{ for certain pairs of labels $X,Y$} 
\end{equation}
Let $\Lambda := A_2^*$ denote the $2$-dim weight lattice of $A_2$, 
on which $\tau$ acts by $120^\circ$ counterclockwise rotation. 
Let $\vf \in \Lambda$ denote the first fundamental weight,
so $\vf,\tau \vf$ are a basis and $\vf + \tau \vf + \tau^2 \vf = \vec 0$. 

Now we consider $(\vf_i,\tau \vf_i)_{i=0,\ldots,d}$ as 
a basis of $\Lambda^{1+d}$, and for $YX$ any multinumber
(not necessarily valid) we define
\[ 
\vf_{YX} := -\tau \vf_X - \tau^2 \vf_Y
\]
with the salutary effect that the vectors on the edges of a puzzle piece
$\uptri{Y}{YX}{X}$ add to $\vec 0$.
For $d=1,2,3,$ these vectors $\{\vf_X\ :\ X$ a valid multinumber$\}$
are {\em not} yet quite the ones we used
in lemmas~\ref{lem:greend1}, \ref{lem:greend2}, \ref{lem:greend3},
since they live in $2(1+d)$-dimensional space instead of $2d$-dimensional.
They are quite close to the ``auras'' used in \cite{BuchHT} for
similar Green's theorem bookkeeping, though he worked in 
$\CC^{1+d}$ and didn't worry about integrality.

\subsection{The Gram matrix}\label{ssec:Gram}
In order to make use of the $R$-matrices of irreps of the
quantized affine algebras, our weights $(\vf_X)$ will need 
to be the weights of a representation. In the simplest possible case,
the representation is \defn{minuscule}, meaning it has 
only extremal weights, which are therefore all of the same norm.
So we make the following guess:
\begin{quotation}
  There should be a $\tau$-invariant symmetric form on $\Lambda^{1+d}$ 
  with respect to which, for each valid multinumber $X$, 
  we have $\left|\vf_X\right|^2 = 2$.
\end{quotation}

In particular, on each individual $\Lambda$ the form is determined by
the above condition (as we will now recalculate), but the different
$\Lambda$ factors will {\em not} be orthogonal to one another.

\subsubsection{$d=0$} Here $|\vf_0|^2 = |\tau\vf_0|^2 = 2
= |\tau^2\vf_0|^2 = |-\vf-\tau\vf|^2 
= |\vf|^2 + 2\langle \vf,\tau \vf\rangle + |\tau\vf|^2
= 4 + 2\langle \vf,\tau \vf\rangle$. 
Hence the Gram matrix w.r.t. the ordered basis $(\vf_0,\tau \vf_0)$
is the $A_2$ Cartan matrix $\begin{bmatrix}  2&-1 \\ -1&2\end{bmatrix}$.

When we go to $d>0$, the $2\times 2$ blocks on the diagonal will
all look like this.

\subsubsection{$d=1$}
To begin with, the Gram matrix 
in the basis $\vf_0, \tau \vf_0, \vf_1, \tau \vf_1$ is
\[\begin{bmatrix}
 2&-1& &A&B \\ -1&2 & & C&D \\ \\ A&C& & 2&-1 \\ B&D&&-1&2
  \end{bmatrix}\]
Since $10$ is a valid multinumber, 
\[ 2 = |\vf_{10}|^2 
= \left|-\tau\vf_0-\tau^2\vf_1\right|^2
= \left|\vf_0 + \tau\vf_1\right|^2 = 2 + 2\langle \vf_0,\tau \vf_1\rangle + 2 \]
so as in $d=0$, we learn that a certain off-diagonal entry 
(in this case, $B$) is $-1$.

The required $\tau$-invariance gives us
\begin{align*}
   A = \langle \vf_0, \vf_1 \rangle&= \langle \tau\vf_0, \tau\vf_1 \rangle = D\\
   &= \langle \tau^2\vf_0, \tau^2\vf_1 \rangle  \\
   &= \langle -\vf_0-\tau\vf_0, -\vf_1-\tau\vf_1 \rangle 
   = \langle \vf_0+\tau\vf_0, \vf_1+\tau\vf_1 \rangle \\
   &= \langle \vf_0,\vf_1 \rangle + \langle \vf_0, \tau\vf_1\rangle
   + \langle \tau \vf_0,\vf_1 \rangle + \langle \tau\vf_0, \tau\vf_1\rangle \\
   &= A + B + C + D = 2A+C-1
\end{align*}
so $C = 1-A$.
The off-diagonal block begins to look like the diagonal: to emphasize
the similarity we will take $A = 2-a$, and obtain
\[
\begin{bmatrix} 
2&-1& &2-a&-1 \\ 
-1&2 & & a-1&2-a \\ \\ 
2-a& a-1& & 2&-1 \\
-1&2-a&&-1&2  
\end{bmatrix}
\]

When we go to $d>1$, the $2\times 2$ blocks above the diagonal will each 
have the same form as this off-diagonal upper block.

\subsubsection{$d=2$}
From the analysis above, and the valid multinumbers $10$, $20$, $21$,
we already know the Gram matrix looks like
\[
\begin{bmatrix}
  2&-1&& 2-a&-1&& 2-b&-1 \\
  -1&2&& a-1 &2-a&&  b-1&2-b \\ \\
 2-a&a-1&&  2&-1&&  2-c&-1 \\
 -1&2-a&& -1&2&&  c-1 &2-c \\ \\
 2-b&b-1&&  2-c&c-1&&  2&-1 \\
 -1&2-b&& -1&2-c&& -1&2
\end{bmatrix}
\]
Now we use
\[
\vf_{(21)0}
= -\tau^2\vf_{21}-\tau\vf_0
= -\tau^2(-\tau^2\vf_2-\tau\vf_1)-\tau\vf_0 
= \tau\vf_2 + \vf_1 -\tau\vf_0 
\]
so that
\begin{align*}
  |\vf_{(21)0}|^2 &= \left|\tau\vf_2 + \vf_1 -\tau\vf_0 \right|^2 \\
  &= |\vf_2|^2 + |\vf_1|^2 + |\vf_0|^2 +2\left(
      \langle \tau\vf_2,\vf_1 \rangle 
    + \langle \tau\vf_2,-\tau\vf_0 \rangle 
    + \langle \vf_1,-\tau\vf_0 \rangle \right) \\
  2 &= 6 + 2(-1 - (2-b) -(a-1)) = 2 + 2(b-a)
\end{align*}
to learn $a=b$. 
The validity of $2(10)$ gives us $b=c$ by a similar computation.
In short, the $2\times 2$ blocks above the diagonal are all equal;
the only freedom left is in the parameter $a$.

\subsubsection{$d\geq 3$}
The multinumbers derived using \S\ref{ssec:funct}'s functoriality
from $d\leq 2$ are already enough to tie down the matrix,
except for this single parameter $a$ in the off-diagonal blocks. 
For $d=3$ it remains to verify that
the other multinumbers $X$ from \S\ref{ssec:d3puz}
already have $|\vf_X|^2 = 2$, and indeed they do, putting no condition on $a$.

\setcounter{MaxMatrixCols}{20}

\subsection{Signature, and special values of the parameter $a$}
\label{ssec:signature}
This matrix $G_d$ is rank $2$ at $a=0$, i.e. its determinant is a multiple 
of $a^{2d}$. Mysteriously, this multiple seems to be periodic in $d$ 
of period $6$ for $d>0$, much as in \cite[example 1.6]{BarotGeissZelevinsky}.
The multiples (which are necessarily squares, since the $\tau$-invariance
leads to duplicity in the eigenvalues) are
\[
\begin{matrix}
  &d && 1 & 2 & 3 & 4 & 5 & 6 & \cdots \\
  &a^{-2d} \det G_d && (a-3)^2 & 3(a-2)^2 & (2a-3)^2 & 3(a-1)^2 & a^2 & 3a^2
  &\cdots \\ \\
  \text{so we define}& a_d &:=& 3 & 2 & 3/2 & 1 & 0 & 0 & \cdots 
\end{matrix}
\]
We checked this $6$-periodicity to $d=25$, but since we will soon restrict to
$d$ at most $4$, we didn't pursue it further.

For each $d>0$ to at least $25$ (and probably forever),
there is an interval $[0,a_d]$ of values of $a$ outside which 
$G_d$ is indefinite. 
For $d=1,2,3,4$, the matrix is positive definite for $a$ in 
the open interval $(0,a_d)$.
For $d=5,6$ there is no open interval, since $a_d = 0$. 
For $d=7$ (and $d\not\equiv 5,6 \bmod 6$, at least up to $25$)
there is again an interval, but $G_d$ is not definite in there.

\begin{prop}\label{prop:valid}
  For $d=1,2,3$, the only integer vectors in $\Lambda^{1+d}$ with norm-square $2$
  (independent of $a$!) are $\{\pm \tau^\bullet \vf_X$ 
  for valid multinumbers $X\}$, i.e. those associated to a label on
  a side of a $\Delta$ or $\nabla$. 
\end{prop}

We omit the proof as this is a quick computer search, 
since for $a \in (0,a_d)$, the positive definiteness says we only have
to check the integral vectors inside a certain compact ball. 
For $d=4$ there are $240$ such vectors, arranged in the root system of
$E_8$, about which more in a moment.

Note that our previous definition of ``valid'' multinumber $X$ was
historical, based on whether $X$ had occurred in a proven
or conjectural puzzle rule. Now we can use proposition \ref{prop:valid}
to give an alternate definition: those $X$ such that $|\vf_X|^2 = 2$.

\subsection{Deriving roots and weights from the Gram matrix}\label{ssec:weight}
Let $K_d$ be the kernel of the summation map $\Lambda^{1+d} \onto \Lambda$, 
with evident basis $(\alpha_i := \vf_{i-1} - \vf_{i},  \tau\alpha_i)_{i=1,\ldots,d}$.
The Gram matrix on $K_d$ with respect to this basis\footnote{%
  The basis $\left( (-1)^i \alpha_i, (-1)^i \tau^2\alpha_i\right)$
  makes the Gram matrix Toeplitz, but this basis seemed more natural.}
%  in particular the ordering of the simple roots discussed right after
%  the proposition doesn't match up if we introduce these signs.}
comes out to be the Northwest $2d\times 2d$ block of 
\[ a\text{ times }
\begin{bmatrix}
  2  &{-1}& & {-1}& & & & &   \\
  {-1}&  2& &1& {-1}& & & &  \\ \\
    {-1}& 1& &2& {-1}&& {-1}& & &   \\
    &   {-1}&& {-1} & 2& & 1& {-1}& &   \\ \\
  & & & {-1}& 1&& 2& {-1}& & {-1}&   \\
  & & & & {-1}&& {-1}& 2& & 1&  {-1} &\\ \\
  & & & & & & {-1}& 1&& 2&  {-1}& {\ddots}\\
  & & & & & & & {-1}&& {-1}&  2 & \ddots \\
  &&&&& & &&&\ddots &\ddots & \ddots
\end{bmatrix}
\]

\junk{
We will use a slightly different basis
$\left( (-1)^i \alpha_i, (-1)^i \tau^2\alpha_i\right)$
in order to have the best looking Gram matrix on $K_d$;
it comes out to be the Northwest $2d\times 2d$ block of the Toeplitz matrix
\[ a\text{ times }
\begin{bmatrix}
  2&{-1}& {1}& & & & &   \\
  {-1}& 2& -1& {1}& & & &  \\
  {1}& -1& 2& {-1}& {1}& & &   \\
  &   {1}& {-1}& 2& -1& {1}& &   \\
  & & {1}& -1& 2& {-1}& {1}&   \\
  & & & {1}& {-1}& 2& -1&  {1} &\\
  & & & & {1}& -1& 2&  {-1}& {\ddots}\\
  & & & & & {1}& {-1}&  2 & \ddots \\
  &&&&& & \ddots &\ddots & \ddots
\end{bmatrix}
\]
}

\begin{thm}\label{thm:classif}
  Consider the inner product $G$ from \S \ref{ssec:Gram} on $\Lambda^{1+4}$, 
  but set $a=1$ making it positive semidefinite. 
  Then the kernel $Rad(G|_{a=1})$ is generated by 
  $\vec\nu := \sum_{i=0}^4 (-\tau^2)^i \vf_i$ and $\tau \vec\nu$, and the 
  composite map $K_4 \into \Lambda^{1+4} \onto \Lambda^{1+4} / Rad(G|_{a=1})$
  is an isomorphism, making both lattices $E_8$.

  There is an ordered system of simple roots for this $E_8$ such that
  \begin{itemize}
  \item the first $2d$ of them generate $K_d \leq K_4$, for $d=1,2,3,4$; and
  \item the $(2d-1)$st root in the list is $\alpha_d := \vf_{d-1} - \vf_{d}$,
    and for $d\leq 3$, $\vf_d$ is the corresponding fundamental weight
    of $K_d$. 
  \end{itemize}
  Then 
  \begin{enumerate}
  \item From this simple system we see that the symmetric forms on
    $K_1,K_2,K_3,K_4$ 
    are ($a$ times) those on the root lattices $A_2,D_4,E_6,E_8$.  
    \footnote{%
      David Speyer points out that the corresponding cluster varieties
      are $Gr_3(\CC^n)$ for $n=5,6,7,8$; for $n>8$ these varieties are
      still cluster, but of infinite type \cite{JScott}.  This seems
      likely to be connected to the fact that these matrices are
      almost (and have the same determinants as) the crossing matrices
      of the standard projections of the torus knots $T(3,n)$
      \cite{oeis131027}, from whose projections are built these
      cluster varieties in \cite{ShendeTWZ}.  For another mysterious
      connection, note that the number of positive roots of
      $A_2,D_4,E_6,E_8$ is three times the number of indecomposable
      preprojective modules for the $A_1,A_2,A_3,A_4$ quivers
      \cite{GLSprep}, a bit of numerology that does not seem to have
      been observed before.  }
  \item\label{item:AdFace}
    The weights $\vf_0,\ldots,\vf_d$ are vertices of the 
    convex hull $\{\vf_X\ :\ X$ valid$\}$, and form one (simplicial) face
    of that polytope.
  \item For $d\leq 3$, the weights
    $\{\vf_X\ :\ X$ only uses numbers $i\leq d$ and is valid$\}$
    are those of the $K_d$ minuscule irrep with highest weight $\vf_d$.
  \item The weights 
    $\{\vf_X\ :\ X$ only uses numbers $i\leq 4$ and is derived
    from \S\ref{ssec:funct}'s functoriality$\}$ are
    {\em some of} those of the $K_4 \iso E_8$ adjoint representation.
%    with high weight $\vf_{4(3(2(10)))}$.
  \end{enumerate}
\end{thm}

\begin{proof}
  We first check that $K_4$'s symmetric form is ($a$ times) that of $E_8$.
  It is integral, unimodular ($\det = 1$), even (even-diagonal),
  positive definite, and dimension $8$; Witt proved in 1941 that
  the only such lattice is $E_8$ (our reference is \cite{SPLAG}). 
  The computation of the radical is straightforward.

  Here is a simple system satisfying the conditions, and its induced
  Dynkin diagram.\footnote{To check this, let the two matrices above be $G$ and $S$,
    and observe that $2-SGS_T$ is the adjacency matrix for the graph pictured.}
  \[
\begin{blockarray}{lrrrrrrrr}
 &  \alpha_1 &\tau \alpha_1 &   \alpha_2 &\tau \alpha_2 &
  \alpha_3 &\tau \alpha_3 &  \alpha_4 &\tau \alpha_4 \\
    \begin{block}{l(rrrrrrrr)}             
\rt{a} & 1& &&&&&&&&  \\
\rt{a'}&                -1& -1& &&&&&&  \\
\rt{b} & 0& 0 & 1 &&&&&& \\
\rt{b'}&                -1& 0& -1& -1  &&&&& \\
\rt{c} & 0& 0& 0& 0& 1 &&&& \\
\rt{c'}&                0& 1& -1& 0& -1& -1&&& \\
\rt{d} & 0& 0& 0& 0& 0& 0& 1 && \\
\rt{d'}&            0& 1& -1& 1& -2& 0& -2& -1& \\
   \end{block} 
  \end{blockarray}
\qquad
  \tikz[every label/.style={rt,above}] {\draw 
    (0,0)   node[mynode,label=c'] {} -- 
    ++(1,0) node[mynode,label=a'] {} --
    ++(1,0) node[mynode,label={[name=aa]above right:a}] {} --
    ++(1,0) node[mynode,label=b] {} -- 
    ++(1,0) node[mynode,label=c] {} -- 
    ++(1,0) node[mynode,label={[name=dd]d}] {} -- 
    ++(1,0) node[mynode,label=d'] {}; 
    \draw (2,0) -- 
    (2,1)   node[mynode,label=b'] {};}
  \]
Checking the first two conditions is straightforward from the Gram matrices.
  The third is much more tedious, and for $d=3$ results in the crystal 
  pictured after lemma \ref{lem:greend3}. 
  (Note that the crystal of a minuscule representation is particularly
  simple -- given two weights $\lambda$, $\lambda+\alpha$ where
  $\alpha$ is a simple root, there is a directed edge 
  $\lambda \to \lambda+\alpha$.)
  \junk{
    Within that crystal we find the
    $(a,a',b,b')$-subcrystal with high weight $\vf_2$, 
    and the $(a,a')$-subcrystal with high weight $\vf_1$.
    (The parenthetical comment came from brute force computer search.)
  }
  \junk{AK: I think what remains is to write the simple roots as 
    combinations of $(\vf_i)$, up to multiples of $\nu$ and $\tau\nu$.}
\end{proof}

In fact the conditions on the simple system in theorem \ref{thm:classif} 
make the choice of the first seven simple roots unique; 
alas, there is no choice for the eighth that would make $\vf_4$ fundamental.

\junk{Old, separate versions.

\begin{prop}\label{prop:roots}
  For $d=1,2,3,4$ these matrices are positive definite
  of determinant $3,4,3,1$ respectively,
  and the even lattices they define are\footnote{%
    David Speyer points out that the corresponding cluster varieties
    are $Gr_3(\CC^n)$ for $n=5,6,7,8$; for $n>8$ 
    these varieties are still cluster, but of infinite type \cite{JScott}.
    This seems likely to be connected to the fact that these matrices
    are almost (and have the same determinants as) the crossing
    matrices of the standard projections of the torus knots $T(3,n)$
    \cite{oeis131027}, from whose projections are built these cluster
    varieties in \cite{ShendeTWZ}.
    For another mysterious connection, note that the number
    of positive roots of $A_2,D_4,E_6,E_8$ is three times the
    number of indecomposable preprojective modules for the
    $A_1,A_2,A_3,A_4$ quivers \cite{GLSprep}, 
    a bit of numerology that does not seem to have been observed before.
  }  
  the root lattices $A_2,D_4,E_6,E_8$.
\end{prop}

\begin{proof}
  We leave the reader to check the determinants and definiteness, 
  then recall that $E_8$ is the unique positive definite 
  even unimodular lattice in dimension $8$. 
  Computer search inside the box $\prod^8 [-2,2]$ finds $240$
  integer vectors of norm-square $2$, which must therefore be all the roots.

  {move this next paragraph to the next proof, and after it
    as a comment}

  We look for a system of simple roots, the first $2d$ of which
  generate $K_d$. Ideally we'd like the vectors $\vf_{1,2,3,4}$ to be
  fundamental weights, corresponding to the simple roots $\alpha_{1,3,5,7}$;
  these conditions uniquely determine the simple roots for $d=1,2,3$
  but are unachievable for $d=4$, i.e. we can't make $\vf_4$ fundamental.
  Here is such a system and its induced%
  \footnote{To check this, let the two matrices above be $G$ and $S$,
    and observe that $2-SGS_T$ is the adjacency matrix for the graph pictured.}
  Dynkin diagram.
  \[\begin{blockarray}{lrrrrrrrr}
    \begin{block}{l(rrrrrrrr)}
    a& 1& \\
    a'&                -1& -1&\\
    b& 0& 0 & 1\\
    b'&                -1& 0& -1& -1\\
    c& 0& 0& 0 & 0& 1\\
    c'&                0& 1& -1& 0 & -1& -1\\
    d& 0& 0& 0& 0& 0 & 0& 1\\
    d'&                0& 1& -1& 1& -2& 0& -2& -1 \\
   \end{block} 
  \end{blockarray}
  \qquad \tikz[every label/.style={above},math mode] {\draw 
    (0,0)   node[mynode,label=c'] {} -- 
    ++(1,0) node[mynode,label=a'] {} --
    ++(1,0) node[mynode,label={[name=aa]above right:a}] {} --
    ++(1,0) node[mynode,label=b] {} -- 
    ++(1,0) node[mynode,label=c] {} -- 
    ++(1,0) node[mynode,label={[name=dd]d}] {} -- 
    ++(1,0) node[mynode,label=d'] {}; 
    \draw (2,0) -- 
    (2,1)   node[mynode,label=b'] {};}
  \]
  Let $\ZZ^k \leq \ZZ^8$ denote the sublattice using only the first
  $k$ coordinates. 
  Then since this matrix is lower triangular, its row span intersect $\ZZ^k$ 
  is spanned by the first $k$ rows, i.e. they give simple systems for the 
  smaller claimed root lattices. 
  As in \cite[example 1.6]{BarotGeissZelevinsky},
  we observe the inclusions
  $A_1 \subset A_2 \subset A_3 \subset D_4 \subset D_5 \subset E_6 
  \subset E_7 \subset E_8$ of Dynkin diagrams.
\end{proof}

It seems worth noting that roots $b,c,d$ attach to the $A_2,D_4,E_6$ diagrams at
the vertex corresponding to the fundamental representation
$\CC^3,\CC^8,\CC^{27}$ occurring in 
lemmas~\ref{lem:greend1}, \ref{lem:greend2}, \ref{lem:greend3}.
%Also, roots $2,4,6$ correspond to the $a,b,c$ in lemma~\ref{lem:greend3}.

However, we want not just the root lattices, but the weights.

\newcommand\wtf{{\widetilde f}}

\begin{thm}\label{thm:classifv2}
  Consider the inner product $G$ from \S \ref{ssec:Gram} on $\Lambda^{1+4}$, 
  but set $a=1$ making it positive semidefinite. 
  Then the kernel $Rad(G|_{a=1})$ is generated by 
  $\vec\nu := \sum_{i=0}^4 (-\tau^2)^i \vf_i$ and $\tau \vec\nu$, and the 
  composite map $K_4 \into \Lambda^{1+4} \onto \Lambda^{1+4} / Rad(G|_{a=1})$
  is an isomorphism, making both lattices $E_8$.

  For each $d=1,2,3$, consider the image of $K_d$ in this $E_8$.
  The weights $\{\vf_X\ :\ |\vf_X|^2=2,\ X$ has values $\leq d\}$
  are those of the minuscule irrep corresponding to the high weight $\vf_d$.

  For $d=4$, the weights $\{\vf_X\ :\ |\vf_X|^2=2\}$
  are exactly the roots of $E_8$, i.e. the nonzero weights of the
  adjoint (nonminuscule) representation.  
\end{thm}

{oldest, messed-up version:}

\begin{thm}\label{thm:classifv1}
  Let $d=1,2,3,4$, and consider the vectors $\vf_X$ associated 
  to valid multinumbers (as defined in \S\ref{ssec:d3puz} for $d=1,2,3$;
  for $d=4$ we take the set of $224$ multinumbers 
  implied by the functoriality from \S\ref{ssec:funct}).

  Set $a=1$, so the form is positive definite for $d=1,2,3$ 
  but is positive semidefinite with two null directions for $d=4$,
  spanned by $\nu_d := \sum_{i=0}^d (-\tau^2)^i \vf_i$ and $\tau \nu_d$.
  Let $Q_d := \Lambda^{1+d}$ modulo its intersection with those null directions.
  Then
  \begin{enumerate}
  \item $K_4 \to Q_4$ is bijective; both are the root/weight lattice $E_8$;
  \item $Q_1 \into Q_2 \into Q_3 \into Q_4$ are the weight lattices
    of the Levi subgroups $A_2 \into D_4 \into E_6 \into E_8$;
  \item for $d=1,2,3$ the images $(\wtf_X)$ of the vectors $(\vf_X)$ 
    are the weights of the minuscule representations $V$ claimed in
    lemmas~\ref{lem:greend1}, \ref{lem:greend2}, \ref{lem:greend3}; 
  \item for $d=4$ the images $(\wtf_X)$ of the vectors $(\vf_X)$,
    for the $224$ multinumbers $X$ derived from lower $d$ 
    as in \S\ref{ssec:funct},
    are {\em some of} the $241$ weights of the adjoint representation; and
  \item\label{item:AdFace}
    the weights $\vf_0,\ldots,\vf_d$ are vertices of the 
    convex hull $\{\vf_X\ :\ X$ valid$\}$, and form one face,
    which is a simplex.
  \end{enumerate}
  In all four cases $d=1,2,3,4$, there is a unique invariant 
  vector in $V \tensor (\tau V) \tensor (\tau^2 V)$,
  and the dual Coxeter number of the group is a multiple of $3$
  (specifically, $3$, $6$, $12$, $30$, respectively).
\end{thm}

\newcommand\twoheaddownarrow{\mathrel{\rotatebox[origin=t]{270}{$\twoheadrightarrow$}}}

{AK: this needs lots of rewriting, to match the current
  statements}

\begin{proof}
  For part (1), we've already shown that $K_4$ is the unimodular lattice $E_8$, 
  and $Q_4 \geq K_4$ is integral and contains $K_4$ of the same 
  dimension, so $Q_4 = K_4$.

  For part (4), observe that in proposition~\ref{prop:roots} we found
  the $240$ elements of $K_d$ of norm-square $2a$. We've now set $a=a_4=1$,
  so those vectors have norm-square $2$, making them the roots 
  (the weights of the adjoint representation).
%  So we've identified $Q_4$ with the weight (and root) lattice of $E_8$.

  Let $G_{2d}$ be the root subgroup of $E_8$ generated by the first $2d$ roots
  in the list from proposition~\ref{prop:roots}. 
  Each of these is simply connected and acts faithfully on $\lie{e}_8$. 
  Consequently, the restriction map on weight lattices is surjective.

  To see (2), we identify $K_d \into K_4 \iso Q_4$ as the inclusion
  of $G_{2d}$'s root lattice into the $E_8$ root lattice. Then the
  commuting square
  $  \begin{matrix} \Lambda^{4+1} &\onto &\Lambda^{1+d} \\
    \twoheaddownarrow &&     \twoheaddownarrow \\
    Q_4 &\to & Q_d   \end{matrix} $
  lets us realize the map $Q_4 \to Q_d$ as the restriction 
  on weight lattices.

  To see (3), we follow the specific vector $\vec f_3 \in \Lambda^{3+1}$ 
  as a rational combination of $\nu_3$, $\tau \nu_3$, and $K_3$:
  \[    (0,0,\ 0,0,\ 0,0,\ 1,0) 
  = \frac{1}{3} \nu_3 +  \frac{2}{3} \tau \nu_3
  +  \frac{\alpha_1 + 2\tau^2\alpha_1 +(-3)(-\tau^2)\alpha_2 
    -2\alpha_3 + 2\tau^2\alpha_3}{3}
  \]

\end{proof}
}

For $d=1,2,3,4$, if instead of $a=1$ we set $a$ equal to the $a_d$ from
\S\ref{ssec:signature} ($3,2,1\frac{1}{2},1$ respectively), 
then the form on $\Lambda^{1+d}$ becomes
positive semidefinite with two null directions,
and its quotient is the weight lattice of $A_2,D_4,E_6,E_8$ respectively.
This is how the vectors in lemmas \ref{lem:greend1}-\ref{lem:greend3} arise.

Theorem~\ref{thm:classif} is {\em very}\/ suggestive that $4$-step 
Schubert calculus might be approached using edge labels based on 
the roots of $E_8$. However, as briefly indicated in the introduction,
the situation is somewhat complicated, and will be discussed in a 
separate publication \cite{SchubII}.


\junk{

Let $\vec c := \sum_{i=0}^d (-\tau)^i \vf_i$. Then
\begin{eqnarray*}
  \langle \vec c, \vf_j \rangle 
  &=& \left\langle \sum_{i=0}^d (-\tau^2)^i \vf_i, \vf_j \right\rangle 
  =  \sum_{i=0}^d  (-1)^i \langle \vf_i, \tau^i \vf_j \rangle \\
  &=&  \sum_{i=0}^{j-1}  (-1)^i \langle \vf_i, \tau^i \vf_j \rangle 
      + (-1)^j \langle \vf_j, \tau^j \vf_j \rangle 
      + \sum_{i=j+1}^d  (-1)^i \langle \vf_i, \tau^i \vf_j \rangle \\
  &=&  \sum_{i=0}^{j-1}  (-1)^i
      \begin{cases}
        2-a &\text{if }i\equiv 0 \bmod 3 \\
        a-1 &\text{if }i\equiv 1 \bmod 3 \\
        -1 &\text{if }i\equiv 2 \bmod 3 
      \end{cases}
             + (-1)^j 
             \begin{cases}
               2 &\text{if }j\equiv 0 \bmod 3 \\
               -1&\text{if }i\equiv 1,2 \bmod 3 \\
             \end{cases}
      + \sum_{i=j+1}^d  
      \begin{cases}
        2-a &\text{if }i\equiv 0 \bmod 3 \\
        -1 &\text{if }i\equiv 1 \bmod 3 \\
        a-1 &\text{if }i\equiv 2 \bmod 3 
      \end{cases}
\end{eqnarray*}
Then for $d\leq 4$, the span of $\vec c, \tau \vec c$ is the $G$-perp to $K_d$.

{So for each $E_8$ root $\beta$ i.e. vector of $G_d$-norm-square $2a$, there's a 
  unique vector $\vec s$ in this perp such that
  \[ 2 = \langle \beta + \vec s, \beta + \vec s \rangle
  = \langle \beta, \beta \rangle  + 2 \langle \beta, \vec s \rangle
  + \langle \vec s, \vec s \rangle
  = 2a + \langle \vec s, \vec s \rangle \]
  so apparently $\langle \vec s, \vec s \rangle = 2(1 - a)$.
  }
}

\junk{
\subsection{The pipe dream sector}\label{ssec:pipedreams}
{if this fails, may move to next section}
The proof from \cite{artic46,artic68} shows that puzzles compute the
products of Grassmannian double Grothendieck polynomials $\{G_w\}$
(and from there, products of Schubert classes in equivariant $K$-theory).
This was based on recognizing certain puzzle configurations as
pipe dreams, shown in \cite{FK,BB,KM} to compute 
double Grothendieck polynomials themselves (not their product expansion). 
We give here a direct explanation of how double Grothendieck
polynomials arise as certain structure constants of Schubert multiplication,
i.e. certain $c_{vx}^x$ in the expansion $S^v S^w = \sum_x c_{vw}^x S^x $.

For $\gamma \in K_T(B_-\dom G)$ and $v\in W_G$,
let $\gamma|_v$ denote the restriction of $\gamma$ to 
the $T$-fixed point $B_- \dom B_- v$. Then the restriction map
\[ K_T(B_-\dom G) \to \bigoplus_{v\in W_G} K_T, \qquad
\gamma \mapsto (\gamma|_v)_{v\in W_G} \]
is an injection of $K_T$-algebras.
Define the \defn{support} of $\gamma$ as 
$supp(\gamma) := \{v\in W_G\ :\ \gamma|_v \neq 0\}$,
so $supp(\gamma \delta) = supp(\gamma)\cap supp(\delta)$
and $supp(\gamma + \delta) \subseteq supp(\gamma)\cup supp(\delta)$.

Let $S^w \in K_T(B_-\dom G)$ 
denote a $T$-equivariant Schubert class on $B_-\dom G$,
so $supp(S^w) = [w,w_0] \subseteq W_G$. 
Then for $v\geq w$, we have $supp(S^v S^w) = [v,w_0]$. 
By this upper triangularity, $c_{vw}^x = 0$ unless $x\geq v,w$.
Hence 
\begin{eqnarray*}
  S^v S^w &=& \sum_{x\geq v} c_{vw}^x S^x 
  \qquad\text{(we could require $x\geq w$ also)} \\
S^v|_v\ S^w|_v =  (S^v S^w)|_v &=& \sum_{x\geq v} c_{vw}^x S^x|_v 
\ =\ \sum_{x=v} c_{vw}^x S^x|_v \ =\ c_{vw}^v S^v|_v
\end{eqnarray*}
so $S^w|_v = c_{vw}^v$, since $S^v|_v \neq 0$. 

Before restricting a class from $B_-\dom G$ all the way to $B_-\dom B_- v$, 
we can restrict first to the smooth contractible space $B_-\dom B_- v B$, 
which conveniently is transverse to the Schubert variety $X_w$. 
Hence we have maps
\[
\begin{matrix}
  K_T(B_-\dom G) &\to& K_T(B_-\dom B_- v B) &\widetilde{\to}& 
  K_T(B_-\dom B_- v) \iso K_T \\
  S^w = [X_w] &\mapsto& [X_w \cap B_- \dom B_- vB] &\mapsto& S^w|_v
\end{matrix}
\]

Now we fix $G = GL_{2n}(\CC)$, and invoke an identification of Fulton.

\begin{prop}
  Fix $\pi\in S^n$, and let
  $\overline{X}_\pi := \overline{B_- \pi B_+} \subseteq M_n(\CC)$
  be the \defn{matrix Schubert variety}. 
  Let $v_P \in S^{2n}$ denote the permutation $i \mapsto i+n \bmod 2n$.
  \begin{enumerate}
  \item \cite{KM} The $K_{T^n\times T^n}$-class
    $[\overline{X}_\pi] \in K_{T^n\times T^n}(M_n)$ is given
    by the double Grothendieck polynomial $G_\pi$ of $\pi$.    
  \item (implicit in \cite[\S 6]{Ful-flags}) 
    Let $\pi\oplus I_n \in S^{2n}$ agree with $\pi$
    on $[1,n]$ and be the identity on $[n+1,2n]$. 
    Then we have commuting $T^{2n}$-equivariant identifications
    \[
    \begin{matrix}
      M_n &\iso& B^{2n}_-\dom B^{2n}_- v_P B^{2n}_+ \\
      \uparrow &&\uparrow  \\
      \overline{X}_\pi &\iso& X_{\pi\oplus I_n} \cap B^{2n}_-\dom B^{2n}_- v_P B^{2n}_+ 
    \end{matrix}
    \]
  \end{enumerate}
\end{prop}

Putting these together, we get
\[ G_\pi = S^{\pi\oplus I_n}|_{v_P} = c_{\pi\oplus I_n, v_P}^{v_P} \]
which would enable us to compute double Grothendieck polynomials 
from puzzles, \emph{if} we knew already that puzzles compute products 
of Schubert classes in equivariant $K$-theory.
Since we don't know that yet in general, 
we must check that $d$-step flag manifold puzzles 
correctly compute $c_{\pi\oplus I_n, v_P}^{v_P}$, for $\pi$ with at most $d$ descents.

The relevant puzzles have these boundaries, which fully determine the
shaded regions: \\
\centerline{\includegraphics[height=2in]{doubGroth}}

{do one $\backslash$ row at a time, starting from the top.
  Give the map from pipe dreams to puzzles.
  Axiomatize what the puzzle pieces must do, in order for this map to be onto.}

\vskip .1in \hrule\vskip .1in 


}



\junk{define space of states. $\tau$.
conservation law/embedding as a surface.
metric $G$. alternating form $B$.
pipedream sector.
trilinear form. interrelation between all these objects.
$R$-matrix/projector Ansatz for puzzles ($B$-twist): probably
in next section. 
DON'T MENTION corresponding Drinfeld twist
(in particular, coproduct for $t^B$ and cocycle condition),
will be for next paper.
careful that
there are signs we need to get rid of: not in $K$-theory (and $H$ is $q=-1$)
}


\subsection{Inversion numbers of paths}\label{ssec:Bmatrix}
This subsection does not particularly follow the flow from the previous
subsections, but its results are of intrinsic interest, besides which 
we need it for the proofs in the next section.

Fix an antisymmetric form $B$ on $\Lambda^{1+d}$, to be specified soon,
but whose actual shape is not yet important.

Let $P$ be a puzzle and $\gamma$ a path
through $P$'s edges. %from the Southwest corner to the Southeast corner of $P$.
For each edge $\gamma_i$ in this oriented path, we co\"orient it by
considering it as part of a triangle to its left,
\junk{what's the use of the triangle? shouldn't $\vf$ only depend on the edge
  and on its orientation? AK: correct, it's just to match the vector
  association in lemma \ref{lem:greend1}, associated to the edge and
  a co\"orientation rather than to an orientation.}
and associate a vector $\vf(\gamma_i) = \pm \tau^k \vf_X$ 
depending on the co\"orientation and label. Define
the \defn{inversion number of $\gamma$}
as $\frac{1}{2} \sum_{i<j} B(\vf(\gamma_i),\vf(\gamma_j))$.
It is something like the area of a surface bounded by $\gamma$:

\begin{lem}
  If the $N$-step path $\gamma$ repeats a vertex, i.e. 
  after step $b$ finds itself in the same location as before step $a$,
  then we can break $\gamma$ into the path $\gamma_{[1,a)\coprod (b,N]}$
  and the loop $\gamma_{[a,b]}$. In this situation, the inversion number
  of $\gamma$ is the sum of the inversion numbers of the path and the loop.
\end{lem}

\begin{proof}
  \begin{eqnarray*}
    \sum_{i<j} B(\vf(\gamma_i),\vf(\gamma_j)) 
    &=&    \sum_{i<j<a} B(\vf(\gamma_i),\vf(\gamma_j)) 
    + \sum_{i<a\leq j\leq b} B(\vf(\gamma_i),\vf(\gamma_j)) 
    + \sum_{i<a, b<j} B(\vf(\gamma_i),\vf(\gamma_j)) \\
    &+& \sum_{a\leq i< j\leq b} B(\vf(\gamma_i),\vf(\gamma_j))  
    + \sum_{a\leq i\leq b< j} B(\vf(\gamma_i),\vf(\gamma_j)) 
    + \sum_{b < i < j} B(\vf(\gamma_i),\vf(\gamma_j)) \\
    &=&    \sum_{i<j<a} B(\vf(\gamma_i),\vf(\gamma_j)) 
    + \sum_{i<a} B\left( \vf(\gamma_i), \sum_{a\leq j\leq b} \vf(\gamma_j) \right) 
    + \sum_{i<a, b<j} B(\vf(\gamma_i),\vf(\gamma_j)) \\
    &+& \sum_{a\leq i< j\leq b} B(\vf(\gamma_i),\vf(\gamma_j))  
    + \sum_{ b< j} B \left(\sum_{a\leq i\leq b} \vf(\gamma_i),\vf(\gamma_j) \right) 
    + \sum_{b < i < j} B(\vf(\gamma_i),\vf(\gamma_j))
  \end{eqnarray*}
  The Green's theorem property of the vectors $\vf(\gamma_j)$, in the
  closed loop $\gamma_{[a,b]}$, says that 
  $\sum_{a\leq j\leq b} \vf(\gamma_j) = \vec 0$. Canceling those two terms,
  \begin{eqnarray*}
    \sum_{i<j} B(\vf(\gamma_i),\vf(\gamma_j)) 
    &=&    \sum_{i<j<a} B(\vf(\gamma_i),\vf(\gamma_j)) 
    + \sum_{i<a, b<j} B(\vf(\gamma_i),\vf(\gamma_j)) 
    + \sum_{b < i < j} B(\vf(\gamma_i),\vf(\gamma_j))  \\
    &+& \sum_{a\leq i< j\leq b} B(\vf(\gamma_i),\vf(\gamma_j))  
  \end{eqnarray*}
  giving the stated addition of inversion numbers.
\end{proof}

(What's ``really'' going on is that the $2$-form $B$ on $\Lambda^{1+d}$
with constant coefficients is exact, i.e. is of the form $d\alpha$ 
for some $1$-form $\alpha$ with linear coefficients, and the inversion
number is the integral over the triangle $0\leq i\leq j\leq N$
of the pullback of $B$. We could rewrite the inversion number
as the integral of the pullback of $\alpha$ to the boundary of that triangle,
but this didn't seem useful.)

In the simplest case of the lemma, $b=a+1$, i.e. the $(a+1)$st step retraces
the $a$th step, and the inversion number of the $2$-step closed loop is $0$.
Consequently we can consider these paths as equivalent
modulo insertion or removal of such retracings. 

The next simplest application comes when $\gamma_a,\gamma_{a+1}$
are two sides of a small $\Delta$ or $\nabla$. We first use the lemma 
to insert two more steps, jogging back and forth along the third
side of the triangle. Now by second use of the lemma,
the triangle can be broken off as a closed loop.

We now get specific about $B$ on $\Lambda^{1+d}$,
defining it on our bases as 
\[
B(\tau^r \vf_i,\tau^s \vf_j)=
\text{sign}(i-j)
\begin{cases}
1& s \equiv r \pmod 3\\
-1& s \equiv r+\text{sign}(i-j)\pmod 3\\
0& \text{otherwise.}
\end{cases}
\]
\junk{
  which we can encode as a directed graph on the vertex set 
  $\{\vf_i, \tau \vf_i\}_{i=0,\ldots,d}$: 
  \begin{itemize}
  \item each $\vf_i$ points to $\vf_j$ with $j<i$, so by $\tau$-invariance,
  \item each $\tau\vf_i$ points to $\tau \vf_j$ if $j<i$, and
  \item each $\tau\vf_i$ points to $\vf_j$ with $j>i$.
  \end{itemize}
}

\begin{lem}\label{lem:sympd1}
  Fix a partial flag manifold
  $\{V_1 \leq V_2 \leq \ldots \leq V_d \leq \CC^n:\ \dim V_i = n_i\}$,
  therefore of dimension $D := \sum_{i<j} (n_i - n_{i-1})(n_j - n_{j-1})$.

  Let $P$ be a puzzle with boundaries $\lambda,\mu,\nu$ as usual, 
  and $\gamma,\gamma'$ paths through $P$ from the SW
  corner to the SE corner. 
  \begin{itemize}
  \item If $\gamma$ is the straight path across the bottom, then the
    inversion number of $\gamma$ is $\ell(\nu) - \frac{D}{2}$.
  \item If $\gamma'$ follows the NW then NE sides of $P$, then the
    inversion number of $\gamma'$ is $\ell(\lambda) + \ell(\mu) - \frac{D}{2}$.
  \item If one path $\gamma'$ is always weakly above another path $\gamma$
    (e.g. like the two just mentioned),
    then the difference in their inversion numbers is the sum of
    the inversion numbers of the pieces in between them.
  \end{itemize}
\end{lem}

\begin{proof}
  The inversion number of the path along the Southern edge is
  \[ \frac{1}{2}   \sum_{1 \leq i<j \neq n} B(\vf(\gamma_i),\vf(\gamma_j))
  = \frac{1}{2} \sum_{1 \leq i<j \neq n} \text{sign}(\nu_i-\nu_j) 
  = \ell(\nu) - \frac{D}{2} 
  \]
  Similarly, the inversion number of the path along the NW then NE edge
  is $\ell(\lambda)+\ell(\mu) - D$ plus the cross-terms
  from the first half of the path with the second half.
  The only nonvanishing cross-terms 
  $\frac{1}{2} B(\tau^2 \vf_i, \tau \vf_j)$ 
  come from pairs $i<j$ with $i$ on the NW and $j$ on the NE.
  There are $D$ such pairs, so the inversion number of the second path is 
  $\ell(\lambda)+\ell(\mu)) - \frac{D}{2}$.

  The last statement follows directly from lemma \ref{lem:sympd1}.
\end{proof}

\section{Proofs of the main theorems}\label{sec:proofs}
The proofs of theorems~\ref{thm:KTd2} and \ref{thm:d3} follow the same
general philosophy as in \cite{artic46} and \cite{artic68}: they consist
in finding an appropriate ``quantum integrable system'' (that is, in the 
present context, a set of fugacities collectively satisfying
the Yang--Baxter equation), from which can be built both 
the Schubert basis of $K_T(G/P)$ and the structure constants of that basis.
However, we use a much more straightforward approach here
based on the bootstrap equation \eqref{eq:qtri}-\eqref{eq:qtrirev}, 
sidestepping some of the difficulties found in these articles (choice
of representative, issues of stability).
In appendix~\ref{app:cyclic}, we briefly sketch
an alternative route which is closer to \cite{artic46,artic68}.
In the whole of this section, $d\le 3$.

\subsection{Puzzles via the calculus of tensors}\label{ssec:tensors}
We begin with a brief attempt to bring Schubert calculators into the
integrable-systems tent, which essentially requires a proper 
linear algebra understanding of puzzles and their matching rule. 
Return to equation (\ref{eq:LRT}) of theorem~\ref{thm:KTd2}.
The requirement of matching between an edge label on a $\Delta$, and that on 
a neighboring $\nabla$, we will reinterpret as a dot product 
$\langle \vec v_X, \vec v^Y \rangle = \delta_{X,Y}$ between elements 
of dual bases.
To set this up, we need to assign two vector spaces in involution%
\junk{There is a subtle issue later, when these spaces are modules
  over a noncocommutative algebra and we must distinguish between
  dual and predual, which we ignore for the moment.}
to the South side of $\Delta$ and North side of $\nabla$,
with dual bases indexed by $L_d$ (and similarly choose pairs of
dual vector spaces for the other two orientations). 
For the moment, let's call these vector spaces $N,S,NW,SE,NE,SW$.

\junk{\subsubsection{Nonequivariant puzzles}
We start with nonequivariant Schubert calculus, both because 
it only involves triangles and because it doesn't have parameters.}
Let us start with nonequivariant Schubert calculus.
Define a tensor $U \in NW\tensor S\tensor NE$
\[
U := \sum \left\{ fug\left( \uptri{X}{Y}{Z} \right) 
\vec X\tensor \vec Y\tensor \vec Z
\ :\
\uptri{X}{Y}{Z} \text{ is a valid piece}\right \}
 \quad \in NW\tensor S\otimes NE
\]
and define $D \in SE\tensor N\tensor SW$ using $\nabla$ pieces similarly.

\newcommand\calD{{\mathcal D}}
Now consider a diagram $\calD$ made of $N_\Delta$ $\Delta$s and
$N_\nabla$ $\nabla$s, some edges shared, some edges labeled.
To such a diagram we assign a tensor $fug(\calD)$ as follows: start with
$U^{\tensor N_\Delta} \tensor D^{\tensor N_\nabla}$, contract the dual
vector spaces at each shared unlabeled edge, and contract with the dual basis
vector at each labeled edge. The result is a tensor $fug(\calD)$ living in the
tensor product of the vector spaces of all unmatched, unlabeled edges
of $\calD$. (Observe that if $\calD$ is a just a puzzle piece,
then this definition gives the usual fugacity for the piece,
and gives $0$ if applied to labeled triangles that aren't valid puzzle pieces.
Or if $\calD$ is an unlabeled $\Delta$, then $fug(\calD) = U$.)

The basic case to keep in mind is $\calD$ a size $n$ triangle made of
$n^2$ little $\Delta$s and $\nabla$s, with boundary labeled by
$\lambda,\mu,\nu$ as usual. Now all internal edges are matched 
and all external edges are labeled, so the resulting tensor is 
just a number -- exactly the coefficient appearing in the
nonequivariant puzzle rule, the $d=1$ case being equation (\ref{eq:LR}).

Because we use the same labels $L_d$ for our basis and dual basis,
if $E$ is a shared unlabeled edge of $\calD$, then 

\begin{equation}\label{eq:labeledges}
  fug(\calD) = \sum_{X \in L_d} \left\{ fug({\calD'}) \ :\ 
  \calD' \text{ is $\calD$ with edge $E$ labeled $X$} \right\} 
\end{equation}

\junk{\subsubsection{Equivariant puzzles}
We now explain the role of the multiplicative parameters that enter
the fugacities.  Instead of assigning a vector space to each unlabeled edge, 
we assign a module over a certain algebra, and the parameter is
involved in specifying the module structure.} 
To involve equivariant pieces,
we also define a tensor $\check R$ living in 
$ SW \tensor SE \tensor NE \tensor NW \iso End(SW\tensor SE)$,
constructed as a sum 
\[
 \check R := \sum \left\{ fug\left( \rh{X}{Y}{Z}{W} \right) 
\vec X\tensor \vec Y\tensor \vec Z \tensor \vec W
\quad :\quad
\rh{X}{Y}{Z}{W} \text{ can be filled in}\right \} 
\]
where the fugacities depend on the location of the rhombus (ultimately, they 
will depend on the equivariant parameters).
\junk{removed the rest: do we really need
to explain this parameter story? after all, the very rules of equivariant
calculus imply that there are (equivariant) parameters in the fugacity, and how
they depend on the two projections of the lozenge}

\junk{The modules $SE,SW$ have associated parameters $u_1,u_2$, and the
fugacity of the rhombus is required to be a function of $u_1/u_2$.
{\em Note:} we insist that the NW and SE parameters are equal, 
likewise the NE and SW parameters.

To define $fug(\calD)$ for a diagram made out of only vertical rhombi,
we now allow ourselves to choose different values of parameter for
different edges, keeping in mind that (1) the parameters on two
opposite (parallel) sides of a rhombus must match,
and (2) the parameters on shared edges must match 
(to allow for duality of the modules).
For example, in an $a\times b$ parallelogram made of rhombi, 
this would only allow for $a+b$ independent parameters.
\rem{one can't make a decent discussion of spectral parameters without
  co-orienting the edges due to the non-uniqueness of dual}

\rem{picture: a $2\times 3$ parallelogram of rhombi, with all
  NE/SW edges labeled $u_1,u_2$ and all NW/SE edges labeled $v_1,v_2,v_3$}

Finally, we need to redefine $U$ (and less importantly, $D$) 
in the presence of these parameters. We sum the usual fugacities,
but only in the case that the parameters on the three sides have
product $1$, {\em and} that the parameter on the South side
is a certain fixed value, the meaning of which to be made clear
in the rest of the section. Consequently, in the standard diagram $\calD$
\rem{actually, I disagree that $U$ and $D$
need to be redefined: they're the same. see also remark above}

\rem{picture of $4\Delta$ broken into rhombi and bottom triangles}

\noindent
of shape $n\Delta$, there are as expected only $n$ independent parameters.
}

Finally, each vector space associated to edges will be endowed with the action
of a {\em Hopf algebra}, in such a way that $U$, $D$ and $\check R$
are invariant under that action (i.e., they live in the
trivial representation); in particular, $U$ and $D$ are the
trilinear invariant forms advertised in the title. 
A subtlety here is that the lack of involutivity of the antipode
means that the notion of dual representation
is not uniquely defined.
This will force us
to co\"orient all edges, as will be discussed in the next section.

\subsection{The required properties: quantum integrability}
\label{sec:genproof}
It is convenient to introduce the ``dual'' graphical representation
which is more traditional in quantum integrable systems: we denote a rhombus
with its four edges labeled by $L_d$
\[
\tikz[baseline=0,scale=1.5]{
\rh{X}{Y}{Z}{W}
}
=
\tikz[baseline=0,xscale=0.5]
{
\draw[arrow=0.3,dr] (-1,-1) node[below] {$\m X$} -- (1,1) node[above] {$\m Z$};
\draw[arrow=0.3,dg] (1,-1) node[below] {$\m Y$} -- (-1,1) node[above] {$\m W$};
}
\]
The colors of lines are a reminder of the direction of the corresponding
edge of the rhombus. This information may seem redundant since lines
themselves have a given direction; however it is sometimes useful to
deform the lines (in a way that is harder to realize with rhombi), and
then their direction may vary (but not their color). We will say more
about this after proposition~\ref{prop:key}.

We then attach a parameter (usually called the spectral parameter) to
each line, in such a way that the fugacity of the rhombus / crossing
depends on the ratio\footnote{%
  We work in the multiplicative group, or equivalently with
  trigonometric solutions of the Yang-Baxter equation, since our
  goal is to compute in $K$-theory. The corresponding additive group / 
  rational solutions compute Schubert calculus in ordinary cohomology.}
of these two parameters:
\begin{equation}\label{eq:rhombus}
%  \tikz[baseline=0,scale=1.5]{
%    \rh{a}{b}{c}{d}
%    \pic[draw,angle radius=5mm] {angle=cb--ba--ad};\path (ba) node[above=1mm] {$\ss u$};
%  }
%  =
  \tikz[baseline=0,xscale=0.5]
  {
    \draw[arrow=0.3,dr] (-1,-1) node[below] {$\m X$} -- node[pos=0.3,left,black] {$\ss u_1$} (1,1) node[above] {$\m Z$};
    \draw[arrow=0.3,dg] (1,-1) node[below] {$\m Y$} -- node[pos=0.3,right,black] {$\ss u_2$} (-1,1) node[above] {$\m W$};
  }
  = \check R(u)_{XY}^{WZ} \in \QQ(u_1,u_2,\ldots)
  \qquad
  u=u_1/u_2
\end{equation}
\junk{corrected the ring since the spectral parameters will typically
be any of these variables, not just $u_1/u_2$, and
there are other spectator variables like $q$, hence the vague statement below}
The fugacity lives in some appropriate ring
of rational functions in $u_1$, $u_2$ and possibly other indeterminates.

The graphical convention (as explained in \S\ref{ssec:tensors})
is that a drawn rhombus / crossing represents its own fugacity, and 
that when rhombi are glued together, the labels of the internal edges
are summed over as in (\ref{eq:labeledges}), 
or in the dual language, when lines emerging from crossings are reconnected,
the labels of these lines should match and are summed over.

We impose an important condition on the fugacity of \eqref{eq:rhombus}: 
that there is a special value $\alpha/\beta$ of the ratio of spectral
parameters such that the fugacity ``factorizes'':
\begin{pty}\label{pty:factor}
\begin{equation}\label{eq:factor}
%\tikz[baseline=0,scale=1.5]{
%\rh{a}{b}{c}{d}
%\pic[draw,angle radius=5.5mm] {angle=cb--ba--ad};\path (ba) node[shift={(1.7mm,3.5mm)}] {$\ss\alpha\beta^{-1}$};
%}
%=
\tikz[baseline=0,xscale=0.5]
{
\draw[arrow=0.3,dr] (-1,-1) node[below] {$\m X$} -- node[pos=0.3,left,black] {$\ss \alpha u$} (1,1) node[above] {$\m Z$};
\draw[arrow=0.3,dg] (1,-1) node[below] {$\m Y$} -- node[pos=0.3,right,black] {$\ss \beta u$} (-1,1) node[above] {$\m W$};
}
=
\tikz[baseline=0]
{
\draw[arrow=0.6,dr] (-0.5,-1) node[below] {$\m X$} -- node[pos=0.6,left,black] {$\ss \alpha u$} (0,-0.5);
\draw[arrow=0.6,dr] (0,0.5) --  node[pos=0.6,right,black] {$\ss \alpha u$} (0.5,1) node[above] {$\m Z$};
\draw[arrow=0.6,dg] (0.5,-1) node[below] {$\m Y$} -- node[pos=0.6,right,black] {$\ss \beta u$} (0,-0.5);
\draw[arrow=0.6,dg] (0,0.5) -- node[pos=0.6,left,black] {$\ss \beta u$} (-0.5,1) node[above] {$\m W$};
\draw[arrow=0.6,db] (0,-0.5) -- node[pos=0.6,left,black] {$\ss u$} (0,0.5);
}
\end{equation}
where the blue line, or equivalently the diagonal of the rhombus, carries a label in $L_d$. 
\end{pty}
Equivalently, in the original graphical language, the r.h.s.\ can be pictured as
\tikz[baseline=0]{
\rh{X}{Y}{Z}{W}
%\pic[draw,angle radius=5mm] {angle=cb--ba--ad};\path (ba) node[above=1mm] {$\ss \beta$};
\draw[thick] (0,0)--(1,0);
}.
\junk{it's very tempting to change the orientation of the blue line to
  get back to our usual trilinear form, but one needs to be super
  careful about dual vs predual. Moreover, this is the natural direction
  if one thinks that puzzles are about pushforward of CSM classes along
  diagonal inclusion}
This is the way that the ``invariant trilinear form'' appears in this integrable setting.
The assignment of the parameter $u$ to the intermediate blue line is at the moment purely a definition,
but it will be useful below.
The constants $\alpha$ and $\beta$ could be set to $1$ by a redefinition of the spectral parameters, but as we shall see this would not match with usual quantum group conventions.


We need more general types of crossings, where two lines with arbitrary colors can cross each other, e.g.,
\tikz[baseline=0,xscale=0.5]
{
\draw[arrow=0.3,db] (-1,-1) -- node[pos=0.3,left,black] {$\ss u_1$} (1,1);
\draw[arrow=0.3,dr] (1,-1) -- node[pos=0.3,right,black] {$\ss u_2$} (-1,1);
}.\footnote{Many of these $R$-matrices were defined in the study of the
  cohomology of $d=1$ in \cite{artic46}; in particular, crossings of
  identical colors were called $R^*$ there.}
In the argument from proposition~\ref{prop:key}, it will become clear that
the same-color crossings are closely related to the $(150^\circ,30^\circ)$ 
rhombi in \cite{Pur} and more distantly related to the gashes in \cite{KT,BKPT}.

We also associate to each labeled line a weight:
the weight of a green (resp.\ blue, red) line labeled $X$ is
$\vec f_X$ (resp.\ $-\tau \vec f_X$, $\tau^2 \vec f_X$).
The minus sign for blue lines comes from their opposite orientation at
the trivalent vertices.

We then require the following conditions:
\begin{pty}\label{pty:ybe}
  In the pictures below, black lines can have arbitrary (independent)
  colors, and all lines can have arbitrary spectral parameters (as
  long as they match between l.h.s.\ and r.h.s.).
\begin{itemize}
\item The fugacity of any vertex is nonzero only if weight is conserved,
i.e., if the sum of incoming weights is equal to the sum of outgoing weights.
\item Yang--Baxter equation:
\begin{equation}\label{eq:ybe}
\begin{tikzpicture}[baseline=-3pt,y=2cm]
\draw[d,invarrow=0.1,invarrow=0.4,invarrow=0.7,rounded corners] (-0.5,0.5) -- (0.75,0) -- (1.5,-0.5) (0.5,0.5) -- (0.25,0) -- (0.5,-0.5) (1.5,0.5) -- (0.75,0) -- (-0.5,-0.5);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline=-3pt,y=2cm]
\draw[d,invarrow=0.1,invarrow=0.4,invarrow=0.7,rounded corners] (-0.5,0.5) -- (0.25,0) -- (1.5,-0.5) (0.5,0.5) -- (0.75,0) -- (0.5,-0.5) (1.5,0.5) -- (0.25,0) -- (-0.5,-0.5);
\end{tikzpicture}
\end{equation}
%Quasi-triangularity equations:
\item Bootstrap equations: 
\junk{JBZ suggested calling them fusion equations. but there are so many uses of the word fusion in MP...}
\begin{align}\label{eq:qtri}
&\tikz[baseline=0]{
\draw[arrow=0.5,db] (0,-1.5) -- (0,0);
\draw[arrow=0.5,dg] (0,0) -- (-1,1);
\draw[arrow=0.5,dr] (0,0) -- (1,1);
\draw[arrow=0.5,rounded corners,d] (-1,-1.5) -- (-1,-0.5) -- (1.5,0) -- (1.5,1);
}
=
\tikz[baseline=0]{
\draw[arrow=0.6,db] (0,-1.5) -- (0,-0.5);
\draw[arrow=0.6,dg] (0,-0.5) -- (-1,1);
\draw[arrow=0.75,dr] (0,-0.5) -- (1,1);
\draw[arrow=0.6,rounded corners,d] (-1,-1.5) -- (-1,0) -- (1.5,0.5) -- (1.5,1);
}
&
&\tikz[baseline=0,xscale=-1]{
\draw[arrow=0.5,db] (0,-1.5) -- (0,0);
\draw[arrow=0.5,dr] (0,0) -- (-1,1);
\draw[arrow=0.5,dg] (0,0) -- (1,1);
\draw[arrow=0.5,rounded corners,d] (-1,-1.5) -- (-1,-0.5) -- (1.5,0) -- (1.5,1);
}
=
\tikz[baseline=0,xscale=-1]{
\draw[arrow=0.6,db] (0,-1.5) -- (0,-0.5);
\draw[arrow=0.6,dr] (0,-0.5) -- (-1,1);
\draw[arrow=0.75,dg] (0,-0.5) -- (1,1);
\draw[arrow=0.6,rounded corners,d] (-1,-1.5) -- (-1,0) -- (1.5,0.5) -- (1.5,1);
}
\\[4mm]\label{eq:qtrirev}
&\tikz[baseline=0,scale=-1]{
\draw[invarrow=0.5,db] (0,-1.5) -- (0,0);
\draw[invarrow=0.5,dg] (0,0) -- (-1,1);
\draw[invarrow=0.5,dr] (0,0) -- (1,1);
\draw[invarrow=0.5,rounded corners,d] (-1,-1.5) -- (-1,-0.5) -- (1.5,0) -- (1.5,1);
}
=
\tikz[baseline=0,scale=-1]{
\draw[invarrow=0.6,db] (0,-1.5) -- (0,-0.5);
\draw[invarrow=0.6,dg] (0,-0.5) -- (-1,1);
\draw[invarrow=0.75,dr] (0,-0.5) -- (1,1);
\draw[invarrow=0.6,rounded corners,d] (-1,-1.5) -- (-1,0) -- (1.5,0.5) -- (1.5,1);
}&
&\tikz[baseline=0,yscale=-1]{
\draw[invarrow=0.5,db] (0,-1.5) -- (0,0);
\draw[invarrow=0.5,dr] (0,0) -- (-1,1);
\draw[invarrow=0.5,dg] (0,0) -- (1,1);
\draw[invarrow=0.5,rounded corners,d] (-1,-1.5) -- (-1,-0.5) -- (1.5,0) -- (1.5,1);
}
=
\tikz[baseline=0,yscale=-1]{
\draw[invarrow=0.6,db] (0,-1.5) -- (0,-0.5);
\draw[invarrow=0.6,dr] (0,-0.5) -- (-1,1);
\draw[invarrow=0.75,dg] (0,-0.5) -- (1,1);
\draw[invarrow=0.6,rounded corners,d] (-1,-1.5) -- (-1,0) -- (1.5,0.5) -- (1.5,1);
}
\end{align}
\item Unitarity equation: \junk{Do we really want to emphasize this? 
    Insofar it doesn't hold for our degenerations of the standard $R$-matrix.
of course it does.}
\begin{equation}\label{eq:unit}
\begin{tikzpicture}[baseline=-3pt]
\draw[invarrow=0.07,invarrow=0.57,rounded corners,d] (-0.5,1) -- (0.5,0) -- (-0.5,-1) (0.5,1) -- (-0.5,0) -- (0.5,-1);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline=-3pt]
\draw[invarrow=0.1,invarrow=0.6,rounded corners,d] (-0.5,1) -- (-0.5,-1) (0.5,1) -- (0.5,-1);
\end{tikzpicture}
\end{equation}
\item Value at equal spectral parameters: (here, the lines {\em must}\/ have the same color
for the equality to make sense)
\begin{equation}\label{eq:equal}
\begin{tikzpicture}[baseline=-3pt,yscale=1.5]
\draw[arrow=0.3,d] (-0.5,-0.5) -- node[left,pos=0.3] {$\ss u$} (0.5,0.5);
\draw[arrow=0.3,d] (0.5,-0.5) -- node[right,pos=0.3] {$\ss u$} (-0.5,0.5);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline=-3pt,yscale=1.5]
\draw[arrow=0.3,rounded corners=4mm,d] (-0.5,-0.5) -- node[left] {$\ss u$} (0,0) -- (-0.5,0.5);
\draw[arrow=0.3,rounded corners=4mm,d] (0.5,-0.5) -- node[right] {$\ss u$} (0,0) -- (0.5,0.5);
\end{tikzpicture}
\end{equation}
\end{itemize}
\end{pty}
Morally, properties \eqref{eq:qtri}--\eqref{eq:unit} mean that one can 
freely slide lines across vertices/intersections of other lines.
For example, combining say the second equation of \eqref{eq:qtri} 
with \eqref{eq:unit}, we can also write
\begin{equation}\label{eq:qtri2}
\tikz[baseline=0]{
\draw[arrow=0.4,db] (0,-1.5) -- (0,0);
\draw[arrow=0.7,dg] (0,0) -- (-1,1);
\draw[arrow=0.5,dr] (0,0) -- (1,1);
\draw[arrow=0.7,rounded corners,d] (1,-1.5) -- (1,-1) -- (-0.75,-0.25) -- (-0.25,1);
}
=
\tikz[baseline=0]{
\draw[arrow=0.4,db] (0,-1.5) -- (0,0);
\draw[arrow=0.7,dg] (0,0) -- (-1,1);
\draw[arrow=0.7,dr] (0,0) -- (1,1);
\draw[arrow=0.4,rounded corners,d] (1,-1.5) -- (1,0) -- (-0.25,1);
}
\end{equation}
which is an equality that will be used in what follows.

We also impose the following normalization condition on the fugacities:
\begin{pty}\label{pty:norm}
For any $X,Y\in L_d$ such that 
$\langle \vf_X, \tau \vf_Y \rangle = -1$,
\[
\tikz[baseline=0,scale=1.5]{
\rh{X}{Y}{X}{Y}
}
=
\tikz[baseline=0,xscale=0.5]
{
\draw[arrow=0.3,dr] (-1,-1) node[below] {$\m X$} -- (1,1) node[above] {$\m X$};
\draw[arrow=0.3,dg] (1,-1) node[below] {$\m Y$} -- (-1,1) node[above] {$\m Y$};
}
=1
\]
(independent of $u$).
\end{pty}

\junk{Note that the condition
there exists a $Z$ such that $\tau^2\vec f_X+\vec f_Y+\tau\vec f_Z=0$,
is such a $Z$ exists, it is unique {minuscule}}
There is a remaining gauge freedom on the fugacities, namely one can
multiply any vertex by the product of $\prod_{\text{edges}} \gamma(\text{color},\text{label})^{\pm1}$
where the $\gamma$s are arbitrary parameters and the sign of the exponent depends on the orientation of the edge;
e.g.,
\[
\begin{tikzpicture}[baseline=0.5cm]
\draw[arrow=0.6,dr] (0,0.5) -- (0.5,1) node[above] {$\m Z$};
\draw[arrow=0.6,dg] (0,0.5) -- (-0.5,1) node[above] {$\m X$};
\draw[arrow=0.6,db] (0,0) node[below] {$\m Y$} -- (0,0.5);
\end{tikzpicture}
\qquad \mapsto \qquad
\frac{\gamma(\text{green},X)\ \gamma(\text{red},Z)}
{\gamma(\text{blue},Y)} \ 
\begin{tikzpicture}[baseline=0.5cm]
\draw[arrow=0.6,dr] (0,0.5) -- (0.5,1) node[above] {$\m Z$};
\draw[arrow=0.6,dg] (0,0.5) -- (-0.5,1) node[above] {$\m X$};
\draw[arrow=0.6,db] (0,0) node[below] {$\m Y$} -- (0,0.5);
\end{tikzpicture}
\]
These rescalings preserve properties~\ref{pty:factor}--\ref{pty:norm}.
We now get rid of this freedom by imposing
% We impose that for each triangle \uptri{X}{Y}{Z} or \downtri{X}{Y}{Z} of the form of Eq.~\eqref{eq:stdtri},
\begin{equation}\label{eq:norm}
\tikz[baseline=-2mm,scale=1.5]{\uptri{Y}{YX}{X} } =
\tikz[baseline=-2mm,scale=1.5]{\uptri{i}{i}{i} } =
1
\qquad \text{likewise for all rotations $\Delta$ and $\nabla$}
\end{equation}
where $YX$ varies over valid multinumbers and $i$ varies over $0,\ldots,d$.
Indeed, we can use the $\Delta$ triangles alone (say)
to fix the $\gamma(\text{color},X)$
inductively in $|X|$ (number of digits of $X$), and then
the $\nabla$ triangle condition follows from property~\ref{pty:norm}
(noting that the weight conservation from property \ref{pty:ybe}
for the triangle 
\uptri{X}{Y}{Z} implies $\langle \vf_X, \tau \vf_Y \rangle = -1$).
The only remaining gauge freedom in the choice of basis vectors
comes in choosing a weight vector for each weight $\vf_i, \tau \vf_i$,
$i=0,\ldots,d$. These $2(d+1)$ remaining scale parameters can be blamed on our
$2(d+1)$-torus whose weight lattice is $\Lambda^{1+d}$. 

\junk{is it completely obvious, that even equivariantly, this fixes
  the normalizations of weight vectors?}

Finally, one more graphical notation is needed.
Given a positive integer $n$, a permutation $\sigma\in \mathcal S_n$, and a color $\in\{\text{red},\text{green},\text{blue}\}$,
we consider the diagram of $\sigma$ made of lines in that color, with parameters $u_1,\ldots,u_n$; say for blue,
\[
\sigma=(13425)\qquad\longrightarrow\qquad
\tikz[baseline=1cm]{
\draw[db,arrow=0.5]
(1,0) -- (1,2) node[above,black] {$\ss u_1$};
\draw[db,arrow=0.5]
(2,0) -- (3,2) node[above,black] {$\ss u_3$};
\draw[db,arrow=0.5]
(3,0) -- (4,2) node[above,black] {$\ss u_4$};
\draw[db,arrow=0.5]
(4,0) -- (2,2) node[above,black] {$\ss u_2$};
\draw[db,arrow=0.5]
(5,0) -- (5,2) node[above,black] {$\ss u_5$};
}
\]
Thanks to the Yang--Baxter equation \eqref{eq:ybe}, any reduced word can be used
(and in fact, thanks to the unitarity equation \eqref{eq:unit}, reducedness is unnecessary).
Note that the numbering of the spectral parameters is the increasing one at the top. 
In the dual picture, we'll denote the corresponding operation by a rectangle labeled $\sigma$,
the orientation of the rectangle determining as usual the color of the corresponding lines.

Equivariant puzzles of size $n$ are defined as collections of vertical rhombi
plus a row of $n$ $\Delta$s at the bottom,
forming together an equilateral triangle of size $n$.
In the dual picture (which will be displayed in the proof of the next proposition), 
the spectral parameters attached to the lines
are chosen to be $u_1,\ldots,u_n$ from left to right at the bottom,
and therefore $\beta u_1,\ldots,\beta u_n$ on the left and $\alpha u_1,\ldots,\alpha u_n$
on the right.

In the rest of this section, we assume implicitly that
properties~\ref{pty:factor}--\ref{pty:norm} are satisfied (in fact, in
the present formalism, the very definition just given of puzzles
relies on property~\ref{pty:factor}), and that the gauge freedom is
fixed by \eqref{eq:norm}.

\subsection{Consequences of the properties}\label{sec:finalproof}

\begin{prop}\label{prop:key}
Given $\sigma\in \mathcal S_n$, one has
\[
\begin{tikzpicture}[baseline=5mm]
\draw[thick] (0,0) -- (2,0) -- ++(120:2) -- cycle;
\draw[thick] (0,-0.4) -- (2,-0.4); \draw (0,0) -- (0,-0.4); \draw (2,0) -- (2,-0.4); \node at (1,-0.2) {$\sigma$};
\end{tikzpicture}
=
\begin{tikzpicture}[baseline=5mm]
\draw[thick] (0,0) -- (2,0) -- ++(120:2) -- cycle;
\draw[thick] (150:0.4) -- ++(60:2);
\draw (0,0) -- (150:0.4) (60:2) -- ++(150:0.4);
\path (60:1) ++(150:0.2) node[rotate=60] {$\sigma$};
\begin{scope}[xshift=2cm]
\draw[thick] (30:0.4) -- ++(120:2);
\draw (0,0) -- (30:0.4) (120:2) -- ++(30:0.4);
\path (120:1) ++(30:0.2) node[rotate=-60] {$\sigma$};
\end{scope}
\end{tikzpicture}
\]
where the boundaries are fixed to be
three given strings of length $n$.
\end{prop}

\begin{proof}
The proof is essentially obvious since in the dual graphical representation, the various lines connect
the same locations on the boundaries in the l.h.s.\ and the r.h.s. However, since this proposition is crucial,
we shall prove it in detail.

Clearly, we can limit ourselves to the case that $\sigma$ is a simple
transposition. Once dualized, the required series of equalities looks
as follows (where for the purpose of illustration we have set $n=4$):
\begin{align*}
\text{l.h.s.}
&=\begin{tikzpicture}[baseline=0]
\foreach \i in {1,...,4} \draw[dg,arrow=0.4] (\i,0) -- node[left=-1mm,pos=0.8,black] {$\ss \beta u_\i$} ++(-2,2);
\foreach \i in {1,...,4} \draw[dr,arrow=0.4] (\i,0) -- node[right=-1mm,pos=0.8,black] {$\ss \alpha u_\i$} ++(2,2);
\draw[db,invarrow] (1,0) -- node[left,pos=0.8,black] {$\ss u_1$} (1,-2);
\draw[db,invarrow] (4,0) -- node[right,pos=0.8,black] {$\ss u_4$} (4,-2);
\draw[rounded corners,db,invarrow=0.4] (2,0) -- (2,-0.5) -- (3,-1.5) -- node[right,pos=0.5,black] {$\ss u_2$} (3,-2);
\draw[rounded corners,db,invarrow=0.4] (3,0) -- (3,-0.5) -- (2,-1.5) -- node[left,pos=0.5,black] {$\ss u_3$}(2,-2);
\end{tikzpicture}
\\
&=
\begin{tikzpicture}[baseline=0]
\foreach \i in {1,3,4} \draw[dg,arrow=0.4] (\i,0) -- node[left=-1mm,pos=0.8,black] {$\ss \beta u_\i$} ++(-2,2);
\foreach \i in {1,3,4} \draw[dr,arrow=0.4] (\i,0) -- node[right=-1mm,pos=0.8,black] {$\ss \alpha u_\i$} ++(2,2);
\draw[dg,arrow=0.4] (3,-1) -- (2,0) -- node[left=-1mm,pos=0.8,black] {$\ss \beta u_2$} ++(-2,2);
\draw[dr,arrow=0.3,rounded corners] (3,-1) -- ++(0.25,0.25) -- ++(-1,1) -- node[right=-1mm,pos=0.8,black] {$\ss \alpha u_2$} ++(1.75,1.75);
\draw[db,invarrow] (1,0) -- node[left,pos=0.8,black] {$\ss u_1$} (1,-2);
\draw[db,invarrow] (4,0) -- node[right,pos=0.8,black] {$\ss u_4$} (4,-2);
\draw[rounded corners,db,invarrow=0.4] (3,-1) -- node[right,pos=0.5,black] {$\ss u_2$} (3,-2);
\draw[rounded corners,db,invarrow=0.4] (3,0) -- (3,-0.5) -- (2,-1.5) -- node[left,pos=0.5,black] {$\ss u_3$}(2,-2);
\end{tikzpicture}
&&\text{using \eqref{eq:qtri}}
\\
&=
\begin{tikzpicture}[baseline=0]
\foreach \i in {1,3,4} \draw[dg,arrow=0.4] (\i,0) -- node[left=-1mm,pos=0.8,black] {$\ss \beta u_\i$} ++(-2,2);
\foreach \i in {1,3,4} \draw[dr,arrow=0.4] (\i,0) -- node[right=-1mm,pos=0.8,black] {$\ss \alpha u_\i$} ++(2,2);
\draw[dg,arrow=0.4] (3,-1) -- (2,0) -- node[left=-1mm,pos=0.8,black] {$\ss \beta u_2$} ++(-2,2);
\draw[dr,arrow=0.3,rounded corners] (3,-1) -- ++(1,1.5) -- node[left=-1mm,pos=0.9,black] {$\ss \alpha u_2$} ++(0,1.5);
\draw[db,invarrow] (1,0) -- node[left,pos=0.8,black] {$\ss u_1$} (1,-2);
\draw[db,invarrow] (4,0) -- node[right,pos=0.8,black] {$\ss u_4$} (4,-2);
\draw[rounded corners,db,invarrow=0.4] (3,-1) -- node[right,pos=0.5,black] {$\ss u_2$} (3,-2);
\draw[rounded corners,db,invarrow=0.4] (3,0) -- (3,-0.5) -- (2,-1.5) -- node[left,pos=0.5,black] {$\ss u_3$}(2,-2);
\end{tikzpicture}
&&\text{using \eqref{eq:qtri2} and \eqref{eq:ybe}}
\\
&=
\begin{tikzpicture}[baseline=0]
\foreach \i in {1,4} \draw[dg,arrow=0.4] (\i,0) -- node[left,pos=0.8,black] {$\ss \beta u_\i$} ++(-2,2);
\foreach \i in {1,4} \draw[dr,arrow=0.4] (\i,0) -- node[right,pos=0.8,black] {$\ss \alpha u_\i$} ++(2,2);
\draw[dg,arrow=0.4,rounded corners] (2.5,-0.5) -- ++(0,1) -- node[left,pos=0.8,black] {$\ss \beta u_3$} ++(-1.5,1.5);
\draw[dr,arrow=0.4] (2.5,-0.5) -- node[right=-1mm,pos=0.8,black] {$\ss \alpha u_3$} ++(2.5,2.5);
\draw[dg,arrow=0.4,rounded corners] (3,-1) -- ++(-0.25,1.25) -- (1.75,0.5) -- node[left=-2mm,pos=0.8,black] {$\ss \beta u_2$} (0,2);
\draw[dr,arrow=0.3,rounded corners] (3,-1) -- ++(1,1.5) -- node[left=-1mm,pos=0.9,black] {$\ss \alpha u_2$} ++(0,1.5);
\draw[db,invarrow] (1,0) -- node[left,pos=0.8,black] {$\ss u_1$} (1,-2);
\draw[db,invarrow] (4,0) -- node[right,pos=0.8,black] {$\ss u_4$} (4,-2);
\draw[rounded corners,db,invarrow=0.4] (3,-1) -- node[right,pos=0.5,black] {$\ss u_2$} (3,-2);
\draw[rounded corners,db,invarrow=0.4] (2.5,-0.5) -- (2,-1.5) -- node[left,pos=0.5,black] {$\ss u_3$}(2,-2);
\end{tikzpicture}
&&\text{using \eqref{eq:qtri2}}
\\
&=
\begin{tikzpicture}[baseline=0]
\draw[dg,arrow=0.4] (1,0) -- node[pos=0.8,left=-2mm,black] {$\ss ru_1$} ++(-2,2);
\draw[dg,arrow=0.4,rounded corners] (2,0) -- ++(-1,1) -- node[pos=0.9,left=-2mm,black] {$\ss ru_3$} ++(0,1);
\draw[dg,arrow=0.3,rounded corners] (3,0) -- ++(-1,1) -- ++(-1.5,0.5) -- node[pos=0.4,left=-2mm,black] {$\ss ru_2$} ++(-0.5,0.5);
\draw[dg,arrow=0.4] (4,0) -- node[pos=0.9,left=-2mm,black] {$\ss ru_4$} ++(-2,2);
\draw[dr,arrow=0.4] (1,0) -- node[pos=0.9,right,black] {$\ss \alpha u_1$} ++(2,2);
\draw[dr,arrow=0.3,rounded corners] (2,0) -- ++(1,1) -- ++(1.5,0.5) -- node[pos=0.2,right=-1mm,black] {$\ss \alpha u_3$} ++(0.5,0.5);
\draw[dr,arrow=0.4,rounded corners] (3,0) -- ++(1,1) -- node[pos=0.9,right=-1mm,black] {$\ss \alpha u_2$} ++(0,1);
\draw[dr,arrow=0.4] (4,0) -- node[pos=0.8,right,black] {$\ss \alpha u_4$} ++(2,2);
\foreach \i/\w in {1/1,2/3,3/2,4/4} \draw[db,invarrow] (\i,0) -- node[pos=0.7,right] {$\ss u_\w$} (\i,-1.5);
\end{tikzpicture}
=r.h.s.
&&\text{using \eqref{eq:ybe}}
\end{align*}
\end{proof}

It is interesting to note that if we allowed puzzles to have arbitrary
boundary labels (multinumbers, not just single numbers) then the
multiplication they define would not be associative. 
We need some results about the importance of this single-number sector,
based on the following technical lemma.

\begin{lem}\label{lem:rightward}
  Let $X$ be a valid multinumber, and $\vf_X \in \Lambda^{1+d}$ its 
  associated weight. Then the projection of $\vf_X$ to the $0$th factor 
  of $\Lambda$ points weakly to the right, and strictly to the right 
  unless $X$ is $0$, is $3(2(10))$, or lacks $0$ entirely.
\end{lem}

To put this statement in context, we draw the vectors 
$\vf_0, \tau \vf_0, \tau^2 \vf_0 \in \Lambda$:

\begin{center}
\begin{tikzpicture}[>=latex]
\matrix[column sep=0.5cm,row sep=0.5cm,cells={scale=2}]
{
\node{$\vf_0$};
&
\node{$\tau \vf_0$};
&
\node{$\tau^2 \vf_0$};
\\
\draw[->,blue] (0,-0.125) -- ++(90:0.25);
&
\draw[->,blue] (0,+0.0625) -- ++(210:0.25);
&
\draw[->,blue] (-0,0.0625) -- ++(-30:0.25);
\\
}; 
\end{tikzpicture}
\end{center}  


\begin{proof}
  Multinumbers come in
  six types: $0$, $X0$, $X(Y0)$, $3(2(10))$, $(3(2(10)))0$,
  and those not involving $0$.
  We draw the first five here in their minimal puzzle environments, 
  the better to calculate the contributions (shown here in blue)
  of their $\vf$s %don't make this s into a possessive
  to the $0$th factor of $\Lambda$. 
  (The multinumbers not involving $0$ contribute nothing
  in the $0$th factor.) 

\begin{center}
\begin{tikzpicture}[>=latex]
\matrix[column sep=0.5cm,row sep=0.5cm,cells={scale=2}]
{
      \uptri{0}{0}{0}
      \draw[->] (NW.center) -- ++(-30:0.25);
      \draw[->] (NE.center) -- ++(210:0.25);
&
      \uptri{X}{X0}{0}
      \draw[->] (NE.center) -- ++(210:0.25);
&
\uptri{X}{X(Y0)}{}\node at (NE) {$Y0$};
\begin{scope}[xshift=0.5cm]\downtri{0}{Y}{}\end{scope}
\draw[->] (NW.center) -- ++(150:0.25);
&
\uptri{3}{3(2(10))}{}\node at (NE) {$2(10)$};
\begin{scope}[xshift=0.5cm]\downtri{}{2}{}\end{scope}\node at (NW) {$10$};
\begin{scope}[xshift=1cm]\uptri{}{0}{1}\end{scope}
\draw[->] (horiz.center) -- ++(90:0.25);
&
\uptri{}{(3(2(10)))0}{0}\node at (NW) {$3(2(10))$};
\draw[->] (NE.center) -- ++(210:0.25);
\begin{scope}[xshift=-0.5cm]\downtri{}{2(10)}{3}\end{scope}
\begin{scope}[xshift=-0.5cm,yshift=0.866025cm]\uptri{2}{}{}\end{scope}\node at (NE) {$10$};
\begin{scope}[yshift=0.866025cm]\downtri{0}{1}{}\end{scope}
\draw[->] (NW.center) -- ++(150:0.25);
\\
\draw[->,blue] (0,-0.125) -- ++(90:0.25);
&
\draw[->,blue] (0,-0.0625) -- ++(30:0.25);
&
\draw[->,blue] (0.25,0.0625) -- ++(-30:0.25);
&
\draw[->,blue] (0.5,0.125) -- ++(-90:0.25);
&
\draw[->,blue] (-0.25,0) -- ++(0:0.433);
\\
};
\end{tikzpicture}
\end{center}  
\end{proof}

\begin{prop}\label{prop:singlenum}
  Let $P$ be a size $n$ triangle made of puzzle pieces, % (for $d\leq 3$),
  where the Northwest and Northeast sides have only single-number
  labels $0$, $1$, $2$, $3$.

  If $P$ has the same content on NW and NE,
  then the South side is also single-number labels (with that same content).
  The $120^\circ,240^\circ$ rotations of the statement also hold.
  Conversely, if the contents on the (all single-number) NW and NE sides
  differ, then the S side cannot be all single-number.  
\end{prop}

\begin{proof}
  Let $X(j)$, $j=1,\ldots,n$ be the multinumbers across the South side.
  The Green's theorem argument
  and the assumptions about the NW, NE sides tell us that 
  $\sum_{j=1}^n \vf_{X(j)} \in span(\vf_0,\vf_1,\vf_2,\vf_3)$,
  i.e. not using the $\tau\vf_0,\tau\vf_1,\tau\vf_2,\tau\vf_3$ basis elements.

  This motivates an equivalent, if more general-looking, proposition: 
  if $X(j),$ $j=1,\ldots,n$ is a list of multinumbers such
  that $\sum_{j=1}^n \vf_{X(j)}$ lies in $span(\vf_0,\vf_1,\vf_2,\vf_3)$,
  then the only $X(j)$s involving $0$ actually have $X(j)=0$.
  Once we excise them from the list, subtract $1$ from every
  number in every remaining $X(j)$ (again obtaining valid multinumbers, 
  by the functoriality property of multinumbers from \S\ref{ssec:funct}),
  and use induction on $d$, we find that each multinumber $X(j)$ is 
  a single-number.
  
%  Let $n_i$, $i \in [0,3]$ be the number of $i$-labels on the NW or NE side.

  We consider now the contribution ``$\pi_0(\vf_{X(j)})$'' 
  of each $\vf_{X(j)}$ to the $0$th copy of $\Lambda$ in $\Lambda^{1+d}$. 

  A $d=0$ puzzle has only $0$-labels, so trivially achieves the
  condition we seek, namely that the only multinumbers $X(j)$
  involving $0$s are exactly $0$s.

  In a $d=1$ puzzle, only the labels $0,1,10$ occur.
  Since we know the sum $\sum_{j=1}^n \pi_0(\vf_{X(j)})$
%  (projected to the $0$th copy of $\Lambda$) 
  must be parallel to $\vf_0$ (drawn here as vertical), 
  and by lemma \ref{lem:rightward}
  these vectors $\pi_0(\vf_0),\pi_0(\vf_1)$ point weakly right while 
  $\pi_0(\vf_{10})$ points strictly right, there can be no $\pi_0(\vf_{10})$s.
  For $d=1$ that rules out the $10$ label, leaving only the $0,1$ labels.

  In a $d\leq 2$ puzzle, the only labels including $0$ are $0, X0, 2(10)$,
  and the same rightward-pointing argument applies. Again we learn the
  only $\{X(j)\}$ including $0$ are equal to $0$.

  In a $d=3$ puzzle, this rightward-pointing argument shows only that any label
  involving $0$ must be $0$ or $3(2(10))$. But the same argument applied
  to study $3$s in labels shows that any label involving $3$ must be
  $3$ or $((32)1)0$; in particular, not $3(2(10))$.  
  Consequently, neither the $3(2(10))$ nor $((32)1)0$ labels can appear. 
  So once again, any label involving $0$ must be $0$, and we can apply
  the inductive argument from above.

  For the converse, pick $i$ such that there is a different number of
  $i$ labels on the NW and NE sides. Then the projection to the $i$th
  $\Lambda$ factor is not vertical, and cannot be canceled by
  single-number $\vec f_X$s from the South side, 
  since each $\vec f_i$ is vertical and each $\vec f_{j\neq i}$
  projects to $\vec 0$ in the $i$th factor.
\end{proof}


\begin{prop}\label{prop:weight}
\begin{enumerate}
\item Single-color crossings preserve single-numbers, i.e.,
\begin{equation}\label{eq:e}
\text{if }
\tikz[baseline=0,xscale=0.5]
{
\draw[arrow=0.3,d] (-1,-1) node[below] {$\m i$} -- (1,1) node[above] {$\m l$};
\draw[arrow=0.3,d] (1,-1) node[below] {$\m j$} -- (-1,1) node[above] {$\m k$};
}
\ne0,\text{ then}
\quad
i,j\in \{0,\ldots,d\}
\ 
\Leftrightarrow
\ 
k,l\in \{0,\ldots,d\}
\end{equation}
(where the lines have arbitrary, but identical, colors).
\item 
For $i\in \{0,\ldots,d\}$,
\begin{equation}\label{eq:e2}
\tikz[baseline=0,xscale=0.5]
{
\draw[arrow=0.3,d] (-1,-1) node[below] {$\m i$} -- (1,1) node[above] {$\m k$};
\draw[arrow=0.3,d] (1,-1) node[below] {$\m i$} -- (-1,1) node[above] {$\m j$};
}
\ne 0\
\text{ or }
\tikz[baseline=0,xscale=0.5]
{
\draw[arrow=0.3,d] (-1,-1) node[below] {$\m j$} -- (1,1) node[above] {$\m i$};
\draw[arrow=0.3,d] (1,-1) node[below] {$\m k$} -- (-1,1) node[above] {$\m i$};
}
\ne0
\quad\Rightarrow\quad
i=j=k
\end{equation}
where again the lines have identical colors.
\item If $\omega$ is a weakly increasing single-number string, then
\begin{equation}\label{eq:empty}
\tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\omega}{\mu}}\ne 0
\quad\Rightarrow\quad
\lambda=\mu=\omega
\end{equation}
for all single-number strings $\lambda$ and $\mu$, % of the same content,
i.e., having $\omega$ at the bottom forces it on the other two sides.
Moreover, the puzzle is unique, and along each diagonal (NW/SE or NE/SW)
the labels on the non-horizontal edges are constant.

Similarly,
if $\agemo$ is a weakly decreasing single-number string, then
\begin{equation}\label{eq:emptyb}
\tikz[scale=1.8,baseline=-4mm]{\downtri{\lambda}{\agemo}{\mu}}\ne 0
\quad\Rightarrow\quad
\lambda=\mu=\agemo
\end{equation}
for all single-number strings $\lambda$ and $\mu$.
\end{enumerate}
\end{prop}

The first two of these will derive from the same source:

\begin{lem}
  Let $V$ be a $T$-representation with weights $P$ and weight 
  basis $(\vec v_p)$, and $F$ a face of the convex hull of $P$.
  Let $R \in End(V\tensor V)$ be $T$-equivariant. 
  If $\vec v_p,\vec v_q, \vec v_r, \vec v_s$ are
  basis vectors with weights $p,q,r,s \in F$,
  and $R_{\vec v_p \vec v_q}^{\vec v_r \vec v_s} \neq 0$
  or $R^{\vec v_p \vec v_q}_{\vec v_r \vec v_s} \neq 0$, 
  then $r,s \in F$ as well.
\end{lem}

\begin{proof}
  Since $F$ is a face of the convex hull, it is defined by the
  tightness of some inequality $\langle \vec a, p \rangle \geq c$
  for some $\vec a\in \lie{t}$ generating some one-parameter subgroup $A\leq T$.
  Equivalently, all the $A$-weights in $V$ are $\geq c$, and 
  those on $F$ span the $c$ weight space. 

  Then the only basis vectors $\vec v_m \tensor \vec v_n$ 
  of $A$-weight $2c$ are those with $m,n \in F$, 
  and $R$ must preserve this $A$-weight space of $V\tensor V$,
  giving the claim.  
\end{proof}

\begin{proof}[Proof of proposition~\ref{prop:weight}.]
  We'll apply this lemma when $V$ is a representation $V^{X_{2d}}_\lambda$ of 
  $X_{2d} = A_2,D_4,E_6$, and $P = W_{X_{2d}}\cdot \lambda$;
  our $\lambda$ will be such that its projection to the $A_d$ weight lattice
  is the fundamental weight $\omega_1$.
  Hence the $A_d$-subrepresentation containing the
  high weight vector has the standard basis indexed by $\{0,\ldots,d\}$.
  To get part (1), we take $F$ to be the face containing exactly
  the vertices $\{0,\ldots,d\}$, 
  and use theorem \ref{thm:classif}(\ref{item:AdFace}). \junk{broken ref}
  Shrinking $F$ to its $a$th vertex (then applying the lemma) gets us part (2).
  
  For part (3),
  first observe that the Green's theorem argument shows that the content
  on the three sides must be the same. For convenience we assume that
  the lowest number occurring is $0$, since if it is $i>0$ we can 
  simply subtract $i$ from all numbers appearing and work instead with
  that equally valid puzzle. 

  By the weak increase across the South side, the leftmost label
  is smallest, hence $0$. There are no $\uptri{i}{0}{0i}$ pieces
  for $i>0$ (since $|f_{0i}|^2 = 4-2a \neq 2$),
  so the leftmost triangle on the South side must be a $\uptri{0}{0}{0}$.

  Let $j$ be the leftmost label on the Northeast side, and let $P'$
  be the size $n-1$ triangle made by removing the pieces touching
  the Northwest side. (We don't know yet that the newly exposed Northwest 
  labels are single numbers, i.e.¸ that $P'$ is itself a puzzle.)

\begin{center}
\begin{tikzpicture}
\draw[thick,black] (0,0) -- node[edgelabel] {$0$} ++(1,0) -- ++(3,0)
-- ++(120:3) -- node[edgelabel] {$j$} ++(120:1) -- ++(240:3) -- node[edgelabel] {$0$} ++(240:1)
(1,0) -- ++(60:3) (1,0) -- node[edgelabel] {$0$} ++(120:1);
\node at (2.5,1) {$P'$};
\end{tikzpicture}
\end{center}

  Assume for contradiction that $j>0$. Rotate $P$ $120^\circ$ counterclockwise
  for ease of comparison to proposition~\ref{prop:singlenum}.
  The NW side of the rotated $P'$ has one more $0$ than the NE side,
  so the vector sum over the NW, NE boundary labels (in the projection
  to the $0$th factor $\Lambda$ of $\Lambda^{1+d}$) points
  strictly rightward. Now we add in the vectors from the South
  boundary labels of $P'$ (as determined in lemma~\ref{lem:rightward}), 
  each of which points weakly rightward,
  and we reach a contradiction with the Green's theorem argument.

  Now that we've established $j=0$, the content of the NE and S side of
  (unrotated) $P'$ 
  is the same, and we can apply proposition~\ref{prop:singlenum} to $P'$.
  We learn that its Northwest side is all single numbers.
  Of course its South side is weakly increasing, so by induction on $n$
  the present proposition applies, i.e. $P'$ is uniquely determined
  by its South side, has fugacity $1$, and its NW side matches its
  South side (both read left to right).

  It remains to determine the pieces in the strip $P\setminus P'$,
  which we do one rhombus at a time from SW to NE,
  having already determined the bottom $\uptri{0}{0}{0}$.
  We will show inductively that each rhombus is of the form 
  $\rh{0}{i}{0}{i}$. A priori, the rhombus bears $\rh{0}{i}{}{j}$
  where $i,j$ are single numbers, so the weight on the NE side is $\vf_{(i0)j}$
  (whether or not that's a valid multinumber). Its norm-square is
  \begin{eqnarray*}
    |\vf_{(i0)j}|^2
    &=& |\vf_{i0}|^2 + |\vf_j|^2 + 2\langle \vf_{i0}, \tau \vf_j \rangle \\
    &=& 4 + 2\langle - \tau \vf_i - \tau^2 \vf_0, \tau \vf_j \rangle 
    = 4 
    - 2\langle \tau \vf_i, \tau \vf_j \rangle 
    - 2\langle  \vf_j, \tau \vf_0 \rangle 
    = 6 - 2
    \begin{cases}
      2 &\text{if $i=j$} \\
      2-a &\text{if $i\neq j$} 
    \end{cases}
  \end{eqnarray*}
  which is $2$ iff $i=j$, in which case (by Green's theorem) the
  NE label is $0$, continuing the induction.  
  Hence the Northwest labels on $P'$ are
  copied across these rhombi to the Northwest side of $P$, after the
  initial $0$, and the fugacities are $1$ as claimed.
\end{proof}

%\begin{prop}\label{prop:restrict}
Given a permutation $\sigma\in \mathcal S_n$ and a single-number string $\lambda$ of length $n$, define
\begin{equation}\label{eq:defS}
\mathbf{S}^\lambda_{\sss N}|_\sigma
:=
\begin{tikzpicture}[baseline=0]
\draw[thick] (-1,0.4) -- (1,0.4) (-1,-0.4) -- (1,-0.4); \draw (-1,-0.4) -- (-1,0.4) (1,-0.4) -- (1,0.4); \node at (0,0) {$\sigma$};
\node at (0,0.4) {$\m\lambda$};
\node at (0,-0.4) {$\m\omega$};
\end{tikzpicture}
\qquad
\mathbf{S}^\lambda_{\sss NW}|_\sigma
:=
\begin{tikzpicture}[baseline=0,rotate=60]
\draw[thick] (-1,0.4) -- (1,0.4) (-1,-0.4) -- (1,-0.4); \draw (-1,-0.4) -- (-1,0.4) (1,-0.4) -- (1,0.4); \node[transform shape] at (0,0) {$\sigma$};
\node at (0,0.45) {$\m\lambda$};
\node at (0,-0.4) {$\m\omega$};
\end{tikzpicture}
\qquad
\mathbf{S}^\lambda_{\sss NE}|_\sigma
:=
\begin{tikzpicture}[baseline=0,rotate=-60]
\draw[thick] (-1,0.4) -- (1,0.4) (-1,-0.4) -- (1,-0.4); \draw (-1,-0.4) -- (-1,0.4) (1,-0.4) -- (1,0.4); \node[transform shape] at (0,0) {$\sigma$};
\node at (0,0.45) {$\m\lambda$};
\node at (0,-0.4) {$\m\omega$};
\end{tikzpicture}
\end{equation}
where here $\omega$ is the unique weakly increasing string with the same content as $\lambda$.
%\end{prop}

\subsection{Main theorems}\label{ssec:mainthms}
This leads us to the heart of the paper:
\begin{thm}\label{thm:final}
  The following equality holds:
  \[
  \sum_\nu   \tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\nu}{\mu}}
  \mathbf{S}^\nu_{\sss N}|_\sigma
  =   \mathbf{S}^\lambda_{\sss NW}|_\sigma  \,  \mathbf{S}^\mu_{\sss NE}|_\sigma
  \]
  where the summation is over single-number strings with the same content as
  $\lambda$ and $\mu$.
\end{thm}

\begin{proof} %[Proof of theorem~\ref{thm:final}]
Start from proposition~\ref{prop:key} and set the NW side to $\lambda$,
the NE side to $\mu$ and the bottom side to $\omega$, the unique
weakly increasing string with the same content as $\lambda$ and $\mu$.
\[
\sum_\nu
\begin{tikzpicture}[baseline=5mm]
\draw[thick] (0,0) -- node {$\nu$} (2,0) -- node[xshift=1mm] {$\mu$} ++(120:2) -- node[xshift=-1mm] {$\lambda$} cycle;
\draw[thick] (0,-0.5) -- node {$\omega$} (2,-0.5); \draw (0,0) -- (0,-0.5); \draw (2,0) -- (2,-0.5); \node at (1,-0.25) {$\sigma$};
\end{tikzpicture}
\ =\
\begin{tikzpicture}[baseline=5mm]
\draw[thick] (0,0) -- node {} (2,0) -- node[xshift=1mm] {$\mu$} ++(120:2) -- node[xshift=-1mm] {$\lambda$} cycle;
\draw[thick] (0,-0.5) -- node {$\omega$} (2,-0.5); \draw (0,0) -- (0,-0.5); \draw (2,0) -- (2,-0.5); \node at (1,-0.25) {$\sigma$};
\end{tikzpicture}
\ =\
\begin{tikzpicture}[baseline=5mm]
\draw[thick] (0,0) -- node {$\omega$} (2,0) -- node[xshift=-0.5mm] {} ++(120:2) -- node[xshift=0.5mm] {} cycle;
\draw[thick] (150:0.5) -- node[xshift=-1mm] {$\lambda$} ++(60:2);
\draw (0,0) -- (150:0.5) (60:2) -- ++(150:0.5);
\path (60:1) ++(150:0.25) node[rotate=60] {$\sigma$};
\begin{scope}[xshift=2cm]
\draw[thick] (30:0.5) -- node[xshift=1mm] {$\mu$} ++(120:2);
\draw (0,0) -- (30:0.5) (120:2) -- ++(30:0.5);
\path (120:1) ++(30:0.25) node[rotate=-60] {$\sigma$};
\end{scope}
\end{tikzpicture}
\ =\
\sum_{\tilde\lambda,\tilde\mu}
\begin{tikzpicture}[baseline=5mm]
\draw[thick] (0,0) -- node {$\omega$} (2,0) -- node[xshift=-0.5mm] {$\tilde\mu$} ++(120:2) -- node[xshift=0.5mm] {$\tilde\lambda$} cycle;
\draw[thick] (150:0.5) -- node[xshift=-1mm] {$\lambda$} ++(60:2);
\draw (0,0) -- (150:0.5) (60:2) -- ++(150:0.5);
\path (60:1) ++(150:0.25) node[rotate=60] {$\sigma$};
\begin{scope}[xshift=2cm]
\draw[thick] (30:0.5) -- node[xshift=1mm] {$\mu$} ++(120:2);
\draw (0,0) -- (30:0.5) (120:2) -- ++(30:0.5);
\path (120:1) ++(30:0.25) node[rotate=-60] {$\sigma$};
\end{scope}
\end{tikzpicture}
\ =\
\begin{tikzpicture}[baseline=5mm]
\draw[thick]  (2,0) -- node[xshift=-0.5mm] {$\omega$} ++(120:2) -- node[xshift=0.5mm] {$\omega$} (0,0);
%\draw[thick] (0,0) -- node {$\omega$} (2,0) -- node[xshift=-0.5mm] {$\tilde\mu$} ++(120:2) -- node[xshift=0.5mm] {$\tilde\lambda$} cycle;
\draw[thick] (150:0.5) -- node[xshift=-1mm] {$\lambda$} ++(60:2);
\draw (0,0) -- (150:0.5) (60:2) -- ++(150:0.5);
\path (60:1) ++(150:0.25) node[rotate=60] {$\sigma$};
\begin{scope}[xshift=2cm]
\draw[thick] (30:0.5) -- node[xshift=1mm] {$\mu$} ++(120:2);
\draw (0,0) -- (30:0.5) (120:2) -- ++(30:0.5);
\path (120:1) ++(30:0.25) node[rotate=-60] {$\sigma$};
\end{scope}
\end{tikzpicture}
\]
The first and third equations are essentially applications 
of \eqref{eq:labeledges}.
By the first part of proposition~\ref{prop:weight}, 
the internal labels $\nu$, $\tilde\lambda$, $\tilde\mu$
are single-number strings (or more precisely, all other contributions 
to the sum vanish).

The third part of proposition~\ref{prop:weight} tells us that
$\tilde\lambda=\tilde\mu=\omega$, and that the triangle of the r.h.s.
is made of triangles and rhombi which are all of fugacity $1$
according to property~\ref{pty:norm} and gauge fixing condition
\eqref{eq:norm}.  Once rid of this triangle, we recognize on both
sides the definitions \eqref{eq:defS}, hence the result.
\end{proof}

\junk{
This equality is clearly closely related to the one in proposition~\ref{prop:key},
but the proof will require some additional technical lemmas.
}

One can redo the whole reasoning after ``reversal of
all the arrows''. More precisely, we note that property~\ref{pty:factor}
defines two types of trivalent vertices, one where two edges are outgoing,
as was used so far, and one where two edges are incoming, which we shall use 
now. In property~\ref{pty:ybe}, equations~\eqref{eq:ybe}, \eqref{eq:unit} and
\eqref{eq:equal} are invariant by reversal of arrows, whereas
eq.~\eqref{eq:qtri} turns into eq.~\eqref{eq:qtrirev}.

In the puzzle picture, it is customary to rotate the picture by $180^\circ$
so that lines are still oriented upwards; we then have an obvious
analogue of proposition~\ref{prop:key}, namely
\[
\begin{tikzpicture}[baseline=-5mm,scale=-1]
\draw[thick] (0,0) -- (2,0) -- ++(120:2) -- cycle;
\draw[thick] (0,-0.4) -- (2,-0.4); \draw (0,0) -- (0,-0.4); \draw (2,0) -- (2,-0.4); \node at (1,-0.2) {$\sigma$};
\end{tikzpicture}
=
\begin{tikzpicture}[baseline=-5mm,scale=-1]
\draw[thick] (0,0) -- (2,0) -- ++(120:2) -- cycle;
\draw[thick] (150:0.4) -- ++(60:2);
\draw (0,0) -- (150:0.4) (60:2) -- ++(150:0.4);
\path (60:1) ++(150:0.2) node[rotate=60] {$\sigma$};
\begin{scope}[xshift=2cm]
\draw[thick] (30:0.4) -- ++(120:2);
\draw (0,0) -- (30:0.4) (120:2) -- ++(30:0.4);
\path (120:1) ++(30:0.2) node[rotate=-60] {$\sigma$};
\end{scope}
\end{tikzpicture}
\]

We furthermore define
\[
\mathbf{S}_\lambda^{\sss N}|_\sigma
:=
\begin{tikzpicture}[baseline=0]
\draw[thick] (-1,0.4) -- (1,0.4) (-1,-0.4) -- (1,-0.4); \draw (-1,-0.4) -- (-1,0.4) (1,-0.4) -- (1,0.4); \node[rotate=180] at (0,0) {$\sigma$};
\node[rotate=180] at (0,0.4) {$\m\omega$};
\node at (0,-0.4) {$\m\lambda$};
\end{tikzpicture}
\qquad
\mathbf{S}_\lambda^{\sss NW}|_\sigma
:=
\begin{tikzpicture}[baseline=0,rotate=60]
\draw[thick] (-1,0.4) -- (1,0.4) (-1,-0.4) -- (1,-0.4); \draw (-1,-0.4) -- (-1,0.4) (1,-0.4) -- (1,0.4); \node[transform shape,rotate=180] at (0,0) {$\sigma$};
\node[rotate=180] at (0,0.4) {$\m\omega$};
\node at (0,-0.35) {$\m\lambda$};
\end{tikzpicture}
\qquad
\mathbf{S}_\lambda^{\sss NE}|_\sigma
:=
\begin{tikzpicture}[baseline=0,rotate=-60]
\draw[thick] (-1,0.4) -- (1,0.4) (-1,-0.4) -- (1,-0.4); \draw (-1,-0.4) -- (-1,0.4) (1,-0.4) -- (1,0.4); \node[transform shape,rotate=180] at (0,0) {$\sigma$};
\node[rotate=180] at (0,0.4) {$\m\omega$};
\node at (0,-0.35) {$\m\lambda$};
\end{tikzpicture}
\]
%\end{prop}
where $\lambda$ is read from left to right, 
but $\agemo$ denotes
$\omega$ read right to left (equivalently, it is the weakly decreasing
string with the same content as $\lambda$), and similarly \!\!\tikz[baseline=-1mm]{\node[rotate=180]{$\sigma$}}\!\! denotes the diagram of $\sigma$ rotated $180^\circ$.

Using the exact same reasoning as above (noting in particular
the $180^\circ$ symmetry of proposition~\ref{prop:weight}), 
we have the ``dual'' statement:
\begin{thm}\label{thm:dual}
The following equality holds:
\[
\sum_\nu 
\tikz[scale=1.8,baseline=0]{\downtri{\,\lambda}{\nu}{\mu}}
\mathbf{S}_\nu^{\sss N}|_\sigma
=
\mathbf{S}_\lambda^{\sss NW}|_\sigma
\,
\mathbf{S}_\mu^{\sss NE}|_\sigma
\]
(where all labels are read as usual from left to right).
\end{thm}
This is to be compared with the primed theorems of \cite{artic68}.
With not much more work, 
we could also obtain analogues of the double primed theorems of \cite{artic68},
but we shall refrain from doing so here.

In the rest of this section, the strategy is to define, using the
representation theory of quantized affine algebras, systems of
fugacities which satisfy the properties stated in \S\ref{sec:genproof}. 
The fugacities of rhombi obtained this way will be more general than
needed for the purposes of this paper, and we shall take a limit
($q\to0$ where $q$ is a parameter in these fugacities) to recover the
puzzle rule that we are trying to prove.
(We will interpret geometrically this more general solution
in \cite{SchubII}.)





\subsection{$d=2$ and triality in $D_4$}\label{sec:d2}
\subsubsection{$R$-matrices}\label{ssec:Rd2}
To each line (or color of line) 
we now attach a representation of the quantized affine
algebra $U_q(\mathfrak{d}_4^{(1)})$. There are three colors of lines, 
which correspond
to the three fundamental representations of $U_q(\mathfrak{d}_4)$ 
that are related by triality.
We assign to green (resp.\ blue, red)
lines the representation $V_{\omega_1}$ (resp.\ $V_{\omega_2}$, $V_{\omega_3}$)
with weights given by lemma~\ref{lem:greend2} (resp.\ with $\tau$, $\tau^2$
times these weights). It is known \cite{CP-book}
that all three representations can then be extended %``affinized'' 
to evaluation representations $V_{\omega_i}(u)$ of $U_q(\mathfrak{d}_4^{(1)})$,
where $u$ is the spectral (evaluation) parameter.
Note that these $U_q(\mathfrak{d}_4)$ representations are self-dual, so that
their $U_q(\mathfrak{d}_4^{(1)})$ counterparts only differ from their dual by a shift
of the spectral parameter. 
%{In particular, shouldn't the blue
%  be dualized, like we have it in $d=3$? PZJ: this is precisely what this sentence answers}

Next we define $R$-matrices\footnote{We use here so-called
$\check R$-matrices, which are related to usual $R$-matrices
by permutation of the factors of the tensor product.} 
(which correspond to crossings of lines of various colors): $\check R_{i,j}$
will be an $U_q(\mathfrak{d}_4^{(1)})$-intertwiner from $V_{\omega_i}(u_1)\otimes V_{\omega_j}(u_2)$ to $V_{\omega_j}(u_2)\otimes V_{\omega_i}(u_1)$.
Let us for example consider representations $V_{\omega_3}(u_1)$ and $V_{\omega_1}(u_2)$,
i.e., red and green lines respectively. 
Then the corresponding $R$-matrix can be written as
\begin{equation}\label{eq:RD4}
\check R_{3,1}%{\omega_3,\omega_1}
=
\frac{1}{u_2-q^2u_1}
\left(
(u_1-q^4u_2)
P_{\omega_2}
+
%\frac{q^4-u_2/u_1}{1-q^4u_2/u_1}
%\frac{q^4u_1-u_2}{u_1-q^4u_2}
(u_2-q^4u_1)
P_{\omega_3+\omega_1}
\right)
\end{equation}
where $q$ is another indeterminate. 
Here $P_{\omega_2}$ and $P_{\omega_3+\omega_1}$ are operators of rank $8$ and $56$ respectively, implementing
the two channels of decomposition $V_{\omega_3}\otimes V_{\omega_1}\cong V_{\omega_2}\oplus V_{\omega_3+\omega_1}$ 
for the horizontal subalgebra $U_q(\mathfrak{d}_4)$
(here horizontal means that its action is independent of the spectral parameter). 
Note that we do not require $\check R_{3,1}$ to have the normalization of the universal
$R$-matrix, only that it commute with the $U_q(\mathfrak{d}_4^{(1)})$ action; 
its normalization is chosen for convenience. \junk{normalization of $P_i$s...}

\junk{The usual formulation of the $R$-matrix is
$R_{3,1}=\mathcal P_{1,3} \check R_{3,1}$, where $\mathcal P_{1,3}$ is the operator
from
$V_{\omega_1}\otimes V_{\omega_3}$
to
$V_{\omega_3}\otimes V_{\omega_1}$
that switches factors of the tensor product.}

In terms of puzzles, recall that $\check R_{3,1}$
parametrizes the fugacities of rhombi, cf Eq.~\eqref{eq:rhombus}:
\[
\tikz[baseline=0,scale=1.5]{
\rh{X}{Y}{Z}{W}
\pic[draw,angle radius=5mm] {angle=cb--ba--ad};\path (ba) node[above=1mm] {$\ss u$};
}
=
\tikz[baseline=0,xscale=0.5]
{
\draw[arrow=0.3,dr] (-1,-1) node[below] {$\m X$} -- node[pos=0.3,left,black] {$\ss u_1$} (1,1) node[above] {$\m Z$};
\draw[arrow=0.3,dg] (1,-1) node[below] {$\m Y$} -- node[pos=0.3,right,black] {$\ss u_2$} (-1,1) node[above] {$\m W$};
}
=
\check R_{3,1}{}_{XY}^{WZ}
\qquad
u=u_1/u_2
\]

Next, we observe that the $R$-matrix
\eqref{eq:RD4} satisfies 
\begin{equation}\label{eq:UD4}
\check R_{3,1}|_{u_1=q^{-2}u,\ u_2=q^2 u}=-\frac{(1+q^4)(1+q^2)}{q^2} P_{\omega_2}=UD
\end{equation}
\junk{the ugly prefactor is related to the normalization of the $P$s}
where $D: V_{\omega_3}(q^{-2}u)\otimes V_{\omega_1}(q^2u) \to V_{\omega_2}(u)$ and $U: V_{\omega_2}(u)\to V_{\omega_1}(q^2u)\otimes V_{\omega_3}(q^{-2}u)$ commute with the $U_q(\mathfrak{d}_4^{(1)})$ action. 
This is the analogue of property~\ref{pty:factor}, with $\alpha=q^{-2}$, $\beta=q^2$; that is, we can write
\[
\uptri{X}{Y}{Z}=
\begin{tikzpicture}[baseline=0.5cm]
\draw[arrow=0.6,dr] (0,0.5) --  node[pos=0.6,right,black] {$\ss \alpha u$} (0.5,1) node[above] {$\m Z$};
\draw[arrow=0.6,dg] (0,0.5) -- node[pos=0.6,left,black] {$\ss \beta u$} (-0.5,1) node[above] {$\m X$};
\draw[arrow=0.6,db] (0,0) node[below] {$\m Y$} -- node[pos=0.6,left,black] {$\ss u$} (0,0.5);
\end{tikzpicture}
=
U^{XZ}_Y
\qquad
\downtri{X}{Y}{Z}=
\begin{tikzpicture}[baseline=-0.5cm]
\draw[arrow=0.6,dr] (-0.5,-1) node[below] {$\m Z$} -- node[pos=0.6,left,black] {$\ss \alpha u$} (0,-0.5);
\draw[arrow=0.6,dg] (0.5,-1) node[below] {$\m X$} -- node[pos=0.6,right,black] {$\ss \beta u$} (0,-0.5);
\draw[arrow=0.6,db] (0,-0.5) -- node[pos=0.6,left,black] {$\ss u$} (0,0) node[above] {$\m Y$};
\end{tikzpicture}
=
D^Y_{ZX}
\]

$\check R_{3,1}$, as well as the matrices $U$ and $D$, are given in
appendix~\ref{app:Rd2}.  In particular we can check explicitly that
property~\ref{pty:norm} is satisfied, as well as \eqref{eq:norm}.

The definitions of $\check R_{1,2}, \check R_{2,3}$ are similar\junk{\footnote{%
  It may feel like we should be able to use $\tau$ to define two
  of these from the third. But Schubert calculus only has a 
  natural $\ZZ/3$-invariance in ordinary cohomology, or
  (as in \cite[\S 8]{BuchKGr}) in $K$-theory of Grassmannians,
  so we should not expect this $\ZZ/3$-invariance in $K$-theoretic
  Schubert calculus of $2$-step flag manifolds.
  {this comment is BS. the normalizations are different even in the
    rational case ($H$)}} }
to that of $\check R_{3,1}$, except we choose the normalization
differently:
\begin{equation}\label{eq:Rnorm}
\check R_{i,i+1}
=
\frac{u_1-q^4u_2}{u_2-q^4u_1}
P_{\omega_{i-1}}
+
%\frac{q^4-u_2/u_1}{1-q^4u_2/u_1}
%\frac{q^4u_1-u_2}{u_1-q^4u_2}
P_{\omega_i+\omega_{i+1}}
,\qquad
i=1,2
\end{equation}

Next, we consider $\check R_{i+1,i}$, 
$i=1,2,3$ (with indices understood mod $3$); 
to ensure that \eqref{eq:unit} is automatically satisfied 
for distinct colors of lines, we define them as
\[
\check R_{i+1,i}(u_1,u_2)=
(\check R_{i,i+1}(u_2,u_1))^{-1}
\]
where the notation indicates that we've permuted the roles of 
the spectral parameters $u_1$ and $u_2$ on the r.h.s.
\junk{ instead of invoking triality, it is more convenient to This
  definition ensures that \eqref{eq:unit} is automatically satisfied
  for distinct colors of lines. {or we could use triality and
    check if normalization is same or not} }

Finally, we must define $\check R_{i,i}$:
\begin{equation}\label{eq:RstarD4}
\check R_{i,i}=
%\frac{(u_1-q^8u_2)(u_2-q^2u_1)}{(u_2-q^8u_1)(u_1-q^2u_2)}
%\left(
\frac{(u_1-q^6u_2)(u_1-q^2u_2)}{(u_2-q^6u_1)(u_2-q^2u_1)}
P_0
+\frac{u_1-q^2u_2}{u_2-q^2u_1}
P_{\omega_4}
+P_{2\omega_i}
%\right)
\end{equation}
where the $P_*$ are projectors onto the various irreducible subrepresentations 
of $V_{\omega_i}\otimes V_{\omega_i}$ as $U_q(\mathfrak{d}_4)$-modules.
Note that $\check R_{i,i}$ satisfies 
$\check R_{i,i}(u_1,u_2)\check R_{i,i}(u_2,u_1)=1$, which is nothing
but \eqref{eq:unit} for identical colors of lines; 
in addition $\check R_{i,i}|_{u_1=u_2}=1$, which is \eqref{eq:equal}.

These $R$-matrices, with the prescribed choice of bases of $V_{\omega_i}$
($i=1,2,3$) specify the crossings of lines of all possible colors.

Looking at each equation of property~\ref{pty:ybe}, we note that
l.h.s.\ and r.h.s.\ commute with the $U_q(\mathfrak{d}_4^{(1)})$
action, so by Schur's lemma they must be proportional.  In fact, the
Yang--Baxter equation \eqref{eq:ybe} is homogeneous (i.e., independent
of the normalization of $R$-matrices) and is known to be satisfied by
the universal $R$-matrix. As explained above, our normalization also
ensures that unitarity equation \eqref{eq:unit}, as well as
\eqref{eq:equal}, are satisfied. There remain only the bootstrap
equations \eqref{eq:qtri}--\eqref{eq:qtrirev}. 
We leave it to the reader to check that
with the choice of normalization of \eqref{eq:RD4}, \eqref{eq:Rnorm}
and \eqref{eq:RstarD4}, these are indeed satisfied as well. 

\junk{this last paragraph must be removed or incorporated in 3.2:
  Lastly, we discuss property~\ref{pty:empty}. Note first that this
  holds trivially for the standard representation $V^{A_d}_{\omega_1}$ of $A_d$, 
  where the single numbers $\{0,\ldots,d\}$ index {\em all} the weights.
  Now let $V_\lambda$ be an irrep of $X_{2d}$ such that
  $\lambda$, projected to $A_d$'s weight lattice, is $\omega_1$.
  Then the $A_d$-summand of $V^{X_{2d}}_{\lambda}$ containing the
  high weight vector (a) is a copy of $V^{A_d}_{\omega_1}$, and
  (b) its weights are one full face $F$ 
  of the weight polytope of $V^{X_{2d}}_{\lambda}$.
  Consequently, the only tensor products of $V^{X_{2d}}_{\lambda}$ weight vectors 
  occurring on the face $2F$ of 
  the weight polytope of $(V^{X_{2d}}_{\lambda})^{\tensor 2}$
  are tensor products of pairs of weight vectors from $F$,
  which is exactly what (\ref{eq:e}) says.
  ...maybe this should go directly after prop \ref{pty:empty}.
  Also, is there such an $F$, in the $d=4$ case, where $\vf_d$ is
  no longer the high weight vector?}

\junk{issue of gradation: what exactly fixes the gradation of the BLUE
  lines?  the projector (triangle), of course.  and we can't quite
  invoke triality cause of that, annoying. maybe we can, insisting on
  the representation to be the dual one, i.e., transposing the
  $R$-matrix.  to check this in detail, one should write the projector
  with usual action, impose independence of $u$ of coefficients which
  should fix gradation.  }


\subsubsection{The limit $q\to0$}\label{ssec:q0d2}
Since all the properties of \S\ref{sec:genproof} are satisfied, we
can take the equality of theorem~\ref{thm:final} and carefully compute
the leading order as $q\to 0$.

We first discuss the ``rectangles'' in their three orientations, 
that is the $\mathbf{S}^\lambda|_\sigma$.
According to part (2) of proposition~\ref{prop:weight}, we can restrict $\check R_{i,i}$ to the single-number
sector, i.e., in the given basis, to a $9\times9$ matrix. One checks explicitly that these three matrices
are {\em identical}, and equal to
\begin{equation}\label{eq:Runi}
\check R_{\sss A}=
\left(
\begin{array}{ccccccccc}
 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & \frac{(1-q^2)u_2}{u_2-q^2 u_1} & 0 & \frac{q ({u_1}-{u_2})}{q^2 {u_1}-{u_2}} & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & \frac{(1-q^2)u_2}{u_2-q^2 u_1} & 0 & 0 & 0 & \frac{q ({u_1}-{u_2})}{q^2 {u_1}-{u_2}} & 0 & 0 \\
 0 & \frac{q ({u_1}-{u_2})}{q^2 {u_1}-{u_2}} & 0 & \frac{(1-q^2)u_1}{u_2-q^2 u_1} & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & \frac{(1-q^2)u_2}{u_2-q^2 u_1} & 0 & \frac{q ({u_1}-{u_2})}{q^2 {u_1}-{u_2}} & 0 \\
 0 & 0 & \frac{q ({u_1}-{u_2})}{q^2 {u_1}-{u_2}} & 0 & 0 & 0 & \frac{(1-q^2)u_1}{u_2-q^2 u_1} & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & \frac{q ({u_1}-{u_2})}{q^2 {u_1}-{u_2}} & 0 & \frac{(1-q^2)u_1}{u_2-q^2 u_1} & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\
\end{array}
\right)
\end{equation}
Theorem~\ref{thm:final} can then be rewritten
\begin{equation}\label{eq:final2}
\sum_\nu 
\tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\nu}{\mu}}
\mathbf{S}^\nu|_\sigma
=
\mathbf{S}^\lambda|_\sigma
\,
\mathbf{S}^\mu|_\sigma
\end{equation}
where the subscript of the $\mathbf{S}$s is irrelevant.

Define the \defn{nilHecke}\/ $R$-matrix to be
\begin{equation}\label{eq:defnil}
\check R_{\sss nil}
{}_{ij}^{kl}
:=
\begin{cases}
1&(k,l)=(i,j),\ i\le j\\
u_1/u_2&(k,l)=(i,j),\ i>j\\
1-u_1/u_2&(k,l)=(j,i),\ i<j\\
0&\text{otherwise}
\end{cases}
\qquad i,j,k,l\in \{0,\ldots,d\}
\end{equation}

By direct inspection, we have:
\begin{lem}\label{lem:D4a}
  As $q\to0$ at fixed $u_1,u_2$, one has
  \[
  \check R_{\sss A}{}_{ij}^{kl}=q^{\frac{1}{2}(-B(\vf_i,\vf_j)+B(\vf_k,\vf_l))}
  \left(
    \check R_{\sss nil}
    {}_{ij}^{kl}
    +O(q^2)
  \right)
  \]
  for all $i,j,k,l\in \{0,\ldots,d\}$, 
  noting that $B(\vf_i,\vf_j)=\text{sign}(i-j)$. 
\end{lem}

\begin{cor}\label{cor:schub}
  As at the end of \S\ref{ssec:funct}, let $\sigma \in \mathcal{S}_n$ 
  be a permutation and $\sigma'$ be its image in 
  $\prod_i \mathcal{S}_{p_i} \dom \mathcal{S}_n$, giving a $T$-fixed
  point on $P_-\dom GL_n(\CC)$. Then
  \begin{equation}\label{eq:almost}
    \mathbf{S}^\lambda|_\sigma
    =q^{-\ell(\lambda)} \left( S^\lambda|_{\sigma'}+O(q^2) \right)
  \end{equation}
  where $S^\lambda|_{\sigma'}$ is the restriction to the $\sigma'$ fixed point 
  of the $\lambda$ Schubert class.
\end{cor}

\junk{AK, fill this part? identify with sum over reduced subwords and
  then 4.4 of [KM]. AK: what's the plan, now that \S\ref{sec:pipe}
  exists? unrelated. we don't use that section here, just conclude
  directly by comparing with 4.4 of [KM], which is NOT the same as the
  pipedream formula, cf the comment ``Geometrically, ...'' at the end
  of \S\ref{sec:pipe}}

\begin{proof}
  $\mathbf{S}^\lambda|_\sigma$ is defined using a reduced wiring
  diagram $Q$ for $\sigma$, and extracting a matrix coefficient
  from a product $\prod_Q \check R$ of $\check R$-matrices.
  Each term in that product corresponds to a selection, at
  each crossing in $Q$, of either no crossing $(k,l)=(i,j)$
  or a transposition $(k,l)=(j,i)$; in the latter case we can
  only cross two wires so as to create an inversion
  (since $(\check R_{\ss nil})_{ij}^{jk} = 0$ if the crossing
  would destroy an inversion, namely, if $i>j$).

  As such, the $(\lambda,\sigma)$ matrix entry is a sum over 
  {\em reduced} subwords of $Q$ with product $\lambda$. 
  Note that this is not
  the usual formula \cite[theorem~2.3]{FK-Groth2} that gives an
  alternating sum over subwords with nilHecke product $\lambda$;\footnote{%
    The usual formula is based on 
    M\"obius inversion on a subword complex, and its coefficients
    $\pm 1$ derive from that complex being homeomorphic to a ball.
    The formula used here is subtler, in being based on 
    the subword complex being shellable; see \cite{KM-Schubert2}.
    A similar subtlety will be discussed in the proof of
    proposition~\ref{prop:groth}.}
  rather, it is the same indexing set as in the formula
  \cite[theorem~4.4]{KM-Schubert2}.

  It remains to match up the summands in $\mathbf S^\lambda|_\sigma$
  with those in \cite[theorem~4.4]{KM-Schubert2}.
  The ``absorbable reflections'' of that theorem~4.4 are exactly the
  near-misses of wires that have already crossed once and choose
  to not cross a second time, contributing factors $u_1/u_2$ 
  to the product as they should.
\end{proof}

Next we proceed similarly with the equivariant puzzle itself.  
Denote by $|a|$ the cardinality of a multinumber $a$ (number of $0,1,2$ it
contains), and by $\max(a)$ the maximum (the first!) of its elements.
\begin{lem}\label{lem:D4b}
  At fixed $u_1,u_2$,
  \begin{multline*}
    \check R_{3,1}(q^{-2}u_1,q^2u_2)_{XY}^{WZ}=
    (-q)^{\frac{1}{2}(B(\vf_X,\vf_Y)-B(\vf_W,\vf_Z))}
    \Bigg(
    O(q^2)+
    \\
    \left.
      \begin{cases}
        1
        &\exists T:\ \downtri{Y}{T}{X}\text{ and }\uptri{W}{T}{Z}\text{ admissible},
        \\
        &|W|+|Z|\le|X|+|Y|
        \text{ and }(|W|+|Z|<|X|+|Y|\text{ or } \max(Z)\le\max(Y))
        \\
        u_2/u_1
        &\exists T:\ \downtri{Y}{T}{X}\text{ and }\uptri{W}{T}{Z}\text{ admissible},
        \\
        &|W|+|Z|>|X|+|Y|
        \text{ or }(|W|+|Z|=|X|+|Y|\text{ and } \max(Z)>\max(Y))
        \\
        u_2/u_1-1& \rh{X}{Y}{Z}{W}\text{ is an equivariant piece from theorem~\ref{thm:HTd2}}
        \\
        0 & \text{otherwise}
      \end{cases}
    \right)
  \end{multline*}
  where an admissible triangle is one which is either of the form of \eqref{eq:d2tri} (up to rotation), 
  or a $K$-piece of theorem~\ref{thm:KTd2}.
  
  Similarly,
  \[
  U^{XZ}_Y = (-q)^{-\frac{1}{2}B(\vf_X,\vf_Z)}
  \left(
    \begin{cases}
      1
      &
      \uptri{X}{Y}{Z}\text{ admissible}
      \\
      0
      &
      \text{otherwise}
    \end{cases}
    \quad+O(q^2)
  \right)
  \]
\end{lem}

\begin{proof}
  This can be checked explicitly on the entries of the $R$-matrix and of $U$, 
  which are listed in appendix~\ref{app:Rd2}, noting that
  $\frac{1}{2}(B(\vf_X,\vf_Y)-B(\vf_W,\vf_Z))$ (resp.\ $-\frac{1}{2}B(\vf_X,\vf_Z)$) 
  is the inversion number of the rhombus (resp.\ triangle),
  given on the pictures inside a circle at the center of it.
\end{proof}

Summing the exponents $\frac{1}{2}B$s, the whole puzzle 
has a leading order in $q$ which is (at most) $q^{\sum\{\text{inversion numbers\}}}$, 
where the sum is over all triangles and rhombi
of the puzzle. According to lemma~\ref{lem:sympd1}, this sum computes
the variation of inversion numbers $\ell(\nu)-\ell(\lambda)-\ell(\mu)$.
The expression of lemma~\ref{lem:D4b} also coincides
with the fugacities from theorem~\ref{thm:KTd2}, including the $(-1)^{\sum\{\text{inversion numbers\}}}$ of $K$-pieces. We conclude that the contribution of a puzzle
is $q^{\ell(\nu)-\ell(\lambda)-\ell(\mu)}$ times its fugacity as in theorem~\ref{thm:KTd2} plus smaller terms as $q\to 0$.
Combining with corollary~\ref{cor:schub},
we find that both l.h.s.\ and r.h.s.\ of \eqref{eq:final2} are of 
order (at most) $q^{-\ell(\lambda)-\ell(\mu)}$, and that the coefficient
of that order of the equation is exactly the product rule for Schubert classes
as stated in theorem~\ref{thm:KTd2}.

As a consequence of theorem~\ref{thm:dual}, we also obtain for free the puzzle rule for {\em dual}\/ Schubert classes in equivariant $K$-theory
of the 2-step flag manifold, thus concluding the proof of theorem~\ref{thm:KTd2}.

\junk{unfortunately does require a $q\to0$ approach, since some of
the $R$ matrices
diverge already at $d=2$ (even $d=1$)...}


\junk{the trick, in order to not bother with twisting, is to compare the power of $q$ with the one expected from its inversion number}


\junk{careful to not get confused as I did in my mathematica file about rep vs dual. in particular the labeling of blue lines is an involution times what one would naively expect}

%\subsection{Interlude: pipe dream-type formulae}\label{sec:pipe}
\subsection{Interlude: double Grothendieck polynomials}\label{sec:pipe}
As promised, we now justify (under certain assumptions) the notation $\mathbf S^\lambda|_\sigma$ that was used above. In this subsection we are back to
$d\in \{1,2,3\}$.

We assume a further normalization condition:
\begin{pty}\label{pty:norm2}
\begin{equation}\label{eq:norm2}
\tikz[baseline=0,xscale=0.5]
{
\draw[arrow=0.3,d] (-1,-1) node[below] {$\m i$} -- (1,1) node[above] {$\m i$};
\draw[arrow=0.3,d] (1,-1) node[below] {$\m i$} -- (-1,1) node[above] {$\m i$};
}
=1, \qquad i\in \{0,\ldots,d\}
\end{equation}
where lines have arbitrary, but identical, colors.
\end{pty}

Given a single-number string $\lambda$ of length $n$,
we now define $\mathbf{S}^\lambda_{\sss N}$ as follows: (on the picture $n=4$)
\junk{really $d$ could be anything {\em for the specializations}; however 
  for the identification to double Grothendieck polynomials, we need $\ge d$}
\begin{equation}\label{eq:defSb}
\mathbf{S}^\lambda_{\sss N}
:=
\begin{tikzpicture}[baseline=1.8cm,scale=0.75]%[baseline=(current  bounding  box.center),scale=0.75]
\foreach\x in {1,...,4}
\draw[db,arrow=0.9] (\x,0) node[below] {$\m d$} -- node[right=-1mm,pos=0.1] {$\ss u_\x$} ++(0,5);
\foreach\y in {1,...,4}
\draw[db,arrow=0.9] (0,5-\y) -- node[above=-1mm,pos=0.1] {$\ss t_\y$} ++(5,0) node[right] {$\m d$};
\draw[decorate,decoration=brace] (-0.3,1) -- node[left] {$\m\omega$} (-0.3,4);
\draw[decorate,decoration=brace] (1,5.3) -- node[above] {$\m\lambda$} (4,5.3);
\end{tikzpicture}
\end{equation}
where the string $\omega$ (the unique weakly increasing string with the same content as $\lambda$) is read from top to bottom. $\mathbf{S}^\lambda_{\sss NW}$ and $\mathbf{S}^\lambda_{\sss NE}$ are defined identically, except with green and red lines, respectively. 
All three live in $\QQ(t_1,\ldots,t_n,u_1,\ldots,u_n,\ldots)$. More precisely, 
denoting them collectively by $\mathbf{S}^\lambda$, and 
writing $\omega=0^{p_0}1^{p_1}\ldots d^{p_d}$, with $p_i=n_{i+1}-n_i$
(and $n_0=0$, $n_{d+1}=n$),
we have
\begin{lem}\label{lem:sym}
  $\mathbf{S}^\lambda$ is symmetric in $t_{1+n_i},\ldots,t_{n_{i+1}}$ for
  $i=0,\ldots, d$.
\end{lem}

\begin{proof}
We show invariance by elementary transposition $i,i+1$ where
$\omega_i=\omega_{i+1}$: ($i=2$ on the picture; all lines are of the same color)
\begin{align*}
\mathbf{S}^\lambda&=
\begin{tikzpicture}[baseline=1.8cm,scale=0.75]%[baseline=(current  bounding  box.center),scale=0.75]
\foreach\x in {1,...,4}
\draw[d,arrow=0.9] (\x,0) node[below] {$\m d$} -- node[right=-1mm,pos=0.1] {$\ss u_\x$} ++(0,5);
\foreach\y/\s in {1,4}
\draw[d,arrow=0.9] (0,5-\y) -- node[above=-1mm,pos=0.07] {$\ss t_\y$} ++(6,0) node[right] {$\m d$};
\draw[d,arrow=0.9,rounded corners] (0,5-2) -- node[above=-1mm,pos=0.1] {$\ss t_2$} ++(4.5,0) -- ++(1,-1) -- ++(0.5,0) node[right] {$\m d$};
\draw[d,arrow=0.9,rounded corners] (0,5-3) -- node[above=-1mm,pos=0.1] {$\ss t_3$} ++(4.5,0) -- ++(1,1) -- ++(0.5,0) node[right] {$\m d$};
\draw[decorate,decoration=brace] (-0.3,1) -- node[left] {$\m\omega$} (-0.3,4);
\draw[decorate,decoration=brace] (1,5.3) -- node[above] {$\m\lambda$} (4,5.3);
\end{tikzpicture}
&&\text{by proposition~\ref{prop:weight} (2) and property~\ref{pty:norm2}}
\\
&=
\begin{tikzpicture}[baseline=1.8cm,scale=0.75]%[baseline=(current  bounding  box.center),scale=0.75]
\foreach\x in {1,...,4}
\draw[d,arrow=0.9] (\x,0) node[below] {$\m d$} -- node[right=-1mm,pos=0.1] {$\ss u_\x$} ++(0,5);
\foreach\y/\s in {1,4}
\draw[d,arrow=0.9] (-1,5-\y) -- node[above=-1mm,pos=0.1] {$\ss t_\y$} ++(6,0) node[right] {$\m d$};
\draw[d,arrow=0.9,rounded corners] (-1,5-2) -- node[above=-1mm,pos=0.5] {$\ss t_2$} ++(0.5,0) -- ++(1,-1) -- ++(4.5,0) node[right] {$\m d$};
\draw[d,arrow=0.9,rounded corners] (-1,5-3) -- node[above=-1mm,pos=0.5] {$\ss t_3$} ++(0.5,0) -- ++(1,1) -- ++(4.5,0) node[right] {$\m d$};
\draw[decorate,decoration=brace] (-1.3,1) -- node[left] {$\m\omega$} (-1.3,4);
\draw[decorate,decoration=brace] (1,5.3) -- node[above] {$\m\lambda$} (4,5.3);
\end{tikzpicture}
&&\text{by property~\ref{pty:ybe}, \eqref{eq:ybe}}
\\
&=
\begin{tikzpicture}[baseline=1.8cm,scale=0.75]%[baseline=(current  bounding  box.center),scale=0.75]
\foreach\x in {1,...,4}
\draw[d,arrow=0.9] (\x,0) node[below] {$\m d$} -- node[right=-1mm,pos=0.1] {$\ss u_\x$} ++(0,5);
\foreach\y/\yy in {1/1,2/3,3/2,4/4}
\draw[d,arrow=0.9] (0,5-\y) -- node[above=-1mm,pos=0.1] {$\ss t_\yy$} ++(5,0) node[right] {$\m d$};
\draw[decorate,decoration=brace] (-0.3,1) -- node[left] {$\m\omega$} (-0.3,4);
\draw[decorate,decoration=brace] (1,5.3) -- node[above] {$\m\lambda$} (4,5.3);
\end{tikzpicture}
&&\text{by proposition~\ref{prop:weight} (2) and property~\ref{pty:norm2}, }\omega_i=\omega_{i+1}
\end{align*}
\end{proof}

The justification of the notation $\mathbf{S}^\lambda|_\sigma$ is then

\begin{lem}\label{lem:restr}
  For each permutation $\sigma\in \mathcal S_n$, we have
  $
  \mathbf{S}^\lambda|_\sigma = \mathbf{S}^\lambda|_{t_i=u_{\sigma(i)}
    \ \forall i\in \{1,\ldots,n\} }
  $.
\end{lem}

\begin{proof}
The proof is again an obvious check of connectivity of lines. Let us work it
out on an example, such as $\sigma=(3241)$. Then 
\begin{align*}
\mathbf{S}^\lambda|_\sigma&=
\begin{tikzpicture}[baseline=1.8cm,scale=0.75]
\foreach\x in {1,...,4}
\draw[d,arrow=0.9] (\x,0) node[below] {$\m d$} -- node[right=-1mm,pos=0.1] {$\ss u_\x$} ++(0,5);
\foreach\y/\x in {1/3,2/2,3/4,4/1}
\draw[d,arrow=0.9] (0,5-\y) -- node[above=-1mm,pos=0.1] {$\ss u_\x$} ++(5,0) node[right] {$\m d$};
\draw[decorate,decoration=brace] (-0.3,1) -- node[left] {$\m\omega$} (-0.3,4);
\draw[decorate,decoration=brace] (1,5.3) -- node[above] {$\m\lambda$} (4,5.3);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline=1.8cm,scale=0.75]
\foreach\y/\x in {1/3,2/2,3/4,4/1}
{
\draw[d,arrow=0.9,rounded corners] (\x,0) node[below] {$\m d$} -- node[right=-1mm,pos=0.75] {$\ss u_\x$} ++(0,0.5) -- (\x,5-\y) -- (5,5-\y) node[right] {$\m d$};
\draw[d,arrow=0.9,rounded corners] (0,5-\y) -- node[above=-1mm,pos=0.75] {$\ss u_\x$} ++(0.5,0) -- (\x,5-\y) -- (\x,5);
}
\draw[decorate,decoration=brace] (-0.3,1) -- node[left] {$\m\omega$} (-0.3,4);
\draw[decorate,decoration=brace] (1,5.3) -- node[above] {$\m\lambda$} (4,5.3);
\end{tikzpicture}
&&\text{using \eqref{eq:equal}}
\\
&=
\begin{tikzpicture}[baseline=1.8cm,scale=0.75]
\foreach\y/\x in {1/3,2/2,3/4,4/1}
{
%\draw[arrow=0.9,rounded corners] (\x,0) node[below] {$\m d$} -- node[right=-1mm,pos=0.75] {$\ss u_\x$} ++(0,0.5) -- (\x,5-\y) -- (5,5-\y) node[right] {$\m d$};
\draw[d,arrow=0.9,rounded corners] (0,5-\y) -- node[above=-1mm,pos=0.75] {$\ss u_\x$} ++(0.5,0) -- (\x,5-\y) -- (\x,5);
}
\draw[decorate,decoration=brace] (-0.3,1) -- node[left] {$\m\omega$} (-0.3,4);
\draw[decorate,decoration=brace] (1,5.3) -- node[above] {$\m\lambda$} (4,5.3);
\end{tikzpicture}
&&\text{using \eqref{eq:ybe}, \eqref{eq:unit} and \eqref{eq:e}}
\end{align*}
which is the dual picture from the one in the statement of the proposition.
\end{proof}

The observant reader may have recognized in the definition of $\mathbf S^\lambda$ a pipe dream formula in disguise.
More precisely, we have the following statement:
\begin{prop}\label{prop:groth}
If the $R$-matrix defining crossings in the definition \eqref{eq:defSb} is given
by \eqref{eq:defnil}, i.e., of nilHecke type, then $\mathbf{S}^\lambda$
coincides with the \defn{double Grothendieck polynomial} associated to 
$\lambda$.
\end{prop}
\tikzset{/linkpattern/edge/.style={ultra thick,solid,draw=\linkpatternedgecolor,draw opacity=1}}
\def\linkpatternedgecolor{purple!80!black}%
\begin{proof}
A \defn{pipe dream} is a filling of a $n\times n$ square with 
``plaquettes'' \tikz[baseline=-3pt]{\plaq{a}}
and
\tikz[baseline=-3pt]{\plaq{c}}, where the Southeast triangle is entirely made of
\tikz[baseline=-3pt]{\plaq{a}}, e.g.,
\[
\begin{tikzpicture}[math mode]
\node[loop]
{
         &\node{1};&\node{2};&\node{3};&\node{4};&\node{5};\\
\node{1};&\plaq{c}&\plaq{c}&\plaq{a}&\plaq{a}&\plaq{a}\\
\node{2};&\plaq{c}&\plaq{c}&\plaq{c}&\plaq{a}&\plaq{a}\\
\node{3};&\plaq{a}&\plaq{c}&\plaq{a}&\plaq{a}&\plaq{a}\\
\node{4};&\plaq{c}&\plaq{a}&\plaq{a}&\plaq{a}&\plaq{a}\\
\node{5};&\plaq{a}&\plaq{a}&\plaq{a}&\plaq{a}&\plaq{a}\\
};
\end{tikzpicture}
\]
We say that a pipe dream has connectivity $\pi\in \mathcal{S}_n$
if the $i$th left mid edge (numbered from top to bottom) is connected to
top mid edges numbered (from left to right) $\pi_i$, in the following sense.
One follows the line formed by the plaquettes, with one exception: if ones crosses
another given line multiple times in the process, then all \tikz[baseline=-3pt]{\plaq{c}} 
after the first one
are ignored (for connectivity purposes they're equivalent to a \tikz[baseline=-3pt]{\plaq{a}}). 
Following \cite{KM-Schubert2},
we call such crossings \defn{absorbable}. In the example above, $\pi=35142$
(paying attention to the absorbable crossing at row $3$, column $2$).

Given a single-number string $\lambda$,
define $\pi$ to be the (unique) permutation 
such that $\lambda_{\pi_i}=\omega_i$, and
$\pi_i>\pi_{i+1}$ implies $\omega_i<\omega_{i+1}$, $i=1,\ldots,n-1$,
as in \S\ref{ssec:funct}.
The \defn{double Grothendieck polynomial} 
associated to $\lambda$, or more traditionally to $\pi$, is given by 
\begin{equation}\label{eq:defGroth}
S^\lambda:=\sum_{\substack{\text{pipe dreams with}\\\text{connectivity $\pi$}}}
(-1)^{\#\{\text{absorbable crossings}\}}\prod_{\substack{
\tikz[baseline=-3pt,scale=0.4]{\plaq{c}}
\text{ at row }i,\\\text{column }j}}
(1-t_i/u_j)
\end{equation}
(see e.g. \cite[theorem~2.3]{FK-Groth2}).

We want to show that if the $R$-matrix defining the crossings of the picture
of \eqref{eq:defSb} is given by \eqref{eq:defnil},
then $\mathbf{S}^\lambda=S^\lambda$. We proceed by defining a map $\varphi$
from the pipe dreams of \eqref{eq:defGroth} to 
{\em configurations}\/ of \eqref{eq:defSb}, that is fillings of the
edges of the grid with labels in $\{0,\ldots,d\}$ such that the associated
fugacity is nonzero.

Given a pipe dream, we number the lines starting on the left side (resp.\ bottom side) of the grid according to $\omega$ (resp.\ ``$d$''), thus matching
the left and bottom boundary labels of \eqref{eq:defSb}. We then continue labeling the lines as they propagate inside the grid, in the same sense as the connectivity of a pipe dream;
that is, the labels follow the lines except across absorbable crossings, in which case the labels move Northeast as if the crossing was absent. Finally, we remove all the original lines and replace them with a square grid. On the same example, assuming $d=3$, $\lambda=23121$, 
\[
\varphi: 
\begin{tikzpicture}[baseline=(current  bounding  box.center)]
\node[loop]
{
\plaq{c}&\plaq{c}&\plaq{a}&\plaq{a}&\plaq{a}\\
\plaq{c}&\plaq{c}&\plaq{c}&\plaq{a}&\plaq{a}\\
\plaq{a}&\plaq{c}&\plaq{a}&\plaq{a}&\plaq{a}\\
\plaq{c}&\plaq{a}&\plaq{a}&\plaq{a}&\plaq{a}\\
\plaq{a}&\plaq{a}&\plaq{a}&\plaq{a}&\plaq{a}\\
};
\end{tikzpicture}
\mapsto 
\tikzset{bgplaq/.style={draw=gray,fill=\linkpatternboxcolor}}
\begin{tikzpicture}[baseline=(current  bounding  box.center)]
\node[loop]
{
\plaq{c}&\plaq{c}&\plaq{a}&\plaq{a}&\plaq{a}\\
\plaq{c}&\plaq{c}&\plaq{c}&\plaq{a}&\plaq{a}\\
\plaq{a}&\plaq{c}&\plaq{a}&\plaq{a}&\plaq{a}\\
\plaq{c}&\plaq{a}&\plaq{a}&\plaq{a}&\plaq{a}\\
\plaq{a}&\plaq{a}&\plaq{a}&\plaq{a}&\plaq{a}\\
};
% all internal labels first
\foreach \i/\j/\t in {1/1/1,1/2/1,1/3/2,1/4/1,2/1/1,2/2/1,2/3/1,2/4/3,3/1/3,3/2/2,3/3/3,3/4/3,4/1/2,4/2/3,4/3/3,4/4/3,5/1/3,5/2/3,5/3/3,5/4/3} \node at (loop-\i-\j.east) {$\t$};
\foreach \i/\j/\t in {1/1/2,1/2/3,1/3/2,1/4/1,1/5/3,2/1/2,2/2/3,2/3/2,2/4/3,2/5/3,3/1/3,3/2/2,3/3/3,3/4/3,3/5/3,4/1/3,4/2/3,4/3/3,4/4/3,4/5/3} \node at (loop-\i-\j.south) {$\t$};
% left labels
\foreach \i/\t in {1/1,2/1,3/2,4/2,5/3} \path (loop-\i-1.west) node[left=-1mm] {$\t$};
% bottom labels
\foreach \j in {1,...,5} \path (loop-5-\j.south) node[below=-1mm] {$3$};
% right
\foreach \i in {1,...,5} \path (loop-\i-5.east) node[right=-1mm] {$3$};
% top
\foreach \j/\t in {1/2,2/3,3/1,4/2,5/1} \path (loop-1-\j.north) node[above=-1mm] {$\t$};
\end{tikzpicture}
 \mapsto
\tikzset{bgplaq/.style={draw=white,fill=\linkpatternboxcolor}}
\def\linkpatternedgecolor{black!70!white}%
\begin{tikzpicture}[baseline=(current  bounding  box.center)]
\node[loop]
{
\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}\\
\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}\\
\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}\\
\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}\\
\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}&\plaq{c}\\
};
% all internal labels first
\foreach \i/\j/\t in {1/1/1,1/2/1,1/3/2,1/4/1,2/1/1,2/2/1,2/3/1,2/4/3,3/1/3,3/2/2,3/3/3,3/4/3,4/1/2,4/2/3,4/3/3,4/4/3,5/1/3,5/2/3,5/3/3,5/4/3} \node at (loop-\i-\j.east) {$\t$};
\foreach \i/\j/\t in {1/1/2,1/2/3,1/3/2,1/4/1,1/5/3,2/1/2,2/2/3,2/3/2,2/4/3,2/5/3,3/1/3,3/2/2,3/3/3,3/4/3,3/5/3,4/1/3,4/2/3,4/3/3,4/4/3,4/5/3} \node at (loop-\i-\j.south) {$\t$};
% left labels
\foreach \i/\t in {1/1,2/1,3/2,4/2,5/3} \path (loop-\i-1.west) node[left=-1mm] {$\t$};
% bottom labels
\foreach \j in {1,...,5} \path (loop-5-\j.south) node[below=-1mm] {$3$};
% right
\foreach \i in {1,...,5} \path (loop-\i-5.east) node[right=-1mm] {$3$};
% top
\foreach \j/\t in {1/2,2/3,3/1,4/2,5/1} \path (loop-1-\j.north) node[above=-1mm] {$\t$};
\end{tikzpicture}
\]
It is easy to check that the result is a valid configuration of \eqref{eq:defSb}, and
that the top labels reproduce $\lambda$.

Inversely, consider the preimage under $\varphi$ of a configuration of \eqref{eq:defSb}.
The labels around each vertex \tikz[scale=0.4,baseline=0]{\draw[ultra thick] (-1,0) node[left] {$i$}  -- (1,0) node[right] {$l$} (0,-1) node[below] {$j$} -- (0,1) node[above] {$k$};}
can be of three types, according to \eqref{eq:defnil}:
\begin{itemize}
\item $i=k$, $j=l$, $i\le j$: the latter condition means that the two lines arriving from the bottom and left sides have not crossed yet, and they are not either at this vertex; symbolically,
\[
\phi^{-1}\Big(
\tikz[scale=0.4,baseline=0]{\draw[ultra thick] (-1,0) node[left] {$i$}  -- (1,0) node[right] {$l$} (0,-1) node[below] {$j$} -- (0,1) node[above] {$k$};}
\Big)
=
\,\tikz[baseline=-3pt]{\plaq{a}}
\qquad
i=k,\quad j=l,\quad i\le j
\]

\item Similarly, if $i=l$, $j=k$, $i< j$, the two lines that have not crossed yet do cross at the vertex:
\[
\phi^{-1}\Big(
\tikz[scale=0.4,baseline=0]{\draw[ultra thick] (-1,0) node[left] {$i$}  -- (1,0) node[right] {$l$} (0,-1) node[below] {$j$} -- (0,1) node[above] {$k$};}
\Big)
=
\,\tikz[baseline=-3pt]{\plaq{c}}
\qquad
i=l,\quad j=k,\quad i< j
\]

\item The nontrivial case is $i=k$, $j=l$, $i> j$, in which case the two lines have crossed somewhere Southwest of the vertex. In this case, the corresponding plaquette
can either be a \tikz[baseline=-3pt]{\plaq{a}}, or an absorbable \tikz[baseline=-3pt]{\plaq{c}}:
\[
\phi^{-1}\Big(
\tikz[scale=0.4,baseline=0]{\draw[ultra thick] (-1,0) node[left] {$i$}  -- (1,0) node[right] {$l$} (0,-1) node[below] {$j$} -- (0,1) node[above] {$k$};}
\Big)
=
\Big\{\,
\tikz[baseline=-3pt]{\plaq{a}}
,\,
\tikz[baseline=-3pt]{\plaq{c}}
\,\Big\}
\qquad
i=k,\quad j=l,\quad i> j
\]
\end{itemize}
Since identically labeled lines cannot cross each other, lines go straight from the South side to the East side, and similarly the requirement that the top labels form $\lambda$ leads to a connectivity from West to North sides which is given by $\pi$. Therefore any preimage under $\varphi$ is a pipe dream configuration with the correct connectivity.

Furthermore, since the correspondence is purely local, we can compare fugacities one vertex/plaquette
at a time. In the first two cases, one directly finds fugacities $1$ and $1-t_i/u_j$,
respectively, in both \eqref{eq:defnil} and \eqref{eq:defGroth}. In the third case,
we find $t_i/u_j$ in \eqref{eq:defnil}, whereas \tikz[baseline=-3pt]{\plaq{a}}
(resp.\ \tikz[baseline=-3pt]{\plaq{c}})
contributes $1$ (resp.\ $(-1)\times(1-t_i/u_j)$, since the crossing is absorbable) 
to the sum of \eqref{eq:defGroth}, which also matches.
\end{proof}

Geometrically, this proposition is saying that 
if the $R$-matrix is of the form of \eqref{eq:defnil}, then $\mathbf S^\lambda$ 
is the expression of a Schubert class (in $K_T$) in terms of Chern roots.
Lemma~\ref{lem:restr} then tells us how to obtain from this
expression its restriction at each fixed point. The proof amounts
to providing a direct
connection between pipe dream-type formul\ae\ for the former, and 
AJS/Billey/Graham--Willems-type formul\ae\ for the latter.

Similar ``dual'' statements can be made by defining
\[
\mathbf{S}_\lambda:=
\begin{tikzpicture}[baseline=-1.8cm,scale=-0.75]
\foreach\x in {1,...,4}
\draw[d,invarrow=0.9] (\x,0) node[above] {$\m d$} -- node[left=-1mm,pos=0.1] {$\ss u_\x$} ++(0,5);
\foreach\y in {1,...,4}
\draw[d,invarrow=0.9] (0,5-\y) -- node[below=-1mm,pos=0.1] {$\ss t_\y$} ++(5,0) node[left] {$\m d$};
\draw[decorate,decoration=brace] (-0.3,1) -- node[right] {$\m\omega$} (-0.3,4);
\draw[decorate,decoration=brace] (1,5.3) -- node[below] {$\m\lambda$} (4,5.3);
\end{tikzpicture}
\]
where $\omega$ is read from bottom to top.
Geometrically, 
if the $R$-matrix is of the form of \eqref{eq:defnil},
$\mathbf{S}_\lambda$
is the expression of a dual Schubert class (in $K_T$) 
in terms of first Chern classes (or really Bott classes, being in $K$-theory).


\begin{rmk*}
  The connection between the nilHecke algebra and Grothendieck polynomials 
  was first observed in \cite{FK-groth}. There, a different representation 
  is used, which is more appropriate for the {\em full}\/ flag variety. 
  The idea to introduce the ``vertex'' representation we use here is mentioned 
  (at $d=1$: the so-called ``5-vertex model'') in \cite[\S 5.2.5]{hdr}.
\end{rmk*}

\subsection{$d=3$ and $E_6$}\label{sec:d3}
The reasoning is extremely similar to the case of $d=2$, but for
technical reasons, we conclude in a slightly different manner; in
particular we use the results of the previous subsection.

\subsubsection{$R$-matrices}\label{ssec:Rd3}
In order to avoid repeats, we only mention the setup insofar as it differs from the one at $d=2$.
To each line we now attach a representation of the quantized affine
algebra $U_q(\mathfrak{e}_6^{(1)})$: to red and green lines 
we attach the evaluation representation (also called affinization \cite{CP-book}) of the $V_{\omega_1}$ 
of lemma~\ref{lem:greend3}, whereas to blue lines we attach the evaluation representation
based on the dual $V_{\omega_6}\cong V^*_{\omega_1}$.

Next we define $R$-matrices. Explicitly, in terms of the projectors 
$P_{\omega_6}$, $P_{2\omega_1}$, $P_{\omega_3}$
that intertwine the action of the horizontal subalgebra $U_q(\mathfrak{e}_6)$, we have
\begin{multline}\label{eq:defR}
\check R_{3,1}=\frac{1}{q^2(u_2-q^6u_1)(u_2-u_1)}
\Big(
(u_1-q^8u_2)(u_1-q^2u_2)P_{\omega_6}
+
\\
(u_2-q^8u_1)(u_1-q^2u_2)
P_{\omega_3}
+
(u_2-q^8u_1)(u_2-q^2u_1)
P_{2\omega_1}
\Big)
\end{multline}
All other $R$-matrices involving red and green lines are proportional, since they're based on the same representations.
However, we choose their normalizations differently:
\begin{align}
\check R_{i,i}=
\frac{(u_1-q^8u_2)(u_1-q^2u_2)}{(u_2-q^8u_1)(u_2-q^2u_1)}
P_{\omega_6}
+
\frac{u_1-q^2u_2}{u_2-q^2u_1}
P_{\omega_3}
+
P_{2\omega_1}
\qquad i=1,3
\end{align}
$\check R_{2,2}$ is defined identically up to the outer automorphism of $E_6$ that switches $\omega_1$ and $\omega_6$.

It is simplest to define $\check R_{2,i}$, $i=1,3$, using the ``crossing symmetry''; namely,
\[
\check R_{2,i}(u_1,u_2)=\mathcal P_{\omega_6,\omega_1}(\mathcal P_{\omega_1,\omega_1}\check R_{3,1}(u_2,u_1))^{T_2}
\qquad i=1,3
\]
where $\mathcal P_{\omega_i,\omega_j}$ is the operator from $V_{\omega_i}\otimes V_{\omega_j}$ to $V_{\omega_j}\otimes V_{\omega_i}$ that switches the factors of the tensor product, and $T_2$ means partial transpose of the second factor of the tensor product.
As usual, we define all remaining $R$-matrices such that
\[
\check R_{i,j}(u_1,u_2)=
\check R_{j,i}(u_2,u_1))^{-1}
\]
is satisfied for all $i,j=1,2,3$.


As in \eqref{eq:UD4} at $d=2$,
we get the factorization
\[
\check R_{3,1}|_{u_1=q^{-16}u,\ u_2=q^{-8}u}
=\frac{(1-q^{16})(1-q^{10})}{q^8(1-q^8)(1-q^2)} P_{\omega_6}=UD
\]
where $D: V_{\omega_1}(q^{-16}u)\otimes V_{\omega_1}(q^{-8}u) \to V_{\omega_6}(u)$ and $U: V_{\omega_6}(u)\to V_{\omega_1}(q^{-8}u)\otimes V_{\omega_3}(q^{-16}u)$ 
commute with the $U_q(\mathfrak{e}_6^{(1)})$ action. 
This is the analogue of property~\ref{pty:factor}, with $\alpha=q^{-16}$, $\beta=q^{-8}$.

It is a tedious but easy exercise to check that all properties~\ref{pty:factor}--\ref{pty:norm2} are satisfied in this setup. We also impose the gauge fixing condition \eqref{eq:norm}.

\subsubsection{The limit $q\to 0$}\label{ssec:q0d3}
We start once again from theorem~\ref{thm:final}, and rewrite it using lemma~\ref{lem:restr}:
\[
\sum_\nu 
\tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\nu}{\mu}}
\mathbf{S}^\nu_{\sss N}
=
\mathbf{S}^\lambda_{\sss NW}
\,
\mathbf{S}^\mu_{\sss NE}
\qquad
\text{in }\QQ(t_1,\ldots,t_n,u_1,\ldots,u_n,q)^{\prod_{i=0}^d \mathcal S_{p_i}}/\mathcal I
\]
where $\prod_{i=0}^d \mathcal S_{p_i}$ acts by permutations of the $t_i$, cf lemma~\ref{lem:sym},
and $\mathcal I$ is the ideal of rational functions that vanish when the $t$s are specialized to a permutation of the $u$s. $\mathcal I$ is generated
by the $P(t_1,\ldots,t_n)-P(u_1,\ldots,u_n)$, where $P$ runs over symmetric polynomials.

We {\em set all $u$s to one}: we obtain
\[
\sum_\nu 
\tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\nu}{\mu}}|_{u_i=1}\,
\mathbf{S}^\nu_{\sss N}|_{u_i=1}
=
\mathbf{S}^\lambda_{\sss NW}|_{u_i=1}
\,
\mathbf{S}^\mu_{\sss NE}|_{u_i=1}
\qquad
\text{in }\QQ(t_1,\ldots,t_n,q)^{\prod_{i=0}^d \mathcal S_{p_i}}/\mathcal I_1
\]
where $\mathcal I_1$ is the ideal generated by $P(t_1,\ldots,t_n)-P(1,\ldots,1)$, $P\in \QQ[t_1,\ldots,t_n]^{\mathcal S_n}$.

We are now (and only now) ready to take the limit $q\to 0$ as before:
\begin{itemize}
\item According to proposition~\ref{prop:weight} part 1, we can restrict $\check R_{i,i}$ to the single-number
sector, check explicitly that these three matrices
are identical for $i=1,2,3$, and then check that lemma~\ref{lem:D4a} holds without any change at $d=3$.
\item According to proposition~\ref{prop:groth}, this implies that
\[
\mathbf{S}^\lambda=q^{-\ell(\lambda)}(S^\lambda+O(q^2))
\]
where $S^\lambda$ is the double Grothendieck polynomial associated to
$\lambda$. In particular, $\mathbf{S}^\lambda|_{u_i=1}
=q^{-\ell(\lambda)}(S^\lambda|_{u_i=1}+O(q^2))$,
where $S^\lambda|_{u_i=1}$ is the (ordinary)
Grothendieck polynomial associated to $\lambda$.

\item Finally, we examine the (nonequivariant) puzzle, i.e., we take the $q\to0$ limit of $\check R_{3,1}(q^{-16}u,q^8u)=UD$. We find:
\begin{lem} As $q\to 0$,
\begin{align*}
U^{XZ}_Y &= (-q)^{-\frac{1}{2}B(\vf_X,\vf_Z)}
\left(
\begin{cases}
1
&
\uptri{X}{Y}{Z}\text{ admissible}
\\
0
&
\text{otherwise}
\end{cases}
\quad+O(q^2)
\right)
\\
D_{ZX}^Y &= (-q)^{\frac{1}{2}B(\vf_Z,\vf_X)}
\left(
\begin{cases}
1
&
\downtri{X}{Y}{Z}\text{ admissible}
\\
0
&
\text{otherwise}
\end{cases}
\quad+O(q^2)
\right)
\end{align*}
where an admissible triangle is one which is either of the form of
\eqref{eq:d3tri} (up to rotation), or a $K$-piece as listed in 
appendix~\ref{app:d3}.
\end{lem}
The proof is a (computer-assisted) expansion at first nontrivial order
in $q$ of the $27^3$ entries of $U$ and $D$. 
The Mathematica code is available upon request.
\end{itemize}
Finally,
\[
\sum_\nu 
\tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\nu}{\mu}}
S^\nu|_{u_i=1}
=
S^\lambda|_{u_i=1}
\,
S^\mu|_{u_i=1}
\qquad
\text{in }\ZZ[t_1^\pm,\ldots,t_n^\pm]^{\prod_{i=0}^d \mathcal S_{p_i}}/\mathcal I'_1
\]
where we have changed the ambient ring because
the $S^\lambda|_{u_i=1}$ are polynomials in the $t_i$ (in fact, we only
care that they're Laurent polynomials), and
$\mathcal I'_1=\mathcal I_1
\cap \ZZ[t_1^\pm,\ldots,t_n^\pm]^{\prod_{i=0}^d \mathcal S_{p_i}}$.
The triangle now stands for the summation over {\em nonequivariant}\/
puzzles, i.e.,
$\tikz[scale=1.8,baseline=-4mm]{\uptri{\lambda}{\nu}{\mu}}=(-1)^{\ell(\nu)-\ell(\lambda)-\ell(\mu)}\# \{\text{such puzzles} \}$.
The quotient ring $\ZZ[t_1^\pm,\ldots,t_n^\pm]^{\prod_{i=0}^d \mathcal S_{p_i}}/\mathcal I'_1$ is nothing but the 
$K$-theory ring of the $d$-step flag variety $\{ 0=V_0\le V_1\le \cdots\le V_d\le V_{d+1}=\CC^n \}$ with $\dim V_i=n_i$, $p_i=n_{i+1}-n_i$, $i=0,\ldots,d$,
where $d=3$ here, and the $t$s play the role of Chern roots. 
The $S^\lambda|_{u_i=1}$ are then the nonequivariant $K$-theoretic Schubert classes.

As explained at the end of \S\ref{sec:pipe}, $K$-theoretic dual Schubert classes can be obtained by $180^\circ$ degree rotation of the pictures for Schubert classes, 
and application of theorem~\ref{thm:dual} leads to a
puzzle formula for these dual classes:
\[
\sum_\nu 
\tikz[scale=1.8,baseline=0mm]{\downtri{\lambda}{\nu}{\mu}}
S_\nu|_{u_i=1}
=
S_\lambda|_{u_i=1}
\,
S_\mu|_{u_i=1}
\]
where once again
$\tikz[scale=1.8,baseline=0mm]{\downtri{\lambda}{\nu}{\mu}}=(-1)^{\ell(\nu)-\ell(\lambda)-\ell(\mu)}\# \{\text{such puzzles} \}$.

This concludes the proof of theorem~\ref{thm:d3}.

\vfill\eject

\junk{\section{Negative statements}\label{sec:neg}
{at least some words about the proliferation of negative charge
states, which lead to divergences in taking the limit}

%\subsection{Negative results}
Ignoring the aforementioned difficulties, one can try to find a $H^*(3$-step$)$ rule (as a first step towards the $K$-version)
by manually introducing equivariant pieces. 
\junk{There is a $d=3$ analogue
of the inversion-counting symplectic form $B$ from lemma~\ref{lem:sympd1},
and in appendix \ref{app:d3} we label the $K$-pieces with their 
spoilage of this count, the worst being
$\uptri[5]{3(((32)1)0)}{3(((32)1)0)}{3(((32)1)0)}$.
We delay discussion of this $B$ until \S\ref{sec:gen}.}
To extend Buch's $H^*$ rule to $H^*_T$, we would hope to introduce
vertical rhombi $R$ with vector sum $\vec 0$ 
in the sense of lemma~\ref{lem:greend3}, 
but with negative inversion count $inv(R)$. The potential rhombi are given in Appendix~\ref{app:d3eq}.
Alas,
\begin{thm}\label{thm:HT3}
  Define the fugacity of each potential rhombus $R$ 
  to be $d_R (y_i-y_j)^{-inv(R)}$,
  where the $d_R$ are a system of independent coefficients. 
  Use Eq.~\ref{eq:LRT} to define a product. Then there is no choice 
  $(d_R)$ that gives the actual product in equivariant Schubert calculus.
\end{thm}
This result is obtained by a bruteforce computer analysis of xxxxxxxx

For $d=4$ we are flying nearly blind, as there is no conjecture
as to the list of edge labels (just a lower bound suggested by
compatibility with pullbacks along maps $GL_n(\CC)/P \onto GL_n(\CC)/Q$).
If we assume {not sure what you're trying to say here}

\rem{cite \cite{SchubII} again}
}

\appendix
\section{The $d=2$ $R$-matrix}\label{app:Rd2}
These are the nonzero entries of $\check R_{3,1}(q^{-2}u_1,q^2u_2)$ as defined in \eqref{eq:RD4} and used in lemma~\ref{lem:D4b}:

\begin{itemize}
\item
$\rh[0]{0}{0}{0}{0}=\rh[0]{10}{0}{10}{0}=\rh[0]{20}{0}{20}{0}=\rh[0]{(21)0}{0}{(21)0}{0}=\rh[0]{0}{1}{0}{1}=\rh[0]{1}{1}{1}{1}=\rh[0]{21}{1}{21}{1}=\rh[2]{(21)0}{1}{(21)0}{1}=\rh[0]{0}{2}{0}{2}=\rh[0]{1}{2}{1}{2}=\rh[0]{2}{2}{2}{2}=\rh[0]{10}{2}{10}{2}=\rh[0]{1}{10}{1}{10}=\rh[2]{10}{10}{10}{10}=\rh[2]{(21)0}{10}{(21)0}{10}=\rh[0]{2(10)}{10}{2(10)}{10}=\rh[0]{2}{20}{2}{20}=\rh[2]{10}{20}{10}{20}=\rh[2]{20}{20}{20}{20}=\rh[2]{2(10)}{20}{2(10)}{20}=\rh[0]{0}{21}{0}{21}=\rh[0]{2}{21}{2}{21}=\rh[2]{20}{21}{20}{21}=\rh[2]{21}{21}{21}{21}=\rh[2]{20}{(21)0}{20}{(21)0}=\rh[0]{21}{(21)0}{21}{(21)0}=\rh[4]{(21)0}{(21)0}{(21)0}{(21)0}=\rh[2]{2(10)}{(21)0}{2(10)}{(21)0}=\rh[2]{1}{2(10)}{1}{2(10)}=\rh[0]{2}{2(10)}{2}{2(10)}=\rh[2]{21}{2(10)}{21}{2(10)}=\rh[4]{2(10)}{2(10)}{2(10)}{2(10)}=1$
\item
$\rh[2]{(21)0}{(21)0}{0}{21}=\frac{\left(1-q^2\right) u_1}{q^2 \left(u_1-q^2 u_2\right)}$
\item
$\rh[1]{(21)0}{1}{10}{2}=\rh[1]{2}{2(10)}{10}{10}=\rh[3]{(21)0}{(21)0}{10}{20}=\rh[1]{1}{2(10)}{0}{21}=\rh[1]{10}{20}{0}{21}=\rh[3]{2(10)}{2(10)}{20}{21}=\rh[3]{(21)0}{(21)0}{1}{2(10)}=\frac{\left(1-q^2\right) u_1}{q \left(u_1-q^2 u_2\right)}$
\item
$\rh[0]{1}{10}{0}{0}=\rh[0]{2}{20}{0}{0}=\rh[0]{21}{(21)0}{0}{0}=\rh[0]{2}{21}{10}{0}=\rh[0]{2(10)}{10}{20}{0}=\rh[0]{2}{2(10)}{0}{1}=\rh[0]{2}{21}{1}{1}=\rh[0]{10}{0}{1}{1}=\rh[0]{20}{0}{21}{1}=\rh[0]{2(10)}{10}{21}{1}=\rh[0]{(21)0}{0}{1}{2}=\rh[0]{20}{0}{2}{2}=\rh[0]{21}{1}{2}{2}=\rh[0]{2(10)}{10}{2}{2}=\rh[2]{2(10)}{2(10)}{10}{2}=\rh[0]{2}{20}{1}{10}=\rh[0]{21}{(21)0}{1}{10}=\rh[2]{20}{(21)0}{10}{10}=\rh[2]{20}{20}{(21)0}{10}=\rh[2]{21}{2(10)}{(21)0}{10}=\rh[0]{21}{(21)0}{2}{20}=\rh[2]{2(10)}{20}{21}{21}=\rh[2]{10}{20}{1}{2(10)}=\rh[2]{20}{20}{21}{2(10)}=\frac{\left(1-q^2\right) u_1}{u_1-q^2 u_2}$
\item
$\rh[1]{2(10)}{(21)0}{10}{0}=\rh[1]{21}{21}{(21)0}{0}=\rh[1]{2(10)}{20}{(21)0}{0}=\rh[1]{10}{10}{0}{1}=\rh[1]{20}{(21)0}{0}{1}=\rh[1]{2(10)}{(21)0}{1}{1}=\rh[3]{2(10)}{2(10)}{(21)0}{1}=\rh[1]{20}{20}{0}{2}=\rh[1]{21}{2(10)}{0}{2}=\rh[1]{(21)0}{10}{0}{2}=\rh[1]{21}{21}{1}{2}=\rh[1]{2(10)}{20}{1}{2}=\rh[1]{20}{21}{10}{2}=\rh[1]{2(10)}{(21)0}{2}{21}=\rh[1]{20}{(21)0}{2}{2(10)}=\frac{q \left(1-q^2\right) u_1}{u_1-q^2 u_2}$
\item
$\rh[2]{20}{21}{(21)0}{1}=\frac{q^2 \left(1-q^2\right) u_1}{u_1-q^2 u_2}$
\item
$\rh[2]{(21)0}{1}{20}{21}=\frac{\left(1-q^2\right) u_2}{q^2 \left(u_1-q^2 u_2\right)}$
\item
$\rh[1]{0}{1}{10}{10}=\rh[1]{0}{2}{(21)0}{10}=\rh[1]{0}{2}{20}{20}=\rh[1]{1}{2}{2(10)}{20}=\rh[1]{(21)0}{0}{2(10)}{20}=\rh[1]{10}{2}{20}{21}=\rh[1]{1}{2}{21}{21}=\rh[1]{(21)0}{0}{21}{21}=\rh[1]{0}{1}{20}{(21)0}=\rh[1]{2}{2(10)}{20}{(21)0}=\rh[1]{1}{1}{2(10)}{(21)0}=\rh[1]{2}{21}{2(10)}{(21)0}=\rh[1]{10}{0}{2(10)}{(21)0}=\rh[1]{0}{2}{21}{2(10)}=\rh[3]{(21)0}{1}{2(10)}{2(10)}=\frac{\left(1-q^2\right) u_2}{q \left(u_1-q^2 u_2\right)}$
\item
$\rh[0]{1}{1}{10}{0}=\rh[0]{2}{2}{20}{0}=\rh[0]{21}{1}{20}{0}=\rh[0]{1}{2}{(21)0}{0}=\rh[0]{2}{2}{21}{1}=\rh[0]{0}{0}{1}{10}=\rh[0]{2}{2}{2(10)}{10}=\rh[0]{20}{0}{2(10)}{10}=\rh[0]{21}{1}{2(10)}{10}=\rh[0]{0}{0}{2}{20}=\rh[0]{1}{10}{2}{20}=\rh[2]{1}{2(10)}{10}{20}=\rh[2]{21}{2(10)}{20}{20}=\rh[2]{(21)0}{10}{20}{20}=\rh[2]{21}{21}{2(10)}{20}=\rh[0]{1}{1}{2}{21}=\rh[0]{10}{0}{2}{21}=\rh[2]{10}{10}{20}{(21)0}=\rh[0]{0}{0}{21}{(21)0}=\rh[0]{1}{10}{21}{(21)0}=\rh[0]{2}{20}{21}{(21)0}=\rh[0]{0}{1}{2}{2(10)}=\rh[2]{(21)0}{10}{21}{2(10)}=\rh[2]{10}{2}{2(10)}{2(10)}=\frac{\left(1-q^2\right) u_2}{u_1-q^2 u_2}$
\item
$\rh[1]{10}{2}{(21)0}{1}=\rh[1]{0}{21}{10}{20}=\rh[3]{1}{2(10)}{(21)0}{(21)0}=\rh[3]{10}{20}{(21)0}{(21)0}=\rh[1]{0}{21}{1}{2(10)}=\rh[1]{10}{10}{2}{2(10)}=\rh[3]{20}{21}{2(10)}{2(10)}=\frac{q \left(1-q^2\right) u_2}{u_1-q^2 u_2}$
\item
$\rh[2]{0}{21}{(21)0}{(21)0}=\frac{q^2 \left(1-q^2\right) u_2}{u_1-q^2 u_2}$
\item
$\rh[-1]{1}{0}{1}{0}=\rh[-1]{2}{0}{2}{0}=\rh[-1]{21}{0}{21}{0}=\rh[-1]{2(10)}{0}{2(10)}{0}=\rh[-1]{2}{1}{2}{1}=\rh[1]{10}{1}{10}{1}=\rh[1]{20}{1}{20}{1}=\rh[1]{2(10)}{1}{2(10)}{1}=\rh[1]{20}{2}{20}{2}=\rh[1]{21}{2}{21}{2}=\rh[1]{(21)0}{2}{(21)0}{2}=\rh[1]{2(10)}{2}{2(10)}{2}=\rh[1]{0}{10}{0}{10}=\rh[-1]{2}{10}{2}{10}=\rh[1]{20}{10}{20}{10}=\rh[-1]{21}{10}{21}{10}=\rh[1]{0}{20}{0}{20}=\rh[1]{1}{20}{1}{20}=\rh[1]{21}{20}{21}{20}=\rh[3]{(21)0}{20}{(21)0}{20}=\rh[1]{1}{21}{1}{21}=\rh[1]{10}{21}{10}{21}=\rh[3]{(21)0}{21}{(21)0}{21}=\rh[3]{2(10)}{21}{2(10)}{21}=\rh[1]{0}{(21)0}{0}{(21)0}=\rh[1]{1}{(21)0}{1}{(21)0}=\rh[-1]{2}{(21)0}{2}{(21)0}=\rh[3]{10}{(21)0}{10}{(21)0}=\rh[1]{0}{2(10)}{0}{2(10)}=\rh[3]{10}{2(10)}{10}{2(10)}=\rh[3]{20}{2(10)}{20}{2(10)}=\rh[5]{(21)0}{2(10)}{(21)0}{2(10)}=\frac{q \left(u_1-u_2\right)}{u_1-q^2 u_2}$
\end{itemize}

These are the nonzero entries of $U$ and $D$, defined in \eqref{eq:UD4}:
\begin{itemize}
\item
$\uptri[1]{10}{10}{10}=\uptri[1]{10}{20}{(21)0}=\uptri[1]{20}{20}{20}=\uptri[1]{20}{21}{2(10)}=\uptri[1]{21}{2(10)}{20}=\uptri[1]{21}{21}{21}=\uptri[1]{(21)0}{10}{20}=\uptri[1]{(21)0}{1}{2(10)}=\uptri[1]{2(10)}{20}{21}=-\frac{1}{q}$
\item
$\uptri[0]{0}{0}{0}=\uptri[0]{0}{1}{10}=\uptri[0]{0}{2}{20}=\uptri[0]{0}{21}{(21)0}=\uptri[0]{1}{10}{0}=\uptri[0]{1}{1}{1}=\uptri[0]{1}{2}{21}=\uptri[0]{2}{20}{0}=\uptri[0]{2}{21}{1}=\uptri[0]{2}{2}{2}=\uptri[0]{2}{2(10)}{10}=\uptri[0]{10}{0}{1}=\uptri[0]{10}{2}{2(10)}=\uptri[0]{20}{0}{2}=\uptri[0]{21}{(21)0}{0}=\uptri[0]{21}{1}{2}=\uptri[0]{(21)0}{0}{21}=\uptri[0]{2(10)}{10}{2}=\uptri[2]{2(10)}{2(10)}{2(10)}=1$
\item
$\uptri[1]{1}{2(10)}{(21)0}=\uptri[1]{20}{(21)0}{10}=\uptri[1]{2(10)}{(21)0}{1}=-q$
\item
$\uptri[2]{(21)0}{(21)0}{(21)0}=q^2$
\end{itemize}

\begin{itemize}
\item
$\downtri[2]{(21)0}{(21)0}{(21)0}=\frac{1}{q^2}$
\item
$\downtri[1]{1}{2(10)}{(21)0}=\downtri[1]{2(10)}{(21)0}{1}=\downtri[1]{20}{(21)0}{10}=-\frac{1}{q}$
\item
$\downtri[0]{2}{2(10)}{10}=\downtri[2]{2(10)}{2(10)}{2(10)}=\downtri[0]{2}{20}{0}=\downtri[0]{21}{(21)0}{0}=\downtri[0]{2}{21}{1}=\downtri[0]{0}{21}{(21)0}=\downtri[0]{1}{1}{1}=\downtri[0]{21}{1}{2}=\downtri[0]{0}{1}{10}=\downtri[0]{1}{10}{0}=\downtri[0]{2(10)}{10}{2}=\downtri[0]{2}{2}{2}=\downtri[0]{0}{2}{20}=\downtri[0]{1}{2}{21}=\downtri[0]{10}{2}{2(10)}=\downtri[0]{0}{0}{0}=\downtri[0]{10}{0}{1}=\downtri[0]{20}{0}{2}=\downtri[0]{(21)0}{0}{21}=1$
\item
$\downtri[1]{21}{2(10)}{20}=\downtri[1]{20}{20}{20}=\downtri[1]{2(10)}{20}{21}=\downtri[1]{10}{20}{(21)0}=\downtri[1]{21}{21}{21}=\downtri[1]{20}{21}{2(10)}=\downtri[1]{(21)0}{1}{2(10)}=\downtri[1]{10}{10}{10}=\downtri[1]{(21)0}{10}{20}=-q$
\end{itemize}

\section{The $d=3$ $K$-triangles}\label{app:d3}
\input Ktri.tex
%
\noindent\foreach[count=\a from 0] \x/\y/\z/\t in \Ktriup%
{%
\tikz[scale=1.2]{
%\useasboundingbox (-1.8,-0.67) rectangle (1.8,0.6);
\useasboundingbox (-1.8,-0.87) rectangle (1.8,0.4);
\uptri[\t]\x\y\z
} %
\pgfmathparse{mod(\a,4)==3 ? "\noexpand\linebreak" : ""}\pgfmathresult%
}%
\foreach[count=\a from 3] \x/\y/\z/\t in \Ktridown%
{%
\tikz[scale=1.2]{
\useasboundingbox (-1.8,-0.67) rectangle (1.8,0.6);
\downtri[\t]\x\y\z
} %
\pgfmathparse{mod(\a,4)==3 ? "\noexpand\linebreak" : ""}\pgfmathresult%
}
\linebreak

\junk{\section{The potential $d=3$ equivariant rhombi}\label{app:d3eq}
\input eqrh.tex
Here are all the $d=3$ rhombi with negative inversion number, up to $180^\circ$ rotation,
and up to order-preserving substitutions of the integers $0,\ldots,d$:

\noindent\foreach[count=\a from 0] \x/\y/\z/\w/\t in \eqrh%
{%
\tikz[scale=1.2]{
%\useasboundingbox (-1.8,-0.67) rectangle (1.8,0.6);
\useasboundingbox (-1.8,-0.9) rectangle (1.8,0.9);
\rh[\t]\x\y\z\w
} %
\pgfmathparse{mod(\a,4)==3 ? "\noexpand\linebreak" : ""}\pgfmathresult%
}%
}

\def\hexa#1#2#3#4#5#6{\draw (0:1) -- coordinate[midway,label=right:$\ss #4$] (a) (60:1) coordinate (v) -- coordinate[midway,label=above:$\ss #3$] (b) (120:1) -- coordinate[midway,label=left:$\ss #2$] (c) (180:1) coordinate (u) -- coordinate[midway,label=left:$\ss #1$] (d) (240:1) -- coordinate[midway,label=below:$\ss #6$] (e) (300:1) coordinate (w) -- coordinate[midway,label=right:$\ss #5$] (f) (0:1);
\draw (0,0) -- coordinate[midway] (g) (60:1);
\draw (0,0) -- coordinate[midway] (i) (180:1);
\draw (0,0) -- coordinate[midway] (h) (300:1);
\coordinate (o) at (0,0);
\pic[draw,angle radius=5mm] {angle=d--u--o};\path (u) node[shift={(-30:0.3)}] {$\ss u$};
\pic[draw,angle radius=5mm] {angle=f--w--o};\path (w) node[above=1mm] {$\ss w$};
\pic[draw,angle radius=5mm] {angle=b--v--o};\path (v) node[shift={(210:0.3)}] {$\ss v$};
}
\def\hexb#1#2#3#4#5#6{\draw (0:1) coordinate (v) -- coordinate[midway,label=right:$\ss #4$] (a) (60:1) -- coordinate[midway,label=above:$\ss #3$] (b) (120:1) coordinate (u) -- coordinate[midway,label=left:$\ss #2$] (c) (180:1) -- coordinate[midway,label=left:$\ss #1$] (d) (240:1) coordinate (w) -- coordinate[midway,label=below:$\ss #6$] (e) (300:1) -- coordinate[midway,label=right:$\ss #5$] (f) (0:1);
\draw (0,0) -- coordinate[midway] (i) (0:1);
\draw (0,0) -- coordinate[midway] (h) (120:1);
\draw (0,0) -- coordinate[midway] (g) (240:1);
\coordinate (o) at (0,0);
\pic[draw,angle radius=5mm] {angle=o--u--b};\path (u) node[shift={(-30:0.3)}] {$\ss u$};
\pic[draw,angle radius=5mm] {angle=o--w--d};\path (w) node[above=1mm] {$\ss w$};
\pic[draw,angle radius=5mm] {angle=o--v--f};\path (v) node[shift={(210:0.3)}] {$\ss v$};
}

\section{The cyclic Yang--Baxter equation}\label{app:cyclic}
We start from the following Yang--Baxter equation, in the framework
of \S\ref{sec:genproof}:
\junk{reglue: back to dual graphical. start from the $\mathfrak{e}_6$ $R$-matrix giving in the text. rewrite in more abstract setting, mention dual coxeter number
The solution itself can be graphically represented as rhombi whose edges
are labeled with elements of $L_d$. These rhombi come in three orientations:
\tikz[baseline=0]{\rh{}{}{}{}}, \tikz[rotate=120]{\rh{}{}{}{}},
\tikz[rotate=240]{\rh{}{}{}{}}. To each such rhombus is associated
a fugacity which depends on a parameter; to keep track of the parameter,
say $u$, we denote \tikz[baseline=0]{\rh{}{}{}{}\pic[draw,angle radius=4mm] {angle=cb--ba--ad}; \path (ba) node[above=0.4mm] {$\ss u$}; }. We do not impose
here that the fugacities are invariant by rotation of the rhombi by
120 degrees (though in all cases of interest to us, they could be made invariant by appropriate transformations).
The convention is that when one glues together rhombi, the internal edges
are summed over, whereas the external edges are fixed. 

Recall from Sect.~\ref{ssec:Rd3} the $\mathfrak{e}_6$ $R$-matrix
\[
\left<c\otimes d| R_{\omega_1,\omega_1}(u) |a\otimes b\right>
=\left<d\otimes c| \check R_{\omega_1,\omega_1}(u) |a\otimes b\right>
=
\tikz[baseline=0,scale=1.8]{\rh{a}{b}{c}{d}
\draw[dotted,arrow=0.3] (-60:0.5) -- node[pos=0.3,above left=-1mm] {$\ss u_1$} ++(60:1);
\draw[dotted,invarrow=0.7] (60:0.5) -- node[pos=0.7,above right=-1mm] {$\ss u_2$} ++(-60:1);
}
,
\qquad
u=u_1/u_2
\]
where we condensed into a single picture both the rhombus and the dual line.
\rem{colors missing}

We also need the $R$-matrix where one of the factors is in the dual
representation, namely $R_{\omega_1,x}(u)$ and $R_{x,\omega_1}(u)$; we
symbolically denote them
\[
R_{\omega_1,x}(u)
=
\tikz[baseline=0,scale=1.8]{\rh{}{}{}{}
\draw[dotted,arrow=0.3] (-60:0.5) -- node[pos=0.3,above left=-1mm] {$\ss u_1$} ++(60:1);
\draw[dotted,invarrow=0.7] (60:0.5) -- node[pos=0.7,above right=-1mm] {$\ss u_2$} node[pos=0.3] {$*$} ++(-60:1);
}
,
\qquad
R_{x,\omega_1}(u)
=
\tikz[baseline=0,scale=1.8]{\rh{}{}{}{}
\draw[dotted,arrow=0.3] (-60:0.5) -- node[pos=0.3,above left=-1mm] {$\ss u_1$} node[pos=0.7] {$*$} ++(60:1);
\draw[dotted,invarrow=0.7] (60:0.5) -- node[pos=0.7,above right=-1mm] {$\ss u_2$} ++(-60:1);
}
,\qquad
u=u_1/u_2
\]
\rem{even more inconsistent graphical...}
where the $*$ on a line indicates that we are using the dual representation.
Their expressions will be given shortly.

These three $R$-matrices together satisfy the Yang--Baxter equation, 
which symbolically can be written
\begin{equation}\label{eq:usualYBE}
\begin{tikzpicture}[baseline=0,scale=1.8]
\draw (0:1) coordinate (v) -- coordinate[midway] (a) (60:1) -- coordinate[midway] (b) (120:1) coordinate (u) -- coordinate[midway] (c) (180:1) -- coordinate[midway] (d) (240:1) coordinate (w) -- coordinate[midway] (e) (300:1) -- coordinate[midway] (f) (0:1);
\draw (0,0) -- coordinate[midway] (i) (0:1);
\draw (0,0) -- coordinate[midway] (h) (120:1);
\draw (0,0) -- coordinate[midway] (g) (240:1);
\coordinate (o) at (0,0);
\draw[dotted,arrow=0.4,rounded corners] (d) -- node[pos=0.1,right=-1mm] {$\ss u_3$} (h) -- (a);
\draw[dotted,arrow=0.4,rounded corners] (c) -- node[pos=0.1,right=-1mm] {$\ss u_2$} (g) -- node[pos=0.3] {$*$} (f);
\draw[dotted,arrow=0.4,rounded corners] (b) -- node[pos=0.15,right] {$\ss u_1$} (i) -- (e);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline=0,scale=1.8]
\draw (0:1) -- coordinate[midway] (a) (60:1) coordinate (u) -- coordinate[midway] (b) (120:1) -- coordinate[midway] (c) (180:1) coordinate (w) -- coordinate[midway] (d) (240:1) -- coordinate[midway] (e) (300:1) coordinate (v) -- coordinate[midway] (f) (0:1);
\draw (0,0) -- coordinate[midway] (g) (60:1);
\draw (0,0) -- coordinate[midway] (i) (180:1);
\draw (0,0) -- coordinate[midway] (h) (300:1);
\coordinate (o) at (0,0);
\draw[dotted,arrow=0.4,rounded corners] (d) -- node[pos=0.15,above] {$\ss u_3$} (h) -- (a);
\draw[dotted,arrow=0.4,rounded corners] (c) -- node[pos=0.15,below] {$\ss u_2$} (g) -- node[pos=0.3] {$*$} (f);
\draw[dotted,arrow=0.4,rounded corners] (b) -- node[pos=0.15,right] {$\ss u_1$} (i) -- (e);
\end{tikzpicture}
\end{equation}
}
\begin{equation}\label{eq:usualYBE}
\begin{tikzpicture}[baseline=0,scale=1.8]
\path (0:1) coordinate (v) -- coordinate[midway] (a) (60:1) -- coordinate[midway] (b) (120:1) coordinate (u) -- coordinate[midway] (c) (180:1) -- coordinate[midway] (d) (240:1) coordinate (w) -- coordinate[midway] (e) (300:1) -- coordinate[midway] (f) (0:1);
\path (0,0) -- coordinate[midway] (i) (0:1);
\path (0,0) -- coordinate[midway] (h) (120:1);
\path (0,0) -- coordinate[midway] (g) (240:1);
\coordinate (o) at (0,0);
\draw[dr,arrow=0.4,rounded corners] (d) -- node[pos=0.1,right=-1mm] {$\ss u_1$} (h) -- (a);
\draw[dg,invarrow=0.4,rounded corners] (c) -- node[pos=0.1,right=-1mm] {$\ss u_3$} (g) -- (f);
\draw[db,invarrow=0.4,rounded corners] (b) -- node[pos=0.15,right] {$\ss u_2$} (i) -- (e);
\end{tikzpicture}
=
\begin{tikzpicture}[baseline=0,scale=1.8]
\path (0:1) -- coordinate[midway] (a) (60:1) coordinate (u) -- coordinate[midway] (b) (120:1) -- coordinate[midway] (c) (180:1) coordinate (w) -- coordinate[midway] (d) (240:1) -- coordinate[midway] (e) (300:1) coordinate (v) -- coordinate[midway] (f) (0:1);
\path (0,0) -- coordinate[midway] (g) (60:1);
\path (0,0) -- coordinate[midway] (i) (180:1);
\path (0,0) -- coordinate[midway] (h) (300:1);
\coordinate (o) at (0,0);
\draw[dr,arrow=0.4,rounded corners] (d) -- node[pos=0.15,above] {$\ss u_1$} (h) -- (a);
\draw[dg,invarrow=0.4,rounded corners] (c) -- node[pos=0.15,below] {$\ss u_3$} (g) -- (f);
\draw[db,invarrow=0.4,rounded corners] (b) -- node[pos=0.15,right] {$\ss u_2$} (i) -- (e);
\end{tikzpicture}
\end{equation}

We now assume that to each crossing is associated an $R$-matrix coming from
an untwisted quantized affine algebra $U_q(\mathfrak{g}^{(1)})$. Then one can use
the {\em crossing symmetry}\/ to restore the cyclic symmetry of the picture:
\[
\tikz[baseline=-3pt,scale=1.5]
{
\draw[db,arrow=0.3] (120:-1) -- node[pos=0.3,right] {$\ss u_2$} (120:1);
\draw[dr,arrow=0.3] (0:-1) -- node[pos=0.3,below] {$\ss u_1$} (0:1);
}
=
\tikz[baseline=-3pt,scale=1.5]
{
\draw[db,invarrow=0.3] (120:-1) -- node[pos=0.7] {$*$} node[pos=0.3,right] {$\ss q^h u_2$} (120:1);
\draw[dr,arrow=0.3] (0:-1) -- node[pos=0.3,below] {$\ss u_1$} (0:1);
}
\qquad
\tikz[baseline=-3pt,scale=1.5]
{
\draw[db,arrow=0.3] (60:-1) -- node[pos=0.15,right] {$\ss u_2$} (60:1);
\draw[dg,invarrow=0.3] (0:-1) -- node[pos=0.85,above] {$\ss u_3$} (0:1);
}
=
\tikz[baseline=-3pt,scale=1.5]
{
\draw[db,invarrow=0.3] (60:-1) node[circle,fill=white,draw=\db,thin,inner sep=2pt] {$\ss K$} -- node[pos=0.25,right] {$\ss q^{-h}u_2$} node[pos=0.7] {$*$} (60:1) node[circle,draw=\db,thin,fill=white,inner sep=0pt] {$\ss K^{-1}$};
\draw[dg,invarrow=0.3] (0:-1) -- node[pos=0.85,above] {$\ss u_3$} (0:1);
}
\]
\junk{\[
\tikz[baseline=0,scale=1.8]{\rh{}{}{}{}
\draw[dotted,arrow=0.3] (-60:0.5) -- node[pos=0.3,above left=-1mm] {$\ss u_1$} ++(60:1);
\draw[dotted,invarrow=0.7] (60:0.5) -- node[pos=0.7,above right=-1mm] {$\ss u_2$} node[pos=0.3] {$*$} ++(-60:1);
}
=
\tikz[baseline=0,scale=1.8]{\rh{}{}{}{}
\draw[dotted,arrow=0.3] (-60:0.5) -- node[pos=0.3,above left=-1mm] {$\ss u_1$} ++(60:1);
\draw[dotted,arrow=0.7] (60:0.5) -- node[pos=0.7,above right=-1mm] {$\ss q^{12} u_2$} ++(-60:1) node[circle,fill=white,draw=black,solid,inner sep=0pt] {$\ss K^{-1}$};
}
,
\qquad
\tikz[baseline=0,scale=1.8]{\rh{}{}{}{}
\draw[dotted,arrow=0.3] (-60:0.5) -- node[pos=0.3,above left=-1mm] {$\ss u_1$} node[pos=0.7] {$*$} ++(60:1);
\draw[dotted,invarrow=0.7] (60:0.5) -- node[pos=0.7,above right=-1mm] {$\ss u_2$} ++(-60:1);
}
=
\tikz[baseline=0,scale=1.8]{\rh{}{}{}{}
\draw[dotted,invarrow=0.3] (-60:0.5) -- node[pos=0.3,above left=-1mm] {$\ss q^{-12}u_1$} ++(60:1);
\draw[dotted,invarrow=0.7] (60:0.5) -- node[pos=0.7,above right=-1mm] {$\ss u_2$} ++(-60:1);
}
\]}
where $\ast$ denotes the {\em dual}\/ representation, the circled $K^{\pm 1}$ denotes multiplication by the Cartan element $K=q^{\rho}$, $\rho$ half the sum of positive roots of $\mathfrak{g}$, % or its inverse,
and $h$ is the dual Coxeter number of $\mathfrak{g}$.
Note the conventional choice of dual (rather than predual) representation, hence the apparent discrepancy between
the two equalities.

We can thus rewrite the Yang--Baxter equation \eqref{eq:usualYBE}:
\begin{equation}\label{eq:preweirdYBE}
\begin{tikzpicture}[baseline=0,scale=1.8]
\path (0:1) coordinate (v) -- coordinate[midway] (a) (60:1) -- coordinate[midway] (b) (120:1) coordinate (u) -- coordinate[midway] (c) (180:1) -- coordinate[midway] (d) (240:1) coordinate (w) -- coordinate[midway] (e) (300:1) -- coordinate[midway] (f) (0:1);
\path (0,0) -- coordinate[midway] (i) (0:1);
\path (0,0) -- coordinate[midway] (h) (120:1);
\path (0,0) -- coordinate[midway] (g) (240:1);
\coordinate (o) at (0,0);
\draw[dr,arrow=0.4,rounded corners] (d) -- node[pos=0.15,left] {$\ss u_1$} (h) -- (a);
\draw[dg,invarrow=0.35,rounded corners] (c) -- node[pos=0.15,left] {$\ss u_3$} (g) -- (f);
\draw[db,arrow=0.35,rounded corners] (b) -- node[pos=0.15,right] {$\ss q^h u_2$} (i) node[circle,thin,draw=\db,fill=white,inner sep=0pt] {$\ss K^{-1}$} -- node[pos=0.3] {$*$} node[pos=0.8,right] {$\ss q^{-h} u_2$} (e) node[circle,fill=white,draw=\db,thin,inner sep=2pt] {$\ss K$};
\end{tikzpicture}
=
\begin{tikzpicture}[baseline=0,scale=1.8]
\path (0:1) -- coordinate[midway] (a) (60:1) coordinate (u) -- coordinate[midway] (b) (120:1) -- coordinate[midway] (c) (180:1) coordinate (w) -- coordinate[midway] (d) (240:1) -- coordinate[midway] (e) (300:1) coordinate (v) -- coordinate[midway] (f) (0:1);
\path (0,0) -- coordinate[midway] (g) (60:1);
\path (0,0) -- coordinate[midway] (i) (180:1);
\path (0,0) -- coordinate[midway] (h) (300:1);
\coordinate (o) at (0,0);
\draw[dr,arrow=0.4,rounded corners] (d) -- node[pos=0.15,below] {$\ss u_1$} (h) -- (a);
\draw[dg,invarrow=0.35,rounded corners] (c)  -- node[pos=0.15,above] {$\ss u_3$} (g) -- (f);
\draw[db,arrow=0.4,rounded corners] (b) node[circle,thin,draw=\db,fill=white,inner sep=0pt] {$\ss K^{-1}$} -- node[pos=0.25,right] {$\ss q^{-h}u_2$} (i)  node[circle,fill=white,draw=\db,thin,inner sep=2pt] {$\ss K$} -- node[pos=0.3] {$*$} node[pos=0.75,right] {$\ss q^h u_2$} (e);
\end{tikzpicture}
\end{equation}
where something slightly strange happens in that the parameter of the
blue line ``jumps'' from $q^{\pm h}u_2$ to $q^{\mp h}u_2$ as it goes across the central circle.

%As mentioned in theorem~\ref{thm:classif}, \rem{OR NOT?}
Observe that
for $\lie{g}=\lie{a}_2,\lie{d}_4,\lie{e_6},\lie{e_8}$,
the dual Coxeter number
$h=3,6,12,30$ is a multiple of $3$.  Furthermore,
for the representations used (implicitly) at $d=1$ in \cite{artic68},
at $d=2$ in \S\ref{sec:d2}, at $d=3$ in \S\ref{sec:d3}, the ratio of
spectral parameters $q^{2h/3}$ is precisely the value at which the
$R$-matrices corresponding to two types of lines turn into projectors
onto the third type of line. It is therefore very tempting to redefine
\begin{multline*}
%R_{\omega_1,\omega_1}(q^8u)=
\tikz[baseline=-3pt,scale=1.5]{
\draw[dr,arrow=0.3] (60:-1) -- node[pos=0.3,above left=-1mm] {$\ss u_1$} (60:1);
\draw[dg,invarrow=0.7] (-60:-1) -- node[pos=0.7,above right=-1mm] {$\ss u_2$} (-60:1);
}
=
\tikz[baseline=-3pt,scale=1.8]{
\rh{}{}{}{}
\pic[draw,angle radius=5mm] {angle=cb--ba--ad};\path (ba) node[above=1mm] {$\ss u$};
},
\qquad
\tikz[baseline=-3pt,scale=1.5,rotate=-120]{%\rh{}{}{}{}
\draw[db,arrow=0.3] (60:-1) -- node[pos=0.3,right] {$\ss u_1$} (60:1);
\draw[dr,invarrow=0.7] (-60:-1) -- node[pos=0.7,below] {$\ss u_2$} (-60:1);
}
=
\tikz[baseline=-0.866cm,scale=1.8,rotate=-120]{
\rh{}{}{}{}
\pic[draw,angle radius=5mm] {angle=cb--ba--ad};\path (ba) node[shift={(-30:0.3)}] {$\ss u$};
},
\\
\tikz[baseline=-3pt,scale=1.5,rotate=120]{%\rh{}{}{}{}
\draw[dg,arrow=0.3] (60:-1) -- node[pos=0.3,below] {$\ss u_1$} (60:1);
\draw[db,invarrow=0.7] (-60:-1)  node[circle,fill=white,draw=\db,thin,inner sep=2pt] {$\ss K$} -- node[pos=0.7,left] {$\ss u_2$} (-60:1) node[circle,fill=white,draw=\db,thin,inner sep=0pt] {$\ss K^{-1}$};
}
=
\tikz[baseline=0.866cm,scale=1.8,rotate=120]{
\rh{}{}{}{}
\pic[draw,angle radius=5mm] {angle=cb--ba--ad};\path (ba) node[shift={(210:0.3)}] {$\ss u$};
},
\qquad u=q^{-2h/3}u_1/u_2
\end{multline*}
where the rhombi are not allowed to be rotated.
Note that by conjugation, one could share $K$ equally between the three
orientations of rhombi, thus restoring $\ZZ/3$-symmetry.
Up to such possible conjugations, the first rhombus will eventually play the role of equivariant rhombus,
where $u$ is the ratio of equivariant parameters.

Setting $u=q^{h/3}u_2/u_1$, $v=q^{h/3}u_3/u_2$, $w=q^{-2h/3} u_1/u_3$
(with $uvw=1$), we find that
Eq.~\eqref{eq:preweirdYBE} becomes 
the ``cyclic'' Yang--Baxter equation:
\begin{equation}\label{eq:weirdYBE}
\tikz[baseline=0,scale=1.8]{\hexb{}{}{}{}{}{}}
=
\tikz[baseline=0,scale=1.8]{\hexa{}{}{}{}{}{}}
\qquad
\forall u,v,w:\ uvw=1
\end{equation}
Compare with \cite[proposition~1]{artic46} (which corresponds to the
rational limit where the spectral parameters are expanded to first
order around $1$) and \cite[proposition~3]{artic68}, both related to
the $d=1$ case in the limit $q\to0$. We could then proceed as in these
papers to derive our puzzle rules for general $d \leq 3$, although
this is quite involved technically.


% to fix MR issues
\gdef\MRshorten#1 #2MRend{#1}%
\gdef\MRfirsttwo#1#2{\if#1M%
MR\else MR#1#2\fi}
\def\MRfix#1{\MRshorten\MRfirsttwo#1 MRend}
\renewcommand\MR[1]{\relax\ifhmode\unskip\spacefactor3000 \space\fi
\MRhref{\MRfix{#1}}{{\scriptsize \MRfix{#1}}}}
\renewcommand{\MRhref}[2]{%
\href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2}}
%
\bibliographystyle{amsalphahyper}
\bibliography{biblio}

\end{document}



puzzles.bbl
\def\cprime{$'$} \def\cprime{$'$}
\providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace}
\providecommand{\MR}{\relax\ifhmode\unskip\space\fi MR }
% \MRhref is called by the amsart/book/proc definition of \MR.
\providecommand{\MRhref}[2]{%
  \href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2}
}
\providecommand{\href}[2]{#2}
\begin{thebibliography}{STWZ15}

\bibitem[AGM11]{AGM}
D.~Anderson, S.~Griffeth, and E.~Miller, \emph{Positivity and {K}leiman
  transversality in equivariant {$K$}-theory of homogeneous spaces}, J. Eur.
  Math. Soc. (JEMS) \textbf{13} (2011), no.~1, 57--84,
  \href{http://arxiv.org/abs/0808.2785}{\path{arXiv:0808.2785}},
  \href{http://dx.doi.org/10.4171/JEMS/244}{\path{doi}}. \MR{2735076}

\bibitem[BGZ06]{BarotGeissZelevinsky}
M.~Barot, C.~Geiss, and A.~Zelevinsky, \emph{Cluster algebras of finite type
  and positive symmetrizable matrices}, Journal of the London Mathematical
  Society \textbf{73} (2006), no.~3, 545--564,
  \href{http://arxiv.org/abs/math/0411341}{\path{arXiv:math/0411341}}.

\bibitem[BKPT16]{BKPT}
A.~Buch, A.~Kresch, K.~Purbhoo, and H.~Tamvakis, \emph{The puzzle conjecture
  for the cohomology of two-step flag manifolds}, 2016, pp.~973--1007,
  \href{http://arxiv.org/abs/1401.1725}{\path{arXiv:1401.1725}},
  \href{http://dx.doi.org/10.1007/s10801-016-0697-3}{\path{doi}}. \MR{3566227}

\bibitem[Buc15]{BuchHT}
A.~Buch, \emph{Mutations of puzzles and equivariant cohomology of two-step flag
  varieties}, Ann. of Math. \textbf{182} (2015), 173--220,
  \href{http://arxiv.org/abs/1401.3065}{\path{arXiv:1401.3065}},
  \href{http://dx.doi.org/10.4007/annals.2015.182.1.4}{\path{doi}}.
  \MR{3374959}

\bibitem[CP94]{CP-book}
V.~Chari and A.~Pressley, \emph{A guide to quantum groups}, Cambridge
  University Press, Cambridge, 1994. \MR{1300632}

\bibitem[CS99]{SPLAG}
J.~Conway and N.~Sloane, \emph{Sphere packings, lattices and groups}, third
  ed., Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of
  Mathematical Sciences], vol. 290, Springer-Verlag, New York, 1999, With
  additional contributions by E. Bannai, R. E. Borcherds, J. Leech, S. P.
  Norton, A. M. Odlyzko, R. A. Parker, L. Queen and B. B. Venkov,
  \href{http://dx.doi.org/10.1007/978-1-4757-6568-7}{\path{doi}}. \MR{1662447}

\bibitem[CV09]{CV}
I.~Coskun and R.~Vakil, \emph{Geometric positivity in the cohomology of
  homogeneous spaces and generalized {S}chubert calculus}, Proc. Sympos. Pure
  Math, vol.~80, 2009, pp.~77--124,
  \href{http://arxiv.org/abs/math/0610538}{\path{arXiv:math/0610538}}.

\bibitem[FK93]{FK-groth}
S.~Fomin and A.~Kirillov, \emph{{Y}ang--{B}axter equation, symmetric functions
  and {G}rothendieck polynomials}, 1993,
  \href{http://arxiv.org/abs/hep-th/9306005}{\path{arXiv:hep-th/9306005}}.

\bibitem[FK94]{FK-Groth2}
\bysame, \emph{Grothendieck polynomials and the {Y}ang--{B}axter equation},
  Formal power series and algebraic combinatorics/{S}\'eries formelles et
  combinatoire alg\'ebrique, DIMACS, Piscataway, NJ, 1994, pp.~183--189.
  \MR{2307216}

\bibitem[Ful98]{FultonSurvey}
W.~Fulton, \emph{Eigenvalues of sums of {H}ermitian matrices}, S{\'e}minaire
  Bourbaki \textbf{40} (1998), 255--269.

\bibitem[GLS05]{GLSprep}
C.~Geiss, B.~Leclerc, and J.~Schr\"oer, \emph{Semicanonical bases and
  preprojective algebras}, Ann. Sci. \'Ecole Norm. Sup. (4) \textbf{38} (2005),
  no.~2, 193--253,
  \href{http://arxiv.org/abs/math/0402448}{\path{arXiv:math/0402448}},
  \href{http://dx.doi.org/10.1016/j.ansens.2004.12.001}{\path{doi}}.
  \MR{2144987}

\bibitem[Gra01]{Graham}
W.~Graham, \emph{Positivity in equivariant {S}chubert calculus}, Duke
  Mathematical Journal \textbf{109} (2001), no.~3, 599--614,
  \href{http://arxiv.org/abs/math/9908172}{\path{arXiv:math/9908172}}.

\bibitem[KM04]{KM-Schubert2}
A.~Knutson and E.~Miller, \emph{Subword complexes in {C}oxeter groups}, Adv.
  Math. \textbf{184} (2004), no.~1, 161--176,
  \href{http://arxiv.org/abs/math/0309259}{\path{arXiv:math/0309259}},
  \href{http://dx.doi.org/10.1016/S0001-8708(03)00142-7}{\path{doi}}.
  \MR{2047852}

\bibitem[KP11]{KPur}
A.~Knutson and K.~Purbhoo, \emph{Product and puzzle formulae for {${\rm GL}_n$}
  {B}elkale--{K}umar coefficients}, Electron. J. Combin. \textbf{18} (2011),
  no.~1, Paper 76, 20,
  \href{http://arxiv.org/abs/1008.4979}{\path{arXiv:1008.4979}}. \MR{2788693}

\bibitem[KT03]{KT}
A.~Knutson and T.~Tao, \emph{Puzzles and (equivariant) cohomology of
  {G}rassmannians}, Duke Math. J. \textbf{119} (2003), no.~2, 221--260,
  \href{http://arxiv.org/abs/math/0112150}{\path{arXiv:math/0112150}},
  \href{http://dx.doi.org/10.1215/S0012-7094-03-11922-5}{\path{doi}}.
  \MR{1997946 (2006a:14088)}

\bibitem[KTW04]{KTW}
A.~Knutson, T.~Tao, and C.~Woodward, \emph{The honeycomb model of {${\rm GL}\sb
  n(\mathbb{C})$} tensor products. {II}. {P}uzzles determine facets of the
  {L}ittlewood--{R}ichardson cone}, J. Amer. Math. Soc. \textbf{17} (2004),
  no.~1, 19--48,
  \href{http://arxiv.org/abs/math.CO/0107011}{\path{arXiv:math.CO/0107011}}.
  \MR{MR2015329 (2005f:14105)}

\bibitem[KZJ]{SchubII}
A.~Knutson and P.~Zinn-Justin, \emph{Schubert puzzles and integrability {II}},
  work in progress.

\bibitem[Pur08]{Pur}
K.~Purbhoo, \emph{Puzzles, tableaux, and mosaics}, J. Algebraic Combin.
  \textbf{28} (2008), no.~4, 461--480,
  \href{http://arxiv.org/abs/0705.1184}{\path{arXiv:0705.1184}}. \MR{MR2443281}

\bibitem[PY15]{PY}
O.~Pechenik and A.~Yong, \emph{Equivariant {$K$}-theory of {G}rassmannians
  {II}: the {K}nutson--{V}akil conjecture}, 2015,
  \href{http://arxiv.org/abs/1508.00446}{\path{arXiv:1508.00446}}.

\bibitem[Sco06]{JScott}
J.~Scott, \emph{Grassmannians and cluster algebras}, Proceedings of the London
  Mathematical Society \textbf{92} (2006), no.~2, 345--380,
  \href{http://arxiv.org/abs/math/0311148}{\path{arXiv:math/0311148}}.

\bibitem[Slo]{oeis131027}
N.~Sloane, \emph{The on-line encyclopedia of integer sequences}, Sequence
  A131027, \url{http://oeis.org/A131027}.

\bibitem[STWZ15]{ShendeTWZ}
V.~Shende, D.~Treumann, H.~Williams, and E.~Zaslow, \emph{Cluster varieties
  from {L}egendrian knots}, 2015,
  \href{http://arxiv.org/abs/1512.08942}{\path{arXiv:1512.08942}}.

\bibitem[Vak06]{Vakil}
R.~Vakil, \emph{A geometric {L}ittlewood--{R}ichardson rule}, Ann. of Math. (2)
  \textbf{164} (2006), no.~2, 371--421, Appendix A written with A. Knutson,
  \href{http://arxiv.org/abs/math.AG/0302294}{\path{arXiv:math.AG/0302294}},
  \href{http://dx.doi.org/10.4007/annals.2006.164.371}{\path{doi}}.
  \MR{2247964}

\bibitem[WZJ16a]{artic67}
M.~Wheeler and P.~Zinn-Justin, \emph{{H}all polynomials, inverse {K}ostka
  polynomials and puzzles}, 2016,
  \href{http://arxiv.org/abs/1603.01815}{\path{arXiv:1603.01815}}.

\bibitem[WZJ16b]{artic68}
\bysame, \emph{{L}ittlewood--{R}ichardson coefficients for {G}rothendieck
  polynomials from integrability}, 2016,
  \href{http://arxiv.org/abs/1607.02396}{\path{arXiv:1607.02396}}.

\bibitem[Zel99]{Zelevinsky}
A.~Zelevinsky, \emph{Littlewood--{R}ichardson semigroups}, New perspectives in
  algebraic combinatorics (Berkeley, CA, 1996--97), Math. Sci. Res. Inst. Publ
  \textbf{38} (1999), 337--345,
  \href{http://arxiv.org/abs/math/9704228}{\path{arXiv:math/9704228}}.

\bibitem[ZJ09a]{artic46}
P.~Zinn-Justin, \emph{{L}ittlewood--{R}ichardson coefficients and integrable
  tilings}, Electron. J. Combin. \textbf{16} (2009), Research Paper 12,
  \href{http://arxiv.org/abs/0809.2392}{\path{arXiv:0809.2392}}.

\bibitem[ZJ09b]{hdr}
\bysame, \emph{Six-vertex, loop and tiling models: integrability and
  combinatorics}, Lambert Academic Publishing, 2009, Habilitation thesis,
  \url{http://www.lpthe.jussieu.fr/~pzinn/publi/hdr.pdf}.

\end{thebibliography}
