Get the type field from a vl-gateinst.
(vl-gateinst->type x) → type
This is an ordinary field accessor created by defprod.
Function:
(defun vl-gateinst->type$inline (x) (declare (xargs :guard (vl-gateinst-p x))) (declare (xargs :guard t)) (let ((__function__ 'vl-gateinst->type)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x))) (vl-gatetype-fix (std::prod-car (std::prod-car (std::prod-car (cdr x)))))) :exec (std::prod-car (std::prod-car (std::prod-car (cdr x)))))))
Theorem:
(defthm vl-gatetype-p-of-vl-gateinst->type (b* ((type (vl-gateinst->type$inline x))) (vl-gatetype-p type)) :rule-classes ((:rewrite) (:type-prescription :corollary (and (symbolp (vl-gateinst->type x)) (not (equal (vl-gateinst->type x) t)) (not (equal (vl-gateinst->type x) nil))))))
Theorem:
(defthm vl-gateinst->type$inline-of-vl-gateinst-fix-x (equal (vl-gateinst->type$inline (vl-gateinst-fix x)) (vl-gateinst->type$inline x)))
Theorem:
(defthm vl-gateinst->type$inline-vl-gateinst-equiv-congruence-on-x (implies (vl-gateinst-equiv x x-equiv) (equal (vl-gateinst->type$inline x) (vl-gateinst->type$inline x-equiv))) :rule-classes :congruence)