CoreModel.suffix: 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 198-204 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=198&end_line=204 import Base # SHA-256 round t (16 <= t < 64) with its constant as a literal. Like # window_rounds, q bounds the remaining rounds (48 for SHA-256) and each round # derives its schedule word from the rolling window before continuing with # round t+1. Defined last-to-first because names must precede use. def suffix(+n: Nat) -> List<&2, U32>: 128 <> List.append(&2, U32, List.replicate(U32, Nat.mod(Nat.sub(119n, Nat.mod(n, 64n)), 64n), 0), bit_length(n)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.replicate https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/sha/packed/core_model.bend&name=bit_length