def cap_ok.go

lawful-bytes@0.1.1.0 · PROOF.bend:67

import lawful-bytes@0.1.1.0/PROOF.bend as PROOF
import Base
import lawful-bytes@0.1.1.0/defs.bend as D
import lawful-bytes@0.1.1.0/proof_core.bend as C
import lawful-bytes@0.1.1.0/proof_ops.bend as O

67def cap_ok.go(-b: D.Bytes, +d: Nat, h: {D.ok(b, d) == True{} : Bool}, m_b: C.BMirror(b)) ->
68  {D.cap(b) == Nat.mul(4n, Nat.pow(2n, d)) : Nat}:
69  (+l_b, m2_b) = m_b
70  (+t_b, +e_b) = m2_b
71  %e_b : {D.cap(_) == Nat.mul(4n, Nat.pow(2n, d)) : Nat}
72  +h_t = C.tr(x => {D.ok(x, d) == True{} : Bool}, b, l_b, t_b, e_b, h)
73  O.cap_ok_t(l_b, t_b, d, h_t)

Uses (11)

Used by (1)