Index casts — relabelling a graph's index along a proved Nat equality #
Nat multiplication is not definitionally associative, so the network's left-associated
c·h·w (and N·(c·h·w)) and the BatchNorm / channel-LayerNorm ops' c·(h·w) are different
types for the same tensor. castIdx h e is the same graph typed at the other index; the emitted
text does not change (skel erases indices), and den_castIdx says the denotation is read
through Fin.cast. laAssoc is the batched seam N·(c·h·w) = N·(c·(h·w)).
The same reshuffle on plain vectors is EnetTiePoC.reassocB (batched, BatchedBackLinks) and
reassocFwd / reassocBack (per example, PerChannelBN); den_reassocS / den_unassocS
(ConvNeXtChannelLN) identify the graph cast with those.
Relabel an AST value's index along a proved equality. h ▸ e: the same graph, typed at
m instead of n. The emitted text does not change, because skel erases indices.
Equations
- Proofs.StableHLO.castIdx h e = h ▸ e