Number of characters in the hexadecimal representation of a natural.
Function:
(defun nat-to-hex-string-size$inline (x) (declare (xargs :guard (natp x))) (let ((acl2::__function__ 'nat-to-hex-string-size)) (declare (ignorable acl2::__function__)) (mbe :logic (len (nat-to-hex-chars x)) :exec (if (zp x) 1 (nat-to-hex-string-size-aux x)))))
Theorem:
(defthm posp-of-nat-to-hex-string-size (b* ((size (nat-to-hex-string-size$inline x))) (posp size)) :rule-classes :type-prescription)