Mixed-radix arithmetic #
These lemmas identify the quotient and remainder of one bounded row-major digit. The compiler uses them to cancel coordinate decoding after a checked transform has been composed with a tensor index.
theorem
TorchLean.Tensor.Internal.MixedRadix.div_eq_mod_add_mul_div
(value lowerRadix upperRadix : Nat)
:
After removing one lower radix, quotient and remainder at the next radix reconstruct the remaining mixed-radix index.