TorchLean API

NN.Tensor.Internal.Elab.Einsum.Kernel.Utilities

Generated kernel utilities #

This module closes independently generated results over only the lets they use and constructs direct correctness certificates for compile-time-expanded finite folds.

Introduce generated lets around several results independently.

mkLetFVars drops unused let declarations from each result. A contraction-invariant operand can therefore remain in a scalar factor while coordinate-dependent reads stay only in the middle product.

Instances For

    Unroll a finite fold of known length and construct its equality certificate from the standard successor and zero laws.

    Building this proof directly avoids asking the simplifier to normalize the dependent operand family generated for every einsum input.

    Instances For