law push_room

lawful-bytes@0.1.1.0 · proof_ops.bend:146

import lawful-bytes@0.1.1.0/proof_ops.bend as ProofOps
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-arrays@0.1.0.0/proof_tree.bend as P

146# The room test of push, as numbers.
147law push_room:
148  for +len: U32
149  for +t: P.Tree<U32>
150  for +d: Nat
151  for +h: {D.ok(C.BT(len, t), d) == True{} : Bool}
152  for +hc: {Nat.is_lt(D.size(C.BT(len, t)), D.cap(C.BT(len, t))) == True{} : Bool}
153  {Nat.is_lt(U32.to_nat(len), Nat.mul(4n, Nat.pow(2n, d))) == True{} : Bool}

Uses (14)

Used by (2)