\node[anchor=north west,inner sep=0] at (46.31pt,-1.6164pt){\savebox{\marxupbox}{{\({\scriptstyle k}\)}}\immediate\write\boxesfile{336}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](44.31pt,0.3836pt)--(52.6498pt,0.3836pt)--(52.6498pt,-8.5986pt)--(44.31pt,-8.5986pt)--cycle;
\end{tikzpicture}}-{\begin{tikzpicture}[baseline=(current bounding box.center)]\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14pt,20.215pt)--(-13pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14pt,10.215pt)--(-13pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](37.31pt,12.715pt)--(44.31pt,12.715pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,20.215pt)--(-6pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,10.215pt)--(-6pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,20.215pt)--(3pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,10.215pt)--(3pt,10.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,5.215pt)--(3pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,20.215pt)--(31.31pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,5.215pt)--(31.31pt,5.215pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](31.31pt,21.215pt)..controls(35.31pt,21.215pt)and(37.31pt,14.715pt)..(37.31pt,12.715pt)..controls(37.31pt,10.715pt)and(35.31pt,4.215pt)..(31.31pt,4.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,20.215pt)--(28.31pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,14.215pt)--(24.31pt,14.215pt)--(24.31pt,-3pt)--(7pt,-3pt)--cycle;
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,5.215pt)--(10pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,10.215pt)--(7pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,5.215pt)--(24.31pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,10.215pt)--(7pt,10.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,5.215pt)--(7pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](24.31pt,5.215pt)--(28.31pt,5.215pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](13pt,7.43pt)--(18.31pt,7.43pt)--(18.31pt,3pt)--(13pt,3pt)--cycle;
\node[anchor=north west,inner sep=0] at (13pt,7.43pt){\savebox{\marxupbox}{{\(u\)}}\immediate\write\boxesfile{337}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,7.93pt)..controls(10pt,9.3107pt)and(11.1193pt,10.43pt)..(12.5pt,10.43pt)--(18.81pt,10.43pt)..controls(20.1907pt,10.43pt)and(21.31pt,9.3107pt)..(21.31pt,7.93pt)--(21.31pt,2.5pt)..controls(21.31pt,1.1193pt)and(20.1907pt,0pt)..(18.81pt,0pt)--(12.5pt,0pt)..controls(11.1193pt,0pt)and(10pt,1.1193pt)..(10pt,2.5pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,5.215pt)--(21.31pt,5.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,5.215pt)--(10pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-6pt,20.215pt)--(0pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-6pt,10.215pt)--(0pt,10.215pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](0pt,10.215pt)--(0pt,10.215pt)--(0pt,5.215pt)--(0pt,5.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](-3pt,13.215pt)--(3pt,13.215pt)--(3pt,2.215pt)--(-3pt,2.215pt)--cycle;
\path[-,fill=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](1pt,5.215pt)..controls(1pt,5.7673pt)and(0.5523pt,6.215pt)..(0pt,6.215pt)..controls(-0.5523pt,6.215pt)and(-1pt,5.7673pt)..(-1pt,5.215pt)..controls(-1pt,4.6627pt)and(-0.5523pt,4.215pt)..(0pt,4.215pt)..controls(0.5523pt,4.215pt)and(1pt,4.6627pt)..(1pt,5.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13pt,20.215pt)--(-7pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13pt,10.215pt)--(-7pt,10.215pt);
\path[-,draw=black,line width=1.2pt,line cap=butt,line join=miter,dash pattern=](-10pt,21.215pt)--(-10pt,9.215pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-18.6316pt,22.5546pt)--(-16pt,22.5546pt)--(-16pt,17.8754pt)--(-18.6316pt,17.8754pt)--cycle;
\node[anchor=north west,inner sep=0] at (-18.6316pt,22.5546pt){\savebox{\marxupbox}{{\({\scriptstyle i}\)}}\immediate\write\boxesfile{338}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-20.6316pt,24.5546pt)--(-14pt,24.5546pt)--(-14pt,15.8754pt)--(-20.6316pt,15.8754pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-19.8617pt,13.2938pt)--(-16pt,13.2938pt)--(-16pt,7.1362pt)--(-19.8617pt,7.1362pt)--cycle;
\node[anchor=north west,inner sep=0] at (-19.8617pt,13.2938pt){\savebox{\marxupbox}{{\({\scriptstyle j}\)}}\immediate\write\boxesfile{339}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-21.8617pt,15.2938pt)--(-14pt,15.2938pt)--(-14pt,5.1362pt)--(-21.8617pt,5.1362pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](46.31pt,15.2061pt)--(50.6498pt,15.2061pt)--(50.6498pt,10.2239pt)--(46.31pt,10.2239pt)--cycle;
\node[anchor=north west,inner sep=0] at (46.31pt,15.2061pt){\savebox{\marxupbox}{{\({\scriptstyle k}\)}}\immediate\write\boxesfile{340}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](44.31pt,17.2061pt)--(52.6498pt,17.2061pt)--(52.6498pt,8.2239pt)--(44.31pt,8.2239pt)--cycle;
\end{tikzpicture}}+{\begin{tikzpicture}[baseline=(current bounding box.center)]\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-8pt,17.6334pt)--(-7pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-8pt,10.215pt)--(-7pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](37.31pt,11.4242pt)--(44.31pt,11.4242pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-1pt,17.6334pt)--(0pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-1pt,10.215pt)--(0pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,17.6334pt)--(31.31pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,5.215pt)--(31.31pt,5.215pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](31.31pt,18.6334pt)..controls(35.31pt,18.6334pt)and(37.31pt,13.4242pt)..(37.31pt,11.4242pt)..controls(37.31pt,9.4242pt)and(35.31pt,4.215pt)..(31.31pt,4.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,17.6334pt)--(28.31pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,10.215pt)--(3pt,10.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,5.215pt)--(3pt,5.215pt);
\path[-,draw=black,line width=0.8pt,line cap=butt,line join=miter,dash pattern=](7pt,11.215pt)..controls(7pt,12.8718pt)and(8.3431pt,14.215pt)..(10pt,14.215pt)--(21.31pt,14.215pt)..controls(22.9669pt,14.215pt)and(24.31pt,12.8718pt)..(24.31pt,11.215pt)--(24.31pt,0pt)..controls(24.31pt,-1.6569pt)and(22.9669pt,-3pt)..(21.31pt,-3pt)--(10pt,-3pt)..controls(8.3431pt,-3pt)and(7pt,-1.6569pt)..(7pt,0pt)--cycle;
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,5.215pt)--(10pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,10.215pt)--(7pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,5.215pt)--(24.31pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,10.215pt)--(7pt,10.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,5.215pt)--(7pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](24.31pt,5.215pt)--(28.31pt,5.215pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](13pt,7.43pt)--(18.31pt,7.43pt)--(18.31pt,3pt)--(13pt,3pt)--cycle;
\node[anchor=north west,inner sep=0] at (13pt,7.43pt){\savebox{\marxupbox}{{\(u\)}}\immediate\write\boxesfile{341}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,7.93pt)..controls(10pt,9.3107pt)and(11.1193pt,10.43pt)..(12.5pt,10.43pt)--(18.81pt,10.43pt)..controls(20.1907pt,10.43pt)and(21.31pt,9.3107pt)..(21.31pt,7.93pt)--(21.31pt,2.5pt)..controls(21.31pt,1.1193pt)and(20.1907pt,0pt)..(18.81pt,0pt)--(12.5pt,0pt)..controls(11.1193pt,0pt)and(10pt,1.1193pt)..(10pt,2.5pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,5.215pt)--(21.31pt,5.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,5.215pt)--(10pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,10.215pt)--(0pt,10.215pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](0pt,10.215pt)--(0pt,10.215pt)--(0pt,5.215pt)--(0pt,5.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](-3pt,13.215pt)--(3pt,13.215pt)--(3pt,2.215pt)--(-3pt,2.215pt)--cycle;
\path[-,fill=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](1pt,5.215pt)..controls(1pt,5.7673pt)and(0.5523pt,6.215pt)..(0pt,6.215pt)..controls(-0.5523pt,6.215pt)and(-1pt,5.7673pt)..(-1pt,5.215pt)..controls(-1pt,4.6627pt)and(-0.5523pt,4.215pt)..(0pt,4.215pt)..controls(0.5523pt,4.215pt)and(1pt,4.6627pt)..(1pt,5.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,17.6334pt)--(-1pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,10.215pt)--(-1pt,10.215pt);
\path[-,draw=black,line width=1.2pt,line cap=butt,line join=miter,dash pattern=](-4pt,18.6334pt)--(-4pt,9.215pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-12.6316pt,19.973pt)--(-10pt,19.973pt)--(-10pt,15.2938pt)--(-12.6316pt,15.2938pt)--cycle;
\node[anchor=north west,inner sep=0] at (-12.6316pt,19.973pt){\savebox{\marxupbox}{{\({\scriptstyle i}\)}}\immediate\write\boxesfile{342}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14.6316pt,21.973pt)--(-8pt,21.973pt)--(-8pt,13.2938pt)--(-14.6316pt,13.2938pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13.8617pt,13.2938pt)--(-10pt,13.2938pt)--(-10pt,7.1362pt)--(-13.8617pt,7.1362pt)--cycle;
\node[anchor=north west,inner sep=0] at (-13.8617pt,13.2938pt){\savebox{\marxupbox}{{\({\scriptstyle j}\)}}\immediate\write\boxesfile{343}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-15.8617pt,15.2938pt)--(-8pt,15.2938pt)--(-8pt,5.1362pt)--(-15.8617pt,5.1362pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](46.31pt,13.9153pt)--(50.6498pt,13.9153pt)--(50.6498pt,8.9331pt)--(46.31pt,8.9331pt)--cycle;
\node[anchor=north west,inner sep=0] at (46.31pt,13.9153pt){\savebox{\marxupbox}{{\({\scriptstyle k}\)}}\immediate\write\boxesfile{344}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](44.31pt,15.9153pt)--(52.6498pt,15.9153pt)--(52.6498pt,6.9331pt)--(44.31pt,6.9331pt)--cycle;
\end{tikzpicture}}\)

