def absent_observation
bendtorch-core@0.1.0.0 · src/autograd/reduce_PROOF.bend:537
import bendtorch-core@0.1.0.0/src/autograd/reduce_PROOF.bend as ReducePROOF
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/lifecycle.bend as Lifecycle
537def absent_observation(+shape: Shape.Shape, tensor: Core.Tensor<shape>, +source: U32,
538 -outside: {Nat.is_lt(U32.to_nat(source), Shape.logical_numel(Shape.dimensions(shape))) == False{} : Bool}) ->
539 Holds<{Core.checked_observe(shape, tensor, source) == None{} : Maybe<&2, F32>}>:
540 Core.TTensor{storage, exact} = tensor
541 match storage:
542 case Storage.Empty{}:
543 Holds{{==}}
544 case Storage.Owned{+depth, +length, array, balanced, valid}:
545 Holds{
546 %Equal.sym(Bool, Nat.is_lt(U32.to_nat(source), length), False{},
547 %Equal.sym(Nat, length, Shape.logical_numel(Shape.dimensions(shape)), exact) : {Nat.is_lt(U32.to_nat(source), _) == False{} : Bool}
548 outside) : {Lifecycle.observe_allowed(depth, length, array, source, _) == None{} : Maybe<&2, F32>}
549 {==}}