Returns the number of bits that a value of this kind could take.
(int-value-numbits int-v) → result
The integer value of
Function:
(defun int-value-numbits (int-v) (declare (xargs :guard (int-valuep int-v))) (let ((__function__ 'int-value-numbits)) (declare (ignorable __function__)) (case (value-kind int-v) (:u8 8) (:u16 16) (:u32 32) (:u64 64) (:u128 128) (:i8 8) (:i16 16) (:i32 32) (:i64 64) (:i128 128) (t (prog2$ (impossible) 0)))))
Theorem:
(defthm natp-of-int-value-numbits (implies (and (int-valuep int-v)) (b* ((result (int-value-numbits int-v))) (natp result))) :rule-classes :rewrite)