13.17.5 Tensor Contraction Sequence Result Preservation
Tensor contraction sequences preserve results through algebraic consistency, ensuring structural integrity across transformations in tensor algebra.
Tensor Contraction Sequence Result Preservation is the guarantee that a well-formed multi-step contraction sequence, regardless of which valid grouping or admissible reordering of its disjoint steps is chosen, always produces the same final residual tensor, so that the identity of the result is preserved independently of the particular computational path taken to reach it.
Definition
Given a contraction sequence acting on tensors with a fixed set of index pairs to be contracted, result preservation asserts that for any two admissible execution strategies and realizing the same set of contractions:
Sources of Preservation
Associativity
The associativity context guarantees that different groupings of the same contraction steps yield equal intermediate and final products, since finite sums of products can be regrouped freely without changing their total.
Commutativity of Disjoint Steps
When two contraction steps act on entirely disjoint index pairs, swapping the order in which they are carried out does not change the final residual tensor, since each step's summation is independent of the other's outcome.
Combined Guarantee
Result preservation is the composite consequence of both associativity and commutativity of disjoint steps applied together: any admissible reordering or regrouping consistent with the sequence's dependency structure yields an identical final tensor.
Scope of the Guarantee
What Is Preserved
Only the identity of which specific index pairs are contracted is fixed by the sequence's specification; result preservation guarantees the final tensor is unaffected by variation in execution order or grouping strategy, as long as that specification itself is held fixed.
What Is Not Guaranteed
Result preservation makes no claim about numerical round-off behavior in finite-precision floating point computation, nor does it extend to sequences in which the set of contracted index pairs itself differs between the two compared executions; changing which indices are paired produces, in general, a genuinely different tensor, outside the scope of this preservation guarantee.
Diagram Illustration
Practical Significance
Result preservation is the theoretical basis that justifies choosing among alternative execution orders purely for computational efficiency, as addressed by the sequence cost effect, without any concern that a cheaper ordering might silently alter the mathematical answer. It also underlies the correctness of parallelizing independent contraction steps, since disjoint steps may be executed concurrently and later combined without affecting the outcome.