Recognizer for cprefix structures.
(cprefixp x) → *
Function:
(defun cprefixp (x) (declare (xargs :guard t)) (let ((__function__ 'cprefixp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :upcase-l)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :locase-u) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :upcase-u) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-cprefixp (implies (cprefixp x) (consp x)) :rule-classes :compound-recognizer)