Rearrange and repeat semantics #
Independent coordinate denotations and algebraic laws for checked rearrangements and repetitions.
Independent rearrange denotation: pull the input tensor along the certified elementary-axis permutation.
Instances For
Rearrange reads the input entry selected by its output coordinate.
Reindexing a rearranged tensor by the inverse coordinate equivalence recovers the original tensor.
Rearrange commutes with every pointwise scalar map.
Rearrange commutes with every pointwise binary operator when both operands have the same input shape.
Rearrange preserves the total sum over any additive commutative monoid.
The adjoint of a checked rearrangement under the finite tensor pairing is reindexing by its inverse coordinate equivalence.
This algebraic identity is the pattern-level core of the inverse-rearrange VJP; connecting it to a differentiability framework is a separate theorem.
Rearranging both operands preserves their finite tensor pairing.
Independent repeat denotation: pull the input tensor along the projection that forgets axes introduced on the output side.
Instances For
Repeat copies the input entry selected after new output axes are forgotten.
Aggregating a repeated tensor back to its input coordinates multiplies every entry by the number of settings of the introduced axes.
Natural-number scalar multiplication states the result over any additive commutative monoid, including the zero-multiplicity case.
Repeat scales the total additive sum by the product of the introduced axis lengths.
Fiber aggregation is the adjoint of repeat under the finite tensor pairing.
Commutativity of scalar multiplication is needed because Rep.dot records
the left operand first, whereas the general push/pull adjunction is stated
with the pushed tensor on the left.