ProofU32.uq.shr_w: def of bend-osdev-algo@0.1.0.0 Import: import bend-osdev-algo@0.1.0.0/proof_u32.bend as ProofU32 Lines 547-556 of bend-osdev-algo@0.1.0.0/proof_u32.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&start_line=547&end_line=556 import Base def uq.shr_w(n: Nat, w: Word(n)) -> {Word.to_nat(n, Word.shr(n, w)) == uq.half(Word.to_nat(n, w)) : Nat}: match n: case 0n: {==} case 1n+ +p: match w: case WCon{False{}, +t}: Equal.trans(Nat, Word.to_nat(1n+p, Word.shr.pad(p, t)), Word.to_nat(p, t), uq.half(Nat.double(Word.to_nat(p, t))), uq.pad(p, t), Equal.sym(Nat, uq.half(Nat.double(Word.to_nat(p, t))), Word.to_nat(p, t), uq.half_dbl(Word.to_nat(p, t)))) case WCon{True{}, +t}: Equal.trans(Nat, Word.to_nat(1n+p, Word.shr.pad(p, t)), Word.to_nat(p, t), uq.half(1n+Nat.double(Word.to_nat(p, t))), uq.pad(p, t), Equal.sym(Nat, uq.half(1n+Nat.double(Word.to_nat(p, t))), Word.to_nat(p, t), uq.half_dbl1(Word.to_nat(p, t)))) Uses (14): 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=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.double 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.shr https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.shr.pad https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.to_nat https://jend.leeeet.dev/definition.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&name=uq.half https://jend.leeeet.dev/definition.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&name=uq.half_dbl https://jend.leeeet.dev/definition.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&name=uq.half_dbl1 https://jend.leeeet.dev/definition.txt?path=bend-osdev-algo@0.1.0.0/proof_u32.bend&name=uq.pad