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