Recognize valid bases for representing natural numbers as digits.
(dab-basep x) → yes/no
The fixing function for this predicate is dab-base-fix
and the fixtype for this predicate is
Any integer above 1 raised to a positive power is a valid base, e.g. binary, octal, and hexadecimal bases.
Function:
(defun dab-basep (x) (declare (xargs :guard t)) (let ((__function__ 'dab-basep)) (declare (ignorable __function__)) (and (integerp x) (>= x 2))))
Theorem:
(defthm booleanp-of-dab-basep (b* ((yes/no (dab-basep x))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm posp-when-dab-basep (implies (dab-basep x) (posp x)) :rule-classes :compound-recognizer)
Theorem:
(defthm dab-basep-of-expt (implies (and (integerp x) (> x 1) (posp n)) (dab-basep (expt x n))))