% --- Figure: a cell of a double category of lenses and charts --- % #1 #2 top objects, #3 #4 bottom objects, #5 top chart, #6 bottom chart, % #7 left lens, #8 right lens, #9 cell label. % Tight morphisms (lenses) run vertically and plain, loose ones (charts) horizontally with a bar. \newcommand{\figArenaCell}[9]{% \begin{tikzpicture}[x=1cm,y=1cm,every node/.style={font=\small}, loosearr/.style={-{cgtip},thick,loosebar}, tightarr/.style={-{cgtip},thick}, panel/.style={fill=black!6,rounded corners=1.5pt}] \fill[panel] (0.95,-0.32) rectangle (3.65,-1.88); \node (a11) at (0,0) {$#1$}; \node (a12) at (4.6,0) {$#2$}; \node (a21) at (0,-2.2) {$#3$}; \node (a22) at (4.6,-2.2) {$#4$}; \draw[loosearr] (a11) -- node[above,yshift=3pt,font=\scriptsize] {$#5$} (a12); \draw[loosearr] (a21) -- node[below,yshift=-3pt,font=\scriptsize] {$#6$} (a22); \draw[tightarr] (a11) -- node[left,font=\scriptsize] {$#7$} (a21); \draw[tightarr] (a12) -- node[right,font=\scriptsize] {$#8$} (a22); \node at (2.3,-1.1) {$#9$}; \end{tikzpicture}} % ===== string diagrams of Markov categories (styles in sd.tex) ===== % Each macro is one diagram. Wires run from box anchors, copy dots and discard bars % to box anchors, copy dots, discard bars and the north anchors of output labels. % --- Lemma lem:dagger, functor: outputs X, Z, height 7 --- \newcommand{\sdDagCompA}{\tikz[sd=-3.5]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdbox] (g) at (0,-2.8) {$f'$}; \node[sdcopy] (cp) at (0,-3.55) {}; \node[sdbox] (a) at (-0.95,-4.75) {$f'^\dagger_{\pi\sq f}$}; \node[sdbox] (b) at (-0.95,-5.95) {$f^\dagger_\pi$}; \node[sdout] (x) at (-0.95,-7) {$X$}; \node[sdout] (z) at (0.95,-7) {$Z$}; \draw (p) -- (f); \draw (f) -- (g); \draw (g) -- (cp); \draw (cp) to[out=-150,in=90] (a.north); \draw (a) -- (b); \draw (b) -- (x.north); \draw (cp) to[out=-30,in=90] (z.north);}} \newcommand{\sdDagCompB}{\tikz[sd=-3.5]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdcopy] (cp) at (0,-2.4) {}; \node[sdbox] (b) at (-0.95,-4.0) {$f^\dagger_\pi$}; \node[sdbox] (g) at (0.95,-4.0) {$f'$}; \node[sdout] (x) at (-0.95,-7) {$X$}; \node[sdout] (z) at (0.95,-7) {$Z$}; \draw (p) -- (f); \draw (f) -- (cp); \draw (cp) to[out=-150,in=90] (b.north); \draw (b) -- (x.north); \draw (cp) to[out=-30,in=90] (g.north); \draw (g) -- (z.north);}} \newcommand{\sdDagCompC}{\tikz[sd=-3.5]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdbox] (f) at (0.95,-3.0) {$f$}; \node[sdbox] (g) at (0.95,-4.2) {$f'$}; \node[sdout] (x) at (-0.95,-7) {$X$}; \node[sdout] (z) at (0.95,-7) {$Z$}; \draw (p) -- (cp); \draw (cp) to[out=-150,in=90] (x.north); \draw (cp) to[out=-30,in=90] (f.north); \draw (f) -- (g); \draw (g) -- (z.north);}} % --- Lemma lem:dagger, involution: outputs Y, X, height 6 --- \newcommand{\sdDagInvA}{\tikz[sd=-3]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdcopy] (cp) at (0,-2.4) {}; \node[sdbox] (b) at (0.95,-3.9) {$f^\dagger_\pi$}; \node[sdout] (y) at (-0.95,-6) {$Y$}; \node[sdout] (x) at (0.95,-6) {$X$}; \draw (p) -- (f); \draw (f) -- (cp); \draw (cp) to[out=-150,in=90] (y.north); \draw (cp) to[out=-30,in=90] (b.north); \draw (b) -- (x.north);}} \newcommand{\sdDagInvB}{\tikz[sd=-3]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdbox] (f) at (-0.95,-3.0) {$f$}; \node[sdout] (y) at (-0.95,-6) {$Y$}; \node[sdout] (x) at (0.95,-6) {$X$}; \draw (p) -- (cp); \draw (cp) to[out=-150,in=90] (f.north); \draw (f) -- (y.north); \draw (cp) to[out=-30,in=90] (x.north);}} \newcommand{\sdDagInvC}{\tikz[sd=-3]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdbox] (b) at (0,-2.8) {$f^\dagger_\pi$}; \node[sdcopy] (cp) at (0,-3.55) {}; \node[sdbox] (g) at (-0.95,-4.75) {$f$}; \node[sdout] (y) at (-0.95,-6) {$Y$}; \node[sdout] (x) at (0.95,-6) {$X$}; \draw (p) -- (f); \draw (f) -- (b); \draw (b) -- (cp); \draw (cp) to[out=-150,in=90] (g.north); \draw (g) -- (y.north); \draw (cp) to[out=-30,in=90] (x.north);}} % --- Lemma lem:ci, (ii) implies (i): outputs X', Y', height 5.8 --- \newcommand{\sdCiA}{\tikz[sd=-2.9]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (u) at (0,-1.65) {$u$}; \node[sdcopy] (cp) at (0,-2.4) {}; \node[sdbox] (g) at (0.95,-3.9) {$g$}; \node[sdout] (x) at (-0.95,-5.8) {$X'$}; \node[sdout] (y) at (0.95,-5.8) {$Y'$}; \draw (p) -- (u); \draw (u) -- (cp); \draw (cp) to[out=-150,in=90] (x.north); \draw (cp) to[out=-30,in=90] (g.north); \draw (g) -- (y.north);}} \newcommand{\sdCiB}{\tikz[sd=-2.9]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdbox] (u) at (-0.95,-2.8) {$u$}; \node[sdbox] (w) at (0.95,-2.8) {$u$}; \node[sdbox] (g) at (0.95,-3.95) {$g$}; \node[sdout] (x) at (-0.95,-5.8) {$X'$}; \node[sdout] (y) at (0.95,-5.8) {$Y'$}; \draw (p) -- (cp); \draw (cp) to[out=-150,in=90] (u.north); \draw (u) -- (x.north); \draw (cp) to[out=-30,in=90] (w.north); \draw (w) -- (g); \draw (g) -- (y.north);}} \newcommand{\sdCiC}{\tikz[sd=-2.9]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdbox] (u) at (-0.95,-2.8) {$u$}; \node[sdbox] (f) at (0.95,-2.8) {$f$}; \node[sdbox] (v) at (0.95,-3.95) {$v$}; \node[sdout] (x) at (-0.95,-5.8) {$X'$}; \node[sdout] (y) at (0.95,-5.8) {$Y'$}; \draw (p) -- (cp); \draw (cp) to[out=-150,in=90] (u.north); \draw (u) -- (x.north); \draw (cp) to[out=-30,in=90] (f.north); \draw (f) -- (v); \draw (v) -- (y.north);}} \newcommand{\sdCiD}{\tikz[sd=-2.9]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdcopy] (cp) at (0,-2.4) {}; \node[sdbox] (a) at (-0.95,-3.6) {$f^\dagger_\pi$}; \node[sdbox] (u) at (-0.95,-4.75) {$u$}; \node[sdbox] (v) at (0.95,-3.6) {$v$}; \node[sdout] (x) at (-0.95,-5.8) {$X'$}; \node[sdout] (y) at (0.95,-5.8) {$Y'$}; \draw (p) -- (f); \draw (f) -- (cp); \draw (cp) to[out=-150,in=90] (a.north); \draw (a) -- (u); \draw (u) -- (x.north); \draw (cp) to[out=-30,in=90] (v.north); \draw (v) -- (y.north);}} \newcommand{\sdCiE}{\tikz[sd=-2.9]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdcopy] (cp) at (0,-2.4) {}; \node[sdbox] (a) at (-0.95,-3.6) {$v$}; \node[sdbox] (c) at (-0.95,-4.75) {$c$}; \node[sdbox] (v) at (0.95,-3.6) {$v$}; \node[sdout] (x) at (-0.95,-5.8) {$X'$}; \node[sdout] (y) at (0.95,-5.8) {$Y'$}; \draw (p) -- (f); \draw (f) -- (cp); \draw (cp) to[out=-150,in=90] (a.north); \draw (a) -- (c); \draw (c) -- (x.north); \draw (cp) to[out=-30,in=90] (v.north); \draw (v) -- (y.north);}} \newcommand{\sdCiF}{\tikz[sd=-2.9]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdbox] (v) at (0,-2.8) {$v$}; \node[sdcopy] (cp) at (0,-3.55) {}; \node[sdbox] (c) at (-0.95,-4.75) {$c$}; \node[sdout] (x) at (-0.95,-5.8) {$X'$}; \node[sdout] (y) at (0.95,-5.8) {$Y'$}; \draw (p) -- (f); \draw (f) -- (v); \draw (v) -- (cp); \draw (cp) to[out=-150,in=90] (c.north); \draw (c) -- (x.north); \draw (cp) to[out=-30,in=90] (y.north);}} \newcommand{\sdCiG}{\tikz[sd=-2.9]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (u) at (0,-1.65) {$u$}; \node[sdbox] (g) at (0,-2.8) {$g$}; \node[sdcopy] (cp) at (0,-3.55) {}; \node[sdbox] (c) at (-0.95,-4.75) {$c$}; \node[sdout] (x) at (-0.95,-5.8) {$X'$}; \node[sdout] (y) at (0.95,-5.8) {$Y'$}; \draw (p) -- (u); \draw (u) -- (g); \draw (g) -- (cp); \draw (cp) to[out=-150,in=90] (c.north); \draw (c) -- (x.north); \draw (cp) to[out=-30,in=90] (y.north);}} % --- Lemma lem:ci, (ii) and (iii): outputs X', Y', Y, height 6.6 --- % psi_pi as defined \newcommand{\sdCiPa}{\tikz[sd=-3.3]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdbox] (u) at (-1.2,-3.0) {$u$}; \node[sdbox] (f) at (0.6,-2.65) {$f$}; \node[sdcopy] (cq) at (0.6,-3.45) {}; \node[sdbox] (v) at (0,-4.75) {$v$}; \node[sdout] (x) at (-1.2,-6.6) {$X'$}; \node[sdout] (y) at (0,-6.6) {$Y'$}; \node[sdout] (z) at (1.2,-6.6) {$Y$}; \draw (p) -- (cp); \draw (cp) to[out=-150,in=90] (u.north); \draw (u) -- (x.north); \draw (cp) to[out=-30,in=90] (f.north); \draw (f) -- (cq); \draw (cq) to[out=-140,in=90] (v.north); \draw (v) -- (y.north); \draw (cq) to[out=-40,in=90] (z.north);}} % after (2.1) for f at pi, with #1 #2 on the left branch \newcommand{\sdCiPthree}[2]{\tikz[sd=-3.3]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdcopy] (cp) at (0,-2.4) {}; \node[sdbox] (a) at (-1.2,-3.7) {$#1$}; \node[sdbox] (b) at (-1.2,-4.9) {$#2$}; \node[sdbox] (v) at (0,-4.3) {$v$}; \node[sdout] (x) at (-1.2,-6.6) {$X'$}; \node[sdout] (y) at (0,-6.6) {$Y'$}; \node[sdout] (z) at (1.2,-6.6) {$Y$}; \draw (p) -- (f); \draw (f) -- (cp); \draw (cp) to[out=-150,in=90] (a.north); \draw (a) -- (b); \draw (b) -- (x.north); \draw (cp) -- (v); \draw (v) -- (y.north); \draw (cp) to[out=-30,in=90] (z.north);}} % v followed by a copy that feeds #1, Y on the right \newcommand{\sdCiPfour}[1]{\tikz[sd=-3.3]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdcopy] (cp) at (0,-2.4) {}; \node[sdbox] (v) at (-0.6,-3.55) {$v$}; \node[sdcopy] (cq) at (-0.6,-4.3) {}; \node[sdbox] (c) at (-1.2,-5.45) {$#1$}; \node[sdout] (x) at (-1.2,-6.6) {$X'$}; \node[sdout] (y) at (0,-6.6) {$Y'$}; \node[sdout] (z) at (1.2,-6.6) {$Y$}; \draw (p) -- (f); \draw (f) -- (cp); \draw (cp) to[out=-130,in=90] (v.north); \draw (v) -- (cq); \draw (cq) to[out=-140,in=90] (c.north); \draw (c) -- (x.north); \draw (cq) to[out=-40,in=90] (y.north); \draw (cp) to[out=-30,in=90] (z.north);}} % the conditional independence display \newcommand{\sdCiPe}{\tikz[sd=-3.3]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdbox] (v) at (0,-2.8) {$v$}; \node[sdcopy] (cp) at (0,-3.55) {}; \node[sdbox] (c) at (-1.2,-5.0) {$c$}; \node[sdbox] (d) at (1.2,-5.0) {$d$}; \node[sdout] (x) at (-1.2,-6.6) {$X'$}; \node[sdout] (y) at (0,-6.6) {$Y'$}; \node[sdout] (z) at (1.2,-6.6) {$Y$}; \draw (p) -- (f); \draw (f) -- (v); \draw (v) -- (cp); \draw (cp) to[out=-150,in=90] (c.north); \draw (c) -- (x.north); \draw (cp) -- (y.north); \draw (cp) to[out=-30,in=90] (d.north); \draw (d) -- (z.north);}} \newcommand{\sdCiQa}{\tikz[sd=-3.3]{ \node[sdstate] (r) at (0,-0.5) {$\rho$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdbox] (h) at (-1.2,-3.2) {$h$}; \node[sdbox] (k) at (1.2,-3.2) {$k$}; \node[sdout] (x) at (-1.2,-6.6) {$X'$}; \node[sdout] (y) at (0,-6.6) {$Y'$}; \node[sdout] (z) at (1.2,-6.6) {$Y$}; \draw (r) -- (cp); \draw (cp) to[out=-150,in=90] (h.north); \draw (h) -- (x.north); \draw (cp) -- (y.north); \draw (cp) to[out=-30,in=90] (k.north); \draw (k) -- (z.north);}} % --- Theorem thm:section(iii): outputs X, X or X, Z, height 4.2 --- \newcommand{\sdDetA}{\tikz[sd=-2.1]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdout] (x) at (-0.8,-4.2) {$X$}; \node[sdout] (y) at (0.8,-4.2) {$X$}; \draw (p) -- (cp); \draw (cp) to[out=-140,in=90] (x.north); \draw (cp) to[out=-40,in=90] (y.north);}} \newcommand{\sdDetB}{\tikz[sd=-2.1]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sddel] (d) at (0.8,-2.3) {}; \node[sdstate] (q) at (0.8,-3.25) {$\pi$}; \node[sdout] (x) at (-0.8,-4.2) {$X$}; \node[sdout] (y) at (0.8,-4.2) {$X$}; \draw (p) -- (cp); \draw (cp) to[out=-140,in=90] (x.north); \draw (cp) to[out=-40,in=90] (d.north); \draw (q) -- (y.north);}} \newcommand{\sdDetC}{\tikz[sd=-2.1]{ \node[sdstate] (p) at (-0.8,-0.5) {$\pi$}; \node[sdstate] (q) at (0.8,-0.5) {$\pi$}; \node[sdout] (x) at (-0.8,-4.2) {$X$}; \node[sdout] (y) at (0.8,-4.2) {$X$}; \draw (p) -- (x.north); \draw (q) -- (y.north);}} \newcommand{\sdDetD}{\tikz[sd=-2.1]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdbox] (h) at (0.8,-2.8) {$h$}; \node[sdout] (x) at (-0.8,-4.2) {$X$}; \node[sdout] (z) at (0.8,-4.2) {$Z$}; \draw (p) -- (cp); \draw (cp) to[out=-140,in=90] (x.north); \draw (cp) to[out=-40,in=90] (h.north); \draw (h) -- (z.north);}} \newcommand{\sdDetE}{\tikz[sd=-2.1]{ \node[sdstate] (p) at (-0.8,-0.5) {$\pi$}; \node[sdstate] (q) at (0.8,-0.5) {$\pi$}; \node[sdbox] (h) at (0.8,-2.2) {$h$}; \node[sdout] (x) at (-0.8,-4.2) {$X$}; \node[sdout] (z) at (0.8,-4.2) {$Z$}; \draw (p) -- (x.north); \draw (q) -- (h); \draw (h) -- (z.north);}} % --- Lemma lem:steps(ii), inversion of a step: outputs Gamma, X, Gamma, Y, height 7; % the dashed region is phi = ; on the left and ; on the right --- \newcommand{\sdStepOuter}{% \node[sdstate] (r) at (-1.6,-0.5) {$\rho$}; \node[sdcopy] (cg) at (-1.6,-1.3) {}; \node[sdcopy] (c2) at (0.6,-2.45) {}; \node[sdout] (o1) at (-2.4,-7) {$\Gamma$}; \node[sdout] (o2) at (-0.8,-7) {$X$}; \node[sdout] (o3) at (0.8,-7) {$\Gamma$}; \node[sdout] (o4) at (2.4,-7) {$Y$}; \draw (r) -- (cg); \draw (cg) to[out=-130,in=90] (o1.north); \draw (cg) to[out=-20,in=150] (c2); \draw (cg) to[out=-90,in=90] (-1.0,-5.4) to[out=-90,in=90] (o3.north); \draw[dashed,black!50,line width=0.4pt] (-0.5,-1.95) rectangle (2.3,-5.6);} \newcommand{\sdStepA}{\tikz[sd=-3.5]{ \sdStepOuter \node[sdbox] (p) at (0,-3.25) {$p$}; \node[sdcopy] (cx) at (0,-4.05) {}; \node[sdbox] (f) at (1.5,-4.95) {$f$}; \draw (c2) to[out=-150,in=90] (p.north); \draw (p) -- (cx); \draw (c2) to[out=-30,in=90] ([xshift=2.5pt]f.north); \draw (cx) to[out=-10,in=90] ([xshift=-2.5pt]f.north); \draw (cx) to[out=-150,in=90] (o2.north); \draw (f) to[out=-90,in=90] (o4.north);}} \newcommand{\sdStepB}{\tikz[sd=-3.5]{ \sdStepOuter \node[sdbox] (q) at (1.5,-3.25) {$q$}; \node[sdcopy] (cy) at (1.5,-4.05) {}; \node[sdbox] (e) at (0,-4.95) {$e$}; \draw (c2) to[out=-30,in=90] (q.north); \draw (q) -- (cy); \draw (c2) to[out=-150,in=90] ([xshift=-2.5pt]e.north); \draw (cy) to[out=-170,in=90] ([xshift=2.5pt]e.north); \draw (e) to[out=-90,in=90] (o2.north); \draw (cy) to[out=-30,in=90] (o4.north);}} \tikzset{sdin/.style={font=\scriptsize,inner sep=1pt,anchor=south,text height=1.5ex,text depth=0.35ex}, sdwide/.style={sdbox,minimum width=9mm}} % --- copying is natural only for deterministic channels (Introduction) --- \newcommand{\sdCopyAfter}{\tikz[sd=-2]{ \node[sdin] (x) at (0,0) {$X$}; \node[sdbox] (f) at (0,-1.2) {$f$}; \node[sdcopy] (cp) at (0,-2.1) {}; \node[sdout] (y1) at (-0.8,-4) {$Y$}; \node[sdout] (y2) at (0.8,-4) {$Y$}; \draw (x.south) -- (f); \draw (f) -- (cp); \draw (cp) to[out=-140,in=90] (y1.north); \draw (cp) to[out=-40,in=90] (y2.north);}} \newcommand{\sdCopyBefore}{\tikz[sd=-2]{ \node[sdin] (x) at (0,0) {$X$}; \node[sdcopy] (cp) at (0,-0.9) {}; \node[sdbox] (f1) at (-0.8,-2.4) {$f$}; \node[sdbox] (f2) at (0.8,-2.4) {$f$}; \node[sdout] (y1) at (-0.8,-4) {$Y$}; \node[sdout] (y2) at (0.8,-4) {$Y$}; \draw (x.south) -- (cp); \draw (cp) to[out=-140,in=90] (f1.north); \draw (cp) to[out=-40,in=90] (f2.north); \draw (f1) -- (y1.north); \draw (f2) -- (y2.north);}} % --- the conditionals equation (3.x), outputs X, Y --- \newcommand{\sdCondL}{\tikz[sd=-2.5]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdbox] (f) at (0.95,-3.0) {$f$}; \node[sdout] (x) at (-0.95,-5) {$X$}; \node[sdout] (y) at (0.95,-5) {$Y$}; \draw (p) -- (cp); \draw (cp) to[out=-150,in=90] (x.north); \draw (cp) to[out=-30,in=90] (f.north); \draw (f) -- (y.north);}} \newcommand{\sdCondR}{\tikz[sd=-2.5]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdbox] (f) at (0,-1.65) {$f$}; \node[sdcopy] (cp) at (0,-2.4) {}; \node[sdbox] (b) at (-0.95,-3.75) {$f^\dagger_\pi$}; \node[sdout] (x) at (-0.95,-5) {$X$}; \node[sdout] (y) at (0.95,-5) {$Y$}; \draw (p) -- (f); \draw (f) -- (cp); \draw (cp) to[out=-150,in=90] (b.north); \draw (b) -- (x.north); \draw (cp) to[out=-30,in=90] (y.north);}} % the same left side followed by the symmetry, outputs Y, X (Proposition swap) \newcommand{\sdCondLsigma}{\tikz[sd=-3]{ \node[sdstate] (p) at (0,-0.5) {$\pi$}; \node[sdcopy] (cp) at (0,-1.35) {}; \node[sdbox] (f) at (0.95,-2.8) {$f$}; \node[sdout] (y) at (-0.95,-6) {$Y$}; \node[sdout] (x) at (0.95,-6) {$X$}; \draw (p) -- (cp); \draw (cp) to[out=-150,in=90] (-0.95,-3.6) to[out=-90,in=90] (x.north); \draw (cp) to[out=-30,in=90] (f.north); \draw (f) -- (0.95,-3.6) to[out=-90,in=90] (y.north);}} % --- a lift and its two feet (Definition feet): outputs A, Y --- \newcommand{\sdLift}{\tikz[sd=-1.6]{ \node[sdwidestate] (g) at (0,-0.5) {$\gamma$}; \node[sdout] (a) at (-0.6,-3.2) {$A$}; \node[sdout] (y) at (0.6,-3.2) {$Y$}; \draw ([xshift=-0.3cm]g.south) to[out=-90,in=90] (a.north); \draw ([xshift=0.3cm]g.south) to[out=-90,in=90] (y.north);}} \newcommand{\sdLiftDelY}{\tikz[sd=-1.6]{ \node[sdwidestate] (g) at (0,-0.5) {$\gamma$}; \node[sdout] (a) at (-0.6,-3.2) {$A$}; \node[sddel] (d) at (0.6,-2.0) {}; \draw ([xshift=-0.3cm]g.south) to[out=-90,in=90] (a.north); \draw ([xshift=0.3cm]g.south) to[out=-90,in=90] (d.north);}} \newcommand{\sdLiftDelA}{\tikz[sd=-1.6]{ \node[sdwidestate] (g) at (0,-0.5) {$\gamma$}; \node[sddel] (d) at (-0.6,-2.0) {}; \node[sdout] (y) at (0.6,-3.2) {$Y$}; \draw ([xshift=-0.3cm]g.south) to[out=-90,in=90] (d.north); \draw ([xshift=0.3cm]g.south) to[out=-90,in=90] (y.north);}} \newcommand{\sdState}[2]{\tikz[sd=-1.6]{\node[sdstate] (r) at (0,-0.5) {$#1$}; \node[sdout] (a) at (0,-3.2) {$#2$}; \draw (r) -- (a.north);}} % --- a run of two lifts at rho: gamma_1 = rho; (dashed), gamma_2 = gamma_1; (Section K) --- \newcommand{\sdRun}{\tikz[sd=-3.6]{ \node[sdstate] (r) at (0,-0.5) {$\rho$}; \node[sdcopy] (c1) at (0,-1.35) {}; \node[sdbox] (d1) at (0.8,-2.45) {$d_1$}; \node[sdcopy] (ca) at (-0.8,-3.7) {}; \node[sdcopy] (cx) at (0.8,-3.7) {}; \node[sdbox,minimum width=7mm] (d2) at (2.1,-5.3) {$d_2$}; \node[sdout] (a) at (-0.8,-7.2) {$A$}; \node[sdout] (x) at (0.8,-7.2) {$X$}; \node[sdout] (y) at (2.1,-7.2) {$Y$}; \draw (r) -- (c1); \draw (c1) to[out=-150,in=90] (ca); \draw (ca) -- (a.north); \draw (c1) to[out=-30,in=90] (d1.north); \draw (d1) -- (cx); \draw (cx) -- (x.north); \draw (ca) to[out=-30,in=90] ([xshift=-0.35cm]d2.north); \draw (cx) to[out=-20,in=90] ([xshift=0.35cm]d2.north); \draw (d2) -- (y.north); \draw[dashed,black!50,line width=0.4pt] (-1.3,-0.05) rectangle (1.4,-3.15); \node[font=\scriptsize,text=black!60,anchor=south east] at (1.4,-3.15) {$\gamma_1$};}} % --- the swap at the unit as two runs; batch, deferred and early plugging (Remark pj) --- \newcommand{\sdPlugBatch}{\tikz[sd=-2.3]{ \node[sdstate] (a) at (-0.7,-0.5) {$\omega_1$}; \node[sdstate] (b) at (0.7,-0.5) {$\omega_2$}; \node[sdbox,minimum width=12mm] (g) at (0,-2.6) {$\fan{f,f}^\dagger_\pi$}; \node[sdout] (x) at (0,-4.6) {$X$}; \draw (a) -- node[left,font=\scriptsize,inner sep=1pt]{$Y_1$} ([xshift=-0.35cm]g.north); \draw (b) -- node[right,font=\scriptsize,inner sep=1pt]{$Y_2$} ([xshift=0.35cm]g.north); \draw (g) -- (x.north);}} \newcommand{\sdPlugDeferred}{\tikz[sd=-2.3]{ \node[sdstate] (a) at (-0.7,-0.5) {$\omega_1$}; \node[sdstate] (b) at (0.7,-0.5) {$\omega_2$}; \node[sdbox,minimum width=12mm] (g) at (0,-2.6) {$p_2$}; \node[sdout] (x) at (0,-4.6) {$X$}; \draw (a) -- node[left,font=\scriptsize,inner sep=1pt]{$Y_1$} ([xshift=-0.35cm]g.north); \draw (b) -- node[right,font=\scriptsize,inner sep=1pt]{$Y_2$} ([xshift=0.35cm]g.north); \draw (g) -- (x.north);}} \newcommand{\sdPlugEarly}{\tikz[sd=-2.3]{ \node[sdstate] (b) at (0,-0.5) {$\omega_2$}; \node[sdbox,minimum width=9mm] (g) at (0,-2.6) {$f^\dagger_{\sigma_1}$}; \node[sdout] (x) at (0,-4.6) {$X$}; \draw (b) -- node[right,font=\scriptsize,inner sep=1pt]{$Y_2$} (g.north); \draw (g) -- (x.north);}} \newcommand{\sdSigmaOne}{\tikz[sd=-2.3]{ \node[sdstate] (a) at (0,-0.5) {$\omega_1$}; \node[sdbox,minimum width=9mm] (g) at (0,-2.6) {$f^\dagger_\pi$}; \node[sdout] (x) at (0,-4.6) {$X$}; \draw (a) -- node[right,font=\scriptsize,inner sep=1pt]{$Y_1$} (g.north); \draw (g) -- (x.north);}} % --- a tower: the floors of a run at the unit state, each floor read as a channel (Proposition kernel) --- \newcommand{\tower}[1]{\fbox{\scriptsize$\begin{array}{@{}l@{}}#1\end{array}$}}