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