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