Completeness property for parse-alternation.
Theorem:
(defthm pred-alternation-necc (implies (pred-alternation input) (implies (and (tree-match-element-p tree (element-rulename *alternation*) *grammar*) (tree-terminatedp tree) (nat-listp rest-input) (mv-nth 0 (parse-alt-rest-comp rest-input)) (mv-nth 0 (parse-conc-rest-comp rest-input)) (mv-nth 0 (parse-alpha/digit/dash rest-input)) (mv-nth 0 (parse-bit rest-input)) (mv-nth 0 (parse-digit rest-input)) (mv-nth 0 (parse-hexdig rest-input)) (mv-nth 0 (parse-ichar #\. rest-input)) (mv-nth 0 (parse-ichar #\- rest-input)) (equal input (append (tree->string tree) rest-input))) (equal (parse-alternation (append (tree->string tree) rest-input)) (mv nil (tree-fix tree) rest-input)))))
Theorem:
(defthm booleanp-of-pred-alternation (b* ((bool (pred-alternation input))) (booleanp bool)) :rule-classes :type-prescription)