(cst-statement-conc? abnf::cst) → number
Function:
(defun cst-statement-conc? (abnf::cst) (declare (xargs :guard (abnf::treep abnf::cst))) (declare (xargs :guard (cst-matchp abnf::cst "statement"))) (let ((__function__ 'cst-statement-conc?)) (declare (ignorable __function__)) (cond ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "expression-statement")) 1) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "return-statement")) 2) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "variable-declaration")) 3) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "constant-declaration")) 4) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "conditional-statement")) 5) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "loop-statement")) 6) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "assignment-statement")) 7) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "block")) 8) (t (prog2$ (impossible) 1)))))
Theorem:
(defthm posp-of-cst-statement-conc? (b* ((number (cst-statement-conc? abnf::cst))) (posp number)) :rule-classes :rewrite)
Theorem:
(defthm cst-statement-conc?-possibilities (b* ((number (cst-statement-conc? abnf::cst))) (or (equal number 1) (equal number 2) (equal number 3) (equal number 4) (equal number 5) (equal number 6) (equal number 7) (equal number 8))) :rule-classes ((:forward-chaining :trigger-terms ((cst-statement-conc? abnf::cst)))))
Theorem:
(defthm cst-statement-conc?-of-tree-fix-cst (equal (cst-statement-conc? (abnf::tree-fix abnf::cst)) (cst-statement-conc? abnf::cst)))
Theorem:
(defthm cst-statement-conc?-tree-equiv-congruence-on-cst (implies (abnf::tree-equiv abnf::cst cst-equiv) (equal (cst-statement-conc? abnf::cst) (cst-statement-conc? cst-equiv))) :rule-classes :congruence)
Theorem:
(defthm cst-statement-conc?-1-iff-match-conc (implies (cst-matchp abnf::cst "statement") (iff (equal (cst-statement-conc? abnf::cst) 1) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "expression-statement"))))
Theorem:
(defthm cst-statement-conc?-2-iff-match-conc (implies (cst-matchp abnf::cst "statement") (iff (equal (cst-statement-conc? abnf::cst) 2) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "return-statement"))))
Theorem:
(defthm cst-statement-conc?-3-iff-match-conc (implies (cst-matchp abnf::cst "statement") (iff (equal (cst-statement-conc? abnf::cst) 3) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "variable-declaration"))))
Theorem:
(defthm cst-statement-conc?-4-iff-match-conc (implies (cst-matchp abnf::cst "statement") (iff (equal (cst-statement-conc? abnf::cst) 4) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "constant-declaration"))))
Theorem:
(defthm cst-statement-conc?-5-iff-match-conc (implies (cst-matchp abnf::cst "statement") (iff (equal (cst-statement-conc? abnf::cst) 5) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "conditional-statement"))))
Theorem:
(defthm cst-statement-conc?-6-iff-match-conc (implies (cst-matchp abnf::cst "statement") (iff (equal (cst-statement-conc? abnf::cst) 6) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "loop-statement"))))
Theorem:
(defthm cst-statement-conc?-7-iff-match-conc (implies (cst-matchp abnf::cst "statement") (iff (equal (cst-statement-conc? abnf::cst) 7) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "assignment-statement"))))
Theorem:
(defthm cst-statement-conc?-8-iff-match-conc (implies (cst-matchp abnf::cst "statement") (iff (equal (cst-statement-conc? abnf::cst) 8) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "block"))))