Recognizer for branch-funct structures.
(branch-funct-p x) → *
Function:
(defun branch-funct-p (x) (declare (xargs :guard t)) (let ((__function__ 'branch-funct-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :beq)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :bne) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :blt) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :bltu) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :bge) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :bgeu) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-branch-funct-p (implies (branch-funct-p x) (consp x)) :rule-classes :compound-recognizer)