MatmulPROOF.advance_prefix: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/matmul_PROOF.bend as MatmulPROOF Lines 341-365 of bendtorch-core@0.1.0.0/src/tensor/matmul_PROOF.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_PROOF.bend&start_line=341&end_line=365 import 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_LAWS.bend as Laws def advance_prefix(+inner: U32, +left: Shape.Shape, +right: Shape.Shape, -a: Core.Tensor, -b: Core.Tensor, -before_a: Core.Tensor, -before_b: Core.Tensor, -after_a: Core.Tensor, -after_b: Core.Tensor, +output: Shape.Shape, -before: Core.Tensor, -after: Core.Tensor, +cursor: Nat, +row: U32, +column: U32, +coordinate: Shape.CheckedCoordinate, +value: F32, -decoded: {Shape.unflatten_checked(output, U32.from_nat(cursor)) == Done{coordinate} : Result<&2, &2, Shape.Error, Shape.CheckedCoordinate>}, -coordinates: {Shape.coordinate_values(output, coordinate) == [row, column] : List<&2, U32>}, -word_exact: {U32.to_nat(U32.from_nat(cursor)) == cursor : Nat}, prefix: Laws.ProductPrefix, dot: Laws.DotMeaning, update: Core.CheckedUpdateMeaning(output, before, U32.from_nat(cursor), value, (after, Done{Unit{}}))) -> Laws.ProductPrefix: Laws.ProductPrefix{left_prior, right_prior, cells} = prefix Laws.DotMeaning{factors, logical, fold, left_kept, right_kept} = dot (checked, pair) = update (observed, frame) = pair Laws.ProductPrefix{other => Equal.trans(Maybe<&2, F32>, Core.checked_observe(left, after_a, other), Core.checked_observe(left, before_a, other), Core.checked_observe(left, a, other), left_kept(other), left_prior(other)), other => Equal.trans(Maybe<&2, F32>, Core.checked_observe(right, after_b, other), Core.checked_observe(right, before_b, other), Core.checked_observe(right, b, other), right_kept(other), right_prior(other)), position => earlier => prefix_cell_case(inner, left, right, a, b, output, after, cursor, position, Laws.ProductCell{row, column, coordinate, decoded, coordinates, word_exact, factors, logical_dot_original(U32.to_nat(inner), left, right, a, b, before_a, before_b, row, column, 0n, factors, logical, left_prior, right_prior), value, fold, checked, observed}, position => earlier => frame_cell(inner, left, right, a, b, output, before, after, cursor, position, cells(position, earlier), word_exact, earlier, frame), earlier_split(position, cursor, earlier))} Uses (26): 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=CheckedCoordinate https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=coordinate_values https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=unflatten_checked https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=CheckedUpdateMeaning https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Tensor https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=checked_observe https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_LAWS.bend&name=DotMeaning https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_LAWS.bend&name=ProductCell https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_LAWS.bend&name=ProductPrefix https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_PROOF.bend&name=earlier_split https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_PROOF.bend&name=frame_cell https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_PROOF.bend&name=logical_dot_original https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/matmul_PROOF.bend&name=prefix_cell_case