def wordix
import bend-collections@1.0.0.0/src/containers/bitset.bend as Bitsetimport Base
127# The word index of bit i and the bit position inside that word. Base's
128# Nat.div / Nat.mod are structural definitions the proofs can peel 32 steps
129# at a time (proofs/bitset/index.bend) and the native backend evaluates in
130# constant time.
131def wordix(i: Nat) -> Nat:
132 Nat.div(i, 32n)