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