then we use the lemma again to expand \(∇u\) in the last term

\({\begin{tikzpicture}[baseline=(current bounding box.center)]\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14pt,10pt)--(-13pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14pt,0pt)--(-13pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](41.31pt,-4.1075pt)--(44.31pt,-4.1075pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,10pt)--(-6pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,0pt)--(-6pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,10pt)--(7pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,0pt)--(7pt,0pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,-8.215pt)--(7pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,10pt)--(21.31pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,0pt)--(21.31pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,-8.215pt)--(21.31pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,14pt)--(37.31pt,14pt)--(37.31pt,-12.215pt)--(25.31pt,-12.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,0pt)--(28.31pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,-8.215pt)--(28.31pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,10pt)--(25.31pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](34.31pt,-4.1075pt)--(37.31pt,-4.1075pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,10pt)--(25.31pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,0pt)--(25.31pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,-8.215pt)--(25.31pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](37.31pt,-4.1075pt)--(41.31pt,-4.1075pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,1pt)..controls(32.31pt,1pt)and(34.31pt,-2.1075pt)..(34.31pt,-4.1075pt)..controls(34.31pt,-6.1075pt)and(32.31pt,-9.215pt)..(28.31pt,-9.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,10pt)--(18.31pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,0pt)--(18.31pt,0pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,-6pt)--(15.31pt,-6pt)--(15.31pt,-10.43pt)--(10pt,-10.43pt)--cycle;
\node[anchor=north west,inner sep=0] at (10pt,-6pt){\savebox{\marxupbox}{{\(u\)}}\immediate\write\boxesfile{345}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,-5.5pt)..controls(7pt,-4.1193pt)and(8.1193pt,-3pt)..(9.5pt,-3pt)--(15.81pt,-3pt)..controls(17.1907pt,-3pt)and(18.31pt,-4.1193pt)..(18.31pt,-5.5pt)--(18.31pt,-10.93pt)..controls(18.31pt,-12.3107pt)and(17.1907pt,-13.43pt)..(15.81pt,-13.43pt)--(9.5pt,-13.43pt)..controls(8.1193pt,-13.43pt)and(7pt,-12.3107pt)..(7pt,-10.93pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,-8.215pt)--(18.31pt,-8.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,-8.215pt)--(7pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-6pt,10pt)--(0pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-6pt,0pt)--(0pt,0pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](0pt,0pt)--(0pt,0pt)--(0pt,-8.215pt)--(0pt,-8.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](-3pt,3pt)--(3pt,3pt)--(3pt,-11.215pt)--(-3pt,-11.215pt)--cycle;
\path[-,fill=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](1pt,-8.215pt)..controls(1pt,-7.6627pt)and(0.5523pt,-7.215pt)..(0pt,-7.215pt)..controls(-0.5523pt,-7.215pt)and(-1pt,-7.6627pt)..(-1pt,-8.215pt)..controls(-1pt,-8.7673pt)and(-0.5523pt,-9.215pt)..(0pt,-9.215pt)..controls(0.5523pt,-9.215pt)and(1pt,-8.7673pt)..(1pt,-8.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13pt,10pt)--(-7pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13pt,0pt)--(-7pt,0pt);
\path[-,draw=black,line width=1.2pt,line cap=butt,line join=miter,dash pattern=](-10pt,11pt)--(-10pt,-1pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-18.6316pt,12.3396pt)--(-16pt,12.3396pt)--(-16pt,7.6604pt)--(-18.6316pt,7.6604pt)--cycle;
\node[anchor=north west,inner sep=0] at (-18.6316pt,12.3396pt){\savebox{\marxupbox}{{\({\scriptstyle i}\)}}\immediate\write\boxesfile{346}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-20.6316pt,14.3396pt)--(-14pt,14.3396pt)--(-14pt,5.6604pt)--(-20.6316pt,5.6604pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-19.8617pt,3.0788pt)--(-16pt,3.0788pt)--(-16pt,-3.0788pt)--(-19.8617pt,-3.0788pt)--cycle;
\node[anchor=north west,inner sep=0] at (-19.8617pt,3.0788pt){\savebox{\marxupbox}{{\({\scriptstyle j}\)}}\immediate\write\boxesfile{347}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-21.8617pt,5.0788pt)--(-14pt,5.0788pt)--(-14pt,-5.0788pt)--(-21.8617pt,-5.0788pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](46.31pt,-1.6164pt)--(50.6498pt,-1.6164pt)--(50.6498pt,-6.5986pt)--(46.31pt,-6.5986pt)--cycle;
\node[anchor=north west,inner sep=0] at (46.31pt,-1.6164pt){\savebox{\marxupbox}{{\({\scriptstyle k}\)}}\immediate\write\boxesfile{348}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](44.31pt,0.3836pt)--(52.6498pt,0.3836pt)--(52.6498pt,-8.5986pt)--(44.31pt,-8.5986pt)--cycle;
\end{tikzpicture}}-{\begin{tikzpicture}[baseline=(current bounding box.center)]\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14pt,20.215pt)--(-13pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14pt,10.215pt)--(-13pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](37.31pt,12.715pt)--(44.31pt,12.715pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,20.215pt)--(-6pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,10.215pt)--(-6pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,20.215pt)--(3pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,10.215pt)--(3pt,10.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,5.215pt)--(3pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,20.215pt)--(31.31pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,5.215pt)--(31.31pt,5.215pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](31.31pt,21.215pt)..controls(35.31pt,21.215pt)and(37.31pt,14.715pt)..(37.31pt,12.715pt)..controls(37.31pt,10.715pt)and(35.31pt,4.215pt)..(31.31pt,4.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,20.215pt)--(28.31pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,14.215pt)--(24.31pt,14.215pt)--(24.31pt,-3pt)--(7pt,-3pt)--cycle;
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,5.215pt)--(10pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,10.215pt)--(7pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,5.215pt)--(24.31pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,10.215pt)--(7pt,10.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,5.215pt)--(7pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](24.31pt,5.215pt)--(28.31pt,5.215pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](13pt,7.43pt)--(18.31pt,7.43pt)--(18.31pt,3pt)--(13pt,3pt)--cycle;
\node[anchor=north west,inner sep=0] at (13pt,7.43pt){\savebox{\marxupbox}{{\(u\)}}\immediate\write\boxesfile{349}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,7.93pt)..controls(10pt,9.3107pt)and(11.1193pt,10.43pt)..(12.5pt,10.43pt)--(18.81pt,10.43pt)..controls(20.1907pt,10.43pt)and(21.31pt,9.3107pt)..(21.31pt,7.93pt)--(21.31pt,2.5pt)..controls(21.31pt,1.1193pt)and(20.1907pt,0pt)..(18.81pt,0pt)--(12.5pt,0pt)..controls(11.1193pt,0pt)and(10pt,1.1193pt)..(10pt,2.5pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,5.215pt)--(21.31pt,5.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,5.215pt)--(10pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-6pt,20.215pt)--(0pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-6pt,10.215pt)--(0pt,10.215pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](0pt,10.215pt)--(0pt,10.215pt)--(0pt,5.215pt)--(0pt,5.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](-3pt,13.215pt)--(3pt,13.215pt)--(3pt,2.215pt)--(-3pt,2.215pt)--cycle;
\path[-,fill=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](1pt,5.215pt)..controls(1pt,5.7673pt)and(0.5523pt,6.215pt)..(0pt,6.215pt)..controls(-0.5523pt,6.215pt)and(-1pt,5.7673pt)..(-1pt,5.215pt)..controls(-1pt,4.6627pt)and(-0.5523pt,4.215pt)..(0pt,4.215pt)..controls(0.5523pt,4.215pt)and(1pt,4.6627pt)..(1pt,5.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13pt,20.215pt)--(-7pt,20.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13pt,10.215pt)--(-7pt,10.215pt);
\path[-,draw=black,line width=1.2pt,line cap=butt,line join=miter,dash pattern=](-10pt,21.215pt)--(-10pt,9.215pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-18.6316pt,22.5546pt)--(-16pt,22.5546pt)--(-16pt,17.8754pt)--(-18.6316pt,17.8754pt)--cycle;
\node[anchor=north west,inner sep=0] at (-18.6316pt,22.5546pt){\savebox{\marxupbox}{{\({\scriptstyle i}\)}}\immediate\write\boxesfile{350}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-20.6316pt,24.5546pt)--(-14pt,24.5546pt)--(-14pt,15.8754pt)--(-20.6316pt,15.8754pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-19.8617pt,13.2938pt)--(-16pt,13.2938pt)--(-16pt,7.1362pt)--(-19.8617pt,7.1362pt)--cycle;
\node[anchor=north west,inner sep=0] at (-19.8617pt,13.2938pt){\savebox{\marxupbox}{{\({\scriptstyle j}\)}}\immediate\write\boxesfile{351}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-21.8617pt,15.2938pt)--(-14pt,15.2938pt)--(-14pt,5.1362pt)--(-21.8617pt,5.1362pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](46.31pt,15.2061pt)--(50.6498pt,15.2061pt)--(50.6498pt,10.2239pt)--(46.31pt,10.2239pt)--cycle;
\node[anchor=north west,inner sep=0] at (46.31pt,15.2061pt){\savebox{\marxupbox}{{\({\scriptstyle k}\)}}\immediate\write\boxesfile{352}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](44.31pt,17.2061pt)--(52.6498pt,17.2061pt)--(52.6498pt,8.2239pt)--(44.31pt,8.2239pt)--cycle;
\end{tikzpicture}}+{\begin{tikzpicture}[baseline=(current bounding box.center)]\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-8pt,17.6334pt)--(-7pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-8pt,10.215pt)--(-7pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](37.31pt,11.4242pt)--(44.31pt,11.4242pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-1pt,17.6334pt)--(0pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-1pt,10.215pt)--(0pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,17.6334pt)--(31.31pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,5.215pt)--(31.31pt,5.215pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](31.31pt,18.6334pt)..controls(35.31pt,18.6334pt)and(37.31pt,13.4242pt)..(37.31pt,11.4242pt)..controls(37.31pt,9.4242pt)and(35.31pt,4.215pt)..(31.31pt,4.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,17.6334pt)--(28.31pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,10.215pt)--(3pt,10.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,5.215pt)--(3pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,14.215pt)--(24.31pt,14.215pt)--(24.31pt,-3pt)--(7pt,-3pt)--cycle;
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,5.215pt)--(10pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,10.215pt)--(7pt,10.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,5.215pt)--(24.31pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,10.215pt)--(7pt,10.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](3pt,5.215pt)--(7pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](24.31pt,5.215pt)--(28.31pt,5.215pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](13pt,7.43pt)--(18.31pt,7.43pt)--(18.31pt,3pt)--(13pt,3pt)--cycle;
\node[anchor=north west,inner sep=0] at (13pt,7.43pt){\savebox{\marxupbox}{{\(u\)}}\immediate\write\boxesfile{353}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,7.93pt)..controls(10pt,9.3107pt)and(11.1193pt,10.43pt)..(12.5pt,10.43pt)--(18.81pt,10.43pt)..controls(20.1907pt,10.43pt)and(21.31pt,9.3107pt)..(21.31pt,7.93pt)--(21.31pt,2.5pt)..controls(21.31pt,1.1193pt)and(20.1907pt,0pt)..(18.81pt,0pt)--(12.5pt,0pt)..controls(11.1193pt,0pt)and(10pt,1.1193pt)..(10pt,2.5pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,5.215pt)--(21.31pt,5.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,5.215pt)--(10pt,5.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,10.215pt)--(0pt,10.215pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](0pt,10.215pt)--(0pt,10.215pt)--(0pt,5.215pt)--(0pt,5.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](-3pt,13.215pt)--(3pt,13.215pt)--(3pt,2.215pt)--(-3pt,2.215pt)--cycle;
\path[-,fill=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](1pt,5.215pt)..controls(1pt,5.7673pt)and(0.5523pt,6.215pt)..(0pt,6.215pt)..controls(-0.5523pt,6.215pt)and(-1pt,5.7673pt)..(-1pt,5.215pt)..controls(-1pt,4.6627pt)and(-0.5523pt,4.215pt)..(0pt,4.215pt)..controls(0.5523pt,4.215pt)and(1pt,4.6627pt)..(1pt,5.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,17.6334pt)--(-1pt,17.6334pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,10.215pt)--(-1pt,10.215pt);
\path[-,draw=black,line width=1.2pt,line cap=butt,line join=miter,dash pattern=](-4pt,18.6334pt)--(-4pt,9.215pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-12.6316pt,19.973pt)--(-10pt,19.973pt)--(-10pt,15.2938pt)--(-12.6316pt,15.2938pt)--cycle;
\node[anchor=north west,inner sep=0] at (-12.6316pt,19.973pt){\savebox{\marxupbox}{{\({\scriptstyle i}\)}}\immediate\write\boxesfile{354}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14.6316pt,21.973pt)--(-8pt,21.973pt)--(-8pt,13.2938pt)--(-14.6316pt,13.2938pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13.8617pt,13.2938pt)--(-10pt,13.2938pt)--(-10pt,7.1362pt)--(-13.8617pt,7.1362pt)--cycle;
\node[anchor=north west,inner sep=0] at (-13.8617pt,13.2938pt){\savebox{\marxupbox}{{\({\scriptstyle j}\)}}\immediate\write\boxesfile{355}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-15.8617pt,15.2938pt)--(-8pt,15.2938pt)--(-8pt,5.1362pt)--(-15.8617pt,5.1362pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](46.31pt,13.9153pt)--(50.6498pt,13.9153pt)--(50.6498pt,8.9331pt)--(46.31pt,8.9331pt)--cycle;
\node[anchor=north west,inner sep=0] at (46.31pt,13.9153pt){\savebox{\marxupbox}{{\({\scriptstyle k}\)}}\immediate\write\boxesfile{356}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](44.31pt,15.9153pt)--(52.6498pt,15.9153pt)--(52.6498pt,6.9331pt)--(44.31pt,6.9331pt)--cycle;
\end{tikzpicture}}+{\begin{tikzpicture}[baseline=(current bounding box.center)]\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-8pt,7.4184pt)--(-7pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-8pt,0pt)--(-7pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](44.31pt,1.6555pt)--(51.31pt,1.6555pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-1pt,7.4184pt)--(0pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-1pt,0pt)--(0pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](31.31pt,7.4184pt)--(38.31pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](31.31pt,-4.1075pt)--(38.31pt,-4.1075pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](38.31pt,8.4184pt)..controls(42.31pt,8.4184pt)and(44.31pt,3.6555pt)..(44.31pt,1.6555pt)..controls(44.31pt,-0.3445pt)and(42.31pt,-5.1075pt)..(38.31pt,-5.1075pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,7.4184pt)--(31.31pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,0pt)--(7pt,0pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,-8.215pt)--(7pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,0pt)--(25.31pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,-8.215pt)--(25.31pt,-8.215pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,1pt)..controls(29.31pt,1pt)and(31.31pt,-2.1075pt)..(31.31pt,-4.1075pt)..controls(31.31pt,-6.1075pt)and(29.31pt,-9.215pt)..(25.31pt,-9.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,0pt)--(18.31pt,0pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,-6pt)--(15.31pt,-6pt)--(15.31pt,-10.43pt)--(10pt,-10.43pt)--cycle;
\node[anchor=north west,inner sep=0] at (10pt,-6pt){\savebox{\marxupbox}{{\(u\)}}\immediate\write\boxesfile{357}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,-5.5pt)..controls(7pt,-4.1193pt)and(8.1193pt,-3pt)..(9.5pt,-3pt)--(15.81pt,-3pt)..controls(17.1907pt,-3pt)and(18.31pt,-4.1193pt)..(18.31pt,-5.5pt)--(18.31pt,-10.93pt)..controls(18.31pt,-12.3107pt)and(17.1907pt,-13.43pt)..(15.81pt,-13.43pt)--(9.5pt,-13.43pt)..controls(8.1193pt,-13.43pt)and(7pt,-12.3107pt)..(7pt,-10.93pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,-8.215pt)--(18.31pt,-8.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,-8.215pt)--(7pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,0pt)--(0pt,0pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](0pt,0pt)--(0pt,0pt)--(0pt,-8.215pt)--(0pt,-8.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](-3pt,3pt)--(3pt,3pt)--(3pt,-11.215pt)--(-3pt,-11.215pt)--cycle;
\path[-,fill=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](1pt,-8.215pt)..controls(1pt,-7.6627pt)and(0.5523pt,-7.215pt)..(0pt,-7.215pt)..controls(-0.5523pt,-7.215pt)and(-1pt,-7.6627pt)..(-1pt,-8.215pt)..controls(-1pt,-8.7673pt)and(-0.5523pt,-9.215pt)..(0pt,-9.215pt)..controls(0.5523pt,-9.215pt)and(1pt,-8.7673pt)..(1pt,-8.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,7.4184pt)--(-1pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,0pt)--(-1pt,0pt);
\path[-,draw=black,line width=1.2pt,line cap=butt,line join=miter,dash pattern=](-4pt,8.4184pt)--(-4pt,-1pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-12.6316pt,9.758pt)--(-10pt,9.758pt)--(-10pt,5.0788pt)--(-12.6316pt,5.0788pt)--cycle;
\node[anchor=north west,inner sep=0] at (-12.6316pt,9.758pt){\savebox{\marxupbox}{{\({\scriptstyle i}\)}}\immediate\write\boxesfile{358}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14.6316pt,11.758pt)--(-8pt,11.758pt)--(-8pt,3.0788pt)--(-14.6316pt,3.0788pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13.8617pt,3.0788pt)--(-10pt,3.0788pt)--(-10pt,-3.0788pt)--(-13.8617pt,-3.0788pt)--cycle;
\node[anchor=north west,inner sep=0] at (-13.8617pt,3.0788pt){\savebox{\marxupbox}{{\({\scriptstyle j}\)}}\immediate\write\boxesfile{359}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-15.8617pt,5.0788pt)--(-8pt,5.0788pt)--(-8pt,-5.0788pt)--(-15.8617pt,-5.0788pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](53.31pt,4.1466pt)--(57.6498pt,4.1466pt)--(57.6498pt,-0.8357pt)--(53.31pt,-0.8357pt)--cycle;
\node[anchor=north west,inner sep=0] at (53.31pt,4.1466pt){\savebox{\marxupbox}{{\({\scriptstyle k}\)}}\immediate\write\boxesfile{360}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](51.31pt,6.1466pt)--(59.6498pt,6.1466pt)--(59.6498pt,-2.8357pt)--(51.31pt,-2.8357pt)--cycle;
\end{tikzpicture}}\)

