def ilog_small_base

bend-collections-laws-crypto@1.0.0.0 · proofs/math/natural/logs.bend:111

import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/logs.bend as Logs
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/natural.bend as M

111def ilog_small_base(+n: Nat, +b: Nat, +hb: {Nat.is_lt(b, 2n) == True{} : Bool}) -> {M.ilog(n, b) == Fail{M.Domain{}} : Result<&2, &2, M.MathError, Nat>}:
112  %Equal.sym(Bool, Nat.is_lt(b, 2n), True{}, hb) : {M.ilog_ok(n, b, Bool.or(Nat.is_eq(n, 0n), _)) == Fail{M.Domain{}} : Result<&2, &2, M.MathError, Nat>}
113  or_true(n, b)

Uses (11)

Used by (1)