✦ For everyone, free.

Practical knowledge for real and everyday life

Home

12.19.5 Tensor Operation Result Space Closure

Tensor Operation Result Space Closure ensures repeated tensor operations stay within a defined space, maintaining mathematical consistency.

Tensor Operation Result Space Closure is the general principle that every well-defined tensor operation has an associated result space — the smallest tensor space, determined entirely by the operation's own defining formula and the types of its inputs, that is guaranteed to contain every output the operation can produce — and that this result space, once correctly identified, is always closed under the operation applied to inputs of the type that produced it. It is the unifying idea beneath the individual closure facts already established for specific operations: rather than asking case by case whether a given operation stays within some pre-chosen space, it asks how to compute, directly from the operation itself, the one space that operation is naturally closed on.


Identifying the Result Space from the Operation's Formula

The Result Space as a Function of Input Type

op : Tq1p1 ( V ) ​ ​ ​ ​ Tq2p2 ( V )

For any tensor operation, examining its defining formula reveals a definite rule converting the input variance type (p₁,q₁) into an output variance type (p₂,q₂), and this target type-(p₂,q₂) tensor space on the relevant ambient space is exactly the result space of the operation. Addition and scalar multiplication have result space identical to the input space, (p₂,q₂) = (p₁,q₁); the tensor product has (p₂,q₂) = (2p₁,2q₁) when applied to two copies of the same type; contraction has (p₂,q₂) = (p₁−1,q₁−1).

Closure Is Automatic Once the Result Space Is Correctly Identified

Once the result space has been correctly computed from the operation's formula, the operation is trivially closed on that space, since the result space was defined precisely to be wherever the outputs land. The genuine content of result space closure is not that closure holds — closure is guaranteed by the very construction of the result space — but that the result space can be computed in advance, before any specific input is supplied, purely from the operation's own structural rule.


The Result Space for Composite Operations

Sequential Computation Through a Chain of Operations

Tq0p0 ​ ​ op1 ​ ​ Tq1p1 ​ ​ op2 ​ ​ Tq2p2

When several operations are applied in sequence, the result space of the whole chain is found by computing the result space of the first operation, then treating that result space as the input to determine the result space of the second operation, and so on. This sequential computation is exactly what makes it possible to predict, before ever evaluating a specific tensor, what type and space the final output of a long chain of tensor operations will belong to.

Result Space Under Combined Operations

For an expression combining several operations on possibly different inputs — such as first contracting one tensor, then forming a tensor product with a second, unrelated tensor — the overall result space is obtained by tracking each sub-expression's own result space independently and then applying the combining operation's own type rule (for instance, adding the two variance types for a final tensor product) to those intermediate result spaces.


Diagram of Result Space Determination Through a Chain

Type (2,1) input contract Type (1,0) result space pushforward Type (1,0) on W final result

Distinguishing Result Space Closure from Ordinary Closure Facts

A Predictive Tool Rather Than a Fixed Property of One Space

Ordinary closure facts, such as tensor addition closure, assert that a specific, already-named space is closed under a specific operation. Result space closure instead supplies a method for deriving, for any operation and any input type, what that specific space must be — it is the general recipe from which particular closure facts like addition closure and scalar multiplication closure are simply the two most elementary instances, with the operation's type rule being the identity in both cases.

Applicable Even When No Space Was Named in Advance

Because result space closure derives the relevant space directly from the operation's own formula, it applies even in situations where no closure question was explicitly posed beforehand — given an arbitrary, possibly unfamiliar tensor operation, its result space can be computed mechanically from its defining formula, immediately yielding the (necessarily closed) space that all of its outputs inhabit.


Practical Use in Verifying Longer Tensor Expressions

Preventing Ill-Formed Chains Before Evaluation

By computing the result space at each stage of a multi-step tensor expression and checking it against the type and space compatibility required by the next operation in the chain, an entire expression can be verified as well-formed end to end before any numerical evaluation is attempted, catching type or space mismatches at the point where the chain's logic actually breaks down.

Foundation for Automating Type Checking of Tensor Expressions

Because the result space of every standard tensor operation is computable from a small, fixed set of rules — addition and scalar multiplication preserve type, the tensor product adds variance counts, contraction subtracts one from each count, pullback and pushforward change only the underlying space while preserving type — result space closure supplies exactly the rule set needed to mechanically verify, or automatically infer, the type and space of an arbitrarily complex tensor expression built up from these operations.