Parse a horizontal tab.
(parse-htab input) → (mv error? tree? rest-input)
Function:
(defun parse-htab (input) (declare (xargs :guard (nat-listp input))) (seq input (tree := (parse-exact 9 input)) (return (make-tree-nonleaf :rulename? *htab* :branches (list (list tree))))))
Theorem:
(defthm maybe-msgp-of-parse-htab.error? (b* (((mv ?error? ?tree? ?rest-input) (parse-htab input))) (maybe-msgp error?)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-parse-htab.tree? (b* (((mv ?error? ?tree? ?rest-input) (parse-htab input))) (and (tree-optionp tree?) (implies (not error?) (treep tree?)) (implies error? (not tree?)))) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-parse-htab.rest-input (b* (((mv ?error? ?tree? ?rest-input) (parse-htab input))) (nat-listp rest-input)) :rule-classes :rewrite)
Theorem:
(defthm len-of-parse-htab-linear (b* (((mv ?error? ?tree? ?rest-input) (parse-htab input))) (and (<= (len rest-input) (len input)) (implies (not error?) (< (len rest-input) (len input))))) :rule-classes :linear)
Theorem:
(defthm parse-htab-of-nat-list-fix-input (equal (parse-htab (nat-list-fix input)) (parse-htab input)))
Theorem:
(defthm parse-htab-nat-list-equiv-congruence-on-input (implies (acl2::nat-list-equiv input input-equiv) (equal (parse-htab input) (parse-htab input-equiv))) :rule-classes :congruence)