Get the taggedp field from a vl-union.
(vl-union->taggedp x) → taggedp
This is an ordinary field accessor created by defprod.
Function:
(defun vl-union->taggedp$inline (x) (declare (xargs :guard (vl-datatype-p x))) (declare (xargs :guard (equal (vl-datatype-kind x) :vl-union))) (let ((__function__ 'vl-union->taggedp)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (vl-datatype-kind x) :vl-union) x))) (acl2::bool-fix (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x)))))) :exec (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x)))))))
Theorem:
(defthm booleanp-of-vl-union->taggedp (b* ((taggedp (vl-union->taggedp$inline x))) (booleanp taggedp)) :rule-classes :type-prescription)
Theorem:
(defthm vl-union->taggedp$inline-of-vl-datatype-fix-x (equal (vl-union->taggedp$inline (vl-datatype-fix x)) (vl-union->taggedp$inline x)))
Theorem:
(defthm vl-union->taggedp$inline-vl-datatype-equiv-congruence-on-x (implies (vl-datatype-equiv x x-equiv) (equal (vl-union->taggedp$inline x) (vl-union->taggedp$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-union->taggedp-when-wrong-kind (implies (not (equal (vl-datatype-kind x) :vl-union)) (equal (vl-union->taggedp x) (acl2::bool-fix nil))))