law fast_find_t

lawful-bytes@0.1.1.0 · proof_fast_find.bend:1039

import lawful-bytes@0.1.1.0/proof_fast_find.bend as ProofFastFind
import Base
import lawful-bytes@0.1.1.0/defs.bend as D
import lawful-bytes@0.1.1.0/bytes.bend as B
import lawful-bytes@0.1.1.0/fast.bend as FA
import lawful-bytes@0.1.1.0/proof_core.bend as C
import lawful-arrays@0.1.0.0/proof_tree.bend as P

1039# fast find equals the reference find, Bytes included.
1040law fast_find_t:
1041  for +len: U32
1042  for +t: P.Tree<U32>
1043  for +d: Nat
1044  for +from: U32
1045  for +to: U32
1046  for +c: U32
1047  for +h: {D.ok(C.BT(len, t), d) == True{} : Bool}
1048  for +hft: {U32.is_le(from, to) == True{} : Bool}
1049  for +ht: {Nat.is_le(U32.to_nat(to), D.size(C.BT(len, t))) == True{} : Bool}
1050  for +hc: {U32.is_lt(c, 256) == True{} : Bool}
1051  {FA.find(C.BT(len, t), from, to, c) == B.find(C.BT(len, t), from, to, c) : D.Bytes & U32}

Uses (34)

Used by (1)