&=& \sum_{{\mathbf{a}} {\mathbf{x}}} \mathrm{Pr}(r|{\mathbf{a}}, {\mathbf{x}} ) \mathrm{Pr}({\mathbf{a}}, {\mathbf{x}}) \\
&=&\sum_{{\mathbf{a}} {\mathbf{x}}} R_r({\mathbf{a}}|{\mathbf{x}}) P({\mathbf{a}} | {\mathbf{x}})
\\ &=& {\mathbf{R}}_r . {\mathbf{P}},\end{aligned}$$ as required.

In order to prove Theorem \[wiringtheorem\], it is thus sufficient to show that for any measurement on a single or bi-partite system in box world, ${\mathbf{M}}$ can be written as a convex combination of total measurement arrays for basic measurements. Let a *subnormalised* basic measurement array have the form ${\mathbf{M}}
= \alpha \overline{{\mathbf{M}}}$, for $0 \leq \alpha \leq 1$ and $\overline{{\mathbf{M}}}$ a total measurement array. The strategy is to show that given a (non-zero) subnormalised ${\mathbf{M}}$, it is always possible to subtract a (non-zero) subnormalised basic measurement array ${\mathbf{M}}_B$ to leave a subnormalised ${\mathbf{M}}'={\mathbf{M}}-{\mathbf{M}}_B$ with at least one additional zero entry. By iteration, we can then prove that any normalised $\overline{{\mathbf{M}}}$ can be built from a convex combination of basic measurement vectors.

Since the total measurement array ${\mathbf{M}}$ is central to the analysis of this section, from here on we use the term ‘measurement’ to refer both to the measurement itself and to ${\mathbf{M}}$, depending on context.

We will use variables with subscripts to denote sets of numbers, indexed by the value of the subscript. For example, $a_x$ 