and note that the middle two terms cancel to yield:

\({\begin{tikzpicture}[baseline=(current bounding box.center)]\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14pt,10pt)--(-13pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14pt,0pt)--(-13pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](41.31pt,-4.1075pt)--(44.31pt,-4.1075pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,10pt)--(-6pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,0pt)--(-6pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,10pt)--(7pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,0pt)--(7pt,0pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,-8.215pt)--(7pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,10pt)--(21.31pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,0pt)--(21.31pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,-8.215pt)--(21.31pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,14pt)--(37.31pt,14pt)--(37.31pt,-12.215pt)--(25.31pt,-12.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,0pt)--(28.31pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,-8.215pt)--(28.31pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,10pt)--(25.31pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](34.31pt,-4.1075pt)--(37.31pt,-4.1075pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,10pt)--(25.31pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,0pt)--(25.31pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](21.31pt,-8.215pt)--(25.31pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](37.31pt,-4.1075pt)--(41.31pt,-4.1075pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](28.31pt,1pt)..controls(32.31pt,1pt)and(34.31pt,-2.1075pt)..(34.31pt,-4.1075pt)..controls(34.31pt,-6.1075pt)and(32.31pt,-9.215pt)..(28.31pt,-9.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,10pt)--(18.31pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,0pt)--(18.31pt,0pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,-6pt)--(15.31pt,-6pt)--(15.31pt,-10.43pt)--(10pt,-10.43pt)--cycle;
\node[anchor=north west,inner sep=0] at (10pt,-6pt){\savebox{\marxupbox}{{\(u\)}}\immediate\write\boxesfile{361}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,-5.5pt)..controls(7pt,-4.1193pt)and(8.1193pt,-3pt)..(9.5pt,-3pt)--(15.81pt,-3pt)..controls(17.1907pt,-3pt)and(18.31pt,-4.1193pt)..(18.31pt,-5.5pt)--(18.31pt,-10.93pt)..controls(18.31pt,-12.3107pt)and(17.1907pt,-13.43pt)..(15.81pt,-13.43pt)--(9.5pt,-13.43pt)..controls(8.1193pt,-13.43pt)and(7pt,-12.3107pt)..(7pt,-10.93pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,-8.215pt)--(18.31pt,-8.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,-8.215pt)--(7pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-6pt,10pt)--(0pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-6pt,0pt)--(0pt,0pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](0pt,0pt)--(0pt,0pt)--(0pt,-8.215pt)--(0pt,-8.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](-3pt,3pt)--(3pt,3pt)--(3pt,-11.215pt)--(-3pt,-11.215pt)--cycle;
\path[-,fill=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](1pt,-8.215pt)..controls(1pt,-7.6627pt)and(0.5523pt,-7.215pt)..(0pt,-7.215pt)..controls(-0.5523pt,-7.215pt)and(-1pt,-7.6627pt)..(-1pt,-8.215pt)..controls(-1pt,-8.7673pt)and(-0.5523pt,-9.215pt)..(0pt,-9.215pt)..controls(0.5523pt,-9.215pt)and(1pt,-8.7673pt)..(1pt,-8.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13pt,10pt)--(-7pt,10pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13pt,0pt)--(-7pt,0pt);
\path[-,draw=black,line width=1.2pt,line cap=butt,line join=miter,dash pattern=](-10pt,11pt)--(-10pt,-1pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-18.6316pt,12.3396pt)--(-16pt,12.3396pt)--(-16pt,7.6604pt)--(-18.6316pt,7.6604pt)--cycle;
\node[anchor=north west,inner sep=0] at (-18.6316pt,12.3396pt){\savebox{\marxupbox}{{\({\scriptstyle i}\)}}\immediate\write\boxesfile{362}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-20.6316pt,14.3396pt)--(-14pt,14.3396pt)--(-14pt,5.6604pt)--(-20.6316pt,5.6604pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-19.8617pt,3.0788pt)--(-16pt,3.0788pt)--(-16pt,-3.0788pt)--(-19.8617pt,-3.0788pt)--cycle;
\node[anchor=north west,inner sep=0] at (-19.8617pt,3.0788pt){\savebox{\marxupbox}{{\({\scriptstyle j}\)}}\immediate\write\boxesfile{363}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-21.8617pt,5.0788pt)--(-14pt,5.0788pt)--(-14pt,-5.0788pt)--(-21.8617pt,-5.0788pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](46.31pt,-1.6164pt)--(50.6498pt,-1.6164pt)--(50.6498pt,-6.5986pt)--(46.31pt,-6.5986pt)--cycle;
\node[anchor=north west,inner sep=0] at (46.31pt,-1.6164pt){\savebox{\marxupbox}{{\({\scriptstyle k}\)}}\immediate\write\boxesfile{364}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](44.31pt,0.3836pt)--(52.6498pt,0.3836pt)--(52.6498pt,-8.5986pt)--(44.31pt,-8.5986pt)--cycle;
\end{tikzpicture}}+{\begin{tikzpicture}[baseline=(current bounding box.center)]\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-8pt,7.4184pt)--(-7pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-8pt,0pt)--(-7pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](44.31pt,1.6555pt)--(51.31pt,1.6555pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-1pt,7.4184pt)--(0pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-1pt,0pt)--(0pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](31.31pt,7.4184pt)--(38.31pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](31.31pt,-4.1075pt)--(38.31pt,-4.1075pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](38.31pt,8.4184pt)..controls(42.31pt,8.4184pt)and(44.31pt,3.6555pt)..(44.31pt,1.6555pt)..controls(44.31pt,-0.3445pt)and(42.31pt,-5.1075pt)..(38.31pt,-5.1075pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,7.4184pt)--(31.31pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,0pt)--(7pt,0pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,-8.215pt)--(7pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,0pt)--(25.31pt,0pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,-8.215pt)--(25.31pt,-8.215pt);
\path[-,draw=black,fill= gray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](25.31pt,1pt)..controls(29.31pt,1pt)and(31.31pt,-2.1075pt)..(31.31pt,-4.1075pt)..controls(31.31pt,-6.1075pt)and(29.31pt,-9.215pt)..(25.31pt,-9.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,0pt)--(18.31pt,0pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](10pt,-6pt)--(15.31pt,-6pt)--(15.31pt,-10.43pt)--(10pt,-10.43pt)--cycle;
\node[anchor=north west,inner sep=0] at (10pt,-6pt){\savebox{\marxupbox}{{\(u\)}}\immediate\write\boxesfile{365}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,-5.5pt)..controls(7pt,-4.1193pt)and(8.1193pt,-3pt)..(9.5pt,-3pt)--(15.81pt,-3pt)..controls(17.1907pt,-3pt)and(18.31pt,-4.1193pt)..(18.31pt,-5.5pt)--(18.31pt,-10.93pt)..controls(18.31pt,-12.3107pt)and(17.1907pt,-13.43pt)..(15.81pt,-13.43pt)--(9.5pt,-13.43pt)..controls(8.1193pt,-13.43pt)and(7pt,-12.3107pt)..(7pt,-10.93pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](18.31pt,-8.215pt)--(18.31pt,-8.215pt);
\path[-,draw=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](7pt,-8.215pt)--(7pt,-8.215pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](0pt,0pt)--(0pt,0pt);
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](0pt,0pt)--(0pt,0pt)--(0pt,-8.215pt)--(0pt,-8.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=on 0.4pt off 1pt](-3pt,3pt)--(3pt,3pt)--(3pt,-11.215pt)--(-3pt,-11.215pt)--cycle;
\path[-,fill=lightgray,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](1pt,-8.215pt)..controls(1pt,-7.6627pt)and(0.5523pt,-7.215pt)..(0pt,-7.215pt)..controls(-0.5523pt,-7.215pt)and(-1pt,-7.6627pt)..(-1pt,-8.215pt)..controls(-1pt,-8.7673pt)and(-0.5523pt,-9.215pt)..(0pt,-9.215pt)..controls(0.5523pt,-9.215pt)and(1pt,-8.7673pt)..(1pt,-8.215pt)--cycle;
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,7.4184pt)--(-1pt,7.4184pt);
\path[-,draw=black,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-7pt,0pt)--(-1pt,0pt);
\path[-,draw=black,line width=1.2pt,line cap=butt,line join=miter,dash pattern=](-4pt,8.4184pt)--(-4pt,-1pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-12.6316pt,9.758pt)--(-10pt,9.758pt)--(-10pt,5.0788pt)--(-12.6316pt,5.0788pt)--cycle;
\node[anchor=north west,inner sep=0] at (-12.6316pt,9.758pt){\savebox{\marxupbox}{{\({\scriptstyle i}\)}}\immediate\write\boxesfile{366}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-14.6316pt,11.758pt)--(-8pt,11.758pt)--(-8pt,3.0788pt)--(-14.6316pt,3.0788pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-13.8617pt,3.0788pt)--(-10pt,3.0788pt)--(-10pt,-3.0788pt)--(-13.8617pt,-3.0788pt)--cycle;
\node[anchor=north west,inner sep=0] at (-13.8617pt,3.0788pt){\savebox{\marxupbox}{{\({\scriptstyle j}\)}}\immediate\write\boxesfile{367}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](-15.8617pt,5.0788pt)--(-8pt,5.0788pt)--(-8pt,-5.0788pt)--(-15.8617pt,-5.0788pt)--cycle;
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](53.31pt,4.1466pt)--(57.6498pt,4.1466pt)--(57.6498pt,-0.8357pt)--(53.31pt,-0.8357pt)--cycle;
\node[anchor=north west,inner sep=0] at (53.31pt,4.1466pt){\savebox{\marxupbox}{{\({\scriptstyle k}\)}}\immediate\write\boxesfile{368}\immediate\write\boxesfile{\number\wd\marxupbox}\immediate\write\boxesfile{\number\ht\marxupbox}\immediate\write\boxesfile{\number\dp\marxupbox}\box\marxupbox};
\path[-,line width=0.4pt,line cap=butt,line join=miter,dash pattern=](51.31pt,6.1466pt)--(59.6498pt,6.1466pt)--(59.6498pt,-2.8357pt)--(51.31pt,-2.8357pt)--cycle;
\end{tikzpicture}}\)

