TensorAccessCertificate.last_of_run: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/tensor_access_certificate.bend as TensorAccessCertificate Lines 32-44 of stelliferous@0.0.2.0/proofs/tensor_access_certificate.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/tensor_access_certificate.bend&start_line=32&end_line=44 import Base import stelliferous@0.0.2.0/tensor_access.bend as Access import stelliferous@0.0.2.0/traversal_array.bend as Traversal import stelliferous@0.0.2.0/tensor_cursor.bend as Cursor import stelliferous@0.0.2.0/proofs/traversal_witness.bend as TraversalWitness # A strided operation keeps its owners through each part of a run: the stride # steps, the state handed to the cursor, and the cursor step that ends the run. # The lemmas are generic in the two element steps and in the evidence that # each of them keeps. def last_of_run(~Element: Data,+depth: Nat,extent: Nat,stride: U32,rewind: U32,rest: Cursor.Depth1(),-input: Array, -state: Traversal.State<&1,&1,Array,Array,Cursor.Stride>, evidence: TraversalWitness.StateEvidence,Element,Cursor.Stride,input,depth,state>) -> TraversalWitness.StateEvidence,Element,Cursor.Cursor,input,depth,Access.last_of_run(~Element,extent,stride,rewind,rest,state)>: match evidence: case TraversalWitness.StateEvidence{output,position,Cursor.Stride{address,step},equation,output_evidence}: %Equal.sym(Traversal.State<&1,&1,Array,Array,Cursor.Stride>,state,Traversal.State{input,output,position,Cursor.Stride{address,step}},equation) : TraversalWitness.StateEvidence,Element,Cursor.Cursor,input,depth,Access.last_of_run(~Element,extent,stride,rewind,rest,_)> TraversalWitness.StateEvidence{output,position,Cursor.Cursor{Cursor.Level{Cursor.Axis{extent,1n,stride,rewind},rest},address},{==},output_evidence} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/traversal_witness.bend&name=StateEvidence https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_access.bend&name=last_of_run https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&name=Axis https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&name=Cursor https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&name=Depth1 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&name=Level https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_cursor.bend&name=Stride https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/traversal_array.bend&name=State