def no_wrap

stelliferous@0.0.2.0 · proofs/storage_readback.bend:122

import stelliferous@0.0.2.0/proofs/storage_readback.bend as StorageReadback
import Base
import stelliferous@0.0.2.0/proofs/storage_tree_model.bend as Tree
import stelliferous@0.0.2.0/proofs/storage_shape.bend as Shape
import stelliferous@0.0.2.0/proofs/storage_address_bounds.bend as Address
import stelliferous@0.0.2.0/proofs/word_power_of_two.bend as Power

122def no_wrap(~Element: Data,+depth: Nat,+tree: Tree.Tree<Element>,+index: U32,+balanced: Shape.Balanced(Element,depth,tree),
123  inside: {U32.is_lt(index,Tree.capacity(Element,tree)) == True{} : Bool}) ->
124  {U32.and(index,U32.sub(Tree.capacity(Element,tree),1)) == index : U32}:
125  %Equal.sym(U32,Tree.capacity(Element,tree),Address.capacity(depth),Shape.capacity(Element,depth,tree,balanced)) :
126    {U32.and(index,U32.sub(_,1)) == index : U32}
127  Power.native_mask_preserves_bounded(depth,index)(
128    %Shape.capacity(Element,depth,tree,balanced) : {U32.is_lt(index,_) == True{} : Bool}
129    inside)

Uses (13)

Used by (1)