To get to the intended result, it remains to use the structural laws of smcs.

§.§ Code for <ref>
A contraction of the Riemann curvature
occurs twice in <ref>, and as such deserves to be extracted as an
intermediate definition. It is called the Ricci tensor.

*   From there, the left-hand-side of <ref> is
defined as follows:
*  We can then convert it to a

§.§ Point-mass example

To complete our test case for Albert,
in this section we define the metric which describes the
gravitational effects of a point-sized mass: the Schwarzschild metric.
We will then show that evaluating the left-hand-side of <ref> with
this metric yields the appropriate right-hand-side.

The first step is to define the coordinate system.
Roughly speaking, Schwarzschild coordinates are spherical coordinates with an extra component for time.

*  The point mass will
be located at the origin (ρ=0) at every point in time. In other words,
the mass is at rest in this coordinate system.
Hence, because we have a point-mass, the \(T{_i}{_j}\) tensor is zero everywhere except at the origin, where it is infinite.

As for all coordinate representations, the compact-closed category
structure for \(\mathsf{Matrix}\mskip 3.0mu\mathsf{Spherical}\) falls out directly from
<ref>. Likewise for the partial derivative. The only missing piece of the structure
is the metric.
The Schwarzschild metric is defined in terms of the considered mass
\(M\) or alternatively by the Schwarzschild radius \(r_s\),
the two being connected by the equation \(r_s = 2GM/c^2\). We
use the parameter \(r_s\) in the rest of the section.
The metric is then given by tabulating the following function as a matrix.

