CorePROOF.step_left_certificate: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend as CorePROOF Lines 581-607 of bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend&start_line=581&end_line=607 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/elementwise.bend as Elementwise def step_left_certificate(+operation: Elementwise.Operation, +plan: Shape.BroadcastPlan, +index: U32, -original_left: Core.Dynamic, original_right: Core.Dynamic, original_output: Core.Tensor, +left_index: U32, +right_index: U32, -indices_exact: {Done{(left_index, right_index)} == Elementwise.input_indices(plan, index) : Result<&2, &1, Core.Error, U32 & U32>}, lift: @-result: Elementwise.Step -> {result == Elementwise.step_left(operation, Shape.output_shape(plan), index, original_right, original_output, right_index, Core.read_dynamic(original_left, left_index)) : Elementwise.Step} -> {result == Elementwise.step(operation, plan, index, Elementwise.State{original_left, original_right, original_output}) : Elementwise.Step}, certificate: Core.DynamicRead) -> Elementwise.StepCertificate: Core.DynamicRead{left, result, exact} = certificate match result: case Fail{error}: Elementwise.StepCertificate{Elementwise.Stop{left, original_right, error}, lift(Elementwise.Stop{left, original_right, error}, Equal.cong(Core.Dynamic & Result<&2, &2, Core.Error, F32>, Elementwise.Step, pair => Elementwise.step_left(operation, Shape.output_shape(plan), index, original_right, original_output, right_index, pair), (left, Fail{error}), Core.read_dynamic(original_left, left_index), exact)), Unit{}} case Done{+left_value}: step_right_certificate(operation, plan, index, original_left, original_right, left_index, right_index, left_value, indices_exact, Core.dynamic_read_certificate(original_right, right_index), original_output, left, exact, result => equality => lift(result, Equal.trans(Elementwise.Step, result, Elementwise.step_left(operation, Shape.output_shape(plan), index, original_right, original_output, right_index, (left, Done{left_value})), Elementwise.step_left(operation, Shape.output_shape(plan), index, original_right, original_output, right_index, Core.read_dynamic(original_left, left_index)), equality, Equal.cong(Core.Dynamic & Result<&2, &2, Core.Error, F32>, Elementwise.Step, pair => Elementwise.step_left(operation, Shape.output_shape(plan), index, original_right, original_output, right_index, pair), (left, Done{left_value}), Core.read_dynamic(original_left, left_index), exact)))) Uses (24): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.cong 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=Pair 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=Unit https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=BroadcastPlan https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=output_shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Dynamic https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=DynamicRead https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Error 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=dynamic_read_certificate https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=read_dynamic https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend&name=step_right_certificate https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=Operation https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=State https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=Step https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=StepCertificate https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=input_indices https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=step https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=step_left