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