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