law reshape_swap

bend-ml-tensor@0.1.2.0 · main.bend:479

import bend-ml-tensor@0.1.2.0/main.bend as BendMlTensor
import Base

479# LAW (reshape_swap): r x c and c x r have the same number of elements
480# (multiplication is commutative), so this reshape always exists.
481law reshape_swap:
482  for +r: Nat
483  for +c: Nat
484  {Nat.mul(r, c) == Nat.mul(c, r) : Nat}

Uses (3)

Used by (1)