41 |
& \mid & \TYint & \text{integers} \\[1em] |
& \mid & \TYint & \text{integers} \\[1em] |
42 |
% \mu for memory, where images of rawtensors will live (or on disk) |
% \mu for memory, where images of rawtensors will live (or on disk) |
43 |
\mu & ::= & \TYrawten{\Seq{d}}{\rho} & \begin{minipage}[l]{3in}\begin{flushright} |
\mu & ::= & \TYrawten{\Seq{d}}{\rho} & \begin{minipage}[l]{3in}\begin{flushright} |
44 |
tensors of order $o$ and dimension $d$,\\with coefficients of type $\rho$ |
tensors of order $|\Seq{d}|$ and dimensions $\Seq{d}$,\\with coefficients of type $\rho$ |
45 |
\end{flushright}\end{minipage}\\[1em] |
\end{flushright}\end{minipage}\\[1em] |
46 |
\theta & ::= & \TYtensor{\Seq{d}} & \begin{minipage}[l]{3in}\begin{flushright} |
\theta & ::= & \TYtensor{\Seq{d}} & \begin{minipage}[l]{3in}\begin{flushright} |
47 |
tensors of order $o$ and dimension $d$,\\with real coefficients |
tensors of order $|\Seq{d}|$ and dimensions $\Seq{d}$,\\with real coefficients |
48 |
\end{flushright}\end{minipage}\\[1em] |
\end{flushright}\end{minipage}\\[1em] |
49 |
\tau & ::= & \iota \\ |
\tau & ::= & \iota \\ |
50 |
& \mid & \theta \\ |
& \mid & \theta \\ |
72 |
\begin{displaymath} |
\begin{displaymath} |
73 |
\begin{array}{cl} |
\begin{array}{cl} |
74 |
\BinopTy{{\odot}}{\tau}{\tau}{\tau} |
\BinopTy{{\odot}}{\tau}{\tau}{\tau} |
75 |
& \text{for $\odot\in\SET{{+},{-},{*},{/}}$ and $\tau\in\SET{\TYint,\TYreal}$} \\ |
& \text{for $\odot\in\SET{\OP{+},\OP{-},\OP{*},\OP{/}}$ and $\tau\in\SET{\TYint,\TYreal}$} \\ |
76 |
\UnopTy{{-}}{\tau}{\tau} |
\UnopTy{\OP{-}}{\tau}{\tau} |
77 |
& \text{for $\tau\in\SET{\TYint,\TYreal}$} |
& \text{for $\tau\in\SET{\TYint,\TYreal}$} |
78 |
\end{array}% |
\end{array}% |
79 |
\end{displaymath}% |
\end{displaymath}% |
81 |
\noindent{}\point Comparisons: |
\noindent{}\point Comparisons: |
82 |
\begin{displaymath} |
\begin{displaymath} |
83 |
\BinopTy{{\odot}}{\tau}{\tau}{\TYbool} |
\BinopTy{{\odot}}{\tau}{\tau}{\TYbool} |
84 |
\qquad\text{for $\odot\in\SET{{<},{\leq},{=},{\neq}{>},{\geq}}$ and $\tau\in\SET{\TYint,\TYreal}$} |
\qquad\text{for $\odot\in\SET{\OP{<},{\leq},\OP{=},{\neq}\OP{>},{\geq}}$ and $\tau\in\SET{\TYint,\TYreal}$} |
85 |
\end{displaymath}% |
\end{displaymath}% |
86 |
|
|
87 |
|
|
92 |
\noindent{}\point Addition: |
\noindent{}\point Addition: |
93 |
\begin{displaymath} |
\begin{displaymath} |
94 |
\BinopTy{{\odot}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}} |
\BinopTy{{\odot}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}} |
95 |
\qquad\text{for $\odot\in\SET{{+},{-}}$} |
\qquad\text{for $\odot\in\SET{\OP{+},\OP{-}}$} |
96 |
\end{displaymath}% |
\end{displaymath}% |
97 |
|
|
98 |
\noindent{}\point Negation: |
\noindent{}\point Negation: |
99 |
\begin{displaymath} |
\begin{displaymath} |
100 |
\UnopTy{-}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}} |
\UnopTy{\OP{-}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}} |
101 |
\end{displaymath}% |
\end{displaymath}% |
102 |
|
|
103 |
\noindent{}\point Scalar division: |
\noindent{}\point Scalar division: |
104 |
\begin{displaymath} |
\begin{displaymath} |
105 |
\BinopTy{{/}}{\TYtensor{\Seq{d}}}{\TYreal}{\TYtensor{\Seq{d}}} |
\BinopTy{\OP{/}}{\TYtensor{\Seq{d}}}{\TYreal}{\TYtensor{\Seq{d}}} |
106 |
\end{displaymath}% |
\end{displaymath}% |
107 |
|
|
108 |
\noindent{}\point Scalar multiplication (scalar times order-N): |
\noindent{}\point Scalar multiplication (scalar times order-N): |
109 |
\begin{displaymath} |
\begin{displaymath} |
110 |
\begin{array}{c} |
\begin{array}{c} |
111 |
\BinopTy{{?}}{\TYreal}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}} \\ |
\BinopTy{\OP{*}}{\TYreal}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}} \\ |
112 |
\BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYreal}{\TYtensor{\Seq{d}}} |
\BinopTy{\OP{*}}{\TYtensor{\Seq{d}}}{\TYreal}{\TYtensor{\Seq{d}}} |
113 |
\end{array}% |
\end{array}% |
114 |
\end{displaymath}% |
\end{displaymath}% |
|
Possible direct notation syntax (TBD): ~~ {\tt *} ~~ `` '' (space) |
|
115 |
|
|
116 |
\noindent{}\point Tensor scalar multiplication (contraction of two order-N |
\noindent{}\point Tensor scalar multiplication (contraction of two order-N |
117 |
tensors down to a scalar, \eg{} dot product of vectors, double dot |
tensors down to a scalar, \eg{} dot product of vectors, double dot |
180 |
\noindent{}\point Scalar multiplication: |
\noindent{}\point Scalar multiplication: |
181 |
\begin{displaymath} |
\begin{displaymath} |
182 |
\begin{array}{c} |
\begin{array}{c} |
183 |
\BinopTy{{*}}{\TYreal}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\ |
\BinopTy{\OP{*}}{\TYreal}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\ |
184 |
\BinopTy{{*}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}} |
\BinopTy{\OP{*}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}} |
185 |
\end{array}% |
\end{array}% |
186 |
\end{displaymath}% |
\end{displaymath}% |
187 |
|
|
188 |
\noindent{}\point Scalar division: |
\noindent{}\point Scalar division: |
189 |
\begin{displaymath} |
\begin{displaymath} |
190 |
\BinopTy{{/}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}} |
\BinopTy{\OP{/}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}} |
191 |
\end{displaymath}% |
\end{displaymath}% |
192 |
|
|
193 |
\noindent{}\point Negation: |
\noindent{}\point Negation: |
194 |
\begin{displaymath} |
\begin{displaymath} |
195 |
\UnopTy{-}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} |
\UnopTy{\OP{-}}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} |
196 |
\end{displaymath}% |
\end{displaymath}% |
197 |
|
|
198 |
\noindent{}\point Addition: |
\noindent{}\point Addition: |
202 |
\BinopTy{{\odot}}{\theta}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\ |
\BinopTy{{\odot}}{\theta}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\ |
203 |
\BinopTy{{\odot}}{\TYfield{k_1}{d}{\theta}}{\TYfield{k_2}{d}{\theta}}{\TYfield{\min(k_1,k_2)}{d}{\theta}} |
\BinopTy{{\odot}}{\TYfield{k_1}{d}{\theta}}{\TYfield{k_2}{d}{\theta}}{\TYfield{\min(k_1,k_2)}{d}{\theta}} |
204 |
\end{array}% |
\end{array}% |
205 |
\qquad\text{for $\odot\in\SET{{+},{-}}$} |
\qquad\text{for $\odot\in\SET{\OP{+},\OP{-}}$} |
206 |
\end{displaymath}% |
\end{displaymath}% |
207 |
|
|
208 |
\noindent{}\point Differentiation: |
\noindent{}\point Differentiation: |
213 |
|
|
214 |
\noindent{}\point Probing: |
\noindent{}\point Probing: |
215 |
\begin{displaymath} |
\begin{displaymath} |
216 |
\BinopTy{@}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta} |
\BinopTy{\OP{@}}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta} |
217 |
\end{displaymath}% |
\end{displaymath}% |
218 |
|
|
219 |
\end{document} |
\end{document} |