*  We refer the reader to a course in general relativity for the physical meaning of it.
We can then define the \(\mathsf{Matrix}\mskip 3.0mu\mathsf{Spherical}\) instance as follows:

At this point, we can directly evaluate \(\mathsf{grLhsM}\) with \(z\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathsf{Matrix}\mskip 3.0mu\mathsf{Spherical}\), and
obtain a 4 by 4 matrix of symbolic expressions depending on \(\mathsf{Spherical}\) coordinate variables.
We find that it simplifies to zero everywhere it is defined.[The metric has two singularities, one at the origin and one at \(ρ=r_s\), the event horizon. It satisfies <ref> everywhere else.] Thus we can verify that the Schwarzschild metric satisfies the general relativity equation.

§ IMPLEMENTATION OF ALBERT

In this section we explain the implementation of the combinators of
Albert (<ref> and <ref>).
As outlined in <ref> and in first approximation, it
is provided by the library for symmetric
monoidal categories of <cit.>.  The key idea
is that every linear function \(∀\mskip 3.0mu\mathsf{r}\mskip 1.0mu.\mskip 3.0mu\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\) can be converted (naturally) to a morphism of type \(\mathsf{a}\mskip 1.0mu\overset{z}{\leadsto }\mskip 1.0mu\mathsf{b}\),
and back:

