MatmulParallelProof.cell_keeps: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/matmul_parallel_proof.bend as MatmulParallelProof Lines 188-214 of bendtorch-core@0.1.0.0/src/tensor/matmul_parallel_proof.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_parallel_proof.bend&start_line=188&end_line=214 import Base import bendtorch-core@0.1.0.0/src/storage/model.bend as Model import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matrix import bendtorch-core@0.1.0.0/src/tensor/elementwise_parallel_proof.bend as Parallel # Every cell hands both input arrays back. def cell_keeps(+dl: Nat, +dr: Nat, A: Array, B: Array, +inner: Nat, +columns: Nat, +position: Nat, inside: Bool, -left_valid: Model.Balanced(F32, dl, A), -right_valid: Model.Balanced(F32, dr, B)) -> Parallel.Fact<{Pair.snd(F32, Array & Array, cell_of(inner, columns, position, A, B, inside)) == (A, B) : Array & Array}>: match inside: case False{}: Parallel.Fact{{==}} case True{}: Parallel.Fact{{\{DotRun: values => logical => fold => left_kept => right_kept => Equal.trans(Array & Array, Pair.snd(F32, Array & Array, cell_of(inner, columns, position, A, B, True{})), (Pair.fst(Array, Array, Pair.snd(F32, Array & Array, cell_of(inner, columns, position, A, B, True{}))), Pair.snd(Array, Array, Pair.snd(F32, Array & Array, cell_of(inner, columns, position, A, B, True{})))), (A, B), eta(Array, Array, Pair.snd(F32, Array & Array, cell_of(inner, columns, position, A, B, True{}))), Parallel.pair_equal(Pair.fst(Array, Array, Pair.snd(F32, Array & Array, cell_of(inner, columns, position, A, B, True{}))), Pair.snd(Array, Array, Pair.snd(F32, Array & Array, cell_of(inner, columns, position, A, B, True{}))), A, B, left_kept, right_kept))} : DotRun -> {Pair.snd(F32, Array & Array, cell_of(inner, columns, position, A, B, True{})) == (A, B) : Array & Array}}( {\{Parallel.Fact: p => p} : Parallel.Fact> -> DotRun}( dot_run(inner, dl, dr, A, B, inner, columns, Matrix.row_of(columns, position), Matrix.column_of(columns, position), 0n, 0.0, A, B, {==}, {==}, left_valid, right_valid)))} Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair.fst https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair.snd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/model.bend&name=Balanced https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise_parallel_proof.bend&name=Fact https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise_parallel_proof.bend&name=pair_equal https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&name=column_of https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul.bend&name=row_of https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_parallel_proof.bend&name=DotRun https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_parallel_proof.bend&name=cell_of https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_parallel_proof.bend&name=dot_run https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_parallel_proof.bend&name=eta