WordPowerOfTwo.nonempty_power_depth: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/proofs/word_power_of_two.bend as WordPowerOfTwo Lines 327-337 of stelliferous@0.0.2.0/proofs/word_power_of_two.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/proofs/word_power_of_two.bend&start_line=327&end_line=337 import Base import stelliferous@0.0.2.0/proofs/word_encoding.bend as WordEncoding # A nonempty checked owner cannot have a power-of-two capacity truncated to # zero. This recovers the full machine-depth bound from its existing guard. def nonempty_power_depth(+width: Nat,+depth: Nat,positive: {Nat.is_lt(0n,Word.to_nat(width,power(width,depth))) == True{} : Bool}) -> {Nat.is_lt(depth,width) == True{} : Bool}: match width: case 0n: Empty.absurd({Nat.is_lt(depth,0n) == True{} : Bool},WordEncoding.false_true(positive)) case 1n+ +rest: match depth: case 0n: {==} case 1n+ +previous: nonempty_power_depth(rest,previous,positive_double(Word.to_nat(rest,power(rest,previous)),positive)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.to_nat https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/word_encoding.bend&name=false_true https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/word_power_of_two.bend&name=positive_double https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/word_power_of_two.bend&name=power