Get the length field from a iconst.
(iconst->length x) → length
This is an ordinary field accessor created by fty::defprod.
Function:
(defun iconst->length$inline (x) (declare (xargs :guard (iconstp x))) (declare (xargs :guard t)) (let ((__function__ 'iconst->length)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x))) (iconst-length-fix (cdr (std::da-nth 3 (cdr x))))) :exec (cdr (std::da-nth 3 (cdr x))))))
Theorem:
(defthm iconst-lengthp-of-iconst->length (b* ((length (iconst->length$inline x))) (iconst-lengthp length)) :rule-classes :rewrite)
Theorem:
(defthm iconst->length$inline-of-iconst-fix-x (equal (iconst->length$inline (iconst-fix x)) (iconst->length$inline x)))
Theorem:
(defthm iconst->length$inline-iconst-equiv-congruence-on-x (implies (iconst-equiv x x-equiv) (equal (iconst->length$inline x) (iconst->length$inline x-equiv))) :rule-classes :congruence)