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