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