law digits_view_t

lawful-fields@0.1.1.0 · proof_digits.bend:212

import lawful-fields@0.1.1.0/proof_digits.bend as ProofDigits
import Base
import lawful-bytes@0.1.1.0/defs.bend as D
import lawful-fields@0.1.1.0/defs.bend as F
import lawful-fields@0.1.1.0/fields.bend as FC
import lawful-bytes@0.1.1.0/proof_core.bend as C
import lawful-arrays@0.1.0.0/proof_tree.bend as P

212law digits_view_t:
213  for +len: U32
214  for +t: P.Tree<U32>
215  for +d: Nat
216  for +from: U32
217  for +to: U32
218  for +h: {D.ok(C.BT(len, t), d) == True{} : Bool}
219  for +hft: {U32.is_le(from, to) == True{} : Bool}
220  for +ht: {Nat.is_le(U32.to_nat(to), D.size(C.BT(len, t))) == True{} : Bool}
221  {Pair.snd(D.Bytes, Bool, FC.digits(C.BT(len, t), from, to)) == F.all_digits(D.slice(D.view(C.BT(len, t)), U32.to_nat(from), Nat.sub(U32.to_nat(to), U32.to_nat(from)))) : Bool}

Uses (32)

Used by (1)