the remaining $n-1$ subsystems. ${\mathbf{M}}$ satisfies $$M({\mathbf{a}}|(x_k\neq i)  {\mathbf{\hat{x}}}_{ k })=0.$$ Define a new $(n-1)$-dimensional array ${\mathbf{M}}_{a_k}$ such that $$M_{a_k} ({\mathbf{\hat{a}}}_{ k }|{\mathbf{\hat{x}}}_{ k }) \equiv M(a_k
{\mathbf{\hat{a}}}_{ k }|(x_k=i)  {\mathbf{\hat{x}}}_{ k } ).$$ For all $a_k$, ${\mathbf{M}}_{a_k}$ must correspond to a valid basic measurement on $(n-1)$ subsystems.

Finally, with a suitable choice of deterministic function of ${\mathbf{a}}$ for the output $r$, $M({\mathbf{a}}|{\mathbf{x}})$ (consisting of 0s and 1s) can be decomposed into any sum of arrays $R_r({\mathbf{a}}|{\mathbf{x}})$ (also consisting of 0s and 1s). For the measurement of Figure \[fig:basic\_measurement\], outcomes are represented by $R_0$ and $R_1$ as in Eqs. (\[r0example\]) and (\[r1example\]), and ${\mathbf{M}}$ is given by $$M(a_1 a_2| x_1 x_2) = \left( \begin{array}{c|c}
\begin{array}{cc} 1&1 \\ 0&0 \end{array}  &
\begin{array}{cc} 0&0 \\ 1&1  \end{array} \\ \hline
\begin{array}{cc} 0&0 \\ 0&0 \end{array}  &
\begin{array}{cc} 0&0 \\ 0&0 \end{array}  \end{array} \right).$$

Proof of Theorem \[wiringtheorem\]
----------------------------------

Consider a measurement on $n$ systems with outcomes $\{{\mathbf{R}}_r\}$ and total measurement array ${\mathbf{M}}$. The measurement is a convex combination of basic measurements if it can be performed by rolling dice, say, and then performing one basic measurement or another depending on the outcome of the dice roll. In this case it is obvious that 