Recognizer for var/const-sort structures.
(var/const-sortp x) → *
Function:
(defun var/const-sortp (x) (declare (xargs :guard t)) (let ((__function__ 'var/const-sortp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :public)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :private) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :constant) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :const) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-var/const-sortp (implies (var/const-sortp x) (consp x)) :rule-classes :compound-recognizer)