PROOF.un.and_zero: def of bend-osdev-u32@0.1.0.0 Import: import bend-osdev-u32@0.1.0.0/PROOF.bend as PROOF Lines 2171-2180 of bend-osdev-u32@0.1.0.0/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&start_line=2171&end_line=2180 import Base import bend-osdev-u32@0.1.0.0/u32.bend as U def un.and_zero(n: Nat, +w: Word(n), +m: Word(n), hm: {Word.to_nat(n, m) == 0n : Nat}) -> {Word.to_nat(n, Word.and(n, w, m)) == 0n : Nat}: match n: case 0n: {==} case 1n+ +p: match w m: case WCon{+x, +wt} WCon{True{}, +mt}: Empty.absurd({Word.to_nat(1n+p, Word.and(1n+p, WCon{x, wt}, WCon{True{}, mt})) == 0n : Nat}, un.sz(Nat.double(Word.to_nat(p, mt)), hm)) case WCon{+x, +wt} WCon{False{}, +mt}: Equal.trans(Nat, Word.to_nat(1n+p, WCon{Bool.and(x, False{}), Word.and(p, wt, mt)}), Nat.add(U.U32Nat.bit(False{}), Nat.double(0n)), 0n, Equal.trans(Nat, Word.to_nat(1n+p, WCon{Bool.and(x, False{}), Word.and(p, wt, mt)}), Nat.add(U.U32Nat.bit(False{}), Nat.double(Word.to_nat(p, Word.and(p, wt, mt)))), Nat.add(U.U32Nat.bit(False{}), Nat.double(0n)), Equal.trans(Nat, Word.to_nat(1n+p, WCon{Bool.and(x, False{}), Word.and(p, wt, mt)}), Nat.add(U.U32Nat.bit(Bool.and(x, False{})), Nat.double(Word.to_nat(p, Word.and(p, wt, mt)))), Nat.add(U.U32Nat.bit(False{}), Nat.double(Word.to_nat(p, Word.and(p, wt, mt)))), un.wc(p, Bool.and(x, False{}), Word.and(p, wt, mt)), Equal.cong(Nat, Nat, zz => Nat.add(zz, Nat.double(Word.to_nat(p, Word.and(p, wt, mt)))), U.U32Nat.bit(Bool.and(x, False{})), U.U32Nat.bit(False{}), Equal.cong(Bool, Nat, zz => U.U32Nat.bit(zz), Bool.and(x, False{}), False{}, un.band_f(x)))), Equal.cong(Nat, Nat, zz => Nat.add(U.U32Nat.bit(False{}), Nat.double(zz)), Word.to_nat(p, Word.and(p, wt, mt)), 0n, un.and_zero(p, wt, mt, un.dz0(Word.to_nat(p, mt), hm)))), {==}) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.cong https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.double https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.to_nat https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&name=un.band_f https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&name=un.dz0 https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&name=un.sz https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&name=un.wc https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/u32.bend&name=U32Nat.bit