PROOF.un.shl_w: def of bend-osdev-u32@0.1.0.0 Import: import bend-osdev-u32@0.1.0.0/PROOF.bend as PROOF Lines 766-781 of bend-osdev-u32@0.1.0.0/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&start_line=766&end_line=781 import Base import bend-osdev-u32@0.1.0.0/u32.bend as U def un.shl_w(n: Nat, w: Word(n), h: {Nat.is_lt(Nat.double(Word.to_nat(n, w)), U.U32Nat.dbl(n, 1n)) == True{} : Bool}) -> {Word.to_nat(n, Word.shl(n, w)) == Nat.double(Word.to_nat(n, w)) : Nat}: match n: case 0n: match w: case WNil{}: {==} case 1n+ +p: match w: case WCon{False{}, +t}: +k = U.U32Nat.dbl(p, 1n) +x = Word.to_nat(p, t) un.double_cong(Word.to_nat(p, Word.shl.put(p, False{}, t)), Nat.double(x), un.shlput(p, False{}, t, Equal.trans(Bool, Nat.is_lt(Nat.double(x), k), Nat.is_lt(Nat.double(Nat.double(x)), Nat.double(k)), True{}, Equal.sym(Bool, Nat.is_lt(Nat.double(Nat.double(x)), Nat.double(k)), Nat.is_lt(Nat.double(x), k), un.lt_dbl(Nat.double(x), k)), h))) case WCon{True{}, +t}: +k = U.U32Nat.dbl(p, 1n) +x = Word.to_nat(p, t) un.double_cong(Word.to_nat(p, Word.shl.put(p, True{}, t)), 1n+Nat.double(x), un.shlput(p, True{}, t, Equal.trans(Bool, Nat.is_lt(1n+Nat.double(x), k), Nat.is_lt(Nat.double(1n+Nat.double(x)), Nat.double(k)), True{}, Equal.sym(Bool, Nat.is_lt(Nat.double(1n+Nat.double(x)), Nat.double(k)), Nat.is_lt(1n+Nat.double(x), k), un.lt_dbl(1n+Nat.double(x), k)), h))) Uses (16): 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=Nat.is_lt 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.Nil https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.shl https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.shl.put 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/PROOF.bend&name=un.double_cong https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&name=un.lt_dbl https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/PROOF.bend&name=un.shlput https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/u32.bend&name=U32Nat.dbl