Recognizer for tag-env-option structures.
(tag-env-optionp x) → *
Function:
(defun tag-env-optionp (x) (declare (xargs :guard t)) (let ((__function__ 'tag-env-optionp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :some)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((val (std::da-nth 0 (cdr x)))) (tag-envp val)))) (t (and (eq (car x) :none) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-tag-env-optionp (implies (tag-env-optionp x) (consp x)) :rule-classes :compound-recognizer)