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