Get the width field from a pinst-special-term.
This is an ordinary field accessor created by fty::defprod.
Function:
(defun pinst-special-term->width$inline (x) (declare (xargs :guard (pinst-p x))) (declare (xargs :guard (equal (pinst-kind x) :special-term))) (let ((acl2::__function__ 'pinst-special-term->width)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((x (and (equal (pinst-kind x) :special-term) x))) (acl2::pos-fix (std::prod-car (std::prod-car (cdr x))))) :exec (std::prod-car (std::prod-car (cdr x))))))
Theorem:
(defthm posp-of-pinst-special-term->width (b* ((width (pinst-special-term->width$inline x))) (posp width)) :rule-classes :rewrite)
Theorem:
(defthm pinst-special-term->width$inline-of-pinst-fix-x (equal (pinst-special-term->width$inline (pinst-fix x)) (pinst-special-term->width$inline x)))
Theorem:
(defthm pinst-special-term->width$inline-pinst-equiv-congruence-on-x (implies (pinst-equiv x x-equiv) (equal (pinst-special-term->width$inline x) (pinst-special-term->width$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm pinst-special-term->width-when-wrong-kind (implies (not (equal (pinst-kind x) :special-term)) (equal (pinst-special-term->width x) (acl2::pos-fix nil))))