Check if an ABNF string (i.e. a list of natural numbers) is the fringe of a tree for a keyword.
Theorem:
(defthm keyword-abnf-stringp-suff (implies (and (abnf-tree-with-root-p tree "keyword") (equal (nat-list-fix string) (abnf::tree->string tree))) (keyword-abnf-stringp string)))
Theorem:
(defthm booleanp-of-keyword-abnf-stringp (b* ((yes/no (keyword-abnf-stringp string))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm treep-of-keyword-abnf-stringp-witness (implies (keyword-abnf-stringp string) (abnf::treep (keyword-abnf-stringp-witness string))))
Theorem:
(defthm keyword-abnf-stringp-of-nat-list-fix-string (equal (keyword-abnf-stringp (nat-list-fix string)) (keyword-abnf-stringp string)))
Theorem:
(defthm keyword-abnf-stringp-nat-list-equiv-congruence-on-string (implies (acl2::nat-list-equiv string string-equiv) (equal (keyword-abnf-stringp string) (keyword-abnf-stringp string-equiv))) :rule-classes :congruence)