src/tensor/construction_contract_LAWS.bend open laws/TODOs
raw source on the hub · import bendtorch-core@0.1.0.0/src/tensor/construction_contract_LAWS.bend as Construction_contract_LAWS
6 imports
import Base import ../shape/core.bend as Shape import ./core.bend as Core import ./allocation_spec.bend as Allocation import ./observation.bend as Observation import ./construction_metadata.bend as Metadata
Laws
law new_metadata provedin PROOF.bendsource · line 21 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+fill:F32 -> 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/construction_metadata.NewMetadata<shape, fill>
law new_reads provedin PROOF.bendsource · line 26 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+fill:F32 -> @+index:U32 -> @inside:{Nat.is_lt(U32.to_nat(index), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))) == True{} : Bool} -> NewReads<shape, fill, index>
Types
type NewReads source · line 8 · raw
@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> Type
NewReads@-shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @-fill:F32 -> @-index:U32 -> @successful:{Result.is_done(&2, &1, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Error, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.Tensor<shape>, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == True{} : Bool} -> @dimensions:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.dimensions(shape, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape)} : Maybe<&2, List<&2, U32>>} -> @count:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/allocation_spec.tensor_length(shape, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))} : Maybe<&2, Nat>} -> @word_count:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.count(shape, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.count(shape)} : Maybe<&2, U32>} -> @value:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.point(shape, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>} -> @retained_dimensions:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.after_dimensions(shape, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape)} : Maybe<&2, List<&2, U32>>} -> @retained_count:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.after_length(shape, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))} : Maybe<&2, Nat>} -> @retained_word_count:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.after_count(shape, index, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.count(shape)} : Maybe<&2, U32>} -> @retained_value:(@+other:U32 -> @inside:{Nat.is_lt(U32.to_nat(other), 0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.logical_numel(0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.dimensions(shape))) == True{} : Bool} -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/observation.after_value(shape, index, other, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/core.new(shape, fill)) == Some{fill} : Maybe<&2, F32>}) -> NewReads<shape, fill, index>