law s1_view
lawful-bytes@0.1.1.0 · proof_same.bend:605
import lawful-bytes@0.1.1.0/proof_same.bend as ProofSame
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
605law s1_view:
606 for +n: Nat
607 for +len: U32
608 for +t: P.Tree<U32>
609 for +d: Nat
610 for +i: U32
611 for +j: U32
612 for +acc: Bool
613 for +h: {D.ok(C.BT(len, t), d) == True{} : Bool}
614 for +hi: {Nat.is_le(Nat.add(U32.to_nat(i), n), U32.to_nat(len)) == True{} : Bool}
615 for +hj: {Nat.is_le(Nat.add(U32.to_nat(j), n), U32.to_nat(len)) == True{} : Bool}
616 {Pair.snd(D.Bytes, Bool, B.same1.go(n, B.at2(C.BT(len, t), i, j), i, j, acc))
617 == Bool.and(acc, D.list_eq(D.slice(D.view(C.BT(len, t)), U32.to_nat(i), n), D.slice(D.view(C.BT(len, t)), U32.to_nat(j), n))) : Bool}