Parse a repetition of zero or more hexadecimal digits.
(parse-*hexdig input) → (mv error? trees rest-input)
Function:
(defun parse-*hexdig (input) (declare (xargs :guard (nat-listp input))) (seq-backtrack input ((tree := (parse-hexdig input)) (trees := (parse-*hexdig input)) (return (cons tree trees))) ((return-raw (mv nil nil (nat-list-fix input))))))
Theorem:
(defthm not-of-parse-*hexdig.error? (b* (((mv ?error? ?trees ?rest-input) (parse-*hexdig input))) (not error?)) :rule-classes :rewrite)
Theorem:
(defthm tree-listp-of-parse-*hexdig.trees (b* (((mv ?error? ?trees ?rest-input) (parse-*hexdig input))) (tree-listp trees)) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-parse-*hexdig.rest-input (b* (((mv ?error? ?trees ?rest-input) (parse-*hexdig input))) (nat-listp rest-input)) :rule-classes :rewrite)
Theorem:
(defthm len-of-parse-*hexdig-linear (b* (((mv ?error? ?trees ?rest-input) (parse-*hexdig input))) (<= (len rest-input) (len input))) :rule-classes :linear)
Theorem:
(defthm parse-*hexdig-of-nat-list-fix-input (equal (parse-*hexdig (nat-list-fix input)) (parse-*hexdig input)))
Theorem:
(defthm parse-*hexdig-nat-list-equiv-congruence-on-input (implies (acl2::nat-list-equiv input input-equiv) (equal (parse-*hexdig input) (parse-*hexdig input-equiv))) :rule-classes :congruence)