Recognizer for operand structures.
(operandp x) → *
Function:
(defun operandp (x) (declare (xargs :guard t)) (let ((__function__ 'operandp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :literal)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (literalp get)))) ((eq (car x) :register) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (regaccessp get)))) ((eq (car x) :program) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((get (std::da-nth 0 (cdr x)))) (programidp get)))) (t (and (eq (car x) :selfcaller) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-operandp (implies (operandp x) (consp x)) :rule-classes :compound-recognizer)