Parse a case-insensitive character value notation.
(parse-case-insensitive-string input) → (mv error? tree? rest-input)
Function:
(defun parse-case-insensitive-string (input) (declare (xargs :guard (nat-listp input))) (seq input (tree-%i := (parse-?%i input)) (tree-qstring := (parse-quoted-string input)) (return (make-tree-nonleaf :rulename? *case-insensitive-string* :branches (list (list tree-%i) (list tree-qstring))))))
Theorem:
(defthm maybe-msgp-of-parse-case-insensitive-string.error? (b* (((mv ?error? ?tree? ?rest-input) (parse-case-insensitive-string input))) (maybe-msgp error?)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-parse-case-insensitive-string.tree? (b* (((mv ?error? ?tree? ?rest-input) (parse-case-insensitive-string input))) (and (tree-optionp tree?) (implies (not error?) (treep tree?)) (implies error? (not tree?)))) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-parse-case-insensitive-string.rest-input (b* (((mv ?error? ?tree? ?rest-input) (parse-case-insensitive-string input))) (nat-listp rest-input)) :rule-classes :rewrite)
Theorem:
(defthm len-of-parse-case-insensitive-string-linear (b* (((mv ?error? ?tree? ?rest-input) (parse-case-insensitive-string input))) (and (<= (len rest-input) (len input)) (implies (not error?) (< (len rest-input) (len input))))) :rule-classes :linear)
Theorem:
(defthm parse-case-insensitive-string-of-nat-list-fix-input (equal (parse-case-insensitive-string (nat-list-fix input)) (parse-case-insensitive-string input)))
Theorem:
(defthm parse-case-insensitive-string-nat-list-equiv-congruence-on-input (implies (acl2::nat-list-equiv input input-equiv) (equal (parse-case-insensitive-string input) (parse-case-insensitive-string input-equiv))) :rule-classes :congruence)