(cst-value-conc? abnf::cst) → number
Function:
(defun cst-value-conc? (abnf::cst) (declare (xargs :guard (abnf::treep abnf::cst))) (declare (xargs :guard (cst-matchp abnf::cst "value"))) (let ((__function__ 'cst-value-conc?)) (declare (ignorable __function__)) (cond ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "false")) 1) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "null")) 2) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "true")) 3) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "object")) 4) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "array")) 5) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "number")) 6) ((equal (abnf::tree-nonleaf->rulename? (nth 0 (nth 0 (abnf::tree-nonleaf->branches abnf::cst)))) (abnf::rulename "string")) 7) (t (prog2$ (acl2::impossible) 1)))))
Theorem:
(defthm posp-of-cst-value-conc? (b* ((number (cst-value-conc? abnf::cst))) (posp number)) :rule-classes :rewrite)
Theorem:
(defthm cst-value-conc?-possibilities (b* ((number (cst-value-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))) :rule-classes ((:forward-chaining :trigger-terms ((cst-value-conc? abnf::cst)))))
Theorem:
(defthm cst-value-conc?-of-tree-fix-cst (equal (cst-value-conc? (abnf::tree-fix abnf::cst)) (cst-value-conc? abnf::cst)))
Theorem:
(defthm cst-value-conc?-tree-equiv-congruence-on-cst (implies (abnf::tree-equiv abnf::cst cst-equiv) (equal (cst-value-conc? abnf::cst) (cst-value-conc? cst-equiv))) :rule-classes :congruence)
Theorem:
(defthm cst-value-conc?-1-iff-match-conc (implies (cst-matchp abnf::cst "value") (iff (equal (cst-value-conc? abnf::cst) 1) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "false"))))
Theorem:
(defthm cst-value-conc?-2-iff-match-conc (implies (cst-matchp abnf::cst "value") (iff (equal (cst-value-conc? abnf::cst) 2) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "null"))))
Theorem:
(defthm cst-value-conc?-3-iff-match-conc (implies (cst-matchp abnf::cst "value") (iff (equal (cst-value-conc? abnf::cst) 3) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "true"))))
Theorem:
(defthm cst-value-conc?-4-iff-match-conc (implies (cst-matchp abnf::cst "value") (iff (equal (cst-value-conc? abnf::cst) 4) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "object"))))
Theorem:
(defthm cst-value-conc?-5-iff-match-conc (implies (cst-matchp abnf::cst "value") (iff (equal (cst-value-conc? abnf::cst) 5) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "array"))))
Theorem:
(defthm cst-value-conc?-6-iff-match-conc (implies (cst-matchp abnf::cst "value") (iff (equal (cst-value-conc? abnf::cst) 6) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "number"))))
Theorem:
(defthm cst-value-conc?-7-iff-match-conc (implies (cst-matchp abnf::cst "value") (iff (equal (cst-value-conc? abnf::cst) 7) (cst-list-list-conc-matchp (abnf::tree-nonleaf->branches abnf::cst) "string"))))