CoreModel.next_word: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/sha/packed/core_model.bend as CoreModel Lines 23-31 of bend-collections-laws-crypto@1.0.0.0/proofs/crypto/sha/packed/core_model.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/sha/packed/core_model.bend&start_line=23&end_line=31 import Base import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/packed/core.bend as Runtime # Schedule histories always contain at least 16 words. Destructuring that prefix # avoids four independent linked-list walks for every expanded word; the fallback # preserves the total behavior used by the universal refinement theorem. def next_word(+history: List<&2, U32>) -> U32: match history: case a <> b <> c <> d <> e <> f <> g <> h <> i <> j <> k <> l <> m <> n <> o <> (p <> rest): (Runtime.small1(b) + g + Runtime.small0(o) + p : U32) case _: next_word_slow(history) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/sha/packed/core_model.bend&name=next_word_slow https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/packed/core.bend&name=small0 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/packed/core.bend&name=small1