def cap_from
bendtorch-core@0.1.0.0 · src/storage/api.bend:639
import bendtorch-core@0.1.0.0/src/storage/api.bend as Api
import Base
import bendtorch-core@0.1.0.0/src/storage/model.bend as Model
import bendtorch-core@0.1.0.0/src/storage/route.bend as Route
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith
639def cap_from(+n: U32, +fits: {U32.is_le(n, 1048576) == True{} : Bool}) ->
640 {Nat.is_le(U32.to_nat(n), Model.capacity(20n)) == True{} : Bool}:
641 %Route.cap_word(20n, {==}) : {Nat.is_le(U32.to_nat(n), _) == True{} : Bool}
642 %limit_word() : {Nat.is_le(U32.to_nat(n), U32.to_nat(_)) == True{} : Bool}
643 %Equal.sym(Bool, Nat.is_le(U32.to_nat(n), U32.to_nat(1048576)), U32.is_le(n, 1048576), Arith.u32_le(n, 1048576)) : {_ == True{} : Bool}
644 fits