def is_zero
import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/wide.bend as Wideimport Base
30def is_zero(n: Nat, w: Word(n)) -> Bool:
31 match n:
32 case 0n:
33 True{}
34 case 1n+p:
35 match w:
36 case WCon{b, tail}:
37 Bool.not(b) && is_zero(p, tail)
Uses (6)
Used by (11)
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/src/time:is_zero
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/negation_magnitude:carry_complement
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/negation_magnitude:magnitude
- bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/numeric:zero_comparison_correspondence
- bend-collections-laws-math@1.0.0.0/proofs/math/u64/u64div:is_zero_eq
- …