ProofShift.ws.shr_lt: def of bend-osdev-word64@0.1.1.0 Import: import bend-osdev-word64@0.1.1.0/proof_shift.bend as ProofShift Lines 321-328 of bend-osdev-word64@0.1.1.0/proof_shift.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-word64@0.1.1.0/proof_shift.bend&start_line=321&end_line=328 import Base import bend-osdev-u32@0.1.0.0/u32.bend as U import bend-osdev-u32@0.1.0.0/LAWS.bend as UL import bend-osdev-word64@0.1.1.0/proof_value.bend as P import bend-osdev-u32@0.1.0.0/LAWS_order.bend as UO def ws.shr_lt(+n: Nat, j: Nat, +w: Word(n)) -> {Nat.is_lt(Word.to_nat(n, w), U.U32Nat.dbl(j, 1n+Word.to_nat(n, ws.shr(n, j, w)))) == True{} : Bool}: match j: case 0n: ns.lt_succ_self(Word.to_nat(n, w)) case 1n+ +p: +e2 = Equal.trans(Nat, U.U32Nat.dbl(p, Nat.double(1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))))), Nat.double(U.U32Nat.dbl(p, 1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))))), Nat.double(U.U32Nat.dbl(p, 1n+Word.to_nat(n, Word.shr(n, ws.shr(n, p, w))))), ns.dbl_double(p, 1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w)))), Equal.cong(Nat, Nat, v => Nat.double(U.U32Nat.dbl(p, 1n+v)), U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))), Word.to_nat(n, Word.shr(n, ws.shr(n, p, w))), Equal.sym(Nat, Word.to_nat(n, Word.shr(n, ws.shr(n, p, w))), U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))), UL.word_shr_value(n, ws.shr(n, p, w))))) +l2 = Equal.trans(Bool, Nat.is_le(U.U32Nat.dbl(p, 1n+Word.to_nat(n, ws.shr(n, p, w))), U.U32Nat.dbl(p, Nat.double(1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w)))))), Nat.is_le(1n+Word.to_nat(n, ws.shr(n, p, w)), Nat.double(1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))))), True{}, UL.dbl_le(p, 1n+Word.to_nat(n, ws.shr(n, p, w)), Nat.double(1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))))), Equal.trans(Bool, Nat.is_le(1n+Word.to_nat(n, ws.shr(n, p, w)), Nat.double(1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))))), Nat.is_lt(Word.to_nat(n, ws.shr(n, p, w)), Nat.double(1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))))), True{}, P.wn.le_succ(Word.to_nat(n, ws.shr(n, p, w)), Nat.double(1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))))), ns.half_lt(Word.to_nat(n, ws.shr(n, p, w))))) UO.nat_lt_le_trans(Word.to_nat(n, w), U.U32Nat.dbl(p, 1n+Word.to_nat(n, ws.shr(n, p, w))), Nat.double(U.U32Nat.dbl(p, 1n+Word.to_nat(n, Word.shr(n, ws.shr(n, p, w))))), ws.shr_lt(n, p, w), P.wn.le_rw2(U.U32Nat.dbl(p, 1n+Word.to_nat(n, ws.shr(n, p, w))), U.U32Nat.dbl(p, Nat.double(1n+U.U32Nat.half(Word.to_nat(n, ws.shr(n, p, w))))), Nat.double(U.U32Nat.dbl(p, 1n+Word.to_nat(n, Word.shr(n, ws.shr(n, p, w))))), e2, l2)) Uses (22): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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.double https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le 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.shr 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=dbl_le https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS.bend&name=word_shr_value https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS_order.bend&name=nat_lt_le_trans 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-u32@0.1.0.0/u32.bend&name=U32Nat.half https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_shift.bend&name=ns.dbl_double https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_shift.bend&name=ns.half_lt https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_shift.bend&name=ns.lt_succ_self https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_shift.bend&name=ws.shr https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wn.le_rw2 https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wn.le_succ