In fact, any smc \(z\) is isomorphic to the category of Haskell
linear functions between corresponding ports (whose hom-set family is
\(\mathsf{Hom}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{a}\mskip 0.0mu\mathnormal{,}\mskip 3.0mu\mathsf{b}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{=}\mskip 3.0mu\mathnormal{∀}\mskip 3.0mu\mathsf{r}\mskip 1.0mu.\mskip 3.0mu\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\)). This works even if
\(z\) has additional structure, and in particular if it is a
tensor category.

So, if we were to choose \(\mathsf{R}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\) to be \(\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathbf{1}\), the
\(\mathsf{encode}\) and \(\mathsf{decode}\) functions would take care of most of
the respective tasks of \(\mathsf{tensorEmbed}\) and \(\mathsf{tensorEval}\). It
would remain to dualise the codomain and apply unitors appropriately,
as shown in <ref>.

With this simple setup, we can implement the embedding of tensors
(including δ), as well as multiplication. Unfortunately, there are several complications.

§.§ Complication: supporting derivatives

The main issue with the above implementation sketch arises when trying
to implement the covariant derivative of a tensor expression \(\mathsf{t}\) as a sum of its partial derivative and affinity terms.  Indeed, the
affinity terms of a tensor expression \(\mathsf{t}\) depends on the number
(and type) of free index variables in it. But this information is not
made available by the library of <cit.> which we base our work upon. Simply put, the type \(\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathbf{1}\) is opaque. To explain the solution that we employ, we need to first
peek inside the implementation of this library.

Its principle is that a port (in our application, an index) is represented as a
morphism in the (free) Cartesian extension of the underlying category
\(z\):
*  The \(\mathsf{encode}\) function simply embeds the morphism in the Cartesian extension. The
\(\mathsf{decode}\) function takes a linear function \(\mathsf{f}\mskip 3.0mu\mathnormal{:}\mskip 3.0mu\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{b}\) and applies it to the identity morphism (\(\mathsf{id}\mskip 3.0mu\mathnormal{:}\mskip 3.0mu\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{a}\)),
obtaining \(\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{:}\mskip 3.0mu\mathsf{CartesianExt}\mskip 3.0muz\mskip 3.0mu\mathsf{a}\mskip 3.0mu\mathsf{b}\).  The non-obvious
property proven by <cit.> is that, because
\(\mathsf{f}\) is linear, \(\mathsf{f}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{P}\mskip 3.0mu\mathsf{id}\mskip 0.0mu\mathnormal{)}\allowbreak{}\) is always equivalent to a morphism
in the underlying category \(z\); it never needs to refer to projections or duplications.
The function which recovers this morphism has the following signature, but remember that it will crash if the input morphism makes essential use of the Cartesian structure:

*  To be able to support tensor derivatives, cannot rely on \(\mathsf{decode}\), and we will have to access the internal function \(\mathsf{cartesianToMonoidal}\) directly.

With this in mind, we can solve our problem, namely finding an implementation for \(\mathsf{R}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\) which lets us track free variables.  We do this by embedding
a pair of morphisms \(\mathsf{t}\mskip 3.0mu\mathnormal{:}\mskip 3.0mu\mathsf{x}\mskip 1.0mu\overset{z}{\leadsto }\mskip 1.0mu\mathbf{1}\) and
\(\mathsf{p}\mskip 3.0mu\mathnormal{:}\mskip 3.0mu\mathsf{CartesianExt}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{x}\) (instead of just \(\mathsf{p}\)).

*  Here, \(\mathsf{x}\) is the context used by the tensor
\(\mathsf{t}\), without any spurious component. The tensor \(\mathsf{t}\) carries the payload of the expression. Because
it inhabits the non-Cartesian category \(z\), we know that it uses the whole context
\(\mathsf{x}\). Even though the type declares that the morphism \(\mathsf{p}\) is built from the Cartesian extension
of \(z\), the implementation will arrange that it will only
use the sub-category of \(z\) whose derivative is zero. This is enforced by
hiding the \(\mathsf{encode}\) function on \(\mathsf{P}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 3.0mu\mathsf{a}\) from the user: we only
provide the \(\mathsf{raise}\) and \(\mathsf{lower}\) functions to
manipulate this type, and they are safe because \(∇g=0\):

With this setup the derivative can be computed correctly on a
pair \(\mathsf{Compose}\mskip 3.0mu\mathsf{t}\mskip 3.0mu\mathsf{p}\).
Indeed, the morphism-level derivative
() need only
be applied to the \(\mathsf{t}\) component of the pair. As for the \(\mathsf{p}\) component of the pair, the use of the
Cartesian fork operator \(\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathnormal{▵}\mskip 0.0mu\mathnormal{)}\allowbreak{}\) ensures that the new index is
passed to the right component of \(∇\mskip 3.0mu\mathsf{t}\).

The transcoding functions between Albert and its categorical
semantics then become:
Multiplication remains straightforward to implement:

§.§ Complication: supporting addition of tensors

The type of the addition operator (\(\mathsf{plus}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Bool}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{R}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{R}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\)) poses a problem for the above implementation. The issue is
that the semantics of \(\mathsf{plus}\mskip 3.0mu\mathsf{f}\) depends on both \(\mathsf{f}\mskip 3.0mu\mathsf{True}\) and
\(\mathsf{f}\mskip 3.0mu\mathsf{False}\). However, \(\mathsf{plus}\) is linear in \(\mathsf{f}\), and thus
we can call \(\mathsf{f}\) only once in the implementation of
\(\mathsf{plus}\). The way to work around this problem is to embed a
non-linear implementation inside a linear datatype. That is, it suffices
to add a constructor \(\mathsf{Plus}\mskip 3.0mu\mathnormal{::}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0mu\mathsf{Bool}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathsf{R}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\mskip 0.0mu\mathnormal{)}\allowbreak{}\mskip 3.0mu\mathnormal{⊸}\mskip 3.0mu\mathsf{R}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\) to the \(\mathsf{R}\) datatype.  Operationally, if \(\mathsf{f}\) is the argument
to \(\mathsf{plus}\), it is stored once in the \(\mathsf{R}\) data
structure, and it is only at the moment of evaluating \(\mathsf{plus}\mskip 3.0mu\mathsf{f}\) to a
morphism that we invoke \(\mathsf{f}\). But, at the evaluation point, there is
no linearity restriction on the tensor expression of type \(\mathsf{R}\mskip 3.0muz\mskip 3.0mu\mathsf{r}\): it can be
used an arbitrary number of times, and, according to the typing rules
of Linear Haskell, it means that its payload (\(\mathsf{f}\)) has itself no
usage restrictions.  The fact that the evaluation function has no linearity restriction
on its tensor expression argument (\(\mathsf{t}\)) means that \(\mathsf{t}\) cannot have any free index variables in
it.  At first sight, this is a drawback.  However there is a good reason for restricting evaluation to
closed tensor expressions: it ensures that index variables do not escape
the scope of the tensor expression where they belong.

