def Fin.unpack
import bendtorch-core@0.1.0.0/src/shape/core.bend as Coreimport Base
123def Fin.unpack(+a: Nat, +b: Nat, index: Fin(Nat.mul(a, b))) -> Fin(a) & Fin(b):
124 match a:
125 case 0n:
126 match index:
127 case 1n+p:
128 Fin.unpack.step(p, b, index => Fin.unpack(p, b, index), Fin.split(b, Nat.mul(p, b), index))
Uses (6)
Used by (7)
- bendtorch-core@0.1.0.0/src/shape/core:unflatten
- bendtorch-core@0.1.0.0/src/shape/coordinate_proofs:digits_unflatten
- bendtorch-core@0.1.0.0/src/shape/index_proofs:flatten_unflatten
- bendtorch-core@0.1.0.0/src/shape/index_proofs:pack_unpack
- bendtorch-core@0.1.0.0/src/shape/index_proofs:unflatten_flatten
- …