ReductionPROOF.sum_decision_status: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/reduction_PROOF.bend as ReductionPROOF Lines 771-788 of bendtorch-core@0.1.0.0/src/tensor/reduction_PROOF.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/reduction_PROOF.bend&start_line=771&end_line=788 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/reduction.bend as Reduction import bendtorch-core@0.1.0.0/src/tensor/math_totality.bend as Totality import bendtorch-core@0.1.0.0/src/tensor/transform_LAWS.bend as TransformLaws import bendtorch-core@0.1.0.0/src/tensor/transform_totality.bend as TransformTotality def sum_decision_status(+fuel: Nat, +shape: Shape.Shape, +cursor: Nat, +accumulator: F32, decision: Shape.BoolCase, tensor: Core.Tensor, -exact: {U32.to_nat(U32.from_nat(cursor)) == cursor : Nat}, -inside: {Nat.is_lt(U32.to_nat(U32.from_nat(cursor)), Shape.logical_numel(Shape.dimensions(shape))) == True{} : Bool}, -rec: @tensor: Core.Tensor -> @+value: F32 -> Totality.Status & F32, Reduction.natural_sum_loop(fuel, shape, tensor, 1n+cursor, value)>) -> Totality.Status & F32, Reduction.sum_decided(shape, tensor => value => Reduction.natural_sum_loop(fuel, shape, tensor, 1n+cursor, value), tensor, cursor, U32.from_nat(cursor), accumulator, decision)>: match decision: case Shape.BFalse{equal}: Totality.Status{Empty.absurd({False{} == True{} : Bool}, conversion_clash(U32.to_nat(U32.from_nat(cursor)), cursor, exact, equal))} case Shape.BTrue{equal}: sum_read_status(fuel, shape, cursor, accumulator, Core.read_flat(shape, tensor, U32.from_nat(cursor)), {\{TransformTotality.ReadSuccess: successful => successful} : TransformTotality.ReadSuccess -> {TransformTotality.read_succeeded(shape, Core.read_flat(shape, tensor, U32.from_nat(cursor))) == True{} : Bool}}( TransformLaws.tensor_read_valid_success(shape, tensor, U32.from_nat(cursor), inside)), rec) Uses (24): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd 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=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair 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=bendtorch-core@0.1.0.0/src/shape/core.bend&name=BoolCase 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=dimensions https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=logical_numel 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=read_flat https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/math_totality.bend&name=Status https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/reduction.bend&name=natural_sum_loop https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/reduction.bend&name=sum_decided https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/reduction_PROOF.bend&name=conversion_clash https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/reduction_PROOF.bend&name=sum_read_status https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/transform_LAWS.bend&name=tensor_read_valid_success https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/transform_totality.bend&name=ReadSuccess https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/transform_totality.bend&name=read_succeeded