def cut_bounds.go
lawful-fields@0.1.1.0 · PROOF.bend:47
import lawful-fields@0.1.1.0/PROOF.bend as PROOF
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 C
import lawful-bytes@0.1.1.0/proof_core.bend as BC
import lawful-fields@0.1.1.0/proof_cut.bend as Z
47def cut_bounds.go(-b: D.Bytes, +d: Nat, +from: U32, +to: U32, +sep: U32, +n: Nat, h: {D.ok(b, d) == True{} : Bool}, hft: {U32.is_le(from, to) == True{} : Bool}, ht: {Nat.is_le(U32.to_nat(to), D.size(b)) == True{} : Bool}, hs: {U32.is_lt(sep, 256) == True{} : Bool}, m_b: BC.BMirror(b)) ->
48 {F.within(Pair.snd(D.Bytes, List<&2, U32>, C.cut(b, from, to, sep, n)), U32.to_nat(from), U32.to_nat(to)) == True{} : Bool}:
49 (+l_b, m2_b) = m_b
50 (+t_b, +e_b) = m2_b
51 %e_b : {F.within(Pair.snd(D.Bytes, List<&2, U32>, C.cut(_, from, to, sep, n)), U32.to_nat(from), U32.to_nat(to)) == True{} : Bool}
52 +h_t = BC.tr(x => {D.ok(x, d) == True{} : Bool}, b, l_b, t_b, e_b, h)
53 +ht_t = BC.tr(x => {Nat.is_le(U32.to_nat(to), D.size(x)) == True{} : Bool}, b, l_b, t_b, e_b, ht)
54 Z.cut_bounds_t(l_b, t_b, d, from, to, sep, n, h_t, hft, ht_t, hs)