def ws.hb

bend-osdev-word64@0.1.1.0 · proof_shift.bend:393

import bend-osdev-word64@0.1.1.0/proof_shift.bend as ProofShift
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

393def ws.hb(+n: Nat, +k: Nat, +hw: Word(n), +lw: Word(n), +ch: Word(n), +cl: Word(n), h: {Nat.is_le(U.U32Nat.dbl(k, P.wv.V(n, hw, lw)), P.wv.V(n, ch, cl)) == True{} : Bool}) -> {Nat.is_lt(U.U32Nat.dbl(n, U.U32Nat.dbl(k, Word.to_nat(n, hw))), P.wv.Q(n, 1n)) == True{} : Bool}:
394  +hc = P.wv.val_lt2(n, Word.to_nat(n, cl), Word.to_nat(n, ch), UL.word_value_lt(n, cl), UL.word_value_lt(n, ch))
395  +l1 = P.wn.le_rw2(U.U32Nat.dbl(n, U.U32Nat.dbl(k, Word.to_nat(n, hw))), Nat.add(U.U32Nat.dbl(k, Word.to_nat(n, lw)), U.U32Nat.dbl(n, U.U32Nat.dbl(k, Word.to_nat(n, hw)))), U.U32Nat.dbl(k, P.wv.V(n, hw, lw)), Equal.sym(Nat, U.U32Nat.dbl(k, P.wv.V(n, hw, lw)), Nat.add(U.U32Nat.dbl(k, Word.to_nat(n, lw)), U.U32Nat.dbl(n, U.U32Nat.dbl(k, Word.to_nat(n, hw)))), ws.ea(n, k, hw, lw)), UL.nat_le_add(U.U32Nat.dbl(n, U.U32Nat.dbl(k, Word.to_nat(n, hw))), U.U32Nat.dbl(k, Word.to_nat(n, lw))))
396  UO.nat_le_lt_trans(U.U32Nat.dbl(n, U.U32Nat.dbl(k, Word.to_nat(n, hw))), U.U32Nat.dbl(k, P.wv.V(n, hw, lw)), P.wv.Q(n, 1n), l1, UO.nat_le_lt_trans(U.U32Nat.dbl(k, P.wv.V(n, hw, lw)), P.wv.V(n, ch, cl), P.wv.Q(n, 1n), h, hc))

Uses (17)

Used by (2)