Get the value field from a dec/oct/hex-const-oct.
(dec/oct/hex-const-oct->value x) → value
This is an ordinary field accessor created by fty::defprod.
Function:
(defun dec/oct/hex-const-oct->value$inline (x) (declare (xargs :guard (dec/oct/hex-constp x))) (declare (xargs :guard (equal (dec/oct/hex-const-kind x) :oct))) (let ((__function__ 'dec/oct/hex-const-oct->value)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (dec/oct/hex-const-kind x) :oct) x))) (nfix (std::da-nth 1 (cdr x)))) :exec (std::da-nth 1 (cdr x)))))
Theorem:
(defthm natp-of-dec/oct/hex-const-oct->value (b* ((value (dec/oct/hex-const-oct->value$inline x))) (natp value)) :rule-classes :rewrite)
Theorem:
(defthm dec/oct/hex-const-oct->value$inline-of-dec/oct/hex-const-fix-x (equal (dec/oct/hex-const-oct->value$inline (dec/oct/hex-const-fix x)) (dec/oct/hex-const-oct->value$inline x)))
Theorem:
(defthm dec/oct/hex-const-oct->value$inline-dec/oct/hex-const-equiv-congruence-on-x (implies (dec/oct/hex-const-equiv x x-equiv) (equal (dec/oct/hex-const-oct->value$inline x) (dec/oct/hex-const-oct->value$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm dec/oct/hex-const-oct->value-when-wrong-kind (implies (not (equal (dec/oct/hex-const-kind x) :oct)) (equal (dec/oct/hex-const-oct->value x) (nfix nil))))