Recognize constraints and lists of constraints.
(constraint/constraintlist-p x) → yes/no
Function:
(defun constraint/constraintlist-p (x) (declare (xargs :guard t)) (let ((__function__ 'constraint/constraintlist-p)) (declare (ignorable __function__)) (or (constraintp x) (constraint-listp x))))
Theorem:
(defthm booleanp-of-constraint/constraintlist-p (b* ((yes/no (constraint/constraintlist-p x))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm constraint/constraintlist-p-when-constraintp (implies (constraintp x) (constraint/constraintlist-p x)))
Theorem:
(defthm constraint/constraintlist-p-when-constraint-listp (implies (constraint-listp x) (constraint/constraintlist-p x)))
Theorem:
(defthm not-constraintp-when-constraint-listp (implies (constraint-listp x) (not (constraintp x))) :rule-classes :tau-system)