✦ For everyone, free.

Practical knowledge for real and everyday life

Home

13.20.1 Tensor Contraction Index Balance Check

Ensuring balanced index contraction in tensors is crucial for valid algebraic operations and accurate physical interpretations.

Tensor Contraction Index Balance Check is the verification test confirming that every index symbol appearing in a tensor expression occurs either exactly once as a free index or exactly twice as a repeated dummy pair with one occurrence upper and one occurrence lower, catching malformed expressions in which an index is left over, repeated with mismatched variance, or repeated more than twice.


Definition

For an expression containing index symbols i1,,ik, the balance check requires that each symbol satisfies exactly one of two conditions:

occurrences(ij) = 1 (free index) occurrences(ij) = 2 , one upper and one lower (dummy index)

Any symbol violating both conditions, appearing zero times as claimed, three or more times, or twice with the same variance both times, causes the check to fail.


Categories of Imbalance the Check Detects

Triple Repetition

An index symbol appearing three or more times in a single term is invalid under the standard summation convention, since the convention only defines summation for a symbol repeated exactly twice; such a repetition typically indicates a labeling error where two distinct dummy indices were mistakenly given the same symbol.

Same-Variance Repetition

An index symbol repeated twice but both times as an upper index, or both times as a lower index, does not correspond to a valid contraction, since contraction requires pairing one upper occurrence with one lower occurrence; this pattern typically signals a transcription error in copying an expression.

Orphaned Free Index

An index intended to be a dummy index but appearing only once, due to a dropped second occurrence during manipulation, is flagged as an unintended free index, alerting that the resulting expression's apparent type does not match what was intended.


Procedure

Step One: Tabulate Occurrences

Build a table listing every distinct index symbol in the expression together with its total occurrence count and the variance, upper or lower, of each occurrence.

Step Two: Classify Each Symbol

Classify each symbol as free, valid dummy, or imbalanced, according to the occurrence and variance patterns defined above.

Step Three: Report Imbalances

For any symbol classified as imbalanced, report its occurrence pattern so the specific location of the malformed index can be identified and corrected.


Diagram

Symbol Occurrences Status i 1 free, valid a 2 (up, down) dummy, valid b 2 (up, up) imbalanced

Relation to the Broader Verification Procedure

The index balance check operates alongside the dimension check as an early structural test within the tensor contraction verification procedure, confirming that an expression is syntactically well formed according to the summation convention before any component values are computed, thereby catching notational errors that would otherwise propagate silently into an incorrect or ill-defined result.