The rest of the implementation of Albert needs to be modified to
support this new constructor, by defining a case for sums. Fortunately
such a case is never difficult to handle: we simply distribute every
operation over the operands of the sum.

§.§ Complication: contraction

Unfortunately, our definition for \(\mathsf{R}\) so far does not in fact
support contraction.  This is because all indices are inputs of the
expression, and to connect inputs together we need to use the \(η\) combinator. To do so, we need an additional \(\mathbf{1}\) input— but
no such input is explicitly available in the \(\mathsf{R}\) type. The
workaround for the problem is to add such a unit input
explicitly. Hence the final implementation of the \(\mathsf{R}\) type is:

*  The implementation of \(\mathsf{contract}\) is then:
*  The other combinators can simply ignore or thread this unit input. The final implementation is shown in <ref>.

– – Part of the implementation borrowed from <cit.> – –

– – Part of the implementation specific to the present work – –
*  Final implementation

§ RELATED WORK

§.§ Tensor presentations in introductory texts

We expect many of our readers not to be already familiar with tensors,
and therefore they will need to read pedagogical introductions to the topic,
as the authors did when preparing this paper.
We believe that a warning is in order, because,
typically, introductory texts lean heavily
on the representations of tensors as (generalised) arrays of
coefficients. Consequently, undue importance is enthused to what
happens under change of coordinates in the manifold— even though
from an algebraic perspective, coordinate systems do not even enter
the picture. All the introductory texts that we could find take this
approach <cit.>.
The quotes below are by
no means intended as particularly singling out particular authors:  this approach is pervasive.
These are the kinds of definition that we find:

[Tensors] are geometrical objects over vector
spaces, whose coordinates obey certain laws of transformation under
change of basis.50 2em<cit.>=0pt =0
A tensor of rank \(n\) is an array of \(3^n\) values (in 3-D space) called “tensor
components” that combine with multiple directional indicators (basis vectors)
to form a quantity that does not vary as the coordinate system is changed.50 2em<cit.>=0pt =0
An nth-rank tensor in m-dimensional space is a mathematical
object that has n indices and \(m^n\) components and obeys certain
transformation rules.50 2em<cit.>=0pt =0   At the end of the document one finds out that the transformation rules
are the multiplication by Jacobians.
Other sources take a more pedagogical approach and start with vectors and covectors:
\(y^α\) : contravariant vector50 2em<cit.>=0pt =0   Here \(y\) is considered to be some array of numbers, enthused with
a property (covariance), which refers to the fact that the inverse of
the Jacobian should multiply the coefficients when changing coordinate
systems. (Furthermore \(α\) is implicitly lambda bound here— a
kind of liberty that most textbooks take in all areas of mathematics)

For the student already familiar with linear algebra, this can be
particularly confusing, because every vector or matrix
transforms this way. So why bother highlighting this property? This
presentation continues with

The object \(g_{μν}\) is a kind of tensor that is neither a
matrix nor a vector or covector.50 2em<cit.>=0pt =0
In algebraic terms, it is not hard to state that the metric is a
linear function of two arguments, but the representational approaches
incites the authors to beat around the bush.  Besides, the
representational approaches defines the metric as the Gram matrix of
the base vectors, and it being a tensor requires some proof.

In the algebraic definition this kind of pitfall is avoided.  Because
of the awkward definition of tensors in the representational view,
there is much discussion about what is and what isn't a tensor. One
can find statements like the following:

\(v^μ + w_μ\) is not a tensor.50 2em<cit.>=0pt =0  Algebraically, this
is attempting to add objects of different type together, which is
nonsensical. In Albert, the above expression is not well-typed
either. (And yet, to confuse matters even more, this expression can be made sense of with the pervasive index juggling conventions.)

But there is a more subtle way in which something might be “not a tensor”:

The Christoffel symbol is not a tensor because it
contains all the information about the curvature of the coordinate
system and can therefore be transformed entirely to zero if the
coordinates are straightened. Nevertheless we treat it as any ordinary
tensor in terms of the index notation.50 2em<cit.>=0pt =0
We believe that this kind of statement is puzzling to the
novice. Indeed, the first sentence states that since \(Γ\) (the Christoffel symbol) is zero
in some bases, then it cannot be a tensor (implicit to the above is
that no Jacobian can transform a zero tensor to a nonzero tensor). The
student might still wonder if this statement applies for a manifold
that cannot be straightened (i.e. one that is not flat), and why it can
be handled like a tensor anyway.

In the algebraic view that we employ, \(Γ\) is a morphism like any
other. So is it a tensor after all?  In fact, the value of \(Γ\) for any given basis is a tensor. But \(Γ\) is defined as an
expression which explicitly references the basis, and changes with it.
The confusing aspect is that the coefficient representation of
any tensor changes when the basis changes. But \(Γ\) changes
as a geometric object as the coordinate system changes, which means that
it cannot be converted to another basis by the usual jacobian-based transformation
while retaining the properties of the Christoffel symbol.

What we find puzzling that the choice of the representational approach
appears to be a conscious one:

[We] have used the coordinate approach to tensors, as opposed to the formal
geometrical approach. Although this approach is a bit old fashioned, I still
find it the easier to comprehend on first learning, especially if the learner is
not a student of mathematics or physics.50 2em<cit.>=0pt =0
It is not to say that the algebraic approach is absent from the
literature. While it appears to be chiefly geared towards specialists,
it also can be found in textbooks, but we could not find one that
explicitly makes the link between all notations.  For instance, <cit.> take
an algebraic approach, and as such only manipulate the category-oriented (point-free) notations.
Using only this notation is sufficient for them since
they do not manipulate any complicated tensor expressions, but it also
means that readers will have a hard time connecting other notations to the point-free language.
<cit.> does better by describing the tensor algebras, and discussing various representations.
However the equivalence between the various languages is not mentioned.

As mentioned earlier <cit.> do
mention this equivalence informally, but do not develop it
(the concept of category is never mentioned) and no further reading is

§.§ Einstein notation

The Einstein notation appears to arise as a generalisation of the
notation to denote elements of matrices. This indexing notation is so
well established that we could not trace where it originates.
However, not every expression which involves accessing indices can be
mapped to a tensor. In a nutshell, indices must be treated abstractly
and used linearly. Thus, under these conditions, which are exactly
those of Albert, there is an equivalence
between Einstein notation and the algebraic specification of tensors as

Despite our best efforts, some distance remains between
Albert and standard Einstein notation. First the Einstein notation leaves
the binders of indices implicit, but because Albert is
embedded in a functional language, every index variable must be lambda
bound. In particular, contraction is written as \(\mathsf{contract}\mskip 3.0mu\allowbreak{}\mathnormal{(}\mskip 0.0muλ\mskip 3.0mu\mathsf{ᵏ}\mskip 3.0mu\mathsf{ₖ}\mskip 3.0mu\mathnormal{\rightarrow }\mskip 3.0mu\mathnormal{…}\mskip 0.0mu\mathnormal{)}\allowbreak{}\).  One could imagine a pre-processing step to shorten the
notation and more closely approach the Einstein notation, but we find that sticking to
the lambda calculus convention avoids a source of confusion.

it should be noted that the use of standalone subscript and
superscript variables is a small liberty that we took in
typesetting the paper: while the Haskell compiler accepts super and subscript characters in
variable names, it disallows them as the first character.  Third, the
operands of an addition are \(\mathbf{case}\) branches. We believe that an
alternative syntax should be provided by ghc, because it
is generally useful in presence of linear types.  Fourth, a pattern
syntax for \(\mathsf{merge}\) and \(\mathsf{split}\) would shorten index
manipulation. Pattern synonyms are already available in
ghc, but are not currently compatible with linear
types. This is a technical shortcoming that could be addressed in Haskell implementations.

