Memory.levels_go: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/memory.bend as Memory Lines 48-56 of bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/memory.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/memory.bend&start_line=48&end_line=56 import Base # The smallest k >= k0 with 2^k >= n. def levels_go(fuel: Nat, +n: Nat, +k: Nat, done: Bool) -> Nat: match fuel done: case _ True{}: k case 0n False{}: k case 1n+f False{}: levels_go(f, n, 1n+k, Nat.is_le(n, pw(1n+k))) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/memory.bend&name=pw