WordMultiplication.u32_refines: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/word_multiplication.bend as WordMultiplication Lines 59-64 of bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/word_multiplication.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/word_multiplication.bend&start_line=59&end_line=64 import Base import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/spec/numeric.bend as S import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/numeric.bend as Numeric def u32_refines(a: U32, b: U32) -> {U32.mul(a, b) == U32{S.from_nat(32n, Nat.mul(U32.to_nat(a), U32.to_nat(b)))} : U32}: match a b: case U32{+x} U32{+y}: %Equal.sym(Nat, Word.to_nat(32n, x), S.unsigned(32n, x), Numeric.primitive_word_interpretation(32n, x)) : {U32.mul(U32{x}, U32{y}) == U32{S.from_nat(32n, Nat.mul(_, Word.to_nat(32n, y)))} : U32} %Equal.sym(Nat, Word.to_nat(32n, y), S.unsigned(32n, y), Numeric.primitive_word_interpretation(32n, y)) : {U32.mul(U32{x}, U32{y}) == U32{S.from_nat(32n, Nat.mul(S.unsigned(32n, x), _))} : U32} Equal.cong(Word(32n), U32, w => U32{w}, Word.mul(32n, x, y), S.from_nat(32n, Nat.mul(S.unsigned(32n, x), S.unsigned(32n, y))), refines(32n, x, y)) Uses (14): 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.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.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul 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.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.to_nat https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/numeric.bend&name=primitive_word_interpretation https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/word_multiplication.bend&name=refines https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/spec/numeric.bend&name=from_nat https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/spec/numeric.bend&name=unsigned