def pw
import bend-collections-laws-math@1.0.0.0/proofs/lib/word.bend as Wordimport Base
321# 2^k as an n-bit word
322def pw(+n: Nat, +k: Nat) -> Word(n):
323 match n k:
324 case 0n _:
325 WNil{}
326 case 1n+p 0n:
327 WCon{True{}, Word.zero(p)}
328 case 1n+p 1n+j:
329 WCon{False{}, pw(p, j)}
Uses (6)
Used by (60)
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64bits:pwv
- bend-collections-laws-math@1.0.0.0/proofs/math/u64/u64div:pow32
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64bits:ef_g
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64norm:hid
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64mul:h16
- …