TorchLean API

NN.Proofs.RuntimeApprox.NF.Ops.Elementwise.Binary

NF Elementwise Bounds: Binary Arithmetic #

approxT bound for elementwise addition (add_spec) over arbitrary tensor shapes.

The output epsilon is computed as linf_norm (add_bound_tensor epsx epsy xR yR), which combines the input epsilons and one rounding-ULP term per element.

approxT bound for elementwise subtraction (sub_spec) over arbitrary tensor shapes.

This is obtained by lifting the scalar subtraction bound approx_sub_nf via approxT_map2_spec_of_scalar_bound.

approxT bound for elementwise multiplication (mul_spec) over arbitrary tensor shapes.

The scalar core is approx_mul_nf, lifted componentwise; the resulting bound is packaged as mul_bound_tensor and reduced with linf_norm.