Recognizer for inc/dec-op structures.
(inc/dec-opp x) → *
Function:
(defun inc/dec-opp (x) (declare (xargs :guard t)) (and (consp x) (cond ((or (atom x) (eq (car x) :inc)) (and (eq (cdr x) nil) (b* nil t))) (t (and (eq (car x) :dec) (and (eq (cdr x) nil)) (b* nil t))))))
Theorem:
(defthm consp-when-inc/dec-opp (implies (inc/dec-opp x) (consp x)) :rule-classes :compound-recognizer)