def power
import stelliferous@0.0.2.0/proofs/word_power_of_two.bend as WordPowerOfTwoimport Base
6def power(+width: Nat,depth: Nat) -> Word(width):
7 match width:
8 case 0n:
9 WNil{}
10 case 1n+rest:
11 match depth:
12 case 0n:
13 WCon{True{},Word.zero(rest)}
14 case 1n+previous:
15 WCon{False{},power(rest,previous)}
Uses (6)
Used by (17)
- stelliferous@0.0.2.0/proofs/word_power_of_two:native_power
- stelliferous@0.0.2.0/proofs/storage_address_bounds:capacity_value
- stelliferous@0.0.2.0/proofs/word_power_of_two:native_power_bound
- stelliferous@0.0.2.0/proofs/word_power_of_two:power_monotone
- stelliferous@0.0.2.0/proofs/word_power_of_two:decrement_power
- …