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