def meaning_from
bendtorch-core@0.1.0.0 · src/tensor/reduction_PROOF.bend:439
import bendtorch-core@0.1.0.0/src/tensor/reduction_PROOF.bend as ReductionPROOF
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/reduction_LAWS.bend as Laws
439def meaning_from(-shape: Shape.Shape, -fuel: Nat, -tensor: Core.Tensor<shape>, values: List<&2, F32>,
440 logical: Laws.LogicalValues(fuel, shape, tensor, 0n, values), result: Result<&2, &1, Core.Error, Core.Tensor<shape> & F32>,
441 value: {Laws.loop_value(shape, result) == Some{Reduction.sequential_sum(values, 0.0)} : Maybe<&2, F32>}) ->
442 Laws.LoopMeaning(fuel, shape, tensor, 0n, 0.0, result):
443 match result:
444 case Fail{error}:
445 Unit{}
446 case Done{pair}:
447 (retained, +sum) = pair
448 Laws.SumMeaning{values, logical, some_injective(sum, Reduction.sequential_sum(values, 0.0), value)}