law fgo2_view
lawful-bytes@0.1.1.0 · proof_find.bend:362
import lawful-bytes@0.1.1.0/proof_find.bend as ProofFind
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/proof_core.bend as C
import lawful-arrays@0.1.0.0/proof_tree.bend as P
362
363law fgo2_view:
364 for +n: Nat
365 for +hit: Bool
366 for +len: U32
367 for +t: P.Tree<U32>
368 for +d: Nat
369 for +j: U32
370 for +to: U32
371 for +c1: U32
372 for +c2: U32
373 for +hh: {(U32.is_eq(C.AT(len, t, j), c1) || U32.is_eq(C.AT(len, t, j), c2)) == hit : Bool}
374 for +hn: {Nat.add(U32.to_nat(j), n) == U32.to_nat(to) : Nat}
375 for +hto: {Nat.is_le(U32.to_nat(to), U32.to_nat(len)) == True{} : Bool}
376 for +h: {D.ok(C.BT(len, t), d) == True{} : Bool}
377 {U32.to_nat(Pair.snd(D.Bytes, U32, B.find2.go(n, hit, (C.BT(len, t), C.AT(len, t, (j + 1 : U32))), j, to, c1, c2))) == Nat.add(U32.to_nat(j), D.run_len2(D.slice(D.view(C.BT(len, t)), U32.to_nat(j), n), c1, c2)) : Nat}