boundlab.zonosq.zonosq_matmuls#

boundlab.zonosq.zonosq_matmuls(*pairs)[source]#

Abstract the sum of matmuls Σ_i A_i @ B_i as a single zonosq expression.

Equivalent to concatenating the factors block-wise ([A_1 | | A_n] @ [B_1; ; B_n]) and abstracting one matmul, but without materialising the concatenation (which would hide the per-term LpEpsilon structure behind slicing ops). Crucially, the bilinear coefficients of every product are accumulated before the error abstraction takes absolute values, so contributions of shared epsilon symbols cancel across terms — making this at least as tight as, and never looser than, abstracting each A_i @ B_i independently and summing.