src/tensor/contracts/words_proof.bend open laws/TODOs
raw source on the hub · import bendtorch-core@0.1.0.0/src/tensor/contracts/words_proof.bend as Words_proof
7 imports
import Base import ../../shape/core.bend as Shape import ../../storage/LAWS.bend as StorageLaws import ./replayed.bend as Replayed import ./pointwise.bend as Pointwise import ./pointwise_proof.bend as PointwiseProof import ./LAWS.bend as Laws
Definitions
def words_snoc source · line 10 · raw
@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+fill:F32 -> @+ops:List<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/LAWS.Op> -> @+previous:Nat -> @+word:F32 -> @+other:F32 -> @+before:List<&2, F32> -> @rest:{0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/contracts/LAWS.words(shape, fill, ops, previous) == before : List<&2, F32>} -> @last:{word == other : F32} -> {List.append(&2, F32, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/contracts/LAWS.words(shape, fill, ops, previous), [word]) == List.append(&2, F32, before, [other]) : List<&2, F32>}A word appended to two equal word lists, equal words, gives equal lists.
def snoc_equal source · line 36 · raw
@+before:List<&2, F32> -> @+after:List<&2, F32> -> @+word:F32 -> @+other:F32 -> @rest:{before == after : List<&2, F32>} -> @last:{word == other : F32} -> {List.append(&2, F32, before, [word]) == List.append(&2, F32, after, [other]) : List<&2, F32>}Equal lists with equal words appended are equal.
Templates
template words_reads source · line 21 · raw
@-P:Data -> @-map:(@_:P -> @_:Nat -> Nat) -> @+plan:P -> @+reads:Nat -> @+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+fill:F32 -> @+ops:List<&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/LAWS.Op> -> @+count:Nat -> {0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/contracts/LAWS.words(shape, fill, List.append(&2, 0x1689e5deb278c16abd3bd45eac101ef3/src/storage/LAWS.Op, ops, 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/contracts/pointwise.reads(P, map, plan, reads)), count) == 0x1689e5deb278c16abd3bd45eac101ef3/src/tensor/contracts/LAWS.words(shape, fill, ops, count) : List<&2, F32>}Reads appended to a history list the same words.