Check if the given token has the given string as fringe.
(token-stringp string token) → yes/no
Function:
(defun token-stringp (string token) (declare (xargs :guard (and (stringp string) (abnf::tree-optionp token)))) (let ((__function__ 'token-stringp)) (declare (ignorable __function__)) (abnf::tree-option-case token :some (equal (abnf::tree->string token.val) (string=>nats (str-fix string))) :none nil)))
Theorem:
(defthm booleanp-of-token-stringp (b* ((yes/no (token-stringp string token))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm token-nonnil-when-stringp (implies (token-stringp string token) token) :rule-classes :forward-chaining)
Theorem:
(defthm token-stringp-of-str-fix-string (equal (token-stringp (str-fix string) token) (token-stringp string token)))
Theorem:
(defthm token-stringp-streqv-congruence-on-string (implies (acl2::streqv string string-equiv) (equal (token-stringp string token) (token-stringp string-equiv token))) :rule-classes :congruence)
Theorem:
(defthm token-stringp-of-tree-option-fix-token (equal (token-stringp string (abnf::tree-option-fix token)) (token-stringp string token)))
Theorem:
(defthm token-stringp-tree-option-equiv-congruence-on-token (implies (abnf::tree-option-equiv token token-equiv) (equal (token-stringp string token) (token-stringp string token-equiv))) :rule-classes :congruence)