PROOF.um.k: def of bend-osdev-u32@0.1.0.0 Import: import bend-osdev-u32@0.1.0.0/PROOF.bend as PROOF Lines 1373-1382 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=1373&end_line=1382 import Base import bend-osdev-u32@0.1.0.0/u32.bend as U def um.k(+n: Nat, m: Nat, a: Word(m), +b: Word(n), +acc: Word(n)) -> Nat: match m: case 0n: 0n case 1n+ +mp: match a: case WCon{False{}, +at}: Nat.add(um.k(n, mp, at, Word.shl(n, b), acc), Nat.mul(Word.to_nat(mp, at), U.U32Nat.bit(un.top(n, b)))) case WCon{True{}, +at}: Nat.add(um.k(n, mp, at, Word.shl(n, b), Word.add(n, acc, b)), Nat.add(U.U32Nat.bit(Cmp.is_lt(Word.cmp(n, Word.add(n, acc, b), acc))), Nat.mul(Word.to_nat(mp, at), U.U32Nat.bit(un.top(n, b))))) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp.is_lt 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.mul 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.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.cmp https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.shl 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.top https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/u32.bend&name=U32Nat.bit