law batched_matmul_matrices
import bendtorch-core@0.1.0.0/src/tensor/batched_matmul_LAWS.bend as BatchedMatmulLAWSimport Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matrix
import bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend as Batched
17# Two rank-2 operands are `Matrix.matmul` itself: the same result, words,
18# errors and returned inputs, so every law of `matmul` holds for them and
19# their words do not change.
20law batched_matmul_matrices:
21 for +left: Shape.Shape
22 for +right: Shape.Shape
23 for a: Core.Tensor<left>
24 for b: Core.Tensor<right>
25 for +rows: U32
26 for +inner: U32
27 for +right_inner: U32
28 for +columns: U32
29 for left_matrix: {Shape.dimensions(left) == [rows, inner] : List<&2, U32>}
30 for right_matrix: {Shape.dimensions(right) == [right_inner, columns] : List<&2, U32>}
31 {Batched.matmul(Core.Packed{left, a}, Core.Packed{right, b}) == Matrix.matmul(Core.Packed{left, a}, Core.Packed{right, b}) :
32 Result<&2, &1, Matrix.Error, Core.Dynamic & Core.Dynamic & Core.Dynamic>}
Uses (13)
Used by (0)
No other definition uses this definition.