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