Lines 6-9 show that the required computation is decomposed over each sub-component.
if computing the posterior and expected values of linear functions over each subcomponent is easy, then the algorithm works efficiently.