def pair_eq
bendtorch-core@0.1.0.0 · src/tensor/contracts/matmul_parallel_proof.bend:667
import bendtorch-core@0.1.0.0/src/tensor/contracts/matmul_parallel_proof.bend as MatmulParallelProof
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as StorageLaws
import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matrix
import bendtorch-core@0.1.0.0/src/tensor/parallel.bend as Parallel
import bendtorch-core@0.1.0.0/src/storage/api.bend as Api
667def pair_eq(+span: Nat, +columns: Nat, +left: Shape.Shape, +left_fill: F32, +left_ops: List<&2, StorageLaws.Op>, +ha: List<&2, Api.Effect>, +dl: Nat, +fa: F32, +right: Shape.Shape, +right_fill: F32, +right_ops: List<&2, StorageLaws.Op>, +hb: List<&2, Api.Effect>, +dr: Nat, +fb: F32, +count: Nat, +lsrc: Source<left, left_fill, left_ops, ha, dl, fa>, +rsrc: Source<right, right_fill, right_ops, hb, dr, fb>,
668 +output: Shape.Shape, +rows: Nat,
669 +left_extents: {Shape.extents(left) == [rows, span] : List<&2, Nat>},
670 +right_extents: {Shape.extents(right) == [span, columns] : List<&2, Nat>},
671 +output_extents: {Shape.extents(output) == [rows, columns] : List<&2, Nat>},
672 +count_exact: {count == Shape.logical_numel(Shape.dimensions(output)) : Nat}, +base: Nat, low: F32 & Array<F32> & Array<F32>,
673 leaf_facts: TreeEq(span, columns, left, left_fill, left_ops, ha, dl, fa, right, right_fill, right_ops, hb, dr, fb, count, 0n, base, Parallel.leaf(~(Array<F32> & Array<F32>), low))) ->
674 TreeEq(span, columns, left, left_fill, left_ops, ha, dl, fa, right, right_fill, right_ops, hb, dr, fb, count, 1n, base, Parallel.pair(~Matrix.Dims, ~Array<F32>, ~Array<F32>, ~Matrix.cell_at, Matrix.dims(Matrix.Dims{span, columns}), count, base, low)):
675 (x, inputs) = low
676 (la, ra) = inputs
677 (ex, kept) = leaf_facts
678 (el, er) = kept
679 %Equal.sym(Array<F32>, la, Api.arr(ha, dl, fa), el) :
680 TreeEq(span, columns, left, left_fill, left_ops, ha, dl, fa, right, right_fill, right_ops, hb, dr, fb, count, 1n, base, Parallel.pair_join(~(Array<F32> & Array<F32>), x, Matrix.cell_at(Matrix.dims(Matrix.Dims{span, columns}), Nat.add(1n, base), (_, ra), Nat.is_lt(Nat.add(1n, base), count))))
681 %Equal.sym(Array<F32>, ra, Api.arr(hb, dr, fb), er) :
682 TreeEq(span, columns, left, left_fill, left_ops, ha, dl, fa, right, right_fill, right_ops, hb, dr, fb, count, 1n, base, Parallel.pair_join(~(Array<F32> & Array<F32>), x, Matrix.cell_at(Matrix.dims(Matrix.Dims{span, columns}), Nat.add(1n, base), (Api.arr(ha, dl, fa), _), Nat.is_lt(Nat.add(1n, base), count))))
683 pair_join_eq(span, columns, left, left_fill, left_ops, ha, dl, fa, right, right_fill, right_ops, hb, dr, fb, count, base, x, Matrix.cell_at(Matrix.dims(Matrix.Dims{span, columns}), Nat.add(1n, base), (Api.arr(ha, dl, fa), Api.arr(hb, dr, fb)), Nat.is_lt(Nat.add(1n, base), count)), ex,
684 cell_eq(span, columns, left, left_fill, left_ops, ha, dl, fa, right, right_fill, right_ops, hb, dr, fb, count, lsrc, rsrc, output, rows, left_extents, right_extents, output_extents, count_exact, Nat.add(1n, base), Nat.is_lt(Nat.add(1n, base), count), {==}))