def write_success
bendtorch-core@0.1.0.0 · src/autograd/gradient_PROOF.bend:598
import bendtorch-core@0.1.0.0/src/autograd/gradient_PROOF.bend as GradientPROOF
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/transform_totality.bend as TransformTotality
import bendtorch-core@0.1.0.0/src/autograd/gradient.bend as Gradient
598def write_success(-shape: Shape.Shape, owner: Core.Dynamic, pair: Core.Tensor<shape> & Result<&2, &2, Core.Error, Unit>,
599 -successful: {TransformTotality.write_succeeded(shape, pair) == True{} : Bool}) ->
600 Holds<{step_continued(shape, Gradient.step_write(shape, owner, pair)) == True{} : Bool}>:
601 (total, result) = pair
602 match result:
603 case Fail{error}:
604 Holds{Empty.absurd({False{} == True{} : Bool}, Arith.clash(successful))}
605 case Done{unit}:
606 Holds{{==}}