(ocst-statement-conc? abnf::cst) → number
Function:
(defun ocst-statement-conc? (abnf::cst) (declare (xargs :guard (abnf::treep abnf::cst))) (declare (xargs :guard (ocst-matchp abnf::cst "statement"))) (let ((__function__ 'ocst-statement-conc?)) (declare (ignorable __function__)) (cond ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "block")) 1) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "functiondefinition")) 2) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "variabledeclaration")) 3) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "assignment")) 4) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "if")) 5) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "expression")) 6) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "switch")) 7) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "forloop")) 8) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "breakcontinue")) 9) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "leave")) 10) (t (prog2$ (acl2::impossible) 1)))))
Theorem:
(defthm posp-of-ocst-statement-conc? (b* ((number (ocst-statement-conc? abnf::cst))) (posp number)) :rule-classes :rewrite)
Theorem:
(defthm ocst-statement-conc?-possibilities (b* ((number (ocst-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) (equal number 9) (equal number 10))) :rule-classes ((:forward-chaining :trigger-terms ((ocst-statement-conc? abnf::cst)))))
Theorem:
(defthm ocst-statement-conc?-of-tree-fix-cst (equal (ocst-statement-conc? (abnf::tree-fix abnf::cst)) (ocst-statement-conc? abnf::cst)))
Theorem:
(defthm ocst-statement-conc?-tree-equiv-congruence-on-cst (implies (abnf::tree-equiv abnf::cst cst-equiv) (equal (ocst-statement-conc? abnf::cst) (ocst-statement-conc? cst-equiv))) :rule-classes :congruence)
Theorem:
(defthm ocst-statement-conc?-1-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 1) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "block"))))
Theorem:
(defthm ocst-statement-conc?-2-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 2) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "functiondefinition"))))
Theorem:
(defthm ocst-statement-conc?-3-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 3) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "variabledeclaration"))))
Theorem:
(defthm ocst-statement-conc?-4-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 4) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "assignment"))))
Theorem:
(defthm ocst-statement-conc?-5-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 5) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "if"))))
Theorem:
(defthm ocst-statement-conc?-6-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 6) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "expression"))))
Theorem:
(defthm ocst-statement-conc?-7-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 7) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "switch"))))
Theorem:
(defthm ocst-statement-conc?-8-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 8) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "forloop"))))
Theorem:
(defthm ocst-statement-conc?-9-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 9) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "breakcontinue"))))
Theorem:
(defthm ocst-statement-conc?-10-iff-match-conc (implies (ocst-matchp abnf::cst "statement") (iff (equal (ocst-statement-conc? abnf::cst) 10) (ocst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "leave"))))