Recognizer for lhbit structures.
(lhbit-p x) → *
Function:
(defun lhbit-p (x) (declare (xargs :guard t)) (let ((__function__ 'lhbit-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :z)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :var) (and (std::prod-consp (cdr x))) (b* ((name (std::prod-car (cdr x))) (idx (std::prod-cdr (cdr x)))) (and (svar-p name) (natp idx)))))))))
Theorem:
(defthm consp-when-lhbit-p (implies (lhbit-p x) (consp x)) :rule-classes :compound-recognizer)