Recognizer for unop structures.
(unopp x) → *
Function:
(defun unopp (x) (declare (xargs :guard t)) (let ((__function__ 'unopp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :address)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :indir) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :plus) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :minus) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :bitnot) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :lognot) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-unopp (implies (unopp x) (consp x)) :rule-classes :compound-recognizer)