-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move "Testing string diagrams" to a separate note
- Loading branch information
Showing
2 changed files
with
72 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
\import{tt-macros} | ||
% clifford hopf spin tt math draft | ||
\tag{draft} | ||
\title{Testing string diagrams} | ||
|
||
% definition theorem lemma construction observation | ||
% convention corollary axiom example exercise proof | ||
% discussion remark notation | ||
% \taxon{} | ||
|
||
\p{The following is testing string diagram drawing using the example from [Jon Sterling's String diagrams](https://www.jonmsterling.com/jms-00B8.xml):} | ||
|
||
\tikz{ | ||
\begin{tikzpicture}[scale=0.5] | ||
\CreateRect{7}{4} | ||
|
||
\path | ||
coordinate[label=below:$M$] (s/M) at (spath cs:south 0.5) | ||
coordinate[label=above:$F$] (n/F) at (spath cs:north 0.165) | ||
coordinate[label=above:$M$] (n/M) at (spath cs:north 0.33) | ||
coordinate[label=above:$N$] (n/N) at (spath cs:north 0.66) | ||
coordinate[label=below:$F$] (s/F) at (spath cs:south 0.85) | ||
; | ||
|
||
\path[spath/save = middle-vert] (s/M) to (nw -| s/M); | ||
\coordinate[dot,label=-135:$\mu$] (mu) at (spath cs:middle-vert 0.33); | ||
|
||
\draw[spath/save=swoosh] (n/F) to[out=-90,in=90] ($(s/F)+(0,1)$) to (s/F); | ||
\draw[spath/save=cup] (n/M) to ($(n/M)+(0,-1.5)$) to[out=-90,in=180] (mu.center) to[out=0,in=-90] ($(n/N)+(0,-1.5)$) to (n/N); | ||
\draw (s/M) to (mu.center); | ||
|
||
\path[name intersections={of=cup and swoosh}] | ||
coordinate[dot,label=-135:$\lambda$] (lambda) at (intersection-1) | ||
coordinate[dot,label=25:$\lambda$] (lambda') at (intersection-2) | ||
; | ||
|
||
\begin{scope}[on background layer] | ||
\fill[catd] (nw) to (n/F) to[spath/use={swoosh,weld}] (s/F) to (sw) to cycle; | ||
\fill[catc] (n/F) to[spath/use={swoosh,weld}] (s/F) to (se) to (ne) to cycle; | ||
\end{scope} | ||
\end{tikzpicture} | ||
} | ||
|
||
\tikz{ | ||
\begin{tikzpicture}[scale=0.6] | ||
\node[box=0/2/0/1] (A) at (-2, 0) {A}; | ||
\node[box=0/1/0/2] (B) at (+2, 0) {B}; | ||
\node[box=0/1/0/1] (C) at ( 0,+1) {C}; | ||
\node[box=0/1/0/1] (D) at ( 0,-1) {D}; | ||
\wires{ | ||
A = { east.1 = C.west, east.2 = D.west }, | ||
C = { east = B.west.1 }, | ||
D = { east = B.west.2 }, | ||
}{ A.west, B.east } | ||
\end{tikzpicture} | ||
} | ||
|
||
\tikz{ | ||
\begin{tikzpicture} | ||
\node[box=0/1/0/2] (A) at ( 0,+1) {A}; | ||
\node[box=0/2/0/1] (B) at ( 0,-1) {B}; | ||
\node[dot] (x) at (+1, 0) {}; | ||
\node[dot] (y) at (-1, 0) {}; | ||
\wires[looseness=1.5, dashed]{ | ||
A = { east = x.north }, | ||
B = { east.1 = x.south }, | ||
y = { north = A.west.2, south = B.west }, | ||
}{ | ||
A.west.1, B.east.2, x.east, y.west | ||
} | ||
\end{tikzpicture} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters