ProofValue.wv.gadd.go: def of bend-osdev-word64@0.1.1.0 Import: import bend-osdev-word64@0.1.1.0/proof_value.bend as ProofValue Lines 466-470 of bend-osdev-word64@0.1.1.0/proof_value.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&start_line=466&end_line=470 import Base import bend-osdev-u32@0.1.0.0/u32.bend as U import bend-osdev-u32@0.1.0.0/LAWS.bend as UL # the value of the sum of two words of two halves, with its carry out def wv.gadd.go(+n: Nat, +ah: Word(n), +al: Word(n), +bh: Word(n), +bl: Word(n), eb: {Word.to_nat(n, wv.bitw(n, wv.c1add(n, al, bl))) == U.U32Nat.bit(wv.c1add(n, al, bl)) : Nat}) -> {Nat.add(Nat.add(Word.to_nat(n, Word.add(n, al, bl)), U.U32Nat.dbl(n, Word.to_nat(n, wv.addhi(n, ah, al, bh, bl)))), wv.Q(n, Nat.add(U.U32Nat.bit(Cmp.is_lt(Word.cmp(n, Word.add(n, ah, bh), ah))), U.U32Nat.bit(Cmp.is_lt(Word.cmp(n, wv.addhi(n, ah, al, bh, bl), Word.add(n, ah, bh))))))) == Nat.add(wv.V(n, ah, al), wv.V(n, bh, bl)) : Nat}: +tw = Word.add(n, ah, bh) +bw = wv.bitw(n, wv.c1add(n, al, bl)) wv.nadd(n, wv.c1add(n, al, bl), Cmp.is_lt(Word.cmp(n, tw, ah)), Cmp.is_lt(Word.cmp(n, wv.addhi(n, ah, al, bh, bl), tw)), Word.to_nat(n, Word.add(n, al, bl)), Word.to_nat(n, tw), Word.to_nat(n, wv.addhi(n, ah, al, bh, bl)), Word.to_nat(n, al), Word.to_nat(n, ah), Word.to_nat(n, bl), Word.to_nat(n, bh), Word.to_nat(n, bw), UL.word_add_wrap(n, al, bl), UL.word_add_wrap(n, ah, bh), UL.word_add_wrap(n, tw, bw), eb) Uses (16): 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=Word 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.to_nat https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS.bend&name=word_add_wrap https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/u32.bend&name=U32Nat.bit https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/u32.bend&name=U32Nat.dbl https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.Q https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.V https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.addhi https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.bitw https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.c1add https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.nadd