def ilog_ok
import bend-collections-laws-math@1.0.0.0/src/math/natural.bend as Naturalimport Base
263def ilog_ok(+n: Nat, +b: Nat, +bad: Bool) -> Result<&2, &2, MathError, Nat>:
264 match bad:
265 case True{}:
266 Fail{Domain{}}
267 case False{}:
268 Done{ilog_go(n, n, b, 0n, 1n, Nat.is_le(1n, Nat.div(n, b)))}
Uses (7)
Used by (10)
- bend-collections-laws-math@1.0.0.0/src/math/natural:ilog
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/logs:ilog_done
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/logs:ilog_small_base
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/logs:or_true
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32int:ilog_fin
- …