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