Notion of parsable string.
A string is parsable iff it has at least one parse tree.
Theorem:
(defthm string-parsablep-suff (implies (parse-treep tree string rulename rules) (string-parsablep string rulename rules)))
Theorem:
(defthm booleanp-of-string-parsablep (b* ((yes/no (string-parsablep string rulename rules))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm string-parsablep-of-string-fix-string (equal (string-parsablep (string-fix string) rulename rules) (string-parsablep string rulename rules)))
Theorem:
(defthm string-parsablep-string-equiv-congruence-on-string (implies (string-equiv string string-equiv) (equal (string-parsablep string rulename rules) (string-parsablep string-equiv rulename rules))) :rule-classes :congruence)
Theorem:
(defthm string-parsablep-of-rulename-fix-rulename (equal (string-parsablep string (rulename-fix rulename) rules) (string-parsablep string rulename rules)))
Theorem:
(defthm string-parsablep-rulename-equiv-congruence-on-rulename (implies (rulename-equiv rulename rulename-equiv) (equal (string-parsablep string rulename rules) (string-parsablep string rulename-equiv rules))) :rule-classes :congruence)
Theorem:
(defthm string-parsablep-of-rulelist-fix-rules (equal (string-parsablep string rulename (rulelist-fix rules)) (string-parsablep string rulename rules)))
Theorem:
(defthm string-parsablep-rulelist-equiv-congruence-on-rules (implies (rulelist-equiv rules rules-equiv) (equal (string-parsablep string rulename rules) (string-parsablep string rulename rules-equiv))) :rule-classes :congruence)
Theorem:
(defthm treep-of-string-parsablep-witness-when-string-parsablep (implies (string-parsablep string rulename rules) (treep (string-parsablep-witness string rulename rules))))
Theorem:
(defthm not-parse-treep-when-not-string-parsablep (implies (not (string-parsablep string rulename rules)) (not (parse-treep tree string rulename rules))))
Theorem:
(defthm parse-treep-of-string-parsablep-witness-when-string-parsablep (implies (string-parsablep string rulename rules) (parse-treep (string-parsablep-witness string rulename rules) string rulename rules)))