boundlab.zono.matmul.precise_estimate_orig#

boundlab.zono.matmul.precise_estimate_orig(x, y)[source]#

Reference DeepT-precise estimate (materializes the full pair tensor).

Forms every product coefficient \(T_{mnij} = \sum_k A_{mki} B_{knj}\), then bounds the diagonal (\(\varepsilon_i^2 \in [0, 1]\)) exactly — center \(\tfrac12\sum_i |T_{mnii}|\) — and every cross term by \(|T_{mnij}|\), halved-and-summed over both orderings. Memory is \(O(mn \cdot \text{errors}^2)\); precise_estimate() computes the same bound blockwise.