LAWS.sub_wrap: law of bend-osdev-word64@0.1.1.0 Import: import bend-osdev-word64@0.1.1.0/LAWS.bend as LAWS Lines 140-146 of bend-osdev-word64@0.1.1.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-word64@0.1.1.0/LAWS.bend&start_line=140&end_line=146 import Base import bend-osdev-u32@0.1.0.0/u32.bend as U import bend-osdev-word64@0.1.1.0/word64.bend as W # Subtraction, for every pair of words: the difference plus the subtrahend # is the minuend, plus 2^64 when the subtrahend is the larger; when it is # not, the difference is the Nat difference. law sub_wrap: for +a: W.W64 for +b: W.W64 {Nat.add(W.W64.to_nat(W.W64.sub(a, b)), W.W64.to_nat(b)) == Nat.add(W.W64.to_nat(a), U.U32Nat.dbl(64n, U.U32Nat.bit(W.W64.is_lt(a, b)))) : Nat} 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=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.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.sub 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/LAWS.bend&name=lt_value https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/PROOF.bend&name=wp.sub_split https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.gsub https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.subhi https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64 https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.is_lt https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.sub https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.to_nat