TorchLean API

NN.Proofs.Backend.NumericalPolicy

Numerical certificate policy guards #

Every fixed-left range transfer (matrix product, whole and axis sums and means, average pooling, mean squared error, and LayerNorm) succeeds only after the reduction guard accepts the node, and the guard reads the numerical policy of a selected capsule. The lookup takes the first kernel with a matching node id. AcceptedGraphKernelPlan does not require ids to be distinct, so the reduction guard does not consult a later kernel with the same id. Each capsule still passes the accepted plan's policy and evidence gate. The statements establish the consumer's policy gate, not numerical correctness of a native implementation.

The reduction guard succeeds exactly when the selected node policy declares fixedLeft.

A successful reduction guard uses the actual first matching capsule, with its fixed-left declaration and its complete accepted-plan policy and evidence gate.

A computation that starts with the fixed-left guard succeeds only if the guard succeeds.

A successful matrix-product range transfer must have passed the fixed-left policy guard.

A successful whole-tensor sum transfer must have passed the fixed-left policy guard.

A successful mean-squared-error transfer must have passed the fixed-left policy guard.

A successful average-pooling transfer must have passed the fixed-left policy guard.

A successful axis sum or mean transfer must have passed the fixed-left policy guard.

A successful LayerNorm transfer must have passed the fixed-left policy guard.

The matrix-product range consumer inherits the selected capsule's accepted fixed-left policy.