law sm_view

lawful-bytes@0.1.1.0 · proof_same.bend:486

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

486law sm_view:
487  for +n: Nat
488  for +la: U32
489  for +ta: P.Tree<U32>
490  for +lb: U32
491  for +tb: P.Tree<U32>
492  for +d: Nat
493  for +e: Nat
494  for +i: U32
495  for +j: U32
496  for +acc: Bool
497  for +ha: {D.ok(C.BT(la, ta), d) == True{} : Bool}
498  for +hb: {D.ok(C.BT(lb, tb), e) == True{} : Bool}
499  for +hi: {Nat.is_le(Nat.add(U32.to_nat(i), n), U32.to_nat(la)) == True{} : Bool}
500  for +hj: {Nat.is_le(Nat.add(U32.to_nat(j), n), U32.to_nat(lb)) == True{} : Bool}
501  {Pair.snd(D.Bytes, Bool, Pair.snd(D.Bytes, D.Bytes & Bool, B.same.go(n, B.at(C.BT(la, ta), i), B.at(C.BT(lb, tb), j), i, j, acc)))
502    == Bool.and(acc, D.list_eq(D.slice(D.view(C.BT(la, ta)), U32.to_nat(i), n), D.slice(D.view(C.BT(lb, tb)), U32.to_nat(j), n))) : Bool}

Uses (30)

Used by (1)