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