ProofValue.wv.halves_eq: def of bend-osdev-word64@0.1.1.0 Import: import bend-osdev-word64@0.1.1.0/proof_value.bend as ProofValue Lines 363-370 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=363&end_line=370 import Base import bend-osdev-u32@0.1.0.0/LAWS.bend as UL # equal values: equal halves def wv.halves_eq(+n: Nat, +ah: Word(n), +al: Word(n), +bh: Word(n), +bl: Word(n), e: {wv.V(n, ah, al) == wv.V(n, bh, bl) : Nat}) -> {(ah, al) == (bh, bl) : Word(n) & Word(n)}: +c = Equal.trans(Cmp, wv.lex(Word.cmp(n, ah, bh), Word.cmp(n, al, bl)), Nat.cmp(wv.V(n, ah, al), wv.V(n, bh, bl)), EQ{}, wv.gcmp(n, ah, al, bh, bl), Equal.trans(Cmp, Nat.cmp(wv.V(n, ah, al), wv.V(n, bh, bl)), Nat.cmp(wv.V(n, bh, bl), wv.V(n, bh, bl)), EQ{}, Equal.cong(Nat, Cmp, v => Nat.cmp(v, wv.V(n, bh, bl)), wv.V(n, ah, al), wv.V(n, bh, bl), e), wn.cmp_refl(wv.V(n, bh, bl)))) +eh = UL.word_value_eq(n, ah, bh, wn.cmp_eq(Word.to_nat(n, ah), Word.to_nat(n, bh), Equal.trans(Cmp, Nat.cmp(Word.to_nat(n, ah), Word.to_nat(n, bh)), Word.cmp(n, ah, bh), EQ{}, Equal.sym(Cmp, Word.cmp(n, ah, bh), Nat.cmp(Word.to_nat(n, ah), Word.to_nat(n, bh)), UL.word_cmp_value(n, ah, bh)), wv.lex_eq_l(Word.cmp(n, ah, bh), Word.cmp(n, al, bl), c)))) +el = UL.word_value_eq(n, al, bl, wn.cmp_eq(Word.to_nat(n, al), Word.to_nat(n, bl), Equal.trans(Cmp, Nat.cmp(Word.to_nat(n, al), Word.to_nat(n, bl)), Word.cmp(n, al, bl), EQ{}, Equal.sym(Cmp, Word.cmp(n, al, bl), Nat.cmp(Word.to_nat(n, al), Word.to_nat(n, bl)), UL.word_cmp_value(n, al, bl)), wv.lex_eq_r(Word.cmp(n, ah, bh), Word.cmp(n, al, bl), c)))) %eh : {(ah, al) == (_, bl) : Word(n) & Word(n)} %el : {(ah, al) == (ah, _) : Word(n) & Word(n)} {==} Uses (20): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp 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=Equal.trans https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.cmp 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=Word 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_cmp_value https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS.bend&name=word_value_eq https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wn.cmp_eq https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wn.cmp_refl 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.gcmp https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.lex https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.lex_eq_l https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.lex_eq_r