def pow2u
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/u32.bend as U32import Base
153# 2^d as the U32 built by Base Array.size (1, then shl per level).
154def pow2u(d: Nat) -> U32:
155 match d:
156 case 0n:
157 1
158 case 1n+p:
159 U32.shl(pow2u(p))
Uses (3)
Used by (12)
- bend-collections-laws-crypto@1.0.0.0/proofs/lib/u32:pow2u_value
- bend-collections-laws-crypto@1.0.0.0/proofs/lib/array:get
- bend-collections-laws-crypto@1.0.0.0/proofs/lib/array:lt_bridge
- bend-collections-laws-crypto@1.0.0.0/proofs/lib/array:size_thaw
- bend-collections-laws-crypto@1.0.0.0/proofs/lib/array:sub_bridge
- …