distance by the number of variables taking part in the consensus. When the side constraint involves no additional variables the weighting of the distance plays no role.

Thanks to the lemma, projecting to the $A$ constraint is very easy. To project to the non-negativity side constraint one simply sets to zero all the negative weights or code values. When the norm is also fixed in the side constraint, as in , rescaling to the correct norm follows the zeroing of the negative elements. There is a slight complication in the case where the consensus weights are all negative, so that the all-zero vector after non-negativity projection cannot be rescaled. The correct projection in this case is to replace the least negative consensus weight by $\Omega$ and set the rest to zero. Detailed proofs of these statements are given in [@bauschke2018projecting].

The cost of the projection to the $A$ constraint is dominated by the computation of the consensus values of the variables, not the projections to the side constraints, and therefore scales as the product of the batch size and the number of edges in the network, or $|K||E|$.

The constraints in $B$ are independent for all $k\in K$, $j\in D$ 