def pow2
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as Commonimport Base
6# 2^k as a natural number.
7def pow2(k: Nat) -> Nat:
8 match k:
9 case 0n:
10 1n
11 case 1n+p:
12 Nat.double(pow2(p))
Uses (2)
Used by (199)
- bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/width:lt_of_fits
- bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/width:fits_of_lt
- bend-collections-laws-crypto@1.0.0.0/proofs/lib/u32:to_nat_from_nat
- bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/width:shift_one
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake3:tree
- …