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