(cst-token-conc? abnf::cst) → number
Function:
(defun cst-token-conc? (abnf::cst) (declare (xargs :guard (abnf::treep abnf::cst))) (declare (xargs :guard (cst-matchp abnf::cst "token"))) (let ((__function__ 'cst-token-conc?)) (declare (ignorable __function__)) (cond ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "keyword")) 1) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "identifier")) 2) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "atomic-literal")) 3) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "decimal-numeral")) 4) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "annotation")) 5) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "symbol")) 6) (t (prog2$ (impossible) 1)))))
Theorem:
(defthm posp-of-cst-token-conc? (b* ((number (cst-token-conc? abnf::cst))) (posp number)) :rule-classes :rewrite)
Theorem:
(defthm cst-token-conc?-possibilities (b* ((number (cst-token-conc? abnf::cst))) (or (equal number 1) (equal number 2) (equal number 3) (equal number 4) (equal number 5) (equal number 6))) :rule-classes ((:forward-chaining :trigger-terms ((cst-token-conc? abnf::cst)))))
Theorem:
(defthm cst-token-conc?-of-tree-fix-cst (equal (cst-token-conc? (abnf::tree-fix abnf::cst)) (cst-token-conc? abnf::cst)))
Theorem:
(defthm cst-token-conc?-tree-equiv-congruence-on-cst (implies (abnf::tree-equiv abnf::cst cst-equiv) (equal (cst-token-conc? abnf::cst) (cst-token-conc? cst-equiv))) :rule-classes :congruence)
Theorem:
(defthm cst-token-conc?-1-iff-match-conc (implies (cst-matchp abnf::cst "token") (iff (equal (cst-token-conc? abnf::cst) 1) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "keyword"))))
Theorem:
(defthm cst-token-conc?-2-iff-match-conc (implies (cst-matchp abnf::cst "token") (iff (equal (cst-token-conc? abnf::cst) 2) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "identifier"))))
Theorem:
(defthm cst-token-conc?-3-iff-match-conc (implies (cst-matchp abnf::cst "token") (iff (equal (cst-token-conc? abnf::cst) 3) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "atomic-literal"))))
Theorem:
(defthm cst-token-conc?-4-iff-match-conc (implies (cst-matchp abnf::cst "token") (iff (equal (cst-token-conc? abnf::cst) 4) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "decimal-numeral"))))
Theorem:
(defthm cst-token-conc?-5-iff-match-conc (implies (cst-matchp abnf::cst "token") (iff (equal (cst-token-conc? abnf::cst) 5) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "annotation"))))
Theorem:
(defthm cst-token-conc?-6-iff-match-conc (implies (cst-matchp abnf::cst "token") (iff (equal (cst-token-conc? abnf::cst) 6) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "symbol"))))