PROOF.ud.go: def of bend-osdev-u32@0.1.0.0 Import: import bend-osdev-u32@0.1.0.0/PROOF.bend as PROOF Lines 1784-1789 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=1784&end_line=1789 import Base import bend-osdev-u32@0.1.0.0/u32.bend as U def ud.go(m: Nat, a: Word(m), +b: U32, +hb: {Nat.is_lt(0n, U32.to_nat(b)) == True{} : Bool}) -> {Nat.add(Nat.mul(ud.q(m, U32.divmod.go(m, a, b)), U32.to_nat(b)), ud.r(m, U32.divmod.go(m, a, b))) == Word.to_nat(m, a) : Nat} & {Nat.is_lt(ud.r(m, U32.divmod.go(m, a, b)), U32.to_nat(b)) == True{} : Bool}: match m a: case 0n WNil{}: ({==}, hb) case 1n+ +p WCon{+a0, +hi}: ud.step(p, a0, b, U32.divmod.go(p, hi, b), Word.to_nat(p, hi), Word.to_nat(1n+p, WCon{a0, hi}), Equal.sym(Nat, Word.to_nat(1n+p, WCon{a0, hi}), Nat.add(U.U32Nat.bit(a0), Nat.double(Word.to_nat(p, hi))), un.wc(p, a0, hi)), ud.go(p, hi, b, hb)) Uses (21): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym 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=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.divmod.go https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat 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.Nil 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=ud.q https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&name=ud.r https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&name=ud.step 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