Get the bits field from a uchar-format.
(uchar-format->bits x) → bits
This is an ordinary field accessor created by fty::defprod.
Function:
(defun uchar-format->bits$inline (x) (declare (xargs :guard (uchar-formatp x))) (declare (xargs :guard t)) (let ((__function__ 'uchar-format->bits)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x)) (bits (nfix (cdr (std::da-nth 0 x))))) (if (>= bits 8) bits 8)) :exec (cdr (std::da-nth 0 x)))))
Theorem:
(defthm natp-of-uchar-format->bits (b* ((bits (uchar-format->bits$inline x))) (natp bits)) :rule-classes :rewrite)
Theorem:
(defthm uchar-format->bits$inline-of-uchar-format-fix-x (equal (uchar-format->bits$inline (uchar-format-fix x)) (uchar-format->bits$inline x)))
Theorem:
(defthm uchar-format->bits$inline-uchar-format-equiv-congruence-on-x (implies (uchar-format-equiv x x-equiv) (equal (uchar-format->bits$inline x) (uchar-format->bits$inline x-equiv))) :rule-classes :congruence)