Convert a natural number into a string with its digits.
For instance,
Function:
(defun nat-to-dec-string$inline (n) (declare (xargs :guard (natp n))) (let ((acl2::__function__ 'nat-to-dec-string)) (declare (ignorable acl2::__function__)) (implode (nat-to-dec-chars n))))
Theorem:
(defthm stringp-of-nat-to-dec-string (b* ((str (nat-to-dec-string$inline n))) (stringp str)) :rule-classes :type-prescription)
Theorem:
(defthm dec-digit-char-list*p-of-nat-to-dec-string (dec-digit-char-list*p (explode (nat-to-dec-string n))))
Theorem:
(defthm nat-to-dec-string-one-to-one (equal (equal (nat-to-dec-string n) (nat-to-dec-string m)) (equal (nfix n) (nfix m))))
Theorem:
(defthm dec-digit-chars-value-of-nat-to-dec-string (equal (dec-digit-chars-value (explode (nat-to-dec-string n))) (nfix n)))
Theorem:
(defthm nat-to-dec-string-nonempty (not (equal (nat-to-dec-string n) "")))