Lowered rearrangement equivalence #
Compiler-level congruence theorems connect checked row-major index certificates to primitive tensor programs.
Evaluate a checked rearrangement at any input coordinate selected by its verified row-major index map.
This pointwise form avoids unfolding grouped coordinate equivalences in downstream correspondence theorems. It applies to arbitrary ranks, grouping, ungrouping, ellipses, and symbolic axis lengths.
Equivalent checked rearrangements compile to equal primitive tensor programs. This is the compiler-level congruence theorem used by proof automation for differently spelled but extensionally equal patterns.
Two checked rearrangements compile to the same tensor program when their compact row-major index maps agree.
Unlike enumerating all concrete coordinates, the premise is a single
arithmetic formula over an arbitrary output index. This is suitable both for
general hand-written proofs and for reducing reflected literal plans inside
the einops tactic.
Two successive checked rearrangements equal one direct rearrangement when the composite of their compact row-major index maps equals the direct map.
All three plans and all physical-shape transports are arbitrary. The theorem therefore covers transpositions, grouping and ungrouping, ellipses, and their compositions without introducing a separate representation of composed plans.