Softplus and safeLog bounds #
The executable transfers use elementary bounds on softplus, so they can handle large positive inputs without evaluating a large exponential. SafeLog then adds its scalar epsilon interval and checks that the whole logarithm argument is positive. This file connects those transfers to the real specifications, including the fact that epsilon may vary inside its own interval.
Softplus differs from max x 0 by a nonnegative term of size at most one.
The proof follows the same sign branch as the executable specification. In each branch the exponential argument is nonpositive, which is why the resulting interval rule needs no large exponential at either endpoint.
Every successful real softplus transfer encloses the source operation.
The reciprocal fallback for logarithm is valid on the entire positive real axis.
It is deliberately coarse near zero. Its purpose is to give directed-arithmetic backends a usable enclosure even when they do not supply a correctly rounded logarithm transfer.
SafeLog encloses both its input and its scalar epsilon, without replacing epsilon by a default.
Successful transfer establishes positivity of the lower logarithm argument. The proof uses that check to apply monotonicity of the real logarithm; no positivity premise is added to the caller.
A scalar enclosure lifts coordinatewise to the flat tensor representation.
The transfer may fail on any coordinate. If it returns a box, traverseFin gives the corresponding
successful scalar transfer at every index, so no unchecked default endpoints enter the proof.
The executable softplus box transfer encloses the real tensor specification.
The executable safeLog transfer encloses a tensor and a shared scalar epsilon.
The epsilon value is read from its one-element flat tensor after aligning the parent box's dimension with that value. Thus the same epsilon interval is used for every input coordinate.