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