summaryrefslogtreecommitdiff
path: root/macros.tex
diff options
context:
space:
mode:
authorericmarin <maarin.eric@gmail.com>2026-05-06 19:31:37 +0200
committerericmarin <maarin.eric@gmail.com>2026-05-07 17:08:23 +0200
commit66857fcce9159e98ec777a781d8b13b4f37c021d (patch)
tree71401450a9464d25e9ac1a1624bddbf1ce172a54 /macros.tex
parent00439f8eacc04bee31dad6cb476d6f23f0b868dd (diff)
downloadvein-thesis.tar.gz
vein-thesis.zip
interaction rules subsection 3.1.2thesis
Diffstat (limited to 'macros.tex')
-rw-r--r--macros.tex85
1 files changed, 85 insertions, 0 deletions
diff --git a/macros.tex b/macros.tex
new file mode 100644
index 0000000..32b4789
--- /dev/null
+++ b/macros.tex
@@ -0,0 +1,85 @@
+% Linear
+\newcommand{\agentLinear}[4][]{% [#1=options, #2=name, #3=q, #4=r]
+ \inetcell[arity=1, #1](#2){$\mathit{L}_{#3,#4}$}
+}
+% Concrete
+\newcommand{\agentConcrete}[3][]{% [#1=options, #2=name, #3=k]
+ \inetcell[arity=0, #1](#2){$\mathit{C}_{#3}$}
+}
+% Add
+\newcommand{\agentAdd}[2][]{% [#1=options, #2=name]
+ \inetcell[arity=2, #1](#2){$\mathit{A}$}
+}
+% Mul
+\newcommand{\agentMul}[2][]{% [#1=options, #2=name]
+ \inetcell[arity=2, #1](#2){$\mathit{M}$}
+}
+% ReLU
+\newcommand{\agentReLU}[2][]{% [#1=options, #2=name]
+ \inetcell[arity=1, #1](#2){$\mathit{R}$}
+}
+% AddCheckLinear
+\newcommand{\agentAddCheckLinear}[4][]{% [#1=options, #2=name, #3=q, #4=r]
+ \inetcell[arity=2, #1](#2){$\mathit{AL}_{#3,#4}$}
+}
+% MulCheckLinear
+\newcommand{\agentMulCheckLinear}[4][]{% [#1=options, #2=name, #3=q, #4=r
+ \inetcell[arity=2, #1](#2){$\mathit{ML}_{#3,#4}$}
+}
+% AddCheckConcrete
+\newcommand{\agentAddCheckConcrete}[3][]{% [#1=options, #2=name, #3=k]
+ \inetcell[arity=1, #1](#2){$\mathit{AC}_{#3}$}
+}
+% MulCheckConcrete
+\newcommand{\agentMulCheckConcrete}[3][]{% [#1=options, #2=name, #3=k]
+ \inetcell[arity=1, #1](#2){$\mathit{MC}_{#3}$}
+}
+% Materialize
+\newcommand{\agentMaterialize}[2][]{% [#1=options, #2=name]
+ \inetcell[arity=1, #1](#2){$\mathit{MAT}$}
+}
+% Eraser
+\newcommand{\agentEraser}[2][]{% [#1=options, #2=name]
+ \inetcell[arity=0, #1](#2){$\epsilon$}
+}
+% Duplicator
+\newcommand{\agentDuplicator}[2][]{% [#1=options, #2=name]
+ \inetcell[arity=2, #1](#2){$\delta$}
+}
+% TermAdd
+\newcommand{\agentTermAdd}[2][]{% [#1=options, #2=name]
+ \inetcell[arity=2, #1](#2){$\mathit{TA}$}
+}
+% TermMul
+\newcommand{\agentTermMul}[2][]{% [#1=options, #2=name]
+ \inetcell[arity=2, #1](#2){$\mathit{TM}$}
+}
+% TermReLU
+\newcommand{\agentTermReLU}[2][]{% [#1=options, #2=name]
+ \inetcell[arity=1, #1](#2){$\mathit{TR}$}
+}
+% Symbolic
+\newcommand{\agentSymbolic}[3][]{% [#1=options, #2=name, #3=symbol]
+ \inetcell[arity=0, #1](#2){$\mathit{S_{#3}}$}
+}
+% Interaction Rule
+\newcommand{\interactionrule}[3][]{
+ \begin{tikzpicture}
+ \node(arrow) at (0,0){
+ \begin{tikzpicture}
+ \node (arrow) at (0,0) {$\longrightarrow$};
+ \if\relax\detokenize{#1}\relax\else
+ \node[above=0.1cm of arrow, font=\scriptsize\itshape] {#1};
+ \fi
+ \end{tikzpicture}
+ };
+ % LHS
+ \node(LHS)[left=of arrow]{
+ \begin{tikzpicture} #2 \end{tikzpicture}
+ };
+ % RHS
+ \node(RHS)[right=of arrow]{
+ \begin{tikzpicture} #3 \end{tikzpicture}
+ };
+ \end{tikzpicture}
+}