src/autograd/sum_to_size_PROOF.bend checks
raw source on the hub · import bendtorch-core@0.1.0.0/src/autograd/sum_to_size_PROOF.bend as Sum_to_size_PROOF
14 imports
import Base import ../shape/core.bend as Shape import ../storage/arith.bend as Arith import ../tensor/core.bend as Core import ../tensor/layout.bend as Layout import ../tensor/elementwise_totality.bend as Totality import ../tensor/construction_LAWS.bend as ConstructionLaws import ../tensor/construction_PROOF.bend as ConstructionProof import ../tensor/transform_PROOF.bend as TransformProof import ./reduce.bend as Reduce import ./reduce_LAWS.bend as ReduceLaws import ./reduce_PROOF.bend as ReduceProof import ./sum_to_size.bend as SumToSize import ./sum_to_size_LAWS.bend as Laws
Types
type Holds source · line 16 · raw
@-P:Type -> Data
Holds@-P:Type -> @-proof:P -> Holds<P>
Definitions
def FirstKept source · line 19 · raw
@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-original:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> @pair:Pair(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape>, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape>) -> Type
def SecondKept source · line 23 · raw
@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-original:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> @pair:Pair(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape>, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape>) -> Type
def first_kept source · line 27 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @original:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> Holds<FirstKept(shape, original, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.clone(shape, original))>
def second_kept source · line 33 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @original:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> Holds<SecondKept(shape, original, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.clone(shape, original))>
def first_property source · line 39 · raw
@+property:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/elementwise_totality.Property -> @-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-original:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> @-first:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> @checked:(@+index:U32 -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.checked_observe(shape, first, index) == 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.checked_observe(shape, original, index) : Maybe<&2, F32>}) -> @model:(@+index:U32 -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.observe(shape, first, index) == 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.observe(shape, original, index) : Maybe<&2, F32>}) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/elementwise_totality.inspect(property, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Packed{shape, first}) == 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/elementwise_totality.inspect(property, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Packed{shape, original}) : 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/elementwise_totality.Inspection}
def cloned_retains source · line 53 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-original:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> @pair:Pair(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape>, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape>) -> @-kept:FirstKept(shape, original, pair) -> 0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/reduce_LAWS.Retained<0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Packed{shape, original}, 0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/sum_to_size.cloned(shape, pair)>
def decided_retains source · line 60 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @tensor:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> @+target:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @same:Bool -> 0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/reduce_LAWS.Retained<0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Packed{shape, tensor}, 0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/sum_to_size.decided(shape, tensor, target, same)>
def cloned_identity source · line 74 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-original:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> @+target:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @pair:Pair(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape>, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape>) -> @-same:{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(target) : List<&2, U32>} -> @-kept:SecondKept(shape, original, pair) -> Holds<0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/sum_to_size_LAWS.Identity(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Packed{shape, original}, target, 0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/sum_to_size.cloned(shape, pair))>
def decided_identity source · line 81 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @tensor:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> @+target:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @flag:Bool -> @-decided:{flag == 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/layout.words_same(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(target)) : Bool} -> @-same:{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(target) : List<&2, U32>} -> Holds<0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/sum_to_size_LAWS.Identity(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Packed{shape, tensor}, target, 0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/sum_to_size.decided(shape, tensor, target, flag))>
def decided_reduces source · line 105 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @tensor:0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape> -> @+target:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @flag:Bool -> @decided:{flag == 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/layout.words_same(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(target)) : Bool} -> @differ:(@_:{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape) == 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(target) : List<&2, U32>} -> Empty) -> {0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/sum_to_size.decided(shape, tensor, target, flag) == 0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/reduce.reduce_to(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Packed{shape, tensor}, target) : Pair(0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Dynamic, Result<&2, &1, 0x1689e5deb278c16abd3bd45eac101ef3/src/autograd/reduce.Error, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Dynamic>)}