While this paper covers all the principles of the tensor notations,
we have not aimed for an exhaustive coverage. In particular, we did not discuss the
Levi-Civita tensor, which has many uses and is related to antisymmetrisation.

§.§ dsls for array programming and scientific programming

There is overlap between the present work and languages oriented to
scientific programming: they can both be used to describe
array-oriented computations.  Array-oriented programming languages
have a long history, perhaps starting with
apl <cit.>. Notable standalone
languages include Single-Assignment C <cit.> or
sisal <cit.> and even Matlab <cit.>. When it comes to
array edsls, there is an abundance of libraries available.
Limiting ourselves to the Haskell ecosystem notable examples include
RePa <cit.>, or accelerate

An important difference between this work and most array-oriented
languages is that they focus on representations first, and semantics come
only as a means to support optimisations.  In contrast, our approach
puts categorical semantics at the core.  This means that
constructing a dataflow representation (typically as a free smc) is
natural. This representation can then be optionally optimised and
interpreted as operations on matrices and arrays, perhaps relying
on the aforementioned libraries or a dedicated
compiler <cit.> as backend.

The implementation model that we suggest is to construct a dataflow
graph (typically as a free categorical representation), optimise it,
and then interpret it as operations on matrices. This kind of model
was already at the heart of sisal, but has been
popularised recently in machine-learning applications by the
TensorFlow library <cit.>. We note however that
TensorFlow (and similar machine learning packages) do not offer an
index-based notation.[There is a function called
\(\text{einsum}\) in both PyTorch and Tensorflow but it is not typed, and
not a general syntax for the Einstein notation. I only applies to one
term using contraction or shape transformation.] Instead the
programmer must keep track of dimensions using indices. The situation
is similar to de Bruijn index representations for lambda terms.

Our work ostensibly rejects non-tensor (non-linear) primitives,
and as such would preclude many useful array operations. These would need
to be added as an additional layer.

Another salient feature of the present work is its specific ability to
support calculus. Most scientific programming languages provide
arrays, but let the user figure out how to model tensor calculus
operations.  An exception is Diderot <cit.>, which
is specifically oriented towards tensor calculus.

§.§ Categorical Semantics

It is generally more convenient to provide instances of categorical
structures rather than handling lambda terms directly. In this paper we have used matrix
and diagram instances, but many other applications exist
<cit.>.  A major selling point of categorical
semantics is that they avoid the need of
manipulating variables explicitly (perhaps as de Bruijn indices).  This
advantage is already identifiable in
the work of <cit.>, but
<cit.> has shown how to leverage them in
edsls.  He does so by providing a compiler plugin that translates
lambda terms of the edsl to morphisms in a closed Cartesian
category. This last characteristic means that no support for linear
types or specific support of smcs is available.

These shortcomings have been addressed by
<cit.>, who show how to evaluate linear
functions to morphisms in an smc, with no compiler modification. While
they lay down the foundation for the present work, their library is
unfortunately not sufficient for our purposes.  The technical
additions provided by this paper include the ability to represent tensor
derivatives (<ref>), tensor addition (<ref>), and contraction (<ref>).

Categorical semantics are particularly well suited to perform automatic
differentiation (AD), as <cit.> has shown. We
have shown that derivatives can be represented, and we expect their symbolic
computation can be done with standard techniques. We have not shown
how AD can be performed, but because we use categorical semantics, Elliott-style AD
is the natural approach to implement our interface for derivatives. In fact, it is the method
that we have used to implement the Schwarzschild metric example (<ref>).

§.§ Penrose diagram notation

The diagram notation that we have used is a (graphical) dsl in its own right. It
is particularly suited for morphisms in smcs (and their extensions;
such as compact closed categories). <cit.> provides a survey for various kinds of categories.
The correspondence between definitional
and topological equivalence is their main advantage: it means that
topological intuitions can be leveraged for formal proofs
<cit.>. <cit.> even built a tool on this premise.

To our knowledge, the diagram notation was in fact first developed for
tensor calculus by <cit.>. Later it was
generalised to represent morphisms in monoidal categories
<cit.>.  For tensors, there is a considerable
amount of variation between the diagrammatic notation used by various
authors.  We have adhered to a standardised subset of this
notation. Furthermore, we have ensured that each diagram is built
strictly using well-defined building blocks, combined strictly using
sequential \(\allowbreak{}\mathnormal{(}\mskip 0.0mu\allowbreak{}\mathnormal{∘}\allowbreak{}\mskip 0.0mu\mathnormal{)}\allowbreak{}\) and parallel \(\allowbreak{}\mathnormal{(}\mskip 0.0mu{⊗}\mskip 0.0mu\mathnormal{)}\allowbreak{}\) composition.

In contrast, the literature on tensor applications
does not prescribe a
direction for reading diagrams (whereas ours are always read
left to right). As long as the various input and outputs of atomic
morphisms are clearly identified, there is no problem in not
specifying a direction for diagrams of compact closed categories, because all
directions are equivalent thanks to the snake laws.

In his seminal work, Penrose additionally does not make a graphical
difference between the dual \(\dual{\mathsf{a}}\) and \(\mathsf{a}\). This means, for instance, that metrics
are (graphically) indistinguishable from \(η\) and
\(ϵ\). Most of the time the difference is inconsequential,
however it becomes important when expressing covariant derivatives in
terms of partial derivatives and affinities. Indeed, the affinities
for \(\mathsf{a}\) and \(\dual{\mathsf{a}}\) are not the same.

§ CONCLUSION

We have studied three equally expressive notations for tensor algebra
and tensor calculus, using the dsl methodology: a point-free morphism
language (Roger) based directly on the categorical semantics; an
index-based language (Albert) based on the Einstein notation in wide
use in the literature; and a streamlined version of the diagram
notation invented by Penrose.

Roger is ideal to define semantics (as instances of the
categorical structures). Its main drawback is that its syntax make it
difficult to track connections between components. In particular it is
difficult to recognise if two expressions are equivalent.

The diagrammatic notation is good at representing connections between
building block of complex expressions, and makes it easy to check for
equivalence.  Therefore it is ideal for presenting morphisms and
proofs of equivalence. Its main drawback is that it lacks an
established way to deal with polymorphism.

The Einstein notation is a natural extension of matrix element
notation, and its programming language counterpart is a natural
extension of array indexing.  Indeed its textual, compact
nature makes it easy to input into computers and easy to typeset in books.
The connection between
the building blocks of a complex Einstein notation expression is done by inspecting
indices and checking their repeated occurrences. It is not as obvious  as in
diagram notation, but much less arduous than in point-free notation.
This notation
is chosen in most of the literature on tensors, even though we find
that diagram notation is often pedagogically superior.
We formalised it as an edsl, Albert,
where every index is represented by a (linear) lambda bound variable.
Expressions in Albert are very close to standard Einstein notation, and they evaluate to representations in any of the
instances of the abstract categorical structures.
Following this workflow, one can build a program which can
simultaneously be used to manipulate tensors as matrices, and produce
diagrams in Penrose notation for the same computations. This means
that Albert users enjoy most of the benefits of all representations.

The connection between the categorical structures, Einstein notation and diagrams is not a new one.
However, despite our best
efforts we have not seen it precisely documented anywhere before
this work.  In one direction, it is not difficult to see that Einstein notation is an instance of the abstract structure.
However, the other
direction (from Einstein notation to categories) is not so obvious.
To the best of our understanding, the connection
relies essentially on the isomorphism between linear functions
(between indices) and morphisms in an smc. This isomorphism is known
in the functional programming community <cit.> but we
could not find any presentation of tensors which points out this fact.
Furthermore, on its own, this isomorphism is not sufficient to account
for all aspects of tensor calculus: the semantics of sums and derivatives
need careful treatment (<ref>).

Another difficulty that we faced when studying tensor calculus using
mathematics textbooks is that they mix concepts and notations from the
abstract algebraic level with those at representational level, without
warning. This kind of freedom can be disturbing for someone used
to the rigid conventions of lambda calculi and programming languages
in general. We hope that this paper helps the growing crowd of (functional)
programmers to approach tensor notation and its applications.