StorageReadback.fetch_node: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/storage_readback.bend as StorageReadback Lines 31-47 of stelliferous@0.0.2.0/proofs/storage_readback.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/storage_readback.bend&start_line=31&end_line=47 import Base import stelliferous@0.0.2.0/proofs/storage_tree_model.bend as Tree def fetch_node(~Element: Data,+left: Tree.Tree,+right: Tree.Tree,+capacity: U32,+index: U32,+value: Element,choice: Bool, choice_equal: {U32.is_lt(index,U32.shr(capacity)) == choice : Bool}, left_read: {Tree.fetch(Element,Tree.store(Element,left,U32.shr(capacity),index,value),U32.shr(capacity),index) == value : Element}, right_read: {Tree.fetch(Element,Tree.store(Element,right,U32.shr(capacity),(index - U32.shr(capacity) : U32),value),U32.shr(capacity),(index - U32.shr(capacity) : U32)) == value : Element}) -> {Tree.fetch(Element,Bool.pick(Tree.Tree,choice,Tree.Node{Tree.store(Element,left,U32.shr(capacity),index,value),right}, Tree.Node{left,Tree.store(Element,right,U32.shr(capacity),(index - U32.shr(capacity) : U32),value)}),capacity,index) == value : Element}: match choice: case True{}: %Equal.sym(Bool,U32.is_lt(index,U32.shr(capacity)),True{},choice_equal) : {Bool.pick(Element,_,Tree.fetch(Element,Tree.store(Element,left,U32.shr(capacity),index,value),U32.shr(capacity),index), Tree.fetch(Element,right,U32.shr(capacity),(index - U32.shr(capacity) : U32))) == value : Element} left_read case False{}: %Equal.sym(Bool,U32.is_lt(index,U32.shr(capacity)),False{},choice_equal) : {Bool.pick(Element,_,Tree.fetch(Element,left,U32.shr(capacity),index), Tree.fetch(Element,Tree.store(Element,right,U32.shr(capacity),(index - U32.shr(capacity) : U32),value),U32.shr(capacity),(index - U32.shr(capacity) : U32))) == value : Element} right_read Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shr https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_tree_model.bend&name=Tree https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_tree_model.bend&name=fetch https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_tree_model.bend&name=store