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