Get the tag field from a value-struct.
This is an ordinary field accessor created by fty::defprod.
Function:
(defun value-struct->tag$inline (x) (declare (xargs :guard (valuep x))) (declare (xargs :guard (equal (value-kind x) :struct))) (let ((__function__ 'value-struct->tag)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (value-kind x) :struct) x))) (ident-fix (std::da-nth 0 (cdr x)))) :exec (std::da-nth 0 (cdr x)))))
Theorem:
(defthm identp-of-value-struct->tag (b* ((tag (value-struct->tag$inline x))) (identp tag)) :rule-classes :rewrite)
Theorem:
(defthm value-struct->tag$inline-of-value-fix-x (equal (value-struct->tag$inline (value-fix x)) (value-struct->tag$inline x)))
Theorem:
(defthm value-struct->tag$inline-value-equiv-congruence-on-x (implies (value-equiv x x-equiv) (equal (value-struct->tag$inline x) (value-struct->tag$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm value-struct->tag-when-wrong-kind (implies (not (equal (value-kind x) :struct)) (equal (value-struct->tag x) (ident-fix nil))))