ProofShift.ws.gshr_hi_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 456-461 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=456&end_line=461 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.gshr_hi_lt(+n: Nat, +k: Nat, +hw: Word(n), +lw: Word(n), +h1: {Nat.is_le(n, k) == True{} : Bool}) -> {Nat.is_lt(P.wv.V(n, hw, lw), U.U32Nat.dbl(k, 1n+P.wv.V(n, Word.zero(n), ws.shr(n, Nat.sub(k, n), hw)))) == True{} : Bool}: +s1 = Equal.trans(Bool, Nat.is_lt(Nat.add(Word.to_nat(n, lw), U.U32Nat.dbl(n, Word.to_nat(n, hw))), Nat.add(U.U32Nat.dbl(n, 1n), U.U32Nat.dbl(n, Word.to_nat(n, hw)))), Nat.is_lt(Word.to_nat(n, lw), U.U32Nat.dbl(n, 1n)), True{}, P.wn.lt_add_r(Word.to_nat(n, lw), U.U32Nat.dbl(n, 1n), U.U32Nat.dbl(n, Word.to_nat(n, hw))), UL.word_value_lt(n, lw)) +s2 = P.wn.lt_rw2(Nat.add(Word.to_nat(n, lw), U.U32Nat.dbl(n, Word.to_nat(n, hw))), Nat.add(U.U32Nat.dbl(n, 1n), U.U32Nat.dbl(n, Word.to_nat(n, hw))), U.U32Nat.dbl(n, 1n+Word.to_nat(n, hw)), Equal.sym(Nat, U.U32Nat.dbl(n, 1n+Word.to_nat(n, hw)), Nat.add(U.U32Nat.dbl(n, 1n), U.U32Nat.dbl(n, Word.to_nat(n, hw))), UL.dbl_add(n, 1n, Word.to_nat(n, hw))), s1) +s3 = Equal.trans(Bool, Nat.is_le(U.U32Nat.dbl(n, 1n+Word.to_nat(n, hw)), U.U32Nat.dbl(n, U.U32Nat.dbl(Nat.sub(k, n), 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw))))), Nat.is_le(1n+Word.to_nat(n, hw), U.U32Nat.dbl(Nat.sub(k, n), 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)))), True{}, UL.dbl_le(n, 1n+Word.to_nat(n, hw), U.U32Nat.dbl(Nat.sub(k, n), 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)))), Equal.trans(Bool, Nat.is_le(1n+Word.to_nat(n, hw), U.U32Nat.dbl(Nat.sub(k, n), 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)))), Nat.is_lt(Word.to_nat(n, hw), U.U32Nat.dbl(Nat.sub(k, n), 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)))), True{}, P.wn.le_succ(Word.to_nat(n, hw), U.U32Nat.dbl(Nat.sub(k, n), 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)))), ws.shr_lt(n, Nat.sub(k, n), hw))) +e = Equal.trans(Nat, U.U32Nat.dbl(n, U.U32Nat.dbl(Nat.sub(k, n), 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)))), U.U32Nat.dbl(k, 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw))), U.U32Nat.dbl(k, 1n+P.wv.V(n, Word.zero(n), ws.shr(n, Nat.sub(k, n), hw))), Equal.sym(Nat, U.U32Nat.dbl(k, 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw))), U.U32Nat.dbl(n, U.U32Nat.dbl(Nat.sub(k, n), 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)))), ns.dnj(n, k, 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)), h1)), Equal.cong(Nat, Nat, v => U.U32Nat.dbl(k, 1n+v), Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)), P.wv.V(n, Word.zero(n), ws.shr(n, Nat.sub(k, n), hw)), Equal.sym(Nat, P.wv.V(n, Word.zero(n), ws.shr(n, Nat.sub(k, n), hw)), Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)), ws.gshr_hi_v(n, k, hw)))) UO.nat_lt_le_trans(P.wv.V(n, hw, lw), U.U32Nat.dbl(n, 1n+Word.to_nat(n, hw)), U.U32Nat.dbl(k, 1n+P.wv.V(n, Word.zero(n), ws.shr(n, Nat.sub(k, n), hw))), s2, P.wn.le_rw2(U.U32Nat.dbl(n, 1n+Word.to_nat(n, hw)), U.U32Nat.dbl(n, U.U32Nat.dbl(Nat.sub(k, n), 1n+Word.to_nat(n, ws.shr(n, Nat.sub(k, n), hw)))), U.U32Nat.dbl(k, 1n+P.wv.V(n, Word.zero(n), ws.shr(n, Nat.sub(k, n), hw))), e, s3)) Uses (26): 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.add 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=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.to_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.zero https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS.bend&name=dbl_add 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_value_lt 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-word64@0.1.1.0/proof_shift.bend&name=ns.dnj https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_shift.bend&name=ws.gshr_hi_v 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_shift.bend&name=ws.shr_lt 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 https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wn.lt_add_r https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wn.lt_rw2 https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&name=wv.V