ProofValue.wv.val_lt2: def of bend-osdev-word64@0.1.1.0 Import: import bend-osdev-word64@0.1.1.0/proof_value.bend as ProofValue Lines 298-304 of bend-osdev-word64@0.1.1.0/proof_value.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-word64@0.1.1.0/proof_value.bend&start_line=298&end_line=304 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-u32@0.1.0.0/LAWS_order.bend as UO # lo < 2^n and hi < 2^n: lo + 2^n * hi < 2^(2n) def wv.val_lt2(+n: Nat, +l: Nat, +h: Nat, hl: {Nat.is_lt(l, U.U32Nat.dbl(n, 1n)) == True{} : Bool}, hh: {Nat.is_lt(h, U.U32Nat.dbl(n, 1n)) == True{} : Bool}) -> {Nat.is_lt(Nat.add(l, U.U32Nat.dbl(n, h)), wv.Q(n, 1n)) == True{} : Bool}: +k = U.U32Nat.dbl(n, 1n) +s1 = Equal.trans(Bool, Nat.is_lt(Nat.add(l, U.U32Nat.dbl(n, h)), Nat.add(k, U.U32Nat.dbl(n, h))), Nat.is_lt(l, k), True{}, wn.lt_add_r(l, k, U.U32Nat.dbl(n, h)), hl) +s2 = wn.lt_rw2(Nat.add(l, U.U32Nat.dbl(n, h)), Nat.add(k, U.U32Nat.dbl(n, h)), U.U32Nat.dbl(n, 1n+h), Equal.sym(Nat, U.U32Nat.dbl(n, 1n+h), Nat.add(k, U.U32Nat.dbl(n, h)), UL.dbl_add(n, 1n, h)), s1) +s3 = Equal.trans(Bool, Nat.is_le(U.U32Nat.dbl(n, 1n+h), U.U32Nat.dbl(n, k)), Nat.is_le(1n+h, k), True{}, UL.dbl_le(n, 1n+h, k), Equal.trans(Bool, Nat.is_le(1n+h, k), Nat.is_lt(h, k), True{}, wn.le_succ(h, k), hh)) UO.nat_lt_le_trans(Nat.add(l, U.U32Nat.dbl(n, h)), U.U32Nat.dbl(n, 1n+h), U.U32Nat.dbl(n, k), s2, s3) Uses (15): 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.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=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_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_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.Q