2021-04-08 11:29:37 -04:00
%root: main.tex
The evaluation of $ \abs { \circuit } ( 1 , \ldots , 1 ) $ can be defined recursively, as follows (where $ \circuit _ \linput $ and $ \circuit _ \rinput $ are the `left' and `right' inputs of $ \circuit $ if they exist):
{ \small
\begin { align}
\label { eq:T-all-ones}
\abs { \circuit } (1,\ldots , 1) = \begin { cases}
2021-06-09 12:42:26 -04:00
\abs { \circuit _ \linput } (1,\ldots , 1) \cdot \abs { \circuit _ \rinput } (1,\ldots , 1) & \textbf { if } \circuit .\type = \circmult \\
\abs { \circuit _ \linput } (1,\ldots , 1) + \abs { \circuit _ \rinput } (1,\ldots , 1) & \textbf { if } \circuit .\type = \circplus \\
2021-04-08 11:29:37 -04:00
|\circuit .\val | & \textbf { if } \circuit .\type = \tnum \\
1 & \textbf { if } \circuit .\type = \var .
\end { cases}
\end { align}
}
2021-04-10 09:48:26 -04:00
It turns out that for proof of \Cref { lem:sample} , we need to argue that when $ \circuit . \type = + $ , we indeed have
2021-04-08 11:29:37 -04:00
\begin { align}
\label { eq:T-weights}
\circuit .\lwght & \gets \frac { \abs { \circuit _ \linput } (1,\ldots , 1)} { \abs { \circuit _ \linput } (1,\ldots , 1) + \abs { \circuit _ \rinput } (1,\ldots , 1)} ;\\
\circuit .\rwght & \gets \frac { \abs { \circuit _ \rinput } (1,\ldots , 1)} { \abs { \circuit _ \linput } (1,\ldots , 1)+ \abs { \circuit _ \rinput } (1,\ldots , 1)}
\end { align}