Parse the text between a rule name and its definiens.
(parse-defined-as input) → (mv error? tree? rest-input)
Function:
(defun parse-defined-as (input) (declare (xargs :guard (nat-listp input))) (seq input (trees1 := (parse-*cwsp input)) (tree := (parse-equal-/-equal-slash input)) (trees2 := (parse-*cwsp input)) (return (make-tree-nonleaf :rulename? *defined-as* :branches (list trees1 (list tree) trees2)))))
Theorem:
(defthm maybe-msgp-of-parse-defined-as.error? (b* (((mv ?error? ?tree? ?rest-input) (parse-defined-as input))) (maybe-msgp error?)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-parse-defined-as.tree? (b* (((mv ?error? ?tree? ?rest-input) (parse-defined-as input))) (and (tree-optionp tree?) (implies (not error?) (treep tree?)) (implies error? (not tree?)))) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-parse-defined-as.rest-input (b* (((mv ?error? ?tree? ?rest-input) (parse-defined-as input))) (nat-listp rest-input)) :rule-classes :rewrite)
Theorem:
(defthm len-of-parse-defined-as-linear (b* (((mv ?error? ?tree? ?rest-input) (parse-defined-as input))) (and (<= (len rest-input) (len input)) (implies (not error?) (< (len rest-input) (len input))))) :rule-classes :linear)
Theorem:
(defthm parse-defined-as-of-nat-list-fix-input (equal (parse-defined-as (nat-list-fix input)) (parse-defined-as input)))
Theorem:
(defthm parse-defined-as-nat-list-equiv-congruence-on-input (implies (acl2::nat-list-equiv input input-equiv) (equal (parse-defined-as input) (parse-defined-as input-equiv))) :rule-classes :congruence)