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